/* ─────────────────────────────────────────────────────────────────────────
   elpaisnews-extras.css
   Supplementary styles for pages not fully covered by style.css
   (search results, subscribe flash messages, pagination overrides, etc.)
   ───────────────────────────────────────────────────────────────────────── */

/* ── Search Results Page ──────────────────────────────────────────────── */
.search-results-wrapper {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 24px 60px;
  font-family: 'Roboto', sans-serif;
}

.search-results-header {
  border-bottom: 3px solid #1d1d1f;
  padding-bottom: 12px;
  margin-bottom: 24px;
}

.search-results-title {
  font-size: 28px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 6px;
  font-family: 'Playfair Display', serif;
}

.search-results-title em {
  font-style: italic;
  color: #006870;
}

.search-results-count {
  font-size: 13px;
  color: #555;
  margin: 0;
}

/* ── Search bar on results page ─────────────────────────────────────────── */
.search-results-bar {
  margin-bottom: 32px;
}

.search-input-wrap {
  display: flex;
  border: 2px solid #1d1d1f;
  border-radius: 4px;
  overflow: hidden;
}

.search-input-field {
  flex: 1;
  padding: 12px 16px;
  font-size: 15px;
  border: none;
  outline: none;
  background: #fff4eb;
  font-family: 'Roboto', sans-serif;
  color: #1d1d1f;
}

.search-submit-btn {
  background-color: #006870;
  color: #fff;
  border: none;
  padding: 0 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.search-submit-btn:hover {
  background-color: #004e54;
}

/* ── Individual result items ────────────────────────────────────────────── */
.search-result-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid #e1e1e1;
}

.search-result-content {
  flex: 1;
  min-width: 0;
}

.search-result-cat {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #006870;
  display: block;
  margin-bottom: 6px;
}

.search-result-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 8px;
  font-family: 'Playfair Display', serif;
  line-height: 1.3;
  color: #1d1d1f;
}

.search-result-title:hover {
  text-decoration: underline;
}

.search-result-summary {
  font-size: 14px;
  color: #444;
  margin: 0 0 10px;
  line-height: 1.5;
}

.search-result-meta {
  font-size: 12px;
  color: #777;
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.search-result-meta a {
  color: #006870;
  text-decoration: none;
}

.search-result-meta a:hover {
  text-decoration: underline;
}

.search-result-thumb {
  flex-shrink: 0;
  display: block;
  width: 130px;
  height: 90px;
  overflow: hidden;
}

.search-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s;
}

.search-result-thumb:hover img {
  opacity: 0.9;
}

/* ── No results state ───────────────────────────────────────────────────── */
.search-no-results {
  padding: 40px 0;
  text-align: center;
  color: #444;
  font-size: 15px;
}

.search-no-results strong {
  color: #1d1d1f;
}

.search-no-results-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.search-cat-pill {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid #1d1d1f;
  border-radius: 20px;
  font-size: 13px;
  text-decoration: none;
  color: #1d1d1f;
  transition: background 0.2s, color 0.2s;
}

.search-cat-pill:hover {
  background: #1d1d1f;
  color: #fff;
}

/* ── Subscribe flash messages ───────────────────────────────────────────── */
.subscribe-alert {
  padding: 10px 14px;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 14px;
}

.subscribe-alert-success {
  background: #d4edda;
  color: #155724;
}

.subscribe-alert-info {
  background: #d1ecf1;
  color: #0c5460;
}

/* ── Pagination ─────────────────────────────────────────────────────────── */
.mt-4 {
  margin-top: 32px;
  margin-bottom: 8px;
}

/* Wrapper nav */
.elpais-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 0 8px;
  font-family: 'Roboto', sans-serif;
  flex-wrap: wrap;
}

/* Number strip */
.elpais-pagination .page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

/* ── Shared base for every clickable / display piece ── */
.elpais-pagination .page-item,
.elpais-pagination .page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 36px;
  padding: 0 8px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
  line-height: 1;
}

/* ── Numbered page links ── */
.elpais-pagination a.page-item {
  border: 1.5px solid #d8d8d8;
  background: #fff;
  color: #1d1d1f;
}

.elpais-pagination a.page-item:hover {
  background: #006870;
  border-color: #006870;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,104,112,0.20);
}

/* ── Active page ── */
.elpais-pagination .page-current {
  background: #1d1d1f;
  border: 1.5px solid #1d1d1f;
  color: #fbe7d1;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(29,29,31,0.15);
  cursor: default;
}

/* ── Ellipsis ── */
.elpais-pagination .page-dots {
  border: none;
  background: transparent;
  color: #999;
  pointer-events: none;
  min-width: 20px;
  padding: 0 2px;
  font-weight: 400;
  letter-spacing: 0.1em;
}

/* ── Prev / Next buttons ── */
.elpais-pagination .page-btn {
  gap: 6px;
  padding: 0 14px;
  border: 1.5px solid #1d1d1f;
  background: #fff;
  color: #1d1d1f;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.elpais-pagination .page-btn:not(.disabled):hover {
  background: #1d1d1f;
  color: #fff;
  box-shadow: 0 2px 8px rgba(29,29,31,0.18);
}

.elpais-pagination .page-btn.disabled {
  border-color: #e0e0e0;
  color: #c0c0c0;
  cursor: not-allowed;
  pointer-events: none;
  background: #fafafa;
}

.elpais-pagination .page-btn i {
  font-size: 10px;
}

/* ── Context-aware: category "More" section uses teal accent ── */
.categ-world-more-section-container .elpais-pagination a.page-item:hover,
.search-results-wrapper .elpais-pagination a.page-item:hover {
  background: #006870;
  border-color: #006870;
}

/* ── Author page uses warm tint for active ── */
.author-articles-section .elpais-pagination .page-current {
  background: #1d1d1f;
  color: #fbe7d1;
}

/* ── Responsive ── */
@media (max-width: 600px) {
  .elpais-pagination {
    gap: 6px;
    padding: 20px 0 6px;
  }
  .elpais-pagination .page-item,
  .elpais-pagination .page-btn {
    height: 32px;
    min-width: 32px;
    font-size: 12px;
  }
  .elpais-pagination .page-btn-label {
    display: none;
  }
  .elpais-pagination .page-btn {
    padding: 0 10px;
  }
}

/* ── Responsive adjustments for search ─────────────────────────────────── */
@media (max-width: 600px) {
  .search-result-item {
    flex-direction: column-reverse;
  }
  .search-result-thumb {
    width: 100%;
    height: 180px;
  }
  .search-results-title {
    font-size: 22px;
  }
}

/* ── News Detail — Author Byline with Avatar ────────────────────────────── */
.detail-author-byline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.detail-author-avatar-link {
  flex-shrink: 0;
  display: block;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #e0e0e0;
  transition: border-color 0.2s;
}

.detail-author-avatar-link:hover {
  border-color: #006870;
}

.detail-author-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.detail-author-byline-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.detail-author-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #888;
  font-weight: 500;
}

.detail-author-name-link {
  font-size: 14px;
  font-weight: 700;
  color: #1d1d1f;
  text-decoration: none;
  font-family: 'Roboto', sans-serif;
  transition: color 0.15s;
}

.detail-author-name-link:hover {
  color: #006870;
  text-decoration: underline;
}

.detail-author-designation {
  font-size: 12px;
  color: #666;
  font-style: italic;
}

/* ── Author Page ─────────────────────────────────────────────────────────── */
.author-page-wrapper {
  max-width: 860px;
  margin: 40px auto;
  padding: 0 24px 60px;
  font-family: 'Roboto', sans-serif;
}

/* Profile card */
.author-profile-card {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  padding-bottom: 32px;
  border-bottom: 3px solid #1d1d1f;
  margin-bottom: 36px;
}

.author-profile-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #e0e0e0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

.author-profile-info {
  flex: 1;
  min-width: 0;
}

.author-profile-name {
  font-family: 'Playfair Display', serif;
  font-size: 30px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 4px;
  line-height: 1.2;
}

.author-profile-role {
  font-size: 14px;
  font-weight: 600;
  color: #006870;
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.author-profile-location {
  font-size: 13px;
  color: #777;
  margin: 0 0 4px;
}

.author-profile-location i {
  color: #006870;
  margin-right: 4px;
}

.author-profile-since {
  font-size: 12px;
  color: #999;
  margin: 0 0 12px;
  font-style: italic;
}

.author-profile-bio {
  font-size: 14px;
  color: #444;
  line-height: 1.65;
  margin: 0 0 16px;
  max-width: 560px;
}

.author-profile-social {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
}

.author-profile-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f0f0f0;
  color: #1d1d1f;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.author-profile-social a:hover {
  background: #006870;
  color: #fff;
  transform: translateY(-2px);
}

/* Articles section */
.author-articles-section {
  margin-top: 0;
}

.author-articles-heading {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e1e1e1;
}

.author-article-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid #ebebeb;
  transition: background 0.15s;
}

.author-article-item:last-of-type {
  border-bottom: none;
}

.author-article-img {
  width: 120px;
  height: 82px;
  object-fit: cover;
  flex-shrink: 0;
  display: block;
  transition: opacity 0.2s;
}

.author-article-img:hover {
  opacity: 0.88;
}

.author-article-content {
  flex: 1;
  min-width: 0;
}

.author-article-cat {
  display: block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #006870;
  margin-bottom: 5px;
}

.author-article-title {
  font-family: 'Playfair Display', serif;
  font-size: 17px;
  font-weight: 700;
  color: #1d1d1f;
  margin: 0 0 6px;
  line-height: 1.35;
}

.author-article-title:hover {
  text-decoration: underline;
}

.author-article-summary {
  font-size: 13px;
  color: #555;
  margin: 0 0 8px;
  line-height: 1.5;
}

.author-article-time {
  font-size: 11px;
  color: #999;
  font-style: italic;
}

.author-no-articles {
  color: #777;
  font-size: 15px;
  padding: 30px 0;
  text-align: center;
}

/* ── Author page responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .author-profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
  }
  .author-profile-social {
    justify-content: center;
  }
  .author-profile-bio {
    max-width: 100%;
  }
  .author-article-item {
    flex-direction: column-reverse;
    gap: 12px;
  }
  .author-article-img {
    width: 100%;
    height: 180px;
  }
  .author-page-wrapper {
    padding: 0 12px 40px;
    margin-top: 20px;
  }
  .author-profile-name {
    font-size: 24px;
  }

  /* News detail author byline on small screens */
  .detail-author-avatar-link {
    width: 36px;
    height: 36px;
  }
}