/* ============================================
   QuickLaunch — Comprehensive Responsive Styles
   ============================================ */

/* ---------- Global Overflow Protection ---------- */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Ensure images & embeds stay responsive */
img, iframe, svg, video {
    max-width: 100%;
    height: auto;
}

/* ---------- Laptop / Small Desktop: 992px - 1199px ---------- */
@media (max-width: 1199px) {
    :root {
        --section-py: 80px;
    }

    .container {
        max-width: 960px;
    }

    .hero .container {
        grid-template-columns: 1fr 360px;
        gap: 36px;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

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

    .pricing-card.popular {
        transform: scale(1);
    }

    .pricing-card.popular:hover {
        transform: translateY(-8px);
    }

    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
    }

    .footer-newsletter {
        grid-column: 1 / -1;
        margin-top: 20px;
    }
}

/* ---------- Tablet & Mobile Drawer: 768px - 991px ---------- */
@media (max-width: 991px) {
    :root {
        --section-py: 70px;
    }

    .container {
        max-width: 720px;
    }

    /* Header styling on Mobile/Tablet */
    .header {
        background: rgba(10, 37, 64, 0.94);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 12px 0;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    /* Page Banner on Subpages */
    .page-banner {
        padding: 130px 0 60px;
    }

    .page-banner h1 {
        font-size: 2.2rem;
    }

    /* Navigation Drawer */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 290px;
        max-width: 85vw;
        height: 100vh;
        background: var(--primary-dark, #07192b);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        padding: 40px 24px;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.4);
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-link {
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
        padding: 8px 0;
    }

    .hamburger {
        display: flex;
    }

    .header-actions .btn-call {
        display: none;
    }

    /* Hero Section Fix */
    .hero {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        height: auto;
        min-height: 100vh;
        padding-top: 105px;
        padding-bottom: 60px;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
        position: relative;
        z-index: 2;
    }

    .hero-title {
        font-size: 2.3rem;
        line-height: 1.25;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-description {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-glass-card {
        max-width: 440px;
        margin: 0 auto;
        width: 100%;
    }

    /* About */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-image-wrapper img {
        height: 380px;
    }

    .counters {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    /* Features */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Branches */
    .branches-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    /* Amenities */
    .amenities-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    /* Gallery on Tablet */
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .gallery-item,
    .gallery-item.tall,
    .gallery-item.wide {
        grid-row: auto !important;
        grid-column: auto !important;
        height: auto !important;
        aspect-ratio: 4 / 3 !important;
        width: 100% !important;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-newsletter {
        grid-column: 1 / -1;
    }

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

    /* Lightbox Navigation */
    .lightbox-prev {
        left: 15px;
        width: 44px;
        height: 44px;
        background: rgba(0, 0, 0, 0.6);
        border-radius: 50%;
    }

    .lightbox-next {
        right: 15px;
        width: 44px;
        height: 44px;
        background: rgba(0, 0, 0, 0.6);
        border-radius: 50%;
    }
}

/* ---------- Mobile Landscape / Phablet: 576px - 767px ---------- */
@media (max-width: 767px) {
    :root {
        --section-py: 60px;
        --container-px: 16px;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .section-title {
        font-size: 1.85rem;
    }

    .page-banner {
        padding: 115px 0 45px;
    }

    .page-banner h1 {
        font-size: 1.8rem;
    }

    /* Header */
    .header {
        padding: 10px 0;
    }

    .header-actions {
        gap: 10px;
    }

    .header-actions .btn-book-visit {
        padding: 7px 14px;
        font-size: 12px;
    }

    /* Hero Section Fix */
    .hero {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        height: auto;
        min-height: 100vh;
        padding-top: 92px;
        padding-bottom: 45px;
    }

    .hero-badge {
        font-size: 11px;
        padding: 5px 12px;
        margin-bottom: 12px;
        display: inline-flex;
    }

    .hero-title {
        font-size: 1.95rem;
        line-height: 1.25;
        margin-bottom: 14px;
    }

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 22px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
        gap: 12px;
    }

    .hero-buttons .btn {
        width: 100%;
        padding: 12px 20px;
    }

    .hero-glass-card {
        padding: 22px 16px;
        margin-top: 10px;
    }

    .scroll-indicator {
        display: none;
    }

    /* Prevent iOS input focus auto-zoom */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* About */
    .about-image-wrapper img {
        height: 280px;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .counters {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .counter-number {
        font-size: 1.85rem;
    }

    .counter-item {
        padding: 18px 12px;
    }

    /* Features */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .feature-card {
        padding: 20px 14px;
    }

    /* Workspaces */
    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .workspace-card-image {
        height: 200px;
    }

    /* Amenities */
    .amenities-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .amenity-card {
        padding: 20px 14px;
    }

    /* Gallery Mobile Layout */
    .gallery-filters {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding: 6px 16px 14px;
        margin-left: -16px;
        margin-right: -16px;
        margin-bottom: 22px;
        justify-content: flex-start;
        gap: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .gallery-filters::-webkit-scrollbar {
        display: none;
    }

    .gallery-filter-btn {
        padding: 8px 16px;
        font-size: 12px;
        border-radius: 30px;
        flex-shrink: 0;
    }

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

    .gallery-item,
    .gallery-item.tall,
    .gallery-item.wide {
        grid-row: auto !important;
        grid-column: auto !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
        width: 100% !important;
    }

    /* Pricing */
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin: 0 auto;
    }

    .pricing-card.popular {
        transform: scale(1);
    }

    .pricing-card.popular:hover {
        transform: translateY(-6px);
    }

    /* Testimonials */
    .testimonial-card {
        padding: 24px 18px;
    }

    .testimonial-text {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .testimonial-prev,
    .testimonial-next {
        display: none;
    }

    /* Contact */
    .contact-form-wrapper {
        padding: 24px 18px;
    }

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

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .newsletter-form {
        flex-direction: column;
        gap: 10px;
    }

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

    /* Back to top */
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 42px;
        height: 42px;
    }

    /* Lightbox Modal */
    .lightbox-content {
        max-width: 92vw;
        max-height: 80vh;
    }

    .lightbox-content img {
        max-height: 72vh;
        object-fit: contain;
        border-radius: 10px;
    }

    .lightbox-close {
        top: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
        background: rgba(255, 255, 255, 0.25);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10005;
    }

    .lightbox-prev {
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 42px;
        height: 42px;
        background: rgba(0, 0, 0, 0.65);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .lightbox-next {
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        width: 42px;
        height: 42px;
        background: rgba(0, 0, 0, 0.65);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ---------- Standard Mobile: below 575px ---------- */
@media (max-width: 575px) {
    :root {
        --section-py: 50px;
    }

    .header {
        padding: 8px 0;
    }

    .page-banner {
        padding: 105px 0 40px;
    }

    .hero {
        padding-top: 84px;
        padding-bottom: 40px;
    }

    .section-title {
        font-size: 1.65rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .hero-badge {
        font-size: 10px;
        padding: 4px 10px;
        margin-bottom: 10px;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.25;
        margin-bottom: 12px;
    }

    .hero-description {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 20px;
    }

    .hero-glass-card {
        padding: 18px 14px;
    }

    /* Convert features to single column so text & icons fit comfortably */
    .features-grid {
        grid-template-columns: 1fr;
    }

    .counter-number {
        font-size: 1.6rem;
    }

    .branch-actions {
        flex-direction: column;
        gap: 10px;
    }

    .branch-actions .btn {
        width: 100%;
    }

    .faq-question h4 {
        font-size: 0.95rem;
        padding-right: 10px;
    }
}

/* ---------- Small Mobile: below 400px ---------- */
@media (max-width: 399px) {
    .header-actions .btn-book-visit {
        padding: 5px 9px;
        font-size: 11px;
    }

    .logo {
        font-size: 1.1rem;
    }

    .hero {
        padding-top: 78px;
        padding-bottom: 35px;
    }

    .hero-title {
        font-size: 1.55rem;
        line-height: 1.25;
    }

    .page-banner h1 {
        font-size: 1.55rem;
    }

    .amenities-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gallery-item,
    .gallery-item.tall,
    .gallery-item.wide {
        aspect-ratio: 16 / 10 !important;
    }

    .counters {
        grid-template-columns: 1fr;
    }
}

/* ---------- Mobile Nav Overlay ---------- */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
}

@media (max-width: 991px) {
    .nav-overlay.active {
        display: block;
    }
}
