/* =========================
   ISAA Theme (Brand Mode)
   India + South Africa colours, high contrast, modern & clean
   ========================= */

:root{
  /* India */
  --saffron: #ff9933;
  --india-green: #138808;
  --ashoka-blue: #1a5fb4;

  /* South Africa */
  --za-green: #007a4d;
  --za-yellow: #ffb612;
  --za-red: #de3831;
  --za-blue: #002395;
  --za-black: #111111;

  /* Default UI (Light fallback) */
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f3f8;
  --text: #0b1220;
  --muted: rgba(11,18,32,.70);
  --border: rgba(11,18,32,.10);

  --radius: 18px;
  --shadow: 0 14px 28px rgba(11,18,32,.10);
  --max: 1160px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;

  /* Theme mods injected by wp_add_inline_style:
     --isaa-header-h, --isaa-logo-h, --isaa-footer-cols */
}

/* =========================
   Brand Mode: Flag Light / Flag Dark
   ========================= */

.isaa-brand-light{
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f1f3f8;
  --text: #0b1220;
  --muted: rgba(11,18,32,.72);
  --border: rgba(11,18,32,.12);
  --shadow: 0 14px 28px rgba(11,18,32,.10);
}

.isaa-brand-dark{
  --bg: #0b1220;
  --surface: rgba(255,255,255,.06);
  --surface-2: rgba(255,255,255,.09);
  --text: #eef2ff;
  --muted: rgba(238,242,255,.72);
  --border: rgba(255,255,255,.12);
  --shadow: 0 18px 40px rgba(0,0,0,.25);
}

/* =========================
   Base
   ========================= */

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(900px 520px at 10% 0%, rgba(255,153,51,.18), transparent 60%),
    radial-gradient(900px 520px at 90% 0%, rgba(0,122,77,.18), transparent 60%),
    radial-gradient(900px 520px at 60% 90%, rgba(255,182,18,.14), transparent 60%),
    var(--bg);
  line-height:1.55;
}

a{ color:inherit; }
a:hover{ text-decoration:none; }

.container{
  width:min(var(--max), calc(100% - 32px));
  margin:0 auto;
}

/* Accessibility */
.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0);
  border:0;
}

/* =========================
   Flag top bar
   ========================= */

.topbar{
  display:grid;
  grid-template-columns:repeat(7,1fr);
  height:10px;
}
.topbar span{ display:block; }
.topbar__saffron{ background:var(--saffron); }
.topbar__white{ background:#fff; }
.topbar__green{ background:var(--india-green); }
.topbar__za-black{ background:var(--za-black); }
.topbar__za-yellow{ background:var(--za-yellow); }
.topbar__za-red{ background:var(--za-red); }
.topbar__za-blue{ background:var(--za-blue); }

/* =========================
   Header (single source of truth)
   ========================= */

.header{
  position:sticky;
  top:0;
  z-index:50;
  border-bottom:1px solid var(--border);
  backdrop-filter: blur(10px);
  padding:10px 0;
  background: rgba(255,255,255,.85);
}
.isaa-brand-dark .header{ background: rgba(11,18,32,.72); }

/* Sticky toggle via body class */
.isaa-header-static .header{
  position:relative;
  top:auto;
}

/* Header inner layout */
.header__inner{
  display:flex;
  align-items:center;
  gap:14px;
  min-height: var(--isaa-header-h, 64px);
}

/* Alignment driven by body classes */
.isaa-header-space-between .header__inner{ justify-content: space-between; }
.isaa-header-center .header__inner{ justify-content: center; }
.isaa-header-left .header__inner{ justify-content: flex-start; }

/* Brand */
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
}
.brand__mark{
  width:46px;
  height:46px;
  border-radius:14px;
  background:
    conic-gradient(from 180deg,
      var(--saffron),
      #ffffff,
      var(--india-green),
      var(--za-yellow),
      var(--za-red),
      var(--za-blue),
      var(--za-green));
  box-shadow: var(--shadow);
  border:1px solid rgba(0,0,0,.08);
}

/* Customizer-driven logo sizing */
.brand__logo img{
  max-height: var(--isaa-logo-h, 46px);
  width:auto;
  height:auto;
  display:block;
  border-radius:12px;
}

.brand__text{ line-height:1.1; }
.brand__name{ font-weight:900; letter-spacing:.2px; font-size:18px; }
.brand__tag{ font-size:12px; color:var(--muted); margin-top:2px; }

/* Desktop CTA (separate from nav) */
.header__cta{
  margin-left:auto;
  white-space:nowrap;
}

/* Burger button */
.nav__toggle{
  display:none;
  border:1px solid var(--border);
  background: var(--surface);
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
}
.burger{ width:20px; height:2px; background:var(--text); display:inline-block; position:relative; }
.burger::before,.burger::after{ content:""; position:absolute; left:0; width:20px; height:2px; background:var(--text); }
.burger::before{ top:-6px; }
.burger::after{ top:6px; }

/* Nav base */
.nav{
  display:flex;
  align-items:center;
  gap:12px;
}

/* Menu list reset + horizontal layout */
.nav__inner{
  list-style:none !important;
  margin:0 !important;
  padding:0 !important;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;           /* keep one line */
}
.nav__inner li{ margin:0 !important; padding:0 !important; }
.nav__inner a{
  font-size:14px;
  padding:10px 12px;
  border-radius:12px;
  text-decoration:none;
  display:inline-flex;
  white-space:nowrap;         /* keep labels one line */
  color: rgba(11,18,32,.88);
}
.isaa-brand-dark .nav__inner a{ color: rgba(238,242,255,.88); }

.nav__inner a:hover{ background: rgba(11,18,32,.06); }
.isaa-brand-dark .nav__inner a:hover{ background: rgba(255,255,255,.08); }

.nav__inner .current-menu-item > a,
.nav__inner a[aria-current="page"]{
  background: rgba(11,18,32,.07);
  border: 1px solid rgba(11,18,32,.08);
}
.isaa-brand-dark .nav__inner .current-menu-item > a,
.isaa-brand-dark .nav__inner a[aria-current="page"]{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.14);
}

/* CTA inside nav (mobile only) */
.nav__cta{ display:none; white-space:nowrap; }

/* Ensure you never see TWO CTAs on desktop */
@media (min-width: 921px){
  .nav__cta{ display:none !important; }
  .header__cta{ display:inline-flex !important; }
}

/* Mobile behavior */
@media (max-width: 920px){
  /* on mobile: show burger, hide desktop CTA, show CTA inside menu */
  .nav__toggle{ display:inline-flex; align-items:center; justify-content:center; }
  .header__cta{ display:none; }
  .nav__cta{
    display:inline-flex;
    margin-top:6px;
    width:100%;
    justify-content:center;
  }

  .nav{
    display:none;
    position:absolute;
    top: calc(var(--isaa-header-h, 64px) + 10px);
    left:16px;
    right:16px;
    padding:12px;
    border-radius:var(--radius);
    border:1px solid var(--border);
    background: var(--surface);
    box-shadow:var(--shadow);
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    z-index: 60;
  }
  .nav[data-open="true"]{ display:flex; }

  .nav__inner{
    flex-direction:column;
    align-items:stretch;
    gap:6px;
  }
  .nav__inner a{ justify-content:flex-start; width:100%; }
}

/* =========================
   Buttons
   ========================= */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 16px;
  border-radius:14px;
  border:1px solid transparent;
  font-weight:750;
  font-size:14px;
  cursor:pointer;
  text-decoration:none;
}
.btn--primary{
  background: linear-gradient(90deg, var(--saffron), var(--za-green));
  color:#0b1220;
  box-shadow: var(--shadow);
}
.btn--secondary{
  background: rgba(11,18,32,.06);
  border-color: rgba(11,18,32,.10);
}
.isaa-brand-dark .btn--secondary{
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.14);
  color: var(--text);
}
.btn--ghost{
  background: transparent;
  border-color: rgba(11,18,32,.18);
}
.isaa-brand-dark .btn--ghost{
  border-color: rgba(255,255,255,.22);
  color: var(--text);
}
.w-full{ width:100%; }

.pill{
  background:rgba(255,153,51,.14);
  border:1px solid rgba(255,153,51,.25);
}

/* =========================
   Hero + Banner Image (Customizer)
   ========================= */

.hero{ position:relative; padding:0 0 22px; }

.hero__media{
  width:100%;
  border-bottom:1px solid var(--border);
  background: var(--surface);
}
.hero__media img{
  width:100%;
  height: clamp(180px, 34vw, 420px);
  object-fit: cover;
  display:block;
}

.hero__grid{
  display:grid;
  grid-template-columns: 1.35fr .9fr;
  gap:22px;
  align-items:start;
  padding-top: 28px;
}

.eyebrow{
  display:inline-flex;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background: var(--surface);
  color:var(--muted);
  font-size:12px;
  margin:0 0 12px;
}

.lead{ margin:0 0 18px; color:var(--muted); font-size:16px; }

.hero h1{
  margin:0 0 12px;
  font-size: clamp(28px, 4vw, 48px);
  line-height:1.12;
  letter-spacing:-.6px;
  background: linear-gradient(90deg, var(--saffron), var(--za-green), var(--za-yellow));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.actions{ display:flex; gap:10px; flex-wrap:wrap; }

.trust{
  margin-top:18px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:10px;
}
.trust__item{
  padding:12px;
  border:1px solid var(--border);
  border-radius:16px;
  background: var(--surface);
  box-shadow: 0 8px 18px rgba(11,18,32,.06);
}
.isaa-brand-dark .trust__item{ box-shadow: 0 10px 22px rgba(0,0,0,.25); }
.trust__value{ font-weight:900; }
.trust__label{ font-size:12px; color:var(--muted); margin-top:2px; }

.hero__card .card{ position: sticky; top: 92px; }

@media (max-width: 920px){
  .hero__grid{ grid-template-columns:1fr; }
  .hero__card .card{ position:relative; top:auto; }
  .trust{ grid-template-columns:1fr; }
}

/* =========================
   Sections / Cards / Grids
   ========================= */

.section{ padding:26px 0; }
.section__head{ display:grid; gap:6px; margin-bottom:14px; }
.section__head h2{ margin:0; font-size:22px; }
.muted{ color:var(--muted); }

.card{
  border-radius: var(--radius);
  background: var(--surface);
  border:1px solid var(--border);
  box-shadow: var(--shadow);
  padding:18px;
}

.grid{ display:grid; gap:14px; }
.grid--3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--2{ grid-template-columns: repeat(2, minmax(0,1fr)); }

@media (max-width: 920px){
  .grid--3, .grid--2{ grid-template-columns:1fr; }
}

.feature h3{ margin:8px 0; }
.feature p{ margin:0; color:var(--muted); }
.feature__top{ display:flex; justify-content:space-between; align-items:center; }

/* Badges */
.badge{
  display:inline-flex;
  align-items:center;
  padding:7px 10px;
  border-radius:999px;
  font-size:12px;
  border:1px solid var(--border);
  background: var(--surface-2);
}
.badge--saffron{ background: rgba(255,153,51,.16); border-color: rgba(255,153,51,.26); }
.badge--green{ background: rgba(19,136,8,.14); border-color: rgba(19,136,8,.24); }
.badge--za{ background: rgba(0,122,77,.14); border-color: rgba(0,122,77,.24); }

/* Quick links (legacy blocks) */
.quick{ display:grid; gap:10px; margin-top:10px; }
.quick__link{
  display:grid;
  grid-template-columns: 42px 1fr;
  gap:10px;
  padding:12px;
  border-radius:16px;
  border:1px solid var(--border);
  background: var(--surface-2);
  text-decoration:none;
}
.quick__link:hover{ background: var(--surface); }
.quick__icon{
  width:42px; height:42px;
  display:grid; place-items:center;
  border-radius:14px;
  background: var(--surface);
  border:1px solid var(--border);
}

.divider{ height:1px; background: var(--border); margin:14px 0; }

/* Callout */
.section--callout{ padding:34px 0; }
.callout{
  border-radius: calc(var(--radius) + 6px);
  border:1px solid var(--border);
  background:
    radial-gradient(700px 260px at 15% 30%, rgba(255,153,51,.18), transparent 62%),
    radial-gradient(700px 260px at 85% 70%, rgba(0,122,77,.18), transparent 62%),
    var(--surface);
  padding:18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.callout__content h2{ margin:0 0 6px; }
.callout__actions{ display:flex; gap:10px; flex-wrap:wrap; }
@media (max-width: 920px){
  .callout{ flex-direction:column; align-items:flex-start; }
}

/* =========================
   Footer
   ========================= */

.footer{
  border-top:1px solid var(--border);
  padding:24px 0 18px;
  margin-top:24px;
  background: rgba(255,255,255,.70);
}
.isaa-brand-dark .footer{ background: rgba(255,255,255,.04); }

.footer__grid{
  display:grid;
  grid-template-columns: repeat(var(--isaa-footer-cols, 3), minmax(0, 1fr));
  gap:18px;
}

.footer__brand{ font-weight:900; font-size:18px; margin-bottom:8px; }
.footer h3{ margin:0 0 8px; font-size:14px; }

.footer__menu,
.footer ul{
  list-style:none;
  padding:0;
  margin:0;
  display:grid;
  gap:8px;
}
.footer a{ color: rgba(11,18,32,.85); text-decoration:none; }
.isaa-brand-dark .footer a{ color: rgba(238,242,255,.86); }
.footer a:hover{ text-decoration:underline; }

.footer__bottom{
  border-top:1px solid var(--border);
  margin-top:16px;
  padding-top:12px;
  color: rgba(11,18,32,.65);
}
.isaa-brand-dark .footer__bottom{ color: rgba(238,242,255,.65); }

@media (max-width: 920px){
  .footer__grid{ grid-template-columns:1fr; }
}

/* =========================
   Gutenberg block content spacing within .content wrapper
   ========================= */

.content > *{ margin-top: 0; }
.content .wp-block-columns{ gap: 14px; }
.content .wp-block-buttons{ margin-top: 14px; }
.content .wp-block-image img{ border-radius: 16px; border: 1px solid var(--border); }
.content p, .content li{ color: rgba(11,18,32,.78); }
.isaa-brand-dark .content p, .isaa-brand-dark .content li{ color: rgba(238,242,255,.78); }
