/* ====================================
   GORILLA RUNNER - RESPONSIVE GLOBAL STYLES
   Mobile-First Responsive Design
   ====================================

   BREAKPOINTS:
   - Mobile:        < 576px
   - Tablet:        576px - 991px
   - Desktop:       992px+
   - Large Desktop: 1200px+

   USAGE:
   This file is automatically loaded on all frontend pages.
   No additional imports needed.

   FEATURES:
   ✓ Mobile-first responsive design
   ✓ Touch-friendly tap targets (44px minimum)
   ✓ Retina display optimizations
   ✓ Safe area support (notched devices)
   ✓ Accessibility features
   ✓ Print styles
   ✓ Reduced motion support

   ==================================== */

/* Base Responsive Utilities */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container Responsive */
/* .container,
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
} */

/* ====================================
   MOBILE DEVICES (< 576px)
   ==================================== */
@media (max-width: 575.98px) {

    /* Typography */
    body {
        font-size: 14px;
    }

    h1, .h1 {
        font-size: 28px !important;
        line-height: 1.2;
    }

    h2, .h2 {
        font-size: 24px !important;
        line-height: 1.3;
    }

    h3, .h3 {
        font-size: 20px !important;
    }

    h4, .h4 {
        font-size: 18px !important;
    }

    h5, .h5 {
        font-size: 16px !important;
    }

    h6, .h6 {
        font-size: 14px !important;
    }

    p {
        font-size: 14px;
        line-height: 1.6;
    }

    /* Header & Navigation */
    .header-default {
        padding: 10px 0 !important;
    }

    .navbar-brand {
        font-size: 20px !important;
    }

    .navbar-nav {
        padding: 15px 0;
    }

    .nav-link {
        padding: 10px 15px !important;
        font-size: 16px !important;
    }

    .navbar-toggler {
        padding: 8px 10px;
        font-size: 20px;
    }

    /* Hero Sections */
    .hero-section,
    .hero-banner,
    .contact-hero,
    .about-hero,
    .exams-hero {
        min-height: 50vh !important;
        padding: 60px 0 40px !important;
        margin-top: 60px !important;
    }

    /* Banner Image Fix */
    /* .banner-container, */
    .movie-banner {
        margin-top: 60px;
    }

    .movie-banner-image {
        height: 65vh !important;
        overflow: hidden;
    }

    .movie-banner-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .shows-content {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        padding: 20px !important;
        display: flex !important;
        align-items: center !important;
        background: linear-gradient(to right, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 100%);
    }

    .hero-title,
    .contact-title,
    .about-title,
    .page-title {
        font-size: 32px !important;
        line-height: 1.2 !important;
        letter-spacing: -1px !important;
        margin-bottom: 15px !important;
    }

    .hero-subtitle,
    .hero-description {
        font-size: 16px !important;
        line-height: 1.5 !important;
        margin-bottom: 20px !important;
    }

    /* Buttons */
    .btn {
        font-size: 14px !important;
        padding: 12px 24px !important;
        width: 100%;
        margin-bottom: 10px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-outline-light {
        min-width: auto !important;
    }

    .hero-buttons {
        flex-direction: column !important;
        gap: 10px !important;
    }

    /* Cards */
    .exam-card,
    .category-card,
    .stat-card,
    .contact-info-card {
        margin-bottom: 20px;
        padding: 20px !important;
    }

    .iq-card {
        margin-bottom: 15px;
    }

    .iq-card-body {
        padding: 15px !important;
    }

    /* Grids */
    .exams-grid,
    .categories-grid,
    .contact-info-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .row > [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Featured Section */
    .featured-section,
    .categories-section {
        padding: 40px 0 !important;
    }

    .section-heading {
        font-size: 28px !important;
        margin-bottom: 25px !important;
    }

    /* Exam Details */
    .exam-hero {
        padding: 80px 0 40px !important;
    }

    .exam-title {
        font-size: 28px !important;
        line-height: 1.2 !important;
    }

    .exam-meta {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }

    .exam-badge {
        font-size: 11px !important;
        padding: 6px 12px !important;
    }

    .exam-sidebar {
        position: relative !important;
        top: 0 !important;
        margin-top: 30px;
    }

    /* Exam Interface */
    .exam-interface-container {
        padding: 15px !important;
    }

    .exam-header {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 15px !important;
    }

    .exam-timer {
        width: 100%;
        justify-content: center;
        font-size: 18px !important;
    }

    .question-text {
        font-size: 18px !important;
        line-height: 1.4 !important;
        padding: 20px !important;
    }

    .option-card {
        padding: 15px !important;
        font-size: 15px !important;
    }

    .exam-navigation {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 15px !important;
    }

    .exam-navigation .btn {
        width: 100%;
    }

    /* Results Page */
    .results-hero {
        padding: 0px !important;
    }

    .results-emoji {
        font-size: 60px !important;
    }

    .classification-badge {
        font-size: 24px !important;
        padding: 15px 30px !important;
    }

    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* Forms */
    .form-control,
    .form-select {
        font-size: 16px !important;
        padding: 12px 15px !important;
    }

    .form-label {
        font-size: 14px !important;
    }

    .contact-form-card {
        padding: 25px 20px !important;
    }

    /* Tables */
    .table {
        font-size: 13px;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .attempts-table {
        display: block;
        overflow-x: auto;
    }

    /* Footer */
    footer {
        padding: 40px 0 20px !important;
    }

    .footer-top {
        text-align: center;
    }

    .footer-logo {
        margin-bottom: 20px !important;
    }

    .footer-link-title {
        font-size: 18px !important;
        margin-top: 30px;
    }

    .footer-menu {
        margin-bottom: 25px;
    }

    /* Modals */
    .modal-dialog {
        margin: 10px;
    }

    .modal-content {
        border-radius: 12px;
    }

    /* Spacing */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }

    section {
        /* padding: 40px 0 !important; */
    }

    /* Text Alignment */
    .text-md-start,
    .text-lg-start {
        text-align: center !important;
    }

    /* Hide on Mobile */
    .d-none-mobile {
        display: none !important;
    }
}

/* ====================================
   TABLET DEVICES (576px - 991px)
   ==================================== */
@media (min-width: 576px) and (max-width: 991.98px) {

    /* Typography */
    body {
        font-size: 15px;
    }

    h1, .h1 {
        font-size: 42px !important;
    }

    h2, .h2 {
        font-size: 36px !important;
    }

    h3, .h3 {
        font-size: 28px !important;
    }

    /* Hero Sections */
    .hero-section,
    .hero-banner {
        min-height: 55vh !important;
        padding: 80px 0 50px !important;
    }

    .hero-title {
        font-size: 48px !important;
    }

    /* Grids */
    .exams-grid,
    .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    .contact-info-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Cards */
    .exam-card,
    .category-card {
        padding: 25px !important;
    }

    /* Navigation */
    .navbar-nav {
        gap: 10px;
    }

    /* Buttons */
    .btn {
        font-size: 15px !important;
        padding: 12px 28px !important;
    }

    .hero-buttons .btn {
        width: auto;
    }

    /* Exam Interface */
    .exam-header {
        padding: 20px !important;
    }

    .question-text {
        font-size: 20px !important;
        padding: 25px !important;
    }

    .option-card {
        padding: 18px !important;
    }

    /* Footer */
    .footer-top {
        text-align: left;
    }

    /* Spacing */
    section {
        padding: 60px 0 !important;
    }
}

/* ====================================
   SMALL TABLETS (768px - 991px)
   ==================================== */
@media (min-width: 768px) and (max-width: 991.98px) {

    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .exam-navigation {
        flex-direction: row !important;
    }

    .exam-navigation .btn {
        width: auto;
    }
}

/* ====================================
   DESKTOP & LARGE DEVICES (992px+)
   ==================================== */
@media (min-width: 992px) {

    .container {
        max-width: 1200px;
    }

    /* Grids */
    .exams-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }

    .categories-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ====================================
   EXTRA LARGE DEVICES (1200px+)
   ==================================== */
@media (min-width: 1200px) {

    .container {
        max-width: 1320px;
    }

    .exams-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ====================================
   LANDSCAPE ORIENTATION
   ==================================== */
@media (max-width: 991.98px) and (orientation: landscape) {

    .hero-section,
    .hero-banner {
        min-height: 70vh !important;
    }

    .exam-interface-container {
        padding: 15px !important;
    }
}

/* ====================================
   TOUCH DEVICES
   ==================================== */
@media (hover: none) and (pointer: coarse) {

    /* Increase touch targets */
    .btn,
    .nav-link,
    .option-card {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover effects */
    .option-card:hover {
        transform: none !important;
    }

    /* Improve scrolling */
    * {
        -webkit-overflow-scrolling: touch;
    }
}

/* ====================================
   HIGH DPI SCREENS (Retina)
   ==================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {

    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ====================================
   REDUCED MOTION
   ==================================== */
@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;
    }
}

/* ====================================
   PRINT STYLES
   ==================================== */
@media print {

    .header-default,
    footer,
    .btn,
    .exam-navigation {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .exam-interface-container,
    .results-content {
        page-break-inside: avoid;
    }
}

/* ====================================
   UTILITY CLASSES
   ==================================== */

/* Show/Hide Responsive */
.mobile-only {
    display: none;
}

.tablet-only {
    display: none;
}

.desktop-only {
    display: block;
}

@media (max-width: 575.98px) {
    .mobile-only {
        display: block;
    }
    .desktop-only,
    .tablet-only {
        display: none;
    }
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .tablet-only {
        display: block;
    }
    .mobile-only,
    .desktop-only {
        display: none;
    }
}

/* Responsive Text Alignment */
@media (max-width: 767.98px) {
    .text-center-mobile {
        text-align: center !important;
    }
}

/* Responsive Spacing */
@media (max-width: 575.98px) {
    .p-mobile-3 {
        padding: 1rem !important;
    }

    .px-mobile-0 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .mb-mobile-4 {
        margin-bottom: 1.5rem !important;
    }
}

/* Full Width on Mobile */
@media (max-width: 575.98px) {
    .full-width-mobile {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* Responsive Flex Direction */
@media (max-width: 767.98px) {
    .flex-column-mobile {
        flex-direction: column !important;
    }
}

/* Safe Area Padding (for notched devices) */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }

    .header-default {
        padding-top: max(10px, env(safe-area-inset-top));
    }
}

/* Scrollbar Styling for Mobile */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--netflix-black, #141414);
}

::-webkit-scrollbar-thumb {
    background: var(--netflix-gray, #2f2f2f);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--netflix-light-gray, #808080);
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid var(--netflix-red, #E50914);
    outline-offset: 2px;
}

