/* ============================================================
   1. BASE STYLES & MOBILE OVERLAY MENU
   ============================================================ */

   /* Mobile Menu Overlay Container */
.mobile-only-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at top right, rgba(212, 175, 55, 0.14), transparent 28%),
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.05), transparent 24%),
        linear-gradient(180deg, #11141b 0%, #0d1016 46%, #090b10 100%);
    z-index: 10000;
    display: none; 
    flex-direction: column;
    overflow-y: auto;
    font-family: 'Playfair Display', serif;
    isolation: isolate;
}

.mobile-only-overlay::before,
.mobile-only-overlay::after {
    content: "";
    position: fixed;
    pointer-events: none;
    inset: auto;
    z-index: -1;
}

.mobile-only-overlay::before {
    top: 110px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.12) 0%, rgba(212, 175, 55, 0) 72%);
    filter: blur(10px);
}

.mobile-only-overlay::after {
    bottom: 140px;
    left: -50px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 74%);
    filter: blur(18px);
}

/* Menu corner / hamburger button (Hidden by default on Desktop) */
.menu-corner-btn {
    display: none; /* Hidden on large screens */
    background: var(--accent, #f4c430); /* Uses accent, falls back to Gold */
    color: #111;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 24px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(0,0,0,0.25);
    transition: transform .12s ease, box-shadow .2s ease;
    z-index: 999;
}

.menu-corner-btn:active { 
    transform: translateY(1px); 
}

/* Accessibility / hover state */
.menu-corner-btn:focus,
.menu-corner-btn:hover {
    outline: none;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25), 0 0 6px rgba(241,196,15,0.18);
}

/* --- Menu Header Area --- */
.menu-header {
    padding: 16px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015)),
        rgba(13, 16, 22, 0.9) !important;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-left: none;
    border-right: none;
    box-shadow: 0 14px 34px rgba(0,0,0,0.38), inset 0 1px 0 rgba(255,255,255,0.08);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.menu-header .brand-wrapper {
    display: flex;
    align-items: center;
    gap: 15px; /* Matched spacing */
    min-width: 0;
    flex: 1 1 auto;
}

/* Matched the exact circular white background for the logo */
.menu-header .logo-area {
    width: 55px;
    height: 55px;
    background: #fff; 
    border-radius: 50%;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.65);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24), 0 0 0 4px rgba(255, 255, 255, 0.03);
}

.menu-header .logo-area img {
    width: 90%;
    height: auto;
}

/* Matched the exact typography, gold color, and shadow of the main site */
.menu-header .trust-name {
    max-width: 240px;
    font-size: 17px;
    font-weight: 900;
    color: #D4AF37; /* Premium Gold */
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.5px;
    line-height: 1.15;
    text-transform: none;
    white-space: normal;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Updated Close Button to Gold so it is visible against the dark header */
.close-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.24);
    border-radius: 16px;
    color: #D4AF37;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 10px 20px rgba(0,0,0,0.18);
}

.close-icon:hover {
    transform: translateY(-1px);
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 14px 26px rgba(0,0,0,0.26);
}

/* --- Menu Content Area --- */
.menu-content {
    padding: 22px 18px 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.menu-section {
    position: relative;
    padding: 16px 14px 14px;
    border-radius: 24px;
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015)),
        rgba(16, 19, 26, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.16);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 18px 34px rgba(0, 0, 0, 0.24);
    overflow: hidden;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.menu-section::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 56px;
    background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent);
    pointer-events: none;
}

.menu-label {
    font-size: 15px;
    letter-spacing: 3px;
    color: #D4AF37;
    margin-bottom: 14px;
    font-weight: 800;
    text-transform: uppercase;
    padding-left: 14px;
    position: relative;
    text-shadow: 0 4px 10px rgba(0,0,0,0.24);
}

.menu-label::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f8e08c, #bf953f);
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.24);
}

.menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-links li {
    padding: 0;
}

.menu-links li + li {
    margin-top: 10px;
}

.menu-links li a {
    text-decoration: none;
    font-size: 22px;
    font-weight: 600;
    color: #ffffff !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: all 0.32s ease;
    padding: 18px 16px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

/* Hover/Active State */
.menu-links li a:active,
.menu-links li a:hover {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(255,255,255,0.08));
    color: #fff2be !important;
    border-color: rgba(212, 175, 55, 0.18);
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(0,0,0,0.18), 0 0 16px rgba(212, 175, 55, 0.08);
}

.menu-links li a span {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #D4AF37;
    font-size: 21px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.16);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.menu-links li a:hover span {
    transform: translateX(3px);
    background: rgba(212, 175, 55, 0.16);
    border-color: rgba(212, 175, 55, 0.26);
}

/* ============================================================
   2. MOBILE RESPONSIVE LOGIC (Shows Button, Hides PC Nav)
   ============================================================ */
@media (max-width: 900px) {
    /* 1. Force the mobile menu button to appear */
    #menu-toggle-btn,
    .menu-corner-btn {
        display: flex !important;
    }

    /* 2. Hide the desktop links and phone number */
    .nav-links, 
    .nav-phone {
        display: none !important;
    }

    /* 3. Ensure the container holding the button doesn't collapse */
    .nav-right {
        display: flex !important;
        align-items: center;
    }
}

@media (max-width: 600px) {
    .menu-header {
        padding: 14px 16px;
    }

    .menu-header .trust-name {
        max-width: calc(100vw - 124px);
        font-size: 13px;
        letter-spacing: 0.15px;
        line-height: 1.08;
    }

    .menu-content {
        padding: 18px 14px 22px;
        gap: 16px;
    }

    .menu-section {
        padding: 14px 12px 12px;
        border-radius: 20px;
    }

    .menu-links li a {
        font-size: 18px;
        padding: 16px 14px;
        border-radius: 16px;
    }

}

@media (max-width: 420px) {
    .menu-header {
        padding: 12px 14px;
    }

    .menu-header .logo-area {
        width: 48px;
        height: 48px;
    }

    .menu-header .trust-name {
        max-width: calc(100vw - 112px);
        font-size: 11px;
        letter-spacing: 0.08px;
        line-height: 1.04;
    }

    .close-icon {
        width: 42px;
        height: 42px;
        font-size: 30px;
    }
}
