/* ===== LAYOUT STYLES - VINTAGE EDITION (CENTERED) ===== */

.hamburger-menu {
    position: fixed;
    top: 30px;
    left: 30px;
    z-index: 1002;
    cursor: pointer;
    background: transparent;
    padding: 10px;
    transition: all 0.4s ease;
    border: none;
}

.hamburger-menu:hover {
    transform: scale(1.05);
}

.hamburger-menu span {
    display: block;
    width: 35px;
    height: 3px;
    background-color: var(--color-ivory);
    margin: 6px 0;
    transition: all 0.4s ease;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background-color: var(--color-burgundy);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background-color: var(--color-burgundy);
}

.sidebar {
    position: fixed;
    top: 0;
    left: -350px;
    width: 350px;
    height: 100vh;
    background-color: #1a1714;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        linear-gradient(135deg, #1a1714 0%, #2c2520 100%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' opacity='0.5' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E");
    z-index: 1001;
    transition: left 0.5s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: 15px 0 50px rgba(0, 0, 0, 0.8);
    border-right: 6px solid var(--color-gold-muted);
    display: flex;
    flex-direction: column;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 15px;
    bottom: 15px;
    left: 15px;
    right: 15px;
    border: 1px solid rgba(197, 160, 89, 0.4);
    pointer-events: none;
    z-index: 1;
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    padding: 120px 30px 40px;
    position: relative;
    text-align: center;
}

.sidebar-header h3 {
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--color-ivory);
    font-family: 'Playfair Display', serif;
    letter-spacing: 6px;
    text-transform: uppercase;
    margin-bottom: 20px;
    opacity: 0.9;
}

.sidebar-header::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--color-gold-bright), transparent);
    margin: 0 auto;
}

.sidebar-header h3:hover {
    color: var(--color-gold-bright);
}

.sidebar-content {
    padding: 40px 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    flex-grow: 1;
}

.sidebar-memorial {
    padding: 40px 30px;
    margin: 20px 15px 30px;
    border-top: 1px solid rgba(197, 160, 89, 0.2);
    text-align: center;
}

.sidebar-memorial .memorial-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--color-gold-bright);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.sidebar-memorial .memorial-description {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--color-ivory);
    opacity: 0.8;
    font-weight: 300;
}

.sidebar-item {
    display: block;
    padding: 15px 40px;
    color: var(--color-ivory);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    font-family: var(--font-heading);
    position: relative;
    text-align: center;
    letter-spacing: 2px;
}

.sidebar-item:hover {
    color: var(--color-gold-bright);
    transform: translateX(5px);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.sidebar-item::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 40px;
    right: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gold-muted), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-item:hover::after {
    opacity: 0.6;
}

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(44, 25, 10, 0.4);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(2px);
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- TRANSPARENT HEADER --- */
.header {
    text-align: center;
    padding: 15px 20px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 900;
    height: var(--header-height);

    background: transparent;
    border-bottom: none;
    box-shadow: none;
    backdrop-filter: none;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    pointer-events: none;
}

.header h1,
.header p {
    pointer-events: auto;
}

/* ===== OPTION 3: TOP RIGHT DROPDOWN FILTER ===== */
.filter-dropdown-wrapper {
    position: fixed;
    top: 30px;
    right: 30px;
    z-index: 1000;
}

.filter-dropdown-btn {
    background: rgba(28, 18, 14, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid var(--color-gold-muted);
    color: var(--color-ivory);
    font-family: var(--font-heading), 'Playfair Display', serif;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-dropdown-btn:hover {
    color: #ffffff;
    border-color: var(--color-gold-bright);
    background: rgba(45, 28, 20, 0.95);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.25);
}

.filter-dropdown-btn .btn-arrow {
    font-size: 0.75rem;
    color: var(--color-gold-bright);
    transition: transform 0.3s ease;
}

.filter-dropdown-wrapper.open .filter-dropdown-btn .btn-arrow {
    transform: rotate(180deg);
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: rgba(22, 15, 12, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid var(--color-gold-muted);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-dropdown-wrapper.open .filter-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    width: 100%;
    background: transparent;
    border: none;
    color: rgba(253, 251, 247, 0.8);
    font-family: var(--font-heading), 'Playfair Display', serif;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.2s ease;
    text-align: left;
}

.dropdown-item:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--color-gold-bright);
}

.dropdown-item.active {
    background: linear-gradient(135deg, #b45309 0%, #78350f 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.4);
}

.dropdown-item .tab-count {
    background: rgba(0, 0, 0, 0.35);
    color: var(--color-gold-bright);
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
}

.dropdown-item.active .tab-count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

@media (max-width: 640px) {
    .filter-dropdown-wrapper {
        top: 20px;
        right: 15px;
    }
    .filter-dropdown-btn {
        padding: 8px 12px;
        font-size: 0.72rem;
    }
    .filter-dropdown-menu {
        width: 210px;
    }
}

.header::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--color-text-ink);
    margin: 5px auto 0;
    opacity: 0.5;
}

.memorial-header-dedication {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-size: 0.85rem;
    color: var(--color-ivory);
    opacity: 0.7;
    letter-spacing: 2px;
    margin-bottom: 2px;
}

.header h1 {
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--color-ivory);
    margin: 0;
    font-family: var(--font-heading);
    letter-spacing: 4px;
    text-transform: uppercase;
    line-height: 1;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.header p {
    font-size: 0.75rem;
    color: var(--color-gold-bright);
    font-weight: 400;
    letter-spacing: 3px;
    font-style: italic;
    font-family: var(--font-body);
    text-transform: uppercase;
    margin-top: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* --- VERTICAL CENTERING MAIN CONTENT --- */
.main-content {
    position: relative;
    width: 100%;
    height: 100vh;
    /* Full Viewport */

    /* THE CENTERING MAGIC */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    padding-top: 0;
    overflow: hidden;
    /* Gallery handles horizontal part */
}