/**
 * Surabhi Lakkshmi - News Archive & Single News Presentation Styles
 * Consistent Two-Column Editorial Layout (Left 38% Media, Right 62% Content)
 * Phase 16C: Refined 16:9 two-layer media frame, centered single reading column,
 * wide editorial featured image, and styled Previous/Next post navigation.
 * Scoped strictly to News post type archives and single views.
 */

/* ==========================================================================
   1. News Container System - 1200px boxed system
   ========================================================================== */
body.post-type-archive-news .site-content_wrap,
body.single-news .site-content_wrap {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
  box-sizing: border-box;
}

body.post-type-archive-news .site-content_wrap > .row,
body.single-news .site-content_wrap > .row {
  margin-left: 0;
  margin-right: 0;
  display: block;
}

body.post-type-archive-news #primary,
body.single-news #primary {
  width: 100%;
  max-width: 100%;
  padding: 0;
  box-sizing: border-box;
  float: none;
}

/* ==========================================================================
   2. Two-Column News Archive Card (Archive Listing)
   ========================================================================== */
body.post-type-archive-news .posts-list__item.news-archive-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 32px;
  padding: 30px 0;
  margin: 0;
  border-bottom: 2px dotted #e0e0e0;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
}

body.post-type-archive-news .posts-list__item.news-archive-card:first-child {
  padding-top: 10px;
}

body.post-type-archive-news .posts-list__item.news-archive-card:last-child {
  border-bottom: none;
}

/* ==========================================================================
   3. Left Column - Media Frame (~38%) with Two-Layer 16:9 Treatment
   ========================================================================== */
body.post-type-archive-news .news-card__media-col {
  flex: 0 0 38%;
  max-width: 38%;
  width: 38%;
  box-sizing: border-box;
}

body.post-type-archive-news .news-card__media-link {
  display: block;
  text-decoration: none;
  outline: none;
}

body.post-type-archive-news .news-card__media-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #f5f6f8;
  border: 1px solid #e5e5ea;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.post-type-archive-news .news-card__media-link:hover .news-card__media-frame {
  border-color: #c5a47e;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

/* Background Layer: Soft blurred image fill matching the article image */
body.post-type-archive-news .news-card__media-backdrop {
  position: absolute;
  top: -15px;
  left: -15px;
  right: -15px;
  bottom: -15px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(14px) saturate(0.85);
  opacity: 0.30;
  transform: scale(1.15);
  pointer-events: none;
  z-index: 1;
}

/* Foreground Layer: Sharp, uncropped, naturally proportioned */
body.post-type-archive-news .news-card__img {
  position: relative;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: auto;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.12));
}

/* Empty Media Fallback State (e.g. articles without images) */
body.post-type-archive-news .news-card__empty-media {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #9da3a8;
  padding: 20px;
  position: relative;
  z-index: 2;
}

body.post-type-archive-news .news-empty-icon {
  font-size: 34px;
  width: 34px;
  height: 34px;
  color: #b0b5ba;
}

body.post-type-archive-news .news-empty-label {
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #a0a6ab;
  font-weight: 500;
}

/* ==========================================================================
   4. Right Column - Content (~62%)
   ========================================================================== */
body.post-type-archive-news .news-card__content-col {
  flex: 1 1 62%;
  max-width: 62%;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

body.post-type-archive-news .news-card__content-col .entry-header {
  margin: 0 0 10px 0;
}

body.post-type-archive-news .news-card__content-col .entry-title {
  margin: 0;
  font-size: 21px;
  line-height: 1.35;
  color: #222930;
  font-weight: 600;
  word-wrap: break-word;
}

body.post-type-archive-news .news-card__content-col .entry-title a {
  color: #222930;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

body.post-type-archive-news .news-card__content-col .entry-title a:hover {
  color: #c5a47e;
}

body.post-type-archive-news .news-card__content-col .entry-content {
  margin: 0;
  padding: 0;
}

body.post-type-archive-news .news-card__excerpt {
  margin: 0 0 12px 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: #4a5056;
}

body.post-type-archive-news a.news-read-more {
  display: inline-block;
  font-size: 13.5px;
  font-weight: 600;
  color: #222930;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease-in-out;
}

body.post-type-archive-news a.news-read-more:hover {
  color: #c5a47e;
}

/* ==========================================================================
   5. Pagination Controls - Coherent centered row
   ========================================================================== */
body.post-type-archive-news .pagination {
  margin: 40px auto 60px auto;
  text-align: center;
  clear: both;
}

body.post-type-archive-news .pagination .nav-links {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 auto;
}

body.post-type-archive-news .pagination .page-numbers {
  float: none !important;
  margin: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 14px;
  line-height: 1;
  font-size: 15px;
  border: 1px solid #e0e0e8;
  border-radius: 2px;
  color: #222930;
  background-color: #ffffff;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

body.post-type-archive-news .pagination .page-numbers.current {
  background-color: #222930;
  border-color: #222930;
  color: #ffffff;
  font-weight: 600;
  cursor: default;
}

body.post-type-archive-news .pagination .page-numbers:hover:not(.current) {
  border-color: #222930;
  background-color: #f7f7f7;
}

body.post-type-archive-news .pagination .page-numbers.prev,
body.post-type-archive-news .pagination .page-numbers.next {
  padding: 0 18px;
  font-weight: 500;
}

/* ==========================================================================
   6. Single News Article Presentation (~880px Centered Reading Column)
   ========================================================================== */
body.single-news .single-news-article {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  padding: 25px 0 35px 0;
  box-sizing: border-box;
}

/* Wide editorial featured image, centered, natural proportions retained */
body.single-news .single-news-article .post-thumbnail {
  text-align: center;
  margin: 0 0 34px 0;
}

body.single-news .single-news-article .post-thumbnail img {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: 560px;
  margin: 0 auto;
  display: block;
  object-fit: contain;
  border-radius: 2px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

/* Article Title */
body.single-news .single-news-article .entry-header {
  margin: 0 0 22px 0;
}

body.single-news .single-news-article .entry-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.35;
  color: #222930;
  font-weight: 600;
  text-align: left;
  letter-spacing: -0.01em;
}

/* Article Reading Content */
body.single-news .single-news-article .entry-content {
  font-size: 16px;
  line-height: 1.78;
  color: #333333;
}

body.single-news .single-news-article .entry-content p {
  margin-bottom: 22px;
}

body.single-news .single-news-article .entry-content a {
  color: #222930;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.2s ease-in-out;
}

body.single-news .single-news-article .entry-content a:hover {
  color: #c5a47e;
}

body.single-news .single-news-article .entry-content a.news-read-more {
  display: inline-block;
  font-weight: 600;
  margin-top: 6px;
}

/* Inline Images within Article Body */
body.single-news .single-news-article .entry-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px auto;
  border-radius: 2px;
}

/* Multi-Image News Gallery (managed via CMS manager) */
.surabhi-news-additional-gallery {
  margin: 36px 0 25px 0;
  clear: both;
  padding-top: 20px;
  border-top: 1px solid #f0f0f2;
}

.surabhi-news-gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.surabhi-news-gallery-item {
  margin: 0;
  max-width: 100%;
  flex: 1 1 calc(50% - 20px);
  min-width: 260px;
  text-align: center;
}

.surabhi-news-gallery-img {
  max-width: 100%;
  height: auto;
  max-height: 440px;
  object-fit: contain;
  border-radius: 2px;
  margin: 0 auto;
  display: block;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.surabhi-news-gallery-caption {
  font-size: 13.5px;
  color: #666666;
  font-style: italic;
  margin-top: 8px;
  line-height: 1.4;
}

/* ==========================================================================
   7. Single News Previous / Next Navigation
   ========================================================================== */
body.single-news .navigation.post-navigation {
  max-width: 880px;
  margin: 45px auto 65px auto;
  padding-top: 28px;
  border-top: 1px solid #e5e5ea;
  box-sizing: border-box;
}

body.single-news .navigation.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

body.single-news .navigation.post-navigation .nav-previous {
  margin-right: auto;
}

body.single-news .navigation.post-navigation .nav-next {
  margin-left: auto;
}

body.single-news .navigation.post-navigation .nav-previous a,
body.single-news .navigation.post-navigation .nav-next a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #222930;
  background-color: #ffffff;
  border: 1px solid #d5d5dc;
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

body.single-news .navigation.post-navigation .nav-previous a::before {
  content: "«";
  font-size: 16px;
  line-height: 1;
}

body.single-news .navigation.post-navigation .nav-next a::after {
  content: "»";
  font-size: 16px;
  line-height: 1;
}

body.single-news .navigation.post-navigation .nav-previous a:hover,
body.single-news .navigation.post-navigation .nav-next a:hover {
  background-color: #222930;
  border-color: #222930;
  color: #ffffff;
}

/* ==========================================================================
   8. Responsive Breakpoints
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1023px) {
  body.post-type-archive-news .posts-list__item.news-archive-card {
    gap: 24px;
    padding: 24px 0;
  }
  body.post-type-archive-news .news-card__media-col {
    flex: 0 0 40%;
    max-width: 40%;
    width: 40%;
  }
  body.post-type-archive-news .news-card__content-col {
    flex: 0 0 60%;
    max-width: 60%;
  }
  body.post-type-archive-news .news-card__content-col .entry-title {
    font-size: 19px;
  }
  body.post-type-archive-news .news-card__excerpt {
    font-size: 14px;
    line-height: 1.6;
  }
  body.single-news .single-news-article .entry-title {
    font-size: 28px;
  }
}

@media (max-width: 767px) {
  body.post-type-archive-news .site-content_wrap,
  body.single-news .site-content_wrap {
    padding-left: 15px;
    padding-right: 15px;
  }

  /* Archive Card Stacking */
  body.post-type-archive-news .posts-list__item.news-archive-card {
    flex-direction: column;
    gap: 16px;
    padding: 22px 0;
  }
  body.post-type-archive-news .news-card__media-col {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }
  body.post-type-archive-news .news-card__content-col {
    flex: 0 0 100%;
    max-width: 100%;
  }
  body.post-type-archive-news .news-card__content-col .entry-title {
    font-size: 18.5px;
  }
  body.post-type-archive-news .news-card__excerpt {
    font-size: 14px;
  }
  body.post-type-archive-news .pagination .page-numbers {
    min-width: 38px;
    height: 38px;
    padding: 0 11px;
    font-size: 14px;
  }

  /* Single News Mobile */
  body.single-news .single-news-article {
    padding: 15px 0 25px 0;
  }
  body.single-news .single-news-article .post-thumbnail {
    margin-bottom: 22px;
  }
  body.single-news .single-news-article .entry-title {
    font-size: 24px;
    line-height: 1.3;
    margin-bottom: 16px;
  }
  body.single-news .single-news-article .entry-content {
    font-size: 15px;
    line-height: 1.7;
  }
  body.single-news .navigation.post-navigation {
    margin: 35px auto 45px auto;
    padding-top: 20px;
  }
  body.single-news .navigation.post-navigation .nav-previous a,
  body.single-news .navigation.post-navigation .nav-next a {
    padding: 8px 16px;
    font-size: 13.5px;
  }
}
