/* =======================================================
   INDUSTRY-STANDARD BULLETPROOF RESPONSIVE CSS 
   (100% Pure CSS - Works on all Browsers & Devices)
======================================================= */

/* Global Reset for all screens to prevent horizontal scroll */
html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%; /* Prevents iOS zooming text */
}

*, *::before, *::after {
    box-sizing: inherit;
    max-width: 100%;
}

/* =======================================================
   TABLET & MOBILE SCREENS (Max Width: 992px)
======================================================= */
@media screen and (max-width: 992px) {
    .container {
        flex-direction: column !important;
        padding: 0 15px !important;
        width: 100% !important;
    }

    .main-content, .sidebar {
        width: 100% !important;
        min-width: 100% !important;
        flex: none !important;
    }
}

/* =======================================================
   STRICT MOBILE SCREENS (Max Width: 768px)
======================================================= */
@media screen and (max-width: 768px) {
    
    /* --- Header & Navigation --- */
    header { 
        flex-direction: column !important; 
        padding: 15px 10px !important; 
    }
    
    .brand-box { 
        width: 100% !important; 
        justify-content: space-between !important; 
    }
    
    .brand-logo { height: 40px !important; }
    .brand-name { font-size: 20px !important; }
    
    /* Mobile Menu Button - Styled purely via CSS */
    .mobile-menu-btn { 
        display: block !important; 
        width: 100% !important; 
        margin-top: 15px !important; 
        padding: 12px !important;
        background-color: var(--brand-gold) !important;
        color: #000 !important;
        border: none !important;
        border-radius: 6px !important;
        font-weight: 800 !important;
        font-size: 16px !important;
        cursor: pointer !important;
        text-align: center !important;
        box-shadow: 0 4px 6px rgba(0,0,0,0.3) !important;
    }

    nav { width: 100% !important; display: none; transition: all 0.3s ease; }
    nav.active { display: block !important; margin-top: 15px !important; }
    nav ul { flex-direction: column !important; width: 100% !important; padding: 0 !important; margin: 0 !important; gap: 0 !important; }
    nav ul li { width: 100% !important; border-bottom: 1px solid #1e293b !important; }
    nav ul li a { display: block !important; padding: 12px 10px !important; font-size: 16px !important; }

    /* --- Hero Section --- */
    .hero { padding: 50px 15px !important; background-position: center !important; }
    .hero h1 { font-size: 28px !important; line-height: 1.3 !important; }
    .hero p { font-size: 16px !important; line-height: 1.5 !important; }

    /* --- Text Content Boxes --- */
    .seo-box { padding: 20px 15px !important; margin-bottom: 20px !important; border-radius: 8px !important; }
    .seo-box h2 { font-size: 22px !important; line-height: 1.4 !important; padding-bottom: 10px !important; margin-bottom: 15px !important; }
    .seo-box h3 { font-size: 18px !important; margin-top: 20px !important; }
    .seo-box p, .seo-box ul li { font-size: 15px !important; line-height: 1.6 !important; text-align: left !important; }
    .seo-box ul { margin-left: 20px !important; }

    /* --- Images & Videos --- */
    img, video, iframe { max-width: 100% !important; height: auto !important; border-radius: 8px !important; }
    .content-img { margin: 20px 0 !important; }
    .map-container { height: 250px !important; margin-top: 20px !important; position: static !important; }

    /* --- Pro-Level Table Handling (Scrollable with hints) --- */
    table { 
        display: block !important; 
        width: 100% !important; 
        overflow-x: auto !important; 
        -webkit-overflow-scrolling: touch !important; /* Smooth scroll on iOS */
        border: 1px solid var(--border-color) !important; 
    }
    th, td { padding: 10px 8px !important; font-size: 14px !important; white-space: nowrap !important; }

    /* --- App-Style Calculator --- */
    .calc-box { 
        padding: 20px 15px !important; 
        position: static !important; 
        margin-bottom: 30px !important; 
        border-radius: 8px !important;
        box-shadow: 0 5px 15px rgba(0,0,0,0.6) !important;
    }
    .calc-box h3 { font-size: 20px !important; margin-bottom: 5px !important; }
    .calc-subtitle { font-size: 13px !important; margin-bottom: 20px !important; }
    
    /* Stack Inputs Vertically */
    .calc-grid { grid-template-columns: 1fr !important; display: grid !important; gap: 12px !important; margin-bottom: 15px !important; }
    
    .input-group label { font-size: 13px !important; margin-bottom: 5px !important; }
    .input-group input { padding: 12px !important; font-size: 16px !important; /* 16px prevents auto-zoom on iOS */ border-radius: 6px !important; }
    
    .btn-calc { padding: 15px !important; font-size: 16px !important; margin-top: 10px !important; }

    /* Stack Results Vertically */
    .res-grid { grid-template-columns: 1fr !important; display: grid !important; gap: 15px !important; }
    .res-grid > div:nth-child(2) { border-left: none !important; border-top: 1px dashed #10b981 !important; padding-top: 15px !important; }
    .result-box span { font-size: 24px !important; }

    /* --- Call To Action (CTA) --- */
    .cta-section { padding: 40px 15px !important; }
    .cta-section h2 { font-size: 24px !important; line-height: 1.3 !important; }
    .cta-section p { font-size: 15px !important; margin-bottom: 25px !important; }
    .btn-call, .btn-wa { 
        display: block !important; 
        width: 100% !important; 
        margin: 12px 0 0 0 !important; 
        font-size: 16px !important; 
        padding: 15px !important; 
        text-align: center !important;
        box-sizing: border-box !important;
    }

    /* --- Mega Footer --- */
    .ultra-footer { padding: 40px 15px 20px !important; }
    .uf-grid { grid-template-columns: 1fr !important; display: grid !important; gap: 30px !important; }
    .uf-col h3 { font-size: 18px !important; margin-bottom: 20px !important; }
    .uf-list > li > a { font-size: 16px !important; padding: 8px 0 !important; }
    .uf-submenu { display: none !important; } /* Hide complex hover menus on mobile */
    .uf-bottom { flex-direction: column !important; text-align: center !important; gap: 10px !important; padding-top: 20px !important; }
    .uf-bottom h2 { font-size: 20px !important; }
}