/* ThatDeveloperGuy Mobile Responsive CSS */

/* Base mobile fixes */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, video, iframe { max-width: 100%; height: auto; }

/* Navigation mobile styles */
@media (max-width: 1024px) {
    .nav { padding: 1rem; }
    .nav-inner { padding: 0; }
    
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        z-index: 1001;
        padding: 10px;
        background: transparent;
        border: none;
    }
    
    .hamburger span {
        display: block;
        width: 25px;
        height: 2px;
        background: #fff;
        transition: all 0.3s ease;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 350px;
        height: 100vh;
        height: 100dvh;
        background: rgba(3, 3, 8, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 2rem;
        transition: right 0.35s ease;
        z-index: 1000;
        border-left: 1px solid rgba(139, 92, 246, 0.2);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    
    .nav-links.open {
        right: 0;
    }
    
    .nav-links a {
        display: block;
        padding: 1rem;
        font-size: 1.1rem;
        text-align: center;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-links a:last-child {
        border-bottom: none;
    }
    
    .nav-cta {
        display: none;
    }
}

/* Hero section mobile */
@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: 6rem 1.5rem 3rem;
    }
    
    .hero-content {
        padding: 0;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        padding: 0 0.5rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .hero-cta .btn {
        width: 100%;
        text-align: center;
    }
}

/* Sections mobile */
@media (max-width: 768px) {
    section {
        padding: 3rem 1.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
}

/* Grid layouts mobile */
@media (max-width: 768px) {
    .grid, .services-grid, .features-grid, .testimonials-grid, .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .two-col, .three-col, .four-col {
        grid-template-columns: 1fr;
    }
}

/* Cards mobile */
@media (max-width: 768px) {
    .card, .service-card, .feature-card {
        padding: 1.5rem;
    }
}

/* Buttons mobile */
@media (max-width: 768px) {
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
        width: 100%;
        text-align: center;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 1rem;
    }
}

/* Footer mobile */
@media (max-width: 768px) {
    footer {
        padding: 2rem 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
}

/* Forms mobile */
@media (max-width: 768px) {
    input, textarea, select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem;
    }
    
    .form-row {
        flex-direction: column;
    }
}

/* Tables mobile */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .hero {
        padding: 5rem 1rem 2rem;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    section {
        padding: 2rem 1rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
}

/* Safe area for notched devices */
@supports (padding: max(0px)) {
    .nav {
        padding-top: max(1rem, env(safe-area-inset-top));
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    footer {
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
}
