/**
 * Komal Texfab - Responsive CSS
 * All breakpoints: desktop, laptop, tablet, mobile
 */

/* ============================================
   Large Desktop (1440px+)
   ============================================ */
@media (min-width: 1441px) {
    .container { max-width: 1320px; }
}


/* ============================================
   Laptop (1024px - 1280px)
   ============================================ */
@media (max-width: 1280px) {
    .footer-grid {
        grid-template-columns: 1.2fr 0.8fr 0.8fr 1fr;
        gap: var(--space-xl);
    }

    .feature-grid {
        gap: var(--space-lg);
    }

    .stats-bar {
        gap: var(--space-md);
    }

    .nav-link {
        padding: 10px 12px;
        font-size: 0.82rem;
    }
}


/* ============================================
   Tablet Landscape (768px - 1024px)
   ============================================ */
@media (max-width: 1024px) {
    /* Navigation */
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        padding: 80px 24px 24px;
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-slow);
        overflow-y: auto;
        z-index: 9;
        gap: 0;
    }

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

    .nav-link {
        padding: 14px 16px;
        font-size: var(--fs-base);
        justify-content: space-between;
        border-bottom: 1px solid var(--gray-100);
    }

    .nav-cta {
        margin-top: var(--space-md);
        text-align: center;
        justify-content: center !important;
    }

    /* Dropdown */
    .dropdown-menu {
        position: static;
        min-width: auto;
        box-shadow: none;
        border: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-base);
        padding: 0;
        background: var(--gray-50);
        border-radius: var(--radius-sm);
    }

    .nav-item.dropdown-open > .dropdown-menu {
        max-height: 500px;
        padding: 8px;
        margin-top: 4px;
    }

    .dropdown-menu li a {
        padding: 10px 16px;
    }

    /* Mobile Menu Overlay */
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 8;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav-overlay.visible {
        opacity: 1;
        visibility: visible;
    }

    /* Layouts */
    .two-col {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .two-col-img::after {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }

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

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

    .stats-bar .stat-card:not(:last-child)::after {
        display: none;
    }

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

    /* Process Timeline */
    .process-timeline::before {
        left: 24px;
    }

    .process-step:nth-child(odd),
    .process-step:nth-child(even) {
        flex-direction: row;
        padding-right: 0;
        padding-left: 80px;
        text-align: left;
    }

    .process-number {
        left: 0;
        transform: none;
    }

    /* Hero */
    .hero-section {
        min-height: 500px;
        max-height: 700px;
    }

    .hero-scroll-indicator {
        display: none;
    }

    /* Top bar */
    .top-bar-left {
        gap: var(--space-md);
    }

    .top-bar-item span {
        display: none;
    }
}


/* ============================================
   Tablet Portrait (600px - 768px)
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        height: 80vh;
        min-height: 450px;
    }

    .hero-title {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }

    .hero-subtitle {
        font-size: var(--fs-md);
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    .page-hero {
        min-height: 280px;
    }

    .page-hero h1 {
        font-size: var(--fs-2xl);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }

    .lightbox-nav {
        width: 40px;
        height: 40px;
    }

    .capacity-table {
        display: block;
        overflow-x: auto;
    }

    .tab-nav {
        gap: 0;
    }

    .tab-btn {
        padding: 12px 16px;
        font-size: var(--fs-xs);
    }
}


/* ============================================
   Mobile (under 600px)
   ============================================ */
@media (max-width: 600px) {
    .hero-section {
        height: 70vh;
        min-height: 400px;
    }

    .section-header {
        margin-bottom: var(--space-2xl);
    }

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

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .stat-number {
        font-size: var(--fs-2xl);
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-sm);
    }

    .gallery-item {
        aspect-ratio: 1;
    }

    .nav-menu {
        width: 100%;
    }

    .top-bar {
        display: none;
    }

    .icon-card {
        padding: var(--space-xl) var(--space-lg);
    }

    .team-card-body {
        padding: var(--space-lg);
    }

    .client-carousel::before,
    .client-carousel::after {
        width: 40px;
    }

    .client-logo {
        height: 35px;
    }

    .hero-dots {
        bottom: 20px;
    }

    .back-to-top {
        bottom: 90px;
        right: 16px;
    }

    .whatsapp-float {
        bottom: 24px;
        right: 16px;
        width: 46px;
        height: 46px;
    }

    .cta-banner {
        padding: var(--space-3xl) 0;
    }
}


/* ============================================
   Small Mobile (under 400px)
   ============================================ */
@media (max-width: 400px) {
    :root {
        --container-padding: 16px;
    }

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

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

    .stats-bar {
        grid-template-columns: 1fr 1fr;
    }

    .footer-bottom-links {
        flex-direction: column;
        gap: var(--space-sm);
    }
}


/* ============================================
   Landscape Mobile
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        height: auto;
        min-height: 100vh;
        padding: var(--space-3xl) 0;
    }

    .page-hero {
        min-height: 200px;
    }
}


/* ============================================
   Print Styles
   ============================================ */
@media print {
    .top-bar,
    .main-nav,
    .back-to-top,
    .whatsapp-float,
    .page-loader,
    .hero-dots,
    .hero-scroll-indicator,
    .footer-wave {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }
}
