/* ========================================
   HEADER
   ======================================== */

.site-header {
    background: #53351f;
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    padding: 0.9rem 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.15);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: hidden;
}

/* Liquid glass aurora effect on header */
@keyframes liquidShift {
    0%   { transform: translateX(-25%) translateY(-15%) rotate(0deg) scale(1.15); }
    25%  { transform: translateX(15%)  translateY(5%)   rotate(90deg) scale(1.25); }
    50%  { transform: translateX(-5%)  translateY(15%)  rotate(180deg) scale(1.1); }
    75%  { transform: translateX(-15%) translateY(-5%)  rotate(270deg) scale(1.2); }
    100% { transform: translateX(-25%) translateY(-15%) rotate(360deg) scale(1.15); }
}

.site-header::before {
    content: '';
    position: absolute;
    top: -80%; left: -25%;
    width: 150%; height: 300%;
    background:
        radial-gradient(ellipse at 25% 40%, rgba(212,165,116,0.25) 0%, transparent 45%),
        radial-gradient(ellipse at 65% 25%, rgba(232,213,196,0.20) 0%, transparent 40%),
        radial-gradient(ellipse at 75% 70%, rgba(184,148,110,0.18) 0%, transparent 38%),
        radial-gradient(ellipse at 40% 75%, rgba(160,120,90,0.15) 0%, transparent 35%);
    animation: liquidShift 9s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* Ensure header children are above the pseudo-element */
.site-header > * {
    position: relative;
    z-index: 1;
}

.header-container {
    max-width: 1480px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.logo-image {
    height: 40px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    color: white;
    box-shadow: 0 4px 14px rgba(139,90,60,0.5);
    flex-shrink: 0;
}

.logo-text {
    font-weight: 700;
    font-size: 1.5rem;
    color: #FAF8F5;
    text-shadow: none;
    letter-spacing: 1px;
}

/* Nav pushed to the right */
.main-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    z-index: 1;
    margin-left: auto;
}

.nav-link {
    font-weight: 500;
    color: rgba(250,248,245,0.9);
    position: relative;
    padding: 0.5rem 0.25rem;
    transition: color 0.25s ease;
    font-size: 0.95rem;
    text-decoration: none;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, #D4A574, #E8D5C4);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.nav-link:hover { color: #ffffff; }
.nav-link:hover::after { width: 100%; }
.nav-link.active { 
    color: #ffffff; 
}
.nav-link.active::after { 
    width: 100%;
    background: linear-gradient(90deg, #D4A574, #E8D5C4);
}

/* Buttons pushed to the right */
.header-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
    position: relative;
    z-index: 2;
}

.btn-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.78rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    border: 1px solid transparent;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    font-family: var(--font-main);
}

/* ========================================
   HAMBURGER BUTTON
   ======================================== */

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: rgba(250,248,245,0.15);
    border: 1px solid rgba(250,248,245,0.3);
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    transition: background 0.25s ease, border-color 0.25s ease;
}

.hamburger:hover {
    background: rgba(250,248,245,0.25);
    border-color: rgba(250,248,245,0.5);
}

.hamburger-bar {
    display: block;
    width: 20px;
    height: 2px;
    background: #FAF8F5;
    border-radius: 2px;
    transition: transform 0.35s ease, opacity 0.25s ease, width 0.25s ease;
    transform-origin: center;
}

.hamburger.is-open .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.is-open .hamburger-bar:nth-child(2) {
    opacity: 0;
    width: 0;
}
.hamburger.is-open .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   SIDEBAR OVERLAY
   ======================================== */

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 1099;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.sidebar-overlay.is-visible {
    opacity: 1;
    pointer-events: all;
}

/* ========================================
   MOBILE SIDEBAR
   ======================================== */

.mobile-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: min(300px, 82vw);
    height: 100vh;
    background: #5D3A1F;
    backdrop-filter: blur(24px) saturate(1.4);
    -webkit-backdrop-filter: blur(24px) saturate(1.4);
    border-left: 1px solid rgba(0,0,0,0.2);
    box-shadow: -8px 0 40px rgba(0,0,0,0.3);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem 2rem;
    transform: translateX(100%);
    transition: transform 0.38s cubic-bezier(0.4,0,0.2,1);
    overflow-y: auto;
}

.mobile-sidebar.is-open {
    transform: translateX(0);
}

.mobile-sidebar::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(ellipse, rgba(212,165,116,0.1) 0%, transparent 65%);
    pointer-events: none;
}

/* Close button */
.sidebar-close {
    align-self: flex-end;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(250,248,245,0.15);
    border: 1px solid rgba(250,248,245,0.3);
    border-radius: 8px;
    color: #FAF8F5;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
    margin-bottom: 1.5rem;
}

.sidebar-close:hover {
    background: rgba(250,248,245,0.25);
    color: #ffffff;
}

/* Nav links */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    color: rgba(250,248,245,0.9);
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.22s ease, color 0.22s ease, padding-left 0.22s ease;
    position: relative;
}

.sidebar-nav-link i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    color: #D4A574;
    flex-shrink: 0;
    transition: color 0.22s ease;
}

.sidebar-nav-link:hover,
.sidebar-nav-link.active {
    background: rgba(250,248,245,0.15);
    color: #ffffff;
    padding-left: 1.3rem;
}

.sidebar-nav-link:hover i,
.sidebar-nav-link.active i {
    color: #E8D5C4;
}

.sidebar-nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
    border-radius: 0 3px 3px 0;
}

/* Divider */
.sidebar-divider {
    height: 1px;
    background: rgba(250,248,245,0.2);
    margin: 1.5rem 0;
    flex-shrink: 0;
}

/* Action buttons inside sidebar */
.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sidebar-btn {
    width: 100% !important;
    height: 44px !important;
    justify-content: flex-start !important;
    padding: 0 1rem !important;
    font-size: 0.9rem !important;
    border-radius: 10px !important;
    gap: 0.7rem !important;
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

@media (max-width: 900px) {
    .main-nav       { display: none; }
    .header-actions { display: none; }
    .hamburger      { display: flex; }
}

@media (min-width: 901px) {
    .mobile-sidebar,
    .sidebar-overlay,
    .hamburger { display: none !important; }
}
