/* ==========================================================================
   RESET & GLOBAL VIEWPORT CONSTRAINTS
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    background-color: #FDFBF7;
    color: #1e293b;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#page.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

@media (min-width: 1024px) {
    #page.site {
        flex-direction: row;
    }
}

/* ==========================================================================
   1. DESKTOP SIDEBAR (>1024px) - ZERO SCROLL FIT
   ========================================================================== */
.site-sidebar {
    display: none;
}

@media (min-width: 1024px) {
    .site-sidebar {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 300px;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        height: 100vh;
        background-color: #F5EFE6;
        border-right: 1px solid rgba(180, 83, 9, 0.12);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.05);
        z-index: 100;
        overflow: hidden; /* Hard locks scrolling */
    }
}

.sidebar-top-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Brand Header Block */
.sidebar-brand-box {
    padding: 20px 16px 14px 16px;
    background-color: #3B0A15;
    background-image: linear-gradient(180deg, #4A0D1B 0%, #3B0A15 100%);
    text-align: center;
    flex-shrink: 0;
}

.sidebar-brand-link {
    text-decoration: none;
    display: block;
}

/* Scaled Logo Badge */
.sidebar-logo-circle {
    width: 135px;
    height: 135px;
    margin: 0 auto 10px auto;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #E2B96F;
    background-color: #ffffff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

.sidebar-logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Cursive Title Styling */
.sidebar-title {
    font-family: 'Great Vibes', 'Playfair Display', cursive, serif;
    font-size: 2.2rem;
    font-weight: 400;
    color: #F3E5AB;
    margin: 0;
    line-height: 1.1;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

/* Navigation List - Zero Scroll Proportions */
.sidebar-nav {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly; /* Evenly distributes all 10 items without scroll */
    flex: 1;
    overflow: hidden;
}

.sidebar-nav-item {
    display: block;
    padding: 7px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    color: #475569;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.sidebar-nav-item:hover {
    background-color: #EAE2D5;
    color: #6B1226;
}

.sidebar-nav-item.active {
    background-color: #6B1226;
    color: #F3E5AB;
    box-shadow: 0 3px 10px rgba(107, 18, 38, 0.22);
}

/* Footer Box (Descarga Nuestra App) */
.sidebar-footer-box {
    padding: 14px 16px 18px 16px;
    background-color: #1A0308;
    text-align: center;
    flex-shrink: 0;
}

.sidebar-footer-title {
    font-size: 0.9rem;
    font-weight: 800;
    color: #FFC107;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

.sidebar-app-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
}

.sidebar-app-btn {
    display: block;
    flex: 1;
    max-width: 115px;
    transition: transform 0.15s ease;
}

.sidebar-app-btn:hover {
    transform: scale(1.04);
}

.sidebar-app-btn img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   SHORT SCREEN / LAPTOP DISPLAY ADAPTATIONS (<800px Height)
   ========================================================================== */
@media (min-width: 1024px) and (max-height: 800px) {
    .sidebar-brand-box {
        padding: 14px 12px 8px 12px;
    }
    .sidebar-logo-circle {
        width: 100px;
        height: 100px;
        margin-bottom: 6px;
    }
    .sidebar-title {
        font-size: 1.8rem;
    }
    .sidebar-nav {
        padding: 8px 10px;
    }
    .sidebar-nav-item {
        padding: 5px 12px;
        font-size: 0.82rem;
    }
    .sidebar-footer-box {
        padding: 10px 12px 12px 12px;
    }
    .sidebar-footer-title {
        font-size: 0.82rem;
        margin-bottom: 6px;
    }
}

/* ==========================================================================
   2. MOBILE & TABLET FLOATING BOTTOM NAV (<1024px)
   ========================================================================== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 380px;
    background-color: #0F2744;
    border-radius: 999px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    z-index: 99999;
    box-sizing: border-box;
}

@media (min-width: 1024px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.68rem;
    font-weight: 600;
    gap: 2px;
    opacity: 0.75;
    transition: opacity 0.2s ease, color 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 6px;
    flex: 1;
    text-align: center;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    opacity: 1;
    color: #E2B96F;
}

.mobile-nav-item svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* ==========================================================================
   3. "NAVEGAR" BLUR OVERLAY MENU (<1024px)
   ========================================================================== */
.navegar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(230, 200, 190, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99990;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px 16px 90px 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    overflow-y: auto;
    box-sizing: border-box;
}

.navegar-overlay.open {
    opacity: 1;
    visibility: visible;
}

.navegar-close-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    color: #6B1226;
    font-size: 1.25rem;
    font-weight: 800;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.navegar-menu-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 380px;
    margin: 0 auto;
    width: 100%;
}

.navegar-pill-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.8);
    padding: 12px 18px;
    border-radius: 999px;
    text-decoration: none;
    color: #6B1226;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, background 0.15s ease;
}

.navegar-pill-item:active {
    transform: scale(0.98);
    background: #ffffff;
}

.navegar-pill-icon {
    width: 20px;
    height: 20px;
    fill: #6B1226;
    flex-shrink: 0;
}

/* MAIN CONTENT WRAPPER POSITIONING */
.site-main-layout {
    flex-grow: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    padding-bottom: 80px;
}

@media (min-width: 1024px) {
    .site-main-layout {
        margin-left: 300px;
        width: calc(100% - 300px);
        padding-bottom: 0;
    }
}