/* ==================== MAIN MENU BAR ==================== */
.menu {
    background: #f8f9f5;
    border-top: 1px solid #e2e2d6;
    border-bottom: 1px solid #e2e2d6;
    padding: 4px 0;
    margin: 15px 0 20px;
    position: relative;
    z-index: 10;
}

.main-menu {
    display: flex;
    justify-content: center;
    gap: 10px;
    row-gap: 0px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    align-content: flex-start;
}

.menu-item {
    position: relative;
    flex: 0 1 auto;
    min-width: 0px;
}

/* ==================== MENU LINK ==================== */
.menu-link {
    color: #4f6b3e;
    cursor: pointer;
    font-weight: 600;
    font-size: 14.5px;
    padding: 0px 0px;
    display: inline-block;
    transition: all 0.2s ease;
    border-radius: 6px;
    white-space: nowrap;
}

.menu-link:hover {
    background: #eef3e7;
    color: #2c6b2c;
}

/* ==================== DROPDOWN POSITIONING ==================== */

/* Default: Center under hovered menu item (ALL items including last one) */
.dropdown,
.dropdown-columns {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    background: white;
    display: none;
    padding: 12px 0;
    border-radius: 10px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border: 1px solid #e6eadf;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    width: max-content;
    min-width: 200px;
    max-width: 90vw;
    margin: 0 8px;
    box-sizing: border-box;
}

.menu-item:hover .dropdown,
.menu-item:hover .dropdown-columns {
    display: block;
    opacity: 1;
    visibility: visible;
}

/* Removed right-align rule for last item so it also centers */

.dropdown-double-columns {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    padding: 5px 5px !important;
    width: max-content !important;
    max-width: 95vw !important;
}

.dropdown-triple-columns {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    padding: 5px 5px !important;
    width: max-content !important;
    max-width: 95vw !important;
}

.dropdown-columns .dropdown-region strong {
    display: block;
    color: #2c4a2c;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 12px;
    margin-bottom: 10px;
    border-bottom: 2px solid #4a6741;
}

.dropdown a {
    display: block;
    font-size: 13px;
    color: #6c7a60;
    text-decoration: none;
    padding: 5px 0px;
    margin: 1px 0;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.dropdown a:hover {
    color: #2f6b2f;
    background: #f2f7ec;
    padding-left: 18px;
}

/* ==================== SINGLE COLUMN FOR BIG REGIONS ==================== */
.dropdown-single {
    display: flex !important;
    flex-direction: column !important;
    min-width: 200px;
    padding: 12px 0;
}

.dropdown-single .dropdown-region strong {
    padding: 10px 16px 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid #e2e6da;
}

/* ==================== MEDIA QUERIES ==================== */
@media (max-width: 1024px) {
    .dropdown-columns {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px 20px !important;
    }
}

@media (max-width: 768px) {
    .main-menu {
        display: none;
    }
    .side-menu-close {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    .menu-item {
        min-width: 100px;
    }
}

/* ==================== SIDE MENU ==================== */
.side-menu {
    position: fixed;
    top: 0;
    right: -420px;
    width: 380px;
    max-width: 85vw;
    height: 100vh;
    background: rgba(20, 32, 24, 0.62); /* Premium semi-transparent dark green-glass (62% opacity) */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    transition: right 0.4s ease-out;
    overflow-y: auto;
    padding: 80px 25px 40px;
    font-family: inherit;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.side-menu.open {
    right: 0 !important;
}

/* ==================== CLOSE BUTTON ==================== */
.side-menu-close {
    position: fixed !important;
    top: 18px;
    right: 22px;
    z-index: 9999 !important;
    font-size: 42px;
    color: #ffffff; /* High-contrast white icon */
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    width: 54px;
    height: 54px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent; /* Fully transparent close button background to eliminate the white circle */
    box-shadow: none;
    pointer-events: all !important;
    border: none;
}

.side-menu-close:hover {
    color: var(--color-gold-accent, #deaf6b); /* Champagne gold close glow */
    background: rgba(255, 255, 255, 0.08); /* Very subtle transparent glow on hover */
    transform: rotate(90deg);
}

/* ==================== OVERLAY ==================== */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    z-index: 1999;
    display: none;
}

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

/* ==================== COUNTRY / REGION MENU ==================== */
.country-item {
    margin-bottom: 4px;
    border-bottom: 1px solid #edf0e6;
}

.country-header {
    padding: 12px 8px;
    font-weight: 500;
    font-size: 17px;
    color: #2c4a2c;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s;
    border-radius: 6px;
    cursor: pointer;
}

.country-header:hover {
    background: #f5f7f0;
}

.country-header .arrow-icon {
    font-size: 14px;
    color: #8aa07a;
    transition: transform 0.25s;
}

.region-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease-out;
    padding-left: 12px;
    background: #fefef9;
}

.country-item:hover .region-container {
    max-height: 800px;
    transition: max-height 0.4s ease-in;
}

.locality-link,
.simple-locality-link {
    display: block;
    padding: 8px 12px 8px 20px;
    color: #ffffff; /* Pure white for high contrast on dark side menu */
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
    border-left: 1px dashed rgba(255, 255, 255, 0.2);
    margin: 2px 0;
    font-weight: 500;
}

.locality-link:hover,
.simple-locality-link:hover {
    color: var(--color-gold-accent, #deaf6b); /* Champagne gold glow on rollover */
    background: rgba(255, 255, 255, 0.08); /* Elegant semi-translucent hover highlight */
    padding-left: 28px;
    border-left-color: var(--color-gold-accent, #deaf6b);
}