﻿/*=========================================================
 BELAIR DASHBOARD V2 - EDICIÓN FLUIDA REAL (SIN MOCHAR BOTÓN)
=========================================================*/

/*=========================================================
1. RESET GLOBAL
=========================================================*/
*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

/*=========================================================
2. VARIABLES DEL SISTEMA
=========================================================*/
:root{
    --primary:#a70024;          /* Color principal */
    --primary2:#bb003e;         /* Color secundario */
    --primary-soft:#FCE8EC;     /* Fondo suave */
    --background:#e4d2da;       /* Fondo del sitio */
    --card:#FFFFFF;             /* Fondo de tarjetas */
    --text:#a31e3f;             /* Texto principal */
    --text-light:#666;          /* Texto secundario */
    --radius:20px;              /* Bordes redondeados */
}

/*=========================================================
3. ESTILOS GENERALES
=========================================================*/
body{
    overflow-y:scroll;
    font-family:"Segoe UI",sans-serif;
    background:var(--background);
    color:var(--text);
}

/*=========================================================
4. HEADER GENERAL (CENTRADO MATEMÁTICO REAL)
=========================================================*/
.header{
    position:relative;
    background:white;
    padding:10px 0;
    border-bottom:1px solid var(--primary);
    min-height: 120px; 
    display: flex;
    align-items: center;
    width: 100%;
}

.header .container-fluid {
    max-width: 1700px;
    width: 100%;
    margin: 0 auto;
    padding-left: 40px;  
    padding-right: 40px; 
}

.header-top{
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* EL TÍTULO SE CENTRA DE MANERA ABSOLUTA RESPECTO AL MONITOR */
.header h1{
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color:var(--primary);
    font-weight:700;
    margin:0;
    text-align: center;
    white-space: nowrap; 
    font-size: 1.9rem;
    z-index: 2;
}

.header-top .search-container {
    width: 100%;
    max-width: 360px; 
    transition: max-width 0.25s ease; 
}

.header p{
    color:var(--text-light);
    margin:0;
}

/* Contenedor del logo en MENÚ PRINCIPAL: 
   Le agregamos el mismo espacio a la izquierda para que el logo 
   esté EXACTAMENTE en la misma posición que en las categorías */
/* Contenedor del logo en MENÚ PRINCIPAL */
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px; 
    order: 1;
    padding-left: 0; /* ¡Cero paddings! El logo se queda en su esquina nativa */
}

.logo{
    height: 100px; 
    width: auto;
    display: block;
}

/* Espaciado del contenido debajo del Header */
.main{
    max-width:1700px;
    margin:auto;
    padding: 50px 40px; 
}

.buscador input{
    border-radius:50px;
    padding:14px 22px;
}

/*=========================================================
5. TARJETAS DEL SISTEMA
=========================================================*/
.categoria-card{
    border:none;
    border-radius:var(--radius);
    background:white;
    cursor:pointer;
    transition:.30s;
    overflow:hidden;
    position:relative;
    display:flex;
    flex-direction:column;
    /*Tamaño Largo de tarjeta*/
    min-height:180px;
}

.categoria-card:hover{
    transform:translateY(-8px);
    box-shadow:0 20px 40px rgba(0,0,0,.12);
    background:var(--primary);
}

.categoria-card:hover .categoria-title,
.categoria-card:hover .hotel-title{
    color:white;
}

.categoria-card:hover i{
    color:white;
}

.categoria-bar{
    height:6px;
    background:var(--primary);
}

.categoria-icon{
    font-size:35px;
    color:var(--primary);
    transition:.30s;
}

.categoria-card:hover .categoria-icon{
    transform:scale(1.08);
    color:white;
}

.categoria-card:hover .categoria-bar{
    background:white;
}

.categoria-title{
    font-size:1.30rem;
    font-weight:500;
    margin-top:12px;
}

.card-body{
    flex:1;
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;
    padding:1.5rem;
    text-align:center;
}

.card-body i{
    display:block;
    margin:0 auto 15px;
}

.hotel-title{
    font-size:1.10rem;
    font-weight:600;
    margin-top:12px;
    color:var(--text);
    transition:.30s;
}

a, a:visited, a:hover, a:active{
    color:inherit !important;
    text-decoration:none !important;
}

/*=========================================================
6. BUSCADOR
=========================================================*/
.search-box{
    position:relative;
    width: 100%;
}

.buscador-icono{
    background:white;
    color:var(--primary);
    border-radius:16px 0 0 16px;
    border:2px solid var(--primary);
    border-right:none;
}

.buscador-input{
    border:2px solid var(--primary);
    border-left:none;
    border-radius:0 16px 16px 0;
    width: 100%;
}

.buscador-input:focus{
    box-shadow:0 0 12px rgba(200,16,46,.35);
    border-color:var(--primary);
}

.lista-busqueda{
    display:none;
    position:absolute;
    top:100%;
    left:0;
    width:100%;
    background:white;
    border-radius:16px;
    margin-top:8px;
    box-shadow:0 15px 35px rgba(0,0,0,.15);
    overflow:hidden;
    z-index:999;
    max-height:350px;
    overflow-y:auto;
}

.lista-item{
    padding:14px 18px;
    cursor:pointer;
    transition:.2s;
}

.lista-item:hover{
    background:var(--primary-soft);
}

/*=========================================================
7. GRID DEL MENÚ PRINCIPAL
=========================================================*/
.dashboard-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:24px;
}

/*=========================================================
8. GRID DE HOTELES
=========================================================*/
.hoteles-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
    gap:24px;
}

/*=========================================================
9. COMPORTAMIENTO INTELIGENTE DEL BOTÓN HOME
=========================================================*/
.logo-wrapper-v3 {
    position: relative; 
    display: flex;
    align-items: center;
    z-index: 5;
    margin-left: 0; 
}

.btn-home {
    position: absolute; 
    /* El botón se posiciona a la izquierda del logo aprovechando el aire blanco */
    left: -85px; 
    top: 50%;
    transform: translateY(-50%);
    
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-home:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-50%) scale(1.05); 
}

.btn-home i {
    font-size: 1.3rem;
}

/* El Header V3 de categorías */
.header-v3{
    position:relative;
    display:flex;
    justify-content:space-between;
    align-items:center;
    min-height:120px;
    width: 100%;
}

.header-v3 h1{
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    margin:0;
    color:var(--primary);
    font-size: 1.9rem;
    font-weight:700;
    white-space: nowrap; 
    text-align: center;
    z-index: 2;
}

.logo-header{
    height:100px; 
    width:auto;
    display: block;
}

.header-v3 .search-box{
    width:100%;
    max-width:360px; 
}

.btn-card-submit{
    width:100%;
    height:100%;
    border:none;
    padding:0;
    background:transparent;
    cursor:pointer;
}

/*=========================================================
10. FORMULARIOS COMO TARJETAS
=========================================================*/
.dashboard-grid form, .hoteles-grid form{
    height:100%;
}

.dashboard-grid form button{
    display:block;
    width:100%;
    height:100%;
    background:none;
    border:none;
    padding:0;
}

.dashboard-grid form button .categoria-card{
    height:100%;
} 

/*=========================================================
11. BOTONES INVISIBLES
=========================================================*/
.dashboard-grid form button, .hoteles-grid form button{
    all:unset;
    display:block;
    width:100%;
    height:100%;
    cursor:pointer;
}

/*=========================================================
12. WBE
=========================================================*/
.wbe-card{
    max-width:700px;
    margin:auto;
    background:white;
    border-radius:20px;
    padding:35px;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.wbe-title{
    text-align:center;
    color:var(--primary);
    margin-bottom:30px;
    font-weight:450;
}

.wbe-form label{
    font-weight:600;
    color:var(--text);
}

/*=========================================================
13. RESPONSIVE OPTIMIZADO PERFECTO
=========================================================*/

/* Si la pantalla se encoge y el espacio en blanco desaparece, 
   empujamos el logo para proteger al botón automáticamente */
@media (max-width: 1750px) and (min-width: 901px) {
    .logo-wrapper-v3 {
        padding-left: 70px;
    }
    .btn-home {
        left: 0;
    }
}

@media (max-width:1250px){
    .header-top .search-container,
    .header-v3 .search-box{
        max-width:240px;
    }

    .logo, .logo-header {
        height: 80px; 
    }

    .header h1,
    .header-v3 h1{
        font-size:1.6rem;
        font-weight: 700;
    }

    .buscador-input{
        font-size:.90rem;
    }

    .buscador-input::placeholder{
        font-size:.90rem;
    }
}


/* Tablets y Pantallas Medianas (hasta 900px) */
@media (max-width: 900px){
    .main{
        padding: 30px 24px;
    }

    .header .container-fluid {
        padding-left: 24px;
        padding-right: 24px;
    }

    .header {
        min-height: auto;
        padding: 18px 0;
    }

    .header-top, .header-v3 {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
        width: 100%;
    }

    .logo-container {
        padding-left: 0; 
    }

    .logo-wrapper-v3 {
        display: flex;
        align-items: center;
        gap: 12px; /* Espacio entre el botón y el logo */
        position: static; 
        order: 1;
    }

    /* EL BOTÓN HOME: Visible y estilizado para Tablet */
    .btn-home {
        display: inline-flex !important;
        position: static; 
        transform: none !important;
        width: 42px;
        height: 42px;
        flex-shrink: 0;
    }

    .logo, .logo-header {
        height: 80px; 
    }

    /* EL TEXTO EN TABLET: Tamaño imponente con espacio asegurado */
    .header h1, .header-v3 h1 {
        position: static;
        transform: none;
        font-size: clamp(1.35rem, 3.8vw, 1.9rem); 
        text-align: right;
        flex: 1;
        order: 2;
        margin-right: 0; 
        font-weight: 700;
        letter-spacing: -0.3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-top .search-container, .header-v3 .search-box {
        max-width: 100%;
        width: 100%;
        order: 3;
    }

    /* 🔍 BUSCADOR UN POQUITO MÁS GRANDE */
    .buscador-input {
        padding: 15px 22px; /* Subió 1px más de espacio para que la letra grande respire */
        font-size: 1.1rem;   /* Tamaño del texto al escribir */
    }

    /* 👈 AQUÍ SUBIÓ EL TEXTO DEL PLACEHOLDER (UN PILÍN MÁS GRANDE) */
    .buscador-input::placeholder {
        font-size: 1.1rem; /* Subió de 1rem a 1.1rem */
    }

    .buscador-icono {
        padding: 0 18px;    
        font-size: 1.2rem; /* La lupa creció un pelín para ir a la par del texto */
    }
}

/* Móviles (hasta 600px) */
@media (max-width: 600px){
    .header .container-fluid {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* AQUÍ SÍ LO OCULTAMOS SOLO EN CELULARES */
    .btn-home {
        display: none !important;
    }

    .logo-wrapper-v3 {
        cursor: pointer;
    }

    .logo, .logo-header {
        height: 60px; 
    }

    .header h1, .header-v3 h1 {
        font-size: clamp(1.15rem, 4.4vw, 1.45rem);
    }

    .search-box input {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .dashboard-grid, .hoteles-grid{
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .categoria-card{
        min-height: 120px;
    }
}

/* Contenedor de Páginas */
.page-container{
    padding-left:50px;
    padding-right:50px;
}

@media(max-width:992px){
    .page-container{
        padding-left:25px;
        padding-right:25px;
    }
}

@media(max-width:768px){
    .page-container{
        padding-left:15px;
        padding-right:15px;
    }
}