﻿/* ==========================================================
   PORTAL DE VACACIONES FUSAI
   Design System - Layout
   ========================================================== */


/* ==========================================================
   1. CONFIGURACIÓN GENERAL
   ========================================================== */


html,
body {
    height: 100%;
}


body {
    margin: 0;
    font-family: var(--font-primary);
    background-color: var(--color-background);
    color: var(--color-text);
    overflow-x: hidden;
}



/* Control global */

*,
*::before,
*::after {
    box-sizing: border-box;
}



/* ==========================================================
   2. CONTENEDOR PRINCIPAL
   ========================================================== */


.app-container {
    min-height: 100vh;
    width: 100%;
    background-color: var(--color-background);
}



/* ==========================================================
   3. SIDEBAR
   ========================================================== */


.app-sidebar {
    width: var(--sidebar-width);
    background-color: var(--fusai-blue);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: var(--z-sidebar);
}



/* Logo */

.sidebar-logo {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2);
}



.sidebar-logo-image {
    max-width: 240px;
    max-height: 70px;
    object-fit: contain;
}



/* Menú */

.sidebar-menu {
    flex: 1;
    padding: var(--space-2);
    overflow-y: auto;
}





/* ==========================================================
   4. HEADER
   ========================================================== */


.app-header {
    height: var(--header-height);
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    z-index: var(--z-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-3);
}





/* ==========================================================
   5. CONTENIDO PRINCIPAL
   ========================================================== */


.app-content {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: calc(100vh - var(--header-height));
    padding-top: calc(var(--header-height) + var(--space-3));
    padding-left: var(--space-3);
    padding-right: var(--space-3);
    padding-bottom: var(--space-4);
}



/* Contenedor interno opcional */


.page-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}





/* ==========================================================
   6. FOOTER
   ========================================================== */


.app-footer {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: var(--space-2);
    text-align: center;
    color: var(--color-text-light);
    font-size: var(--font-size-xs);
}





/* ==========================================================
   7. SCROLLBAR SIDEBAR
   ========================================================== */


.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}



.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.25);
    border-radius: 10px;
}





/* ==========================================================
   8. RESPONSIVE TABLET
   ========================================================== */


@media(max-width:992px) {


    .app-sidebar {
        transform: translateX(-100%);
    }



    .app-header {
        left: 0;
    }



    .app-content {
        margin-left: 0;
        width: 100%;
    }



    .app-footer {
        margin-left: 0;
        width: 100%;
    }
}

/* ==========================================================
   9. RESPONSIVE MOBILE
   ========================================================== */


@media(max-width:768px) {


    .app-header {
        padding: 0 var(--space-2);
    }



    .app-content {
        padding-left: var(--space-2);
        padding-right: var(--space-2);
    }
}


/* ==========================================================
   10. MENÚ MÓVIL
   ========================================================== */

.menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: var(--space-2);
    border: none;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.menu-overlay {
    display: none;
}

@media(max-width:992px) {

    .menu-toggle {
        display: inline-flex;
    }

    .app-sidebar {
        transition: transform 0.25s ease;
        z-index: 1001;
    }

    body.menu-abierto .app-sidebar {
        transform: translateX(0);
    }

    body.menu-abierto .menu-overlay {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 1000;
    }
}
