/* Responsive adjustments for all screen sizes */

/* General container and padding tweaks */
.container {
    width: 96%;
    max-width: 100vw;
    padding: 0 5px;
}

/* Header and navigation */
@media (max-width: 900px) {
    header h1 {
        font-size: 2rem;
    }
    nav ul li {
        margin-left: 10px;
    }
    nav a {
        font-size: 1rem;
        padding: 5px 6px;
    }
}

@media (max-width: 700px) {
    header {
        position: relative;
        z-index: 200;
    }
    header .container {
        z-index: 201;
    }
    header h1 {
        flex: 0 1 auto;
        margin-right: auto;
    }
    .nav-toggle {
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        order: 2;
        z-index: 102;
    }
    nav {
        order: 3;
        width: 100%;
    }
    nav ul {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 100%;
        background: rgba(0,0,0,0.97);
        position: absolute;
        top: 100%; /* Place menu right below header */
        left: 0;
        box-shadow: 0 8px 16px rgba(0,0,0,0.4);
        border-radius: 0 0 8px 8px;
        z-index: 100;
    }
    nav ul.show {
        display: flex;
    }
    nav ul li {
        display: block;
        margin: 0;
        border-bottom: 1px solid #222;
        text-align: left;
    }
    nav ul li:last-child {
        border-bottom: none;
    }
    nav a {
        display: block;
        padding: 14px 20px;
        font-size: 1.1em;
        border-radius: 0;
    }
    .nav-toggle {
        display: block !important;
        position: absolute;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        order: 2;
        padding: 0 12px;
        height: 48px;
        background: none;
        border: none;
        color: #fff;
        font-size: 2em;
        z-index: 102;
        cursor: pointer;
    }
}

@media (min-width: 701px) {
    .nav-toggle {
        display: none !important;
    }
    nav ul {
        display: flex !important;
        position: static !important;
        background: none !important;
        box-shadow: none !important;
    }
}

/* Hide nav-toggle on desktop */
.nav-toggle {
    display: none;
}

/* Hero section */
@media (max-width: 600px) {
    .hero {
        padding: 40px 0 60px;
    }
    .hero-content {
        gap: 10px;
    }
    #minecraft-avatar {
        max-height: 140px;
    }
    .hero h2 {
        font-size: 2.2em;
    }
    .hero p {
        font-size: 1.1em;
    }
    .btn, .download-btn {
        padding: 10px 16px;
        font-size: 0.95em;
    }
}

/* Features, cards, and boxes */
@media (max-width: 600px) {
    .feature-box, .service, .mod-card, .contact-info, .about-intro, .team-member, .social-links, .game-profile {
        padding: 12px;
        margin-bottom: 18px;
        font-size: 1em;
    }
    .feature-box h3, .service h3, .mod-card-header h3, .game-profile-header h3 {
        font-size: 1.1em;
    }
    .mod-meta, .game-profiles, .team-members {
        flex-direction: column;
        gap: 10px;
    }
}

/* Social icons and footer */
@media (max-width: 600px) {
    .social-icons a {
        width: 36px;
        height: 36px;
        line-height: 36px;
        font-size: 1em;
    }
    footer {
        padding: 18px 0;
    }
    footer p {
        font-size: 0.95em;
    }
}

/* Error page adjustments */
@media (max-width: 600px) {
    .error-code {
        font-size: 48px !important;
    }
    .error-message {
        font-size: 20px !important;
    }
}

/* Utility: prevent horizontal scroll */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}
