/* ========================
   Global Reset & Styles
   ======================== */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    background-color: #000;
    color: #fff;
    overflow-x: hidden;
}

/* ========================
   Logo Styling
   ======================== */
.brand-logo {
    position: fixed;
    top: 30px;
    left: 40px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.lava-text {
    font-family: 'Bungee', cursive;
    font-size: 50px;
    margin: 0;
    color: #fff;
    line-height: 0.9;
}

.labs-text {
    font-family: 'Bungee', cursive;
    font-size: 51px;
    margin: 0;
    color: #fff;
    line-height: 0.9;
}

/* Mobile responsive logo */
@media (max-width: 768px) {
    .brand-logo {
        top: 20px;
        left: 20px;
        transform: scale(0.4); /* Scale down for mobile */
        transform-origin: top left;
    }
}

/* ========================
   Main Container Layout
   ======================== */
.main-container {
    display: flex;
    width: 100%;
    height: 100vh;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Left Panel (Navigation) */
.nav-panel {
    flex: 1; /* Takes full width initially */
    background-color: #111; /* Dark background */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.6s ease;
    height: 100%;
    position: relative;
    z-index: 10;
}

/* Right Panel (Content) */
.content-panel {
    flex: 0; /* Hidden initially */
    width: 0;
    background-color: #1a1a1a; /* Slightly lighter dark */
    overflow-y: auto;
    position: relative;
    opacity: 0;
    transition: all 0.6s ease;
}

/* ACTIVE STATE: When a menu item is clicked */
.main-container.active .nav-panel {
    flex: 0 0 50%; /* Shrink to 50% */
}

.main-container.active .content-panel {
    flex: 1; /* Grow to fill remaining space */
    width: 50%;
    opacity: 1;
}

/* ========================
   Navigation Menu
   ======================== */
.nav-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2x2 Grid */
    gap: 40px;
    text-align: center;
}

.nav-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

.nav-btn:hover {
    transform: scale(1.1);
}

.nav-icon {
    width: 80px; /* Adjust based on your png size */
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
}

.nav-btn span {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ========================
   Content Sections
   ======================== */
.content-section {
    display: none;
    padding: 120px 60px 60px 60px; /* Top padding clears the close button */
    animation: fadeIn 0.5s ease;
}

.content-section.show {
    display: block;
}

.content-section h2 {
    font-family: 'Bungee', cursive;
    font-size: 48px;
    margin-bottom: 30px;
    border-bottom: 2px solid #333;
    padding-bottom: 15px;
}

.content-body {
    font-size: 18px;
    line-height: 1.6;
    color: #ccc;
}

.close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 20;
}

.close-btn:hover {
    color: #aaa;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================
   Form & Buttons
   ======================== */
.custom-input {
    background-color: transparent;
    border: 1px solid #444;
    color: #fff;
    border-radius: 0;
    margin-bottom: 20px;
    padding: 15px;
}

.custom-input:focus {
    background-color: transparent;
    border-color: #fff;
    color: #fff;
    box-shadow: none;
}

.custom-submit {
    background-color: #fff;
    color: #000;
    border: none;
    padding: 12px 30px;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 0;
}

.custom-submit:hover {
    background-color: #ddd;
    color: #000;
}

.store-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}

.store-link img {
    height: 60px;
    transition: transform 0.2s;
}

.store-link:hover img {
    transform: scale(1.05);
}

/* ========================
   Footer
   ======================== */
.site-footer {
    position: fixed;
    bottom: 18px;
    right: 30px;
    z-index: 50;
    font-family: 'Montserrat', sans-serif;
    text-align: right;
    color: #666;
}

.site-footer .footer-links {
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.site-footer a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer a:hover {
    color: #fff;
}

.footer-sep {
    margin: 0 10px;
    color: #444;
}

.site-footer .footer-legal {
    margin-top: 6px;
    font-size: 10px;
    letter-spacing: 0.5px;
    color: #555;
}

/* ========================
   Mobile Styles
   ======================== */
@media (max-width: 1200px) {
    /* Stack vertically on mobile */
    .main-container {
        flex-direction: column;
    }

    /* Initial State Mobile: Nav full height */
    .nav-panel {
        width: 100%;
        height: 100vh;
        transition: height 0.6s ease;
    }
    
    .content-panel {
        width: 100%;
        height: 0; /* Hidden height */
        transition: height 0.6s ease;
    }

    /* Active State Mobile: Split View */
    .main-container.active .nav-panel {
        flex: 0 0 auto;
        height: 20%; /* Smaller height for nav buttons */
        padding: 10px;
    }

    .main-container.active .content-panel {
        flex: 1;
        width: 100%;
        height: 80%; /* Fill remaining space */
    }

    /* Adjust logo for mobile */
    .brand-logo {
        top: 20px;
        left: 20px;
        transform: scale(0.6); /* Slightly bigger than 0.4 for readability */
        transform-origin: top left;
    }

    /* Nav Menu adjustments */
    .nav-menu {
        display: grid; 
        grid-template-columns: repeat(2, 1fr); /* 2x2 Grid for Mobile Homepage */
        justify-content: center;
        align-items: center;
        align-content: center; /* Center the grid content vertically */
        height: 100%;
        gap: 20px;
        margin-top: 60px; /* Clear logo area */
        width: 100%;
        padding: 0 40px; /* Add side padding to constrain width slightly */
    }

    /* Active State Mobile Nav Menu: Horizontal & Small */
    .main-container.active .nav-menu {
        display: flex; /* Switch to Flex Row when active */
        flex-direction: row; 
        justify-content: center;
        align-items: center;
        margin-top: 0; 
        gap: 15px; 
        height: 100%; 
        padding: 0;
    }

    .main-container.active .nav-btn {
        transform: scale(0.8); /* Scale down buttons slightly less */
        margin: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .main-container.active .nav-btn span {
        display: none; /* Hide text on mobile active state to save space */
    }
    
    .main-container.active .nav-icon {
        width: 40px; /* Force smaller icon size */
        height: 40px;
        margin-bottom: 0;
    }

    .content-section {
        padding: 40px 20px 40px 20px;
    }
    
    .close-btn {
        top: 10px;
        right: 20px;
    }

    .site-footer {
        bottom: 10px;
        right: 0;
        left: 0;
        text-align: center;
        padding: 0 15px;
    }

    .site-footer .footer-links {
        font-size: 11px;
    }

    .site-footer .footer-legal {
        font-size: 9px;
        margin-top: 4px;
    }

    .footer-sep {
        margin: 0 6px;
    }
}