/* 
 * SeriGraf Website - Responsive CSS
 * Mobile-first approach where applicable, desktop-down breakpoints.
 */

/* ==========================================================================
   Global Mobile Toggle & Drawer Overlay CSS Rules
   ========================================================================== */
.mobile-toggle {
    display: none;
}

@media (max-width: 991px) {
    .desktop-nav {
        display: none !important;
    }

    .hide-mobile {
        display: none !important;
    }

    .brand-logo img {
        max-width: 170px !important;
        max-height: 48px !important;
    }

    .brand-logo {
        max-width: 170px !important;
        overflow: hidden;
    }

    .mobile-toggle {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        font-size: 1.6rem;
        background: var(--accent-orange) !important;
        border: 1px solid var(--accent-orange) !important;
        border-radius: 12px;
        color: #ffffff !important;
        cursor: pointer;
        transition: all 0.3s ease;
        flex-shrink: 0 !important;
        box-shadow: 0 4px 14px rgba(255, 107, 0, 0.4);
    }

    .mobile-toggle:hover {
        background: #e05e00 !important;
        border-color: #e05e00 !important;
    }
}

@media (max-width: 480px) {
    .brand-logo img {
        max-width: 145px !important;
        max-height: 42px !important;
    }

    .brand-logo {
        max-width: 145px !important;
    }

    .mobile-toggle {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.4rem !important;
    }
}

.mobile-drawer-overlay {
    position: fixed;
    top: 90px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 90px);
    background: rgba(5, 7, 12, 0.98);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    overflow-y: auto;
    border-top: 1px solid var(--border-color, rgba(255,255,255,0.08));
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-drawer-inner {
    padding: 30px 24px 60px 24px;
    max-width: 500px;
    margin: 0 auto;
}

/* ==========================================================================
   Breakpoint: Extra Large (Desktops up to 1280px)
   ========================================================================== */
@media (max-width: 1280px) {
    .container {
        max-width: 100%;
        padding: 0 30px;
    }
}

/* ==========================================================================
   Breakpoint: Large (Tablets landscape & small laptops up to 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
    .container {
        padding: 0 24px;
    }
    
    .section {
        padding: 70px 0;
    }

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

    h1 { font-size: 3rem; }
    h2 { font-size: 2.3rem; }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* ==========================================================================
   Breakpoint: Medium (Tablets portrait up to 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .section {
        padding: 55px 0;
    }

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

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

    h1 { font-size: 2.4rem; }
    h2 { font-size: 1.9rem; }
    h3 { font-size: 1.4rem; }

    .hero-content {
        text-align: center;
        padding: 0 10px;
    }

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

    .contact-wrapper {
        flex-direction: column;
    }

    .form-group.half-width {
        width: 100%;
    }
}

/* ==========================================================================
   Breakpoint: Small (Mobile up to 480px)
   ========================================================================== */
@media (max-width: 480px) {
    .container {
        padding: 0 18px;
    }
    
    .section {
        padding: 45px 0;
    }

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

    h1 { font-size: 2rem; }
    h2 { font-size: 1.6rem; }

    .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .newsletter-subscription-box {
        padding: 24px 18px !important;
        border-radius: 18px !important;
    }

    .newsletter-form {
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .newsletter-form input {
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .newsletter-form button {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
        box-sizing: border-box !important;
    }

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