/* ═══════════════════════════════════════════════════════════════════
   LOCALI BUILDERS - Mobile-First Overlay
   Loaded AFTER main.css. Fixes global mobile issues without
   touching the 3210-line legacy stylesheet.
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tokens: dramatically smaller on mobile, scale up ───────────── */
:root {
    --lc-section-gap: clamp(48px, 9vw, 120px);
    --lc-section-gap-tight: clamp(32px, 6vw, 80px);
    --lc-wrap-pad: clamp(16px, 4vw, 32px);
    --lc-stack-gap: clamp(16px, 3vw, 32px);
    --tap-min: 44px;
}

/* ── Reset overflow hazards ─────────────────────────────────────── */
html, body { overflow-x: hidden; max-width: 100vw; }
img, video, iframe, svg { max-width: 100%; height: auto; }

/* ── Wrapper: fluid padding instead of fixed 20px ──────────────── */
.lc-wrapper { padding-left: var(--lc-wrap-pad); padding-right: var(--lc-wrap-pad); }

/* ── Sections: cut vertical waste on mobile ─────────────────────── */
.lc-section { padding-top: var(--lc-section-gap); padding-bottom: var(--lc-section-gap); }

/* ── Touch targets ───────────────────────────────────────────────── */
.lc-btn,
.lc-header__ai-btn,
.lc-mega__phone,
.lc-link-arrow,
.lc-announce__close,
.lc-mobile-nav__close,
.lc-mobile-nav__toggle {
    min-height: var(--tap-min);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.lc-hamburger,
.lc-mobile-nav__close,
.lc-announce__close { min-width: var(--tap-min); }

/* ── Forms: 16px font prevents iOS auto-zoom ───────────────────── */
input, textarea, select {
    font-size: 16px !important;
    min-height: 48px;
}
textarea { min-height: 96px; }
button[type="submit"], .lc-btn[type="submit"] {
    min-height: var(--tap-min);
    font-size: 15px;
}

/* ═══════════════════════════════════════════════════════════════════
   HEADER & NAVIGATION
   ═══════════════════════════════════════════════════════════════════ */

/* Mobile (< 1024px): show hamburger, hide desktop nav + actions */
@media (max-width: 1023px) {
    .lc-header { padding: 12px 0; }
    .lc-header__logo { height: 38px !important; }
    .lc-nav { display: none; }
    .lc-header__actions { display: none; }
    .lc-hamburger {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        margin-left: auto;
        padding: 10px;
        background: transparent;
        border: 0;
        cursor: pointer;
    }
    .lc-hamburger span {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--text-primary);
        transition: transform 0.3s ease, opacity 0.3s ease;
    }
    .lc-header--transparent .lc-hamburger span { background: #fff; }
    .lc-header.lc-header--scrolled .lc-hamburger span { background: var(--text-primary); }
    .lc-header__inner { gap: 12px; }
    .lc-header__brand { margin-right: auto; }
}

/* Desktop (>= 1024px): hide hamburger + mobile-nav, show desktop chrome */
@media (min-width: 1024px) {
    .lc-hamburger { display: none !important; }
    .lc-mobile-nav, .lc-mobile-nav__overlay { display: none !important; }
}

/* Mobile Nav: full-screen drawer */
.lc-mobile-nav {
    position: fixed;
    top: 0; right: 0;
    width: min(360px, 88vw);
    height: 100vh;
    height: 100dvh;
    background: #fff;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -10px 0 40px rgba(0,0,0,0.15);
}
.lc-mobile-nav.lc-mobile-nav--open,
.lc-mobile-nav.is-open { transform: translateX(0); }
.lc-mobile-nav__overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.lc-mobile-nav__overlay.lc-mobile-nav__overlay--visible,
.lc-mobile-nav__overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}
.lc-mobile-nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}
.lc-mobile-nav__close {
    background: transparent; border: 0;
    font-size: 30px; line-height: 1;
    color: var(--text-primary);
    padding: 4px 10px;
    cursor: pointer;
}
.lc-mobile-nav__body { padding: 14px 0; flex: 1; }
.lc-mobile-nav__list {
    list-style: none; margin: 0; padding: 0;
}
.lc-mobile-nav__list li a,
.lc-mobile-nav__submenu li a {
    display: flex; align-items: center;
    padding: 14px 22px;
    font-size: 17px;
    font-weight: 500;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    min-height: var(--tap-min);
}
.lc-mobile-nav__list li a:hover,
.lc-mobile-nav__list li.current-menu-item > a { color: var(--green-primary); background: var(--bg-secondary); }
.lc-mobile-nav__toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 22px;
    font-size: 17px;
    font-weight: 500;
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(0,0,0,0.04);
    color: var(--text-primary);
    cursor: pointer;
}
.lc-mobile-nav__toggle i { transition: transform 0.3s ease; }
.lc-mobile-nav__toggle[aria-expanded="true"] i,
.lc-mobile-nav__toggle.lc-mobile-nav__toggle--open i { transform: rotate(180deg); }
.lc-mobile-nav__submenu {
    list-style: none; margin: 0; padding: 0;
    max-height: 0; overflow: hidden;
    transition: max-height 0.4s ease;
    background: var(--bg-secondary);
}
.lc-mobile-nav__submenu.lc-mobile-nav__submenu--open,
.lc-mobile-nav__submenu.is-open { max-height: 1200px; }
.lc-mobile-nav__submenu li a { padding-left: 38px; font-size: 15px; }
.lc-mobile-nav__all-services { color: var(--green-primary) !important; font-weight: 600; }
.lc-mobile-nav__footer {
    padding: 18px 22px;
    border-top: 1px solid var(--border-light);
    display: flex; flex-direction: column; gap: 10px;
    flex-shrink: 0;
    background: #fff;
}
.lc-mobile-nav__footer .lc-btn { width: 100%; justify-content: center; }
body.lc-nav-open { overflow: hidden; }

/* ═══════════════════════════════════════════════════════════════════
   HERO (front-page + LP heros)
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .lc-hero { min-height: auto; padding: 88px 0 56px; }
    .lc-hero__grid {
        display: flex !important;
        flex-direction: column;
        gap: 28px;
    }
    .lc-hero__grid-left, .lc-hero__grid-right { width: 100%; }
    .lc-hero__title {
        font-size: clamp(2rem, 8vw, 2.6rem) !important;
        line-height: 1.15;
    }
    .lc-hero__subtitle {
        font-size: 16px !important;
        line-height: 1.55;
    }
    .lc-hero__ctas {
        display: flex; flex-direction: column; gap: 12px;
    }
    .lc-hero__ctas .lc-btn { width: 100%; }
    .lc-hero__phone-line { font-size: 15px; text-align: center; }
    .lc-hero__form-card {
        padding: 22px 18px !important;
        border-radius: 12px;
    }
    .lc-trust-pills {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .lc-trust-pill {
        padding: 10px 12px !important;
        font-size: 12px;
    }
    .lc-trust-pill strong { font-size: 13px; }
    .lc-trust-pill span { font-size: 11px; }
    .lc-trust-pill i { font-size: 14px; }
}

/* ═══════════════════════════════════════════════════════════════════
   GRIDS — force single column mobile, scale up
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .lc-services-grid,
    .lc-projects-grid,
    .lc-blog-grid,
    .lc-team-grid,
    .lc-testimonials-grid,
    .lc-features-grid,
    .lc-stats-grid,
    .lc-gallery-grid,
    .lc-process-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: var(--lc-stack-gap) !important;
    }

    /* Stats counter: 2 cols not 4 */
    .lc-stats-counter,
    .lc-stats-row {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 14px !important;
    }

    /* Trust badges: 2 cols */
    .lc-trust-badges {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .lc-services-grid,
    .lc-projects-grid,
    .lc-blog-grid,
    .lc-team-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 24px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   SECTION HEADERS — tighter mobile
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .lc-section__header { margin-bottom: 28px; padding: 0 4px; }
    .lc-section__header h2 {
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
        line-height: 1.2;
    }
    .lc-section__header p { font-size: 15px !important; line-height: 1.55; }
    .lc-label { font-size: 10px; letter-spacing: 3px; margin-bottom: 12px; }
}

/* ═══════════════════════════════════════════════════════════════════
   FOOTER — stacked mobile
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .lc-footer { padding: 48px 0 24px; }
    .lc-footer__grid,
    .lc-footer__cols,
    .lc-footer__inner {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }
    .lc-footer__col h4 { font-size: 15px; margin-bottom: 12px; }
    .lc-footer__col ul li a { padding: 8px 0; display: block; min-height: var(--tap-min); }
    .lc-footer__bottom {
        flex-direction: column !important;
        gap: 16px;
        text-align: center;
        padding-top: 24px;
    }
    .lc-footer__social { justify-content: center; gap: 14px; }
    .lc-footer__social a {
        min-width: var(--tap-min);
        min-height: var(--tap-min);
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   GALLERY STRIP — mobile-friendly
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .lc-gallery-strip { padding: 24px 0; }
    .lc-gallery-strip__track img {
        height: 140px !important;
        width: auto !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   ANNOUNCE BAR
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .lc-announce {
        padding: 8px 36px 8px 12px;
        font-size: 12px;
        line-height: 1.4;
    }
    .lc-announce__close { right: 8px; padding: 6px 10px; }
}

/* ═══════════════════════════════════════════════════════════════════
   FORMS (inline + cards) — single column mobile
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .lc-lead-form .lc-form-row,
    .lc-form,
    .lead-form,
    form .form-row,
    form .form-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .lc-form-group { width: 100%; }
    .lc-form-group label {
        font-size: 13px;
        font-weight: 600;
        margin-bottom: 6px;
        display: block;
    }
    .lc-form-group label span { color: #c44; }
    .lc-form-radios {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
    }
    .lc-form-radios label {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 12px;
        border: 1px solid var(--border-light);
        min-height: var(--tap-min);
        cursor: pointer;
    }
    .lc-form-submit,
    .lc-lead-form button[type="submit"] {
        width: 100% !important;
        margin-top: 8px;
    }
    .lc-form-privacy {
        font-size: 11.5px;
        line-height: 1.4;
        color: var(--text-light);
        margin-top: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   CTA SECTION
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .lc-cta { padding: var(--lc-section-gap-tight) 0; text-align: center; }
    .lc-cta h2 {
        font-size: clamp(1.6rem, 6vw, 2.2rem) !important;
        margin-bottom: 12px;
    }
    .lc-cta p { font-size: 15px; }
    .lc-cta__buttons,
    .lc-cta__ctas {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        margin-top: 24px;
    }
    .lc-cta__buttons .lc-btn,
    .lc-cta__ctas .lc-btn { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════════
   STICKY MOBILE CTA BAR (.lc-mobile-bar — already exists in footer.php)
   ═══════════════════════════════════════════════════════════════════ */

.lc-mobile-bar { display: none; }

@media (max-width: 767px) {
    .lc-mobile-bar {
        display: flex !important;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 990;
        background: #fff;
        border-top: 1px solid var(--border-light);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
        padding: 8px 8px env(safe-area-inset-bottom, 8px);
        gap: 6px;
    }
    .lc-mobile-bar__btn {
        flex: 1;
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        min-height: 56px;
        padding: 8px 4px;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        color: var(--text-primary);
        background: transparent;
        text-align: center;
        line-height: 1.1;
    }
    .lc-mobile-bar__btn i {
        font-size: 18px;
        color: var(--green-primary);
    }
    .lc-mobile-bar__btn--call i { color: var(--green-primary); }
    .lc-mobile-bar__btn--ai i { color: var(--lc-accent); }
    .lc-mobile-bar__btn--quote {
        background: var(--green-primary);
        color: #fff;
        border-radius: 4px;
    }
    .lc-mobile-bar__btn--quote i { color: #fff; }
    body { padding-bottom: 72px; }
    /* Push back-top above mobile bar */
    .lc-back-top { bottom: 84px !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   MODALS / POPUPS — full-screen on mobile
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .lc-popup__content,
    .lc-modal,
    .lp-ai-modal,
    .vizFlowPopup,
    .locali-ai-designer-modal {
        padding: 0 !important;
    }
    .lc-popup__content {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        padding: 60px 18px 90px !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .lc-popup__close {
        position: fixed !important;
        top: 12px; right: 12px;
        min-width: var(--tap-min);
        min-height: var(--tap-min);
        background: rgba(255,255,255,0.95);
        border-radius: 50%;
        font-size: 26px;
        z-index: 10;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    .lc-modal__inner,
    .lp-ai-modal__inner,
    .vizFlowPopup__inner,
    .locali-ai-designer-modal__inner {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column;
        overflow: hidden;
    }
    .lc-modal__header,
    .lp-ai-modal__header,
    .vizFlowPopup__header {
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 5;
        padding: 14px 18px;
        border-bottom: 1px solid var(--border-light);
        flex-shrink: 0;
    }
    .lc-modal__body,
    .lp-ai-modal__body,
    .vizFlowPopup__body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 18px;
    }
    .lc-modal__footer,
    .lp-ai-modal__footer,
    .vizFlowPopup__footer {
        position: sticky;
        bottom: 0;
        background: #fff;
        padding: 12px 18px env(safe-area-inset-bottom, 12px);
        border-top: 1px solid var(--border-light);
        flex-shrink: 0;
    }
    .lc-modal__close,
    .lp-ai-modal__close,
    .vizFlowPopup__close {
        min-width: var(--tap-min);
        min-height: var(--tap-min);
        font-size: 26px;
    }
    body.lc-modal-open,
    body.lc-popup-open { overflow: hidden; }
}

/* ═══════════════════════════════════════════════════════════════════
   BREADCRUMBS
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 767px) {
    .lc-breadcrumbs,
    .lc-breadcrumb {
        font-size: 12px !important;
        padding: 8px var(--lc-wrap-pad) !important;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   IMAGES — prevent layout shift
   ═══════════════════════════════════════════════════════════════════ */

img[loading="lazy"] { background: var(--bg-secondary); }

/* ═══════════════════════════════════════════════════════════════════
   ACCESSIBILITY: focus visible
   ═══════════════════════════════════════════════════════════════════ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--green-primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 3 — STANDARD PAGES (About / Services / Projects / Contact / 404 / Search)
   ═══════════════════════════════════════════════════════════════════ */

/* Page hero (used on non-front pages) */
@media (max-width: 767px) {
    .lc-page-hero {
        padding: 96px 0 40px !important;
        text-align: center;
    }
    .lc-page-hero h1 {
        font-size: clamp(1.8rem, 7vw, 2.4rem) !important;
        line-height: 1.2;
    }
    .lc-page-hero__sub,
    .lc-page-hero p {
        font-size: 15px !important;
        max-width: 100%;
    }
    .lc-page-hero--sm { padding: 88px 0 32px !important; }
}

/* About: split layouts + values/why grids */
@media (max-width: 767px) {
    .lc-split,
    .lc-split__inner {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }
    .lc-split__media,
    .lc-split__content { width: 100%; }
    .lc-split__media img { width: 100%; height: auto; }

    .lc-values-grid,
    .lc-why-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .lc-value-card,
    .lc-why-card {
        padding: 22px 18px !important;
    }
    .lc-value-card__icon,
    .lc-why-card__icon {
        font-size: 28px !important;
        margin-bottom: 12px;
    }
}

/* Services page */
@media (max-width: 767px) {
    .lc-services-page-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }
    .lc-service-page-card { padding: 0; }
    .lc-service-page-card__body { padding: 18px !important; }

    .lc-action-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    .lc-action-grid__item { padding: 12px !important; font-size: 13px !important; }
    .lc-action-grid__caption { font-size: 12px !important; }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .lc-services-page-grid { grid-template-columns: 1fr 1fr !important; }
}

/* Projects page + filter + single project */
@media (max-width: 767px) {
    .lc-filter-bar {
        display: flex !important;
        gap: 8px;
        padding: 8px 0 16px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        white-space: nowrap;
    }
    .lc-filter-bar::-webkit-scrollbar { display: none; }
    .lc-filter-btn {
        flex-shrink: 0;
        min-height: var(--tap-min);
        padding: 10px 16px !important;
        font-size: 13px;
    }

    .lc-project-info-grid,
    .lc-project-info-grid--filterable {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }
    .lc-project-info-card { display: flex !important; flex-direction: column; }
    .lc-project-info-card__img { width: 100% !important; aspect-ratio: 4/3; object-fit: cover; }
    .lc-project-info-card__body { padding: 16px !important; }
    .lc-project-info-card__name { font-size: 18px !important; }
    .lc-project-info-card__meta {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
    }
    .lc-project-info-card__investment {
        display: flex; justify-content: space-between; align-items: baseline;
        margin-top: 12px; padding-top: 12px;
        border-top: 1px solid var(--border-light);
    }

    .lc-project-layout,
    .lc-project-details {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }
    .lc-project-featured img { width: 100%; }
    .lc-project-meta {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .lc-project-info-grid { grid-template-columns: 1fr 1fr !important; }
}

/* Contact page */
@media (max-width: 767px) {
    .lc-contact-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }
    .lc-contact-info,
    .lc-contact-form-card { width: 100%; padding: 22px 18px !important; }
    .lc-contact-list li,
    .lc-contact-list__icon { font-size: 15px; }
    .lc-contact-list li {
        padding: 12px 0;
        border-bottom: 1px solid var(--border-light);
        display: flex; align-items: flex-start; gap: 12px;
    }
    .lc-contact-list li a {
        min-height: var(--tap-min);
        display: inline-flex;
        align-items: center;
    }
    .lc-contact-map iframe {
        width: 100% !important;
        height: 280px !important;
    }
    .lc-contact-areas { font-size: 14px; }
    .lc-area-tags {
        display: flex !important;
        flex-wrap: wrap;
        gap: 6px;
    }
    .lc-area-tag {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
    .lc-contact-ai__inner {
        flex-direction: column !important;
        gap: 16px !important;
        text-align: center;
    }
}

/* Search / Archive / Blog */
@media (max-width: 767px) {
    .lc-blog-layout {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }
    .lc-blog-main { width: 100%; }
    .lc-blog-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 18px !important;
    }
    .lc-pagination {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        padding: 24px 0;
    }
    .lc-pagination a,
    .lc-pagination span {
        min-width: var(--tap-min);
        min-height: var(--tap-min);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 10px;
    }
    .lc-no-results {
        padding: 32px 18px !important;
        text-align: center;
        font-size: 15px;
    }
}

/* 404 page */
@media (max-width: 767px) {
    .lc-404 { padding: 80px 0 40px !important; text-align: center; }
    .lc-404__inner { padding: 0; }
    .lc-404__icon { font-size: 60px !important; margin-bottom: 16px; }
    .lc-404__grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        margin: 24px 0;
    }
    .lc-404__actions {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
    }
    .lc-404__actions .lc-btn { width: 100%; }
    .lc-404__search input { font-size: 16px; }
    .lc-404__links {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
}

/* AI CTA Banner — used on multiple pages */
@media (max-width: 767px) {
    .lc-ai-cta-banner {
        padding: 28px 18px !important;
        text-align: center;
    }
    .lc-ai-cta-banner__inner {
        flex-direction: column !important;
        gap: 16px !important;
    }
    .lc-ai-cta-banner__text h3 { font-size: 20px !important; }
    .lc-ai-cta-banner__text p { font-size: 14px !important; }
}

/* Gallery grid (used on multiple pages) */
@media (max-width: 767px) {
    .lc-gallery__grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .lc-gallery__item img {
        width: 100% !important;
        height: 220px !important;
        object-fit: cover;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .lc-gallery__grid { grid-template-columns: 1fr 1fr !important; }
}

/* Tall placeholder elements */
@media (max-width: 767px) {
    .lc-placeholder--tall { min-height: 200px !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   PHASE 3.5 — LANDING PAGES (Backyard / ADU / K&B / Pools / AI Design)
   All LPs share backyard.css; overrides target lc-by-* prefixes.
   ═══════════════════════════════════════════════════════════════════ */

/* LP Hero */
@media (max-width: 767px) {
    .lc-by-hero {
        min-height: auto !important;
        padding: 88px 0 48px !important;
    }
    .lc-by-hero__inner,
    .lc-by-hero__content {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
        text-align: center;
    }
    .lc-by-hero h1 {
        font-size: clamp(1.9rem, 7.5vw, 2.5rem) !important;
        line-height: 1.18 !important;
    }
    .lc-by-hero__sub {
        font-size: 16px !important;
        line-height: 1.55 !important;
    }
    .lc-by-hero__form-wrap,
    .lc-by-hero__form-card {
        width: 100% !important;
        padding: 22px 18px !important;
    }
    .lc-by-hero__phone-line {
        font-size: 14px !important;
        text-align: center;
    }
    .lc-by-hero__ai-btn {
        width: 100% !important;
        min-height: 50px;
    }
}

/* LP About / split intro */
@media (max-width: 767px) {
    .lc-by-about { padding: var(--lc-section-gap) 0 !important; }
    .lc-by-about__intro {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }
    .lc-by-about__intro-image,
    .lc-by-about__intro-text { width: 100% !important; }
    .lc-by-about__placeholder-img {
        width: 100% !important;
        aspect-ratio: 4/3;
        height: auto !important;
    }
    .lc-by-about__values-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .lc-by-about__value-card {
        padding: 20px 18px !important;
    }
    .lc-by-about__value-icon {
        font-size: 28px !important;
        margin-bottom: 10px;
    }
}

/* LP AI Promo (split before/after card) */
@media (max-width: 767px) {
    .lc-by-ai-promo__grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
    }
    .lc-by-ai-promo__visual,
    .lc-by-ai-promo__content {
        width: 100% !important;
    }
    .lc-by-ai-promo__mockup {
        flex-direction: row !important;
        gap: 8px;
    }
    .lc-by-ai-promo__card {
        flex: 1;
        min-height: 180px;
    }
    .lc-by-ai-promo__features {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .lc-by-ai-promo__feat {
        font-size: 14px !important;
        padding: 10px 12px !important;
    }
}

/* LP Calculator */
@media (max-width: 767px) {
    .lc-by-calc {
        padding: 24px 18px !important;
    }
    .lc-by-calc__header h2 { font-size: 22px !important; }
    .lc-by-calc__form,
    .lc-by-calc__form-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 14px !important;
    }
    .lc-by-calc__sizes,
    .lc-by-calc__finishes {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }
    .lc-by-calc__size,
    .lc-by-calc__finish {
        padding: 14px 10px !important;
        min-height: 64px;
        font-size: 13px !important;
        text-align: center;
    }
    .lc-by-calc__price {
        text-align: center;
    }
    .lc-by-calc__price-range {
        font-size: 26px !important;
    }
    .lc-by-calc__features {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        margin-top: 16px;
    }
    .lc-by-calc__feature {
        font-size: 13px !important;
    }
    .lc-by-calc__disclaimer {
        font-size: 11px !important;
        line-height: 1.4;
    }
}

/* LP Before/After Demo */
@media (max-width: 767px) {
    .lc-by-ba-demo {
        height: 280px !important;
        max-height: 60vh;
    }
    .lc-by-ba-demo__before-wrap,
    .lc-by-ba-demo__before,
    .lc-by-ba-demo__after { height: 100% !important; }
    .lc-by-ba-demo__handle {
        width: 44px !important;
        height: 44px !important;
    }
    .lc-by-ba-demo__tag {
        padding: 6px 12px !important;
        font-size: 11px !important;
    }
}

/* LP FAQ Accordion */
@media (max-width: 767px) {
    .lc-by-faq-section { padding: var(--lc-section-gap) 0 !important; }
    .lc-by-faq__item {
        padding: 0 !important;
        margin-bottom: 8px;
    }
    .lc-by-faq__question {
        padding: 16px 18px !important;
        font-size: 15px !important;
        min-height: 52px;
        line-height: 1.35;
    }
    .lc-by-faq__answer {
        padding: 0 18px 16px !important;
        font-size: 14px !important;
        line-height: 1.55;
    }
}

/* LP CTA section */
@media (max-width: 767px) {
    .lc-by-cta { padding: 48px 18px !important; text-align: center; }
    .lc-by-cta__inner h2 {
        font-size: clamp(1.5rem, 6vw, 2rem) !important;
        margin-bottom: 12px;
    }
    .lc-by-cta__buttons {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        margin-top: 22px;
    }
    .lc-by-cta__buttons .lc-by-btn,
    .lc-by-cta__buttons .lc-btn { width: 100% !important; }
}

/* LP Carousel */
@media (max-width: 767px) {
    .lc-by-carousel-viewport {
        margin: 0 calc(-1 * var(--lc-wrap-pad));
        padding: 0 var(--lc-wrap-pad);
    }
    .lc-by-carousel-arrow {
        display: none !important; /* Use swipe on mobile */
    }
    .lc-by-carousel-dots {
        display: flex !important;
        justify-content: center;
        gap: 8px;
        margin-top: 16px;
    }
    .lc-by-carousel-dots button {
        width: 10px; height: 10px;
        min-width: 10px; min-height: 10px;
        border-radius: 50%;
    }
}

/* LP Mobile Bar (separate from main lc-mobile-bar) */
@media (max-width: 767px) {
    .lc-by-mobile-bar {
        display: flex !important;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 990;
        background: #fff;
        border-top: 1px solid var(--border-light);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
        padding: 8px env(safe-area-inset-bottom, 8px);
        gap: 6px;
    }
    .lc-by-mobile-bar__btn {
        flex: 1;
        min-height: 50px;
        font-size: 12px;
        padding: 10px 6px;
        text-align: center;
    }
}

/* LP Footer */
@media (max-width: 767px) {
    .lc-by-footer { padding: 36px 0 80px !important; }
    .lc-by-footer__inner {
        display: flex !important;
        flex-direction: column !important;
        gap: 24px !important;
        text-align: center;
    }
    .lc-by-footer__brand,
    .lc-by-footer__details,
    .lc-by-footer__legal { width: 100% !important; }
    .lc-by-footer__legal { font-size: 12px; }
}

/* LP Buttons (lc-by-btn family) */
@media (max-width: 767px) {
    .lc-by-btn {
        min-height: var(--tap-min);
        padding: 14px 20px !important;
        font-size: 14px !important;
        white-space: normal !important;
        line-height: 1.3;
    }
    .lc-by-btn--block,
    .lc-by-btn--lg { width: 100%; }
}

/* LP Gallery Strip */
@media (max-width: 767px) {
    .lc-by-gallery-strip { padding: 24px 0 !important; }
    .lc-by-gallery-track img {
        height: 140px !important;
        width: auto !important;
    }
}

/* AI Studio wizard (front-page + ai-design page) */
@media (max-width: 767px) {
    .lc-ai-studio { padding: var(--lc-section-gap) 0 !important; }
    .lc-ai-studio__wizard {
        padding: 18px !important;
    }
    /* AI Designer plugin output */
    .locali-ai-designer,
    .locali-ai-designer__container,
    .locali-ai-cost-calc {
        padding: 16px !important;
        max-width: 100% !important;
    }
    .locali-ai-designer__step,
    .locali-ai-designer__option-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .locali-ai-designer__upload {
        padding: 24px 16px !important;
        min-height: 160px !important;
    }
    .locali-ai-designer__btn,
    .locali-ai-designer__cta {
        width: 100% !important;
        min-height: var(--tap-min) !important;
    }
    .locali-ai-designer__progress {
        gap: 4px !important;
    }
    .locali-ai-designer__progress-step {
        font-size: 11px !important;
    }
    .locali-ai-designer__result-img,
    .locali-ai-designer__output {
        width: 100% !important;
        height: auto !important;
    }
}

/* Viz Inline Result (Backyard AI output) */
@media (max-width: 767px) {
    .viz-ir,
    #vizInlineResult {
        padding: 18px !important;
    }
    .viz-ir__compare,
    .viz-ir__images {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }
    .viz-ir__before,
    .viz-ir__after {
        width: 100% !important;
        aspect-ratio: 4/3;
    }
    .viz-ir__actions {
        display: flex !important;
        flex-direction: column;
        gap: 10px;
    }
    .viz-ir__actions button { width: 100%; }
}

/* LP AI Modal (ADU / K&B / Pools entry) */
@media (max-width: 767px) {
    .lp-ai-modal__step,
    .lp-ai-modal__options {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    .lp-ai-modal__option {
        padding: 16px !important;
        min-height: 64px;
        text-align: center;
    }
    .lp-ai-modal__cta { width: 100% !important; }
    .lp-ai-modal__nav {
        display: flex !important;
        justify-content: space-between;
        gap: 10px;
        margin-top: 16px;
    }
    .lp-ai-modal__nav button { flex: 1; min-height: var(--tap-min); }
}

/* When LP mobile bar is present, hide main mobile bar to avoid stacking */
.lc-by-mobile-bar + .lc-mobile-bar,
body:has(.lc-by-mobile-bar) .lc-mobile-bar { display: none !important; }

/* ═══════════════════════════════════════════════════════════════════
   REDUCE MOTION
   ═══════════════════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
