/* ========================================
   RESPONSIVE DESIGN - MASHAEL v2.0
   ======================================== */

/* ========================================
   LARGE SCREENS (> 1200px)
   ======================================== */
@media (min-width: 1400px) {
    :root {
        --container: 1320px;
    }
}

/* ========================================
   TABLET (768px - 1024px)
   ======================================== */

@media (max-width: 1024px) {
    :root {
        --section-py: 4rem;
        --header-h: 70px;
    }

    .container { width: 92%; }

    .nav-menu { gap: 0.15rem; }
    .nav-menu a { font-size: 0.88rem; padding: 0.5rem 0.7rem; }

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

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

    .about-grid,
    .about-split-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-image-wrapper { max-width: 500px; margin: 0 auto; }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }

    .archive-content {
        grid-template-columns: 200px 1fr;
        gap: 2rem;
    }
}

/* ========================================
   MOBILE (< 768px)
   ======================================== */

@media (max-width: 768px) {
    :root {
        --section-py: 3.5rem;
        --header-h: 64px;
    }

    body { font-size: 15px; }
    .container { width: 90%; }

    /* Header Mobile */
    .site-header-inner {
        gap: 1rem;
    }

    .site-navigation {
        display: none;
        position: fixed;
        top: var(--header-h);
        right: 0;
        width: 280px;
        height: calc(100vh - var(--header-h));
        flex-direction: column;
        background: var(--bg);
        padding: 1rem;
        box-shadow: -5px 0 30px rgba(0,0,0,0.1);
        z-index: 999;
        overflow-y: auto;
        animation: slideIn 0.3s var(--ease);
    }

    @keyframes slideIn {
        from { transform: translateX(100%); opacity: 0; }
        to { transform: translateX(0); opacity: 1; }
    }

    .site-navigation.active {
        display: flex;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--border-light);
    }

    .nav-menu a {
        padding: 0.9rem 0.75rem;
        font-size: 0.95rem;
        border-radius: 0;
    }

    .nav-menu a::after { display: none; }

    .nav-menu a:hover,
    .nav-menu a.active {
        background: var(--bg-warm);
        color: var(--gold);
    }

    .menu-toggle { display: block; }

    .header-cta { display: none; }

    /* Section Headers */
    .section-header { margin-bottom: 2.5rem; }
    .section-tag { font-size: 0.78rem; }

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

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

    .stat-item {
        padding: 1.75rem 1rem;
    }

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

    /* Cards */
    .card-image,
    .premium-image-wrap {
        height: 220px;
    }

    /* About */
    .about-grid,
    .about-split-layout {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

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

    .about-image-accent { display: none; }

    .about-badge {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        display: inline-flex;
    }

    /* Archive */
    .archive-content {
        grid-template-columns: 1fr;
    }

    .archive-sidebar {
        order: 2;
    }

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

    .site-footer { padding: 3rem 0 0; }

    /* Forms */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="search"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Buttons */
    .btn { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
    .btn-lg { padding: 0.85rem 2rem; font-size: 0.95rem; }

    /* Breadcrumbs */
    .breadcrumbs ul {
        justify-content: center;
    }

    /* Service */
    .service-hero { height: 280px; }
    .service-cta { padding: 2rem 1.5rem; }
    .cta-buttons { flex-direction: column; }
    .cta-buttons .btn { width: 100%; }

    /* Inner Hero */
    .inner-hero { padding: 3.5rem 0 5.5rem; }

    /* Premium Page Canvas */
    .premium-page-canvas {
        padding: 2rem 1.5rem;
        margin-left: 0;
        margin-right: 0;
        border-radius: var(--r);
    }

    /* Error 404 */
    .error-title { font-size: 4rem; }
    .error-actions { flex-direction: column; }
    .error-actions .btn { width: 100%; }

    /* Page Hero */
    .page-hero {
        height: 250px;
        border-radius: var(--r);
    }
}

/* ========================================
   SMALL MOBILE (< 480px)
   ======================================== */

@media (max-width: 480px) {
    :root {
        --section-py: 3rem;
    }

    .container { width: 94%; }

    .site-logo img { max-height: 48px; }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-item { padding: 1.25rem 0.75rem; }
    .stat-number { font-size: 1.85rem; }
    .stat-label { font-size: 0.82rem; }

    .feature-card { padding: 1.75rem 1.25rem; }

    .footer-column h3 { font-size: 1rem; }
    .footer-bottom { font-size: 0.8rem; }

    .error-title { font-size: 3rem; }
}

/* ========================================
   LANDSCAPE
   ======================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero-slider {
        height: 100vh;
        min-height: 350px;
    }

    .slide-title { font-size: 1.75rem; }
    .slide-desc { font-size: 0.9rem; margin-bottom: 1rem; }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

@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;
    }

    .slide-bg { transition: none; }
}

/* ========================================
   PRINT
   ======================================== */

@media print {
    .site-header,
    .site-footer,
    .menu-toggle,
    .btn,
    .header-cta,
    .site-navigation,
    .hero-slider,
    .back-to-top,
    .premium-preloader {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
        font-size: 12pt;
    }

    a { color: #000; text-decoration: underline; }
    section { page-break-inside: avoid; padding: 1rem 0; }

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