/**
 * Technoplast Premium - Responsive Breakpoints Stylesheet
 * Orchestrates mobile navigation overlays, typography downscaling, touch target spacing, table scroll wraps, and layout matrices.
 */

/* -----------------------------------------------------------------------------
 * 1. RESPONSIVE BREAKPOINT: 1200px (Desktop Scales)
 * ---------------------------------------------------------------------------*/
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    h1 { font-size: 2.75rem; }
    h2 { font-size: 2.1rem; }
}

/* -----------------------------------------------------------------------------
 * 2. RESPONSIVE BREAKPOINT: 1024px (Tablets landscape)
 * ---------------------------------------------------------------------------*/
@media (max-width: 1024px) {
    .container {
        max-width: 720px;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.85rem; }
    
    /* Layout transformations */
    .single-product-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    /* Header adjustments for tablets */
    .site-header {
        padding: 1rem 0;
    }

    .header-container {
        padding: 0 1rem;
    }

    .main-navigation ul {
        gap: 1rem;
    }

    .main-navigation a {
        font-size: 0.85rem;
    }

    .header-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
}

/* -----------------------------------------------------------------------------
 * 3. RESPONSIVE BREAKPOINT: 768px (Tablets portrait & Mobile Large)
 * ---------------------------------------------------------------------------*/
@media (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 0 1rem;
    }

    h1 { font-size: 2.15rem; }
    h2 { font-size: 1.65rem; }
    h3 { font-size: 1.45rem; }
    
    /* Global Section Paddings downscale */
    .section-padding {
        padding: 4rem 0;
    }

    /* Grids to single column transforms */
    .products-grid-3col,
    .blog-columns-grid,
    .cert-cards-grid,
    .industries-cards-grid,
    .trust-indicators-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Table Scroll Wrapper */
    .blueprint-spec-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .blueprint-table {
        min-width: 500px;
    }

    /* Touch targets check (Min 44px) */
    .inner-btn,
    .btn-primary,
    .btn-accent,
    .btn-outline,
    .btn-whatsapp,
    .quote-submit-btn,
    .product-card-btn {
        min-height: 46px;
        padding: 0.75rem 1.75rem;
    }

    /* ========== HEADER MOBILE FIXES ========== */
    .site-header {
        padding: 0.75rem 0;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
        background: var(--dark-bg);
        border-bottom: 1px solid var(--border-glass);
    }

    .header-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        max-width: 100%;
        margin: 0 auto;
        padding: 0 1rem;
        gap: 1rem;
    }

    .brand-logo {
        flex-shrink: 0;
        order: 1;
    }

    .brand-logo img {
        max-height: 40px;
        width: auto;
    }

    .fallback-brand-text {
        font-size: 1.2rem;
        font-weight: 800;
    }

    /* Hide desktop navigation */
    .main-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background: #0a0f18;
        border-left: 1px solid var(--border-glass);
        z-index: 999;
        padding: 80px 1.5rem 2rem;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.8);
        overflow-y: auto;
    }

    .main-navigation.open {
        right: 0;
    }

    .main-navigation ul {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        list-style: none;
    }

    .main-navigation li {
        width: 100%;
        position: relative;
    }

    .main-navigation a {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
        font-weight: 600;
        color: #ffffff !important;
        opacity: 1 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        text-transform: uppercase;
    }

    .main-navigation a:hover {
        color: var(--primary-blue) !important;
    }

    /* Hide dropdown menus on mobile */
    .main-navigation ul ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.02);
        padding-left: 1.5rem;
        margin-top: 0.5rem;
        display: block;
        width: 100%;
    }

    .main-navigation ul ul a {
        padding: 0.5rem 0;
        font-size: 0.9rem;
        border-bottom: none;
    }

    /* Mobile Menu Toggle Button */
    .mobile-nav-toggle {
        display: flex !important;
        order: 3;
        flex-shrink: 0;
    }

    /* Hide CTA buttons on mobile */
    .header-ctas {
        display: none !important;
    }

    .header-btn {
        display: none;
    }

    .header-btn.btn-whatsapp {
        display: none;
    }

    /* Floating WhatsApp Button position adjustment */
    .whatsapp-floating-pulse {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.65rem;
    }

    #scroll-to-top {
        bottom: 20px;
        left: 20px;
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    /* ========== FOOTER MOBILE FIXES ========== */
    .site-footer {
        padding: 3rem 0 2rem !important;
    }

    .footer-container {
        max-width: 100% !important;
        padding: 0 1rem !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    .footer-col {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    .footer-col h3,
    .footer-col h4 {
        font-size: 1.1rem !important;
    }

    .footer-col p {
        font-size: 0.9rem !important;
    }

    .social-icons-row {
        display: flex !important;
        gap: 0.75rem !important;
    }

    .social-icons-row a {
        width: 36px !important;
        height: 36px !important;
    }

    .footer-bottom-bar {
        padding: 1.5rem 0 !important;
    }

    .footer-bottom-bar {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        text-align: center !important;
    }

    .policy-links {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }
}

/* -----------------------------------------------------------------------------
 * 4. RESPONSIVE BREAKPOINT: 576px (Mobile Portrait)
 * ---------------------------------------------------------------------------*/
@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }

    h1 { font-size: 1.85rem; }
    h2 { font-size: 1.45rem; }
    h3 { font-size: 1.25rem; }

    .inner-hero-banner {
        padding: 140px 0 60px;
    }

    .inner-hero-title {
        font-size: 2.15rem;
    }

    /* Forms full width */
    .inner-form-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .inner-form-group {
        grid-column: 1 / -1 !important;
    }

    /* Gallery masonry mobile transition to single column */
    .gallery-masonry-grid {
        column-count: 1 !important;
    }

    /* Footer structure 4 col to 1 col */
    .technoplast-footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }

    /* Header adjustments for small phones */
    .site-header {
        padding: 0.5rem 0;
    }

    .header-container {
        padding: 0 0.75rem;
        gap: 0.5rem;
    }

    .brand-logo img {
        max-height: 36px;
    }

    .fallback-brand-text {
        font-size: 1rem;
        letter-spacing: 0.5px;
    }

    .mobile-nav-toggle {
        width: 28px;
        height: 18px;
    }

    .mobile-nav-toggle span {
        height: 2px;
    }

    .main-navigation {
        max-width: 280px;
        padding: 70px 1rem 2rem;
    }

    .main-navigation a {
        font-size: 0.95rem;
        padding: 0.6rem 0;
    }

    .main-navigation ul ul {
        padding-left: 1rem;
    }

    .main-navigation ul ul a {
        font-size: 0.85rem;
        padding: 0.4rem 0;
    }

    /* Footer adjustments */
    .footer-container {
        gap: 1.5rem !important;
    }

    .footer-col h3 {
        font-size: 1rem !important;
    }

    .footer-col h4 {
        font-size: 0.95rem !important;
    }

    .footer-col p {
        font-size: 0.85rem !important;
    }

    .social-icons-row a {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
    }
}

/* -----------------------------------------------------------------------------
 * 5. RESPONSIVE BREAKPOINT: 375px (Compact Mobile)
 * ---------------------------------------------------------------------------*/
@media (max-width: 375px) {
    h1 { font-size: 1.65rem; }
    
    .inner-hero-title {
        font-size: 1.85rem;
    }

    .header-container {
        padding: 0 0.5rem;
    }

    .brand-logo img {
        max-height: 32px;
    }

    .fallback-brand-text {
        font-size: 0.95rem;
    }

    .main-navigation {
        max-width: 260px;
        padding: 60px 0.75rem 2rem;
    }

    .footer-col h3 {
        font-size: 0.95rem !important;
    }

    .footer-col h4 {
        font-size: 0.9rem !important;
    }
}

/* Guarantee zero horizontal scroll */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
}
