/* Responsive Design */

/* Tablet & Mobile (max-width: 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {

    /* Header */
    nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: 60px;
        padding: 0;
        position: relative;
    }

    .menu-toggle {
        display: flex !important;
        z-index: 1100;
        position: relative;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 300px;
        height: 100vh;
        background-color: #0f172a;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        padding: 90px 1.5rem 2rem;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
        z-index: 1000;
        overflow-y: auto;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        transform: translateX(0);
        box-shadow: 0 0 0 1000px rgba(0, 0, 0, 0.6), -10px 0 30px rgba(0, 0, 0, 0.5);
    }

    .main-nav,
    .nav-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .nav-actions {
        margin-top: 2rem;
        padding-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links a.nav-item {
        font-size: 1.05rem !important;
        font-weight: 500;
        color: var(--text-muted) !important;
        padding: 1.25rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03);
        display: flex;
        align-items: center;
        text-transform: none;
        letter-spacing: 0;
        width: 100%;
        opacity: 0;
        transform: translateX(20px);
        transition: all 0.3s ease;
    }

    .nav-links.active a.nav-item {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links a.nav-item.active {
        color: var(--primary) !important;
    }

    .user-dropdown {
        margin-top: 1.5rem;
        width: 100%;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 20px;
        overflow: hidden;
    }

    .user-dropdown-trigger {
        width: 100%;
        padding: 1.25rem 1rem;
        background: rgba(255, 255, 255, 0.02);
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 0;
        display: flex;
        align-items: center;
        gap: 15px;
        justify-content: flex-start;
        cursor: default;
        pointer-events: none;
    }

    .user-dropdown-trigger::after {
        content: 'Akun Saya';
        color: var(--primary);
        font-weight: 800;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 1px;
        position: absolute;
        top: 0.75rem;
        right: 1rem;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        margin: 0;
        box-shadow: none;
        background: transparent;
        border: none;
        padding: 0.5rem;
        display: block !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .dropdown-header {
        padding: 0 0.5rem 0.75rem;
        background: transparent;
        border: none;
        margin: 0;
    }

    .user-name {
        font-size: 1.1rem;
    }

    .dropdown-item {
        padding: 0.85rem 1rem !important;
        font-size: 1rem !important;
        background: rgba(255, 255, 255, 0.02);
        margin-bottom: 8px;
        border-radius: 12px;
        border: 1px solid rgba(255, 255, 255, 0.03);
    }

    .dropdown-item i {
        color: var(--primary);
    }

    .dropdown-item.logout {
        background: rgba(239, 68, 68, 0.05);
        border-color: rgba(239, 68, 68, 0.1);
        color: #ef4444 !important;
    }

    .dropdown-divider {
        display: none !important;
    }

    .user-avatar-sm {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        overflow: hidden;
        font-size: 1rem;
    }

    .user-name-nav {
        display: none;
    }

    /* Logout Button in Dropdown applies to mobile too */

    /* Transition delay for staggered effect */
    .nav-links.active a:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-actions a:nth-child(1) {
        transition-delay: 0.2s;
    }

    .nav-actions a:nth-child(2) {
        transition-delay: 0.3s;
    }

    .nav-actions a:nth-child(3) {
        transition-delay: 0.4s;
    }

    /* Mobile Auth Buttons */
    .nav-links .btn {
        width: 100%;
        height: 48px;
        justify-content: center;
        font-size: 1rem;
        border-radius: 12px;
        margin: 0;
        opacity: 0;
        transform: translateX(20px);
        transition: all 0.3s ease;
    }

    .nav-links.active .btn {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links .btn-primary {
        background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%) !important;
        border: none !important;
        color: white !important;
        margin-top: 0.5rem;
    }

    .nav-links .btn-login {
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        color: white !important;
    }

    /* Hero */
    .hero {
        padding: 8rem 0 4rem;
        background-attachment: scroll;
        background-image:
            linear-gradient(rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.9)),
            url('../images/hero/hero_stadium.png');
    }

    .hero-content {
        flex-direction: column;
        gap: 2rem;
    }

    .hero h1 {
        font-size: clamp(2.2rem, 10vw, 3rem);
        line-height: 1.1;
    }

    .hero p {
        font-size: 1rem;
        padding: 0;
        margin-bottom: 0;
        max-width: 100%;
        line-height: 1.6;
    }

    .hero-text {
        padding: 0 1rem;
    }

    /* Hero actions & visual removed since hero is now simplified and centered */

    /* Section Spacing */
    .section-title {
        margin-bottom: 2.5rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    /* Cards */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* General Container */
    .container {
        padding: 0 1.5rem;
    }

    /* Steps Grid */
    #cara-booking .step-card {
        padding: 1.5rem;
    }

    /* Mobile text adjustments */
    h2 {
        font-size: 1.75rem !important;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .logo {
        font-size: 1.35rem;
    }

    .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .nav-links {
        gap: 0.8rem;
    }

    .nav-links a {
        font-size: 0.85rem;
    }

    /* Section Spacing */
    main .container,
    section .container,
    .content-wrapper .container {
        margin-top: 3rem !important;
    }

    .hero {
        margin-top: 0 !important;
    }

    /* Personal Welcome Pill */
    .welcome-pill {
        padding: 4px 12px 4px 6px !important;
        font-size: 0.8rem;
    }

    /* Auth Forms Mobile Refinement */
    .auth-card-wrapper {
        padding: 1rem !important;
    }

    .auth-card {
        padding: 1.5rem !important;
    }

    .form-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* General Typography */
    h1 {
        font-size: 2.25rem !important;
    }

    h2 {
        font-size: 1.8rem !important;
    }

    h3 {
        font-size: 1.4rem !important;
    }
}