/* ============================================
   TOTAL HOME TX — Brand Stylesheet
   Colors: Navy #1C3B5F | Blue #4A8FD4 | White #FFFFFF
   Fonts: Josefin Sans (logo) | EB Garamond (h1-h3) | Source Sans 3 (body)
   Brand ref: TotalHomeTX/Branding/brand_config.py
============================================ */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;600;700&family=Josefin+Sans:wght@300;600&family=Source+Sans+3:wght@300;400;600;700&display=swap');

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:'Source Sans 3',sans-serif;font-size:16px;color:#222;background:#fff;line-height:1.7}
img{max-width:100%;display:block}
a{text-decoration:none;color:inherit}

:root{
  --navy:#022B54;
  --navy-bright:#1C5D9F;
  --gold:#1C5D9F;
  --sky:#4A8FD4;
  --white:#FFFFFF;
  --grey-light:#E8EFF5;
  --grey-mid:#E0E4EC;
  --text:#505051;
  --text-muted:#666666;
}

h1,h2,h3,h4{font-family:'EB Garamond',serif;color:var(--navy);line-height:1.2}
h1{font-size:clamp(2.2rem,5vw,3.6rem);font-weight:700}
h2{font-size:clamp(1.8rem,3.5vw,2.6rem);font-weight:600}
h3{font-size:clamp(1.2rem,2.5vw,1.6rem);font-weight:600}
p{margin-bottom:1rem;color:var(--text)}
p:last-child{margin-bottom:0}

.gold-rule{display:block;width:60px;height:2px;background:var(--gold);margin:16px 0 24px}
.gold-rule.center{margin:16px auto 24px}

.btn{display:inline-block;padding:14px 32px;font-family:'Source Sans 3',sans-serif;font-size:.875rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;border-radius:4px;cursor:pointer;transition:all .2s ease;border:2px solid transparent}
.btn-gold{background:var(--gold);color:var(--white);border-color:var(--gold)}
.btn-gold:hover{background:transparent;color:var(--gold);border-color:var(--gold)}
.btn-outline-gold{background:transparent;color:var(--white);border-color:var(--gold)}
.btn-outline-gold:hover{background:var(--gold);color:var(--white)}
.btn-navy{background:var(--navy-bright);color:var(--white);border-color:var(--navy-bright)}
.btn-navy:hover{background:transparent;color:var(--navy-bright);border-color:var(--navy-bright)}

.container{max-width:1140px;margin:0 auto;padding:0 32px}
.section{padding:96px 0}
.section-sm{padding:64px 0}
.section-white{background:var(--white)}
.section-grey{background:var(--grey-light)}
.section-navy{background:var(--navy)}
.text-center{text-align:center}
.text-white{color:var(--white)!important}
.text-gold{color:var(--gold)!important}
.text-navy{color:var(--navy)!important}
.text-muted{color:var(--text-muted)}

/* NAV */
.site-header{position:sticky;top:0;z-index:1000;background:var(--navy);border-bottom:2px solid var(--gold)}
.nav-inner{display:flex;align-items:center;justify-content:space-between;height:88px;max-width:1140px;margin:0 auto;padding:0 32px}
.nav-logo{font-family:'EB Garamond',serif;font-size:1.35rem;font-weight:700;color:var(--white);letter-spacing:.02em;display:flex;align-items:center;flex-shrink:0;overflow:visible}
.nav-logo span{color:var(--gold)}
.nav-logo-img{height:76px;width:auto;display:block}
.nav-links{display:flex;align-items:center;gap:4px;list-style:none}
.nav-links a{color:rgba(255,255,255,.8);font-size:.8rem;font-weight:600;letter-spacing:.06em;text-transform:uppercase;padding:8px 12px;border-radius:3px;transition:color .2s}
.nav-links a:hover,.nav-links a.active{color:var(--gold)}
.nav-dropdown{position:relative}
.nav-dropdown>a::after{content:" ▾";font-size:.65rem}
.dropdown-menu{display:none;position:absolute;top:calc(100% + 8px);left:0;background:var(--navy);border:1px solid var(--gold);border-radius:4px;min-width:230px;padding:8px 0;z-index:200}
.dropdown-menu a{display:block;padding:10px 20px;color:rgba(255,255,255,.8);font-size:.8rem;white-space:nowrap}
.dropdown-menu a:hover{color:var(--gold);background:rgba(28,93,159,.08)}
.nav-dropdown:hover .dropdown-menu{display:block}
.nav-cta{background:var(--gold)!important;color:var(--white)!important;padding:9px 20px!important;border-radius:4px;font-weight:700!important}
.nav-cta:hover{background:#164d8a!important;color:var(--white)!important}
.nav-toggle{display:none;flex-direction:column;gap:5px;cursor:pointer;background:none;border:none;padding:4px}
.nav-toggle span{display:block;width:24px;height:2px;background:var(--white);border-radius:2px}

/* PAGE HERO */
.page-hero{background:var(--navy);padding:80px 0 72px;text-align:center}
.page-hero h1{color:var(--white);margin-bottom:16px}
.page-hero p{color:rgba(255,255,255,.7);font-size:1.05rem;max-width:600px;margin:0 auto}

/* CARDS */
.card{background:var(--white);border:1px solid var(--grey-mid);border-radius:8px;padding:36px 32px;transition:box-shadow .2s}
.card:hover{box-shadow:0 8px 32px rgba(2,43,84,.1)}
.card-gold{border-top:3px solid var(--gold)}

/* GRID */
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:32px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:28px}

/* TESTIMONIALS */
.testimonial-quote{font-family:'EB Garamond',serif;font-size:1.15rem;font-style:italic;color:var(--navy);line-height:1.8;margin-bottom:16px}
.testimonial-author{font-size:.8rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--gold)}

/* BADGES */
.badge-row{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}
.badge{display:inline-flex;align-items:center;gap:6px;background:rgba(28,93,159,.12);border:1px solid var(--gold);border-radius:100px;padding:7px 16px;font-size:.78rem;font-weight:700;color:var(--gold);letter-spacing:.04em}

/* CHECK LIST */
.check-list{list-style:none;padding:0}
.check-list li{padding:9px 0 9px 32px;position:relative;border-bottom:1px solid var(--grey-mid);font-size:.95rem}
.check-list li:last-child{border-bottom:none}
.check-list li::before{content:'✓';position:absolute;left:0;color:var(--gold);font-weight:700}

/* FAQ */
.faq-item{border-bottom:1px solid var(--grey-mid)}
.faq-question{width:100%;display:flex;justify-content:space-between;align-items:center;padding:20px 0;background:none;border:none;cursor:pointer;text-align:left;font-family:'Source Sans 3',sans-serif;font-size:.975rem;font-weight:600;color:var(--navy)}
.faq-question::after{content:'+';font-size:1.4rem;color:var(--gold);flex-shrink:0;margin-left:16px}
.faq-item.open .faq-question::after{content:'−'}
.faq-answer{display:none;padding:0 0 20px;color:var(--text-muted);font-size:.925rem;line-height:1.85}
.faq-item.open .faq-answer{display:block}

/* PRICING */
.pricing-table{border:1px solid var(--grey-mid);border-radius:8px;overflow:hidden}
.pricing-row{display:grid;grid-template-columns:2fr 1fr 1fr;border-bottom:1px solid var(--grey-mid)}
.pricing-row:last-child{border-bottom:none}
.pricing-row>div{padding:16px 24px;border-right:1px solid var(--grey-mid);font-size:.9rem}
.pricing-row>div:last-child{border-right:none}
.pricing-row.header-row{background:var(--navy)}
.pricing-row.header-row>div{color:var(--white);font-weight:700;font-size:.8rem;letter-spacing:.06em;text-transform:uppercase}

/* STEPS */
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:48px}
.step{text-align:center}
.step-number{width:56px;height:56px;border-radius:50%;background:var(--gold);color:var(--white);font-family:'EB Garamond',serif;font-size:1.4rem;font-weight:700;display:flex;align-items:center;justify-content:center;margin:0 auto 20px}

/* FOOTER */
.site-footer{background:var(--navy);color:rgba(255,255,255,.65);padding:64px 0 32px;border-top:3px solid var(--gold)}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:48px;margin-bottom:48px}
.footer-logo{font-family:'EB Garamond',serif;font-size:1.4rem;font-weight:700;color:var(--white);margin-bottom:12px}
.footer-logo span{color:var(--gold)}
.footer-logo-img{height:80px;width:auto;display:block;margin-bottom:4px}
.footer-tagline{font-size:.85rem;line-height:1.8;margin-bottom:20px;color:rgba(255,255,255,.85)}
.footer-contact a{color:var(--gold)}
.footer-social{display:flex;gap:12px;margin-top:18px}
.footer-social a{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.08);color:rgba(255,255,255,.8);transition:background .2s,color .2s}
.footer-social a:hover{background:var(--gold);color:var(--white)}
.footer-social svg{width:18px;height:18px;display:block}
.footer-heading{color:var(--white);font-size:.75rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;margin-bottom:18px}
.footer-links{list-style:none}
.footer-links li{margin-bottom:10px}
.footer-links a{color:rgba(255,255,255,.6);font-size:.875rem;transition:color .2s}
.footer-links a:hover{color:var(--gold)}
.footer-bottom{border-top:1px solid rgba(255,255,255,.1);padding-top:24px;display:flex;justify-content:space-between;align-items:center;font-size:.78rem;color:rgba(255,255,255,.4)}

/* HOMEPAGE HERO SPLIT */
.hero-split{display:grid;grid-template-columns:1fr 1fr;min-height:90vh}
.hero-text-panel{background:var(--navy);display:flex;align-items:center;padding:80px 64px}
.hero-img-panel{position:relative;overflow:hidden;min-height:500px}
.hero-img-panel img{width:100%;height:100%;object-fit:cover;object-position:center}

/* RESPONSIVE */
@media(max-width:768px){
  .nav-inner{height:68px;padding:0 16px}
  .nav-links{display:none;flex-direction:column;position:absolute;top:68px;left:0;right:0;background:var(--navy);padding:16px 24px;gap:0;border-top:1px solid rgba(255,255,255,.1);z-index:999}
  .nav-links.open{display:flex}
  .nav-links li{width:100%}
  .nav-links a{display:block;padding:12px 0;border-bottom:1px solid rgba(255,255,255,.08)}
  .dropdown-menu{position:static;border:none;padding-left:16px;background:transparent;display:none}
  .nav-dropdown.open .dropdown-menu{display:block}
  .nav-toggle{display:flex}
  .site-header{position:relative}
  /* Scale logo down on mobile */
  a.nav-logo svg{height:50px!important;width:222px!important}
  .grid-2,.grid-3,.steps,.footer-grid{grid-template-columns:1fr}
  .pricing-row{grid-template-columns:1fr}
  .pricing-row>div{border-right:none;border-bottom:1px solid var(--grey-mid)}
  .section{padding:60px 0}
  .container{padding:0 20px}
  /* Hero: stack vertically on mobile, photo on top */
  .hero-split{grid-template-columns:1fr;min-height:auto}
  .hero-img-panel{min-height:260px;order:-1}
  .hero-text-panel{padding:48px 28px}
  /* Blog: stack posts + sidebar on mobile */
  .blog-layout{grid-template-columns:1fr!important;gap:40px}
  /* Page hero */
  .page-hero{padding:56px 0 48px}
  h1{font-size:clamp(1.8rem,6vw,2.6rem)}
  /* Footer adjustments */
  .footer-grid{gap:32px}
  .footer-bottom{flex-direction:column;gap:8px;text-align:center}
}

/* ── Dark-section contrast fix: white accents on navy, blue reserved for light bg ── */
.section-navy .gold-rule,
.page-hero .gold-rule { background: rgba(255,255,255,0.35); }

.section-navy p[style*="color:var(--gold)"],
.page-hero p[style*="color:var(--gold)"] { color: rgba(255,255,255,0.55) !important; }

.site-header { border-bottom: 2px solid rgba(255,255,255,0.15); }

.badge { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.28); color: rgba(255,255,255,0.85); }

.section-navy .check-list li::before { color: #fff; }

.section-navy .badge-row .badge { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.28); color: rgba(255,255,255,0.85); }

.nav-links a:hover, .nav-links a.active { color: #fff; opacity: 1; }
.nav-cta { background: var(--gold) !important; color: #fff !important; }
.dropdown-menu { border-color: rgba(255,255,255,0.15); }
.dropdown-menu a:hover { color: #fff; background: rgba(255,255,255,0.08); }

.site-footer { border-top: 3px solid rgba(255,255,255,0.15); }
.footer-links a:hover { color: #fff; }
.footer-social a:hover { background: rgba(255,255,255,0.2); color: #fff; }
.footer-contact a { color: rgba(255,255,255,0.75); }

/* ── 480px small-phone breakpoint ── */
@media(max-width:480px){
  h1{font-size:clamp(1.55rem,7vw,2rem)!important}
  h2{font-size:clamp(1.25rem,5vw,1.6rem)}
  .btn{padding:13px 22px;font-size:.82rem;width:100%;text-align:center}
  .section{padding:44px 0}
  .container{padding:0 16px}
  .hero-text-panel{padding:36px 18px}
  .hero-img-panel{min-height:200px}
  .page-hero{padding:40px 0 32px}
  .footer-bottom{flex-direction:column;gap:8px;text-align:center}
}
