/* Asian Media Network - Design system (Bootstrap overrides + extensions) */

:root {
  --amn-primary: #050a30;
  --amn-primary-hover: #1800ad;
  --amn-accent: #ffcc00;
  --amn-accent-link: #c41e3a;
  --amn-alert: #ff3131;
  --amn-secondary: #4a5568;
  --amn-body-bg: #f7fafc;
  --amn-card-bg: #fff;
  --amn-border: #e2e8f0;
  --amn-text: #121212;
  --amn-text-muted: #6b7280;
  --amn-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --amn-font-serif: "Merriweather", serif;
  --amn-radius: 0.375rem;
  --amn-radius-lg: 0.5rem;
  --amn-radius-home: 2px;
  --amn-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --amn-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
  --amn-spacing: 1rem;
  --amn-spacing-lg: 1.5rem;
  --amn-content-max: 720px;
}

/* Telugu: Mandali font */
html[lang="te"] {
  --amn-font-sans: "Mandali", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --amn-font-serif: "Mandali", Georgia, "Times New Roman", serif;
}

/* Base */
body {
  font-family: var(--amn-font-serif);
  color: var(--amn-text);
  background-color: var(--amn-body-bg);
  line-height: 1.6;
  font-size: 1rem;
}
@media (min-width: 992px) {
  body { font-size: 1.0625rem; }
}

body:not(.dashboard):not(.auth-page):not(.error-page) main {
  min-height: 60vh;
}

h1, .h1 { font-size: 1.75rem; font-weight: 700; margin-bottom: var(--amn-spacing); }
h2, .h2 { font-size: 1.5rem; font-weight: 600; margin-bottom: var(--amn-spacing); color: var(--amn-alert); }
h3, .h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.75rem; }
h4, h5, h6 { font-weight: 600; }

a { color: var(--amn-primary); }
a:hover { color: var(--amn-primary-hover); }

:focus-visible {
  outline: 2px solid var(--amn-primary);
  outline-offset: 2px;
}

/* Navbar (public) - white background, dark text */
.navbar.bg-white { background-color: #fff !important; }
.navbar.bg-white .navbar-brand,
.navbar.bg-white .nav-link { color: var(--amn-primary) !important; }
.navbar.bg-white .nav-link:hover { color: var(--amn-primary-hover) !important; }
.navbar .navbar-brand { font-weight: 600; }
.navbar-brand-logo {
  height: 50px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
}
.navbar .nav-link { font-weight: 500; font-size: 0.9375rem; }

/* Header - NYT-style: utility bar, centered masthead, light category nav */
.header-outer,
.header-categories-wrap {
  font-family: "Libre Franklin", var(--amn-font-sans);
}
.header-outer { position: relative; }
.header-and-ticker-sticky {
  position: sticky;
  top: 0;
  z-index: 1100;
}
/* Desktop: only category bar + news ticker stick on scroll (JS applies --fixed when scrolled) */
@media (min-width: 992px) {
  .header-and-ticker-sticky {
    position: relative;
  }
  .header-sticky-bar {
    position: relative;
    z-index: 1100;
    width: 100%;
    background-color: #c41e3a;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  }
  .header-sticky-bar.header-sticky-bar--fixed {
    position: fixed !important;
    top: 0 !important;
    left: 0;
    right: 0;
    z-index: 1100;
    width: 100%;
  }
  .header-sticky-bar-spacer {
    display: none;
    width: 100%;
  }
}
.header-utility {
  background-color: #1550d2;
  border-bottom: 1px solid var(--amn-border);
  padding: 0.2rem 0 0.2rem;
  font-size: 0.75rem;
}
.header-utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.header-utility-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.header-utility-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}
.header-utility-link {
  color: rgba(255, 255, 255, 0.85) !important;
  text-decoration: none;
  font-size: 0.75rem;
}
.header-utility-link:hover {
  color: #ffffff !important;
}
.header-utility .header-lang-link {
  color: rgba(255, 255, 255, 0.85) !important;
}
.header-utility .header-lang-link:hover {
  color: #ffffff !important;
}
@media (max-width: 575.98px) {
  .header-utility-inner {
    row-gap: 0.35rem;
  }
  .header-utility-nav,
  .header-utility-right {
    gap: 0.5rem;
  }
}
.header-navbar { border-bottom: 1px solid var(--amn-border); }
.header-masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 0px !important;
  
}
@media (min-width: 992px) {
  .header-masthead-row { padding: 0.75rem 0 1rem; }
}
.header-masthead-spacer { flex: 1; min-width: 0; }
.header-masthead-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin: 0;
}
.header-lang {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}
.header-lang-link {
  font-weight: 500;
  color: var(--amn-text-muted) !important;
  text-decoration: none;
  font-size: 0.8125rem;
}
.header-lang-link:hover {
  color: var(--amn-accent-link) !important;
}

/* Header categories - light bar, dark links (NYT-style) */
.header-categories-wrap {
  position: sticky;
  top: 0;
  z-index: 9;
  background-color: #fafafa;
  border-bottom: 1px solid var(--amn-border);
}
.header-categories-scroll ul {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 2px;
  justify-content: left;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  align-items: center;
  overflow-y: hidden;
}
.header-categories-scroll ul::-webkit-scrollbar {
  height: 4px;
}
.header-categories-scroll ul::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}
.header-category-link {
  display: inline-block;
  padding: 2px 0px 2px 8px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--amn-text) !important;
  text-decoration: none;
  border: none;
  background: transparent;
}
.header-category-link:hover {
  color: var(--amn-accent-link) !important;
}
.header-category-link-active {
  border-bottom: 2px solid var(--amn-accent-link);
  color: var(--amn-accent-link) !important;
}
.navbar .nav-link.text-uppercase.small {
  letter-spacing: 0.06em;
}
@media (max-width: 767.98px) {
  .header-categories-wrap {
    position: static;
  }
}
@media (min-width: 992px) {
  /* Inside sticky bar, categories must not be sticky so only the bar sticks */
  .header-sticky-bar .header-categories-wrap {
    position: static;
  }
}
@media (max-width: 575.98px) {
  .navbar-brand-logo {
    height: 56px;
  }
  .header-masthead-row {
    padding: 0.5rem 0;
  }
}

@media (max-width: 425.98px) {
  .navbar-brand-logo {
    height: 48px;
  }
}

@media (max-width: 991.98px) {
  .header-outer {
    position: sticky !important;
    top: 0;
    z-index: 1100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.09), 0 1.5px 8px rgba(0,0,0,0.06);
  }

  .header-navbar .navbar-collapse {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    padding-top: 3.25rem;
    overflow-y: auto;
    z-index: 1050;
  }

  .header-navbar .navbar-nav {
    width: 100%;
    padding: 0 1.5rem 2rem;
    align-items: flex-start;
  }

  .header-navbar .navbar-nav .nav-link {
    font-size: 1rem;
    padding-left: 0;
    padding-right: 0;
  }

  .header-navbar .mobile-nav-close {
    text-align: right;
    font-size: 1.25rem;
    padding-right: 0;
  }

  .category-nav-link-active {
    font-weight: 700;
    color: var(--amn-accent-link) !important;
  }
}

/* Dashboard navbar */
.navbar-dashboard {
  background-color: var(--amn-primary) !important;
  box-shadow: var(--amn-shadow);
}
.navbar-dashboard .navbar-brand,
.navbar-dashboard .nav-link { color: rgba(255,255,255,0.9) !important; }
.navbar-dashboard .nav-link:hover { color: #fff !important; }
.navbar-dashboard .nav-link.active { color: #fff !important; font-weight: 600; }

/* Cards */
.card {
  border: 1px solid var(--amn-border);
  border-radius: var(--amn-radius-lg);
  box-shadow: var(--amn-shadow);
  background: var(--amn-card-bg);
  transition: box-shadow 0.2s ease;
}
.card:hover { box-shadow: var(--amn-shadow-lg); }
.card-img-top {
  border-radius: var(--amn-radius-lg) var(--amn-radius-lg) 0 0;
  object-fit: cover;
  aspect-ratio: 16 / 10;
  max-height: 200px;
}
.card-title { font-weight: 600; color: var(--amn-text); }
.card-title a { text-decoration: none; color: inherit; }
.card-title a:hover { color: var(--amn-primary); }

/* Buttons */
.btn-primary {
  background-color: var(--amn-primary);
  border-color: var(--amn-primary);
}
.btn-primary:hover {
  background-color: var(--amn-primary-hover);
  border-color: var(--amn-primary-hover);
}
.btn-group .btn, .btn-group-sm .btn { margin-right: 0.25rem; }

/* Button loading state for form submissions */
.btn-loading {
  opacity: 0.75;
  cursor: wait;
  pointer-events: none;
}

/* Alerts and danger buttons */
.alert-danger {
  background-color: rgba(255, 49, 49, 0.12);
  border-color: var(--amn-alert);
  color: #721c24;
}
.btn-danger {
  background-color: var(--amn-alert);
  border-color: var(--amn-alert);
}
.btn-danger:hover {
  background-color: #e62a2a;
  border-color: #e62a2a;
}

/* Alerts (flash) - inside container */
main .alert, .container .alert {
  max-width: 100%;
  border-radius: var(--amn-radius);
}

/* Tables */
.table {
  background: var(--amn-card-bg);
  border-radius: var(--amn-radius-lg);
  overflow: hidden;
  box-shadow: var(--amn-shadow);
}
.table thead th {
  font-weight: 600;
  color: var(--amn-text);
  border-bottom-width: 2px;
  padding: var(--amn-spacing);
}
.table tbody td { padding: 0.75rem var(--amn-spacing); vertical-align: middle; }
.table-striped tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,0.02); }
.table .btn-sm { margin-right: 0.25rem; }
.table .form-inline { display: inline; }

/* Forms */
.form-label { font-weight: 500; color: var(--amn-text); margin-bottom: 0.25rem; }
.form-control, .form-select {
  border-radius: var(--amn-radius);
  border-color: var(--amn-border);
}
.form-control:focus, .form-select:focus {
  border-color: var(--amn-primary);
  box-shadow: 0 0 0 0.2rem rgba(26, 54, 93, 0.15);
}
/* .mb-3 for spacing between fields - from Bootstrap */

/* Badges */
.badge { font-weight: 500; padding: 0.35em 0.65em; }

/* Pagination */
.pagination { margin-top: var(--amn-spacing-lg); }
.pagination .page-link { border-radius: var(--amn-radius) !important; }
.pagination .page-item.active .page-link { background-color: var(--amn-primary); border-color: var(--amn-primary); }

/* Category pagination tweaks */
.category-page .pagination {
  margin-top: 1.5rem;
}
.category-page .page-link {
  border-radius: 999px !important;
  padding: 0.35rem 0.85rem;
  border-color: var(--amn-border);
  color: var(--amn-text);
  font-weight: 500;
}
.category-page .page-link:hover {
  background-color: rgba(0, 0, 0, 0.02);
}
.category-page .page-item.active .page-link {
  background-color: var(--amn-primary);
  border-color: var(--amn-primary);
  color: #fff;
}

/* Section titles - NYT-style (serif, neutral) */
.section-title {
  font-family: var(--amn-font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--amn-text);
  margin-bottom: var(--amn-spacing);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--amn-border);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--amn-spacing-lg) var(--amn-spacing);
  color: var(--amn-text-muted);
}

/* Back link */
.back-link { font-size: 0.9375rem; color: var(--amn-text-muted); }
.back-link:hover { color: var(--amn-primary); }

/* Article / content */
.article-breadcrumb .breadcrumb {
  background: transparent;
  padding: 0;
}
.article-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  content: "›";
}
.article-lead {
  font-size: 1.4rem;
  color: #000;
}
.article-meta {
  border-bottom: 1px solid var(--amn-border);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}
.article-meta .article-author-name {
  color: #c41e3a;
}
.article-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.article-action-icon {
  flex-shrink: 0;
}

/* In-article share row (Facebook, X, LinkedIn, WhatsApp, email, copy link) */
.article-share {
  margin-bottom: 1.25rem;
}
.article-share-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.article-share-list li {
  margin: 0;
}
.article-share-like-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.article-share-like-count {
  position: absolute;
  left: 50%;
  bottom: -0.45rem;
  transform: translateX(-50%);
  font-size: 0.68rem;
  line-height: 1;
  color: #fff;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  padding: 0.12rem 0.38rem;
  min-width: 1.2rem;
  text-align: center;
}
/* Scope to .article-share only */
.article-share .article-share-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.article-share .article-share-btn:hover {
  color: #fff;
  transform: scale(1.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.article-share .article-share-btn:focus-visible {
  outline: 2px solid var(--amn-primary);
  outline-offset: 3px;
}
.article-share .article-share-facebook {
  background: #1877f2;
}
.article-share .article-share-x {
  background: #000;
}
.article-share .article-share-linkedin {
  background: #0a66c2;
}
.article-share .article-share-whatsapp {
  background: #25d366;
}
.article-share .article-share-email {
  background: #e85d5d;
}
.article-share .article-share-copy {
  background: #94a3b8;
}
.article-share .article-share-like {
  background: #fff;
  color: #dc2626;
  border: 1px solid #dc2626;
}
.article-share .article-share-like:hover,
.article-share .article-share-like:focus-visible {
  color: #dc2626;
}
.article-share .article-share-like[aria-pressed="true"] {
  background: #b91c1c;
  color: #fff;
  border-color: #b91c1c;
}
.article-share .article-share-native {
  background: #475569;
}

/* Global fixed right-side page share (all pages) */
.page-share-fixed {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1040;
}
.page-share-fixed .article-share {
  margin: 0;
}
.page-share-fixed .article-share-list {
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0.5rem;
}
.page-share-fixed .article-share .article-share-btn {
  width: 40px;
  height: 40px;
}
@media (max-width: 1399.98px) {
  .page-share-fixed {
    right: 0.75rem;
  }
}
@media (max-width: 1199.98px) {
  .page-share-fixed .article-share .article-share-btn {
    width: 36px;
    height: 36px;
  }
}
@media (max-width: 991.98px) {
  .page-share-fixed {
    right: 0.5rem;
    bottom: 0.65rem;
  }
  .page-share-fixed .article-share-list {
    gap: 0.35rem;
  }
  .page-share-fixed .article-share .article-share-btn {
    width: 32px;
    height: 32px;
  }
  .page-share-fixed .article-share-like-count {
    font-size: 0.62rem;
    bottom: -0.38rem;
    padding: 0.1rem 0.28rem;
  }
}

.article-figure {
  margin-bottom: 1.5rem;
}
.article-figure-caption {
  font-size: 0.875rem;
  color: var(--amn-text-muted);
}

article .content, .article-content {
  max-width: var(--amn-content-max);
  font-size: 1.4rem;
  line-height: 1.7;
}
article .content p, .article-content p { margin-bottom: 1rem; }
article .content img, .article-content img {   
    max-width: 100%;
  height: auto;
  border-radius: var(--amn-radius);
  display: block;
  padding: 20px 0px;
  max-height: 300px;
  margin:0 auto;
 }

/* Article page - NYT-style */
.article-page article h1 {
  font-family: var(--amn-font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: #000;
}
@media (max-width: 768px) {
  .article-page article h1 { font-size: 1.8rem; }
  .article-page .article-content, .article-page article .content{
    font-family: var(--amn-font-serif);
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    color: #000;
  }
}

@media (min-width: 1200px) {
  .article-page article h1 { font-size: 2.5rem; }
}
.article-page .article-lead {
  font-family: var(--amn-font-serif);
  font-size: 1.2rem;
  color: #000;
}
.article-page .article-content,
.article-page article .content {
  font-family: var(--amn-font-serif);
  font-size: 1.25rem;
  line-height: 1.7;
  color: #000;
}
.article-page .article-breadcrumb {
  font-family: var(--amn-font-sans);
  font-size: 0.875rem;
  color: var(--amn-text-muted);
}
.article-page .article-meta {
  font-family: var(--amn-font-sans);
  color: var(--amn-text-muted);
  font-size: 0.8125rem;
}
.article-page .section-title {
  font-family: var(--amn-font-serif);
  color: var(--amn-text);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--amn-border);
}
.article-page .article-content a,
.article-page .static-page-content a {
  color: var(--amn-accent-link);
}
.article-page .article-content a:hover,
.article-page .static-page-content a:hover {
  color: var(--amn-primary);
}
.article-page .article-figure {
  border: 1px solid var(--amn-border);
  border-radius: var(--amn-radius-home);
  overflow: hidden;
  padding: 0;
}
.article-page .article-figure img {
  display: block;
  max-height:300px ;
  margin: 0 auto;
}

/* Widen article content on desktop to reduce right-side empty space */
@media (min-width: 992px) {
  .article-page .article-content,
  .article-page article .content {
    max-width: 100%;
  }
}

@media (max-width: 575.98px) {
  .article-page .article-content,
  .article-page article .content {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* Static pages (About, Contact, Legal) - NYT-style */
.static-page .home-main {
  min-height: 50vh;
}
.static-page-content {
  max-width: var(--amn-content-max);
  font-size: 0.975rem;
  line-height: 1.7;
}
@media (min-width: 768px) {
  .static-page-content {
    font-size: 1.0625rem;
  }
}
.static-page-content {
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 768px) {
  .static-page-content {
    padding-left: 0;
    padding-right: 0;
  }
}
.static-page-content h1 {
  font-family: var(--amn-font-serif);
  font-size: 1.75rem;
  color: var(--amn-text);
}
.static-page-content h2 {
  font-family: var(--amn-font-serif);
  font-size: 1.25rem;
  color: var(--amn-text);
}
.static-page-content a {
  color: var(--amn-accent-link);
}
.static-page-content a:hover {
  color: var(--amn-primary);
}

/* Footer */
.app-footer {
  margin-top: auto;
  padding-top: var(--amn-spacing-lg);
  padding-bottom: var(--amn-spacing);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--amn-primary);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
}
.app-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--amn-spacing-lg);
  padding-bottom: var(--amn-spacing);
  margin-bottom: var(--amn-spacing);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
@media (min-width: 768px) {
  .app-footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }
}
.app-footer-grid .app-footer-categories,
.app-footer-grid .app-footer-links,
.app-footer-grid .app-footer-contact {
  padding-bottom: 0;
  margin-bottom: 0;
  border-bottom: none;
}
.app-footer-heading {
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 0.5rem;
}
.app-footer-category-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.app-footer-category-link {
  font-size: 0.875rem;
  color: #fff !important;
  text-decoration: none;
}
.app-footer-category-link:hover {
  color: var(--amn-accent) !important;
}
.app-footer-copy {
  padding-top: 0;
}
.app-footer-grid + .app-footer-copy {
  padding-top: 0;
}
.app-footer-contact {
  padding-bottom: 0;
  margin-bottom: 0;
}
.app-footer-contact:not(:only-child) {
  padding-bottom: 0;
  margin-bottom: 0;
}
.app-footer-contact .app-footer-heading {
  margin-bottom: 0.5rem;
}
.app-footer-contact-line {
  margin: 0 0 0.25rem 0;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.9);
}
.app-footer-contact-link {
  color: #fff !important;
  text-decoration: none;
}
.app-footer-contact-link:hover {
  color: var(--amn-accent) !important;
}

/* Stat cards (dashboard) */
.stat-card .card-body { padding: var(--amn-spacing-lg); }
.stat-card h5 { font-size: 0.875rem; font-weight: 600; color: var(--amn-text-muted); text-transform: uppercase; letter-spacing: 0.02em; margin-bottom: 0.25rem; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 700; color: var(--amn-text); }

/* Chart containers */
.chart-wrap { height: 240px; position: relative; }
.chart-wrap canvas { max-height: 240px; }

/* Error pages */
.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--amn-spacing);
}
.error-page h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.error-page p { color: var(--amn-text-muted); margin-bottom: var(--amn-spacing-lg); }

/* Auth (login) card */
.auth-card {
  width: 100%;
  max-width: 400px;
  border-radius: var(--amn-radius-lg);
  box-shadow: var(--amn-shadow-lg);
  border: 1px solid var(--amn-border);
}

/* ========== Home (professional layout) ========== */
.home-main {
  background: var(--amn-body-bg);
  min-height: 60vh;
}
.home-page .home-main { min-height: 60vh; background: #fff; }

.home-content {
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  background: #fff;
  box-shadow: none;
}

.home-section-spacing {
  margin-bottom: 2.5rem;
}
.home-section-spacing:last-child { margin-bottom: 0; }

.home-section-head {
  font-family: var(--amn-font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  padding-left: 0;
  padding-bottom: 0.5rem;
  border-left: none;
  border-bottom: 1px solid var(--amn-border);
  
}

/* Hero: overlay headline on image */
.home-hero {
  border-radius: var(--amn-radius-home);
  overflow: hidden;
  box-shadow: none;
  border: 1px solid var(--amn-border);
}
.home-hero .hero-nyt-lead {
  display: block;
  width: 100%;
  text-decoration: none;
  color: inherit;
  background: #000;
}
.home-hero .hero-nyt-lead:hover { color: inherit; }
.home-hero .hero-nyt-lead:hover .hero-nyt-headline { color: #fff; }
.home-hero .hero-nyt-lead-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--amn-primary);
}
.home-hero .hero-nyt-lead-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-hero .hero-nyt-lead-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.45) 38%, rgba(0, 0, 0, 0.05) 68%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}
@media (min-width: 992px) {
  /* Shorter hero image on desktop to reduce section height */
  .home-hero .hero-nyt-lead-media {
    aspect-ratio: 16 / 9;
  }
}
.home-hero .hero-nyt-lead-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 1rem 1.1rem 2.6rem;
}
.home-hero .hero-nyt-tag {
  font-family: var(--amn-font-sans);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.9);
  display: block;
  margin-bottom: 0.35rem;
}
.home-hero .hero-nyt-headline {
  font-family: var(--amn-font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.35rem 0;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (min-width: 768px) {
  .home-hero .hero-nyt-headline { font-size: 1.8rem; }
}
@media (min-width: 992px) {
  .home-hero .hero-nyt-headline { font-size: 1.5rem; }
}
.home-hero .hero-nyt-summary {
  font-family: var(--amn-font-sans);
  font-size: 0.9375rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 0.35rem 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.home-hero .hero-nyt-byline {
  font-family: var(--amn-font-sans);
  font-size: 0.75rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
}
@media (max-width: 767.98px) {
  .home-hero .hero-nyt-lead {
    background: #fff;
  }
  .home-hero .hero-nyt-lead-media {
    aspect-ratio: auto;
    overflow: visible;
    background: transparent;
  }
  .home-hero .hero-nyt-lead-img {
    aspect-ratio: 16 / 10;
    height: auto;
    object-fit: cover;
  }
  .home-hero .hero-nyt-lead-media::after {
    display: none;
  }
  .home-hero .hero-nyt-lead-caption {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    background: #fff;
    padding: 0.85rem 0.85rem 0.75rem;
  }
  .home-hero .hero-nyt-headline {
    font-size: 1.25rem;
    color: var(--amn-text);
    text-shadow: none;
  }
  .home-hero .hero-nyt-summary {
    color: var(--amn-text-muted);
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }
  .home-hero .hero-nyt-tag,
  .home-hero .hero-nyt-byline {
    color: var(--amn-text-muted);
  }
}
.home-hero .hero-nyt-secondary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--amn-border);
  min-height: 0;
}
@media (min-width: 768px) {
  .home-hero .hero-nyt-secondary {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .home-hero .hero-nyt-secondary > *:first-child { grid-column: 1 / -1; }
}
.home-hero .hero-nyt-sub {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: #fff;
}
.home-hero .hero-nyt-sub:hover { color: inherit; }
.home-hero .hero-nyt-sub:hover .hero-nyt-sub-headline { color: var(--amn-accent-link); }
.home-hero .hero-nyt-sub-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--amn-primary);
}
.home-hero .hero-nyt-sub-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-hero .hero-nyt-sub-caption {
  padding: 0.75rem 1rem;
  background: #fff;
}
.home-hero .hero-nyt-sub-tag {
  margin-bottom: 0.25rem;
}
.home-hero .hero-nyt-sub-headline {
  font-family: var(--amn-font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.2rem 0;
  color: var(--amn-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}
@media (min-width: 768px) {
  .home-hero .hero-nyt-sub-headline { font-size: 1.3rem; }
}
.home-hero .hero-nyt-sub-byline {
  font-family: var(--amn-font-sans);
  font-size: 0.6875rem;
  margin: 0;
  color: var(--amn-text-muted);
}
.home-hero .hero-nyt-sub-empty {
  min-height: 120px;
  background: var(--amn-border);
  pointer-events: none;
}
.home-hero .hero-hero-row { min-height: 0; }
.home-hero .hero-hero-right .hero-nyt-secondary { flex: 1; min-height: 0; }

/* Hero: right column - Top headlines list */
.hero-top-headlines {
  height: 100%;
  padding: 1rem 1.25rem;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.hero-top-head-title {
  font-family: var(--amn-font-serif);
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0 0 0.4rem 0;
  border-bottom: 1px solid var(--amn-border);
  padding-bottom: 0.25rem;
}

.hero-top-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.hero-top-item:last-child {
  border-bottom: none;
  padding-top: 0;
}

.hero-top-item:first-child {
  padding-top: 0;
}

.hero-top-item {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
  padding: 0.1rem 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.hero-top-item:hover .hero-top-title {
  color: var(--amn-accent-link);
}

.hero-top-thumb {
  flex-shrink: 0;
  width: 100px;
  border-radius: 4px;
  overflow: hidden;
  background: #e2e8f0;
  margin-right: 0.75rem;
  height: 70px;
  overflow: hidden
}

.hero-top-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-top-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: #e2e8f0;
}

.hero-top-body {
  flex: 1;
}
.short-news-story-caption{
  font-size: 1rem;
  font-family: var(--amn-font-serif);
}

.hero-top-title, .home-most-read-title {
  font-family: var(--amn-font-serif);
  
  font-weight: 600;
  margin: 0;
  color: var(--amn-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 1.2rem;
}

@media (max-width: 991.98px) {
  .hero-top-headlines {
    border-top: 1px solid var(--amn-border);
  }
}

@media (min-width: 992px) {
  .hero-top-list {
    flex: 0 1 auto;
    max-height: none;
  }
}

/* Hero: legacy overlay layout (kept for other pages if needed) */
@keyframes heroCrossfadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* New 4-panel hero (legacy overlay) */
.hero-hero-row {
  min-height: 380px;
  gap: 0 0;
}
@media (min-width: 992px) {
  .hero-hero-row { min-height: 420px; }
  .hero-hero-left,
  .hero-hero-right { display: flex; }
}

@media (min-width: 992px) {
  .home-hero .hero-hero-row {
    display: flex;
    align-items: flex-start;
    min-height: 260px;
  }

  .home-hero .hero-hero-left,
  .home-hero .hero-hero-right {
    display: flex;
    flex-direction: column;
  }

  .home-hero .hero-hero-left {
    overflow: hidden;
    min-width: 0;
  }

  .home-hero .hero-hero-left .hero-block {
    min-height: 260px;
  }

  .home-hero .hero-hero-right .hero-top-headlines {
    min-height: 0;
  }

  .home-hero .hero-slider-inner {
    min-height: 100%;
    height: 100%;
  }
}
.hero-hero-right .hero-hero-grid { flex: 1; }
@media (min-width: 992px) {
  .hero-hero-left .hero-card-lead { height: 100%; min-height: 420px; }
}

.hero-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 280px;
  background-size: cover;
  background-position: center;
  background-color: var(--amn-primary);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.hero-card:hover { color: inherit; }
.hero-card-lead {
  min-height: 320px;
}
.hero-card-lead .hero-overlay {
  padding-top: 1rem;
  min-height: 8rem;
  max-height: 60%;
  overflow: hidden;
}
@media (min-width: 992px) {
  .hero-card-lead { min-height: 420px; }
  .hero-card-lead .hero-overlay { padding-top: 1.25rem; }
}
.hero-card-sub {
  min-height: 180px;
}
.hero-card-sub .hero-overlay {
  padding: 1rem 0.75rem;
}
@media (min-width: 768px) {
  .hero-card-sub { min-height: 220px; }
  .hero-card-sub .hero-overlay { padding: 1.25rem 1rem; }
}
.hero-card-empty {
  min-height: 140px;
  background: var(--amn-primary);
}

.hero-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 4px;
  height: 100%;
  min-height: 320px;
}
.hero-hero-grid > *:first-child {
  grid-column: 1 / -1;
}
@media (min-width: 992px) {
  .hero-hero-grid { min-height: 420px; }
}

.hero-card-lead .hero-headline {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Stacked hero: one full-width card, section label, two cards in a row */
.hero-stacked {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.hero-lead-full {
  width: 100%;
  min-height: 280px;
  border-radius: 8px;
  overflow: hidden;
}
@media (min-width: 768px) {
  .hero-lead-full { min-height: 320px; }
}
.hero-section-label {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: #111;
  letter-spacing: 0.02em;
}
@media (min-width: 768px) {
  .hero-section-label { font-size: 2rem; }
}
.hero-two-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 8px;
  margin-bottom: 0;
}
.hero-card-sm {
  display: block;
  position: relative;
  min-height: 220px;
  background-size: cover;
  background-position: center;
  background-color: var(--amn-primary);
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}
.hero-card-sm:hover { color: inherit; }
.hero-card-sm .hero-overlay {
  padding: 1rem 0.75rem;
}
@media (min-width: 768px) {
  .hero-card-sm { min-height: 260px; }
  .hero-card-sm .hero-overlay { padding: 1.25rem 1rem; }
}

.hero-row {
  min-height: 380px;
  gap: 0 8px;
}
@media (min-width: 992px) {
  .hero-row { min-height: 420px; }
  .hero-row .col-lg-8,
  .hero-row .col-lg-4 { display: flex; }
}
.hero-row .col-lg-4 .hero-grid-right { flex: 1; }
@media (min-width: 992px) {
  .hero-row .col-lg-8 .hero-lead { height: 100%; min-height: 420px; }
}

.hero-lead {
  display: block;
  position: relative;
  width: 100%;
  min-height: 320px;
  text-decoration: none;
  color: inherit;
  animation: heroCrossfadeIn 0.6s ease-out forwards;
}
.hero-lead:hover { color: inherit; }
.hero-lead-media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-color: var(--amn-primary);
}
.hero-lead-placeholder {
  position: absolute;
  inset: 0;
  background: var(--amn-primary);
}
.hero-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.5rem 1.25rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
  color: #fff;
  text-align: left;
}
.hero-lead .hero-overlay {
  padding-top: 1rem;
  min-height: 8rem;
  max-height: 60%;
  overflow: hidden;
}
@media (min-width: 768px) {
  .hero-overlay { padding: 2rem 1.5rem; }
  .hero-lead .hero-overlay { padding-top: 1.25rem; }
}
.hero-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.5rem;
  
  border-radius: 4px;
  margin-bottom: 0.5rem;
  background: var(--amn-accent);
  color: var(--amn-primary);
}
.home-hero .hero-tag {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 4px;
}
.hero-headline {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.35rem 0;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}
.hero-lead .hero-headline {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (min-width: 768px) {
  .hero-headline { font-size: 1.75rem; }
}
@media (min-width: 992px) {
  .hero-headline { font-size: 2rem; }
}
.hero-byline {
  font-size: 0.8125rem;
  margin: 0.25rem 0 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

/* Hero right: 1 top block + 2 bottom blocks (match reference image) */
.hero-grid-right {
  display: grid;
  grid-template-rows: 1fr 1fr;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  height: 100%;
  min-height: 320px;
}
.hero-grid-right > *:first-child {
  grid-column: 1 / -1;
}
@media (min-width: 992px) {
  .hero-grid-right { min-height: 420px; }
}

.hero-block {
  position: relative;
  height: 100%;
  overflow: hidden;
  width: 100%;
}

.hero-block-lead {
  height: 100%;
}

.hero-block-grid {
  min-height: 140px;
}

.hero-block-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  /* JS overrides flex for multi-slide carousel */
}

.hero-slider-inner {
  position: relative;
  min-height: 260px;
  background: #fff;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  transition: transform 0.5s ease-out;
}

.hero-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}

.hero-slider-arrow:hover {
  background: #fff;
}

.hero-slider-arrow-left {
  left: 0.75rem;
}

.hero-slider-arrow-right {
  right: 0.75rem;
}

.hero-slider-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  z-index: 2;
}

.hero-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.9);
  padding: 0;
  cursor: pointer;
}

.hero-slider-dot.active {
  background: #111;
  border-color: #111;
}

.hero-grid-item {
  position: relative;
  display: block;
  min-height: 140px;
  background-size: cover;
  background-position: center;
  background-color: var(--amn-primary);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}
.hero-grid-item:hover { color: inherit; }
.hero-grid-placeholder {
  position: absolute;
  inset: 0;
  background: var(--amn-primary);
}
.hero-grid-placeholder-cell {
  min-height: 140px;
  background: var(--amn-primary);
}
.hero-grid-item .hero-overlay {
  padding: 1rem 0.75rem;
}
@media (min-width: 768px) {
  .hero-grid-item .hero-overlay { padding: 1.25rem 1rem; }
}
.hero-headline-sm {
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (min-width: 768px) {
  .hero-headline-sm { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-lead,
  .hero-grid-item { animation: none; opacity: 1; }
  .hero-slider-inner { transition: none; }
  .home-section .row > div { animation: none; opacity: 1; }
}

/* Card (image + title) - NYT-style flat */
.home-card-link { text-decoration: none; color: inherit; display: block; }
.home-card-link:hover { color: inherit; }
.home-card-link:hover .home-card-title { color: var(--amn-accent-link); }
.home-card {
  border: 1px solid var(--amn-border);
  border-radius: var(--amn-radius-home);
  overflow: hidden;
  background: var(--amn-card-bg);
  box-shadow: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.home-card-link:hover .home-card {
  border-color: var(--amn-text-muted);
  background: #fafafa;
}
.home-card-media {
  overflow: hidden;
  background: #e2e8f0;
}
.home-card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}
.home-card-link:hover .home-card-img {
  transform: none;
}
.home-card-placeholder {
  aspect-ratio: 16 / 10;
  background: #e2e8f0;
}
.home-card-body { padding: 1.25rem; }
.home-card-meta {
  font-size: 0.8125rem;
  color: var(--amn-text-muted);
  margin: 0.5rem 0 0;
  font-weight: 500;
}
.home-card-title {
  font-family: var(--amn-font-serif);
  /* font-size: 1rem; */
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  color: var(--amn-text);
  transition: color 0.2s ease;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Section “View all” */
/* Category section cards: crossfade in */
.home-section .row > div:nth-child(1) { animation: heroCrossfadeIn 0.5s ease-out 0s forwards; }
.home-section .row > div:nth-child(2) { animation: heroCrossfadeIn 0.5s ease-out 0.1s forwards; }
.home-section .row > div:nth-child(3) { animation: heroCrossfadeIn 0.5s ease-out 0.2s forwards; }
.home-section .row > div:nth-child(4) { animation: heroCrossfadeIn 0.5s ease-out 0.3s forwards; }
.home-section .row > div:nth-child(5) { animation: heroCrossfadeIn 0.5s ease-out 0.4s forwards; }

/* Section View all */
.home-section-more {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--amn-accent-link);
  text-decoration: none;
}
.home-section-more:hover { color: var(--amn-primary); }

.btn-home-view-all {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background-color: #000;
  border: 1px solid #000;
  color: #fff !important;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.btn-home-view-all:hover {
  background-color: #222;
  border-color: #222;
  color: #fff !important;
}

/* Latest list (text-only links) */
.home-list { border-top: 1px solid var(--amn-border); }
.home-list-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--amn-border);
  transition: background 0.15s ease, padding-left 0.15s ease;
}
.home-list-item:hover {
  background: rgba(0, 0, 0, 0.02);
  padding-left: 0.5rem;
}
.home-list-link {
  font-weight: 500;
  color: var(--amn-text);
  text-decoration: none;
  font-size: 1.4rem;
}
.home-list-link {
  font-family: var(--amn-font-serif);
}
.home-list-link:hover { color: var(--amn-accent-link); }

/* Latest news section (card grid) */
.home-latest-news .home-latest-news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.home-latest-news-divider {
  border-top: 1px solid var(--amn-border);
  margin-bottom: 1.25rem;
}
.home-latest-arrow {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e2e8f0;
  color: var(--amn-text);
  text-decoration: none;
  font-size: 1.25rem;
  line-height: 1;
  transition: background 0.2s ease, color 0.2s ease;
}
.home-latest-arrow:hover {
  background: #cbd5e1;
  color: var(--amn-text);
}

/* Sidebar cards */
.home-sidebar-section { padding-top: 0; }
.home-sidebar-card {
  background: #fff;
  border: 1px solid var(--amn-border);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.home-sidebar-card .home-section-head {
  margin-bottom: 1rem;
}
.home-most-read { counter-reset: most-read; }
.home-most-read-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--amn-border);
  font-size: 0.9375rem;
}
.home-most-read-item:last-child { border-bottom: none; }
.home-most-read-link {
  text-decoration: none;
  color: var(--amn-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.home-most-read-link:hover { color: var(--amn-primary); }
.home-most-read-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 48px;
  border-radius: 4px;
  overflow: hidden;
  background: #e2e8f0;
  margin-right: 0.25rem;
}
.home-most-read-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-most-read-thumb-placeholder {
  width: 100%;
  height: 100%;
  background: #e2e8f0;
}
.home-most-read-num {
  flex-shrink: 0;
  font-weight: 700;
  color: var(--amn-text-muted);
  min-width: 1.5rem;
}
/* .home-most-read-title {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 1.4rem;
} */
.home-poll.home-sidebar-card { padding: 1.25rem; }
.home-poll-question {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--amn-text);
}

/* ========== Category pages - NYT-style ========== */
.category-page .section-title {
  font-family: var(--amn-font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--amn-text);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--amn-border);
}

/* Main 3-column story grid */
.category-main-grid {
  margin-top: 1rem;
}
.category-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}
.category-card-link:hover {
  color: inherit;
}
.category-card {
  border: 1px solid var(--amn-border);
  border-radius: var(--amn-radius-home);
  overflow: hidden;
  background: var(--amn-card-bg);
  box-shadow: none;
  transition: border-color 0.2s ease, background 0.2s ease;
  height: 100%;
}
.category-card-link:hover .category-card {
  border-color: var(--amn-text-muted);
  background: #fafafa;
}
.category-card-media {
  overflow: hidden;
  background: #e2e8f0;
}
.category-card-media img,
.category-card-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
}
.category-card-placeholder {
  background: #e2e8f0;
}
.category-card-body {
  padding: 0.75rem 0.9rem 0.9rem;
}
.category-card-title {
  font-family: var(--amn-font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--amn-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.category-card-link:hover .category-card-title {
  color: var(--amn-accent-link);
}
.category-card-excerpt {
  font-size: 0.9375rem;
  color: var(--amn-text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Secondary sections (Photos, Videos, Latest) */
.category-secondary {
  margin-top: 2rem;
}
.category-secondary .category-module {
  border: 1px solid var(--amn-border);
  border-radius: var(--amn-radius-home);
  background: var(--amn-card-bg);
  padding: 0.75rem 0.9rem;
  box-shadow: none;
  height: 100%;
}
.category-module-head {
  font-family: var(--amn-font-serif);
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--amn-text);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--amn-border);
}
.category-module-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.category-module-list-item {
  font-size: 1.2rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--amn-border);
}
.category-module-list-item:last-child {
  border-bottom: none;
}
.category-module-link {
  text-decoration: none;
  color: var(--amn-text);
  display: block;
}
.category-module-link:hover {
  color: var(--amn-accent-link);
}

/* Photos strip */
.category-module-photos {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.category-module-photo-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  padding: 0.25rem 0;
}
.category-module-photo-item:hover {
  color: var(--amn-accent-link);
}
.category-module-photo-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 4px;
  overflow: hidden;
  background: #e2e8f0;
}
.category-module-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.category-module-photo-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: #e2e8f0;
}
.category-module-photo-title {
  font-size: 1.2rem;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Videos strip (with play icon) */
.category-module-videos {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.category-module-video-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
  padding: 0.25rem 0;
}
.category-module-video-item:hover {
  color: var(--amn-accent-link);
}
.category-module-video-thumb {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 4px;
  overflow: hidden;
  background: #e2e8f0;
}
.category-module-video-thumb img,
.category-module-video-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.category-module-video-placeholder {
  background: #e2e8f0;
}
.category-module-play-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.category-module-video-title {
  font-size: 1.4rem;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Use serif titles on English category side modules */
html[lang="en"] .category-module-list-item,
html[lang="en"] .category-module-photo-title,
html[lang="en"] .category-module-video-title {
  font-family: var(--amn-font-serif);
}

.category-load-more-wrap {
  margin-top: 1rem;
}

/* Breaking news ticker */
.breaking-news-ticker {
  display: flex;
  align-items: center;
  background: #c41e3a;
  color: #fff;
  overflow: hidden;
  min-height: 35px;
}
.breaking-news-ticker-label {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  background: #1550d2;
  height: 35px;
  line-height: 22px;
}
.breaking-news-ticker-wrap {
  flex: 1;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 2rem, black calc(100% - 2rem), transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 2rem, black calc(100% - 2rem), transparent);
}
.breaking-news-ticker-inner {
  display: inline-flex;
  align-items: center;
  animation: breaking-news-scroll 40s linear infinite;
  white-space: nowrap;
}
.breaking-news-ticker-inner:hover {
  animation-play-state: paused;
}
.breaking-news-ticker-inner.breaking-news-ticker-empty {
  animation: none;
}
.breaking-news-ticker-item {
  color: #fff;
  text-decoration: none;
  padding: 0px !important;
  font-size: 1rem;
  font-weight: 500;
  transition: text-decoration 0.2s;
}
.breaking-news-ticker-item:hover {
  text-decoration: underline;
  color: #fff;
}
.breaking-news-ticker-sep {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.6rem;
  padding: 0 0.25rem;
}
@keyframes breaking-news-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Date and time bar below ticker */
.ticker-date-time-bar {
  background: #efefef;
  color: #3a3a3a;
  padding: 0.35rem 0;
  font-size: 0.75rem;
  border-bottom: 1px solid #e3e3e3;
}
.ticker-date-time-inner {
  white-space: nowrap;
}
.ticker-date-time-date,
.ticker-date-time-time {
  white-space: nowrap;
  font-size:14px !important;
}
@media (max-width: 575.98px) {
  .ticker-date-time-bar {
    padding: 0.3rem 0;
    font-size: 0.7rem;
  }
}

/* Short Videos section */
.home-short-videos {
  margin-top: 2rem;
}
.home-short-video-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #f8f9fa;
  transition: box-shadow 0.2s;
}
.home-short-video-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.home-short-video-thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #e2e8f0;
  overflow: hidden;
}
.home-short-video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-short-video-placeholder {
  width: 100%;
  height: 100%;
  background: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-short-video-duration {
  position: absolute;
  bottom: 0.25rem;
  right: 0.25rem;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.2rem;
}
.home-short-video-title {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* YouTube Links section */
.home-youtube-links {
  margin-top: 2rem;
}
.home-youtube-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 0.5rem;
  overflow: hidden;
  background: #f8f9fa;
  transition: box-shadow 0.2s;
}
.home-youtube-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.home-youtube-thumb {
  aspect-ratio: 16 / 9;
  background: #e2e8f0;
  overflow: hidden;
}
.home-youtube-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.home-youtube-placeholder {
  width: 100%;
  height: 100%;
  background: #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-youtube-title {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Short News - web stories strip */
.home-short-news {
  margin-top: 2rem;
}
.home-short-news-strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  -webkit-overflow-scrolling: touch;
}
.home-short-news-strip::-webkit-scrollbar {
  height: 4px;
}
.home-short-news-strip::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 2px;
}
.short-news-story-card {
  flex: 0 0 180px;
  text-decoration: none;
  color: inherit;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #000;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
@media (min-width: 768px) {
  .short-news-story-card {
    flex: 0 0 200px;
  }
}
.short-news-story-image {
  position: relative;
  aspect-ratio: 9 / 16;
  background-size: cover;
  background-position: center;
}
.short-news-story-gradient {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 45%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}
.short-news-story-caption {
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}
.short-news-story-card:hover .short-news-story-image {
  transform: scale(1.03);
  transition: transform 0.2s ease-out;
}

/* Ad banner (responsive, home + news pages) */
.ad-banner-wrap {
  margin-bottom: 1rem;
  overflow: hidden;
}
.ad-banner-inner {
  max-width: 100%;
  margin: 0 auto;
}
.ad-banner-link {
  display: block;
  line-height: 0;
}
.ad-banner-img {
  display: block;
  max-width: 100%;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* Footer social links */
.app-footer-social {
  margin-top: 1rem;
}
.app-footer-social-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
}
.app-footer-social-list li {
  margin: 0;
}
.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: inherit;
}
.social-link:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.08);
}
.social-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  margin-right: 0.25rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.social-link-facebook .social-icon::before {
  content: 'f';
}
.social-link-twitter .social-icon::before,
.social-link-x .social-icon::before {
  content: 'x';
}
.social-link-instagram .social-icon::before {
  content: 'i';
}
.social-link-youtube .social-icon::before {
  content: '▶';
}
.social-link-linkedin .social-icon::before {
  content: 'in';
  font-size: 0.7rem;
}
.social-link-whatsapp .social-icon::before {
  content: 'wa';
  font-size: 0.7rem;
}
.social-link-telegram .social-icon::before {
  content: 'tg';
  font-size: 0.7rem;
}
