/* ===================================
   RESPONSIVE IMPROVEMENTS FOR MOBILE
   GibsFest 2K26 - Mobile Optimized
   HIERARKI: 3 (Responsive Overrides)
   NOTE: Tidak overlap dengan logo-sponsor-styles dan competition-styles
=================================== */

/* ===== CUSTOM CURSOR - DESKTOP ONLY ===== */
@media (min-width: 769px) {
    body {
        cursor: none !important;
    }

    .custom-cursor {
        display: block !important;
        pointer-events: none;
    }

    .cursor-dot,
    .cursor-outline {
        display: block !important;
    }

    /* Semua elemen yang bisa di-klik juga hide cursor */
    a,
    button,
    input,
    textarea,
    select,
    .nav-link,
    .cta-primary,
    .cta-secondary,
    .btn-details,
    .btn-register,
    .btn-game,
    .nav-toggle,
    .feature-card,
    .stat-item,
    .footer-social a {
        cursor: none !important;
    }
}

/* ===== GLOBAL MOBILE FIXES ===== */
@media (max-width: 768px) {

    /* Kembalikan cursor normal di mobile/tablet */
    body {
        cursor: auto !important;
    }

    /* Sembunyikan custom cursor di mobile */
    .custom-cursor {
        display: none !important;
    }

    .cursor-dot,
    .cursor-outline {
        display: none !important;
    }

    /* Kembalikan cursor normal untuk semua elemen di mobile */
    a,
    button,
    input,
    textarea,
    select,
    .nav-link,
    .cta-primary,
    .cta-secondary,
    .btn-details,
    .btn-register,
    .btn-game,
    .nav-toggle,
    .feature-card,
    .stat-item,
    .footer-social a {
        cursor: pointer !important;
    }

    .base-container {
        padding: 0 1rem;
    }

    #bgVideo {
        opacity: 0.3;
    }
}

/* ===== NAVIGATION MOBILE ===== */
@media (max-width: 992px) {
    .navbar {
        padding: 1rem 0;
    }

    .nav-container {
        padding: 0 1rem;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 70px);
        background: rgba(21, 21, 30, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transition: right 0.3s ease;
        border-left: 2px solid var(--color-red-primary);
        z-index: 999;
    }

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

    .nav-toggle {
        display: flex;
        z-index: 1000;
    }

    .logo-text {
        font-size: 1.4rem;
    }
}
@media (max-width: 768px) {
    .nav-toggle {
        display: flex; /* ← INI yang hilang */
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(21, 21, 30, 0.98);
        padding: 1rem 0;
        border-top: 1px solid var(--color-red-primary);
    }

    .nav-menu.active {
        display: flex;
    }
}

/* ===== HERO SECTION MOBILE ===== */
@media (max-width: 768px) {
    .hero-section-base {
        min-height: 100vh;
        padding: 8rem 1rem 4rem;
    }

    .hero-badge {
        padding: 0.4rem 1.5rem;
        margin-bottom: 1.5rem;
    }

    .badge-text {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .hero-subtitle {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .subtitle-line {
        width: 60px;
        display: none;
    }

    .subtitle-text {
        font-size: 1.5rem;
        letter-spacing: 4px;
    }

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 2rem;
        letter-spacing: 1px;
        padding: 0 1rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 3rem;
        width: 100%;
        padding: 0 1rem;
    }

    .cta-primary,
    .cta-secondary {
        width: 100%;
        max-width: 300px;
        padding: 1rem 2rem;
        font-size: 0.9rem;
        justify-content: center;
    }

    .speedometer {
        transform: scale(0.8);
    }

    #speedometerCanvas {
        width: 150px;
        height: 150px;
    }

    .scroll-indicator {
        bottom: 1rem;
        transform: translateX(-50%) scale(0.8);
    }
}

@media (max-width: 480px) {
    .hero-description {
        font-size: 0.85rem;
    }

    .cta-primary,
    .cta-secondary {
        padding: 0.8rem 1.5rem;
        font-size: 0.85rem;
    }
}

/* ===== SECTION HEADERS MOBILE ===== */
@media (max-width: 768px) {
    .section-header {
        margin-bottom: 3rem;
    }

    .section-label {
        font-size: 0.75rem;
        letter-spacing: 2px;
        padding: 0.4rem 1rem;
    }

    .section-title {
        font-size: clamp(2rem, 8vw, 3rem);
        letter-spacing: 1px;
    }

    .section-description {
        font-size: 0.95rem;
        padding: 0 1rem;
    }
}

/* ===== ACTIVITIES SECTION MOBILE ===== */
@media (max-width: 992px) {
    .activities-section {
        padding: 4rem 0;
    }

    .activities-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .activities-grid {
        gap: 1rem;
    }
}

/* ===== TIMELINE SECTION MOBILE ===== */
@media (max-width: 992px) {
    .timeline-section {
        padding: 4rem 0;
    }

    .timeline-wrapper {
        padding: 3rem 1rem;
    }

    .timeline-track {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .timeline-line {
        display: none;
    }

    .timeline-item {
        width: 100%;
        display: flex;
        gap: 1.5rem;
        align-items: flex-start;
    }

    .timeline-checkpoint {
        flex-shrink: 0;
        margin: 0;
    }

    .timeline-checkpoint .checkpoint-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .timeline-item>div:last-child {
        text-align: left;
        flex: 1;
    }
}

@media (max-width: 768px) {
    .timeline-checkpoint .checkpoint-icon {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    .timeline-date {
        font-size: 0.8rem;
    }

    .timeline-title {
        font-size: 1rem;
    }

    .timeline-desc {
        font-size: 0.85rem;
    }
}

/* ===== COUNTDOWN MOBILE ===== */
@media (max-width: 768px) {
    .countdown-wrapper {
        padding: 2rem 1rem;
        margin-top: 3rem;
    }

    .countdown-title {
        font-size: 1.2rem;
        letter-spacing: 2px;
        margin-bottom: 1.5rem;
    }

    .countdown-timer {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .countdown-value {
        font-size: 2.5rem;
    }

    .countdown-label {
        font-size: 0.7rem;
        letter-spacing: 1px;
    }

    .countdown-separator {
        font-size: 2rem;
        display: none;
    }
}

@media (max-width: 480px) {
    .countdown-value {
        font-size: 2rem;
    }

    .countdown-label {
        font-size: 0.65rem;
    }

    .countdown-timer {
        gap: 0.5rem;
    }
}

/* ===== REGISTER SECTION MOBILE ===== */
@media (max-width: 992px) {
    .register-section {
        padding: 4rem 0;
    }

    .register-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .register-info h3 {
        font-size: 2rem;
    }

    .register-info>p {
        font-size: 1rem;
    }

    .register-visual {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .register-info h3 {
        font-size: 1.8rem;
    }

    .register-info>p {
        font-size: 0.95rem;
    }

    .benefit-item {
        font-size: 0.95rem;
    }

    .btn-register {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1rem;
        justify-content: center;
    }

    .register-visual {
        height: 300px;
    }
}

/* ===== FOOTER MOBILE ===== */
@media (max-width: 992px) {
    .footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-container {
        padding: 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 2rem;
    }

    .footer-logo {
        font-size: 1.3rem;
    }

    .footer-desc {
        font-size: 0.95rem;
    }

    .footer-social {
        justify-content: center;
    }

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

    .footer-credits {
        text-align: center;
        font-size: 0.85rem;
    }

    .footer-easter-egg {
        position: static;
        transform: none;
        margin-top: 1rem;
        display: block;
        text-align: center;
    }

    .footer-easter-egg:hover {
        transform: scale(1.2) rotate(360deg);
    }
}

@media (max-width: 768px) {
    .footer-social a {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* ===== LOADING SCREEN MOBILE ===== */
@media (max-width: 768px) {
    .f1-lights {
        gap: 12px;
        margin-bottom: 30px;
    }

    .light {
        width: 45px;
        height: 45px;
        border-width: 2px;
    }

    .loading-text h2 {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }

    .loading-bar {
        width: 250px;
    }

    .loading-percentage {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .f1-lights {
        gap: 8px;
        margin-bottom: 25px;
    }

    .light {
        width: 35px;
        height: 35px;
    }

    .loading-text h2 {
        font-size: 1.2rem;
        letter-spacing: 1px;
    }

    .loading-bar {
        width: 200px;
    }

    .loading-percentage {
        font-size: 1rem;
    }
}

/* ===== MODAL MOBILE ===== */
@media (max-width: 768px) {
    .modal-content {
        padding: 2rem 1.5rem;
        width: 95%;
    }

    .modal-content h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    #racingGameCanvas {
        max-width: 100%;
        height: 250px;
    }

    .btn-game {
        padding: 0.8rem 2rem;
        font-size: 0.9rem;
    }

    .game-score {
        font-size: 1.2rem;
    }
}

/* ===== UTILITY CLASSES MOBILE ===== */
@media (max-width: 768px) {
    .text-center {
        text-align: center;
    }

    .mb-3,
    .mt-3 {
        margin-bottom: 2rem !important;
        margin-top: 2rem !important;
    }

    .mb-2,
    .mt-2 {
        margin-bottom: 1.5rem !important;
        margin-top: 1.5rem !important;
    }
}

/* ===== LANDSCAPE ORIENTATION FIX ===== */
@media (max-width: 992px) and (orientation: landscape) {
    .hero-section-base {
        min-height: auto;
        padding: 6rem 1rem 3rem;
    }

    .speedometer {
        display: none;
    }

    .scroll-indicator {
        display: none;
    }
}

/* ===== PREVENT HORIZONTAL SCROLL ===== */
@media (max-width: 768px) {

    body,
    html {
        overflow-x: hidden;
        max-width: 100vw;
    }

    * {
        max-width: 100%;
    }

    .section-title,
    .countdown-timer {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* ===== TOUCHSCREEN OPTIMIZATIONS ===== */
@media (max-width: 768px) {

    .nav-link,
    .btn-details,
    .btn-register,
    .cta-primary,
    .cta-secondary {
        min-height: 44px;
        min-width: 44px;
    }

    .feature-card:hover,
    .stat-item:hover {
        transform: none;
    }

    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.3s !important;
    }
}