/* ============================================
   navbar.css — Salt & Light Church
   ============================================ */

.navbar {
    background-color: #4a1e1e;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: transform 0.35s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.logo {
    height: 45px;
    width: auto;
}

.church-name {
    color: #fff;
    font-size: 1.1rem;
    font-weight: normal;
}

/* ============================================
   DESKTOP MENU
   ============================================ */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
    margin: 0;
    padding: 0;
}

.nav-menu > li > a,
.nav-menu > li > .dropbtn {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    font-family: Georgia, serif;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.nav-menu > li > a:hover,
.nav-menu > li > .dropbtn:hover {
    opacity: 0.8;
}

.drop-arrow {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-left: 3px;
    display: inline-block;
    transition: transform 0.25s ease;
}

/* ============================================
   DESKTOP DROPDOWN
   ============================================ */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    list-style: none;
    padding: 10px 0 0;
    background-color: transparent;
    z-index: 2000;
    min-width: 170px;
}

.dropdown-menu li {
    background-color: #3a1616;
}

.dropdown-menu li:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.dropdown-menu li:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.9rem;
    font-family: Georgia, serif;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.dropdown-menu li a:hover {
    background-color: #5a2222;
    color: #f2dede;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown:hover .drop-arrow {
    transform: rotate(180deg);
}

/* ============================================
   HAMBURGER BUTTON — hidden on desktop
   ============================================ */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 4px;
    flex-shrink: 0;
    z-index: 1100;
}

.nav-hamburger span {
    display: block;
    width: 26px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.25s ease;
    transform-origin: center;
}

.nav-hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.is-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ============================================
   MOBILE — ≤ 860px
   ============================================ */
@media (max-width: 860px) {

    .nav-hamburger {
        display: flex;
    }

    /* Full-width dropdown panel */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background-color: #3a1212;
        box-shadow: 0 8px 24px rgba(0,0,0,0.5);
        padding: 8px 0 16px;
        z-index: 999;
        /* Smooth slide-down */
        overflow: hidden;
        max-height: 0;
        opacity: 0;
        transition: max-height 0.35s ease, opacity 0.25s ease;
    }

    .nav-menu.is-open {
        display: flex;
        max-height: 600px;
        opacity: 1;
    }

    /* Top-level items */
    .nav-menu > li {
        border-bottom: 1px solid rgba(255,255,255,0.07);
    }

    .nav-menu > li:last-child {
        border-bottom: none;
    }

    .nav-menu > li > a,
    .nav-menu > li > .dropbtn {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 14px 24px;
        font-size: 1rem;
        box-sizing: border-box;
    }

    .drop-arrow {
        font-size: 0.75rem;
        opacity: 0.5;
        margin-left: 8px;
        transition: transform 0.25s ease;
    }

    /* Mobile dropdowns — always visible under their parent */
    .dropdown-menu {
        display: block;
        position: static;
        padding: 0;
        background: transparent;
        min-width: unset;
        border-left: 2px solid rgba(197,165,114,0.25);
        margin: 0 16px 8px 24px;
        border-radius: 0;
    }

    .dropdown-menu li {
        background: transparent;
        border-radius: 0 !important;
    }

    .dropdown-menu li a {
        padding: 10px 16px;
        font-size: 0.9rem;
        color: rgba(255,255,255,0.75);
        white-space: normal;
    }

    .dropdown-menu li a:hover {
        background: rgba(90,34,34,0.4);
        color: #fff;
    }

    /* Hide desktop hover behavior on mobile */
    .dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* ============================================
   SMALL MOBILE — ≤ 480px
   ============================================ */
@media (max-width: 480px) {
    .church-name {
        font-size: 0.95rem;
    }

    .logo {
        height: 36px;
    }

    .nav-container {
        padding: 0 16px;
    }
}