/* 
    10by10 Digital - Comprehensive Responsiveness
*/

/* Reset & Utilities */
img {
    max-width: 100%;
    height: auto;
}

/* Tablets (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
    
    h1 { font-size: 4.2rem !important; }
    h2 { font-size: 3.5rem !important; }
    h3 { font-size: 2.2rem !important; }
    
    .hero-content h1 {
        font-size: 4.8rem !important;
    }
}

/* Mobile Devices (768px and below) */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }

    .container {
        padding: 0 20px;
    }

    /* Fixed Header / Nav */
    header {
        padding: 15px 0;
    }

    .nav-links {
        display: none; /* Hide for mobile toggle later */
        position: fixed;
        top: 0;
        right: -20px; /* Offset to cover right edge perfectly if container has padding */
        height: 100vh;
        width: 80%;
        max-width: 400px;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 20px;
        z-index: 1000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        padding: 50px 20px 40px;
        overflow-y: auto;
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-only {
        display: block !important;
        width: 100%;
    }

    .mobile-menu-section {
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(255,255,255,0.1);
        text-align: center;
    }

    .mobile-menu-title {
        display: block;
        color: var(--text-muted);
        font-size: 0.9rem;
        margin-bottom: 15px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }

    .mobile-socials {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .mobile-socials a, .mobile-legal a {
        font-size: 1rem !important;
        padding: 5px !important;
        color: var(--text-muted);
    }
    
    .mobile-legal {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .nav-links > li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.2rem;
        display: block;
        padding: 10px;
    }

    .dropdown {
        position: static;
        width: 100%;
        transform: none;
        opacity: 1;
        visibility: visible;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .has-dropdown.active .dropdown {
        max-height: 500px;
    }

    nav {
        justify-content: flex-start;
        align-items: center;
        width: 100%;
        padding-right: 0;
    }

    .logo {
        order: 1;
        margin-right: auto;
        font-size: 0.95rem;
    }

    .nav-cta {
        display: block;
        order: 2;
    }

    .nav-cta .btn {
        padding: 5px 8px;
        font-size: 0.65rem;
        white-space: nowrap;
        gap: 5px;
    }

    .mobile-toggle {
        display: block;
        cursor: pointer;
        z-index: 1100;
        order: 3;
        margin-left: 8px;
    }

    /* Mobile Toggle Button */
    .mobile-toggle span {
        display: block;
        width: 25px;
        height: 2px;
        background: var(--text-main);
        margin: 6px 0;
        transition: 0.3s;
    }

    /* Hero Stacking */
    .hero .container {
        flex-direction: column !important;
        text-align: center;
        padding-top: 50px;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-image {
        margin-top: 40px;
        order: -1; /* Image on top */
    }

    /* Grid Stacking for ALL sections */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    [style*="display: flex"] {
        flex-direction: column !important;
        gap: 20px !important;
    }

    /* Contact Page Specific Fixes */
    .glass-card {
        padding: 25px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Inner grids (like contact names) */
    .glass-card [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* Fix sections that were side-by-side */
    section .container {
        flex-direction: column !important;
        gap: 40px !important;
    }

    /* Stats Section */
    .stats [style*="grid-template-columns"] {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Typography */
    h1 { font-size: 3.2rem !important; }
    h2 { font-size: 2.5rem !important; }
    h3 { font-size: 1.8rem !important; }
    
    .section-header p, .hero-content p {
        font-size: 1.2rem !important;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    .footer-brand {
        margin-bottom: 30px;
    }

    .footer-links {
        margin-bottom: 20px;
    }

    .toc {
        position: static !important;
        margin-bottom: 30px !important;
    }
}

/* Smallest Devices */
@media (max-width: 480px) {
    }
    
    .btn {
        width: 100%;
    }
}
