/* Mobile-First Responsive Design */

/* Base Mobile Styles (320px and up) */
@media (max-width: 480px) {
    /* Typography adjustments */
    body {
        font-size: 14px;
    }

    h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    /* Spacing adjustments */
    .pricing-container,
    .homepage-container {
        padding: 1rem !important;
    }

    /* Button adjustments */
    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        width: 100%;
        justify-content: center;
    }

    .btn-hero {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }

    /* Form adjustments */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.875rem;
    }

    /* Modal adjustments */
    .modal {
        width: 95%;
        padding: 1.5rem;
        margin: 0.5rem;
    }

    .video-modal {
        min-width: 95vw;
        width: 95vw;
    }

    /* Card adjustments */
    .card {
        padding: 1rem;
    }

    /* Grid adjustments */
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Tablet Styles (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-container {
        padding: 2rem 1.5rem;
    }
}

/* Pricing Page Mobile Optimizations */
@media (max-width: 768px) {
    .pricing-header h1 {
        font-size: 1.875rem !important;
    }

    .pricing-header p {
        font-size: 1rem !important;
    }

    .pricing-toggle {
        flex-direction: column;
        gap: 0.5rem;
    }

    .toggle-btn {
        width: 100%;
        padding: 0.75rem 1.5rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    .pricing-card {
        max-width: 100%;
    }

    .tier-features {
        font-size: 0.875rem;
    }

    .tier-features li {
        padding: 0.625rem 0;
    }
}

/* Homepage Mobile Optimizations */
@media (max-width: 768px) {
    /* Hide "Get Started" button in header on mobile - only show Sign In */
    .nav-cta .btn-nav-primary {
        display: none !important;
    }

    /* Make Sign In button more compact on mobile with proper spacing */
    .nav-cta {
        margin-left: 0.75rem;
    }

    .nav-cta .btn-nav-outline {
        padding: 0.4rem 0.75rem;
        font-size: 0.875rem;
    }

    /* Hide icon in Sign In button on mobile - text only */
    .nav-cta .btn-nav-outline i {
        display: none;
    }

    .hero-content h1 {
        font-size: 2rem !important;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 1rem !important;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .features-grid {
        grid-template-columns: 1fr !important;
    }

    .feature-card {
        padding: 1.5rem;
    }
}

/* Dashboard Mobile Optimizations */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 1rem;
    }

    .profile-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .profile-grid {
        grid-template-columns: 1fr !important;
    }

    .dashboard-nav {
        flex-direction: column;
        gap: 0.5rem;
    }

    .dashboard-nav a {
        width: 100%;
        text-align: center;
    }
}

/* Navigation Mobile Optimizations */
@media (max-width: 768px) {
    .nav-menu {
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        padding: 2rem 1rem;
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .nav-menu.active {
        right: 0;
    }

    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--gray-700);
        padding: 0.5rem;
    }

    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .mobile-menu-overlay.active {
        display: block;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap targets */
    .btn,
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover effects on touch devices */
    .btn:hover,
    .card:hover {
        transform: none;
    }

    /* Add active states instead */
    .btn:active {
        transform: scale(0.98);
    }

    .card:active {
        transform: translateY(1px);
    }
}

/* Landscape mobile optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-background,
    .sports-background {
        height: 150vh;
    }

    .login-container {
        padding: 1rem;
    }

    .modern-login-card {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Small mobile devices */
@media (max-width: 375px) {
    body {
        font-size: 13px;
    }

    .pricing-header h1 {
        font-size: 1.5rem !important;
    }

    .btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.8125rem;
    }

    .modal {
        padding: 1rem;
    }
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
}

* {
    max-width: 100%;
}

/* Improve readability on mobile */
@media (max-width: 768px) {
    p {
        line-height: 1.6;
    }

    /* Better spacing for lists */
    ul, ol {
        padding-left: 1.25rem;
    }

    /* Improve table responsiveness */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}


/* Fix for iOS Safari bottom bar - prevents content from being hidden behind the Safari UI */
.login-container,
.homepage-container {
    min-height: 100vh;
}

/* For iOS devices, use dvh (dynamic viewport height) which accounts for browser UI */
@supports (min-height: 100dvh) {
    .login-container,
    .homepage-container {
        min-height: 100dvh;
    }
}

