/* ── Navigation: Desktop ── */

nav {
    background: linear-gradient(180deg, rgba(171, 208, 177, 0.98) 0%, rgba(140, 186, 150, 0.98) 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 10px 35px rgba(45, 55, 72, 0.14);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding: 1.1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: "Quattrocento", serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.01em;
    text-decoration: none;
}

.logo:hover { text-decoration: none; }
.logo-img { height: 32px; width: auto; }

.nav-links {
    display: flex;
    gap: 2.25rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.2;
    transition: color 0.2s ease;
}

.nav-links a:hover { color: white; }

.nav-cta {
    color: white;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    box-shadow: 0 10px 26px rgba(45, 55, 72, 0.22);
    transition: background 0.2s ease, transform 0.2s ease;
}

.nav-cta:hover {
    background: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
}

.hamburger { display: none; }
.mobile-overlay { display: none; }

/* Dropdowns */
.nav-dropdown { position: relative; }

.nav-dropdown > button {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    padding: 0;
}

.nav-dropdown > button:hover { color: white; }

.nav-dropdown > button::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.5px solid rgba(255, 255, 255, 0.7);
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.7);
    transform: rotate(45deg);
    margin-top: -2px;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover > button::after,
.nav-dropdown.open > button::after {
    transform: rotate(-135deg);
    margin-top: 2px;
}

/* nav-dropdown-link: <a> tag used as dropdown trigger (Services link) */
.nav-dropdown > a.nav-dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-dropdown > a.nav-dropdown-link::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.5px solid rgba(255, 255, 255, 0.7);
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.7);
    transform: rotate(45deg);
    margin-top: -2px;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover > a.nav-dropdown-link::after,
.nav-dropdown.open > a.nav-dropdown-link::after {
    transform: rotate(-135deg);
    margin-top: 2px;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 40px rgba(45, 55, 72, 0.18);
    min-width: 240px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    margin-top: 0.75rem;
}

.dropdown-menu::before {
    content: "";
    position: absolute;
    top: -0.75rem;
    left: 0;
    right: 0;
    height: 0.75rem;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu a {
    display: block;
    padding: 0.65rem 1.25rem;
    color: var(--text-dark) !important;
    font-size: 0.9rem;
    transition: background 0.15s ease;
}

.dropdown-menu a:hover {
    background: var(--cream);
    color: var(--sage-text) !important;
}

.dropdown-menu a[aria-current="page"] {
    color: var(--sage-text) !important;
    font-weight: 600;
}

/* ── Navigation: Mobile ── */

@media (max-width: 980px) {
    .nav-links {
        gap: 1.25rem;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .nav-dropdown > a.nav-dropdown-link {
        width: calc(100% + 2rem);
        justify-content: space-between;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        font-weight: 500;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        margin: 0 -1rem;
        border-radius: 0;
    }

    #nav-links.open {
        z-index: 1100;
    }

    #nav-links.open .dropdown-menu {
        background: transparent !important;
    }
}

@media (max-width: 560px) {
    .nav-inner { padding: 0.9rem 0; }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.5rem;
        position: relative;
        z-index: 1001;
    }

    .hamburger span {
        display: block;
        width: 24px;
        height: 2px;
        background: white;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100dvh;
        min-height: 100vh;
        background: linear-gradient(180deg, rgba(171, 208, 177, 0.98) 0%, rgba(146, 193, 156, 0.98) 100%);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 1.25rem 2rem 2rem;
        gap: 0.5rem;
        transition: right 0.3s ease;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        z-index: 1000;
    }

    .nav-links.open { right: 0; }
    .nav-links li { display: block; }

    .nav-links a {
        display: block;
        padding: 0.75rem 1rem;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        margin: 0 -1rem;
    }

    .nav-links .nav-cta {
        margin-top: 1rem;
        text-align: center;
        padding: 0.85rem 1.25rem;
    }

    .nav-dropdown > button {
        width: calc(100% + 2rem);
        justify-content: space-between;
        padding: 0.75rem 1rem;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        margin: 0 -1rem;
    }

    .dropdown-menu {
        position: static;
        transform: none;
        background: rgba(255, 255, 255, 0.16);
        box-shadow: none;
        margin: 0;
        padding: 0.5rem 0;
        opacity: 1;
        visibility: visible;
        display: none;
        min-width: auto;
        border-radius: 0;
    }

    .nav-dropdown.open .dropdown-menu { display: block; }

    .dropdown-menu a {
        color: rgba(255, 255, 255, 0.9) !important;
        padding: 0.5rem 1rem;
        font-size: 1rem;
        border-bottom: none;
    }

    .dropdown-menu a:hover { background: rgba(255, 255, 255, 0.1); }

    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(45, 55, 72, 0.28);
        z-index: 999;
    }

    .mobile-overlay.active { display: block; }
}
