/* ==========================================================================
   Burger (mobile menu toggle) component — consolidated from 6 definitions in
   style.css + 3 in mobile-fixes.css (2026-08-14). Values below reproduce the
   currently-winning computed styles (cascade + !important resolved by hand),
   loaded last so no !important is needed for the base rule.
   ========================================================================== */

.burger {
    position: relative;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.08) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    padding: 0;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    z-index: 1001;
}

.burger::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), transparent 60%);
    border-radius: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.burger:hover::before {
    opacity: 1;
}

.burger:hover {
    transform: scale(1.05);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow:
        0 8px 25px rgba(212, 175, 55, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.burger:active {
    transform: scale(0.95);
}

/* Base line + asymmetric "staircase" stagger — this is the currently-winning
   design (it carried !important in the old style.css location, so it beats
   the plain/no-stagger version that used to live in mobile-fixes.css). */
.burger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255, 244, 194, 0.95) 0%, #f5d27a 45%, #d4af37 100%);
    box-shadow: 0 0 6px rgba(245, 210, 122, 0.4);
    border-radius: 2px;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, margin 0.35s ease;
    transform-origin: center;
    margin: 0;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}

.burger-line.top {
    width: 22px;
}

.burger-line.middle {
    width: 12px;
    align-self: flex-end;
    margin-right: 13px;
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.55), #fff4c2);
}

.burger-line.bottom {
    width: 18px;
}

.burger:hover .burger-line {
    box-shadow: 0 0 10px rgba(245, 210, 122, 0.6);
}

.burger:hover .burger-line.middle {
    width: 22px;
    margin-right: 13px;
}

.burger.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0.15) 100%);
    border-color: rgba(212, 175, 55, 0.6);
}

.burger.active .burger-line.top {
    transform: translateY(9px) rotate(45deg);
}

.burger.active .burger-line.middle {
    opacity: 0;
    transform: scaleX(0);
}

.burger.active .burger-line.bottom {
    transform: translateY(-9px) rotate(-45deg);
}

/* Fallback for legacy markup using bare <div> children instead of .burger-line */
.burger div {
    display: block;
    width: 22px;
    height: 2.5px;
    background: linear-gradient(90deg, var(--primary-color), #fff8dc);
    border-radius: 3px;
    margin: 4px 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.burger div:first-child {
    width: 18px;
    margin-left: -2px;
}

.burger div:last-child {
    width: 14px;
    margin-left: 4px;
}

.burger:hover div {
    width: 22px;
    margin-left: 0;
}

.burger.active div:first-child {
    width: 22px;
    margin-left: 0;
    transform: rotate(-45deg) translate(-6px, 6px);
}

.burger.active div:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.burger.active div:last-child {
    width: 22px;
    margin-left: 0;
    transform: rotate(45deg) translate(-6px, -6px);
}

@media (max-width: 1024px) {
    .burger {
        display: flex;
    }
}

@media (max-width: 768px) {
    .burger {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: 44px;
        height: 44px;
        padding: 0;
        margin: 0;
        background: rgba(0, 0, 0, 0.35);
        border: 1px solid rgba(212, 175, 55, 0.35);
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        backdrop-filter: blur(10px);
        margin-left: auto;
    }

    .burger:hover {
        background: rgba(212, 175, 55, 0.12);
        border-color: rgba(212, 175, 55, 0.55);
    }

    .burger-line,
    .burger-line.top,
    .burger-line.middle,
    .burger-line.bottom {
        position: relative;
        left: auto;
        top: auto;
        bottom: auto;
        width: 22px;
        height: 3px;
        margin: 0;
        align-self: auto;
        background: var(--text-light);
        border-radius: 2px;
        transition: all 0.3s ease;
        flex-shrink: 0;
        transform: none;
    }

    .burger.active .burger-line.top {
        transform: translateY(9px) rotate(45deg);
    }

    .burger.active .burger-line.middle {
        opacity: 0;
    }

    .burger.active .burger-line.bottom {
        transform: translateY(-9px) rotate(-45deg);
    }
}
