/* ============================
        * VARIABLES INSTITUCIONALES
        * ============================ */
:root {
    --primary: #005470;
    --secondary: #4cc2e1;
    --white: #ffffff;
    --green: #abad25;
    --lead: #999e9e;
    --font-main:
        "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --white-light: #f8f9fa;
}

body {
    font-family: var(--font-main);
}

/* ============================
     * UTILIDADES
     * ============================ */
.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

.bg-green {
    background: var(--green);
}

.bg-primary {
    background: var(--primary) !important;
}

/* Estilos base para todos los botones */
.btn {
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition:
        background 0.3s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
    width: 100%;
    /* Full width por defecto */
}

/* Efecto brillo con ::before */
.btn::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0.15),
        rgba(255, 255, 255, 0)
    );

    transform: rotate(45deg) scale(0);
    transition: transform 0.5s ease;
    pointer-events: none;
}

.btn:hover::before {
    transform: rotate(45deg) scale(1);
}

.btn:active {
    transform: translateY(0px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

/* ------------------- Colores específicos ------------------- */

/* PRIMARY */
.btn-primary {
    background-color: #005470;
}

.btn-primary:hover {
    background-color: #00738a;
    /* Más claro al hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* SUCCESS */
.btn-success {
    background-color: #abad25;
}

.btn-success:hover {
    background-color: #c3c933;
    /* Más claro al hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* INFO */
.btn-info {
    background-color: #4cc2e1;
}

.btn-info:hover {
    background-color: #6cd5eb;
    /* Más claro al hover */
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.text-sencodary {
    color: #6cd5eb !important;
}

/* ============================
     * HEADER INSTITUCIONAL
     * ============================ */
.header-institucional {
    position: relative;
    height: 160px;
    background: #005470;
    background: linear-gradient(
        90deg,
        rgba(0, 84, 112, 1) 0%,
        rgba(0, 0, 0, 1) 100%
    );
    overflow: hidden;
}

.bg-cal-header {
    background: #005470;
    background: linear-gradient(
        90deg,
        rgba(0, 84, 112, 1) 49%,
        rgba(76, 194, 225, 1) 100%
    );
    color: #fff !important;
}

.text-white {
    color: var(--white);
}

.bg-esquema {
    background: linear-gradient(
        90deg,
        rgba(0, 84, 112, 1) 0%,
        rgba(76, 194, 225, 1) 100%
    );
    padding: 17px 10px;
    color: white !important;
    background: linear-gradient(
        90deg,
        rgba(0, 84, 112, 1) 0%,
        rgba(76, 194, 225, 1) 100%
    );
}

.icono-calendario {
    width: 40px;
    height: 40px;
    display: inline-block;
    border-radius: 50%;
}

.icono-click {
    cursor: pointer;
    opacity: 1;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.icono-click:hover {
    transform: scale(1.1);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
}

/* ============================
     * PARTÍCULAS
     * ============================ */
#particles-js {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.35;
}

/* ============================
     * CONTENIDO SOBRE PARTÍCULAS
     * ============================ */
.header-institucional .container {
    position: relative;
    z-index: 2;
    height: 100%;
}

/* ============================
     * LOGOS
     * ============================ */
.header-logo img {
    height: 56px;
    max-width: 180px;
    object-fit: contain;
}

.footer-logo img {
    height: 100%;
    max-width: 200px;
    object-fit: contain;
}

/* ============================
     * TÍTULO CENTRAL REAL
     * ============================ */
.header-title-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.header-title {
    color: var(--white);
    font-weight: 700;
    font-size: 36px;
    letter-spacing: 0.6px;
    margin: 0;
    white-space: nowrap;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* ============================
     * CURVA INFERIOR
     * ============================ */
.header-curve {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 42px;
    background: var(--white-light);
    border-top-left-radius: 100% 120%;
    border-top-right-radius: 100% 120%;
    z-index: 3;
}

/* ============================
     * RESPONSIVE
     * ============================ */
@media (max-width: 768px) {
    .header-institucional {
        height: 140px;
    }

    .header-title {
        font-size: 22px;
    }

    .header-logo img {
        height: 44px;
    }

    .footer-logo img {
        height: 60px;
    }
}

.radial-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;

    /* background: radial-gradient(circle,
                     var(--secondary) 0%,
                     var(--primary) 60%,
                     var(--primary) 100%); */

    background-color: var(--primary);

    opacity: 0;
}

/* EXPANSIÓN */
@keyframes radialExpand {
    0% {
        width: 12px;
        height: 12px;
        opacity: 1;
    }

    100% {
        width: 320vw;
        height: 320vw;
        opacity: 1;
    }
}

/* CONTRACCIÓN */
@keyframes radialContract {
    0% {
        width: 320vw;
        height: 320vw;
        opacity: 1;
    }

    60% {
        width: 80vw;
        height: 80vw;
        opacity: 1;
    }

    85% {
        width: 20vw;
        height: 20vw;
        opacity: 0.9;
    }

    95% {
        width: 10vw;
        height: 10vw;
        opacity: 0.6;
    }

    100% {
        width: 0;
        height: 0;
        opacity: 0;
    }
}

.radial-expand {
    animation: radialExpand 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.radial-contract {
    animation: radialContract 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/*Calendario*/
.calendario-scroll {
    width: 100%;
    overflow-x: auto;
}

#calendario-header,
#calendario-body {
    min-width: max-content;
}

.border-nota {
    border: 1px solid var(--lead);
    padding: 10px 5px;
    border-radius: 20px;
}

/* Overlay del modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

/* Estado visible */
.modal-visible {
    opacity: 1;
    pointer-events: auto;
}

/* Estado oculto */
.modal-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Contenido del modal */
.modal-contenido {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    padding: 20px;
    max-width: 600px;
    width: 90%;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    position: relative;
}

/* Animación de entrada con rebote */
@keyframes modal-bounce-in {
    0% {
        transform: scale(0.5) translateY(-50px);
        opacity: 0;
    }

    60% {
        transform: scale(1.05) translateY(10px);
        opacity: 1;
    }

    80% {
        transform: scale(0.95) translateY(-5px);
    }

    100% {
        transform: scale(1) translateY(0);
    }
}

/* Aplicar animación cuando la clase .modal-visible se agrega */
.modal-overlay.modal-visible .modal-contenido {
    animation: modal-bounce-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Botón de cierre */
.modal-cerrar {
    position: absolute;
    top: -20px;
    right: -15px;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 50%;
    background-color: #ff4d4d;
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        color 0.2s ease;
    z-index: 1001;
}

.modal-cerrar:hover {
    transform: scale(1.1);
}

.modal-cerrar:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.5);
}

/*INTRO*/
/* ===============================
   OVERLAY
   =============================== */
.introjs-overlay {
    background: rgba(0, 0, 0, 0.65);
}

/* ===============================
   TOOLTIP
   =============================== */
.introjs-tooltip {
    background: #ffffff;
    color: #333;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    max-width: 360px;
    animation: introFadeIn 0.35s ease;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
}

/* Título */
.introjs-tooltip h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #005470;
}

/* Texto */
.introjs-tooltip p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #555;
}

/* ===============================
   FLECHA
   =============================== */
.introjs-arrow {
    border-color: #ffffff;
}

/* ===============================
   CONTENEDOR DE BOTONES
   =============================== */
.introjs-tooltipbuttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

/* ===============================
   BOTÓN SALTAR
   =============================== */
.introjs-skipbutton {
    background: transparent;
    border: none;
    color: #6c757d;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 8px;
    transition:
        color 0.2s ease,
        transform 0.2s ease;
}

.introjs-skipbutton:hover {
    color: #dc3545;
    transform: translateY(-1px);
}

.introjs-skipbutton:focus {
    outline: none;
}

/* ===============================
   BOTONES SIGUIENTE / ATRÁS / DONE
   =============================== */
.introjs-button {
    background-color: #005470;
    border: none;
    color: #fff;
    padding: 7px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition:
        background-color 0.25s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

/* Hover */
.introjs-button:hover {
    background-color: #00708f;
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 84, 112, 0.35);
}

/* Botón ATRÁS */
.introjs-prevbutton {
    background-color: #e9ecef;
    color: #495057;
}

.introjs-prevbutton:hover {
    background-color: #dee2e6;
    box-shadow: none;
}

/* ===============================
   BOTÓN DONE (FINALIZAR)
   =============================== */
.introjs-donebutton {
    background-color: #abad25;
}

.anim-hover:hover {
    animation: shakeY 2s;
    animation-iteration-count: 3;
}

.calendar-row {
    position: relative;
}

.calendar-row::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: var(--secondary);
    transition: width 0.2s ease;
}

.calendar-row:hover::before {
    width: 4px;
}

.calendario-nombre {
    color: #212529;
    /* gris azulado sobrio */
    font-weight: 500;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.calendar-row:hover .calendario-nombre {
    color: var(--secondary);
}

.calendar-row:hover .icono-calendario {
    box-shadow: 0 0 0 6px rgba(13, 110, 253, 0.15);
}

/* ===== OVERLAY FULL SCREEN ===== */
#overlay-loader {
    position: fixed;
    inset: 0;
    background: #005470;
    /* azul institucional */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    overflow: hidden;
    transition: opacity 0.4s ease;
}

/* Partículas ocupan toda la pantalla */
#particles-js-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;

    inset: 0;
    /* ocupa todo el overlay */
}

/* Contenido centrado */
.loader-content {
    position: relative;
    z-index: 2;
}

/* Logo */
.logo {
    width: 160px;
    z-index: 2;
}

.circle {
    width: 200px;
    height: 200px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.2);
}

/* Spinner más cercano al borde */
.spinner {
    position: absolute;
    width: 210px;
    /* casi el tamaño del círculo */
    height: 210px;
    border-radius: 50%;
    border: 6px solid transparent;
    border-top: 6px solid #005470;
    border-right: 6px solid #4ac0df;
    animation:
        spin 1.2s linear infinite,
        colorChange 5s linear infinite;
}

/* Rotación */
@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

/* Cambio de color cada vuelta */
@keyframes colorChange {
    0% {
        border-top-color: #aaac1f;
        border-right-color: #4ac0df;
    }

    33% {
        border-top-color: #4ac0df;
        border-right-color: #aaac1f;
    }

    66% {
        border-top-color: #4ac0df;
        border-right-color: #aaac1f;
    }

    100% {
        border-top-color: #aaac1f;
        border-right-color: #4ac0df;
    }
}
