/* ============================================
   COMPREHENSIVE MOBILE RESPONSIVE STYLES
   FATHOM Agency - Mobile-First Fixes
============================================ */

/* ============================================
   MOBILE HAMBURGER MENU
============================================ */

/* Desktop: Keep nav-links as flex row, hide hamburger */
.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Hide mobile menu button on desktop */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--glow);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hamburger animation when open */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Show hamburger on mobile, hide desktop nav links */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(180deg, rgba(11, 49, 66, 0.98) 0%, rgba(3, 11, 16, 0.98) 100%);
        backdrop-filter: blur(20px);
        border-left: 1px solid rgba(0, 245, 212, 0.2);
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 80px 32px 32px;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 1000;
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        padding: 16px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 1.1rem !important;
        width: 100%;
    }
    
    .nav-links a:hover {
        color: var(--glow) !important;
        padding-left: 8px !important;
    }
    
    .nav-cta {
        margin-top: 24px !important;
        text-align: center !important;
        background: rgba(0, 245, 212, 0.1) !important;
        border: 1px solid var(--glow) !important;
        padding: 16px 24px !important;
        border-radius: 8px !important;
    }
    
    /* Overlay when menu is open */
    .nav-links.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: calc(100vw - 280px);
        height: 100vh;
        background: rgba(3, 11, 16, 0.8);
        z-index: -1;
    }
}

/* Mobile Small (up to 480px) */
@media (max-width: 480px) {
    /* Typography */
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    p, li {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    /* Navigation */
    .nav {
        padding: 12px 16px !important;
        flex-wrap: wrap !important;
    }
    
    .logo-text {
        font-size: 1.25rem !important;
    }
    
    .nav a {
        font-size: 0.85rem !important;
        padding: 8px 12px !important;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 60px 20px !important;
        min-height: auto !important;
    }
    
    /* Buttons & CTAs */
    .cta-button,
    .cta-button-primary,
    .cta-button-secondary {
        width: 100% !important;
        padding: 16px 24px !important;
        font-size: 1rem !important;
        text-align: center !important;
    }
    
    .cta-row {
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
    }
    
    /* Stats */
    .stats-row {
        flex-direction: column !important;
        gap: 24px !important;
    }
    
    .stat-value {
        font-size: 2rem !important;
    }
    
    .stat-label {
        font-size: 0.85rem !important;
    }
    
    /* Cards */
    .service-card,
    .process-card,
    .blog-card {
        padding: 20px !important;
        margin-bottom: 20px !important;
    }
    
    /* Sections */
    section {
        padding: 40px 16px !important;
    }
    
    /* Forms */
    input,
    textarea,
    select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 14px !important;
    }
    
    /* Footer */
    footer {
        padding: 40px 20px !important;
    }
    
    .footer-content {
        flex-direction: column !important;
        gap: 32px !important;
    }
    
    /* Tables */
    table {
        font-size: 0.85rem !important;
    }
    
    th, td {
        padding: 8px !important;
    }
    
    /* Modals */
    .modal {
        padding: 32px 24px !important;
        width: 95% !important;
    }
    
    /* Hide custom cursor on mobile */
    .cursor,
    .cursor-dot {
        display: none !important;
    }
}

/* Mobile Medium (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    /* Typography */
    .hero-title {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
    }
    
    h2 {
        font-size: 2rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
    
    /* Navigation */
    .nav {
        padding: 16px 24px !important;
    }
    
    /* Hero */
    .hero-section {
        padding: 80px 32px !important;
    }
    
    /* Buttons */
    .cta-button,
    .cta-button-primary,
    .cta-button-secondary {
        padding: 18px 32px !important;
    }
    
    .cta-row {
        flex-wrap: wrap !important;
        gap: 16px !important;
    }
    
    /* Stats */
    .stats-row {
        flex-wrap: wrap !important;
        gap: 32px !important;
    }
    
    /* Sections */
    section {
        padding: 60px 32px !important;
    }
    
    /* Cards */
    .service-card,
    .process-card {
        padding: 32px !important;
    }
    
    /* Hide custom cursor on tablet */
    .cursor,
    .cursor-dot {
        display: none !important;
    }
}

/* Tablet (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: 3rem !important;
    }
    
    section {
        padding: 80px 40px !important;
    }
    
    .container {
        max-width: 900px !important;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets */
    a, button, .nav-link, .cta-button {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    /* Remove hover effects */
    *:hover {
        transform: none !important;
    }
    
    /* Disable cursor */
    * {
        cursor: default !important;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto !important;
        padding: 40px 20px !important;
    }
    
    .modal {
        max-height: 90vh !important;
        overflow-y: auto !important;
    }
}

/* Safe Area for Notched Devices (iPhone X+) */
@supports (padding: env(safe-area-inset-top)) {
    .nav {
        padding-top: calc(16px + env(safe-area-inset-top)) !important;
        padding-left: calc(24px + env(safe-area-inset-left)) !important;
        padding-right: calc(24px + env(safe-area-inset-right)) !important;
    }
    
    footer {
        padding-bottom: calc(40px + env(safe-area-inset-bottom)) !important;
    }
}
