/* ==========================================================================
   Rayara Invisible Grills — Design System
   Palette grounded in the subject: taut steel wire, coastal humidity-proof
   hardware, and a calm/trustworthy home-safety register.
   ========================================================================== */

:root {
    --ink:          #e0650a;
    --ink-soft:     #737373;
    --primary:      #737373;
    --primary-dark: #737373;
    --accent:       #737373;
    --accent-soft:  #FFEADA;
    --brass:        #FD7A0D;
    --brass-soft:   #FFEADA;
    --paper:        #F5F3EE;
    --paper-alt:    #EDEAE1;
    --white:        #FFFFFF;
    --text:          #737373;
    --muted:        #5A6B73;
    --line:         #E1DED4;
    --whatsapp:     #1FAE59;
    --danger:       #B3432B;

    --font-head: 'Manrope', 'Segoe UI', sans-serif;
    --font-body: 'Inter', 'Segoe UI', sans-serif;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(11,31,42,0.06);
    --shadow-md: 0 8px 24px rgba(11,31,42,0.10);
    --shadow-lg: 0 20px 48px rgba(11,31,42,0.16);

    --container: 1240px;
}

/* ---- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--paper);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 {
    font-family: var(--font-head);
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 0.5em;
    color: var(--ink);
    letter-spacing: -0.01em;
}
p { margin: 0 0 1em; max-width: 68ch; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.skip-link {
    position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff;
    padding: 12px 18px; z-index: 999; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---- Buttons ------------------------------------------------------------ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 24px; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
    border: 1.5px solid transparent; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-md); }
.btn--brass { background: var(--brass); color: #fff; }
.btn--brass:hover { background: #0E6D57; box-shadow: var(--shadow-md); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn--whatsapp { background: var(--whatsapp); color: #fff; }
.btn--whatsapp:hover { background: #17924A; box-shadow: var(--shadow-md); }
.btn--sm { padding: 9px 18px; font-size: 0.85rem; }
.btn--block { width: 100%; }
.btn--on-dark.btn--ghost { color: #fff; border-color: rgba(255,255,255,0.35); }
.btn--on-dark.btn--ghost:hover { border-color: #fff; }

/* ---- Header / Nav -------------------------------------------------------- */
.site-header {
    position: sticky; top: 0; z-index: 100; background: rgba(245,243,238,0.92);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
}
.site-header__inner { display: flex; align-items: center; gap: 24px; padding: 12px 20px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; color: var(--ink); }
.brand__sub { font-size: 0.68rem; color: var(--accent); font-weight: 700; letter-spacing: 0.03em; }

.brand__mark { display: flex; flex-shrink: 0; }
.brand__mark img { width: 44px; height: auto; }

/* Desktop nav is hidden by default (mobile-first) and switched on at the
   breakpoint below, where the hamburger and off-canvas panel switch off. */
.main-nav { display: none; }
.main-nav > ul { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav > ul > li > a,
.has-mega__trigger {
    display: flex; align-items: center; gap: 4px; padding: 10px 14px; border-radius: 999px;
    font-weight: 600; font-size: 0.93rem; color: var(--ink); background: none; border: none;
    cursor: pointer;
}
.main-nav > ul > li > a:hover, .has-mega__trigger:hover { background: var(--paper-alt); }
.has-mega { position: relative; }
.chev { font-size: 0.7em; }
.mega-menu {
    display: none; position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%);
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
    padding: 22px; width: 560px; max-width: min(560px, calc(100vw - 32px));
    box-sizing: border-box; overflow: hidden; z-index: 50;
}
.mega-menu--simple { width: 320px; }
.has-mega:hover .mega-menu,
.has-mega:focus-within .mega-menu,
.has-mega.is-open-touch .mega-menu { display: block; }
.mega-menu__grid {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; max-width: 100%;
}
.mega-menu__col { min-width: 0; }
.mega-menu__heading { font-weight: 800; font-size: 0.9rem; color: var(--primary); display: block; margin-bottom: 10px; }
.mega-menu__col ul, .mega-menu__list { display: block; margin: 0; padding: 0; list-style: none; }
.mega-menu__col li, .mega-menu__list li { margin-bottom: 8px; }
.mega-menu__col a, .mega-menu__list a { display: block; padding: 4px 0; color: var(--muted); font-size: 0.85rem; }
.mega-menu__col a:hover, .mega-menu__list a:hover { color: var(--primary); }

/* ---- Header CTAs (Call / WhatsApp) --------------------------------------- */
/* Hidden on mobile — the off-canvas panel below has its own Call/WhatsApp
   buttons, so showing both here as well just crowds a narrow header. */
.site-header__cta { display: none; align-items: center; gap: 8px; }

/* ---- Mobile hamburger toggle ---------------------------------------------- */
.mobile-nav-toggle {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 5px; width: 40px; height: 40px; padding: 0; margin-left: auto;
    background: none; border: none; border-radius: var(--radius-sm); flex-shrink: 0;
}
.mobile-nav-toggle:hover { background: var(--paper-alt); }
.mobile-nav-toggle span {
    display: block; width: 22px; height: 2px; background: var(--ink);
    border-radius: 2px; transition: transform .2s ease, opacity .2s ease;
}
.mobile-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mobile-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Mobile off-canvas nav panel ------------------------------------------ */
.mobile-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 100%); overflow-y: auto; z-index: 95;
}
.mobile-nav.is-open { display: block; }
.mobile-nav > ul { padding: 8px 20px 4px; }
.mobile-nav > ul > li { border-bottom: 1px solid var(--line); }
.mobile-nav > ul > li > a {
    display: block; padding: 14px 4px; font-weight: 700; font-size: 0.98rem; color: var(--ink);
}
.mobile-nav__accordion-trigger {
    width: 100%; display: flex; align-items: center; justify-content: space-between;
    padding: 14px 4px; background: none; border: none; font-weight: 700; font-size: 0.98rem;
    color: var(--ink); text-align: left;
}
.mobile-nav__accordion-trigger .chev { transition: transform .2s ease; }
.mobile-nav__accordion-trigger[aria-expanded="true"] .chev { transform: rotate(180deg); }
.mobile-nav__accordion-panel { display: none; padding: 0 4px 12px 12px; }
.mobile-nav__accordion-panel.is-open { display: block; }
.mobile-nav__accordion-heading { font-weight: 800; font-size: 0.82rem; color: var(--primary); margin: 10px 0 6px; }
.mobile-nav__accordion-sublist { margin-bottom: 6px; }
.mobile-nav__accordion-sublist li { padding: 0; }
.mobile-nav__accordion-sublist a { display: block; padding: 7px 0; font-size: 0.9rem; color: var(--muted); }
.mobile-nav__cta { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px 20px; }

/* ---- Breakpoint: switch from mobile off-canvas nav to desktop nav -------- */
@media (min-width: 960px) {
    .main-nav { display: block; }
    .site-header__cta { display: flex; }
    .mobile-nav-toggle { display: none; }
    .mobile-nav { display: none !important; }
}

/* ---- Sections & spacing ------------------------------------------------- */
.section { padding: 56px 0; }
.section--alt { background: #fff; }
@media (min-width: 640px) { .section { padding: 80px 0; } }

/* ---- FAQ ----------------------------------------------------------------- */
.faq-items { display: flex; flex-direction: column; gap: 8px; }
.faq-item {
    border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 20px;
    background: #fff; margin-bottom: 0;
}
.faq-item__summary {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer;
    font-weight: 700; font-size: 1rem; color: var(--ink);
}
.faq-item__icon { flex-shrink: 0; transition: transform .2s ease; color: var(--primary); }
.faq-item[open] .faq-item__icon { transform: rotate(45deg); }
.faq-item__a { padding: 0 4px 20px; color: var(--muted); max-width: 70ch; }
.faq-item summary { list-style: none; cursor: pointer; }
.faq-item summary::-webkit-details-marker { display: none; }

/* ---- Location coverage ------------------------------------------------- */
.location-chip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .location-chip-grid { grid-template-columns: repeat(5, 1fr); } }
.location-chip {
    display: flex; align-items: center; gap: 8px; padding: 14px; border-radius: var(--radius-sm);
    background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 0.88rem;
}
.location-chip:hover { border-color: var(--primary); color: var(--primary); }
.location-chip svg { color: var(--brass); flex-shrink: 0; }

/* ---- Forms ----------------------------------------------------------------- */
.contact-form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 30px; box-shadow: var(--shadow-md); }
.contact-form-card h3 { margin-bottom: 6px; }
.contact-form-card__sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 20px; }
.form-row { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-weight: 700; font-size: 0.87rem; color: var(--ink); }
.form-row input, .form-row select, .form-row textarea {
    padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font: inherit; color: var(--text); background: var(--paper);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--primary); outline: none; background: #fff; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: 0.8rem; color: var(--muted); margin-top: 12px; text-align: center; }
.form-alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 0.9rem; margin-bottom: 18px; }
.form-alert--success { background: var(--brass-soft); color: #0B5C46; }
.form-alert--error { background: #F7E4DD; color: var(--danger); }

/* ---- Footer ------------------------------------------------------------------ */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.82); padding: 64px 0 0; }
.footer__grid { display: grid; grid-template-columns: 1fr; gap: 36px; padding-bottom: 44px; }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1080px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr 1fr 1.1fr; } }
.footer__col h3 { color: #fff; font-size: 0.9rem; text-transform: none; margin-bottom: 14px; }
.footer__col ul li { margin-bottom: 9px; }
.footer__col ul li a { font-size: 0.9rem; color: rgba(255,255,255,0.68); }
.footer__col ul li a:hover { color: #fff; }
.footer__desc { font-size: 0.9rem; color: rgba(255,255,255,0.65); max-width: 34ch; margin: 14px 0 18px; }
.brand--footer .brand__name { color: #fff; }
.footer__social-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.footer__col--contact address { font-style: normal; font-size: 0.9rem; color: rgba(255,255,255,0.68); margin-bottom: 10px; }
.footer__col--contact a { font-size: 0.9rem; color: rgba(255,255,255,0.85); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 20px 0; }
.footer__bottom-inner { display: flex; flex-direction: column; gap: 10px; font-size: 0.8rem; color: rgba(255,255,255,0.55); }
.footer__bottom-inner a { color: rgba(255,255,255,0.7); }
.footer__bottom-inner a:hover { color: #fff; }
@media (min-width: 700px) { .footer__bottom-inner { flex-direction: row; justify-content: space-between; } }

/* ---- Floating CTA ------------------------------------------------------------ */
.floating-cta { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.floating-cta__btn {
    width: 56px; height: 56px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #fff; box-shadow: var(--shadow-lg); font-size: 0.6rem; font-weight: 700; gap: 1px;
}
.floating-cta__btn--call { background: var(--primary); }
.floating-cta__btn--whatsapp { background: var(--whatsapp); }
body { padding-bottom: 0; }

/* ---- Gallery ------------------------------------------------------------------ */
.gallery-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.gallery-tabs button {
    padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 700; font-size: 0.85rem; color: var(--muted);
    cursor: pointer; transition: all 0.2s ease;
}
.gallery-tabs button.is-active, .gallery-tabs button:hover { border-color: var(--primary); color: var(--primary); background: var(--paper-alt); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

/* Gallery items with real images */
.gallery-item {
    border-radius: var(--radius-md); overflow: hidden; aspect-ratio: 4/3; 
    position: relative; background: linear-gradient(160deg, #123249, #0B2233);
    display: flex; align-items: center; justify-content: center;
}
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.gallery-item span {
    position: absolute; left: 12px; bottom: 12px; color: #fff; 
    font-weight: 700; font-size: 0.82rem; background: rgba(11,31,42,0.7); 
    padding: 5px 10px; border-radius: 999px; z-index: 2;
}

/* ---- Media placeholders (used until real photography is added) ------------------ */
.media-placeholder {
    position: relative; border-radius: var(--radius-md); overflow: hidden;
    background: linear-gradient(160deg, #123249, #0B2233); aspect-ratio: 4/3;
}
.media-placeholder--wide { aspect-ratio: 16/9; }
.media-placeholder--square { aspect-ratio: 1/1; }
.media-placeholder__wires { position: absolute; inset: 0; background-image: repeating-linear-gradient(90deg, rgba(255,255,255,0.35) 0 1px, transparent 1px 18px); }
.media-placeholder span { position: absolute; left: 12px; bottom: 12px; color: #fff; font-weight: 700; font-size: 0.82rem; background: rgba(11,31,42,0.6); padding: 5px 10px; border-radius: 999px; }
.media-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.compare__panel,
.compare__panel--before,
.compare__panel--after {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: transparent !important;
}

.compare__wires {
    display: none !important;
}

.compare__panel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.compare__panel span {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.65);
    color: #fff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 2;
}
/* ---- Image cover utility --------------------------------------------------
   Apply class="img-cover" to any <img> whose parent has a set width/height
   or aspect-ratio (a hero banner, a content block, a custom card, etc.) and
   the photo — whatever you upload, any dimensions — will fill that box
   and crop to fit rather than stretching or leaving empty space.
   .media-placeholder img and .gallery-item img already behave this way by
   default, so you don't need to add the class to images inside those. */
.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- Action cards: image + short content + Call/WhatsApp CTAs ------------------- */
.action-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
    overflow: hidden; display: flex; flex-direction: column; height: 100%;
}
.action-card .media-placeholder { border-radius: 0; aspect-ratio: 4/3; }
.action-card__body { padding: 20px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.action-card__body h3 { font-size: 1.02rem; margin-bottom: 2px; }
.action-card__body p { color: var(--muted); font-size: 0.88rem; margin-bottom: 4px; }
.action-card__link { color: var(--primary); font-weight: 700; font-size: 0.85rem; }
.action-card__actions { margin-top: auto; padding-top: 10px; display: flex; gap: 8px; }
.action-card__actions .btn { flex: 1; padding: 9px 10px; font-size: 0.78rem; }

/* ---- Location cards (grid version, richer than the plain chip) ------------------- */
.location-card-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 640px) { .location-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .location-card-grid { grid-template-columns: repeat(5, 1fr); } }

/* ---- Utility -------------------------------------------------------------------- */
.stat-row { display: flex; flex-wrap: wrap; gap: 30px; }
.stat { min-width: 140px; }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.8rem; color: var(--ink); }
.stat span { color: var(--muted); font-size: 0.85rem; }
.divider { height: 1px; background: var(--line); margin: 56px 0; border: none; }
.two-col { display: grid; gap: 40px; grid-template-columns: 1fr; }
@media (min-width: 940px) { .two-col { grid-template-columns: 1.2fr 0.8fr; align-items: start; } }
.two-col--reverse { direction: rtl; }
.two-col--reverse > * { direction: ltr; }
.icon-list li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; font-size: 0.95rem; }
.icon-list li svg { color: var(--brass); flex-shrink: 0; margin-top: 3px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list li { background: var(--paper-alt); border-radius: 999px; padding: 6px 14px; font-size: 0.82rem; font-weight: 600; color: var(--ink); }
.note-box { background: var(--accent-soft); border: 1px solid rgba(253,122,13,0.3); border-radius: var(--radius-md); padding: 18px 22px; font-size: 0.92rem; color: #0B5C46; }
.cta-band { background: var(--primary); border-radius: var(--radius-lg); padding: 40px; color: #fff; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.cta-band h3 { color: #fff; margin-bottom: 6px; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 0; }
.cta-band__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.page-hero { background: var(--ink); color: #fff; padding: 44px 0; }
.page-hero h1 { color: #fff; margin-bottom: 10px; font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
.page-hero p { color: rgba(255,255,255,0.75); margin: 0; max-width: 60ch; }
.related-list { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .related-list { grid-template-columns: 1fr 1fr; } }
.related-list a { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; font-weight: 700; color: var(--ink); }
.related-list a:hover { border-color: var(--primary); color: var(--primary); }
.related-list a span { display: block; font-weight: 400; color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
/* ==========================================================================
   ADDITIONAL DESIGN SYSTEM RULES
   The classes below are used throughout the PHP templates (homepage,
   service/location/combo pages) but were missing from the stylesheet,
   which caused sections to collapse to unstyled full-width blocks and
   images to render at huge, uncontained sizes. This section restores a
   consistent, responsive layout system across desktop and mobile.
   ========================================================================== */

/* ---- Header logo (bigger, per brand refresh) ----------------------------- */
.brand { display: flex; align-items: center; margin-right: auto; }
.brand__logo { height: 50px; width: auto; display: block; }
@media (min-width: 640px) { .brand__logo { height: 60px; } }
@media (min-width: 960px) { .brand__logo { height: 68px; } }

.brand--footer { margin-bottom: 6px; display: inline-flex; }
.brand__logo-badge {
    display: inline-flex; align-items: center; background: #fff;
    padding: 12px 18px; border-radius: var(--radius-md); box-shadow: var(--shadow-md);
}
.brand__logo-badge img { height: 56px; width: auto; display: block; }
@media (min-width: 640px) { .brand__logo-badge img { height: 64px; } }

/* ---- Locations mega-menu (two columns: areas + popular service+location) - */
.mega-menu--locations { width: 480px; max-width: min(480px, calc(100vw - 32px)); }
.mega-menu__loc-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mega-menu__heading--static { font-weight: 800; font-size: 0.9rem; color: var(--primary); display: block; margin-bottom: 10px; cursor: default; }
.mega-menu__view-all { color: var(--accent) !important; font-weight: 700 !important; margin-top: 4px; }

/* ---- Grid utility ---------------------------------------------------------
   Generic responsive grid used for service/action-card rows across the
   homepage, category pages, location pages and combo pages. */
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }
@media (min-width: 620px) {
    .grid--2 { grid-template-columns: repeat(2, 1fr); }
    .grid--3 { grid-template-columns: repeat(2, 1fr); }
    .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
    .grid--3 { grid-template-columns: repeat(3, 1fr); }
    .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Section heading (eyebrow + h2 + optional lede) ----------------------- */
.section__head { margin-bottom: 36px; max-width: 680px; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section__head p { color: var(--muted); margin: 0; }
.section--tight { padding: 32px 0; }
.section--ink { background: var(--ink); color: rgba(255,255,255,0.85); }
.section--ink h2, .section--ink h3, .section--ink h4 { color: #fff; }
.section--ink .section__head p { color: rgba(255,255,255,0.68); }

/* ---- Eyebrow / short heading / tag-line label -----------------------------
   Uses the brand accent color for short kicker headings and tag lines,
   per brand guidelines. */
.eyebrow-label {
    display: inline-block; color: var(--accent); font-family: var(--font-head);
    font-weight: 800; font-size: 0.78rem; letter-spacing: 0.07em; text-transform: uppercase;
    margin-bottom: 10px;
}

/* ---- Category band (homepage service-category rows) ----------------------- */
.category-band { margin-bottom: 52px; }
.category-band:last-child { margin-bottom: 0; }
.category-band__head {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
    gap: 14px; margin-bottom: 22px;
}
.category-band__head p { color: var(--muted); margin: 6px 0 0; max-width: 56ch; }

/* ---- Trust strip / trust items (icon + heading + copy) --------------------- */
.trust-strip { display: grid; gap: 26px; grid-template-columns: 1fr; margin-top: 8px; }
@media (min-width: 620px) { .trust-strip { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .trust-strip { grid-template-columns: repeat(3, 1fr); } }
.trust-item { display: flex; gap: 14px; align-items: flex-start; }
.trust-item__icon {
    flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-soft); color: var(--accent);
}
.section--ink .trust-item__icon { background: rgba(255,255,255,0.12); color: var(--accent); }
.trust-item h4 { margin-bottom: 4px; font-size: 1rem; }
.trust-item p { margin: 0; color: var(--muted); font-size: 0.9rem; }
.section--ink .trust-item p { color: rgba(255,255,255,0.7); }

/* Grid variant of trust items (used in the "Trust indicators" band, which
   is wrapped in .grid.grid--3 rather than .trust-strip) */
.grid .trust-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; }
.section--tight .trust-item { align-items: center; }

/* ---- Installation process steps -------------------------------------------- */
.process { display: grid; gap: 18px; grid-template-columns: 1fr; counter-reset: step; margin-top: 8px; }
@media (min-width: 620px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .process { grid-template-columns: repeat(3, 1fr); } }
.process__item {
    position: relative; background: #fff; border: 1px solid var(--line);
    border-radius: var(--radius-md); padding: 26px 20px 20px; counter-increment: step;
}
.process__item::before {
    content: counter(step); position: absolute; top: -14px; left: 20px;
    width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff;
    font-weight: 800; font-family: var(--font-head); font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}
.process__item h4 { margin: 8px 0 6px; font-size: 1rem; }
.process__item p { margin: 0; color: var(--muted); font-size: 0.89rem; }

/* ---- Testimonial placeholder ------------------------------------------------ */
.testimonial-placeholder {
    background: #fff; border: 1.5px dashed var(--line); border-radius: var(--radius-md);
    padding: 44px 28px; text-align: center; color: var(--muted); font-size: 0.95rem;
    max-width: 640px; margin: 0 auto;
}

/* ---- Breadcrumbs -------------------------------------------------------------- */
.breadcrumbs { max-width: var(--container); margin: 0 auto; padding: 14px 20px 0; }
.breadcrumbs ol { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.82rem; margin: 0; padding: 0; }
.breadcrumbs li { display: flex; align-items: center; gap: 6px; }
.breadcrumbs a { color: var(--muted); font-weight: 600; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 700; }
.breadcrumbs__sep { color: #C7C2B2; }

/* ---- FAQ list alias (some templates use faq-list / faq-item__q instead of
   faq-items / faq-item__summary — keep both working identically) ------------- */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item__q {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    cursor: pointer; font-weight: 700; font-size: 1rem; color: var(--ink); list-style: none;
}
.faq-item__q::-webkit-details-marker { display: none; }

/* ---- Footer brand column ----------------------------------------------------- */
.footer__col--brand { max-width: 360px; }

/* ==========================================================================
   HERO CAROUSEL (homepage) — video/image background carousel with fixed
   overlay content, manual arrows + dots, and auto-advance. Drop your own
   video files into the <source> tags in index.php; this component is fully
   responsive from small phones through wide desktop screens.
   ========================================================================== */
.hero-carousel {
    position: relative; overflow: hidden; min-height: 560px;
    display: flex; align-items: center; background: var(--ink);
}
.hero-carousel__track { position: absolute; inset: 0; }
.hero-carousel__slide {
    position: absolute; inset: 0; opacity: 0; visibility: hidden;
    transition: opacity 1s ease;
}
.hero-carousel__slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.hero-carousel__media { width: 100%; height: 100%; object-fit: cover; display: block; background: var(--ink); }
.hero-carousel__tag {
    position: absolute; left: 20px; bottom: 20px; z-index: 2;
    background: rgba(0,20,40,0.6); color: #fff; font-weight: 700; font-size: 0.75rem;
    padding: 6px 14px; border-radius: 999px; letter-spacing: 0.01em;
}
.hero-carousel__scrim {
    position: absolute; inset: 0; z-index: 1;
}
.hero-carousel__content { position: relative; z-index: 2; padding: 96px 20px 76px; max-width: 700px; }
.hero-carousel h1 { color: #fff; font-size: clamp(1.7rem, 4vw, 2.7rem); margin-bottom: 14px; }
.hero__eyebrow {
    display: inline-flex; align-items: center; gap: 8px; background: rgba(253,122,13,0.16);
    color: var(--accent); font-weight: 700; font-size: 0.78rem; padding: 8px 14px;
    border-radius: 999px; margin-bottom: 18px;
}
.hero__lede { font-size: 1.02rem; color: rgba(255,255,255,0.86); max-width: 56ch; margin-bottom: 26px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.hero__trust { display: flex; flex-wrap: wrap; gap: 16px 26px; }
.hero__trust-item { display: flex; align-items: center; gap: 8px; font-size: 0.83rem; color: rgba(255,255,255,0.8); font-weight: 600; }
.hero__trust-item svg { color: var(--accent); flex-shrink: 0; }

.hero-carousel__arrow {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.32); color: #fff; display: none;
    align-items: center; justify-content: center; backdrop-filter: blur(4px);
}
.hero-carousel__arrow:hover { background: rgba(255,255,255,0.3); }
.hero-carousel__arrow--prev { left: 14px; }
.hero-carousel__arrow--next { right: 14px; }
@media (min-width: 700px) { .hero-carousel__arrow { display: flex; } }

.hero-carousel__dots { position: absolute; z-index: 3; left: 50%; transform: translateX(-50%); bottom: 16px; display: flex; gap: 8px; }
.hero-carousel__dots button { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.42); border: none; padding: 0; }
.hero-carousel__dots button.is-active { background: var(--accent); width: 22px; border-radius: 999px; }

@media (min-width: 640px) {
    .hero-carousel { min-height: 620px; }
    .hero-carousel__content { padding: 130px 20px 100px; }
}
@media (min-width: 980px) {
    .hero-carousel { min-height: 660px; }
}

/* ---- Small polish: brass/accent button hover should stay in the orange
   family (previously fell back to an unrelated green on hover) ------------- */
.btn--brass:hover { background: #E06A00; box-shadow: var(--shadow-md); }

/* ==========================================================================
   DYNAMIC / INTERACTIVE POLISH
   Pure CSS + JS enhancements layered on top of the existing design system —
   no markup, content, images or page structure were changed. Everything
   here is driven by assets/js/main.js, which tags existing elements at
   runtime, plus a few new small UI pieces (scroll progress bar, back-to-top
   button, ripple) that main.js injects into the page itself.
   ========================================================================== */

/* ---- Sticky header: gains depth + shrinks slightly once you scroll ------- */
.site-header { transition: box-shadow .25s ease, background-color .25s ease; }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(11,31,42,0.10); background: rgba(245,243,238,0.98); }
.site-header.is-scrolled .brand__logo { height: 44px; }
@media (min-width: 640px) { .site-header.is-scrolled .brand__logo { height: 50px; } }
@media (min-width: 960px) { .site-header.is-scrolled .brand__logo { height: 54px; } }
.brand__logo { transition: height .25s ease; }

/* ---- Thin scroll-progress bar, injected at the very top of the page ------ */
.scroll-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--ink-soft));
    z-index: 200; transition: width .1s linear; pointer-events: none;
}

/* ---- Back-to-top button, injected by JS, mirrors the floating CTA style -- */
.back-to-top {
    position: fixed; left: 16px; bottom: 16px; z-index: 90;
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
    background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease, visibility .25s, border-color .2s ease, color .2s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--primary); color: var(--primary); }
@media (min-width: 640px) { .back-to-top { left: 20px; bottom: 20px; } }

/* ---- Generic scroll-reveal: elements fade + rise into place once visible - */
[data-reveal] {
    opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease;
    transition-delay: var(--reveal-delay, 0s);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
[data-reveal="fade"] { transform: none; }
[data-reveal="left"] { transform: translateX(-24px); }
[data-reveal="left"].is-visible { transform: translateX(0); }
[data-reveal="right"] { transform: translateX(24px); }
[data-reveal="right"].is-visible { transform: translateX(0); }
[data-reveal="scale"] { transform: scale(0.94); }
[data-reveal="scale"].is-visible { transform: scale(1); }

/* ---- Section headings get a small accent rule that draws in ------------- */
.section__head { position: relative; }

/* ---- Card / tile hover polish -------------------------------------------- */
.action-card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.action-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--line); }
.action-card .media-placeholder { position: relative; }
.action-card .media-placeholder img { transition: transform .5s ease; }
.action-card:hover .media-placeholder img { transform: scale(1.06); }

.gallery-item { transition: box-shadow .25s ease; }
.gallery-item img { transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.07); }
.gallery-item:hover { box-shadow: var(--shadow-lg); }
.gallery-item.is-filtered-out { display: none !important; }
.gallery-item.is-filtering-out { opacity: 0; transform: scale(0.96); }
.gallery-item.is-filtering-in { animation: galleryFadeIn .45s ease both; }
@keyframes galleryFadeIn { from { opacity: 0; transform: scale(0.96); } to { opacity: 1; transform: scale(1); } }
.gallery-grid { transition: none; }

.trust-item, .process__item, .location-chip, .related-list a {
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, color .22s ease;
}
.grid .trust-item:hover, .process__item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--line); }
.location-chip:hover, .related-list a:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.process__item::before { transition: transform .25s ease; }
.process__item:hover::before { transform: scale(1.12); }

/* ---- "Learn more →" style links: arrow slides on hover -------------------- */
.action-card__link { display: inline-flex; align-items: center; gap: 4px; transition: gap .2s ease, color .2s ease; }
.action-card__link:hover { color: var(--accent); gap: 8px; }

/* ---- Buttons: subtle press feedback + ripple ------------------------------ */
.btn { position: relative; overflow: hidden; }
.btn:active { transform: translateY(0) scale(0.98); }
.btn__ripple {
    position: absolute; border-radius: 50%; background: rgba(255,255,255,0.55);
    transform: scale(0); pointer-events: none; animation: btnRipple .55s ease-out forwards;
}
@keyframes btnRipple { to { transform: scale(2.6); opacity: 0; } }

/* ---- Nav links: animated underline on hover ------------------------------- */
.main-nav > ul > li > a { position: relative; }
.main-nav > ul > li > a::after {
    content: ''; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 2px;
    background: var(--accent); transform: scaleX(0); transform-origin: left;
    transition: transform .22s ease;
}
.main-nav > ul > li > a:hover::after { transform: scaleX(1); }

/* ---- Mega menus: smooth fade + rise instead of an abrupt display toggle -- */
.mega-menu {
    display: block; opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateX(-50%) translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.has-mega:hover .mega-menu,
.has-mega:focus-within .mega-menu,
.has-mega.is-open-touch .mega-menu {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0);
}

/* ---- FAQ: JS-driven smooth expand/collapse (works with native <details>) - */
.faq-item__a { overflow: hidden; transition: max-height .32s ease, opacity .28s ease, padding-top .32s ease; }
.faq-item { transition: border-color .2s ease, box-shadow .2s ease; }
.faq-item.is-open { border-color: var(--line); box-shadow: var(--shadow-sm); }
.faq-item__icon { transition: transform .3s ease; }

/* ---- Images fade in once loaded, instead of popping in abruptly ---------- */
img.js-fade { opacity: 0; transition: opacity .5s ease; }
img.js-fade.is-loaded { opacity: 1; }

/* ---- Hero carousel: gentle Ken Burns drift on the active slide's media --- */
.hero-carousel__media { transform: scale(1); transition: transform 7s linear; }
.hero-carousel__slide.is-active .hero-carousel__media { transform: scale(1.07); }
.hero-carousel__content > * { opacity: 0; transform: translateY(14px); animation: heroContentIn .7s ease forwards; }
.hero-carousel__content .hero__eyebrow { animation-delay: .05s; }
.hero-carousel__content h1 { animation-delay: .15s; }
.hero-carousel__content .hero__lede { animation-delay: .25s; }
.hero-carousel__content .hero__ctas { animation-delay: .35s; }
.hero-carousel__content .hero__trust { animation-delay: .45s; }
@keyframes heroContentIn { to { opacity: 1; transform: translateY(0); } }
.hero-carousel__dots button { position: relative; overflow: hidden; }
.hero-carousel__dots button.is-active::after {
    content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.55);
    transform-origin: left; transform: scaleX(0); animation: heroDotFill 6s linear forwards;
}
@keyframes heroDotFill { to { transform: scaleX(1); } }

/* ---- Floating CTA: soft attention pulse on the call button --------------- */
.floating-cta__btn--call { position: relative; }
.floating-cta__btn--call::before {
    content: ''; position: absolute; inset: -6px; border-radius: 50%;
    border: 2px solid var(--primary); opacity: 0; animation: ctaPulse 3.2s ease-out infinite;
}
@keyframes ctaPulse {
    0% { opacity: 0.45; transform: scale(0.9); }
    70% { opacity: 0; transform: scale(1.35); }
    100% { opacity: 0; transform: scale(1.35); }
}

/* ---- Stat numbers: give the counted value a touch of weight while it counts */
.stat strong { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
    .hero-carousel__content > * { animation: none !important; opacity: 1 !important; transform: none !important; }
    .hero-carousel__media { transition: none !important; transform: none !important; }
    .hero-carousel__dots button.is-active::after { animation: none !important; }
    .floating-cta__btn--call::before { animation: none !important; display: none; }
}
