/*
Theme Name: Insurance Specialists 6
Theme URI: https://insurancespecialists.com
Description: Custom theme for Insurance Specialists — Edge design with DM Sans, Bebas Neue headings, slide-in mobile nav. LeadsDirect AJAX, unified hero backgrounds.
Author: Insurance Specialists
Version: 6.0
License: All Rights Reserved
Text Domain: insurance-specialists-6
*/

/* ── SHARED RESET & BASE ── */
:root {
  --navy: #3a5580;
  --navy-dark: #2e4568;
  --blue: #1A5DC8;
  --blue-light: #EBF2FF;
  --white: #FFFFFF;
  --off-white: #F5F8FF;
  --border: #D9E4F5;
  --text: #1C2C44;
  --body: #3D5278;
  --muted: #7A90B3;
  --green: #14B872;
  --dark: #0C1E36;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--off-white);
  -webkit-font-smoothing: antialiased;
}

/* ── SHARED NAV ── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between;
  height: 68px;
}
.logo img { height: 42px; display: block; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  text-decoration: none; color: var(--body);
  font-size: .85rem; font-weight: 500;
  padding: 7px 13px; border-radius: 6px;
  transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--blue-light); color: var(--blue); }
.nav-links a.active { color: var(--blue); font-weight: 600; }
.btn-nav {
  background: var(--blue) !important; color: var(--white) !important;
  padding: 9px 20px !important; border-radius: 8px !important;
  font-weight: 600 !important; margin-left: 8px;
  box-shadow: 0 2px 8px rgba(26,93,200,.3);
  transition: background .15s !important;
}
.btn-nav:hover { background: #1550B0 !important; }

/* Nav dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown > a { cursor: pointer; }
.nav-dd-arrow { font-size: 0.65rem; margin-left: 2px; }
.nav-dropdown-menu {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  min-width: 200px;
  padding: 8px 0;
  z-index: 200;
  margin-top: 8px;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a {
  display: block;
  padding: 10px 18px;
  font-size: 0.85rem; font-weight: 500;
  color: var(--body);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown-menu a:hover {
  background: var(--blue-light);
  color: var(--blue);
}

/* Mobile nav */
.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--navy); padding: 4px; z-index: 101; }

/* Mobile nav - slide-in panel from right */
@media (max-width: 768px) {
  .mobile-toggle { display: block; }

  .nav-links {
    display: none;
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 300px; max-width: 85vw;
    background: #0C1E36;
    flex-direction: column;
    justify-content: flex-start;
    padding: 100px 32px 40px;
    gap: 0;
    z-index: 99;
    overflow-y: auto;
    box-shadow: -8px 0 40px rgba(0,0,0,0.3);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.23,1,0.32,1);
  }
  .nav-links.open {
    display: flex;
    transform: translateX(0);
  }

  /* Backdrop */
  .nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 98;
    backdrop-filter: blur(2px);
  }
  .nav-backdrop.open { display: block; }

  /* Top-level links - right aligned */
  .nav-links > a {
    display: block !important;
    padding: 14px 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    text-align: right;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transition: color 0.2s;
  }
  .nav-links > a:hover,
  .nav-links > a.active { color: #1A5DC8; }
  .nav-links > a:last-child { border-bottom: none; }

  /* CTA button pinned at bottom */
  .nav-links a.btn-nav {
    margin: auto 0 0 0 !important;
    text-align: center;
    border-bottom: none !important;
    background: #1A5DC8 !important;
    color: white !important;
    padding: 16px 24px !important;
    border-radius: 10px !important;
    font-family: 'DM Sans', sans-serif !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    display: block !important;
  }

  /* Dropdown container */
  .nav-dropdown {
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-dropdown > a {
    display: block !important;
    padding: 14px 0 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    text-align: right;
    border-bottom: none !important;
  }
  .nav-dropdown > a:hover,
  .nav-dropdown > a.active { color: #1A5DC8; }
  .nav-dd-arrow { color: rgba(255,255,255,0.3); }

  /* Dropdown sub-links */
  .nav-dropdown-menu {
    display: block;
    position: static;
    background: transparent;
    border: none; box-shadow: none;
    padding: 0 0 10px 0;
    margin-top: 0; min-width: auto;
  }
  .nav-dropdown-menu a {
    display: block !important;
    padding: 8px 0;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.4);
    border-bottom: none;
    text-align: right;
    transition: color 0.2s;
  }
  .nav-dropdown-menu a:hover {
    color: #1A5DC8;
    background: transparent;
  }

  /* Toggle stays on top */
  .mobile-toggle {
    position: relative;
    z-index: 102;
    color: var(--navy);
    transition: color 0.2s;
  }
  body.nav-open .mobile-toggle { color: var(--navy); }
}

/* ── SHARED FOOTER ── */
.site-footer {
  background: #0C1E36;
  padding: 60px 5% 28px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 48px; max-width: 1100px; margin: 0 auto 48px;
}
.footer-brand img { height: 36px; margin-bottom: 14px; display: block; filter: brightness(0) invert(1); }
.footer-brand p { font-size: .83rem; color: rgba(255,255,255,.38); line-height: 1.7; max-width: 240px; }
.footer-col h4 {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.45); margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: rgba(255,255,255,.45); text-decoration: none; font-size: .86rem; transition: color .15s; }
.footer-col ul li a:hover { color: white; }
.subscribe-form { display: flex; gap: 8px; }
.subscribe-form input {
  flex: 1; padding: 9px 13px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: 6px; color: white; font-size: .8rem;
  font-family: 'DM Sans', sans-serif; outline: none; transition: border-color .15s;
}
.subscribe-form input::placeholder { color: rgba(255,255,255,.3); }
.subscribe-form input:focus { border-color: rgba(26,93,200,.6); }
.subscribe-form button {
  padding: 9px 14px; background: var(--blue); color: white;
  border: none; border-radius: 6px; font-weight: 600; font-size: .8rem;
  cursor: pointer; font-family: 'DM Sans', sans-serif; white-space: nowrap;
  transition: background .15s;
}
.subscribe-form button:hover { background: #1550B0; }
.sub-note { font-size: .7rem; color: rgba(255,255,255,.22); margin-top: 7px; }
.footer-bottom {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid rgba(255,255,255,.08); padding-top: 22px;
  flex-wrap: wrap; gap: 10px;
}
.footer-bottom span { font-size: .78rem; color: rgba(255,255,255,.23); }
.footer-links { display: flex; gap: 18px; }
.footer-links a { color: rgba(255,255,255,.28); text-decoration: none; font-size: .78rem; transition: color .15s; }
.footer-links a:hover { color: rgba(255,255,255,.6); }

/* ── SHARED SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; }
.d2 { transition-delay: .16s; }
.d3 { transition-delay: .24s; }
.d4 { transition-delay: .32s; }
.d5 { transition-delay: .40s; }

/* ── SHARED RESPONSIVE ── */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
}
@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr; gap: 0; }
  .footer-brand { margin-bottom: 24px; }
  .footer-col { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
  .footer-col h4 { margin-bottom: 0; margin-right: 14px; flex-shrink: 0; }
  .footer-col ul { display: flex; gap: 16px; flex-wrap: wrap; }
  .footer-col ul li { margin-bottom: 0; }
  .subscribe-form { flex-direction: column; }
}
