/* Responsive Styles for Frontier Socials */

/* Mobile First Approach - Base styles for mobile devices */

/* Extra Small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .legal-document {
        font-size: 0.95rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-actions {
        flex-direction: row;
        justify-content: center;
        gap: var(--spacing-md);
    }
    
    .btn {
        width: auto;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding: 0 var(--spacing-md);
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .hero-section {
        padding: var(--spacing-xxl) 0;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.375rem;
    }
    
    .section-title {
        font-size: 2.25rem;
    }
    
    .page-title {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xl);
    }
    
    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    /* Header styles for tablet and up */
    .main-navigation {
        display: block;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    /* Game play page adjustments */
    .game-frame {
        min-height: 500px;
    }
    
    .game-frame iframe {
        height: 500px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
    
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
    
    /* Game play page full width */
    .game-frame {
        min-height: 600px;
    }
    
    .game-frame iframe {
        height: 600px;
    }
    
    .related-games-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
        padding: 0 var(--spacing-lg);
    }
    
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    /* Enhanced game experience on large screens */
    .game-frame {
        min-height: 700px;
    }
    
    .game-frame iframe {
        height: 700px;
    }
}

/* Extra extra large devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--spacing-xl);
    }
}

/* Landscape orientation adjustments */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .hero-section {
        padding: var(--spacing-lg) 0;
    }
    
    .page-header {
        padding: var(--spacing-lg) 0;
    }
    
    .age-verification-content {
        max-height: 90vh;
        overflow-y: auto;
        padding: var(--spacing-md);
    }
    
    .age-verification-actions {
        flex-direction: row;
        gap: var(--spacing-sm);
    }
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .age-verification-banner,
    .cookie-consent,
    .mobile-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
    
    .legal-document {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .legal-section {
        page-break-inside: avoid;
        margin-bottom: var(--spacing-md);
    }
    
    .legal-section h2,
    .legal-section h3 {
        page-break-after: avoid;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    a {
        color: black !important;
        text-decoration: underline !important;
    }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .game-card img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --text-color: #000000;
        --background-color: #ffffff;
        --border-color: #000000;
    }
    
    .btn-primary {
        background-color: #000080;
        border-color: #000080;
        color: white;
    }
    
    .btn-secondary {
        background-color: white;
        border-color: #000080;
        color: #000080;
    }
    
    .game-card {
        border: 2px solid #000000;
    }
}

/* Focus indicators for accessibility */
@media (prefers-reduced-motion: no-preference) {
    .btn:focus-visible,
    .nav-link:focus-visible,
    .form-input:focus-visible,
    .form-select:focus-visible,
    .form-textarea:focus-visible {
        outline: 3px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Dark mode support (for future implementation) */
@media (prefers-color-scheme: dark) {
    /* This can be implemented when dark mode is desired */
    /*
    :root {
        --text-color: #ffffff;
        --background-color: #1a1a1a;
        --background-alt: #2d2d2d;
    }
    */
}

/* Specific mobile game adjustments */
@media (max-width: 767.98px) {
    .game-play .game-container {
        padding: var(--spacing-sm) 0;
    }
    
    .game-wrapper {
        margin: 0 calc(-1 * var(--spacing-sm));
    }
    
    .game-frame {
        border-radius: 0;
        min-height: 400px;
    }
    
    .game-frame iframe {
        height: 400px;
        border-radius: 0;
    }
    
    .game-controls {
        justify-content: center;
        padding: var(--spacing-sm);
    }
    
    .control-buttons {
        display: flex;
        gap: var(--spacing-xs);
    }
    
    .control-btn {
        font-size: 0.875rem;
        padding: 8px 12px;
    }
    
    .game-information {
        padding: var(--spacing-md) 0;
    }
    
    .game-info-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .related-games-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
}

/* Tablet specific adjustments */
@media (min-width: 768px) and (max-width: 1023.98px) {
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Very large screens (1600px and up) */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    .games-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .game-frame {
        min-height: 800px;
    }
    
    .game-frame iframe {
        height: 800px;
    }
}
