/**
 * Phone / tablet overrides — 640 / 768 / 1024
 */

@media (max-width: 767px) {
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    body {
        overflow-x: clip;
    }

    body.nav-open {
        overflow: hidden;
        touch-action: none;
    }

    .header-hours,
    .header-phone,
    .header-cta {
        display: none;
    }

    .brand {
        flex: 1 1 auto;
        min-width: 0;
        max-width: calc(100% - 3.5rem);
    }

    .brand-text {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .brand-logo {
        max-width: min(48vw, 10rem);
        height: 40px;
        width: auto;
        object-fit: contain;
    }

    .nav-toggle {
        min-width: 44px;
        min-height: 44px;
        padding: 0.5rem;
        flex-shrink: 0;
    }

    .mobile-drawer {
        width: min(100%, 320px);
        max-width: 100%;
        height: 100dvh;
        padding-top: max(1.5rem, env(safe-area-inset-top));
        padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    }

    .mobile-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding-bottom: 0.75rem;
        margin-bottom: 0.25rem;
        border-bottom: 1px solid var(--color-border);
    }

    .mobile-drawer-head strong {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-drawer-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        padding: 0;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        background: var(--surface-1);
        cursor: pointer;
        color: var(--color-text);
        flex-shrink: 0;
    }

    .mobile-drawer a {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding-block: 0.65rem;
    }

    .mobile-drawer-actions {
        margin-top: auto;
    }

    .mobile-drawer-actions .btn {
        min-height: 48px;
    }

    .service-cards,
    .service-grid,
    .gallery-grid,
    .testimonial-grid,
    .trust-grid,
    .team-grid,
    .pricing-grid,
    .about-stats,
    .hours-map-grid,
    .about-block,
    .layout-list .service-cards,
    body.theme-variant-clinical .service-cards {
        grid-template-columns: 1fr;
    }

    .cta-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-actions,
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .cta-actions .btn,
    .hero-actions .btn {
        width: 100%;
        min-height: 48px;
    }

    .menu-row-title-line {
        flex-wrap: wrap;
        gap: 0.25rem 0.5rem;
    }

    .menu-row-dots {
        display: none;
    }

    .menu-row-title-line .menu-price {
        margin-left: auto;
        white-space: nowrap;
    }

    .menu-row-title-line h3 {
        flex: 1 1 100%;
        min-width: 0;
    }

    .hero-overlay {
        min-height: auto;
    }

    .hero-overlay-visual {
        display: none;
    }

    .floating-wa {
        width: 3.25rem;
        height: 3.25rem;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        gap: 0;
        bottom: max(1rem, env(safe-area-inset-bottom, 0px));
        right: max(1rem, env(safe-area-inset-right, 0px));
    }

    .floating-wa > span:not(.icon) {
        display: none;
    }

    .floating-wa .icon {
        display: inline-flex;
        --icon-size: 1.5rem;
    }

    input,
    select,
    textarea {
        font-size: 16px;
    }

    .contact-form-group input,
    .contact-form-group select,
    .contact-form-group textarea {
        min-height: 44px;
    }

    .business-hours-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .pricing-card.is-highlighted {
        transform: none;
    }

    .module-filter button,
    .module-filter a {
        min-height: 44px;
    }

}

@media (max-width: 1023px) {
    .hero-cover .hero-title {
        max-width: none;
    }
}
