/* =========================================================
   MAPAUTT - PÁGINA DE BIENVENIDA
   DISEÑO PARA ESCRITORIO
   ========================================================= */


/* =========================================================
   VARIABLES
   ========================================================= */

:root {
    --color-map-bg: var(--color-institucional-verde-profundo);
    --color-admin-bg: var(--color-institucional-verde-oscuro);

    --color-text-light: #ffffff;
    --color-text-dark: var(--color-texto-principal);

    --transition-speed: 0.8s;
}


/* =========================================================
   RESET GENERAL
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    height: 100%;

    margin: 0;
    padding: 0;

    overflow: hidden;

    font-family: "Plus Jakarta Sans", Arial, sans-serif;
}

body.centered-layout {
    width: 100vw;
    height: 100vh;

    overflow: hidden;

    background-color: var(--color-fondo-principal);
}


/* =========================================================
   CONTENEDOR PRINCIPAL
   ========================================================= */

.welcome-page {
    width: 100vw;
    height: 100vh;

    position: relative;

    overflow: hidden;
}

.welcome-card {
    width: 100vw;
    height: 100vh;

    display: flex;

    position: relative;

    overflow: hidden;
}


/* =========================================================
   RELOJ / HORA DEL SERVIDOR
   ========================================================= */

.welcome-meta {
    position: fixed;

    top: 22px;
    right: 30px;

    z-index: 9999;

    background-color: #fdf5e6;

    color: var(--color-text-dark);

    padding: 9px 18px;

    border-radius: 25px;

    font-size: 0.85rem;

    font-weight: 700;

    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.15);

    white-space: nowrap;
}

.welcome-meta p {
    margin: 0;
}

.welcome-meta span:first-child {
    margin-right: 5px;
}


/* =========================================================
   LINK "SALTAR AL CONTENIDO"
   ========================================================= */

.skip-link {
    position: absolute;

    left: -9999px;
}


/* =========================================================
   SECCIONES
   ========================================================= */

.welcome-side {
    width: 50%;
    height: 100%;

    padding: 65px 45px 45px;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    position: relative;

    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-width: none;
}

.welcome-side::-webkit-scrollbar {
    display: none;
}


/* =========================================================
   SECCIÓN MAPA
   ========================================================= */

.map-side {
    background-color: var(--color-map-bg);

    color: var(--color-text-light);

    z-index: 2;
}


/* =========================================================
   SECCIÓN ADMINISTRACIÓN
   ========================================================= */

.admin-side {
    background-color: var(--color-admin-bg);

    color: var(--color-text-light);

    z-index: 1;
}


/* =========================================================
   CONTENIDO INTERNO
   ========================================================= */

.side-content {
    width: 100%;

    max-width: 500px;

    margin: 0 auto;

    position: relative;

    z-index: 3;
}


/* =========================================================
   TEXTO SUPERIOR
   ========================================================= */

.eyebrow {
    font-size: 0.72rem;

    text-transform: uppercase;

    letter-spacing: 1.5px;

    opacity: 0.82;

    margin-bottom: 12px;

    line-height: 1.3;
}


/* =========================================================
   MARCA MAPAUTT
   ========================================================= */

.brand-lockup {
    display: flex;

    align-items: center;

    gap: 10px;

    margin-bottom: 20px;

    font-size: 1.1rem;

    font-weight: 800;
}

.brand-mark {
    display: flex;

    align-items: center;

    justify-content: center;
}

.brand-mark svg {
    width: 28px;
    height: 28px;

    fill: none;

    stroke: #ffffff;

    stroke-width: 1.5;
}

.brand-name {
    letter-spacing: 0.5px;
}


/* =========================================================
   TÍTULOS
   ========================================================= */

h1,
h2 {
    font-size: 2.8rem;

    font-weight: 800;

    line-height: 1.08;

    margin-bottom: 14px;

    color: var(--color-text-light);
}

/* Forzar que los títulos dentro de la sección del mapa sean blancos */
.map-side h1,
.map-side h2 {
    color: var(--color-text-light) !important;
}

/* =========================================================
   SUBTÍTULO
   ========================================================= */

.subtitle {
    font-size: 1rem;

    line-height: 1.5;

    opacity: 0.9;

    margin-bottom: 25px;

    max-width: 500px;

    color: var(--color-text-light);
}


/* =========================================================
   BOTONES PRINCIPALES
   ========================================================= */

.welcome-action {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 18px;

    background-color: #ffffff;

    color: var(--color-text-dark);

    text-decoration: none;

    padding: 17px 21px;

    border-radius: 18px;

    margin-bottom: 20px;

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.15);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.welcome-action:hover {
    transform: translateY(-3px) scale(1.035);

    box-shadow:
        0 10px 24px rgba(14, 86, 76, 0.22),
        0 0 0 2px var(--color-institucional-naranja);
}


/* =========================================================
   ICONOS DE LOS BOTONES
   ========================================================= */

.action-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;
}

.action-icon svg {
    width: 34px;
    height: 34px;

    fill: none;

    stroke: var(--color-map-bg);

    stroke-width: 1.5;
}

.admin-action .action-icon svg {
    stroke: var(--color-admin-bg);
}


/* =========================================================
   TEXTO DEL BOTÓN
   ========================================================= */

.action-content {
    display: flex;

    flex-direction: column;

    flex-grow: 1;

    min-width: 0;
}

.action-content strong {
    font-size: 1.08rem;
}

.action-content small {
    font-size: 0.82rem;

    color: #666666;

    margin-top: 3px;
}


/* =========================================================
   FLECHA
   ========================================================= */

.action-arrow {
    font-size: 1.5rem;

    color: #999999;

    flex-shrink: 0;
}


/* =========================================================
   TARJETA DE INFORMACIÓN
   ========================================================= */

.section-extra {
    width: 100%;
}

.welcome-information {
    width: 100%;

    background:
        rgba(255, 255, 255, 0.96);

    padding: 20px;

    border-radius: 18px;

    color: var(--color-text-dark);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.08);
}

.welcome-information .eyebrow {
    color: #555555;

    margin-bottom: 6px;
}

.welcome-information h2 {
    font-size: 1.45rem;

    color: var(--color-text-dark);

    margin-bottom: 8px;
}

.section-description {
    font-size: 0.78rem;

    color: #555555;

    line-height: 1.45;

    margin-bottom: 15px;
}


/* =========================================================
   LISTA DE CARACTERÍSTICAS
   ========================================================= */

.features-list {
    list-style: none;

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;
}

.feature-item {
    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 0.78rem;

    background-color: #f1f4f6;

    padding: 9px 11px;

    border-radius: 10px;

    min-width: 0;
}

.feature-icon {
    color: var(--color-admin-bg);

    font-weight: 800;

    flex-shrink: 0;
}

.feature-text {
    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================================
   ZONA DE MASCOTA
   ========================================================= */

/* =========================================================
   ZONA DE MASCOTA GENERAL (Para administración y otros)
   ========================================================= */
.mascot-zone {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    pointer-events: none;
}

/* =========================================================
   SECCIÓN MAPA (Asegurar referencia para posición absoluta)
   ========================================================= */
.map-side {
    background-color: var(--color-map-bg);
    color: var(--color-text-light);
    z-index: 2;
    position: relative;
}

/* =========================================================
   SOLO LA MASCOTA DEL MAPA ARRIBA A LA DERECHA
   ========================================================= */
.map-side .mascot-zone {
    position: absolute;
    top: -80px;
    right: -80px;
    width: auto;
    margin-top: 0;
    justify-content: flex-end;
    z-index: 10;
}

.map-side .mascot-map {
    max-height: 30vh;
}

/* =========================================================
   MASCOTA DE ADMINISTRACIÓN (Corregida para que crezca)
   ========================================================= */
.mascot-admin {
    height: 46vh !important;       /* Fuerza la altura exacta deseada */
    max-height: 46vh !important;   /* Limita la altura máxima */
    max-width: none !important;    /* Evita que el contenedor la confine horizontalmente */
    width: auto !important;        /* Mantiene la proporción de la imagen */
}

.mascot-wrapper {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mascot-img {
    display: block;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.25));
}


/* =========================================================
   BOTONES PARA CAMBIAR DE SECCIÓN
   ========================================================= */

.section-switch {
    position: relative;

    display: flex;
    align-items: center;

    width: auto;
    min-width: 190px;
    max-width: 260px;

    margin-top: 18px;
    padding: 12px 18px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.14),
            rgba(255, 255, 255, 0.04)
        );

    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;

    color: #ffffff;

    cursor: pointer;

    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.4px;

    opacity: 0.9;

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);

    overflow: hidden;

    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.3s ease,
        background 0.35s ease,
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}


/* ---------------------------------------------------------
   EFECTO DE BRILLO
   --------------------------------------------------------- */

.section-switch::before {
    content: "";

    position: absolute;

    top: 0;
    left: -120%;

    width: 80%;
    height: 100%;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.18),
        transparent
    );

    transform: skewX(-20deg);

    transition: left 0.6s ease;

    pointer-events: none;
}


/* ---------------------------------------------------------
   HOVER
   --------------------------------------------------------- */

.section-switch:hover {
    opacity: 1;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.20),
            rgba(255, 255, 255, 0.07)
        );

    border-color: rgba(255, 255, 255, 0.42);

    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.25),
        0 0 18px rgba(255, 255, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.section-switch:hover::before {
    left: 130%;
}

.section-switch:hover::after {
    transform: scale(1.35);

    box-shadow:
        0 0 8px rgba(255, 255, 255, 1),
        0 0 18px rgba(255, 255, 255, 0.65);
}


/* =========================================================
   BOTÓN MAPA
   ========================================================= */

.map-switch {
    justify-content: flex-start;
    text-align: left;

    margin-left: auto;
}

.map-switch:hover {
    transform: translateX(-7px);
}


/* =========================================================
   BOTÓN ADMINISTRACIÓN
   ========================================================= */

.admin-switch {
    justify-content: flex-end;
    text-align: right;

    margin-right: auto;
}

.admin-switch:hover {
    transform: translateX(7px);
}


/* =========================================================
   ESTADO ACTIVO
   ========================================================= */

.section-switch.active {
    opacity: 1;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.22),
            rgba(255, 255, 255, 0.08)
        );

    border-color: rgba(255, 255, 255, 0.5);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.22),
        0 0 20px rgba(255, 255, 255, 0.1);
}


/* =========================================================
   EFECTO AL PRESIONAR
   ========================================================= */

.section-switch:active {
    transform: scale(0.96);
}

.map-switch:active {
    transform: translateX(-3px) scale(0.96);
}

.admin-switch:active {
    transform: translateX(3px) scale(0.96);
}


/* =========================================================
   CORTINA DE TRANSICIÓN
   ========================================================= */

.page-transition {
    position: absolute;

    top: 0;
    left: 50%;

    width: 50%;
    height: 100%;

    z-index: 20;

    overflow: hidden;

    border-radius: 0;

    transition:
        transform var(--transition-speed)
        ease-in-out;
}


/* =========================================================
   FONDOS DE LA CORTINA
   ========================================================= */

.page-transition-front,
.page-transition-back {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    transition:
        opacity var(--transition-speed)
        ease-in-out;
}

.page-transition-front {
    background-color:
        var(--color-admin-bg);

    opacity: 1;
}

.page-transition-back {
    background-color:
        var(--color-map-bg);

    opacity: 0;
}


/* =========================================================
   MASCOTA QUE ACOMPAÑA LA TRANSICIÓN
   ========================================================= */

.mascot-transition-layer {
    position: absolute;

    top: 50%;
    left: 75%;

    width: 25vw;

    transform:
        translate(-50%, -50%);

    z-index: 30;

    display: flex;

    align-items: center;

    justify-content: center;

    pointer-events: none;

    transition:
        left var(--transition-speed)
        ease-in-out;
}

.mascot-transition {
    width: auto;

    max-width: 24vw;

    max-height: 55vh;

    object-fit: contain;

    filter:
        drop-shadow(
            0 15px 20px rgba(0, 0, 0, 0.3)
        );
}


/* =========================================================
   ESTADO: MAPA
   ========================================================= */

.welcome-card.map-expanded
.page-transition {

    transform:
        translateX(0);

    border-radius: 0;
}

.welcome-card.map-expanded
.page-transition-front {
    opacity: 1;
}

.welcome-card.map-expanded
.page-transition-back {
    opacity: 0;
}

.welcome-card.map-expanded
.mascot-transition-layer {
    left: 75%;
}


/* =========================================================
   ESTADO: ADMINISTRACIÓN
   ========================================================= */

.welcome-card.admin-expanded
.page-transition {

    transform:
        translateX(-100%);

    border-radius: 0;
}

.welcome-card.admin-expanded
.page-transition-front {
    opacity: 0;
}

.welcome-card.admin-expanded
.page-transition-back {
    opacity: 1;
}

.welcome-card.admin-expanded
.mascot-transition-layer {
    left: 25%;
}


/* =========================================================
   FOOTER
   ========================================================= */

.welcome-footer {
    position: fixed;

    bottom: 8px;

    left: 50%;

    transform:
        translateX(-50%);

    z-index: 9999;

    color:
        rgba(255, 255, 255, 0.7);

    font-size: 0.68rem;

    text-align: center;

    white-space: nowrap;

    pointer-events: none;
}


/* =========================================================
   LAPTOP
   ========================================================= */

@media (max-width: 1200px) {

    .welcome-side {
        padding:
            60px 35px 35px;
    }

    .side-content {
        max-width: 460px;
    }

    h1,
    h2 {
        font-size: 2.45rem;
    }

    .mascot-map,
    .mascot-admin {
        max-height: 15vh;
    }
}


/* =========================================================
   LAPTOP PEQUEÑA
   ========================================================= */

@media (max-width: 1000px) {

    .welcome-side {
        padding:
            55px 28px 30px;
    }

    h1,
    h2 {
        font-size: 2.15rem;
    }

    .subtitle {
        font-size: 0.88rem;
    }

    .welcome-action {
        padding:
            13px 16px;
    }

    .welcome-information {
        padding: 14px;
    }

    .mascot-map,
    .mascot-admin {
        max-height: 12vh;
    }

    .mascot-transition {
        max-height: 45vh;
    }
}


/* =========================================================
   PANTALLAS CON POCA ALTURA
   ========================================================= */

@media (max-height: 800px) {

    .welcome-side {
        padding-top: 50px;
        padding-bottom: 20px;
    }

    .brand-lockup {
        margin-bottom: 12px;
    }

    h1,
    h2 {
        margin-bottom: 8px;
    }

    .subtitle {
        margin-bottom: 12px;
    }

    .welcome-action {
        padding:
            11px 14px;

        margin-bottom: 10px;
    }

    .welcome-information {
        padding: 12px;
    }

    .mascot-map,
    .mascot-admin {
        max-height: 9vh;
    }
}






























/* =========================================================
   ESTILOS Y AJUSTES MÓVILES (CELULARES) UNIFICADOS
   ========================================================= */
@media (max-width: 768px) {

    /* Permitir scroll vertical en la página */
    html,
    body {
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .welcome-page,
    .welcome-card {
        width: 100%;
        height: auto;
        min-height: 100vh;
        flex-direction: column;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .welcome-side {
        width: 100%;
        height: auto;
        min-height: 100vh;
        padding: 50px 20px 40px;
    }

    .page-transition,
    .mascot-transition-layer {
        display: none !important;
    }

    /* Mascotas en móvil */
    .map-side .mascot-zone {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        margin-top: 30px;
        justify-content: center !important;
    }

    .map-side .mascot-map {
        max-height: 22vh !important;
    }

    .admin-side .mascot-zone {
        margin-top: 30px;
        justify-content: center !important;
    }

    .mascot-admin {
        height: 25vh !important;
        max-height: 25vh !important;
    }

    .welcome-footer {
        position: relative;
        transform: none;
        left: auto;
        bottom: auto;
        margin: 20px 0;
        color: #333333;
    }

    /* Ocultar botones de cambio de sección */
    .section-switch {
        display: none !important;
    }

    /* ---------------------------------------------------------
       BURBUJA DE HORA INTERACTIVA (CORREGIDA)
       --------------------------------------------------------- */
    .welcome-meta {
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
        box-sizing: border-box;
    }

    /* Estado compacto: burbuja redonda centrada perfectamente */
    .welcome-meta.bubble-collapsed {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px;
        padding: 0 !important;
        border-radius: 50% !important;
        overflow: hidden;
        text-align: center;
    }

    .welcome-meta.bubble-collapsed p {
        font-size: 0 !important;
        display: none;
    }
    
    .welcome-meta.bubble-collapsed::before {
        content: "⏰";
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        margin: 0;
    }

    /* Estado expandido al tocarla */
    .welcome-meta.expanded {
        width: auto !important;
        height: auto !important;
        padding: 9px 18px !important;
        border-radius: 25px !important;
    }

    .welcome-meta.expanded p {
        font-size: 0.85rem !important;
        display: block !important;
    }

    .welcome-meta.expanded::before {
        content: none !important;
    }
}










/* =========================================================
   CORREGIR COLOR DEL TÍTULO EN LA TARJETA BLANCA
   ========================================================= */
.welcome-information h2 {
    color: var(--color-text-dark) !important;
}






















/* =========================================================
   ESTILOS PARA TABLETAS (769px a 1024px)
   ========================================================= */
@media (min-width: 769px) and (max-width: 1024px) {

    /* Reducir ligeramente los márgenes internos de los lados */
    .welcome-side {
        padding: 45px 30px 30px;
    }

    /* Ajustar el ancho máximo del contenido interno */
    .side-content {
        max-width: 400px;
    }

    /* Reducir tamaño de títulos para que no se desborden */
    h1,
    h2 {
        font-size: 2.2rem !important;
    }

    /* Ajustar subtítulos */
    .subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    /* ---------------------------------------------------------
       AJUSTES DE MASCOTAS PARA TABLETAS
       --------------------------------------------------------- */

    /* Mascota del mapa (ubicada arriba a la derecha en la sección azul) */
    .map-side .mascot-zone {
        top: -60px;
        right: -60px;
    }

    .map-side .mascot-map {
        max-height: 24vh !important;
    }

    /* Mascota de administración */
    .mascot-admin {
        height: 34vh !important;
        max-height: 34vh !important;
    }

    /* ---------------------------------------------------------
       RELOJ / HORA DEL SERVIDOR EN TABLETAS
       --------------------------------------------------------- */
    .welcome-meta {
        top: 18px;
        right: 20px;
        padding: 8px 14px;
        font-size: 0.8rem;
    }
}






















/* =========================================================
   ESTILOS PARA TABLETAS MÁS GRANDES (1025px a 1200px)
   ========================================================= */
@media (min-width: 1025px) and (max-width: 1200px) {

    /* Espaciado interno equilibrado para pantallas táctiles amplias */
    .welcome-side {
        padding: 55px 38px 35px;
    }

    /* Ancho del contenido adaptado */
    .side-content {
        max-width: 440px;
    }

    /* Títulos con escala intermedia */
    h1,
    h2 {
        font-size: 2.5rem !important;
    }

    /* Subtítulo legible */
    .subtitle {
        font-size: 0.95rem;
        margin-bottom: 22px;
    }

    /* ---------------------------------------------------------
       AJUSTES DE MASCOTAS PARA TABLETAS GRANDES
       --------------------------------------------------------- */

    /* Mascota flotante del mapa */
    .map-side .mascot-zone {
        top: -75px;
        right: -75px;
    }

    .map-side .mascot-map {
        max-height: 27vh !important;
    }

    /* Mascota de administración */
    .mascot-admin {
        height: 38vh !important;
        max-height: 38vh !important;
    }
}





































































/* =========================================================
   BORDE FOSFORESCENTE Y PALPITACIÓN
   PARA LOS BOTONES PRINCIPALES
   ========================================================= */

.welcome-action {
    position: relative;
    isolation: isolate;

    border: 2px solid var(--color-institucional-naranja);

    box-shadow:
        0 0 5px rgba(238, 112, 48, 0.22),
        0 0 10px rgba(238, 112, 48, 0.12);

    animation: palpitar-boton 1.8s infinite ease-in-out;
}

/* =========================================================
   ANIMACIÓN DE PALPITACIÓN TIPO CORAZÓN
   ========================================================= */

@keyframes palpitar-boton {

    0%,
    100% {
        transform: scale(1);

        box-shadow:
            0 0 5px rgba(238, 112, 48, 0.22),
            0 0 10px rgba(238, 112, 48, 0.12);
    }

    10% {
        transform: scale(1.015);

        box-shadow:
            0 0 8px rgba(238, 112, 48, 0.28),
            0 0 16px rgba(238, 112, 48, 0.16);
    }

    20% {
        transform: scale(1);

        box-shadow:
            0 0 5px rgba(238, 112, 48, 0.22),
            0 0 10px rgba(238, 112, 48, 0.12);
    }

    30% {
        transform: scale(1.01);

        box-shadow:
            0 0 7px rgba(238, 112, 48, 0.25),
            0 0 14px rgba(238, 112, 48, 0.14);
    }

    45% {
        transform: scale(1);
    }
}


/* =========================================================
   AL PASAR EL CURSOR
   ========================================================= */

.welcome-action:hover {
    box-shadow:
        0 10px 24px rgba(14, 86, 76, 0.22),
        0 0 0 2px var(--color-institucional-naranja);
}


/* =========================================================
   AL PRESIONAR
   ========================================================= */

.welcome-action:active {
    transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
    .welcome-action {
        animation: none;
    }
}
