/* ============================================================
   InPoints News - Shared Stylesheet
   Pure CSS, mobile-first, fully responsive
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Roboto+Slab:wght@700;800&display=swap');

/* ---------- Design Tokens ---------- */
:root {
  /* Colors */
  --red: #D72B2B;
  --red-dark: #b71f1f;
  --navy: #0A1628;
  --white: #FFFFFF;
  --black: #0D0D0D;
  --gray-light: #F4F4F4;
  --gray-placeholder: #CBD5E1;
  --gold: #FFD700;
  --red-tint: #FFF0F0;
  --border: #e4e7ec;
  --text-muted: #6b7280;

  /* Category badge colors */
  --cat-politics: #D72B2B;
  --cat-tech: #2563eb;
  --cat-sports: #16a34a;
  --cat-business: #d97706;
  --cat-entertainment: #9333ea;
  --cat-world: #0891b2;
  --cat-health: #db2777;
  --cat-science: #4f46e5;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-brand: 'Roboto Slab', Georgia, serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.5rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.75rem;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;

  /* Radius */
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(10,22,40,0.08);
  --shadow: 0 4px 16px rgba(10,22,40,0.1);
  --shadow-lg: 0 12px 32px rgba(10,22,40,0.16);

  /* Layout */
  --header-h: 76px;
  --header-h-scrolled: 58px;
  --container: 1200px;
  --transition: 0.25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Match html background to footer so no white gap shows under short pages */
html { scroll-behavior: smooth; background: var(--navy); min-height: 100%; }

/* Sticky-footer layout: body fills the viewport so the footer hugs the bottom */
body { min-height: 100vh; display: flex; flex-direction: column; }
body > footer { margin-top: auto; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  opacity: 0;
  transition: opacity 0.6s ease;
}
body.loaded { opacity: 1; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; }
input, select, textarea { font-family: inherit; font-size: var(--fs-base); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-4);
}

/* Accessibility focus states */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(215,43,43,0.4);
  outline-offset: 2px;
}

/* ============================================================
   PRELOADER
   ============================================================ */
#preloader {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 40%, #ffffff 0%, #fafbfc 55%, #f1f3f6 100%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-5);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#preloader.hidden { opacity: 0; visibility: hidden; }
.preloader-logo {
  width: min(280px, 60vw);
  animation: logoReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) both,
             logoGlow 2.2s ease-in-out 0.9s infinite;
  will-change: transform, filter, opacity;
}
.preloader-logo img { width: 100%; height: auto; display: block; }
@keyframes logoReveal {
  0%   { opacity: 0; transform: scale(0.82) translateY(8px); filter: blur(6px); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}
@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(215,43,43,0)); transform: scale(1); }
  50%      { filter: drop-shadow(0 6px 22px rgba(215,43,43,0.28)); transform: scale(1.03); }
}
/* Loading bar */
.preloader-bar {
  width: min(220px, 50vw);
  height: 4px;
  border-radius: var(--radius-pill);
  background: rgba(10,22,40,0.08);
  overflow: hidden;
  position: relative;
}
.preloader-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  width: 40%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--red), #ff6b6b);
  animation: barSlide 1.1s ease-in-out infinite;
}
@keyframes barSlide {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 800;
  background: rgba(255,255,255,0.85);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
          backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition), background var(--transition);
}
.site-header.scrolled {
  box-shadow: var(--shadow);
  background: rgba(255,255,255,0.92);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
  transition: height var(--transition);
}
.site-header.scrolled .header-inner { height: var(--header-h-scrolled); }

.brand {
  font-family: var(--font-brand);
  font-weight: 800;
  font-size: var(--fs-xl);
  letter-spacing: -0.5px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}
.brand .in { color: var(--red); }
.brand .points { color: var(--navy); }
/* Image logo (header) */
.brand img {
  height: 40px;
  width: auto;
  display: block;
  transition: height var(--transition), transform var(--transition);
}
.brand:hover img { transform: scale(1.03); }
.site-header.scrolled .brand img { height: 32px; }
/* Footer logo sits on a light chip so it reads on navy */
.footer-logo {
  display: inline-block;
  background: var(--white);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius);
  margin-bottom: var(--sp-4);
}
.footer-logo img { height: 38px; width: auto; display: block; }

.main-nav ul { display: flex; gap: var(--sp-6); }
.main-nav a {
  font-weight: 600;
  font-size: var(--fs-sm);
  color: var(--navy);
  position: relative;
  padding: var(--sp-2) 0;
  transition: color var(--transition);
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--red);
  transition: width var(--transition);
}
.main-nav a:hover, .main-nav a.active { color: var(--red); }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: var(--sp-4); }
.icon-btn {
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  padding: var(--sp-2);
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.icon-btn:hover { color: var(--red); background: var(--gray-light); }
.icon-btn svg { width: 22px; height: 22px; }

.btn-signin {
  border: 2px solid var(--navy);
  color: var(--navy);
  background: transparent;
  padding: var(--sp-2) var(--sp-5);
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--fs-sm);
  transition: all var(--transition);
}
.btn-signin:hover { background: var(--navy); color: var(--white); transform: scale(1.03); }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: var(--sp-2);
}
.hamburger span {
  width: 26px; height: 3px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  transform: translateY(-120%);
  transition: transform 0.35s ease;
  z-index: 790;
  padding: var(--sp-4);
}
.mobile-drawer.open { transform: translateY(0); }
.mobile-drawer ul { display: flex; flex-direction: column; }
.mobile-drawer a {
  display: block;
  padding: var(--sp-4) var(--sp-2);
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}
.mobile-drawer a:hover { color: var(--red); }
.mobile-drawer .btn-signin { margin-top: var(--sp-4); width: 100%; }

/* ============================================================
   BREAKING NEWS STRIP
   ============================================================ */
.breaking {
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: stretch;
  overflow: hidden;
}
.breaking-badge {
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
  font-size: var(--fs-xs);
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  padding: var(--sp-3) var(--sp-5);
  white-space: nowrap;
  flex-shrink: 0;
}
.breaking-track {
  overflow: hidden;
  display: flex;
  align-items: center;
  flex: 1;
}
.breaking-marquee {
  display: flex;
  white-space: nowrap;
  animation: marquee 30s linear infinite;
}
.breaking-marquee span {
  font-weight: 600;
  font-size: var(--fs-sm);
  padding: var(--sp-3) var(--sp-5);
}
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================================
   PLACEHOLDERS (image / video)
   ============================================================ */
.placeholder {
  background: var(--gray-placeholder);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-1);
  color: #64748b;
  border-radius: var(--radius);
  width: 100%;
}
.placeholder .ph-icon { font-size: 2rem; line-height: 1; }
.placeholder .ph-label { font-size: var(--fs-xs); font-weight: 500; }
.placeholder.ratio-16x9 { aspect-ratio: 16 / 9; }
.placeholder.ratio-1x1 { aspect-ratio: 1 / 1; }

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
section { padding: var(--sp-7) 0; }
.section-title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  color: var(--navy);
  margin-bottom: var(--sp-5);
  letter-spacing: -0.5px;
}
.section-title.accent {
  border-left: 4px solid var(--red);
  padding-left: var(--sp-4);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-weight: 600;
  border-radius: var(--radius-pill);
  padding: var(--sp-3) var(--sp-5);
  transition: transform var(--transition), background var(--transition);
}
.btn-red {
  background: var(--red);
  color: var(--white);
}
.btn-red:hover { background: var(--red-dark); transform: scale(1.03); }
.btn-block { width: 100%; }

/* ============================================================
   HERO SEARCH (homepage)
   ============================================================ */
.search-hero { padding: var(--sp-7) 0 var(--sp-5); }
.search-box {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-5);
  box-shadow: var(--shadow);
  max-width: 720px;
  margin: 0 auto;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-box:focus-within {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(215,43,43,0.18);
}
.search-box input {
  flex: 1;
  border: none;
  outline: none;
  background: none;
  padding: var(--sp-3) 0;
}
.search-box .btn-red { flex-shrink: 0; padding: var(--sp-3) var(--sp-5); }

/* ============================================================
   CATEGORY CAROUSEL
   ============================================================ */
/* Infinite auto-scrolling marquee carousel (no arrows, no dots, no edge fade) */
.carousel-wrap {
  position: relative;
  overflow: hidden;
  padding: var(--sp-2) 0;
}
.carousel-track {
  display: flex;
  gap: var(--sp-5);
  width: max-content;
  animation: catScroll 45s linear infinite;
  will-change: transform;
}
/* Pause on hover for usability */
.carousel-wrap:hover .carousel-track { animation-play-state: paused; }
@keyframes catScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.cat-card {
  flex: 0 0 260px;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.cat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 34px rgba(10,22,40,0.22), 0 0 0 2px rgba(215,43,43,0.25);
}
.cat-card .card-media { aspect-ratio: 16 / 9; }
.cat-card .cat-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--sp-6) var(--sp-4) var(--sp-3);
  background: linear-gradient(to top, rgba(10,22,40,0.88), rgba(10,22,40,0.1) 70%, transparent);
  color: var(--white);
  font-weight: 700;
  font-size: var(--fs-lg);
  z-index: 2;
}

/* ============================================================
   NEWS CARDS / GRID
   ============================================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}
.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.news-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.news-card .placeholder { aspect-ratio: 16 / 9; border-radius: 0; }

/* Reusable media wrapper with zoom-on-hover (cards + categories) */
.card-media {
  width: 100%;
  overflow: hidden;
  background: var(--gray-placeholder);
}
.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.news-card .card-media { aspect-ratio: 16 / 9; }
.news-card:hover .card-media img,
.cat-card:hover .card-media img,
.trend-card:hover .card-media img { transform: scale(1.08); }
.news-card-body {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: var(--sp-3);
}
.cat-badge {
  align-self: flex-start;
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--white);
  background: var(--red);
  padding: 3px var(--sp-3);
  border-radius: var(--radius-pill);
}
.cat-badge.tech { background: var(--cat-tech); }
.cat-badge.sports { background: var(--cat-sports); }
.cat-badge.politics { background: var(--cat-politics); }
.cat-badge.business { background: var(--cat-business); }
.cat-badge.entertainment { background: var(--cat-entertainment); }
.cat-badge.world { background: var(--cat-world); }
.cat-badge.health { background: var(--cat-health); }
.cat-badge.science { background: var(--cat-science); }

.news-card h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card p.desc {
  font-size: var(--fs-sm);
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: auto;
}
/* Text-based "Read More" link, pinned bottom-right of the card */
.read-more {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: var(--sp-3);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--red);
  transition: color var(--transition), gap var(--transition);
}
.read-more:hover { color: var(--red-dark); text-decoration: underline; text-underline-offset: 3px; gap: 8px; }

/* ============================================================
   TRENDING ROW
   ============================================================ */
.trending-row {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  padding-bottom: var(--sp-3);
  scrollbar-width: none;
}
.trending-row::-webkit-scrollbar { display: none; }
.trend-card {
  flex: 0 0 260px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
}
.trend-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.trend-card .placeholder { aspect-ratio: 16 / 9; border-radius: 0; }
.trend-card .card-media { aspect-ratio: 16 / 9; }
.trend-card-body { padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-2); }
.trend-card h4 {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================================
   NEWSLETTER BAND
   ============================================================ */
.newsletter {
  background: var(--red-tint);
  text-align: center;
}
.newsletter h2 { font-size: var(--fs-2xl); color: var(--navy); font-weight: 800; }
.newsletter p { color: var(--text-muted); margin: var(--sp-3) 0 var(--sp-5); }
.newsletter-form {
  display: flex;
  gap: var(--sp-3);
  max-width: 520px;
  margin: 0 auto;
}
.newsletter-form input {
  flex: 1;
  padding: var(--sp-3) var(--sp-5);
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.newsletter-form input:focus { border-color: var(--red); box-shadow: 0 0 0 4px rgba(215,43,43,0.15); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.8);
  padding-top: var(--sp-7);
}
.footer-cols {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--sp-6);
  padding-bottom: var(--sp-6);
}
.footer-cols h4 {
  color: var(--white);
  font-size: var(--fs-base);
  font-weight: 700;
  margin-bottom: var(--sp-4);
}
.footer-cols .brand { font-size: var(--fs-xl); margin-bottom: var(--sp-3); }
.footer-cols .brand .points { color: var(--white); }
.footer-cols p { font-size: var(--fs-sm); line-height: 1.7; }
.footer-cols ul li { margin-bottom: var(--sp-2); }
.footer-cols ul a {
  font-size: var(--fs-sm);
  position: relative;
  transition: color var(--transition);
}
.footer-cols ul a:hover { color: var(--red); }
.social-icons { display: flex; gap: var(--sp-3); }
.social-icons a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
.social-icons a:hover { background: var(--red); transform: translateY(-3px); }
.social-icons svg { width: 18px; height: 18px; fill: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding: var(--sp-4) 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--sp-3);
  font-size: var(--fs-sm);
}
.footer-bottom .assistant-link { color: var(--red); font-weight: 700; transition: color var(--transition); }
.footer-bottom .assistant-link:hover { color: var(--gold); }

/* ============================================================
   BOTTOM NAV (mobile)
   ============================================================ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 12px rgba(10,22,40,0.08);
  z-index: 850;
}
.bottom-nav a {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--sp-2) 0;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--transition);
}
.bottom-nav a svg { width: 22px; height: 22px; }
.bottom-nav a.active, .bottom-nav a:hover { color: var(--red); }

/* ============================================================
   WHATSAPP POPUP
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,22,40,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
  z-index: 950;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-card {
  background: var(--white);
  border-top: 4px solid var(--red);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: 100%;
  padding: var(--sp-6);
  position: relative;
  transform: scale(0.85);
  transition: transform 0.3s ease;
}
.modal-overlay.open .modal-card { transform: scale(1); }
.modal-close {
  position: absolute;
  top: var(--sp-3); right: var(--sp-3);
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover { background: var(--gray-light); color: var(--red); }
.modal-card h3 { font-size: var(--fs-xl); color: var(--navy); font-weight: 800; margin-bottom: var(--sp-2); }
.modal-card p { color: var(--text-muted); font-size: var(--fs-sm); margin-bottom: var(--sp-5); }
.modal-card input {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  margin-bottom: var(--sp-4);
  transition: border-color var(--transition);
}
.modal-card input:focus { border-color: var(--red); }

/* ============================================================
   ARTICLE PAGE
   ============================================================ */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 600;
  color: var(--navy);
  margin: var(--sp-5) 0;
  transition: color var(--transition);
}
.back-link:hover { color: var(--red); }
.article-wrap { max-width: 800px; margin: 0 auto; }
.article-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 500px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-placeholder);
  box-shadow: var(--shadow-sm);
}
.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.article-hero:hover img { transform: scale(1.03); }
.article-title {
  font-size: var(--fs-3xl);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  margin: var(--sp-4) 0;
  letter-spacing: -1px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-4);
}
.article-meta span:not(:last-child)::after { content: '|'; margin-left: var(--sp-2); color: var(--border); }
.divider { border: none; border-top: 1px solid var(--border); margin: var(--sp-5) 0; }
.article-body p { margin-bottom: var(--sp-5); color: #1f2937; }
.pull-quote {
  border-left: 6px solid var(--red);
  background: var(--gray-light);
  padding: var(--sp-5);
  font-style: italic;
  font-size: var(--fs-xl);
  color: var(--navy);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: var(--sp-6) 0;
  line-height: 1.4;
}
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); margin: var(--sp-6) 0; }
.tags .tags-label { font-weight: 700; color: var(--navy); }
.tag-pill {
  background: var(--gray-light);
  color: var(--navy);
  font-size: var(--fs-sm);
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--radius-pill);
  transition: background var(--transition), color var(--transition);
}
.tag-pill:hover { background: var(--red); color: var(--white); }

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.page-hero {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
}
.page-hero h1 { font-size: var(--fs-3xl); font-weight: 800; letter-spacing: -1px; }
.page-hero p { color: rgba(255,255,255,0.8); max-width: 640px; margin: var(--sp-4) auto 0; }
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  align-items: center;
}
.two-col h2 { font-size: var(--fs-2xl); color: var(--navy); font-weight: 800; margin-bottom: var(--sp-4); }
.two-col p { color: #374151; }
.two-col .placeholder { aspect-ratio: 4/3; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-6);
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.feature-card .emoji { font-size: 2.5rem; }
.feature-card h3 { color: var(--navy); font-size: var(--fs-lg); margin: var(--sp-3) 0 var(--sp-2); }
.feature-card p { color: var(--text-muted); font-size: var(--fs-sm); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-5);
}
.team-card {
  text-align: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-5);
  transition: transform var(--transition), box-shadow var(--transition);
}
.team-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.team-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  background: var(--gray-placeholder);
  margin: 0 auto var(--sp-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.team-card h3 { color: var(--navy); font-size: var(--fs-lg); }
.team-card .role { color: var(--red); font-weight: 600; font-size: var(--fs-sm); margin-bottom: var(--sp-2); }
.team-card .bio { color: var(--text-muted); font-size: var(--fs-sm); }


/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-head { text-align: center; }
.contact-head h1 { font-size: var(--fs-3xl); color: var(--navy); font-weight: 800; }
.contact-head p { color: var(--text-muted); margin-top: var(--sp-2); }
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: var(--sp-6);
  align-items: start;
}
.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-6);
  box-shadow: var(--shadow-sm);
}
.form-group { margin-bottom: var(--sp-4); }
.form-group label { display: block; font-weight: 600; font-size: var(--fs-sm); color: var(--navy); margin-bottom: var(--sp-2); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 4px rgba(215,43,43,0.15);
}
.form-group textarea { resize: vertical; }
.error-msg { color: var(--red); font-size: var(--fs-xs); margin-top: var(--sp-1); display: none; }
.form-group.invalid .error-msg { display: block; }
.form-group.invalid input, .form-group.invalid select, .form-group.invalid textarea { border-color: var(--red); }

.success-card {
  display: none;
  background: #ecfdf5;
  border: 2px solid #34d399;
  color: #065f46;
  border-radius: var(--radius);
  padding: var(--sp-7);
  text-align: center;
  font-size: var(--fs-lg);
  font-weight: 600;
  animation: fadeScale 0.4s ease;
}
.success-card.show { display: block; }
@keyframes fadeScale {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.info-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
  transition: transform var(--transition), box-shadow var(--transition);
}
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.info-card .emoji { font-size: 1.8rem; }
.info-card h3 { color: var(--navy); font-size: var(--fs-base); }
.info-card p { color: var(--text-muted); font-size: var(--fs-sm); }

/* ============================================================
   ASSISTANT PAGE
   ============================================================ */
.assistant-head { text-align: center; margin-bottom: var(--sp-5); }
.assistant-head h1 {
  font-size: var(--fs-2xl);
  color: var(--navy);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
}
.assistant-head p { color: var(--text-muted); margin-top: var(--sp-2); }
.chat-card {
  max-width: 680px;
  margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 560px;
  overflow: hidden;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.msg { display: flex; gap: var(--sp-3); max-width: 80%; align-items: flex-end; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg.bot { align-self: flex-start; }
.bot-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.bubble {
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-lg);
  font-size: var(--fs-sm);
  line-height: 1.5;
}
.msg.user .bubble {
  background: var(--red);
  color: var(--white);
  border-bottom-right-radius: var(--sp-1);
  animation: slideInRight 0.3s ease;
}
.msg.bot .bubble {
  background: var(--gray-light);
  color: var(--black);
  border-bottom-left-radius: var(--sp-1);
  animation: slideInLeft 0.3s ease;
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}
.typing { display: flex; gap: 4px; padding: var(--sp-3) var(--sp-4); }
.typing span {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: bounce 1s infinite;
}
.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-6px); opacity: 1; }
}
.chat-input-bar {
  display: flex;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border-top: 1px solid var(--border);
}
.chat-input-bar input {
  flex: 1;
  padding: var(--sp-3) var(--sp-4);
  border: 2px solid var(--border);
  border-radius: var(--radius-pill);
  outline: none;
  transition: border-color var(--transition);
}
.chat-input-bar input:focus { border-color: var(--red); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --fs-3xl: 2rem; --fs-2xl: 1.6rem; }
  .main-nav, .header-actions .icon-btn, .header-actions .btn-signin { display: none; }
  .hamburger { display: flex; }
  .header-actions { gap: var(--sp-2); }
  .bottom-nav { display: flex; }
  body { padding-bottom: 64px; }
  .mobile-drawer { display: block; }

  .news-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .map-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .footer-cols { grid-template-columns: 1fr; gap: var(--sp-5); }
  .footer-bottom { flex-direction: column; text-align: center; }
  .article-hero { max-height: 280px; }
  .search-box { flex-wrap: nowrap; }
}

@media (min-width: 769px) {
  .mobile-drawer { display: none !important; }
}

@media (max-width: 480px) {
  .cat-card { flex: 0 0 220px; }
  .brand img { height: 34px; }
}

/* ============================================================
   PREMIUM POLISH — float accent + motion/perf safeguards
   ============================================================ */
/* Subtle floating effect on feature emojis (about page) */
.feature-card .emoji {
  display: inline-block;
  animation: floaty 4s ease-in-out infinite;
}
.feature-card:nth-child(even) .emoji { animation-delay: 0.8s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* Render-perf hint for animated images */
.card-media img { backface-visibility: hidden; }

/* ============================================================
   ICON SYSTEM (inline Lucide-style SVGs, no external CDN)
   ============================================================ */
svg.icon {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
/* Placeholder media icon */
.placeholder .ph-icon svg { width: 34px; height: 34px; stroke: #64748b; }
/* Section-title inline icon (e.g. Trending) */
.section-title .title-icon {
  width: 1em; height: 1em;
  stroke: var(--red);
  margin-right: 0.4rem;
  vertical-align: -3px;
}
/* Feature cards (about) — circular tinted icon badge */
.feature-card .emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px; height: 72px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--red-tint);
  color: var(--red);
}
.feature-card .emoji svg { width: 34px; height: 34px; stroke: var(--red); }
/* Team avatar icon */
.team-avatar svg { width: 44px; height: 44px; stroke: var(--navy); }
/* Contact info card icon badge */
.info-card .emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: var(--radius);
  background: var(--red-tint);
  color: var(--red);
  flex-shrink: 0;
}
.info-card .emoji svg { width: 24px; height: 24px; stroke: var(--red); }
/* Assistant heading + bot avatar */
.assistant-head h1 .title-icon { width: 30px; height: 30px; stroke: var(--red); }
.bot-avatar svg { width: 18px; height: 18px; stroke: var(--white); }
/* Read-more arrow icon */
.read-more svg { width: 16px; height: 16px; }

/* ============================================================
   CONTACT MAP / OFFICE SECTION
   ============================================================ */
.map-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--sp-6);
  align-items: stretch;
}
.map-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  min-height: 380px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.map-frame:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.map-frame iframe { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; }
/* Glassmorphism office details card */
.office-card {
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  background: linear-gradient(145deg, rgba(255,255,255,0.85), rgba(244,244,244,0.7));
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  transition: transform var(--transition), box-shadow var(--transition);
}
.office-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.office-card h3 { color: var(--navy); font-size: var(--fs-xl); font-weight: 800; }
.office-item { display: flex; gap: var(--sp-3); align-items: flex-start; }
.office-item .emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: var(--radius);
  background: var(--red-tint);
  color: var(--red);
  flex-shrink: 0;
}
.office-item .emoji svg { width: 22px; height: 22px; stroke: var(--red); }
.office-item .office-label { font-size: var(--fs-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.office-item .office-value { color: var(--navy); font-weight: 600; }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .carousel-track { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
