/* 
   Project: Organic Minimalist
*/

/* --- Top Navigation --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1rem;
    max-width: 1300px;
    margin: 0 auto;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 3rem;
}

nav a {
    text-decoration: none;
    color: var(--slate-earth);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
}

nav ul li a {
    white-space: nowrap;
    flex-shrink: 0;
}

nav a:hover {
    color: var(--tortoise);
    transform: translateY(-1px);
}

/* Ensure the links stay grouped in the center */
.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

/* Container for the dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

/* The actual hidden menu */
.dropdown-content {
    display: none; /* Hidden by default */
    position: absolute;
    background-color: var(--cloud-dancer);
    min-width: 160px;
    z-index: 100;
    border: 1px solid var(--line-muted);
    border-radius: 8px;
    padding-top: 10px; /* Moves the content down while keeping the hover active */
    border: none; /* Borders can sometimes create tiny gaps; use shadows instead */
    box-shadow: 0px 8px 16px rgba(0,0,0,0.1);
}

/* Show the menu on hover */
.dropdown.open .dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease-in;
}

/* Dropdown Links */
.dropdown-content li {
    display: block;
    width: 100%;
}

.dropdown-content a {
    color: var(--slate-earth);
    padding: 10px 20px;
    display: block;
    text-align: left;
    font-size: 0.9rem;
}

.dropdown-content a:hover {
    background-color: var(--line-muted);
    color: var(--tortoise);
}

.mobile-menu-toggle {
    display: none;
}

@media (max-width: 768px) {

    nav {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 1rem;
    }

    /* Logo centered visually but not affecting layout */
    .logo {
        margin: 0 auto;
    }

    /* Hamburger visible only on mobile */
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: none;
        font-size: 1.8rem;
        cursor: pointer;
        color: var(--slate-earth);
    }

    /* Hide nav links until toggled */
    nav ul {
        display: none;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        margin-top: 1rem;
    }

    nav ul.open {
        display: flex;
    }
}

@media (hover: hover) {
    .dropdown:hover .dropdown-content {
        display: block;
    }
}

/* Simple fade-in animation for feelings */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}