/* Responsive Styles */
@media (max-width: 1199px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .branches-grid,
    .branches-grid--duo {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: none;
    }

    .mega-menu {
        width: min(840px, calc(100vw - 32px));
    }

    .mega-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-link {
        padding: 8px 8px;
        font-size: 0.84rem;
    }

    .header-actions {
        gap: 6px;
    }

    .header-appt-btn {
        padding: 9px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 1099px) and (min-width: 992px) {
    .header-actions .lang-btn span {
        display: none;
    }

    .header-appt-btn .header-appt-label-full {
        display: none;
    }

    .header-appt-btn .header-appt-label-short {
        display: inline;
    }

    .header-appt-btn {
        padding: 9px 12px;
    }

    .site-logo {
        max-width: 190px;
    }

    .site-logo img {
        height: 50px;
        max-width: 180px;
    }
}

@media (max-width: 991px) {
    :root {
        --nav-bar-height: 76px;
        --header-float-gap: 10px;
    }

    .site-header {
        padding-left: var(--header-float-gap);
        padding-right: var(--header-float-gap);
        overflow: visible;
    }

    .site-header .container {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        max-width: none;
    }

    body.site-public .site-header .header-inner,
    .header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding: 0 8px 0 10px;
        gap: 6px;
        overflow: visible;
    }

    .main-nav,
    .mega-menu {
        display: none !important;
    }

    .site-logo {
        grid-column: 1;
        justify-self: start;
        width: auto;
        max-width: 100%;
        min-width: 0;
        flex: none;
    }

    .site-logo img {
        height: 52px;
        width: auto;
        max-width: min(160px, 38vw);
    }

    .site-logo-text {
        max-width: min(120px, 32vw);
    }

    .header-appt-btn {
        grid-column: 2;
        justify-self: center;
        margin-left: 0;
        margin-right: 0;
        display: inline-flex !important;
        align-items: center;
        gap: 8px;
        min-height: 42px;
        padding: 10px 16px;
        font-size: 0.88rem;
        font-weight: 700;
        line-height: 1.1;
        white-space: nowrap;
        background: var(--primary);
        color: #fff;
        border-color: var(--primary);
        box-shadow: 0 4px 14px rgba(22, 61, 122, 0.25);
    }

    .rtl .header-appt-btn {
        margin-left: 0;
        margin-right: 0;
    }

    .header-appt-btn .header-appt-label-full {
        display: none;
    }

    .header-appt-btn .header-appt-label-short {
        display: inline;
    }

    .header-appt-btn i {
        font-size: 0.95rem;
    }

    .header-appt-btn:hover,
    .header-appt-btn:focus-visible {
        background: #E10600;
        border-color: #E10600;
        color: #fff;
    }

    .header-actions {
        grid-column: 3;
        justify-self: end;
        display: flex;
        flex: none;
        gap: 4px;
        margin-left: 0;
        margin-right: 0;
    }

    .rtl .header-actions {
        margin-left: 0;
        margin-right: 0;
    }

    .header-actions .lang-btn span {
        display: none;
    }

    .header-actions .icon-btn,
    .header-actions .lang-btn,
    .mobile-toggle {
        width: 40px;
        height: 40px;
        padding: 0;
        flex-shrink: 0;
        justify-content: center;
    }

    .hero-section,
    .hero-swiper,
    .hero-slide {
        max-width: 100%;
        overflow: hidden;
    }

    .hero-content.container,
    .hero-content {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        box-sizing: border-box;
        align-items: center;
        text-align: center;
    }

    .hero-title,
    .hero-subtitle {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        overflow-wrap: anywhere;
        word-break: break-word;
        text-align: center;
    }

    .hero-buttons {
        max-width: 100%;
        align-items: center;
        justify-content: center;
    }

    .hero-btn {
        white-space: normal;
        max-width: 100%;
        justify-content: center;
    }

    .footer-brand .footer-logo-img,
    .site-footer .site-logo img.footer-logo-img {
        height: 120px !important;
        max-width: 360px;
    }

    .footer-emergency-btn {
        width: 100%;
        max-width: 320px;
        white-space: normal;
        text-align: center;
        padding: 12px 20px;
    }

    .mobile-toggle {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .mega-menu {
        display: none;
    }

    .section {
        padding: 70px 0;
    }

    .hero-section {
        min-height: 500px;
    }

    .appointment-form {
        padding: 32px 24px;
    }

    .tech-card {
        flex-direction: column;
        text-align: center;
    }

    .tech-icon {
        margin: 0 auto;
    }
}

@media (max-width: 767px) {
    :root {
        --nav-bar-height: 72px;
        --header-float-top: 10px;
        --header-float-gap: 8px;
    }

    body.site-public .site-header .header-inner {
        padding: 0 8px 0 10px;
    }

    .site-logo {
        max-width: min(180px, 48vw);
    }

    .site-logo img {
        height: 50px;
        max-width: min(180px, 48vw);
    }

    .header-actions .icon-btn,
    .header-actions .lang-btn,
    .mobile-toggle {
        width: 40px;
        height: 40px;
    }

    .stats-grid,
    .why-grid,
    .branches-grid,
    .branches-grid--duo {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .branch-map,
    .branches-grid--duo .branch-map {
        min-height: 260px;
    }

    .branch-map-link {
        opacity: 1;
        background: linear-gradient(to top, rgba(15, 23, 42, 0.4) 0%, transparent 45%);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer-copyright {
        text-align: center;
        margin-bottom: 16px;
    }

    .hero-buttons {
        align-items: center;
        width: 100%;
    }

    .hero-buttons-main {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .hero-btn {
        width: 100%;
        justify-content: center;
    }

    .newsletter-form-row {
        flex-direction: column;
    }

    .newsletter-form-row .btn {
        width: 100%;
    }

    .cookie-inner {
        flex-direction: column;
        text-align: center;
    }

    .services-grid,
    .blogs-grid,
    .doctors-grid,
    .gallery-grid,
    .tech-grid {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .page-header {
        padding: 120px 0 40px;
    }

    .floating-actions {
        bottom: 16px;
        right: 16px;
    }

    .rtl .floating-actions {
        left: 16px;
    }

    .fab {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .section-header {
        margin-bottom: 40px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .site-header .container {
        padding-left: 0;
        padding-right: 0;
    }

    .hero-content.container,
    .hero-content {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .site-logo img {
        max-width: min(160px, 46vw);
        height: 46px;
    }

    .header-actions {
        gap: 3px;
    }

    .header-actions .icon-btn,
    .header-actions .lang-btn,
    .mobile-toggle {
        width: 34px;
        height: 34px;
        padding: 0;
        justify-content: center;
    }

    .header-appt-btn {
        min-height: 40px;
        padding: 9px 14px;
        font-size: 0.82rem;
        gap: 6px;
    }

    .header-appt-btn i {
        font-size: 0.9rem;
    }

    /* Keep logo + Book Now + hamburger; search opens from elsewhere if needed */
    .header-actions .icon-btn[data-search-toggle] {
        display: none;
    }

    .lang-btn span {
        display: none;
    }
}

/* Reduced 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;
    }
}

/* High Contrast */
@media (prefers-contrast: high) {
    .btn-primary {
        border: 2px solid white;
    }

    .nav-link:focus,
    .btn:focus,
    .form-control:focus {
        outline: 3px solid var(--accent);
        outline-offset: 2px;
    }
}
