/* ==========================================================================
   DAILY COMMUNICATIONS INC. — GLOBAL STYLESHEET (loaded on every page)
   A Subsidiary of Siafa Group | Telecommunications & Digital Media

   Contains only what 2+ pages share:
     1. Design tokens (CSS variables)
     2. Reset & base elements
     3. Layout utilities (.container, .section-title, .card-panel, .sr-only)
     4. Top contact bar
     5. Main header & dropdown navigation
     6. Page hero (.hero-section, .hero-title, .live-pill ...)
     7. Buttons (.view-more-btn)
     8. News / content cards (.news-grid, .news-card ...)
     9. Master 4-column footer
    10. Global responsive rules & reduced motion

   Page-specific styles live in css/pages/<page>.css and load AFTER this file.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   -------------------------------------------------------------------------- */
:root {
  --primary-navy: #042552;
  --secondary-navy: #031c3e;
  --dark-navy: #02132b;
  --accent-blue: #0070f3;
  --accent-light-blue: #0ea5e9;
  --accent-yellow: #f59e0b;
  --accent-gold: #fbbd23;
  --accent-red: #ef4444;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  --accent-teal: #0d9488;
  --accent-cyan: #22d3ee;        /* mobile menu: active link */
  --accent-red-light: #f87171;   /* mobile menu: hover link (passes WCAG AA on navy) */

  --text-dark: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-light: #ffffff;

  --bg-light: #f8fafc;
  --card-bg: #ffffff;
  --border-light: #e2e8f0;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.14);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.25);

  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE ELEMENTS
   -------------------------------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* --------------------------------------------------------------------------
   3. LAYOUT UTILITIES
   -------------------------------------------------------------------------- */
.container {
  width: 92%;
  max-width: 1240px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: var(--primary-navy);
  letter-spacing: -0.5px;
}

.section-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.card-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}

/* Visually hidden but available to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   NEWS TICKER (.ticker-wrapper) — used on Home, News, Advertise, Entertainments
   Driven by js/global.js (DC.Ticker). Brand: navy bar, red label, yellow icons.
   ========================================================================== */
.ticker-wrapper {
  --ticker-h: 46px;
  display: flex;
  align-items: stretch;
  height: var(--ticker-h);
  background: #082653;            /* brand navy */
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
  position: relative;
  z-index: 990;                   /* under the header (1000) and its mobile menu */
  box-shadow: 0 4px 14px rgba(8, 38, 83, 0.18);
}
.ticker-wrapper[hidden] { display: none; }

/* Sticks directly under the (sticky) nav bar */
.ticker-wrapper[data-position="fixed-top"] {
  position: sticky;
  top: var(--dc-header-h, 0px);
}
/* Fixed to the bottom of the screen (JS adds matching space under the page) */
.ticker-wrapper[data-position="fixed-bottom"] {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  height: calc(var(--ticker-h) + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -4px 14px rgba(8, 38, 83, 0.2);
}

/* Prefix label: red tab with an angled edge */
.ticker-label {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px 0 16px;
  background: #c62f2a;            /* brand red, a touch deeper so white text passes WCAG AA (5.5:1) */
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}
.ticker-label i { color: #F5B900; }  /* brand yellow */
a.ticker-label:hover, a.ticker-label:focus-visible { background: #a82722; }

.ticker-content {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
}

.ticker-item { color: #ffffff; white-space: nowrap; transition: color 0.2s ease; }
/* LOCAL / INTERNATIONAL tag in front of a headline */
.ticker-tag {
  display: inline-block;
  margin-right: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #082653;
  color: #ffffff;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  vertical-align: 1px;
}
/* News cards on news.html: the headline opens the story */
.news-title-link { color: inherit; }
.news-title-link:hover, .news-title-link:focus-visible { color: var(--accent-blue); text-decoration: underline; }
a.ticker-item:hover { color: #F5B900; text-decoration: underline; }

/* ---- Scroll effect ---- */
.ticker-track {
  display: flex;
  align-items: center;
  gap: 18px;
  width: max-content;
  padding-left: 18px;
  animation: dcTickerScroll var(--ticker-duration, 40s) linear infinite;
}
.ticker-wrapper.is-paused .ticker-track { animation-play-state: paused; }
@keyframes dcTickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.ticker-sep { color: #F5B900; font-size: 0.55rem; display: inline-flex; align-items: center; }
.ticker-sep i { font-size: 0.6rem; }
/* Logo used as the separator (data-separator="images/logo.svg") */
.ticker-sep.ticker-sep-logo { flex-shrink: 0; }

/* Advertise: the bar sits inside the page under the Rate Card box */
.ticker-wrapper.ad-ticker {
  margin-top: 24px;
  border-radius: var(--radius-md);
  overflow: hidden;
  z-index: auto;
}
.ticker-sep img { height: calc(var(--ticker-h) - 20px); width: auto; max-width: none; display: block; }
.ticker-wrapper[data-fill] .ticker-sep.ticker-sep-logo { opacity: 1; }

/* ---- Slide-left, slide-up & typography: one item at a time ---- */
.ticker-slide-left .ticker-content,
.ticker-slide-up .ticker-content,
.ticker-typography .ticker-content { padding: 0 18px; }
.ticker-slide-left .ticker-item,
.ticker-slide-up .ticker-item,
.ticker-typography .ticker-item {
  position: absolute;
  left: 18px;
  right: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticker-slide-left .ticker-item { transition: transform 0.55s ease, opacity 0.55s ease; }
.ticker-slide-left .ticker-item.ticker-entering { transform: translateX(100%); opacity: 0; }
.ticker-slide-left .ticker-item.ticker-leaving  { transform: translateX(-100%); opacity: 0; }

/* Slide-up: the next line rises from below, the old one leaves upwards */
.ticker-slide-up .ticker-item { transition: transform 0.55s ease, opacity 0.55s ease; }
.ticker-slide-up .ticker-item.ticker-entering { transform: translateY(100%); opacity: 0; }
.ticker-slide-up .ticker-item.ticker-leaving  { transform: translateY(-100%); opacity: 0; }

/* Plain-text items (not links) */
span.ticker-item { cursor: default; }


/* Typography: blinking caret while typing */
.ticker-typography .ticker-item.is-typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.15em;
  background: #F5B900;
  animation: dcCaret 0.8s steps(1) infinite;
}
@keyframes dcCaret { 50% { opacity: 0; } }

/* ---- Controls ---- */
.ticker-controls { flex-shrink: 0; display: flex; align-items: center; gap: 4px; padding: 0 8px; }
.ticker-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.ticker-btn:hover, .ticker-btn:focus-visible { background: #00A8D1; border-color: #00A8D1; }
.ticker-wrapper :focus-visible { outline: 3px solid #F5B900; outline-offset: 2px; }

/* Screen-reader list: invisible, but opens as a panel when a keyboard user tabs into it */
.ticker-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: 0; padding: 0; list-style: none;
}
.ticker-sr:focus-within {
  clip: auto; width: auto; height: auto; white-space: normal;
  left: 0; right: 0; top: 100%;
  background: #ffffff; color: #0f172a; padding: 10px 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); z-index: 5;
}
.ticker-wrapper[data-position="fixed-bottom"] .ticker-sr:focus-within { top: auto; bottom: 100%; }
.ticker-sr a { color: #082653; display: block; padding: 6px 0; font-weight: 600; }

/* No-JavaScript fallback: show the HTML list as a simple row */
.ticker-wrapper:not(.is-ready) .ticker-list { display: flex; gap: 24px; align-items: center; margin: 0; padding: 0 18px; list-style: none; white-space: nowrap; overflow: hidden; }
.ticker-wrapper:not(.is-ready) .ticker-list a { color: #ffffff; }

/* ---- Bar colours per page (data-fill). Navy text passes WCAG AA on all of them ---- */
.ticker-wrapper[data-fill] {
  --ticker-ink: #082653;                                   /* text, separators, buttons */
  color: var(--ticker-ink);
  box-shadow: 0 4px 14px rgba(8, 38, 83, 0.14);
}
.ticker-wrapper[data-fill="blue"]   { background: #00A8D1; }   /* Home: navy text 5.3:1 */
.ticker-wrapper[data-fill="white"]  { background: #ffffff; border-bottom: 1px solid #e2e8f0; } /* News: 14.9:1 */
.ticker-wrapper[data-fill="yellow"] { background: #F5B900; }   /* Entertainments: 8.4:1 */
.ticker-wrapper[data-fill="green"]  { background: #69C832; }   /* Advertise: 7.0:1 */
.ticker-wrapper[data-fill][data-position="fixed-bottom"] { box-shadow: 0 -4px 14px rgba(8, 38, 83, 0.16); }

.ticker-wrapper[data-fill] .ticker-item { color: var(--ticker-ink); }
.ticker-wrapper[data-fill] a.ticker-item:hover { color: var(--ticker-ink); text-decoration: underline; text-decoration-thickness: 2px; }
.ticker-wrapper[data-fill] .ticker-sep { color: var(--ticker-ink); opacity: 0.75; }
.ticker-wrapper[data-fill="white"] .ticker-sep { color: #c62f2a; opacity: 1; }   /* red dots on white */
.ticker-wrapper[data-fill] .ticker-btn { color: var(--ticker-ink); border-color: rgba(8, 38, 83, 0.4); }
.ticker-wrapper[data-fill] .ticker-btn:hover,
.ticker-wrapper[data-fill] .ticker-btn:focus-visible { background: #082653; border-color: #082653; color: #ffffff; }
.ticker-wrapper[data-fill] :focus-visible { outline-color: #082653; }
.ticker-wrapper[data-fill] .ticker-typography .ticker-item.is-typing::after,
.ticker-wrapper[data-fill].ticker-typography .ticker-item.is-typing::after { background: var(--ticker-ink); }
.ticker-wrapper[data-fill]:not(.is-ready) .ticker-list a { color: var(--ticker-ink); }

/* ---- Smaller screens ---- */
@media (max-width: 576px) {
  .ticker-wrapper { --ticker-h: 42px; font-size: 0.85rem; }
  .ticker-label { padding: 0 16px 0 12px; }
  .ticker-label span { display: none; }           /* icon only, more room for headlines */
  .ticker-btn { width: 30px; height: 30px; }
}

/* People who turned on "reduce motion" get still text */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .ticker-slide-left .ticker-item,
  .ticker-slide-up .ticker-item { transition: none; }
  .ticker-typography .ticker-item.is-typing::after { animation: none; }
}

/* Anti-spam honeypot (website_bot_check) used by the contact + newsletter
   forms. Moved off-screen rather than display:none, because some bots skip
   fields that are display:none. Hidden from screen readers via aria-hidden. */
.hp-field {
  position: absolute !important;
  left: -10000px !important;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   4. TOP CONTACT BAR
   -------------------------------------------------------------------------- */
.top-bar {
  background-color: var(--secondary-navy);
  color: #cbd5e1;
  font-size: 0.8rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.top-contact-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.top-contact-info a:hover {
  color: var(--accent-light-blue);
}

.top-contact-info i {
  color: var(--accent-yellow);
  margin-right: 4px;
}

.top-contact-info .divider {
  color: #475569;
}

.top-social-links {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-social-links a {
  color: #cbd5e1;
  font-size: 0.85rem;
}

.top-social-links a:hover {
  color: var(--accent-yellow);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   5. MAIN HEADER & DROPDOWN NAVIGATION
   -------------------------------------------------------------------------- */
.main-header {
  background-color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}

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

.logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary-navy);
  cursor: pointer;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links > li > a {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary-navy);
  padding: 6px 2px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
  color: var(--accent-blue);
}

.nav-links > li > a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2.5px;
  background-color: var(--accent-blue);
  border-radius: var(--radius-pill);
}

.dropdown {
  position: relative;
}

.dropdown-link i {
  font-size: 0.7rem;
  transition: transform 0.2s;
}

.dropdown:hover .dropdown-link i {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ffffff;
  min-width: 210px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.2s ease-in-out;
  border: 1px solid var(--border-light);
  z-index: 1100;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li a {
  display: block;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-dark);
}

.dropdown-menu li a:hover {
  background-color: #f1f5f9;
  color: var(--accent-blue);
  padding-left: 22px;
}

/* --------------------------------------------------------------------------
   6. PAGE HERO (used at the top of every page)
   -------------------------------------------------------------------------- */
.hero-section {
  background: linear-gradient(135deg, #021738 0%, #063168 50%, #042552 100%);
  color: var(--text-light);
  padding: 24px 0 60px 0;
  position: relative;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.4);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.pulsing-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-red);
  border-radius: 50%;
  animation: pulse 1.6s infinite;
}

/* Shared "live" pulse — also used by the radio and TV status dots */
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.hero-title {
  font-size: 3.2rem;
  font-weight: 900;
  line-height: 1.12;
  margin-bottom: 20px;
}

.highlight-yellow {
  color: var(--accent-gold);
}

.hero-subtext {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #e2e8f0;
  max-width: 580px;
}

/* --------------------------------------------------------------------------
   7. BUTTONS
   -------------------------------------------------------------------------- */
.view-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: transparent;
  color: var(--accent-blue);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(0, 112, 243, 0.3);
  transition: var(--transition);
}

.view-more-btn:hover {
  background-color: var(--accent-blue);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   8. NEWS / CONTENT CARDS (Home, News, Programs, Gallery, Advertise)
   -------------------------------------------------------------------------- */
/* Hidden by "Show more stories" (Local / International pages) */
.news-card[hidden] { display: none !important; }

/* "See more" / "Show more stories" row under a news grid */
.news-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
.news-more-wrap .view-more-btn { padding: 10px 22px; }
.news-more-wrap .view-more-btn:focus-visible,
.view-more-btn:focus-visible { outline: 3px solid var(--accent-gold); outline-offset: 3px; }

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

.news-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.news-img-box {
  height: 200px;
  overflow: hidden;
}

.news-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-img-box img {
  transform: scale(1.05);
}

.news-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-category {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
  align-self: flex-start;
}

.cat-tech   { background-color: #e0f2fe; color: #0284c7; }
.cat-siafa  { background-color: #fef3c7; color: #b45309; }
.cat-sports { background-color: #fee2e2; color: #b91c1c; }
.cat-politics { background-color: #f3e8ff; color: #7e22ce; } /* used on Home + News */

.news-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary-navy);
  line-height: 1.4;
  margin-bottom: 14px;
}

.news-meta {
  margin-top: auto;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   9. MASTER 4-COLUMN FOOTER
   -------------------------------------------------------------------------- */
.main-footer {
  background-color: var(--dark-navy);
  color: #94a3b8;
  padding-top: 55px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.3fr;
  gap: 36px;
  padding-bottom: 45px;
}

.brand-col .footer-logo {
  height: 180px;
  margin-bottom: 12px;
}

.brand-tagline {
  color: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
}

.sub-group {
  font-size: 0.82rem;
  color: #94a3b8;
  margin-top: 3px;
  margin-bottom: 20px;
}

.sub-group strong {
  color: #ffffff;
}

.app-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 170px;
}

.app-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.app-btn:hover {
  background: #1e293b;
  border-color: rgba(255, 255, 255, 0.5);
}

.app-btn i {
  font-size: 1.4rem;
}

.app-btn span {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.1;
}

.app-btn small {
  font-size: 0.62rem;
  font-weight: 400;
  color: #94a3b8;
}

.footer-heading {
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-links li {
  margin-bottom: 9px;
}

.footer-links a {
  font-size: 0.84rem;
  color: #94a3b8;
}

.footer-links a:hover {
  color: var(--accent-light-blue);
  padding-left: 4px;
}

.social-sub {
  font-size: 0.82rem;
  margin-bottom: 14px;
}

.social-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.hub-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.hub-pill:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

.hub-fb { background-color: #1877f2; }
.hub-ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.hub-x  { background-color: #000000; border: 1px solid #334155; }
.hub-yt { background-color: #ff0000; }
.hub-tk { background-color: #010101; border: 1px solid #334155; }
.hub-wa { background-color: #25d366; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0;
  font-size: 0.78rem;
  color: #64748b;
}

.footer-bottom-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   10. GLOBAL RESPONSIVE RULES & REDUCED MOTION
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* Shared content-card grid (.news-grid): 3 columns on desktop only.
   Tablet → 2 columns, small phone → 1 column, so cards never become
   skinny pillars. Pages refine it in their own file (news.css, programs.css…). */
@media (max-width: 991px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
  .news-grid > * { min-width: 0; }
}

/* Tablet, odd number of cards: centre the last one at the same card width
   instead of leaving a gap or stretching it across both columns. */
@media (min-width: 577px) and (max-width: 991px) {
  .news-grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
    width: calc((100% - 18px) / 2);
  }
}

@media (max-width: 576px) {
  .news-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
}

/* Page hero headings (TV, Radio, News, …): 3.2rem is wider than a small
   phone for long words like "Daily Comms", so scale down on mobile. */
@media (max-width: 768px) {
  .hero-title { font-size: clamp(1.8rem, 8vw, 2.6rem); }
  .hero-subtext { font-size: 0.92rem; }
}

/* --------------------------------------------------------------------------
   10a. TABLET & MOBILE HEADER (≤ 991px) — desktop (≥ 992px) is untouched.
   Breakpoint must match MOBILE_NAV_QUERY in js/global.js.
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {

  /* ---- Spec 1: Top utility bar — one line: address + icon-only links ---- */
  .top-bar { padding: 6px 0; }

  .top-bar-content {
    flex-wrap: nowrap;
    gap: 10px;
  }

  .top-contact-info {
    flex: 1 1 auto;
    min-width: 0;            /* lets the address shrink instead of wrapping */
    flex-wrap: nowrap;
    gap: 2px;
  }

  /* Address (first span): keep text, truncate with … if space runs out */
  .top-contact-info > span:first-child {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.74rem;
    margin-right: 6px;
  }

  .top-contact-info .divider { display: none; }

  /* Email & phone: icon only. font-size: 0 hides the label visually but
     screen readers still announce it, so no HTML change is needed per page. */
  .top-contact-info a,
  .top-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 24px;          /* WCAG 2.2 minimum target size */
    min-height: 24px;
  }
  .top-contact-info a { font-size: 0; }
  .top-contact-info a i { font-size: 0.85rem; margin-right: 0; }

  .top-social-links {
    flex: 0 0 auto;
    gap: 2px;
  }

  /* ---- Spec 2: Bar layout — hamburger LEFT, logo RIGHT ---- */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: -1;                /* move before the logo */
    width: 44px;
    height: 44px;
    margin-left: -10px;       /* optically align icon with container edge */
    border-radius: var(--radius-sm);
  }
  .nav-toggle:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
  }

  .logo img { height: 42px; }

  /* ---- Spec 2: Compact roll-down panel beneath the navbar ---- */
  .navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--primary-navy);
    box-shadow: var(--shadow-lg);
    max-height: 0;
    overflow: hidden;
    visibility: hidden;       /* closed links can't be tabbed to */
    transition: max-height 0.3s ease, visibility 0s linear 0.3s;
  }
  .navbar.active {
    max-height: min(70vh, 480px);   /* short panel, scrolls if needed */
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: visible;
    transition: max-height 0.3s ease;
  }

  .nav-links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px 0;
  }
  .nav-links > li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav-links > li:last-child { border-bottom: none; }

  /* Default link: pure white */
  .nav-links > li > a {
    color: #ffffff;
    padding: 11px 20px;
    justify-content: space-between;
  }

  /* Animate colour only. The global `a { transition: all }` would also
     animate visibility, leaving links tabbable briefly after the menu closes. */
  .nav-links a { transition: color 0.2s ease; }

  /* Active link: bright cyan text + solid yellow underline */
  .nav-links > li > a.active {
    color: var(--accent-cyan);
    text-decoration: underline;
    text-decoration-color: var(--accent-gold);
    text-decoration-thickness: 3px;
    text-underline-offset: 6px;
  }
  .nav-links > li > a.active::after { display: none; } /* replaces desktop bar */

  /* Sub-menus become an accordion inside the panel */
  .dropdown-menu {
    position: static;
    display: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: 0;
    padding: 0 0 6px;
    background: rgba(0, 0, 0, 0.18);
    border: none;
    border-radius: 0;
    box-shadow: none;
  }
  .dropdown.open > .dropdown-menu { display: block; }

  .dropdown-menu li a {
    color: #e2e8f0;
    padding: 9px 20px 9px 36px;
    font-size: 0.86rem;
  }
  .dropdown-menu li a:hover {
    background: transparent;
    padding-left: 36px;       /* cancel desktop slide-in */
  }

  .dropdown:hover .dropdown-link i { transform: none; }
  .dropdown.open .dropdown-link i { transform: rotate(180deg); }

  /* Hover: red text. Only on devices with a real pointer, so a tap on a
     phone doesn't leave a link "stuck" red. */
  @media (hover: hover) {
    .nav-links > li > a:hover,
    .dropdown-menu li a:hover {
      color: var(--accent-red-light);
    }
  }

  /* Keyboard focus: same red + visible outline */
  .nav-links a:focus-visible {
    color: var(--accent-red-light);
    outline: 2px solid var(--accent-gold);
    outline-offset: -2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pulsing-dot { animation: none; }
  .navbar,
  .navbar.active { transition: none; }
}
