/* Responsive Design */

@media (max-width: 1200px) {
    .content {
        padding: 0 3%;
    }
}

@media (max-width: 992px) {
    header {
        flex-direction: row; /* Keep logo and menu-toggle in a row */
        justify-content: space-between;
        align-items: center;
    }

    nav {
        position: absolute;
        top: 100%; /* Position below the header */
        left: 0;
        width: 100%;
        background-color: var(--obsidian); /* Match body background */
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        display: none; /* Hidden by default */
        z-index: 100;
    }

    nav.active {
        display: flex; /* Show when active */
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        text-align: center;
    }

    .header-buttons {
        position: absolute;
        top: calc(100% + 1rem + 1px); /* Position below nav, if active */
        left: 0;
        width: 100%;
        background-color: var(--obsidian);
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        display: none; /* Hidden by default */
        z-index: 100;
    }

    .header-buttons.active {
        display: flex; /* Show when active */
    }

    .header-buttons .btn {
        width: 80%; /* Adjust button width for mobile */
    }

    .bento-box {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .content {
        padding: 0 5%;
    }

    header {
        flex-direction: row; /* Keep logo and menu-toggle in a row */
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        width: auto; /* Allow logo to take natural width */
    }

    nav {
        position: absolute;
        top: 100%; /* Position below the header */
        left: 0;
        width: 100%;
        background-color: var(--obsidian); /* Match body background */
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        display: none; /* Hidden by default */
        z-index: 100;
    }

    nav.active {
        display: flex; /* Show when active */
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        text-align: center;
    }

    .header-buttons {
        position: absolute;
        top: calc(100% + 1rem + 1px); /* Position below nav, if active */
        left: 0;
        width: 100%;
        background-color: var(--obsidian);
        flex-direction: column;
        align-items: center;
        padding: 1rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        display: none; /* Hidden by default */
        z-index: 100;
    }

    .header-buttons.active {
        display: flex; /* Show when active */
    }

    .header-buttons .btn {
        width: 80%; /* Adjust button width for mobile */
    }

    .menu-toggle {
        display: flex; /* Show hamburger menu */
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        cursor: pointer;
    }

    .menu-toggle div {
        width: 100%;
        height: 3px;
        background-color: var(--text-primary);
        transition: all 0.3s ease;
    }

    .menu-toggle.active div:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active div:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active div:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-visualization {
        height: 200px;
    }

    .services-grid h2, .playground-teaser h2 {
        font-size: 2rem;
    }

    .mock-ui {
        width: 90%;
        padding: 1.5rem;
    }

    .floating-selectors {
        flex-direction: column;
        gap: 0.5rem;
    }

    footer .footer-links, footer .social-icons {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .content {
        padding: 0 5%;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .panel {
        padding: 1.5rem;
    }

    .panel h4 {
        font-size: 1.5rem;
    }
}
