/* =========================================
   PALETA DE COLORES - COMFACAUCA
   ========================================= */
:root {
    --primary-blue: #1e3a8a;
    --primary-blue-dark: #172554;
    --primary-blue-light: #eff6ff;
    --secondary-blue: #334155;
    --secondary-blue-dark: #1e293b;
    --secondary-blue-light: #f8fafc;
    
    --accent-yellow: #d4af37;
    --accent-yellow-light: #fefce8;
    --accent-yellow-border: #d4af37;
    --accent-yellow-text: #713f12;
    
    --text-dark: #0f172a;
    --text-light: #64748b;
    --white: #ffffff;
    
    --header-height: 84px;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

/* =========================================
   LAYOUT FULLSCREEN (CERO SCROLL EN DESKTOP)
   ========================================= */
html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden; /* Cero barras de scroll */
}

body {
    font-family: 'Calibri', 'Segoe UI', 'Roboto', Helvetica, Arial, sans-serif;
    background-color: #f5f7fa;
    color: var(--text-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

/* =========================================
   LOADER OVERLAY
   ========================================= */
#loader-overlay {
    position: fixed; 
    inset: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    display: flex; 
    justify-content: center; 
    align-items: center;
    z-index: 9999; 
    transition: opacity 0.4s ease;
}
.loader-box {
    text-align: center; 
    width: 320px; 
    padding: 35px 25px;
    background: white; 
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(30, 58, 138, 0.15);
    border: 1px solid var(--primary-blue-light);
    animation: loaderPulse 2s ease-in-out infinite;
}
@keyframes loaderPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}
.loader-title {
    font-size: 1.05rem; 
    font-weight: 700; 
    margin-bottom: 20px;
    color: var(--primary-blue); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px;
}
.loader-title i { font-size: 1.15rem; color: var(--accent-yellow); }
.progress-bar-container {
    width: 100%; 
    height: 7px; 
    background: var(--primary-blue-light);
    border-radius: 50px; 
    overflow: hidden;
}
.progress-bar {
    height: 100%; 
    width: 0%; 
    border-radius: 50px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-yellow));
    animation: loading 2s ease-in-out infinite;
}
.loader-text { margin-top: 16px; font-size: 0.85rem; color: var(--text-light); font-style: italic; }
@keyframes loading { 0% { width: 0%; } 50% { width: 85%; } 100% { width: 0%; } }

/* =========================================
   HEADER PROFESIONAL
   ========================================= */
.top-bar-modern {
    flex: 0 0 auto;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--white);
    padding: 0 25px;
    border-bottom: 1px solid rgba(30, 58, 138, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: relative;
    z-index: 100;
    animation: slideDownHeader 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideDownHeader {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.top-bar-modern::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-blue) 0%, var(--accent-yellow) 100%);
    z-index: 101;
}

/* =========================================
   LOGO COMFACAUCA - EFECTO CORPORATIVO EJECUTIVO
   ========================================= */
.logo-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 4px 10px;
    border-radius: 12px;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.logo-corporate-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 4px 8px;
    border-radius: 8px;
}

/* Logo prominente */
.comfacauca-logo {
    height: 100px;
    width: auto;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
    filter: drop-shadow(0 2px 5px rgba(30, 58, 138, 0.12));
    animation: logoCorporateEntrance 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}
@keyframes logoCorporateEntrance {
    from {
        opacity: 0;
        transform: translateX(-16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Destello de luz refinado y ejecutivo (Sheen Ray) */
.corporate-sheen-ray {
    position: absolute;
    top: 0;
    left: -130%;
    width: 60%;
    height: 100%;
    background: linear-gradient(
        105deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 40%,
        rgba(255, 255, 255, 0.85) 50%,
        rgba(212, 175, 55, 0.35) 60%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    pointer-events: none;
    z-index: 5;
    opacity: 0;
}
.corporate-sheen-ray.active-sheen {
    animation: corporateSheenSweep 1.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes corporateSheenSweep {
    0% {
        left: -130%;
        opacity: 0;
    }
    30% {
        opacity: 0.8;
    }
    100% {
        left: 160%;
        opacity: 0;
    }
}

.logo-container:hover .comfacauca-logo {
    transform: translateY(-2px) scale(1.02);
    filter: drop-shadow(0 6px 14px rgba(30, 58, 138, 0.22));
}
.logo-container:active .comfacauca-logo {
    transform: translateY(0) scale(0.99);
}

/* =========================================
   NAVEGACIÓN DEL PAGINADOR
   ========================================= */
.top-bar-right {
    display: flex;
    align-items: center;
    margin-left: auto;
    animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
@keyframes slideInRight {
    from { transform: translateX(30px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.paginator-nav {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--secondary-blue-light);
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid rgba(30, 58, 138, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.paginator-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border: none;
    background: var(--primary-blue);
    color: var(--white);
    font-size: 0.82rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}
.paginator-btn::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}
.paginator-btn:hover::before {
    width: 250px; height: 250px;
}
.paginator-btn:hover:not(:disabled) {
    background: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 16px rgba(30, 58, 138, 0.35);
}
.paginator-btn:active:not(:disabled) {
    transform: translateY(0);
}
.paginator-btn:disabled {
    background: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.fullscreen-btn {
    padding: 8px 12px;
    background: rgba(30, 58, 138, 0.08);
    color: var(--primary-blue);
    border: 1px solid rgba(30, 58, 138, 0.12);
}
.fullscreen-btn:hover:not(:disabled) {
    background: var(--primary-blue);
    color: var(--white);
}

.paginator-center-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 120px;
}

.paginator-counter {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-blue);
    letter-spacing: 0.5px;
}

.paginator-page-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
    white-space: nowrap;
}

/* =========================================
   CONTENEDOR DE SLIDES (PANTALLA COMPLETA EXACTA)
   ========================================= */
#slides-root {
    flex: 1 1 auto;
    height: calc(100vh - var(--header-height));
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.slides-wrapper.transitioning {
    pointer-events: none;
}

.page-slide {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.page-slide.active {
    display: flex;
}
.page-slide.slide-visible {
    opacity: 1;
    transform: translateX(0);
    animation: slideEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideEnter {
    from { 
        opacity: 0; 
        transform: translateX(40px) scale(0.98);
        filter: blur(6px);
    }
    to { 
        opacity: 1; 
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

/* =========================================
   BANNER DE PRESENTACIÓN (AJUSTE EXACTO SIN CORTES)
   ========================================= */
.presentation-banner {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Marco responsivo que adopta el tamaño exacto de la imagen sin recortar */
.presentation-banner-frame {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - var(--header-height) - 20px);
    border-radius: 14px;
    box-shadow: 0 16px 45px rgba(30, 58, 138, 0.16), 
                0 4px 15px rgba(0, 0, 0, 0.06),
                0 0 0 1px rgba(30, 58, 138, 0.06);
    overflow: hidden;
    background: #ffffff;
    opacity: 0;
    transform: perspective(1000px) rotateX(4deg) scale(0.98);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.presentation-banner-frame.frame-loaded {
    opacity: 1;
    transform: perspective(1000px) rotateX(0deg) scale(1);
}

/* =========================================
   SLIDE INTERACTIVO CON VIDEO
   ========================================= */
.presentation-banner-frame.video-slide-interactive {
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}
.presentation-banner-frame.video-slide-interactive:hover {
    transform: translateY(-4px) scale(1.008);
    box-shadow: 0 24px 60px rgba(30, 58, 138, 0.28), 
                0 6px 20px rgba(0, 0, 0, 0.08),
                0 0 0 2px var(--accent-yellow);
}

/* Insignia ejecutiva flotante para reproducir video */
.video-play-indicator {
    position: absolute;
    bottom: 24px;
    right: 28px;
    background: linear-gradient(135deg, var(--primary-blue-dark), var(--primary-blue));
    color: var(--white);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 8px 24px rgba(30, 58, 138, 0.4);
    border: 1px solid rgba(212, 175, 55, 0.8);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 15;
    pointer-events: none;
}
.video-play-icon-box {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-yellow);
    color: var(--primary-blue-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    padding-left: 2px;
}
.presentation-banner-frame.video-slide-interactive:hover .video-play-indicator {
    transform: translateY(-3px) scale(1.06);
    background: linear-gradient(135deg, #0b1a42, var(--primary-blue));
    box-shadow: 0 12px 30px rgba(30, 58, 138, 0.55);
}

/* Wrapper de imagen */
.image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 14px;
    opacity: 0;
    transition: opacity 0.8s ease;
}
.image-wrapper.image-revealed {
    opacity: 1;
}

/* IMAGEN DEL SLIDE: object-fit: contain para mostrar 100% sin cortes */
.presentation-banner-img {
    display: block;
    max-width: calc(100vw - 48px);
    max-height: calc(100vh - var(--header-height) - 20px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 14px;
    opacity: 0;
    filter: blur(6px);
    transition: filter 0.8s ease, opacity 0.6s ease;
}
.presentation-banner-img.img-loaded {
    opacity: 1;
    filter: blur(0);
}

/* Máscaras de revelado */
.reveal-mask {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    background: var(--white);
    z-index: 10;
    transition: transform 0.9s cubic-bezier(0.77, 0, 0.175, 1) 0.2s;
}
.reveal-mask-top {
    top: 0;
    transform-origin: top;
    border-radius: 14px 14px 0 0;
}
.reveal-mask-bottom {
    bottom: 0;
    transform-origin: bottom;
    border-radius: 0 0 14px 14px;
}
.reveal-mask.mask-revealed {
    transform: scaleY(0);
}

/* Destello de brillo */
.shine-overlay {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0) 20%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0.8) 80%, 
        transparent 100%
    );
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    border-radius: 14px;
}
.shine-overlay.shine-visible {
    animation: shineSweep 1.6s ease-out 0.8s;
}
@keyframes shineSweep {
    0% { left: -100%; opacity: 0; }
    50% { opacity: 0.45; }
    100% { left: 100%; opacity: 0; }
}

/* =========================================
   CONTENIDO DE TEXTO EN EL BANNER
   ========================================= */
.banner-content-wrapper {
    position: absolute;
    bottom: clamp(16px, 3vh, 32px);
    left: clamp(16px, 3vw, 36px);
    right: clamp(16px, 3vw, 36px);
    z-index: 20;
    pointer-events: none;
}

.banner-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--white);
    font-size: clamp(1.1rem, 1.8vw, 1.7rem);
    font-weight: 800;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(18px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.5s;
}
.banner-title i {
    font-size: clamp(1.2rem, 2vw, 1.9rem);
    color: var(--accent-yellow);
}

.banner-subtitle {
    color: var(--white);
    font-size: clamp(0.85rem, 1.1vw, 1.1rem);
    font-weight: 500;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    margin-top: 5px;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.7s;
}

.banner-content-wrapper .content-visible {
    opacity: 1;
    transform: translateY(0);
}
.banner-content-wrapper .delay-1 {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   MODAL DE VIDEO PROFESIONAL
   ========================================= */
.video-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: fadeInModal 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

.video-modal-window {
    position: relative;
    width: 92%;
    max-width: 1060px;
    background: #0f172a;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 
                0 0 0 1px rgba(255, 255, 255, 0.12);
    display: flex;
    flex-direction: column;
    animation: zoomInModal 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes zoomInModal {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Estado Maximizado del Modal */
.video-modal-window.modal-maximized {
    width: 98vw;
    max-width: 98vw;
    height: 96vh;
    max-height: 96vh;
    border-radius: 12px;
}

/* Cabecera del Modal */
.video-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: #172554;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.video-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
    letter-spacing: 0.3px;
}
.video-modal-title i {
    color: var(--accent-yellow);
    font-size: 1.15rem;
}

.video-modal-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.video-modal-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
}
.video-modal-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.08);
}
.video-modal-btn.close-btn:hover {
    background: #ef4444;
    color: var(--white);
}

/* Cuerpo y reproductor de video */
.video-modal-body {
    position: relative;
    width: 100%;
    flex: 1;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.professional-video-player {
    width: 100%;
    height: 100%;
    max-height: 75vh;
    object-fit: contain;
    outline: none;
    background: #000000;
}
.video-modal-window.modal-maximized .professional-video-player {
    max-height: calc(96vh - 65px);
}

/* =========================================
   MEDIA QUERIES (RESPONSIVE MÓVILES Y TABLETS)
   ========================================= */
@media (max-width: 900px) {
    :root {
        --header-height: auto;
    }
    html, body {
        overflow-y: auto; /* Permite scroll natural en dispositivos móviles */
    }
    .top-bar-modern {
        flex-direction: column;
        gap: 12px;
        padding: 12px 20px;
        height: auto;
    }
    #slides-root {
        height: auto;
        min-height: calc(100vh - 120px);
    }
    .paginator-nav {
        width: 100%;
        justify-content: space-between;
    }
    .presentation-banner {
        padding: 10px 12px;
    }
    .presentation-banner-frame,
    .presentation-banner-img {
        max-width: 100%;
        max-height: none;
    }
    .video-modal-backdrop {
        padding: 10px;
    }
    .video-modal-title {
        font-size: 0.8rem;
    }
    .video-play-indicator {
        bottom: 15px;
        right: 15px;
        padding: 8px 14px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .paginator-btn span {
        display: none;
    }
    .paginator-page-title {
        max-width: 110px;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .comfacauca-logo {
        height: 52px;
    }
}