/* =========================================
   Responsive Design
   ========================================= */

/* Tablet (max-width: 768px) */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 5rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 300px;
        max-width: 80%;
        /* Ensure it doesn't cover full screen on small phones */
        background: linear-gradient(135deg, var(--color-primary), #0a271e);
        /* Rich Gradient */
        flex-direction: column;
        text-align: left;
        /* Align left for list feel */
        padding: 6rem 2rem 4rem 3rem;
        /* Extra bottom padding for scroll */
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 2000;
        backdrop-filter: blur(10px);
        overflow-y: auto;
        /* Enable scrolling if content overflows */
    }

    /* Elegant Links */
    .nav-links li {
        width: 100%;
        display: block;
        margin: 0;
        opacity: 0;
        /* For animation */
        transform: translateX(20px);
        transition: 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
        transition-delay: 0.1s;
    }

    /* Stagger animations */
    .nav-links.active li:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.active li:nth-child(2) {
        transition-delay: 0.15s;
    }

    .nav-links.active li:nth-child(3) {
        transition-delay: 0.2s;
    }

    .nav-links.active li:nth-child(4) {
        transition-delay: 0.25s;
    }

    .nav-links.active li:nth-child(5) {
        transition-delay: 0.3s;
    }

    .nav-links.active li:nth-child(6) {
        transition-delay: 0.35s;
    }

    .nav-links a {
        color: rgba(255, 255, 255, 0.8) !important;
        font-family: var(--font-heading);
        /* Serif font */
        font-size: 1.5rem !important;
        font-weight: 500;
        display: block;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        transition: 0.3s;
    }

    .nav-links a:hover {
        color: var(--color-secondary) !important;
        /* Gold */
        padding-left: 10px;
        border-color: rgba(255, 255, 255, 0.2);
    }

    /* Button Style override inside menu */
    .nav-links .btn {
        margin-top: 2rem;
        width: 100%;
        background: var(--color-secondary);
        color: white !important;
        border: none;
        font-family: var(--font-body);
        font-size: 1rem !important;
    }

    .nav-links li {
        display: flex;
        justify-content: center;
    }

    .nav-links.active {
        right: 0;
    }

    .hamburger {
        display: block;
        position: relative;
        /* Ensure z-index works */
        z-index: 2001;
        /* Above nav-links (2000) */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .container {
        width: 95%;
    }

    .btn {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
}