/*
Theme Name: Child Health Advances
Theme URI: https://childhealthadvances.com
Author: Aspect Publishing
Description: A professional magazine-style theme for Child Health Advances, covering innovation, research and technology in children's health.
Version: 1.0.5
License: GNU General Public License v2 or later
Text Domain: cha
Tags: news, magazine, custom-header, custom-menu, featured-images, full-width-template
*/

/* =============================================
   CSS VARIABLES
   ============================================= */
:root {
  /* Core brand colours — Child Health Advances new logo */
  --color-navy:        #40129b;   /* Purple — main header bar */
  --color-navy-mid:    #40129b;
  --color-pale:        #40129b;   /* Purple — main header bar */
  --color-pale-dark:   #5518c2;   /* Lighter purple for hover */
  --color-accent:      #7bfdda;   /* Mint green — from logo, CTAs and nav text */
  --color-accent-dark: #4ee8c0;   /* Deeper mint for hover */
  --color-white:       #ffffff;
  --color-off-white:   #f4f7fa;
  --color-light-gray:  #e8edf2;
  --color-mid-gray:    #aab4c0;
  --color-dark-gray:   #4a5568;
  --color-text:        #1a202c;
  --color-border:      #dde3ea;
  --color-red:         #e53e3e;

  --color-cyan:        #7bfdda;
  --color-cyan-light:  #a0fde6;
  --color-cyan-dark:   #4ee8c0;

  --font-heading:  'Barlow', 'Segoe UI', sans-serif;
  --font-body:     'Source Sans 3', 'Helvetica Neue', sans-serif;
  --font-mono:     'JetBrains Mono', monospace;

  --header-height: 70px;
  --ticker-height: 28px;
  --container:     1280px;
  --radius:        4px;
  --shadow-sm:     0 1px 4px rgba(64,18,155,0.08);
  --shadow-md:     0 4px 16px rgba(64,18,155,0.12);
  --shadow-lg:     0 8px 32px rgba(64,18,155,0.18);
  --transition:    0.2s ease;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-off-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* =============================================
   TYPOGRAPHY
   ============================================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: #7bfdda;
}

/* =============================================
   LAYOUT UTILITIES
   ============================================= */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* =============================================
   TOP AD BAR
   ============================================= */
#top-ad-bar {
  background: #f0f4f8;
  border-bottom: 1px solid var(--color-border);
  text-align: center;
  padding: 6px 20px;
  font-size: 12px;
  color: var(--color-dark-gray);
}

/* =============================================
   HEADER — cream #40129b main bar, black secondary
   ============================================= */
#site-header {
  background: var(--color-pale);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(210,75,111,0.12);
  height: 70px !important;
  max-height: 70px !important;
  overflow: hidden !important;
  padding: 0 !important;
  line-height: 1;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px !important;
  max-height: 70px !important;
  gap: 16px;
  padding: 0;
}

/* Logo */
.site-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.site-logo img {
  height: 48px !important;
  max-height: 48px !important;
  width: auto;
}

/* Main Nav */
#primary-nav {
  display: flex;
  align-items: center;
  height: 100%;
}

#primary-menu {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 2px;
}

#primary-menu > li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

#primary-menu > li > a {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  color: #7bfdda;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
  border-bottom: 3px solid transparent;
}

#primary-menu > li > a:hover,
#primary-menu > li.current-menu-item > a {
  color: #fff;
  border-bottom-color: #7bfdda;
  background: rgba(123,253,218,0.1);
}

/* Dropdown */
#primary-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  min-width: 220px;
  border-top: 3px solid var(--color-cyan);
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius) var(--radius);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 100;
}

#primary-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

#primary-menu .sub-menu li a {
  display: block;
  padding: 10px 18px;
  font-size: 13.5px;
  font-family: var(--font-heading);
  font-weight: 500;
  color: #7bfdda;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}

#primary-menu .sub-menu li a:hover {
  color: var(--color-cyan-dark);
  border-left-color: var(--color-cyan);
  background: var(--color-off-white);
  padding-left: 22px;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #7bfdda;
  transition: all var(--transition);
}

.header-search-toggle:hover {
  color: #fff;
  background: rgba(123,253,218,0.15);
}

.btn-newsletter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: #7bfdda;
  color: #40129b !important;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-newsletter:hover {
  background: #4ee8c0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(123,253,218,0.35);
}

/* Mobile hamburger */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  gap: 5px;
  color: #7bfdda;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: currentColor;
  transition: all 0.3s;
  transform-origin: center;
}

/* =============================================
   SECONDARY NAV (category ticker bar)
   ============================================= */
/* ── Secondary nav — black bar ── */
#secondary-nav {
  background: #000000;
  border-top: none;
  height: 28px !important;
  max-height: 28px !important;
  padding: 0 !important;
  overflow: hidden;
  position: sticky;
  top: 70px;
  z-index: 999;
}

.secondary-nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
  height: 28px !important;
  max-height: 28px !important;
  overflow: hidden;
}

/* Hide the "Topics" label — menu items speak for themselves */
.secondary-nav-label {
  display: none;
}

#secondary-menu {
  display: flex;
  align-items: center;
  height: 100%;
  overflow: hidden;
}

#secondary-menu li a {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 14px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.80);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: color var(--transition), background var(--transition);
  border-right: 1px solid rgba(255,255,255,0.08);
}

#secondary-menu li a:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

/* =============================================
   SEARCH BAR (collapsible)
   ============================================= */
#search-bar {
  background: var(--color-navy);
  border-top: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}

#search-bar.open { max-height: 80px; }

.search-bar-inner {
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-bar-inner form {
  display: flex;
  flex: 1;
  max-width: 600px;
  margin: 0 auto;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 40px;
  overflow: hidden;
}

.search-bar-inner input[type="search"] {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 10px 20px;
  color: #fff;
  font-size: 14px;
  font-family: var(--font-body);
}

.search-bar-inner input[type="search"]::placeholder { color: rgba(255,255,255,0.4); }

.search-bar-inner button[type="submit"] {
  background: var(--color-cyan);
  border: none;
  padding: 10px 20px;
  color: #7bfdda;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
  font-family: var(--font-heading);
  transition: background var(--transition);
}

.search-bar-inner button[type="submit"]:hover { background: var(--color-cyan-light); }

/* =============================================
   BREAKING NEWS TICKER
   ============================================= */
#news-ticker {
  background: var(--color-red);
  overflow: hidden;
  height: var(--ticker-height);
  display: flex;
  align-items: center;
}

.ticker-label {
  background: #c53030;
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}

.ticker-wrap {
  overflow: hidden;
  flex: 1;
}

.ticker-track {
  display: flex;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
}

.ticker-track:hover { animation-play-state: paused; }

.ticker-track a {
  color: #fff;
  font-size: 13.5px;
  font-family: var(--font-heading);
  font-weight: 500;
  padding: 0 32px 0 16px;
  display: inline-block;
  position: relative;
}

.ticker-track a::after {
  content: '•';
  position: absolute;
  right: 12px;
  color: rgba(255,255,255,0.5);
}

.ticker-track a:hover { text-decoration: underline; }

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* =============================================
   MAIN CONTENT AREA
   ============================================= */
#main-content {
  padding: 28px 0 40px;
}

/* =============================================
   HOMEPAGE GRID
   ============================================= */
.homepage-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

/* Hero Section */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: 3px;
  margin-bottom: 28px;
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-card {
  position: relative;
  overflow: hidden;
  background: #111;
}

.hero-card:first-child {
  grid-column: 1 / 3;
  aspect-ratio: 16/7;
}

.hero-card:not(:first-child) {
  aspect-ratio: 16/9;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.hero-card:hover img { transform: scale(1.03); }

.hero-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(2,4,56,0.92) 0%, rgba(2,4,56,0.4) 50%, transparent 100%);
}

.hero-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 22px;
}

.hero-card-category {
  display: inline-block;
  background: var(--color-cyan);
  color: #7bfdda;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 2px;
  margin-bottom: 8px;
}

.hero-card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 6px;
}

.hero-card:first-child .hero-card-title {
  font-size: clamp(20px, 2.5vw, 30px);
}

.hero-card:not(:first-child) .hero-card-title {
  font-size: clamp(14px, 1.5vw, 19px);
}

.hero-card-meta {
  font-size: 12px;
  color: rgba(255,255,255,0.6);
  font-family: var(--font-heading);
}

/* =============================================
   SECTION HEADING
   ============================================= */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--color-navy);
}

.section-heading h2 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  color: #7bfdda;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  position: relative;
}

.section-heading h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--color-cyan);
  margin-right: 10px;
  border-radius: 2px;
  vertical-align: middle;
}

.section-heading .view-all {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: var(--color-cyan-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color var(--transition);
}

.section-heading .view-all:hover { color: var(--color-navy); }

/* =============================================
   ARTICLE CARDS
   ============================================= */

/* List card (horizontal) */
.article-list { display: flex; flex-direction: column; gap: 0; }

.article-list-item {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--transition);
}

.article-list-item:last-child { border-bottom: none; }

.article-list-thumb {
  flex-shrink: 0;
  width: 100px;
  height: 70px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-light-gray);
}

.article-list-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.article-list-item:hover .article-list-thumb img { transform: scale(1.05); }

.article-list-content { flex: 1; min-width: 0; }

.article-category {
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-cyan-dark);
  margin-bottom: 4px;
}

.article-list-content h3 {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  color: #7bfdda;
  margin-bottom: 4px;
  transition: color var(--transition);
}

.article-list-item:hover h3 { color: var(--color-cyan-dark); }

.article-meta {
  font-size: 11.5px;
  color: var(--color-mid-gray);
  font-family: var(--font-heading);
}

/* Grid card */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.article-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.article-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--color-light-gray);
}

.article-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.article-card:hover .article-card-thumb img { transform: scale(1.04); }

.article-card-body { padding: 16px; }

.article-card-body h3 {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #7bfdda;
  margin: 6px 0 8px;
  transition: color var(--transition);
}

.article-card:hover .article-card-body h3 { color: var(--color-cyan-dark); }

.article-card-excerpt {
  font-size: 13px;
  color: var(--color-dark-gray);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================================
   SIDEBAR
   ============================================= */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.sidebar-widget {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.sidebar-widget-title {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7bfdda;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 3px solid var(--color-cyan);
}

/* Newsletter Widget */
.newsletter-widget {
  background: var(--color-navy);
  color: #fff;
  text-align: center;
  padding: 24px 20px;
}

.newsletter-widget .sidebar-widget-title {
  color: var(--color-cyan);
  border-bottom-color: rgba(0,212,232,0.3);
}

.newsletter-widget p {
  font-size: 13.5px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
  line-height: 1.5;
}

.newsletter-widget input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 14px;
  font-family: var(--font-body);
  border-radius: var(--radius);
  margin-bottom: 10px;
  outline: none;
  transition: border-color var(--transition);
}

.newsletter-widget input[type="email"]:focus {
  border-color: var(--color-cyan);
}

.newsletter-widget input::placeholder { color: rgba(255,255,255,0.4); }

.btn-subscribe {
  width: 100%;
  padding: 11px;
  background: var(--color-cyan);
  color: #7bfdda;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}

.btn-subscribe:hover {
  background: var(--color-cyan-light);
  transform: translateY(-1px);
}

/* Most Read Widget */
.most-read-list { display: flex; flex-direction: column; gap: 0; }

.most-read-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-light-gray);
  align-items: flex-start;
}

.most-read-item:last-child { border-bottom: none; }

.most-read-number {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 900;
  color: var(--color-light-gray);
  flex-shrink: 0;
  line-height: 1;
  min-width: 24px;
}

.most-read-item h4 {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  color: #7bfdda;
  transition: color var(--transition);
}

.most-read-item:hover h4 { color: var(--color-cyan-dark); }

/* Ad widget */
.ad-widget {
  padding: 0;
  overflow: hidden;
}

.ad-widget img { width: 100%; height: auto; }

/* =============================================
   TOPIC STRIP (category row)
   ============================================= */
.topic-strip {
  background: var(--color-navy);
  padding: 14px 0;
  margin-bottom: 28px;
}

.topic-strip-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.topic-strip-inner::-webkit-scrollbar { display: none; }

.topic-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,0.08);
  transition: all var(--transition);
}

.topic-pill:hover, .topic-pill.active {
  background: var(--color-cyan);
  color: #7bfdda;
  border-color: var(--color-cyan);
}

/* =============================================
   FEATURED BANNER AD
   ============================================= */
.banner-ad {
  background: var(--color-light-gray);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  color: var(--color-mid-gray);
  font-size: 12px;
  font-family: var(--font-heading);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* =============================================
   SINGLE POST
   ============================================= */
.single-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}

.post-header { margin-bottom: 24px; }

.post-categories { margin-bottom: 10px; }

.post-category-tag {
  display: inline-block;
  background: var(--color-cyan);
  color: #7bfdda;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 2px;
  margin-right: 4px;
  transition: background var(--transition);
}

.post-category-tag:hover { background: var(--color-cyan-dark); }

.post-title {
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  color: #7bfdda;
  line-height: 1.2;
  margin: 12px 0 14px;
}

.post-excerpt-lead {
  font-size: 18px;
  font-weight: 400;
  color: var(--color-dark-gray);
  line-height: 1.6;
  margin-bottom: 20px;
  border-left: 4px solid var(--color-cyan);
  padding-left: 16px;
}

.post-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 24px;
  font-family: var(--font-heading);
  font-size: 13px;
  color: var(--color-dark-gray);
}

.post-meta-bar .author { font-weight: 700; color: var(--color-navy); }
.post-meta-bar .dot { color: var(--color-border); }

.post-featured-image {
  margin-bottom: 28px;
  border-radius: var(--radius);
  overflow: hidden;
}

.post-featured-image img { width: 100%; }

.post-featured-image figcaption {
  background: var(--color-light-gray);
  padding: 8px 12px;
  font-size: 12px;
  color: var(--color-dark-gray);
  font-style: italic;
}

.post-content {
  font-size: 16.5px;
  line-height: 1.75;
  color: var(--color-text);
}

.post-content p { margin-bottom: 20px; }
.post-content h2 { font-size: 24px; margin: 32px 0 14px; }
.post-content h3 { font-size: 20px; margin: 28px 0 12px; }

.post-content a {
  color: var(--color-cyan-dark);
  text-decoration: underline;
  text-decoration-color: rgba(0,170,191,0.4);
  text-underline-offset: 3px;
  transition: color var(--transition);
}

.post-content a:hover { color: var(--color-navy); }

.post-content blockquote {
  border-left: 4px solid var(--color-cyan);
  padding: 16px 20px;
  margin: 24px 0;
  background: var(--color-off-white);
  font-size: 18px;
  font-style: italic;
  color: #7bfdda;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content img {
  border-radius: var(--radius);
  margin: 20px 0;
}

/* Share bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  margin: 32px 0;
  flex-wrap: wrap;
}

.share-bar-label {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-dark-gray);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all var(--transition);
}

.share-btn.twitter  { background: #1da1f2; color: #fff; }
.share-btn.linkedin { background: #0077b5; color: #fff; }
.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* Related Articles */
.related-articles { margin-top: 40px; }

/* =============================================
   ARCHIVE / CATEGORY PAGE
   ============================================= */
.archive-header {
  background: var(--color-navy);
  padding: 32px 0;
  margin-bottom: 28px;
}

.archive-header .container {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.archive-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 900;
  color: var(--color-cyan);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.archive-title span { display: block; font-size: 13px; color: rgba(255,255,255,0.5); font-weight: 400; text-transform: none; letter-spacing: 0; margin-bottom: 4px; }

.archive-count {
  font-family: var(--font-heading);
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 0 40px;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: #7bfdda;
  background: #fff;
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.page-numbers:hover, .page-numbers.current {
  background: var(--color-navy);
  color: #fff;
  border-color: #7bfdda;
}

/* =============================================
   FOOTER — dark teal #40129b background, cream #40129b text
   ============================================= */
#site-footer {
  background: #40129b;
  color: rgba(123,253,218,0.75);
  margin-top: 40px;
}

.footer-top {
  padding: 48px 0 32px;
  border-bottom: 1px solid rgba(123,253,218,0.12);
  display: grid;
  grid-template-columns: 280px 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {}

.footer-logo { margin-bottom: 16px; }
.footer-logo img { height: 40px; }

.footer-tagline {
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 20px;
  color: rgba(123,253,218,0.6);
}

.footer-socials { display: flex; gap: 10px; }

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(123,253,218,0.1);
  border-radius: 50%;
  color: rgba(123,253,218,0.65);
  font-size: 15px;
  transition: all var(--transition);
}

.footer-social-link:hover {
  background: #40129b;
  color: #40129b;
}

.footer-col-title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #40129b;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(123,253,218,0.25);
}

.footer-links { display: flex; flex-direction: column; gap: 8px; }

.footer-links a {
  font-size: 13.5px;
  color: rgba(123,253,218,0.6);
  transition: color var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-links a::before {
  content: '›';
  color: rgba(123,253,218,0.4);
  font-size: 16px;
}

.footer-links a:hover { color: #40129b; }

.footer-bottom {
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(123,253,218,0.35);
}

.footer-bottom a {
  color: rgba(123,253,218,0.35);
  transition: color var(--transition);
}

.footer-bottom a:hover { color: #40129b; }

.footer-bottom-links { display: flex; gap: 18px; }

/* =============================================
   MOBILE MENU (off-canvas)
   ============================================= */
#mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100vh;
  background: var(--color-navy);
  z-index: 2000;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: 0;
}

#mobile-menu.open { transform: translateX(0); }

.mobile-menu-header {
  background: rgba(0,0,0,0.3);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mobile-menu-header img { height: 32px; }

.mobile-menu-close {
  color: rgba(255,255,255,0.7);
  font-size: 22px;
  cursor: pointer;
  transition: color var(--transition);
}

.mobile-menu-close:hover { color: var(--color-cyan); }

.mobile-menu-body { padding: 16px 0; }

.mobile-menu-body a {
  display: block;
  padding: 12px 24px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.8);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: all var(--transition);
}

.mobile-menu-body a:hover {
  color: var(--color-cyan);
  padding-left: 30px;
}

.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1999;
  display: none;
}

.mobile-overlay.open { display: block; }

/* =============================================
   404 PAGE
   ============================================= */
.error-404 {
  text-align: center;
  padding: 80px 20px;
}

.error-404 .error-code {
  font-size: 120px;
  font-weight: 900;
  color: var(--color-light-gray);
  line-height: 1;
  margin-bottom: 16px;
}

.error-404 h1 { font-size: 28px; margin-bottom: 12px; }
.error-404 p { color: var(--color-dark-gray); margin-bottom: 24px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .archive-grid  { grid-template-columns: repeat(2, 1fr); }
  .footer-top    { grid-template-columns: 1fr 1fr; gap: 28px; }
}

@media (max-width: 960px) {
  .homepage-layout { grid-template-columns: 1fr; }
  .single-layout   { grid-template-columns: 1fr; }
  .sidebar         { display: none; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-card:first-child { grid-column: 1; aspect-ratio: 16/9; }
  .hero-card:not(:first-child) { display: none; }
}

@media (max-width: 768px) {
  :root { --header-height: 60px; }

  #primary-nav, .header-right .btn-newsletter { display: none; }
  .menu-toggle { display: flex; }

  .article-grid  { grid-template-columns: 1fr; }
  .archive-grid  { grid-template-columns: 1fr; }
  .footer-top    { grid-template-columns: 1fr; }

  #secondary-menu { display: none; }
}

@media (max-width: 480px) {
  .article-list-thumb { width: 80px; height: 56px; }
}

/* =============================================
   PRINT
   ============================================= */
@media print {
  #site-header, #site-footer, .sidebar, #news-ticker, .share-bar { display: none; }
  .single-layout { display: block; }
}

/* =============================================
   HOMEPAGE — htworld-style layout
   ============================================= */

/* ── Hero wrap ── */
.hp-hero-wrap {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: 20px 0 0;
}

.hp-hero-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr;
  gap: 24px;
  align-items: start;
}

/* ── Left column ── */
.hp-col-left {}

.hp-feat-large__img-wrap {
  display: block;
  overflow: hidden;
  background: var(--color-light-gray);
  margin-bottom: 10px;
}

.hp-feat-large__img-wrap img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.4s;
}

.hp-feat-large:hover .hp-feat-large__img-wrap img { transform: scale(1.03); }

.hp-feat-large__body {}

.hp-feat-large__title {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 800;
  line-height: 1.25;
  color: #7bfdda;
  margin-top: 6px;
}

.hp-feat-large__title a { color: inherit; transition: color var(--transition); }
.hp-feat-large__title a:hover { color: var(--color-cyan-dark); }

/* Category label pill */
.hp-cat-label {
  display: inline-block;
  background: var(--color-navy);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 8px;
  margin-bottom: 6px;
}

.hp-cat-label--sm {
  font-size: 9.5px;
  padding: 2px 7px;
  background: transparent;
  color: var(--color-cyan-dark);
  font-weight: 800;
  padding: 0;
  margin-bottom: 2px;
}

/* Small list below left featured */
.hp-small-list {
  margin-top: 12px;
  border-top: 2px solid var(--color-navy);
}

.hp-small-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
  align-items: flex-start;
}

.hp-small-item:last-child { border-bottom: none; }

.hp-small-item__thumb {
  flex-shrink: 0;
  width: 90px;
  height: 62px;
  overflow: hidden;
  background: var(--color-light-gray);
}

.hp-small-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.hp-small-item:hover .hp-small-item__thumb img { transform: scale(1.05); }

.hp-small-item__body { flex: 1; min-width: 0; }

.hp-small-item__title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  color: #7bfdda;
  margin: 0;
}

.hp-small-item__title a { color: inherit; transition: color var(--transition); }
.hp-small-item__title a:hover { color: var(--color-cyan-dark); }

.hp-small-item--lined {
  border-bottom: 1px solid var(--color-border);
}

/* ── Mid / Right columns ── */
.hp-col-mid, .hp-col-right {
  border-left: 1px solid var(--color-border);
  padding-left: 24px;
}

.hp-feat-med {
  margin-bottom: 10px;
}

.hp-feat-med__img-wrap {
  display: block;
  overflow: hidden;
  background: var(--color-light-gray);
  margin-bottom: 8px;
}

.hp-feat-med__img-wrap img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.4s;
}

.hp-feat-med:hover .hp-feat-med__img-wrap img { transform: scale(1.03); }

.hp-feat-med__title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  color: #7bfdda;
}

.hp-feat-med__title a { color: inherit; transition: color var(--transition); }
.hp-feat-med__title a:hover { color: var(--color-cyan-dark); }

/* Titles-only list */
.hp-title-list {
  border-top: 2px solid var(--color-navy);
}

.hp-title-item {
  padding: 9px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.35;
}

.hp-title-item:last-child { border-bottom: none; }

.hp-title-item a { color: var(--color-navy); transition: color var(--transition); }
.hp-title-item a:hover { color: var(--color-cyan-dark); }

.hp-title-list--cat .hp-title-item { font-size: 13px; }

/* Section label (black box with white text, htworld style) */
.hp-section-label {
  background: var(--color-navy);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 10px;
  margin-bottom: 14px;
  display: inline-block;
}

.hp-section-label a { color: #fff; }

/* ── Ad bars ── */
.hp-ad-bar {
  padding: 14px 0;
  background: #f0f4f8;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.hp-leader-ad {
  background: var(--color-light-gray);
  border: 1px dashed var(--color-border);
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-mid-gray);
  font-family: var(--font-heading);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Mid section grid (more news + insight + sidebar) ── */
.hp-mid-section {
  padding: 20px 0;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.hp-mid-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 300px;
  gap: 24px;
  align-items: start;
}

.hp-more-col {}

.hp-insight-col {
  border-left: 1px solid var(--color-border);
  padding-left: 24px;
}

/* ── Sidebar ── */
.hp-sidebar {
  border-left: 1px solid var(--color-border);
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.hp-sidebar-ad {
  background: var(--color-light-gray);
  border: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-mid-gray);
  font-family: var(--font-heading);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  width: 100%;
}

.hp-sidebar-widget {
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 16px;
}

.hp-sidebar-widget__title {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #7bfdda;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 2px solid var(--color-cyan);
}

.hp-newsletter {
  background: var(--color-navy);
  border-color: #7bfdda;
}

.hp-newsletter .hp-sidebar-widget__title {
  color: var(--color-cyan);
  border-bottom-color: rgba(0,212,232,0.3);
}

.hp-newsletter p {
  color: rgba(255,255,255,0.65);
  font-size: 12.5px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.hp-most-read {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hp-most-read li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 9px 0;
  border-bottom: 1px solid var(--color-light-gray);
  font-size: 12.5px;
  font-family: var(--font-heading);
  font-weight: 600;
  color: #7bfdda;
  line-height: 1.3;
}

.hp-most-read li:last-child { border-bottom: none; }

.hp-most-read li a { color: var(--color-navy); transition: color var(--transition); }
.hp-most-read li a:hover { color: var(--color-cyan-dark); }

.hp-most-read__num {
  font-size: 22px;
  font-weight: 900;
  color: var(--color-light-gray);
  flex-shrink: 0;
  line-height: 1;
  min-width: 22px;
}

/* ── Category section rows ── */
.hp-cat-section {
  padding: 20px 0 0;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}

.hp-cat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
  padding-bottom: 20px;
}

.hp-cat-col:not(:first-child) {
  border-left: 1px solid var(--color-border);
  padding-left: 24px;
}

.hp-cat-feat {
  margin-bottom: 10px;
}

.hp-cat-feat__img {
  display: block;
  overflow: hidden;
  margin-bottom: 8px;
}

.hp-cat-feat__img img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.4s;
}

.hp-cat-feat:hover .hp-cat-feat__img img { transform: scale(1.03); }

.hp-cat-feat__title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #7bfdda;
}

.hp-cat-feat__title a { color: inherit; transition: color var(--transition); }
.hp-cat-feat__title a:hover { color: var(--color-cyan-dark); }

.hp-cat-more {
  display: inline-block;
  margin-top: 10px;
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-cyan-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: color var(--transition);
}

.hp-cat-more:hover { color: var(--color-navy); }

/* ── Responsive ── */
@media (max-width: 1100px) {
  .hp-hero-grid     { grid-template-columns: 1.6fr 1fr 1fr; gap: 18px; }
  .hp-mid-grid      { grid-template-columns: 1.5fr 1fr 280px; }
  .hp-col-mid, .hp-col-right, .hp-insight-col { padding-left: 18px; }
}

@media (max-width: 900px) {
  .hp-hero-grid     { grid-template-columns: 1fr 1fr; }
  .hp-col-right     { display: none; }
  .hp-mid-grid      { grid-template-columns: 1fr 1fr; }
  .hp-sidebar       { display: none; }
  .hp-cat-row       { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .hp-hero-grid     { grid-template-columns: 1fr; }
  .hp-col-mid       { display: none; }
  .hp-mid-grid      { grid-template-columns: 1fr; }
  .hp-insight-col   { border-left: none; padding-left: 0; border-top: 1px solid var(--color-border); padding-top: 18px; }
  .hp-cat-row       { grid-template-columns: 1fr; }
  .hp-cat-col:not(:first-child) { border-left: none; padding-left: 0; border-top: 1px solid var(--color-border); padding-top: 16px; }
}

/* Logo text fallback */
.site-logo__text {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  color: var(--color-cyan);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Force custom logo to correct size */
.site-logo,
.site-logo .custom-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  max-width: 280px;
}

.site-logo img,
.site-logo .custom-logo,
.site-logo .custom-logo-link img {
  display: block !important;
  height: 48px !important;
  width: auto !important;
  max-width: 300px !important;
  max-height: 48px !important;
  object-fit: contain;
}

/* =============================================
   TOP BANNER (Advanced Ads 970×147)
   Black background, sits above sticky header
   ============================================= */
.rw-top-banner {
  background: #000;
  padding: 16px 0;
  text-align: center;
  position: relative;
  z-index: 999;
}

.rw-top-banner .container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.rw-top-banner img,
.rw-top-banner .advads-ad-container {
  max-width: 100%;
  height: auto;
}

/* Ad placeholder (shown only when Advanced Ads not active) */
.rw-ad-placeholder {
  background: var(--color-light-gray);
  border: 1px dashed var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  color: var(--color-mid-gray);
  font-family: var(--font-heading);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Sidebar Advanced Ads — constrain to 300px */
.hp-sidebar .advads-ad-container,
.hp-sidebar img { max-width: 100%; width: 100%; height: auto; }
   HOMEPAGE — ALL BLOCKS
   ============================================= */

/* ── Shared section label ── */
.hp-section-label {
  display: inline-flex;
  align-items: center;
  margin-bottom: 14px;
}
.hp-section-label span {
  background: var(--color-navy);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
}

/* ── Shared hero story (image + title) ── */
.hp-hero-story { display: block; margin-bottom: 12px; }
.hp-hero-story__img { overflow: hidden; margin-bottom: 10px; }
.hp-hero-story__img img { width: 100%; height: auto; display: block; transition: transform 0.4s; }
.hp-hero-story:hover .hp-hero-story__img img { transform: scale(1.03); }
.hp-hero-story__title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  line-height: 1.3;
  color: var(--color-navy);
  transition: color 0.2s;
}
.hp-hero-story:hover .hp-hero-story__title { color: var(--color-cyan-dark); }

/* ── Title-only list ── */
.hp-title-list { display: flex; flex-direction: column; }
.hp-title-item {
  display: block;
  padding: 9px 0;
  border-bottom: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
  transition: color 0.2s;
}
.hp-title-item:last-child { border-bottom: none; }
.hp-title-item:hover { color: var(--color-cyan-dark); }

/* ── More News item (thumb + cat + title) ── */
.hp-news-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.hp-news-item:last-child { border-bottom: none; }
.hp-news-item__img { flex-shrink: 0; width: 80px; }
.hp-news-item__img img { width: 80px; height: 56px; object-fit: cover; display: block; }
.hp-news-item__body { flex: 1; }
.hp-news-item__cat {
  display: block;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--color-mid-gray);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.hp-news-item__title {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  transition: color 0.2s;
}
.hp-news-item:hover .hp-news-item__title { color: var(--color-cyan-dark); }

/* ── Thumb + title item (block 3) ── */
.hp-thumb-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}
.hp-thumb-item:last-child { border-bottom: none; }
.hp-thumb-item__img { flex-shrink: 0; width: 72px; }
.hp-thumb-item__img img { width: 72px; height: 50px; object-fit: cover; display: block; }
.hp-thumb-item__title {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.3;
  transition: color 0.2s;
}
.hp-thumb-item:hover .hp-thumb-item__title { color: var(--color-cyan-dark); }

/* ── Ad placeholder ── */
.hp-ad-placeholder {
  background: var(--color-light-gray);
  border: 1px dashed var(--color-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 12px;
  color: var(--color-mid-gray);
  text-align: center;
  padding: 16px;
}

/* ── Empty state ── */
.hp-empty {
  font-size: 13px;
  color: var(--color-mid-gray);
  padding: 12px 0;
}

/* =============================================
   BLOCK 1 — HERO GRID
   ============================================= */
.hp-hero {
  padding: 20px 0 0;
  background: #fff;
  border-bottom: 2px solid var(--color-border);
}

.hp-hero-grid {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1.2fr;
  gap: 24px;
  padding-bottom: 24px;
}

.hp-col-f2,
.hp-col-f3 {
  border-left: 1px solid var(--color-border);
  padding-left: 24px;
}

/* F1 sub-items: thumb left + title right */
.hp-f1-sub {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}
.hp-f1-sub:last-child { border-bottom: none; }
.hp-f1-sub__img { flex-shrink: 0; width: 80px; }
.hp-f1-sub__img img { width: 80px; height: 56px; object-fit: cover; display: block; }
.hp-f1-sub__title {
  font-family: var(--font-heading);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
  transition: color 0.2s;
}
.hp-f1-sub:hover .hp-f1-sub__title { color: var(--color-cyan-dark); }

/* =============================================
   BLOCK 2 — MORE NEWS + CATS + ADS
   ============================================= */
.hp-block2 {
  padding: 28px 0;
  background: var(--color-off-white);
}

.hp-block2-grid {
  display: grid;
  grid-template-columns: 2fr 1.4fr 300px;
  gap: 28px;
  align-items: start;
}

.hp-b2-cats {
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  padding: 0 24px;
}

.hp-cat-section + .hp-cat-section {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 2px solid var(--color-border);
}

.hp-b2-ads {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* =============================================
   BLOCK 3 — MID BANNER + 3 COLS
   ============================================= */
.hp-mid-banner {
  background: #fff;
  padding: 16px 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.hp-block3 {
  padding: 28px 0;
  background: #fff;
}

.hp-block3-grid {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 28px;
  align-items: start;
}

.hp-b3-col--wide {
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  padding: 0 24px;
}

/* =============================================
   BLOCK 4 — 3 EQUAL COLS
   ============================================= */
.hp-block4 {
  padding: 28px 0 40px;
  background: var(--color-off-white);
  border-top: 2px solid var(--color-border);
}

.hp-block4-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
  align-items: start;
}

.hp-b4-col + .hp-b4-col {
  border-left: 1px solid var(--color-border);
  padding-left: 28px;
}

/* =============================================
   RESPONSIVE — HOMEPAGE
   ============================================= */
@media (max-width: 1024px) {
  .hp-hero-grid        { grid-template-columns: 1fr 1fr; }
  .hp-col-f3           { display: none; }
  .hp-block2-grid      { grid-template-columns: 1fr 1fr; }
  .hp-b2-ads           { display: none; }
  .hp-block3-grid      { grid-template-columns: 1fr 1fr; }
  .hp-b3-col--wide     { border: none; padding: 0; }
  .hp-block4-grid      { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hp-hero-grid        { grid-template-columns: 1fr; }
  .hp-col-f2, .hp-col-f3 { display: none; }
  .hp-col-f2           { border: none; padding: 0; }
  .hp-block2-grid      { grid-template-columns: 1fr; }
  .hp-b2-cats          { border: none; padding: 0; }
  .hp-block3-grid      { grid-template-columns: 1fr; }
  .hp-b3-col--wide     { border: none; padding: 0; }
  .hp-block4-grid      { grid-template-columns: 1fr; }
  .hp-b4-col + .hp-b4-col { border: none; padding: 0; }
}

/* CHA — section label: purple bg, white text */
.hp-section-label span {
  background: #40129b;
  color: #fff;
}

/* CHA — all homepage headlines black */
.hp-hero-story__title,
.hp-f1-sub__title,
.hp-news-item__title,
.hp-thumb-item__title {
  color: #111;
}
.hp-title-item {
  color: #111;
}

/* CHA — hover colours use mint */
.hp-hero-story:hover .hp-hero-story__title,
.hp-f1-sub:hover .hp-f1-sub__title,
.hp-news-item:hover .hp-news-item__title,
.hp-thumb-item:hover .hp-thumb-item__title,
.hp-title-item:hover { color: #7bfdda; }

/* CHA — empty category placeholder */
.hp-empty-cat {
  font-size: 12px;
  color: #666;
  border: 1px dashed #ccc;
  padding: 14px;
  line-height: 1.5;
  background: #f5f5f5;
}

/* ── HOMEPAGE: Force headline colour overrides ──────────────────────────── */
.hp-hero-story__title,
.hp-f1-sub__title,
.hp-news-item__title,
.hp-thumb-item__title {
  color: #111 !important;
}
.hp-title-item {
  color: #111 !important;
}
/* CHA section labels: purple bg + white text */
.hp-section-label span {
  background: #40129b !important;
  color: #fff !important;
}

/* ── Block 2: ensure middle column always visible, right col fully flexible */
.hp-b2-cats {
  min-height: 100px;
}
.hp-b2-ads {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch;
}
.hp-b2-ads .sidebar-widget {
  width: 100%;
}
.hp-b2-ads .sidebar-widget img,
.hp-b2-ads .sidebar-widget iframe {
  max-width: 100%;
}
