/* =========================================================
   BondEsq Premium UI Overrides (Drop-in)
   - Keeps your colours, content, footer
   - Improves typography + header/nav + mega menu feel
   Load this LAST after existing CSS.
========================================================= */

:root{
  --bond-blue:#2375ab;
  --bond-blue-2:#1181AE; /* your current teal-ish */
  --bond-gold:#fab034;
  --ink:#0f172a;
  --muted:#475569;
  --surface:#ffffff;
  --surface-2:#f8fafc;
  --border:rgba(15,23,42,.10);
  --shadow: 0 18px 50px rgba(15,23,42,.18);
  --radius:16px;
}

/* -------------------------
   Global type polish
------------------------- */
html{
  -webkit-text-size-adjust:100%;
  text-rendering:optimizeLegibility;
}

body{
  font-family:"Poppins", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: clamp(16px, 1.05vw, 18px);
  line-height: 1.65;
  color: var(--ink);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  overflow-x:hidden;
}

p, li{
  color: var(--muted);
}

h1,h2,h3,h4{
  color: var(--ink);
  letter-spacing:-0.02em;
}

h1{ font-size: clamp(34px, 3.2vw, 52px); line-height:1.1; font-weight:800; }
h2{ font-size: clamp(26px, 2.2vw, 38px); line-height:1.18; font-weight:800; }
h3{ font-size: clamp(20px, 1.6vw, 28px); line-height:1.25; font-weight:700; }

a{
  text-decoration:none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible{
  outline: 3px solid rgba(250,176,52,.45);
  outline-offset: 2px;
  border-radius: 10px;
}

/* -------------------------
   Buttons (keep your classes)
------------------------- */
.border-button,
.cta-button{
  border-radius: 12px !important;
  font-weight: 700 !important;
  letter-spacing: .01em;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
  box-shadow: 0 10px 22px rgba(15,23,42,.12);
}

.border-button:hover,
.cta-button:hover{
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(15,23,42,.16);
}

.border-button{
  background: var(--bond-gold) !important;
  border: none !important;
  color:#fff !important;
  padding: 12px 20px !important;
}

.cta-button{
  background: var(--bond-gold) !important;
  color:#fff !important;
}

/* Make small header links cleaner */
.sub-header{
  background: var(--bond-blue) !important;
}

.sub-header .left-info li a,
.sub-header .right-icons li a{
  font-size: 14px;
  opacity: .95;
}

.sub-header .left-info li a:hover,
.sub-header .right-icons li a:hover{
  opacity: 1;
}

/* -------------------------
   Main nav bar polish
   You currently use: nav.relative.bg-white.border-b-2...
------------------------- */

/* Top-level nav links */
.magea_menu > li > a,
.toggleable > label{
  font-weight: 700 !important;
  letter-spacing: .01em;
  color: var(--ink) !important;
}

/* Replace teal hover with BondEsq blue */
.hover\:bg-teal-700:hover{
  background-color: rgba(35,117,171,.10) !important;
}

.bg-teal-700{
  background-color: var(--bond-blue) !important;
}

/* FIX: When a dropdown tab is OPEN, keep the tab text dark (incl. any span/a inside) */
.toggle-input:checked + label,
.toggle-input:checked + label *{
  color: var(--ink) !important;
}

.toggle-input:checked + label{
  background: rgba(35,117,171,.10) !important;
  border-radius: 10px;
}

/* Reduce the “big slab” effect: turn mega menu into a premium panel */
.mega-menu{
  top: 100%;
  left: 0;
  width: 100%;
  padding: 18px !important;
  margin-top: 8px;
}

.mega-menu .container{
  max-width: 1180px;  /* keeps it premium and not full-bleed */
}

/* IMPORTANT: your mega menu wrapper currently has bg-teal-700 class.
   This forces it to blue. We override by targeting it directly. */
.mega-menu[role="toggle"]{
  background: transparent !important; /* remove slab */
}

/* The inner panel - apply premium surface */
.mega-menu[role="toggle"] > .container{
  background: var(--surface) !important;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

/* Columns: make dividers subtle and spacing calmer */
.mega-menu ul{
  border-color: rgba(15,23,42,.08) !important;
}

.mega-menu h3{
  color: var(--ink) !important;
  font-size: 18px !important;
  margin-bottom: 10px !important;
}

.mega-menu a{
  border-radius: 10px;
  padding: 10px 12px !important;
  color: var(--muted) !important;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}

.mega-menu a:hover{
  background: rgba(35,117,171,.10) !important;
  color: var(--ink) !important;
  transform: translateX(1px);
}

/* Special: featured image card in Resources mega menu */
.mega-menu img{
  border-radius: 14px;
}

/* -------------------------
   Mobile drawer polish (your existing JS opens .magea_menu)
------------------------- */
@media (max-width: 768px){

  .navbar-toggler{
    display:block !important;
  }

  .magea_menu{
    background: var(--surface) !important;
    padding-top: 76px !important;
    box-shadow: -20px 0 60px rgba(15,23,42,.22);
  }

  .magea_menu > li{
    border-bottom: 1px solid rgba(15,23,42,.08);
    padding-left: 0 !important;
  }

  .magea_menu > li > a,
  .toggleable > label{
    padding: 16px 16px !important;
    font-size: 16px !important;
    color: var(--ink) !important;
  }

  .close_nav{
    color: var(--bond-gold) !important;
    font-size: 26px !important;
  }

  /* Mega menu on mobile: make it look like an accordion panel */
  .mega-menu[role="toggle"] > .container{
    padding: 14px !important;
    border-radius: 14px !important;
    box-shadow: 0 14px 34px rgba(15,23,42,.12) !important;
  }

  .mega-menu h3{
    font-size: 16px !important;
  }

  .mega-menu a{
    padding: 10px 10px !important;
  }
}

/* -------------------------
   Make section headings feel premium
   (Your page has many inline H2 styles; this improves non-inline ones)
------------------------- */
.section-heading h2{
  font-weight: 800 !important;
  letter-spacing: -0.02em;
}

.section-heading h2 em{
  color: var(--bond-gold) !important;
  font-style: normal !important;
}

/* Optional: soften harsh text in the slider overlay if needed */
.main-banner .text-content h4{
  letter-spacing: -0.02em;
}

/* Bigger, sharper logo */
.logoImg{
  height: 64px !important;  /* try 56–64 */
  width: auto !important;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  transform: translateZ(0);
}

@media (max-width: 768px){
  .logoImg{ height: 46px !important; }
}

/* Keep nav always visible */
nav.relative.bg-white{
  border-bottom: 1px solid rgba(15,23,42,.08) !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 99999 !important;
  background: #fff !important;
  isolation: isolate;
}

/* Round top-level nav items */
.magea_menu > li{
  border-radius: 12px;
}

/* Optional: tighten nav height slightly on desktop */
.magea_menu > li > a,
.toggleable > label{
  padding-top: 18px !important;
  padding-bottom: 18px !important;
}

@media (max-width: 420px){
  .logoImg{ height: 40px !important; }
}

.mega-menu[role="toggle"] .cta-subtext{
  color: var(--ink) !important;
  opacity: .8;
}
