/* =============================================================================
   HERITAGE INSURANCE — main.css
   ============================================================================= */

/* ─── RESET & ROOT ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:       #0d1e3d;
    --navy-mid:   #1a2f52;
    --gold:       #c9a84c;
    --gold-light: #e2c06e;
    --white:      #ffffff;
    --off-white:  #f5f5f0;
    --gray:       #6b7280;
    --light-gray: #e8e8e0;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    color: var(--navy);
    background: var(--white);
}


/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */
h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.9rem, 3vw, 2.8rem);
    color: var(--navy);
    font-weight: 700;
    margin-bottom: 18px;
    line-height: 1.2;
}

.section-tag {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.section-intro {
    color: var(--gray);
    font-size: 1.02rem;
    line-height: 1.75;
    margin-bottom: 38px;
}


/* =============================================================================
   LAYOUT
   ============================================================================= */
.container     { max-width: 1120px; margin: 0 auto; }
section        { padding: 90px 40px; }
.intro-section { background: var(--off-white); }
.intro-section p {
    font-size: 1.08rem;
    color: var(--gray);
    line-height: 1.8;
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}


/* =============================================================================
   BUTTONS
   ============================================================================= */
.btn-primary {
    background: var(--gold);
    color: var(--navy);
    padding: 14px 32px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    transition: background 0.2s, transform 0.2s;
    display: inline-block;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-1px); }

.btn-outline {
    border: 2px solid rgba(255,255,255,0.6);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: border-color 0.2s, background 0.2s;
    display: inline-block;
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }

.btn-navy {
    background: var(--navy);
    color: var(--white);
    padding: 13px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    transition: background 0.2s;
    display: inline-block;
}
.btn-navy:hover { background: var(--navy-mid); }

.btn-sm { padding: 9px 22px; font-size: 0.85rem; }


/* =============================================================================
   NAVIGATION
   ============================================================================= */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: var(--navy);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 40px;
    height: 70px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.nav-logo { height: 48px; display: flex; align-items: center; }
.nav-logo img { height: 100%; width: auto; object-fit: contain; }

.logo-placeholder {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nav-links { display: flex; align-items: center; gap: 8px; list-style: none; }
.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 400;
    letter-spacing: 0.3px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: color 0.2s, background 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: var(--white); background: rgba(255,255,255,0.08); }

.nav-cta {
    background: var(--gold) !important;
    color: var(--navy) !important;
    font-weight: 600 !important;
    padding: 8px 20px !important;
    border-radius: 4px;
    transition: background 0.2s !important;
}
.nav-cta:hover { background: var(--gold-light) !important; }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
}
.hamburger span {
    display: block;
    width: 24px; height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: 0.3s;
}

.mobile-menu {
    display: none;
    position: fixed; top: 70px; left: 0; right: 0;
    background: var(--navy);
    padding: 20px;
    z-index: 999;
    flex-direction: column;
    gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 12px 16px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}


/* =============================================================================
   PAGE HERO (interior pages)
   ============================================================================= */
.page-hero {
    margin-top: 70px;
    height: 340px;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    background: var(--navy);
    overflow: hidden;
}
.page-hero-bg {
    position: absolute; inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.25;
}
.page-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(13,30,61,0.6) 0%, rgba(13,30,61,0.85) 100%);
}
.page-hero-content {
    position: relative; z-index: 2;
    text-align: center; color: var(--white);
    padding: 0 24px;
}
.page-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 14px;
    display: block;
}
.page-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 700;
}


/* =============================================================================
   HOMEPAGE HERO
   ============================================================================= */
.hero {
    margin-top: 70px;
    position: relative;
    height: 85vh;
    min-height: 520px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    background: var(--navy);
}
.hero-bg {
    position: absolute; inset: 0;
    background: url('https://images.unsplash.com/photo-1449965408869-eaa3f722e40d?w=1600&q=80') center/cover no-repeat;
    opacity: 0.35;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(13,30,61,0.85) 0%, rgba(13,30,61,0.55) 100%);
}
.hero-content {
    position: relative; z-index: 2;
    text-align: center; color: var(--white);
    max-width: 760px; padding: 0 24px;
}
.hero-eyebrow {
    font-size: 0.8rem; letter-spacing: 3px; text-transform: uppercase;
    color: var(--gold); font-weight: 600; margin-bottom: 18px;
}
.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 700; line-height: 1.15; margin-bottom: 20px;
}
.hero p {
    font-size: 1.15rem; color: rgba(255,255,255,0.82);
    max-width: 560px; margin: 0 auto 34px; line-height: 1.7;
}
.hero-btns { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }


/* =============================================================================
   ABOUT SECTION
   ============================================================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}
.about-img { border-radius: 4px; overflow: hidden; position: relative; }
.about-img img { width: 100%; height: 420px; object-fit: cover; display: block; }
.about-img::after {
    content: ''; position: absolute;
    bottom: -16px; right: -16px;
    width: 80%; height: 80%;
    border: 3px solid var(--gold);
    border-radius: 4px;
    z-index: -1;
}
.about-text p { font-size: 1.05rem; color: var(--gray); line-height: 1.8; margin-bottom: 28px; }


/* =============================================================================
   SERVICES
   ============================================================================= */
.services-section { background: var(--off-white); }
.services-intro { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.services-intro p { color: var(--gray); font-size: 1.05rem; line-height: 1.75; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 28px;
}
.service-card {
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(13,30,61,0.08);
    transition: transform 0.25s, box-shadow 0.25s;
}
.service-card:hover { transform: translateY(-5px); box-shadow: 0 10px 32px rgba(13,30,61,0.14); }
.service-card img { width: 100%; height: 180px; object-fit: cover; display: block; }
.service-card-body { padding: 24px 22px; }
.service-card-body h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; margin-bottom: 10px; }
.service-card-body p { font-size: 0.9rem; color: var(--gray); line-height: 1.65; margin-bottom: 18px; }
.service-card-body a { color: var(--gold); font-weight: 600; font-size: 0.88rem; text-decoration: none; letter-spacing: 0.3px; }
.service-card-body a:hover { color: var(--navy); }
.services-cta { text-align: center; margin-top: 50px; }

/* Services detail rows (services.php) */
.services-list { padding: 80px 40px; }
.service-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
    margin-bottom: 90px;
    padding-bottom: 90px;
    border-bottom: 1px solid var(--light-gray);
}
.service-row:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.service-row.reverse { direction: rtl; }
.service-row.reverse > * { direction: ltr; }
.service-img { border-radius: 4px; overflow: hidden; }
.service-img img { width: 100%; height: 360px; object-fit: cover; display: block; }
.service-tag {
    font-size: 0.72rem; letter-spacing: 3px; text-transform: uppercase;
    color: var(--gold); font-weight: 600; margin-bottom: 10px;
}
.service-body h2 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.7rem, 2.5vw, 2.4rem);
    color: var(--navy); font-weight: 700; margin-bottom: 18px; line-height: 1.2;
}
.service-body p { font-size: 1rem; color: var(--gray); line-height: 1.8; margin-bottom: 14px; }
.coverage-list { list-style: none; margin: 20px 0 28px; display: flex; flex-direction: column; gap: 8px; }
.coverage-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.92rem; color: var(--navy-mid); }
.coverage-list li::before { content: '✓'; color: var(--gold); font-weight: 700; flex-shrink: 0; margin-top: 1px; }


/* =============================================================================
   CARRIERS — homepage badges
   ============================================================================= */
.carriers-section { background: var(--white); }
.carriers-section h2 { text-align: center; margin-bottom: 48px; }
.carriers-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}
.carrier-badge {
    background: var(--off-white);
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    padding: 14px 22px;
    font-size: 0.82rem; font-weight: 600; color: var(--navy-mid);
    letter-spacing: 0.4px;
    transition: background 0.2s, border-color 0.2s;
}
.carrier-badge:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

/* Carriers page — logo cards */
.carriers-category { margin-bottom: 60px; }
.carrier-card {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    padding: 22px 20px;
    min-width: 160px;
    flex: 1 1 160px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(13,30,61,0.05);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.carrier-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(13,30,61,0.12);
    border-color: var(--gold);
}
.carrier-name {
    font-family: 'Playfair Display', serif;
    font-size: 0.98rem; font-weight: 600;
    color: var(--navy); margin-bottom: 4px;
}
.carrier-lines { font-size: 0.78rem; color: var(--gray); line-height: 1.4; }

/* Carrier logo wrappers */
.carrier-logo-wrap {
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
}
.carrier-logo--wide   { height: 48px; padding: 0 8px; }
.carrier-logo--square { height: 64px; padding: 4px; }
.carrier-logo-wrap img {
    max-width: 100%; max-height: 100%;
    width: auto; height: auto;
    object-fit: contain; display: block;
}


/* =============================================================================
   CONTACT PAGE
   ============================================================================= */
.contact-section { padding: 90px 40px; }
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: start;
}

/* Agent cards */
.agents-stack { display: flex; flex-direction: column; gap: 22px; }
.agent-card {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    display: flex; align-items: center; gap: 22px;
    padding: 22px 24px;
    box-shadow: 0 2px 12px rgba(13,30,61,0.06);
    transition: box-shadow 0.25s, transform 0.25s;
}
.agent-card:hover { box-shadow: 0 8px 28px rgba(13,30,61,0.12); transform: translateY(-2px); }
.agent-photo {
    width: 72px; height: 72px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    object-position: center top;
    border: 3px solid var(--gold);
}
.agent-photo-placeholder {
    width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
    background: var(--navy); border: 3px solid var(--gold);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold); font-family: 'Playfair Display', serif;
    font-size: 1.5rem; font-weight: 700;
}
.agent-info { flex: 1; }
.agent-name { font-family: 'Playfair Display', serif; font-size: 1.15rem; font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.agent-contact { display: flex; flex-direction: column; gap: 3px; margin-bottom: 14px; }
.agent-contact a { color: var(--gray); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.agent-contact a:hover { color: var(--gold); }
.btn-call {
    background: var(--navy); color: var(--white);
    padding: 8px 22px; border-radius: 4px; text-decoration: none;
    font-weight: 600; font-size: 0.82rem; letter-spacing: 0.3px;
    transition: background 0.2s; display: inline-block;
}
.btn-call:hover { background: var(--gold); color: var(--navy); }

/* Quote form panel */
.form-panel {
    background: var(--navy); border-radius: 8px;
    padding: 44px 40px;
    position: sticky; top: 90px;
}
.form-panel h3 { font-family: 'Playfair Display', serif; font-size: 1.75rem; color: var(--white); font-weight: 700; margin-bottom: 8px; }
.form-panel .form-sub { color: rgba(255,255,255,0.65); font-size: 0.9rem; margin-bottom: 28px; line-height: 1.6; }
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block; color: rgba(255,255,255,0.75);
    font-size: 0.82rem; font-weight: 600;
    letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 4px;
    color: var(--white);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 0.95rem;
    padding: 11px 14px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.3); }
.form-group select option { color: var(--navy); background: var(--white); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--gold); background: rgba(255,255,255,0.1); }
.form-group textarea { resize: vertical; min-height: 100px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.btn-submit {
    width: 100%; background: var(--gold); color: var(--navy);
    border: none; border-radius: 4px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem; font-weight: 600; letter-spacing: 0.3px;
    padding: 14px; cursor: pointer; margin-top: 8px;
    transition: background 0.2s;
}
.btn-submit:hover { background: var(--gold-light); }
.form-note { text-align: center; color: rgba(255,255,255,0.4); font-size: 0.78rem; margin-top: 14px; line-height: 1.5; }

.form-success { display: none; text-align: center; padding: 30px 0; }
.form-success .check { font-size: 3rem; margin-bottom: 12px; }
.form-success h4 { color: var(--gold); font-family: 'Playfair Display', serif; font-size: 1.4rem; margin-bottom: 8px; }
.form-success p { color: rgba(255,255,255,0.7); font-size: 0.92rem; line-height: 1.6; }

/* Info strip */
.info-strip { background: var(--off-white); padding: 60px 40px; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.info-block { text-align: center; }
.info-icon { font-size: 2rem; margin-bottom: 12px; }
.info-block h4 { font-family: 'Playfair Display', serif; font-size: 1.05rem; color: var(--navy); margin-bottom: 6px; }
.info-block p, .info-block a { color: var(--gray); font-size: 0.9rem; text-decoration: none; line-height: 1.6; }
.info-block a:hover { color: var(--gold); }


/* =============================================================================
   TEAM PAGE
   ============================================================================= */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.team-card {
    background: var(--white);
    border: 1px solid var(--light-gray);
    border-radius: 8px; overflow: hidden;
    box-shadow: 0 2px 16px rgba(13,30,61,0.07);
    transition: transform 0.25s, box-shadow 0.25s;
    text-align: center;
}
.team-card:hover { transform: translateY(-5px); box-shadow: 0 12px 32px rgba(13,30,61,0.13); }
.team-photo { width: 100%; height: 280px; object-fit: cover; display: block; object-position: center top; }
.team-photo-placeholder {
    width: 100%; height: 220px;
    background: var(--navy);
    display: flex; align-items: center; justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 3rem; font-weight: 700;
    color: var(--gold); letter-spacing: 2px;
}
.team-card-body { padding: 28px 26px 32px; }
.team-name { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--navy); font-weight: 700; margin-bottom: 4px; }
.team-title { font-size: 0.8rem; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 16px; }
.team-bio { font-size: 0.92rem; color: var(--gray); line-height: 1.7; margin-bottom: 20px; }
.team-contact { display: flex; flex-direction: column; gap: 5px; margin-bottom: 20px; }
.team-contact a { color: var(--gray); text-decoration: none; font-size: 0.88rem; transition: color 0.2s; }
.team-contact a:hover { color: var(--gold); }


/* =============================================================================
   CTA BANDS & FOOTER
   ============================================================================= */
.contact-cta {
    background: var(--navy);
    text-align: center;
    padding: 90px 40px;
    position: relative; overflow: hidden;
}
.contact-cta::before {
    content: ''; position: absolute; inset: 0;
    background: url('https://images.unsplash.com/photo-1521791136064-7986c2920216?w=1200&q=60') center/cover no-repeat;
    opacity: 0.08;
}
.contact-cta .container { position: relative; z-index: 1; }
.contact-cta h2 { color: var(--white); margin-bottom: 14px; }
.contact-cta p { color: rgba(255,255,255,0.75); font-size: 1.05rem; max-width: 500px; margin: 0 auto 34px; line-height: 1.7; }

.cta-band { background: var(--navy); padding: 80px 40px; text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,0.75); font-size: 1.05rem; max-width: 500px; margin: 0 auto 34px; line-height: 1.7; }

footer {
    background: #060f1e;
    color: rgba(255,255,255,0.55);
    font-size: 0.85rem;
    padding: 44px 40px;
    text-align: center;
}
.footer-inner { max-width: 1120px; margin: 0 auto; }
.footer-logo { margin-bottom: 16px; }
.footer-logo .logo-placeholder { font-size: 1.1rem; }
.footer-links { display: flex; gap: 24px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.footer-links a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-contact { margin-bottom: 20px; }
.footer-contact a { color: var(--gold); text-decoration: none; }
.footer-divider { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 20px auto; max-width: 400px; }
.footer-copy { font-size: 0.78rem; color: rgba(255,255,255,0.35); }


/* =============================================================================
   RESPONSIVE
   ============================================================================= */

/* Large tablet */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .team-grid     { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet */
@media (max-width: 860px) {
    .about-grid      { grid-template-columns: 1fr; gap: 40px; }
    .contact-grid    { grid-template-columns: 1fr; gap: 50px; }
    .service-row     { grid-template-columns: 1fr; gap: 30px; margin-bottom: 60px; padding-bottom: 60px; }
    .service-row.reverse { direction: ltr; }
    .service-img img { height: 240px; }
    .info-grid       { grid-template-columns: 1fr; gap: 28px; }
    .team-grid       { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
    .about-img::after { display: none; }
    .about-img img   { height: 280px; }
    .form-panel      { position: static; }
    .form-panel      { padding: 32px 24px; }
}

/* Mobile */
@media (max-width: 640px) {
    nav              { padding: 0 20px; }
    section          { padding: 60px 20px; }
    .services-list   { padding: 50px 20px; }
    .contact-section { padding: 60px 20px; }
    .info-strip      { padding: 50px 20px; }
    .nav-links       { display: none; }
    .hamburger       { display: flex; }
    .services-grid   { grid-template-columns: 1fr; }
    .form-row        { grid-template-columns: 1fr; }
    .hero            { height: auto; min-height: 100vh; }
    .hero-content    { padding: 100px 24px 60px; }
    .page-hero       { height: 260px; }
    .carrier-card    { flex: 1 1 140px; min-width: 140px; }
    .hero-btns       { flex-direction: column; align-items: center; }
    .btn-primary,
    .btn-outline     { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
    .agent-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    .agent-contact {
        align-items: center;
    }
}