/* NAV STYLE - Shared CSS for navigation-style pages */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --nav-bg: #0f1419;
    --nav-surface: #1c2128;
    --nav-surface-elevated: #252c35;
    --nav-border: #30363d;
    --nav-text: #f0f3f6;
    --nav-text-muted: #8b949e;
    --nav-accent: #fad54b;
    --nav-accent-dim: rgba(250, 213, 75, 0.15);
    --nav-success: #3fb950;
    --nav-danger: #f85149;
    --nav-radius: 16px;
    --nav-radius-sm: 8px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
    min-height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--nav-bg);
    color: var(--nav-text);
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
}

/* ========== MAP LAYER ========== */
.map-container {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px 140px;
    z-index: 1;
}

.map-svg {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    opacity: 0.3;
    filter: saturate(0.8);
}

/* ========== TOP HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 4px 16px;
    padding-top: calc(4px + var(--safe-top));
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, var(--nav-bg) 60%, transparent);
}

.header__back {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--nav-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    background: var(--nav-surface);
    border: 1px solid var(--nav-border);
    border-radius: var(--nav-radius-sm);
    transition: background 0.2s;
}

.header__back:hover {
    background: var(--nav-surface-elevated);
}

.header__back svg {
    width: 18px;
    height: 18px;
}

.header__logo {
    height: 80px;
    width: auto;
}

@media (min-width: 480px) {
    .header__logo { height: 140px; width: auto; }
}

@media (min-width: 768px) {
    .header__logo { height: 100px; width: auto; }
}

@media (min-width: 1024px) {
    .header__logo { height: 120px; width: auto; }
}

@media (min-width: 1440px) {
    .header__logo { height: 180px; width: auto; }
}

/* Google Translate */
.translate-widget {
    position: fixed;
    top: 12px;
    right: 80px;
    z-index: 101;
}

.goog-te-gadget {
    font-family: inherit !important;
}

.goog-te-gadget-simple {
    background: var(--nav-surface) !important;
    border: 1px solid var(--nav-border) !important;
    border-radius: var(--nav-radius-sm) !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
}

.goog-te-gadget-simple span {
    color: var(--nav-text) !important;
}

.goog-te-menu-value span:first-child {
    display: none;
}

.goog-te-banner-frame {
    display: none !important;
}

body {
    top: 0 !important;
}

/* Menu button larger */
.bottom-nav__item--menu {
    background: var(--nav-accent-dim);
    border: none;
    cursor: pointer;
}

.bottom-nav__icon--large {
    width: 36px;
    height: 36px;
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay--active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--nav-surface);
    border-radius: var(--nav-radius) var(--nav-radius) 0 0;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal__body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-overlay--active .modal {
    transform: translateY(0);
}

.modal--large {
    max-height: 90vh;
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--nav-border);
}

.modal__title {
    font-size: 18px;
    font-weight: 600;
}

.modal__close,
.modal__back {
    background: none;
    border: none;
    color: var(--nav-text);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--nav-radius-sm);
}

.modal__close:hover,
.modal__back:hover {
    background: var(--nav-surface-elevated);
}

.modal__close svg,
.modal__back svg {
    width: 24px;
    height: 24px;
}

.modal__body {
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal__body--scroll {
    max-height: 60vh;
    overflow-y: auto;
}

.modal__body h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 20px 0 8px;
    color: var(--nav-accent);
}

.modal__body h3:first-child {
    margin-top: 0;
}

.modal__body p {
    color: var(--nav-text-muted);
    line-height: 1.6;
    margin-bottom: 12px;
}

.modal__body ul {
    color: var(--nav-text-muted);
    margin: 0 0 12px 20px;
    line-height: 1.6;
}

.modal__updated {
    font-size: 13px;
    opacity: 0.6;
    margin-top: 24px;
}

/* Settings items */
.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--nav-border);
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item__info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-item__info svg {
    width: 22px;
    height: 22px;
    color: var(--nav-accent);
}

.settings-divider {
    height: 1px;
    background: var(--nav-border);
    margin: 16px 0;
}

.settings-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 14px 0;
    background: none;
    border: none;
    color: var(--nav-text);
    cursor: pointer;
    text-align: left;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.2s;
}

.settings-link svg {
    width: 22px;
    height: 22px;
    color: var(--nav-accent);
    margin-right: 12px;
}

.settings-link span {
    flex: 1;
}

.settings-link__arrow {
    color: var(--nav-text-muted) !important;
    width: 18px !important;
    height: 18px !important;
    margin-right: 0 !important;
}

.settings-link:hover {
    color: var(--nav-accent);
}

/* Copyright */
.settings-copyright {
    margin-top: 20px;
    padding-top: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--nav-text-muted);
    border-top: 1px solid var(--nav-border);
}

/* Theme toggle */
.theme-toggle {
    display: flex;
    gap: 4px;
    background: var(--nav-surface-elevated);
    border-radius: var(--nav-radius-sm);
    padding: 4px;
}

.theme-toggle__btn {
    padding: 8px 16px;
    border: none;
    background: none;
    color: var(--nav-text-muted);
    cursor: pointer;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}

.theme-toggle__btn--active {
    background: var(--nav-accent);
    color: var(--nav-bg);
}

/* Text size toggle */
.text-size-toggle {
    display: flex;
    gap: 4px;
}

.text-size-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--nav-border);
    background: var(--nav-surface-elevated);
    color: var(--nav-text-muted);
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
}

.text-size-btn:nth-child(1) { font-size: 12px; }
.text-size-btn:nth-child(2) { font-size: 15px; }
.text-size-btn:nth-child(3) { font-size: 18px; }

.text-size-btn--active {
    background: var(--nav-accent);
    color: var(--nav-bg);
    border-color: var(--nav-accent);
}

/* Text size application */
[data-text-size="small"] { font-size: 14px; }
[data-text-size="large"] { font-size: 18px; }

/* Light theme */
[data-theme="light"] {
    --nav-bg: #f5f5f5;
    --nav-surface: #ffffff;
    --nav-surface-elevated: #f0f0f0;
    --nav-border: #e0e0e0;
    --nav-text: #1a1a1a;
    --nav-text-muted: #666666;
}

/* Footer in modal */
.settings-footer {
    padding: 16px 0 0;
    border-top: 1px solid var(--nav-border);
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--nav-text-muted);
}

.settings-footer a {
    color: var(--nav-accent);
    text-decoration: none;
}

.settings-footer a:hover {
    text-decoration: underline;
}

.header__cta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--nav-bg);
    background: var(--nav-accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--nav-radius-sm);
    transition: transform 0.2s;
}

.header__cta:hover {
    transform: scale(1.02);
}

.header__cta svg {
    width: 18px;
    height: 18px;
}

/* ========== DETAIL SHEET ========== */
.detail-sheet {
    position: relative;
    z-index: 50;
    margin-top: calc(88px + var(--safe-top));
    margin-bottom: calc(200px + var(--safe-bottom));
    padding: 0 16px 0;
}

@media (min-width: 480px) {
    .detail-sheet { margin-top: calc(108px + var(--safe-top)); }
}

@media (min-width: 768px) {
    .detail-sheet { margin-top: calc(128px + var(--safe-top)); }
}

@media (min-width: 1024px) {
    .detail-sheet { margin-top: calc(148px + var(--safe-top)); }
}

@media (min-width: 1440px) {
    .detail-sheet { margin-top: calc(188px + var(--safe-top)); }
}

.detail-card {
    background: var(--nav-surface);
    border: 1px solid var(--nav-border);
    border-radius: var(--nav-radius);
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.detail-card__hero {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.detail-card__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-card__hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--nav-surface) 0%, transparent 100%);
}

.detail-card__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--nav-accent);
    color: var(--nav-bg);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--nav-radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-card__badge svg {
    width: 16px;
    height: 16px;
}

.detail-card__content {
    padding: 24px 24px 32px;
}

.detail-card__title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.detail-card__subtitle {
    font-size: 16px;
    color: var(--nav-text-muted);
    margin-bottom: 24px;
    line-height: 1.5;
}

.detail-card__section {
    margin-bottom: 24px;
}

.detail-card__section:last-child {
    margin-bottom: 0;
}

.detail-card__section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--nav-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.detail-card__text {
    font-size: 15px;
    color: var(--nav-text);
    line-height: 1.6;
    margin-bottom: 12px;
}

.detail-card__text:last-child {
    margin-bottom: 0;
}

/* Detail card lists */
.detail-card__list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0 0;
}

.detail-card__list li {
    position: relative;
    padding-left: 20px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--nav-text);
    margin-bottom: 8px;
}

.detail-card__list li:last-child {
    margin-bottom: 0;
}

.detail-card__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--nav-accent);
    border-radius: 50%;
}

.detail-card__list a {
    color: var(--nav-accent);
    text-decoration: none;
}

.detail-card__list a:hover {
    text-decoration: underline;
}

/* Compact hero for legal pages */
.detail-card__hero--compact {
    height: 80px;
    background: linear-gradient(135deg, var(--nav-surface-elevated) 0%, var(--nav-surface) 100%);
}

/* Feature list */
.feature-list {
    list-style: none;
    display: grid;
    gap: 12px;
}

.feature-list__item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 15px;
    line-height: 1.5;
}

.feature-list__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: var(--nav-accent-dim);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-list__icon svg {
    width: 14px;
    height: 14px;
    color: var(--nav-accent);
}

/* Coverage grid */
.coverage-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.coverage-item {
    background: var(--nav-surface-elevated);
    border: 1px solid var(--nav-border);
    border-radius: var(--nav-radius-sm);
    padding: 16px;
    text-align: center;
}

.coverage-item__name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.coverage-item__desc {
    font-size: 12px;
    color: var(--nav-text-muted);
}

/* CTA buttons */
.detail-card__cta {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--nav-border);
}

.detail-card__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border-radius: var(--nav-radius-sm);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s;
}

.detail-card__btn:hover {
    transform: scale(1.02);
}

.detail-card__btn--primary {
    background: var(--nav-accent);
    color: var(--nav-bg);
}

.detail-card__btn--secondary {
    background: var(--nav-surface-elevated);
    color: var(--nav-text);
    border: 1px solid var(--nav-border);
}

.detail-card__btn svg {
    width: 20px;
    height: 20px;
}

/* ========== BOTTOM NAV ========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--nav-surface);
    border-top: 1px solid var(--nav-border);
    padding: 10px 16px calc(10px + var(--safe-bottom));
}

.bottom-nav__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.bottom-nav__grid--7 {
    grid-template-columns: repeat(7, 1fr);
    min-width: 0;
}

.bottom-nav__grid--8 {
    grid-template-columns: repeat(8, 1fr);
    min-width: 0;
    gap: 2px;
}

/* Ensure nav always stays in single row */
.bottom-nav__grid--7 .bottom-nav__item,
.bottom-nav__grid--8 .bottom-nav__item {
    padding: 6px 1px;
    min-width: 0;
}

.bottom-nav__grid--7 .bottom-nav__icon,
.bottom-nav__grid--8 .bottom-nav__icon {
    width: 20px;
    height: 20px;
}

.bottom-nav__grid--7 .bottom-nav__label,
.bottom-nav__grid--8 .bottom-nav__label {
    font-size: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.bottom-nav__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border-radius: var(--nav-radius-sm);
    text-decoration: none;
    color: var(--nav-text-muted);
    transition: all 0.2s;
}

.bottom-nav__item:hover,
.bottom-nav__item:focus {
    background: var(--nav-accent-dim);
    color: var(--nav-accent);
}

.bottom-nav__item--active {
    background: var(--nav-accent-dim);
    color: var(--nav-accent);
}

/* Action buttons (Call, Quote) */
.bottom-nav__item--action {
    color: var(--nav-accent);
}

/* Center button (Home/Settings) */
.bottom-nav__item--center {
    background: var(--nav-accent-dim);
    border: none;
    cursor: pointer;
}

.bottom-nav__item--center:hover,
.bottom-nav__item--center:focus {
    background: var(--nav-accent);
    color: var(--nav-bg);
}

.bottom-nav__icon {
    width: 28px;
    height: 28px;
}

.bottom-nav__label {
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

/* ========== RESPONSIVE ========== */
@media (min-width: 768px) {
    .bottom-nav {
        left: 50%;
        transform: translateX(-50%);
        max-width: 500px;
        border-radius: var(--nav-radius) var(--nav-radius) 0 0;
        border-left: 1px solid var(--nav-border);
        border-right: 1px solid var(--nav-border);
    }

    .detail-card__hero {
        height: 280px;
    }

    .detail-card__title {
        font-size: 32px;
    }
}

@media (max-width: 639px) {
    .coverage-grid {
        grid-template-columns: 1fr;
    }

    .detail-card__cta {
        flex-direction: column;
    }

    .header__cta span {
        display: none;
    }
}

/* Very small screens - hide nav labels */
@media (max-width: 420px) {
    .bottom-nav__grid--7 .bottom-nav__label,
    .bottom-nav__grid--8 .bottom-nav__label {
        display: none;
    }

    .bottom-nav__grid--7 .bottom-nav__item,
    .bottom-nav__grid--8 .bottom-nav__item {
        padding: 10px 2px;
    }

    .bottom-nav__grid--7 .bottom-nav__icon,
    .bottom-nav__grid--8 .bottom-nav__icon {
        width: 22px;
        height: 22px;
    }
}

/* ========== HOMEPAGE SPECIFIC ========== */

/* Status badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--nav-radius);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.status-badge--open {
    background: rgba(63, 185, 80, 0.2);
    color: var(--nav-success);
}

.status-badge--closed {
    background: rgba(248, 81, 73, 0.2);
    color: var(--nav-danger);
}

.status-badge__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: blink 1.5s infinite;
}

.status-badge__hours {
    opacity: 0.7;
    font-weight: 400;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Stats row */
.stats-row {
    position: fixed;
    top: calc(68px + var(--safe-top));
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    z-index: 90;
}

@media (min-width: 480px) {
    .stats-row { top: calc(148px + var(--safe-top)); }
}

@media (min-width: 768px) {
    .stats-row { top: calc(108px + var(--safe-top)); }
}

@media (min-width: 1024px) {
    .stats-row { top: calc(128px + var(--safe-top)); }
}

@media (min-width: 1440px) {
    .stats-row { top: calc(188px + var(--safe-top)); }
}

.stat-badge {
    background: var(--nav-surface);
    border: 1px solid var(--nav-border);
    border-radius: var(--nav-radius-sm);
    padding: 6px 10px;
    text-align: center;
    min-width: 60px;
}

.stat-badge__value {
    font-weight: 700;
    font-size: 14px;
    color: var(--nav-accent);
}

.stat-badge__label {
    font-size: 11px;
    color: var(--nav-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Two tile layout - always side by side */
.tiles {
    position: fixed;
    top: calc(140px + var(--safe-top));
    bottom: calc(195px + var(--safe-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: calc(100% - 32px);
    max-width: 800px;
    overflow-y: auto;
    align-content: center;
    padding-bottom: 16px;
    scrollbar-width: none;
}

.tiles::-webkit-scrollbar { display: none; }

@media (min-width: 480px) {
    .tiles {
        top: calc(180px + var(--safe-top));
        gap: 12px;
        width: calc(100% - 32px);
    }
}

@media (min-width: 768px) {
    .tiles {
        top: calc(160px + var(--safe-top));
        bottom: calc(185px + var(--safe-bottom));
    }
}

@media (min-width: 1024px) {
    .tiles { top: calc(200px + var(--safe-top)); }
}

@media (min-width: 1440px) {
    .tiles { top: calc(240px + var(--safe-top)); }
}

.tile {
    background: var(--nav-surface);
    border: 1px solid var(--nav-border);
    border-radius: var(--nav-radius);
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}

.tile--hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tile__icon {
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    background: var(--nav-accent-dim);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tile__icon svg {
    width: 28px;
    height: 28px;
    color: var(--nav-accent);
}

.tile__title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.2;
}

.tile__title span {
    color: var(--nav-accent);
}

.tile__desc {
    font-size: 14px;
    color: var(--nav-text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.tile__cta {
    display: flex;
    gap: 10px;
}

.tile__btn {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--nav-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s;
    border: none;
    cursor: pointer;
}

.tile__btn:hover {
    transform: scale(1.02);
}

.tile__btn--primary {
    background: var(--nav-accent);
    color: var(--nav-bg);
}

.tile__btn--secondary {
    background: var(--nav-surface-elevated);
    color: var(--nav-text);
    border: 1px solid var(--nav-border);
}

.tile__btn svg {
    width: 18px;
    height: 18px;
}

/* Form tile */
.tile--form h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* Form styles */
.form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--nav-text-muted);
    margin-bottom: 4px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--nav-surface-elevated);
    border: 1px solid var(--nav-border);
    border-radius: var(--nav-radius-sm);
    color: var(--nav-text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--nav-accent);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--nav-text-muted);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.form-select {
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 639px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Reviews float */
.reviews-float {
    position: fixed;
    bottom: 100px;
    left: 16px;
    right: 16px;
    z-index: 70;
    height: 130px;
}

@media (min-width: 640px) {
    .reviews-float { bottom: 110px; }
}

@media (min-width: 768px) {
    .reviews-float {
        bottom: 120px;
    }
}


.review-chip {
    background: var(--nav-surface);
    border: 1px solid var(--nav-border);
    border-radius: var(--nav-radius);
    padding: 16px 20px;
    position: absolute;
    left: 0; right: 0;
    max-width: 500px;
    margin: 0 auto;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.review-chip.is-active {
    opacity: 1;
    pointer-events: auto;
}

.review-chip__stars {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
}

.review-chip__stars svg {
    width: 16px;
    height: 16px;
    fill: var(--nav-accent);
}

.review-chip__text {
    font-size: 15px;
    color: var(--nav-text);
    line-height: 1.5;
    margin-bottom: 8px;
}

.review-chip__author {
    font-size: 13px;
    color: var(--nav-accent);
}


@media (max-width: 639px) {
    .tile {
        padding: 14px;
    }

    .tile__title {
        font-size: 18px;
    }
}

/* Narrow mobile: compact tile content so both tiles fit side-by-side in one view */
@media (max-width: 479px) {
    .tile {
        padding: 12px;
    }

    .tile__icon {
        width: 40px;
        height: 40px;
        margin-bottom: 10px;
    }

    .tile__icon svg {
        width: 22px;
        height: 22px;
    }

    .tile__title {
        font-size: 16px;
        margin-bottom: 6px;
    }

    /* Hide description on very small screens to save vertical space */
    .tile__desc {
        display: none;
    }

    .tile__cta {
        gap: 6px;
    }

    .tile__btn {
        padding: 10px 8px;
        font-size: 13px;
        gap: 4px;
    }

    .tile__btn svg {
        width: 14px;
        height: 14px;
    }

    /* Compact form */
    .form-group {
        margin-bottom: 8px;
    }

    .form-label {
        font-size: 11px;
        margin-bottom: 3px;
    }

    .form-input,
    .form-select {
        padding: 8px 10px;
        font-size: 13px;
    }

    /* Hide optional phone field to save space */
    .form-row .form-group:nth-child(2) {
        display: none;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Compact message field */
    .form-textarea {
        min-height: 48px;
        padding: 8px 10px;
        font-size: 13px;
    }

    .tile--form h2 {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .status-badge {
        padding: 4px 8px;
        font-size: 11px;
        margin-bottom: 8px;
    }

    /* Compact stat badges */


    .stat-badge {
        padding: 4px 7px;
        min-width: 50px;
    }

    .stat-badge__value {
        font-size: 12px;
    }

    .stat-badge__label {
        font-size: 9px;
    }
}

/* ========== HEIGHT-BASED RESPONSIVE (landscape phones, Steam Deck) ========== */

/* Steam Deck / short tablets: 500-900px tall, 768px+ wide
   Logo 180px would leave only ~300px for tiles — reduce to 120px */
@media (max-height: 900px) and (min-width: 768px) {
    .header__logo { height: 100px !important; width: auto !important; }
    .stats-row   { top: calc(108px + var(--safe-top)) !important; }
    .tiles       { top: calc(160px + var(--safe-top)) !important;
                   bottom: calc(155px + var(--safe-bottom)) !important; }
    .detail-sheet { margin-top: calc(108px + var(--safe-top)) !important; }
    .reviews-float { bottom: 100px !important; }
}

/* Very short screens: landscape phones ~360-500px tall
   Tiles collapse to zero with normal spacing — go minimal */
@media (max-height: 500px) {
    .header__logo { height: 36px !important; width: auto !important; }
    .stats-row    { top: calc(44px + var(--safe-top)) !important;
                    gap: 5px !important;
                    padding: 0 8px !important; }
    .stat-badge   { padding: 3px 6px !important; min-width: 44px !important; }
    .stat-badge__value { font-size: 11px !important; }
    .stat-badge__label { font-size: 8px !important; }
    .tiles        { top: calc(84px + var(--safe-top)) !important;
                    bottom: calc(65px + var(--safe-bottom)) !important;
                    gap: 6px !important;
                    grid-template-rows: 1fr !important;
                    align-items: stretch !important;
                    align-content: start !important; }
    .tile         { padding: 10px !important;
                    overflow-y: auto !important;
                    min-height: 0 !important; }
    .tile__icon   { width: 28px !important; height: 28px !important;
                    margin-bottom: 6px !important; }
    .tile__icon svg { width: 14px !important; height: 14px !important; }
    .tile__title  { font-size: 13px !important; margin-bottom: 4px !important; }
    .tile__desc   { display: none !important; }
    .tile__btn    { padding: 8px 6px !important; font-size: 12px !important; }
    .form-group   { margin-bottom: 5px !important; }
    .form-label   { font-size: 10px !important; margin-bottom: 2px !important; }
    .form-input, .form-select { padding: 6px 8px !important; font-size: 12px !important; }
    .form-textarea { min-height: 36px !important; padding: 5px 8px !important; font-size: 12px !important; }
    .form-row .form-group:nth-child(2) { display: none !important; }
    /* Hide service + message in landscape - too tall to fit */
    .form-group:has(.form-select) { display: none !important; }
    .form-group:has(.form-textarea) { display: none !important; }
    .tile--form h2 { font-size: 13px !important; margin-bottom: 6px !important; }
    .status-badge { padding: 3px 6px !important; font-size: 10px !important; margin-bottom: 5px !important; }
    .reviews-float { display: none !important; }
    .bottom-nav   { padding: 6px 8px !important; }
    .bottom-nav__icon { width: 22px !important; height: 22px !important; }
    .bottom-nav__label { font-size: 9px !important; }
}


/* ========== SCREENSAVER ========== */
.screensaver {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #070a0d;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.8s ease;
    cursor: pointer;
}

.screensaver--active {
    opacity: 1;
}

.screensaver__slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.screensaver__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 32px;
    opacity: 0;
    transition: opacity 1s ease;
}

.screensaver__slide--active {
    opacity: 1;
}

.screensaver__hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: rgba(255,255,255,0.3);
    white-space: nowrap;
    z-index: 1;
    pointer-events: none;
}

/* Hero slide */
.ss-hero {
    text-align: center;
    max-width: 600px;
}

.ss-hero__title {
    font-size: clamp(32px, 8vw, 72px);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 16px;
}

.ss-hero__title span { color: #fad54b; }

.ss-hero__desc {
    font-size: clamp(14px, 2.5vw, 20px);
    color: rgba(255,255,255,0.6);
    line-height: 1.6;
}

/* Stats slide */
.ss-stats {
    text-align: center;
    width: 100%;
    max-width: 700px;
}

.ss-stats__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (min-width: 600px) {
    .ss-stats__grid { grid-template-columns: repeat(4, 1fr); }
}

.ss-stats__item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(250,213,75,0.25);
    border-radius: 16px;
    padding: 24px 12px;
}

.ss-stats__number {
    font-size: clamp(28px, 6vw, 52px);
    font-weight: 800;
    color: #fad54b;
    line-height: 1;
    margin-bottom: 8px;
}

.ss-stats__label {
    font-size: clamp(10px, 1.5vw, 13px);
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Testimonials */
.ss-testimonials {
    text-align: center;
    max-width: 700px;
    width: 100%;
}

.ss-testimonials__title {
    font-size: clamp(18px, 4vw, 30px);
    font-weight: 700;
    color: #fad54b;
    margin-bottom: 28px;
}

.ss-testimonials__list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ss-testimonials__quote {
    background: rgba(255,255,255,0.05);
    border-left: 3px solid #fad54b;
    border-radius: 0 12px 12px 0;
    padding: 18px 22px;
    text-align: left;
    margin: 0;
}

.ss-testimonials__quote p {
    font-size: clamp(13px, 2vw, 16px);
    color: rgba(255,255,255,0.85);
    line-height: 1.6;
    margin-bottom: 8px;
}

.ss-testimonials__quote cite {
    font-size: 13px;
    color: #fad54b;
    font-style: normal;
}

/* Cards (services/values) */
.ss-cards {
    text-align: center;
    max-width: 700px;
    width: 100%;
}

.ss-cards__title {
    font-size: clamp(18px, 4vw, 30px);
    font-weight: 700;
    color: #fad54b;
    margin-bottom: 20px;
}

.ss-cards__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

@media (min-width: 600px) {
    .ss-cards__grid { grid-template-columns: repeat(3, 1fr); }
}

.ss-cards__item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 14px;
}

.ss-cards__icon svg {
    width: 26px; height: 26px;
    color: #fad54b; stroke: #fad54b;
    margin-bottom: 6px;
}

.ss-cards__name {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    font-weight: 500;
}

/* Coverage */
.ss-coverage { text-align: center; max-width: 600px; width: 100%; }

.ss-coverage__title {
    font-size: clamp(18px, 4vw, 30px);
    font-weight: 700;
    color: #fad54b;
    margin-bottom: 20px;
}

.ss-coverage__map {
    max-width: 100%;
    max-height: 60vh;
    opacity: 0.7;
}

/* Homepage body - no scroll */
.home-page {
    overflow: hidden;
}

.home-page .map-svg {
    opacity: 0.5;
}
