/* =======================
   HEADER BASE STYLES
   ======================= */
body {
    background: #fff;
    margin: 0;
    padding: 0;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #e8e5e5;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: relative;
}

header img.logo {
    height: 60px;
}

/* Desktop navigation */
.desktop-nav {
    display: flex;
    align-items: center;
    gap: 40px;
    font-weight:500;

}

.desktop-nav a {
    color: #4a4949;
    text-decoration: none;
    font-size: 18px;
    transition: 0.2s;
    font-family: Helvetica, Arial, sans-serif;
}

.desktop-nav a:hover {
    color: #97033f;
}

.menu-icon {
    width: 100px;
    height: 80px;
    cursor: pointer;
    display: none;
    /* hidden on desktop */
}

/* Sidebar Menu */
.sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    height: 100vh;
    width: 300px;
    flex-direction: column;

    background: #460c0c;
    padding: 0;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    font-size: 18px;
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
    transition: right 0.3s ease;
    z-index: 1001;
    font-family: Helvetica, Arial, sans-serif;
}

.sidebar.active {
    display: flex;
}

.sidebar a {
    color: #353232;
    text-decoration: none;
    font-size: 24px;
    transition: 0.2s;
    
}

.sidebar a:hover {
    color: #97033f;
}

/* Mobile Header */
.mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 18px 15px 18px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.mobile-header h3 {
    margin: 0;
    font-size: 22px;
    color: #353232;
    font-family: Helvetica, Arial, sans-serif;
}

.close-btn {
    background: #000;
    /* solid black background */
    border: none;
    /* reset border */
    font-size: 28px;
    color: #ffffff;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    /* center vertically */
    justify-content: center;
    /* center horizontally */
    border-radius: 50%;
    /* makes it round */
    transition: all 1.2s ease;
}

.close-btn:hover {
    background: #ffffff;
    /* white background */
    color: #000000;
    /* black text */
}


/* =======================
   SUBMENU STYLES
   ======================= */
.submenu {
    position: absolute;
    top: 90px;
    left: 700px;
    /* temp - adjust or JS calculation */
    background: #ffffff;
    padding: 15px;
    display: none;
    /* default hidden */
    border-radius: 8px;
    z-index: 1000;
    min-width: 260px;
}

.submenu.active {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 12px;
}

.submenu a {
    padding: 8px 20px;
    font-size: 20px;
    color: #353232;
    text-decoration: none;
    font-family: Helvetica, Arial, sans-serif;
    transition: 0.2s;
    background: #e8e5e5;
    border-radius: 6px;
    text-align: center;
}

.submenu a:hover {
    color: #97033f;
    background: #f2f2f2;
    transform: translateY(-2px);
}

/* Desktop Gallery submenu hover */
.desktop-nav .gallery-item {
    position: relative;
}

.desktop-nav .gallery-item:hover .submenu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 12px;
}

.desktop-nav .submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 280px;
    margin-top: 10px;
}

.desktop-nav .submenu a {
    padding: 10px 15px;
    font-size: 18px;
    color: #353232;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    transition: 0.2s;
    background: #f8f8f8;
    border-radius: 6px;
    text-align: center;
    margin: 2px 0;
}

.desktop-nav .submenu a:hover {
    color: #97033f;
    background: #f0f0f0;
    transform: translateY(-2px);
}


/* =======================
   RESPONSIVE DESIGN
   ======================= */
@media (max-width: 992px) {
    .menu-icon {
        width: 70px;
        height: 50px;
    }

    header img.logo {
        height: 50px;
    }

    .sidebar {
        gap: 30px;
        font-size: 20px;
        padding: 10px 15px;
    }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .menu-icon {
        display: block;
    }

    .sidebar {
        position: fixed;
        top: 0;
        right: -320px;
        /* hidden off-canvas */
        height: 100vh;
        width: 300px;
        flex-direction: column;
        background: #ffffff;
        padding: 0;
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
        font-size: 18px;
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
        transition: right 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
        /* Enable vertical scrolling */
        overflow-x: hidden;
        /* Hide horizontal scrollbar */
        font-family: 'Playfair Display', serif;
    }

    .sidebar.active {
        right: 0;
    }

    /* Custom scrollbar styling for mobile */
    .sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 3px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 3px;
    }

    .sidebar::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

    .sidebar a {
        display: block;
        padding: 16px 20px;
        margin: 0 15px 8px 15px;
        border-radius: 12px;
        font-size: 18px;
        transition: all 0.2s ease;
        /* background: #f8f8f8; */
        border: 1px solid transparent;
    }

    .sidebar a:hover {
        background: #f0f0f0;
        border-color: rgba(151, 3, 63, 0.2);
        transform: translateX(4px);
    }

    .submenu {
        position: static;
        margin: 0 15px 8px 15px;
        box-shadow: none;
        background: transparent;
        padding: 0;
        display: none;
        /* hide in mobile until clicked */
    }

    .submenu.active {
        display: flex;
        flex-direction: column;
        gap: 6px;
        margin-top: 0;
        margin-bottom: 8px;
    }

    .submenu a {
        font-size: 16px;
        padding: 12px 16px;
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        margin: 0 0 4px 20px;
        border-left: 3px solid #97033f;
    }

    .submenu a:hover {
        background: #e8e8e8;
        transform: translateX(2px);
    }

    .menu-icon {
        width: 55px;
        height: 45px;
    }

    header img.logo {
        height: 45px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 8px 15px;
    }

    .menu-icon {
        width: 50px;
        height: 40px;
    }

    header img.logo {
        height: 40px;
    }

    .sidebar {
        width: 70vw;
        right: -90vw;
        padding: 18px 16px 26px 16px;
        overflow-y: auto;
        /* Enable vertical scrolling */
        overflow-x: hidden;
        /* Hide horizontal scrollbar */
    }

    /* Custom scrollbar styling for small mobile */
    .sidebar::-webkit-scrollbar {
        width: 4px;
        /* Thinner scrollbar for small screens */
    }

    .sidebar::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 2px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 2px;
    }

    .sidebar::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

    .sidebar a {
        font-size: 18px;
    }

    .submenu {
        margin: 0 10px 6px 10px;
        /* smaller spacing */
        font-size: 14px;
        /* slightly smaller text */
    }

    .submenu a {
        font-size: 16px;
    }
}

/* Backdrop overlay */
.backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.25);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1000;
}

.backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* Prevent body scroll when mobile menu open */
body.noscroll {
    overflow: hidden;
}