﻿/* ========================================= */
/* ============== Navigation =============== */
/* ========================================= */
.main-navbar {
    width: 100%;
    background: #020c0e;
    position: relative;
    z-index: 1000;
}

.navbar-container {
    width: min(1200px, calc(100% - 40px));
    min-height: 80px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ========================================= */
/* ================= Logo =================== */
/* ========================================= */
.navbar-brand {
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-logo-occilan {
    width: 200px;
    height: auto;
    display: block;
}

/* ========================================= */
/* ============== Desktop Menu ============= */
/* ========================================= */
.navbar-menu {
    display: flex;
    align-items: center;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* ========================================= */
/* ================= Links ================== */
/* ========================================= */
.nav-item {
    position: relative;
    list-style: none;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 10px;
    color: #fff;
    font-family: Roboto, sans-serif;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    transition: color .2s ease;
}

    .nav-link:hover,
    .nav-link.active {
        color: #c99d53;
    }

    /* ========================================= */
    /* ================ Underline ============== */
    /* ========================================= */
    .nav-link::after {
        content: "";
        position: absolute;
        left: 10px;
        right: 10px;
        bottom: 5px;
        height: 2px;
        background: #c99d53;
        transform: scaleX(0);
        transform-origin: right;
        transition: transform .25s ease;
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        transform: scaleX(1);
        transform-origin: left;
    }

/* ========================================= */
/* ================= Arrow ================= */
/* ========================================= */
.arrow {
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-left: 4px;
    margin-top: -4px;
    transition: transform .2s ease;
}

.has-dropdown:hover .arrow {
    transform: rotate(225deg);
}

/* ========================================= */
/* ================ Dropdown =============== */
/* ========================================= */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    left: 50%;
    min-width: 210px;
    margin: 0;
    padding: 8px;
    list-style: none;
    background: #fff;
    border: 2px solid #c99d53;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, .25);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -8px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}

.has-dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* ========================================= */
/* =========== Dropdown Links ============== */
/* ========================================= */
.dropdown-menu li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dropdown-link {
    display: block;
    padding: 10px 14px;
    color: #222;
    font-family: Roboto, sans-serif;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    transition: color .15s ease, background-color .15s ease;
}

    .dropdown-link:hover,
    .dropdown-link.active {
        color: #c99d53;
        background: #f3f3f3;
    }


    /* No underline in dropdown menus */
    .dropdown-link::after {
        display: none;
    }

/* ========================================= */
/* ============== Hamburger ================ */
/* ========================================= */
.navbar-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 8px;
    margin-left: auto;
    background: transparent;
    border: 1px solid rgba(201, 157, 83, .5);
    border-radius: 6px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

    .navbar-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: #fff;
        border-radius: 2px;
        transition: transform .2s ease, opacity .2s ease;
    }

/* ========================================= */
/* ================= Tablets =============== */
/* ========================================= */
@media (max-width: 1100px) {

    .navbar-container {
        width: calc(100% - 30px);
    }

    .nav-logo-occilan {
        width: 170px;
    }

    .navbar-nav {
        gap: 2px;
    }

    .nav-link {
        font-size: 13px;
        padding-left: 7px;
        padding-right: 7px;
    }
}

/* ========================================= */
/* ========== Tablets / Small Screens ====== */
/* ========================================= */
@media (max-width: 900px) {

    .navbar-container {
        min-height: 70px;
        justify-content: space-between;
    }

    .navbar-brand {
        position: relative;
        left: auto;
    }

    .nav-logo-occilan {
        width: 165px;
    }

    /* Show hamburger */
    .navbar-toggle {
        display: flex;
    }

    /* Closed menu */
    .navbar-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        display: block;
        background: #020c0e;
        border-top: 1px solid rgba(201, 157, 83, .3);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height .3s ease, opacity .2s ease;
    }

        /* Open menu */
        .navbar-menu.menu-open {
            max-height: 80vh;
            opacity: 1;
            overflow-y: auto;
        }

    .navbar-nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0;
        padding: 10px 0;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        display: flex;
        justify-content: space-between;
        width: 100%;
        box-sizing: border-box;
        padding: 15px 20px;
        font-size: 14px;
    }

        /* No underline on mobile */
        .nav-link::after {
            display: none;
        }

    /* ========================================= */
    /* ============ Mobile Dropdown ============ */
    /* ========================================= */
    .dropdown-menu {
        position: static;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        padding: 0;
        background: #071518;
        border: none;
        border-radius: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: block;
    }

    .dropdown-link {
        padding: 12px 35px;
        color: #ddd;
        font-size: 13px;
    }

        .dropdown-link:hover,
        .dropdown-link.active {
            background: rgba(201, 157, 83, .08);
        }

    /* Arrow remains pointing down */
    .arrow {
        margin-right: 5px;
    }
}

/* ========================================= */
/* ================= Phones ================ */
/* ========================================= */
@media (max-width: 600px) {

    .navbar-container {
        width: calc(100% - 24px);
        min-height: 64px;
    }

    .nav-logo-occilan {
        width: 145px;
    }

    .navbar-toggle {
        width: 42px;
        height: 42px;
    }

    .nav-link {
        padding: 14px 16px;
    }

    .dropdown-link {
        padding-left: 30px;
        padding-right: 16px;
    }
}

/* ========================================= */
/* ========== Very Small Phones ============ */
/* ========================================= */
@media (max-width: 380px) {

    .nav-logo-occilan {
        width: 130px;
    }

    .navbar-container {
        width: calc(100% - 20px);
    }
}
