/* ════════════════════════════════════════════════════════════
   SPIT — New Header (Tier 1 utility + Tier 2 identity)
   Loaded after style.css and the colour stylesheet.
   The mega menu plugin renders #nav below this, untouched.
════════════════════════════════════════════════════════════ */

:root {
  --spit-maroon-900:#3a0e0e;
  --spit-maroon-800:#5a1515;
  --spit-maroon-700:#6b1a1a;
  --spit-maroon-600:#8b2525;
  --spit-maroon-50:#fdf5f5;
  --spit-gold-600:#a06a1a;
  --spit-gold-500:#c18c3c;
  --spit-gold-400:#d4a048;
  --spit-gold-300:#e8b84b;
  --spit-n-700:#2d2a2a;
  --spit-n-400:#8a8484;
  --spit-n-200:#e5e0e0;
  --spit-wrap:1800px;
  --spit-pad:36px;
}

/* Neutralise legacy #header rules from style.css.
   "#header a { color:#eee; text-align:center; font-size:11px }" leaks into
   everything below — reset it before our own rules run. */
#header { height:auto !important; padding:0 !important; }
#header a { color:inherit; text-align:left; font-size:inherit; }
#header .spit-brand,
#header .spit-brand-text,
#header .spit-brand-parent,
#header .spit-brand-name,
#header .spit-brand-affil { text-align:left; }
#header #logo { float:none; margin:0; }
#header #search-links { float:none; width:auto; height:auto; margin:0; }
#header #links, #header #social-links { margin:0; }

.spit-wrap {
  max-width:var(--spit-wrap);
  margin:0 auto;
  padding:0 var(--spit-pad);
  width:100%;
  box-sizing:border-box;
}
/* Legacy "* { padding:0; margin:0 }" has no box-sizing — set it for our subtree */
.spit-identity * { box-sizing:border-box; }

/* ── TIER 2 — IDENTITY BAND ──────────────────────────────── */
.spit-identity { background:#fff; }
.spit-identity .spit-wrap {
  display:flex; align-items:center; gap:24px;
  min-height:104px; padding-top:14px; padding-bottom:14px;
}

.spit-brand {
  display:flex; align-items:center; gap:20px;
  text-decoration:none; min-width:0; flex-shrink:1;
}
.spit-brand-text { min-width:0; }
.spit-brand { flex-shrink:0; }
.spit-brand img {
  width:72px; height:72px; object-fit:contain; flex-shrink:0;
  border:0; margin:0; float:none;
}
.spit-brand-rule {
  width:1px; height:62px; align-self:center; flex-shrink:0;
  background:linear-gradient(to bottom,transparent,var(--spit-gold-500),transparent);
  opacity:.45;
}
.spit-brand-parent {
  font-family:'DM Sans',system-ui,-apple-system,sans-serif;
  font-size:11px; font-weight:500;
  color:var(--spit-gold-600); letter-spacing:1.4px; text-transform:uppercase;
  display:block; margin-bottom:4px; line-height:1;
}
.spit-brand-name {
  font-family:'Spectral','Georgia',serif;
  font-weight:600; font-size:25px;
  color:var(--spit-maroon-700); display:block; line-height:1.2;
  letter-spacing:-.005em; white-space:nowrap;
}
.spit-brand-affil {
  font-size:10px; color:var(--spit-n-400); letter-spacing:.7px;
  text-transform:uppercase; display:block; margin-top:5px;
}

.spit-id-spacer { flex:1; }

/* Right cluster — accreditation over search */
.spit-id-right {
  display:flex; flex-direction:column; align-items:flex-end;
  gap:9px; flex-shrink:0;
}
.spit-accred { display:flex; align-items:center; }
#header .spit-accred a {
  font-size:10px; font-weight:700; letter-spacing:1.6px; text-transform:uppercase;
  color:#6f6a6a; padding:0 11px; text-decoration:none; text-align:center;
  border-right:1px solid var(--spit-n-200); line-height:1; transition:color .2s;
}
#header .spit-accred a:last-child { padding-right:0; border-right:none; }
#header .spit-accred a:hover { color:var(--spit-maroon-700); }
#header .spit-accred a.hl { color:var(--spit-maroon-700); font-weight:700; }

.spit-motto {
  text-align:left; flex-shrink:0;
  padding-left:26px; border-left:1px solid var(--spit-n-200);
}
.spit-motto-deva {
  display:block; font-size:13px; color:rgba(107,26,26,.5);
  letter-spacing:.3px; line-height:1.5;
}
.spit-motto-en {
  display:block; font-family:'DM Sans',system-ui,sans-serif;
  font-size:12.5px; color:var(--spit-gold-600); letter-spacing:.1px; margin-top:3px;
}

.spit-id-actions { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.spit-btn {
  font-size:12px; font-weight:600; letter-spacing:.5px; text-decoration:none;
  border-radius:6px; padding:10px 20px; display:inline-flex; align-items:center;
  transition:background .2s, border-color .2s, box-shadow .2s; white-space:nowrap;
}
.spit-btn-outline {
  color:var(--spit-maroon-700); background:transparent;
  border:1.5px solid rgba(107,26,26,.32);
}
.spit-btn-outline:hover { background:var(--spit-maroon-50); border-color:var(--spit-maroon-700); }
.spit-btn-primary {
  background:var(--spit-maroon-700); color:#fff;
  border:1.5px solid var(--spit-maroon-700);
}
.spit-btn-primary:hover { background:var(--spit-maroon-600); box-shadow:0 4px 14px rgba(107,26,26,.28); }

/* Search sits inside the identity band.
   Specificity must beat legacy "#header input#s" rules in style.css. */
#header .spit-id-search { display:flex; align-items:center; flex-shrink:0; }
#header .spit-id-search #search,
#header .spit-id-search #searchform,
#header .spit-id-search #searchform > div {
  margin:0; padding:0; display:flex; align-items:center;
}
#header .spit-id-search input#s {
  border:1px solid var(--spit-n-200); border-right:none;
  border-radius:5px 0 0 5px; background:#fafafa;
  padding:0 12px; font-size:12.5px; font-family:inherit;
  width:150px; height:34px; line-height:34px; outline:none;
  color:var(--spit-n-700); float:none; margin:0;
  transition:border-color .2s, background .2s; box-sizing:border-box;
}
#header .spit-id-search input#s:focus { border-color:var(--spit-maroon-700); background:#fff; }
#header .spit-id-search input#searchsubmit {
  border:1px solid var(--spit-maroon-700); background:var(--spit-maroon-700);
  color:#fff; border-radius:0 5px 5px 0;
  padding:0 16px; width:auto; height:34px; line-height:1;
  font-size:11px; font-weight:700; letter-spacing:1px;
  cursor:pointer; font-family:inherit; margin:0; float:none;
  transition:background .2s; box-sizing:border-box;
}
#header .spit-id-search input#searchsubmit:hover { background:var(--spit-maroon-600); }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width:1360px) {
  .spit-brand-name { font-size:19px; }
  .spit-motto-en { font-size:13px; }
  .spit-motto-deva { font-size:12px; }
}
@media (max-width:1290px) {
  .spit-motto { display:none; }
  .spit-accred a { padding:0 8px; letter-spacing:1.2px; }
  .spit-brand-name { font-size:18px; }
  .spit-id-search input#s, #header .spit-id-search input#s { width:120px; }
}
@media (max-width:1040px) {
  .spit-brand-affil { display:none; }
  .spit-accred { display:none; }
  .spit-btn { padding:9px 14px; font-size:11.5px; }
}
@media (max-width:1000px) {
  .spit-motto { display:none; }
  .spit-identity .spit-wrap { min-height:auto; }
}
@media (max-width:900px) {
  :root { --spit-pad:20px; }
}
@media (max-width:860px) {

  .spit-identity .spit-wrap { flex-wrap:wrap; gap:14px; }
  .spit-id-right { width:100%; align-items:stretch; }
  .spit-accred { display:flex; flex-wrap:wrap; justify-content:flex-start; }
  .spit-accred a { padding:0 9px 0 0; border-right:none; }
  .spit-brand { gap:12px; }
  .spit-brand img { width:50px; height:50px; }
  .spit-brand-rule { display:none; }
  .spit-brand-text { min-width:0; }
.spit-brand { flex-shrink:0; }
  .spit-brand-parent { font-size:11px; }
  .spit-brand-name { font-size:15.5px; line-height:1.25; }
  .spit-brand-affil { font-size:8.5px; letter-spacing:.4px; }
  .spit-id-actions { width:100%; }
  .spit-btn { flex:1; justify-content:center; }
  #header .spit-id-search { width:100%; }
  #header .spit-id-search #searchform > div { width:100%; }
  #header .spit-id-search input#s { flex:1; width:auto; }
}

/* ── Very narrow phones ──────────────────────────────────── */
@media (max-width:400px) {
  .spit-brand img { width:44px; height:44px; }
  .spit-brand { gap:10px; }
  .spit-brand-name { font-size:13.5px; letter-spacing:-.01em; }
  .spit-brand-parent { font-size:9.5px; letter-spacing:1px; }
}
@media (max-width:340px) {
  .spit-brand-name { font-size:12.5px; }
}
