/* ==========================================================================
   Shannon Family Automotive – styles.css
   Organized structure and section guide

   TABLE OF CONTENTS
   0. CSS Variables (Design Tokens)
   1. Utilities (bg/text/border helpers)
   2. Base Elements (body, titles, basic helpers)
   3. Header & Navigation
   4. Desktop Navigation (menu, dropdown, mega)
   5. Mobile Navigation (burger, drawer)
   6. Bulma Overrides (theme mapping)
   7. Hero Section
   8. Helpers (text/background helpers, tags)
   9. Footer
  10. Sections (Map, CTA)
  11. Components (Cards, Stars)
  12. Accessibility (sr-only)
  13. Sections (FAQ)

   Notes:
   - Ordering is documented for maintainability; no selector/property semantics changed.
   ==========================================================================
*/

/* 0) CSS Variables (Design Tokens) */
/* Theme tokens and palette */
:root {
    --nav-max-width: 1400px;
    --nav-padding-x: .5rem;
    --nav-height: 6rem;
    --nav-height-scrolled: 4rem;

    /* Brand color palette */
    --color-classic-blue: #0F4C81;  /* Pantone 19-4052 TPG Classic Blue */
    --color-emberglow: #e9685a; /* Pantone 17-1547 TPG Emberglow */
    --color-lemon-drop: #F6D673; /* Pantone 12-0736 TPG Lemon Drop */
    --color-pageant-blue: #343f52; /* Pantone 19-4111 TPG Pageant Blue */
    --color-blanc-de-blanc: #e9e9e7; /* Pantone 11-4800 TPG Blanc de Blanc */
    --color-bright-white: #f5f8f7; /* Pantone 11-0601 TPG Bright White */
    --color-tap-shoe: #3d3c3f; /* Pantone 19-4004 TPG Tap Shoe */

    /* Semantic aliases */
    --primary: var(--color-classic-blue);
    --secondary: var(--color-emberglow);
    --accent: var(--color-lemon-drop);
    --surface: var(--color-blanc-de-blanc);
    --muted: var(--color-pageant-blue);
    --on-primary: var(--color-bright-white);
    --on-surface: var(--color-classic-blue);
    --on-secondary: var(--color-bright-white);

    /* Interaction states */
    --primary-hover: #2A6BA8;
    --primary-active: #0A3559;
    --secondary-hover: #d96154;
    --secondary-active: #A85542;
    --focus-ring: rgba(246, 214, 115, 0.45);

    /* UI tokens */
    --panel: var(--color-bright-white);
    --border: var(--color-blanc-de-blanc);
    --footer-link: #e6e6e6;
    --footer-link-hover: #ffffff;
}


/* ==========================================================================
 1) Utilities (backgrounds, text, borders)
   ==========================================================================
*/

.bg-primary { background-color: var(--primary) !important; }
.bg-secondary { background-color: var(--secondary) !important; }
.bg-accent { background-color: var(--accent) !important; }
.bg-surface { background-color: var(--surface) !important; }
.bg-muted { background-color: var(--muted) !important; }
.bg-white { background-color: var(--color-bright-white) !important; }
.bg-black { background-color: var(--color-tap-shoe) !important; }

.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-accent { color: var(--accent) !important; }
.text-muted { color: var(--muted) !important; }
.text-white { color: var(--color-bright-white) !important; }
.text-black { color: var(--color-tap-shoe) !important; }

.border-accent { border-color: var(--accent) !important; }
.outline-accent { outline-color: var(--accent) !important; }

/* Headings - Proxima Nova Bold */
h1, h2, h3, h4, h5 {
    font-family: "proxima-nova", sans-serif;
    font-weight: 700 !important;
    font-style: normal;
}

/* Body Text - Myriad Pro */
body,
p,
.content,
li,
a,
span,
button,
input,
textarea,
select {
    font-family: "myriad-pro", sans-serif;
    font-weight: 400;
    font-style: normal;
}

/* Semibold for emphasis */
strong, b,
.has-text-weight-semibold {
    font-family: "myriad-pro", sans-serif;
    font-weight: 600;
}

/* Light for subtitles or secondary text */
.subtitle,
.has-text-weight-light {
    font-family: "myriad-pro", sans-serif;
    font-weight: 300;
}


/* ==========================================================================
 2) Base Elements
   ==========================================================================
*/

body {
    margin: 0;
    background: var(--surface);
}

.is-rounded{border-radius: 5px;}

.title{color: var(--primary);}

.button.is-primary {
    position: relative;
    overflow: hidden;
}
.button.is-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}
.button.is-primary:hover::before {
    transform: translateX(0);
}

hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 2.5rem 0;
    opacity: 0.25;
}

/* ==========================================================================
   3) Header & Navigation Shell
   ==========================================================================
*/

.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: var(--panel);
    border-bottom: 1px solid var(--border);

    height: var(--nav-height);
    transition: height 0.25s ease, box-shadow 0.25s ease;
    box-shadow: none;
}

.site-header.is-scrolled {
    height: var(--nav-height-scrolled);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.nav-inner {
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav-brand {
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    height: var(--nav-height);
    padding: 0 var(--nav-padding-x);
    transition: height 0.25s ease, font-size 0.25s ease;
}

/* Brand logo image scales with header height */
.nav-brand img {
    display: block;
    height: auto;
    max-height: calc(var(--nav-height) - 1.5rem);
    transition: max-height 0.25s ease, filter 0.25s ease, transform 0.25s ease;
}

.site-header.is-scrolled .nav-brand {
    height: var(--nav-height-scrolled);
    font-size: 1.1rem;
}

.site-header.is-scrolled .nav-brand img {
    max-height: calc(var(--nav-height-scrolled) - 1rem);
}

/* ==========================================================================
   4) Desktop Navigation – Menu & Dropdown
   ==========================================================================
*/

.nav-menu {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    padding: 0;
}

.nav-link {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    padding: 0 var(--nav-padding-x);
    color: var(--on-surface);
    text-decoration: none;
    font-size: 0.95rem;
    border-radius: 4px;
    transition: height 0.25s ease, background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
    white-space: nowrap;
}

.site-header.is-scrolled .nav-link {
    height: var(--nav-height-scrolled);
}

.nav-link:hover {
    background: var(--surface);
    color: var(--on-surface);
}

/* ---- Standard Dropdown (non-mega) ---- */

.nav-item--has-dropdown { position: relative; }

.dropdown-toggle::after {
    content: "▾";
    font-size: 0.7rem;
    margin-left: 0.35rem;
}

.dropdown-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    padding: 0.5rem;
    z-index: 50;
}

.nav-item--has-dropdown:hover .dropdown-panel,
.nav-item--has-dropdown:focus-within .dropdown-panel { display: block; }

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.5rem;
    text-decoration: none;
    color: var(--on-surface);
    font-size: 0.95rem;
    border-radius: 6px;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.dropdown-link:hover { background: var(--surface); color: var(--on-surface); }


/* ==========================================================================
   5) Mobile Navigation – Burger
   ==========================================================================
*/

.nav-burger {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
}

.nav-burger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--on-surface);
    position: relative;
}

.nav-burger span::before,
.nav-burger span::after {
    content: "";
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    background: var(--on-surface);
    transition: transform 0.2s ease, top 0.2s ease, opacity 0.2s ease;
}

.nav-burger span::before { top: -6px; }
.nav-burger span::after { top: 6px; }

.site-header.is-open .nav-burger span { opacity: 1; }
.site-header.is-open .nav-burger span::before { top: 0; transform: rotate(45deg); }
.site-header.is-open .nav-burger span::after { top: 0; transform: rotate(-45deg); }

/* ---- Mega Menu (desktop) ---- */

.nav-item--has-mega { position: static; }

.mega-toggle::after {
    content: "▾";
    font-size: 0.7rem;
    margin-left: 0.35rem;
}

.mega-panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: min(100%, var(--nav-max-width));
    background: var(--panel);
    border-top: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    padding-block: 1.5rem;
}

/* keep open while hovering toggle or panel (desktop) */
.nav-item--has-mega:hover .mega-panel,
.mega-panel:hover { display: block; }

.mega-inner { padding-inline: clamp(0.75rem, 1.5vw, 1.25rem); }

.mega-grid { display: flex; gap: clamp(1.25rem, 2vw, 2.25rem); }

.mega-col {
    flex: 1;
    min-width: 0;
    padding-inline: 0.75rem;
    padding-block: 0.75rem;
    display: flex;
    flex-direction: column;
    row-gap: 0.15rem;
}

@media (min-width: 769px) {
    .mega-grid .mega-col:not(.mega-col--promo) {
        flex: 0 0 clamp(160px, 18%, 220px);
        max-width: clamp(160px, 18%, 220px);
    }
    .mega-grid .mega-col--promo {
        flex: 1 1 auto;
        min-width: clamp(260px, 40%, 560px);
    }
}

.mega-col + .mega-col { border-left: 1px solid var(--border); padding-left: 1.25rem; }
.mega-col--promo { border-left: 0 !important; }

.nav-hero-icon {
    position: absolute;
    right: clamp(0.5rem, 2vw, 1rem);
    top: 25px;
    font-size: 15rem;
    line-height: 1;
    color: #ffffff;
    opacity: 0.08;
    z-index: 1;
}

.mega-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    color: var(--muted);
    letter-spacing: 0.06em;
}

.mega-link {
    display: block;
    padding: 0.35rem 0.25rem;
    text-decoration: none;
    color: var(--on-surface);
    font-size: 0.95rem;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.mega-link:hover { color: var(--on-surface); background: var(--surface); }

/* ---- Adaptive behavior breakpoints ---- */

@media (max-width: 768px) {
    .nav-burger { display: inline-flex; }
    .nav-menu { display: none !important; }
    .nav-link { height: auto; padding: 0.75rem var(--nav-padding-x); border-radius: 0; }
}

/* ---- Mobile Drawer Navigation ---- */
.mobile-overlay { display: none; }
.mobile-drawer { display: none; }

@media (max-width: 768px) {
    body.mobile-nav-open { overflow: hidden; }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        opacity: 0;
        transition: opacity 0.25s ease;
        z-index: 1000;
        display: block;
        pointer-events: none;
    }
    .mobile-overlay.is-active { opacity: 1; pointer-events: auto; }

    .mobile-drawer {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(88vw, 420px);
        background: var(--panel);
        box-shadow: -8px 0 24px rgba(0,0,0,0.15);
        transform: translateX(100%);
        transition: transform 0.28s ease;
        z-index: 1001;
        display: flex;
        flex-direction: column;
    }
    .mobile-drawer.is-active { transform: translateX(0); }

    .mobile-drawer__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1rem;
        border-bottom: 1px solid var(--border);
    }
    .mobile-drawer__title { font-weight: 700; font-size: 1.05rem; }
    .mobile-drawer__close {
        background: transparent;
        border: none;
        padding: 0.5rem;
        font-size: 1.25rem;
        cursor: pointer;
        color: var(--on-surface);
    }
    .mobile-drawer__content { overflow-y: auto; -webkit-overflow-scrolling: touch; }
    .mobile-drawer__list { list-style: none; padding: 0.25rem 0; margin: 0; }
    .mobile-drawer__link,
    .mobile-drawer__summary {
        display: block;
        /* more comfortable left padding for touch */
        padding: 0.95rem 1rem 0.95rem 1.25rem;
        font-size: 1.05rem;
        color: var(--on-surface);
        text-decoration: none;
    }
    .mobile-drawer__link:hover { background: var(--surface); }
    .mobile-drawer details { border-top: 1px solid var(--border); }
    .mobile-drawer details:first-child { border-top: none; }
    .mobile-drawer__summary { list-style: none; cursor: pointer; font-weight: 600; }
    .mobile-drawer__summary::-webkit-details-marker { display: none; }
    .mobile-drawer__summary::after { content: "▾"; float: right; color: var(--muted); }
    .mobile-drawer details[open] .mobile-drawer__summary::after { transform: rotate(180deg); }
    /* sub-links: increase left padding for clearer hierarchy */
    .mobile-drawer .sub-links a { display: block; padding: 0.7rem 1rem 0.7rem 2rem; color: var(--on-surface); }
    .mobile-drawer .sub-links a:hover { background: var(--surface); }
    .mobile-drawer__footer { padding: 1rem; border-top: 1px solid var(--border); }
    .mobile-drawer__cta { width: 100%; }

    /* Nested collapses inside Services */
    .mobile-drawer details details { border-top: 1px solid var(--border); }
    .mobile-drawer details details:first-child { border-top: none; }
    .mobile-drawer details details > .mobile-drawer__summary {
        padding-left: 1.75rem; /* indent nested group headers */
        font-weight: 600;
        font-size: 1rem;
    }
    .mobile-drawer details details .sub-links a {
        padding-left: 2.5rem; /* deeper indent for links within nested groups */
    }

    @media (prefers-reduced-motion: reduce) {
        .mobile-overlay { transition: none; }
        .mobile-drawer { transition: none; }
    }
}

/* ==========================================================================
   6) Bulma Overrides (Theme mapping)
   ==========================================================================
*/
.hero.is-primary { background-color: var(--primary) !important; }
.button.is-primary { background-color: var(--primary) !important; border-color: var(--primary) !important; color: var(--on-primary) !important; }
.button.is-primary:hover,
.button.is-primary.is-hovered { background-color: var(--primary-hover) !important; border-color: var(--primary-hover) !important; }
.button.is-primary:active,
.button.is-primary.is-active { background-color: var(--primary-active) !important; border-color: var(--primary-active) !important; }
.button.is-primary:focus,
.button.is-primary.is-focused { box-shadow: 0 0 0 0.125em var(--focus-ring) !important; }

/* Secondary button overrides */
.button.is-secondary { background-color: var(--secondary) !important; border-color: var(--secondary) !important; color: var(--on-secondary) !important; }
.button.is-secondary:hover,
.button.is-secondary.is-hovered { background-color: var(--secondary-hover) !important; border-color: var(--secondary-hover) !important; }
.button.is-secondary:active,
.button.is-secondary.is-active { background-color: var(--secondary-active) !important; border-color: var(--secondary-active) !important; }
.button.is-secondary:focus,
.button.is-secondary.is-focused { box-shadow: 0 0 0 0.125em var(--focus-ring) !important; }

/* Outlined variants */
.button.is-primary.is-outlined { background-color: transparent !important; color: var(--primary) !important; border-color: var(--primary) !important; }
.button.is-primary.is-outlined:hover,
.button.is-primary.is-outlined.is-hovered { background-color: var(--primary) !important; color: var(--on-primary) !important; border-color: var(--primary) !important; }

.button.is-secondary.is-outlined { background-color: transparent !important; color: var(--secondary) !important; border-color: var(--secondary) !important; }
.button.is-secondary.is-outlined:hover,
.button.is-secondary.is-outlined.is-hovered { background-color: var(--secondary) !important; color: var(--on-secondary) !important; border-color: var(--secondary) !important; }

/* Light variants (used in promo/hero blocks) */
.button.is-light { background-color: var(--surface) !important; color: var(--on-surface) !important; border-color: var(--border) !important; }
.button.is-light:hover,
.button.is-light.is-hovered { background-color: var(--panel) !important; }

.is-rounded-sm{border-radius: 5px}


/* ==========================================================================
   7) Hero Section
   ==========================================================================
*/
.site-hero {
    position: relative;
    background: url('../img/hero.jpg') center/cover no-repeat;
}

.site-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5); /* adjust to taste */
    pointer-events: none;
}


.site-hero .title{color: var(--on-primary);}

/* ==========================================================================
   8) Helpers (text/background helpers, tags)
   ==========================================================================
*/
/* Text helpers + hover states mapped to palette */
.has-text-primary { color: var(--primary) !important; }
a.has-text-primary:hover,
a.has-text-primary:focus { color: var(--primary-hover) !important; }

.has-text-secondary { color: var(--secondary) !important; }
a.has-text-secondary:hover,
a.has-text-secondary:focus { color: var(--secondary-hover) !important; }

/* Background helpers (extend with hover in common interactive contexts) */
.has-background-primary { background-color: var(--primary) !important; color: var(--on-primary) !important; }
.has-background-secondary { background-color: var(--secondary) !important; color: var(--on-secondary) !important; }

/* Tags */
.tag.is-primary { background-color: var(--primary) !important; color: var(--on-primary) !important; border-color: var(--primary) !important; }
.tag.is-primary.is-light { background-color: var(--surface) !important; color: var(--primary) !important; border-color: var(--border) !important; }

.tag.is-secondary { background-color: var(--secondary) !important; color: var(--on-secondary) !important; border-color: var(--secondary) !important; }
.tag.is-secondary.is-light { background-color: var(--surface) !important; color: var(--secondary) !important; border-color: var(--border) !important; }

/* ==========================================================================
   9) Footer
   ==========================================================================
*/
/* Footer styles */
.footer a { color: var(--footer-link); text-decoration: none; }
.footer a:hover { color: var(--footer-link-hover); text-decoration: underline; }
.footer .footer-heading { color: var(--color-bright-white); font-weight: 700; margin-bottom: .75rem; }
.footer .icon { margin-right: .35rem; }
.footer .list-compact li { margin: .35rem 0; }
.footer address { font-style: normal; }
@media (max-width: 768px) {
    .footer .column { margin-bottom: 1rem; }
}

/* ==========================================================================
   10) Sections – Map Embed & CTA
   ==========================================================================
*/
/* Map embed larger section */
.map-embed {
    position: relative;
    width: 100%;
    max-height: 400px;
    aspect-ratio: 3 / 2;
    --fallback-ratio: 66.6667%;
}
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@supports not (aspect-ratio: 3 / 2) {
    .map-embed { height: 0; padding-top: var(--fallback-ratio); }
}

/* Highlight CTA Section */
#cta-highlight {
    background: var(--primary);
    color: var(--on-primary);
}
#cta-highlight .title,
#cta-highlight .subtitle { color: var(--on-primary); }
#cta-highlight .button { transform: scale(1); transition: transform 0.2s ease-in-out; }
#cta-highlight .button:hover { transform: scale(1.05); }

/* ==========================================================================
   11) Components – Cards & Stars
   ==========================================================================
*/
/* ===== Cards: Benefits & Reviews ===== */
.card.benefit-card,
.card.review-card {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.06);
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (hover: hover) and (pointer: fine) {
    .card.benefit-card:hover,
    .card.benefit-card:focus-within,
    .card.review-card:hover,
    .card.review-card:focus-within {
        transform: translateY(-4px);
        box-shadow: 0 6px 18px rgba(0,0,0,0.12);
    }
}

.card.benefit-card:active,
.card.review-card:active {
    transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
    .card.benefit-card,
    .card.review-card {
        transition: box-shadow 0.2s ease;
    }
}

/* Review stars */
.review-stars {
    color: var(--accent);
    display: inline-flex;
    gap: 2px;
    line-height: 1;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.review-stars .icon { color: inherit; }

/* ==========================================================================
   12) Accessibility
   ==========================================================================
*/
/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   13) Sections – FAQ
   ==========================================================================
*/
.faq-section {
    background-color: var(--color-bright-white);
}

.faq-accordion {
    background: transparent;
}

.faq-item {
    margin-bottom: 16px;
    border: 1px solid var(--color-blanc-de-blanc);
    border-radius: 8px;
    overflow: hidden;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--color-classic-blue);
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-pageant-blue);

}

.faq-question:hover {
    color: var(--primary-hover);
}

.faq-icon {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--color-emberglow);
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
}

.faq-answer-content {
    padding: 0 24px 20px 24px;
}

.faq-answer-content p {
    color: var(--color-pageant-blue);
    line-height: 1.7;
    margin: 0;
}






/** TEST **/
.panel-block:hover:not(:last-child){background-color: rgba(0,0,0,0.1) !important; }