/* 
 * CSS Exclusivo I Congreso IA Clini 
 * Este archivo se carga DESPUÉS del CSS global de IA Clini para heredar variables y pisar estructurales.
 */

:root {
    --event-accent: #f59e0b; /* Dorado para destacados */
    --spot-x: 50%;
    --spot-y: 45%;
}

body {
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.home-congreso {
    position: relative;
    overflow-x: hidden;
}

body.home-congreso.story-snap-enabled {
    scroll-behavior: smooth;
}

body.home-congreso.story-snap-enabled .story-step {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    min-height: calc(100svh - 90px);
    scroll-margin-top: 90px;
}

@supports (scroll-snap-type: y mandatory) {
    body.home-congreso.story-snap-enabled {
        scroll-snap-type: y mandatory;
    }
}

.morph-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.46;
    background:
        radial-gradient(circle at 18% 22%, rgba(85, 225, 115, 0.42), rgba(85, 225, 115, 0) 48%),
        radial-gradient(circle at 82% 76%, rgba(255, 166, 72, 0.34), rgba(255, 166, 72, 0) 50%),
        linear-gradient(140deg, rgba(4, 46, 24, 0.78), rgba(17, 122, 78, 0.6));
    transition: background 1.2s ease, opacity 0.8s ease;
}

.morph-bg::before,
.morph-bg::after {
    content: '';
    position: absolute;
    inset: -18%;
    pointer-events: none;
}

.morph-bg::before {
    background:
        radial-gradient(42% 34% at 30% 34%, rgba(129, 225, 159, 0.18), rgba(129, 225, 159, 0) 72%),
        radial-gradient(38% 32% at 68% 62%, rgba(255, 184, 107, 0.16), rgba(255, 184, 107, 0) 70%);
    filter: blur(24px) contrast(110%);
    transform: translate3d(0, 0, 0) scale(1);
    animation: liquidIdle 11s ease-in-out infinite alternate;
}

.morph-bg::after {
    background:
        conic-gradient(from 40deg at 50% 50%, rgba(123, 225, 153, 0.14), rgba(255, 193, 122, 0.14), rgba(123, 225, 153, 0.14));
    mix-blend-mode: screen;
    opacity: 0;
    filter: blur(32px);
}

body.home-congreso.morph-transitioning .morph-bg::after {
    animation: liquidShift 900ms cubic-bezier(.2,.8,.2,1);
}

body.home-congreso[data-morph='resumen'] .morph-bg {
    opacity: 0.62;
    background:
        radial-gradient(circle at 12% 84%, rgba(94, 225, 124, 0.35), rgba(94, 225, 124, 0) 46%),
        radial-gradient(circle at 86% 20%, rgba(242, 189, 89, 0.28), rgba(242, 189, 89, 0) 52%),
        linear-gradient(140deg, rgba(11, 92, 56, 0.66), rgba(6, 54, 30, 0.48));
}

/* Navbar Standalone */
.is-congreso-nav {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Reducir margen del logo para que el menú completo quepa */
.is-congreso-nav .navbar-brand {
    padding-left: 0 !important;
    margin-left: 0 !important;
}
.is-congreso-nav .navbar-brand img {
    height: 34px; /* ligeramente más pequeño para ganar espacio */
}
.is-congreso-nav .container {
    padding-left: 8px !important;
    padding-right: 8px !important;
}

/* Eliminamos el after que Bootstrap's dropdown-toggle necesita,
   y usamos box-shadow como subrayado animado */
.is-congreso-nav .nav-link {
    font-size: 0.95rem;
    transition: color 0.2s ease;
    /* Subrayado via box-shadow en lugar de ::after para no conflictar con Bootstrap */
    box-shadow: inset 0 -0px 0 0 var(--bs-primary, #28a745);
    transition: color 0.2s ease, box-shadow 0.25s ease;
    border-radius: 0;
}

/* Quitar CUALQUIER ::after que Bootstrap ponga a los nav-link normales */
.is-congreso-nav li:not(.dropdown) .nav-link::after {
    display: none !important;
}

.is-congreso-nav .nav-link:hover,
.is-congreso-nav .nav-link.active {
    color: var(--bs-primary, #28a745) !important;
    box-shadow: inset 0 -2px 0 0 var(--bs-primary, #28a745);
}

/* Botón Apúntate: nunca partir texto ni recortar */
.is-congreso-nav .btn {
    white-space: nowrap;
    flex-shrink: 0;
}


.tracking-wide {
    letter-spacing: 2px;
}

.hero-galiana {
    background-image: linear-gradient(110deg, rgba(1, 28, 12, 0.8), rgba(9, 61, 39, 0.56)), url('../img/galiana.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    isolation: isolate;
    position: relative;
}

.hero-galiana .text-dark,
.hero-galiana .text-muted {
    color: #ffffff !important;
}

.hero-galiana .text-primary {
    color: #a7f0b4 !important;
}

.hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(136, 225, 166, 0.09) 1px, transparent 1px),
        linear-gradient(90deg, rgba(136, 225, 166, 0.09) 1px, transparent 1px);
    background-size: 54px 54px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent);
    animation: gridDrift 20s linear infinite;
    pointer-events: none;
}

.hero-aurora {
    position: absolute;
    border-radius: 999px;
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}

.hero-aurora-a {
    width: min(52vw, 740px);
    height: min(52vw, 740px);
    background: radial-gradient(circle at 30% 30%, rgba(82, 225, 112, 0.52), rgba(82, 225, 112, 0.02) 70%);
    top: -22%;
    left: -8%;
    animation: auroraFloatA 9s ease-in-out infinite alternate;
}

.hero-aurora-b {
    width: min(40vw, 580px);
    height: min(40vw, 580px);
    background: radial-gradient(circle at 30% 30%, rgba(255, 171, 65, 0.35), rgba(255, 171, 65, 0.01) 70%);
    right: -6%;
    bottom: -18%;
    animation: auroraFloatB 11s ease-in-out infinite alternate;
}

.hero-radial-glow {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: radial-gradient(circle at center, rgba(130, 225, 160, 0.2) 0%, rgba(11, 54, 34, 0.35) 42%, rgba(4, 23, 13, 0.88) 100%);
    mix-blend-mode: screen;
    pointer-events: none;
}

.hero-spotlight {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
    background:
        radial-gradient(370px circle at var(--spot-x) var(--spot-y), rgba(147, 225, 177, 0.34), rgba(147, 225, 177, 0) 58%),
        radial-gradient(520px circle at var(--spot-x) var(--spot-y), rgba(255, 193, 122, 0.2), rgba(255, 193, 122, 0) 68%);
}

.hero-galiana.spotlight-active .hero-spotlight {
    opacity: 1;
}

.hero-title {
    text-shadow: 0 18px 42px rgba(6, 24, 14, 0.58);
    animation: titleReveal 850ms cubic-bezier(.2, .8, .2, 1) both;
}

.hero-galiana .border-top {
    border-color: rgba(255, 255, 255, 0.35) !important;
}

.hero-galiana .lead {
    text-shadow: 0 8px 30px rgba(4, 24, 13, 0.66);
}

.hero-galiana .btn-outline-dark {
    border-color: rgba(255, 255, 255, 0.6);
    color: #ffffff;
}

.hero-galiana .btn-outline-dark:hover {
    background: #ffffff;
    color: #0f2e1a;
    border-color: #ffffff;
}

.hero-scroll-indicator {
    position: absolute;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    letter-spacing: 0.18rem;
    text-transform: uppercase;
    font-size: 0.68rem;
}

.hero-scroll-indicator i {
    font-size: 1.2rem;
    animation: bounceArrow 1.8s ease-in-out infinite;
}

.hero-particles.is-webgl {
    mix-blend-mode: screen;
    opacity: 0.82;
}

.hero-particles.perf-hidden {
    display: none;
}

/* Cards Hover Effects */
.transition-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.transition-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,.1)!important;
}

/* Custom Checkbox on Reserva */
.cursor-pointer {
    cursor: pointer;
}

/* Footer styles */
footer a.hover-white:hover {
    color: white !important;
}

/* Countdown Component */
.countdown-container {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.countdown-item {
    background: linear-gradient(155deg, rgba(9, 50, 30, 0.72), rgba(17, 82, 52, 0.44)) !important;
    backdrop-filter: blur(12px) saturate(130%);
    -webkit-backdrop-filter: blur(12px) saturate(130%);
    border: 1px solid rgba(134, 225, 164, 0.44);
    box-shadow: 0 16px 35px rgba(1, 18, 8, 0.43), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
    position: relative;
    overflow: hidden;
}

.countdown-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(140, 225, 170, 0.18), rgba(140, 225, 170, 0));
    opacity: 0;
    transition: opacity 0.35s ease;
}

.countdown-item:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 20px 40px rgba(4, 24, 12, 0.52), 0 0 0 1px rgba(134, 225, 164, 0.34);
    border-color: rgba(144, 225, 174, 0.86);
}

.countdown-item:hover::before {
    opacity: 1;
}

.countdown-item .fs-2 {
    color: #ffffff !important;
    text-shadow: 0 8px 20px rgba(118, 225, 148, 0.34);
    position: relative;
    z-index: 1;
}

.countdown-item .small {
    color: rgba(217, 241, 255, 0.82) !important;
    position: relative;
    z-index: 1;
}

.pulse-value {
    animation: pulseValue 420ms ease;
}

@media (max-width: 576px) {
    .hero-galiana {
        background-position: center top;
    }

    .countdown-item {
        min-width: 70px !important;
        padding: 0.75rem !important;
    }

    .countdown-item span.fs-2 {
        font-size: 1.5rem !important;
    }

    .hero-scroll-indicator {
        bottom: 12px;
    }
}

.reveal-block {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-block.in-view {
    opacity: 1;
    transform: translateY(0);
}

body.home-congreso .morph-section {
    position: relative;
    transition: background-color 0.8s ease, box-shadow 0.8s ease;
}

body.home-congreso .morph-section.bg-white {
    background: rgba(247, 251, 255, 0.86) !important;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(255, 255, 255, 0.4);
}

@keyframes gridDrift {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(0, 54px, 0); }
}

@keyframes liquidIdle {
    from { transform: translate3d(-2%, -1%, 0) scale(1.02) rotate(0deg); }
    to { transform: translate3d(2%, 1%, 0) scale(1.08) rotate(4deg); }
}

@keyframes liquidShift {
    0% {
        opacity: 0;
        transform: translate3d(-2%, 0, 0) scale(0.98);
    }
    30% {
        opacity: 0.52;
    }
    100% {
        opacity: 0;
        transform: translate3d(2%, -1%, 0) scale(1.08);
    }
}

@keyframes auroraFloatA {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(20px, 14px, 0) scale(1.08); }
}

@keyframes auroraFloatB {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(-24px, -18px, 0) scale(1.1); }
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounceArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

@keyframes pulseValue {
    0% { transform: scale(1); }
    45% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .morph-bg,
    .morph-bg::before,
    .morph-bg::after,
    .hero-bg-grid,
    .hero-aurora,
    .hero-spotlight,
    .hero-scroll-indicator i,
    .hero-title,
    .pulse-value {
        animation: none !important;
    }

    .countdown-item,
    .reveal-block,
    .col-lg-8 > .card {
        transition: none !important;
    }
}

body.home-congreso.perf-lite .hero-bg-grid,
body.home-congreso.perf-lite .hero-aurora,
body.home-congreso.perf-lite .hero-radial-glow,
body.home-congreso.perf-lite .hero-spotlight,
body.home-congreso.perf-lite .hero-scroll-indicator,
body.home-congreso.perf-lite .morph-bg::after {
    display: none !important;
}

body.home-congreso.perf-lite .morph-bg {
    opacity: 0.38;
    transition: none;
}

/* Agenda-specific visual improvements (ensure these load after global styles) */
.col-lg-8 > .card {
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.6s cubic-bezier(.22,.9,.31,1), box-shadow 0.6s ease, opacity 0.6s ease;
    box-shadow: 0 12px 30px rgba(15, 42, 23, 0.06);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,251,255,0.96));
    border: 1px solid rgba(79, 225, 109,0.04);
    opacity: 0;
    transform: translateY(18px) scale(.995);
}

.col-lg-8 > .card.animated {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: 0 30px 60px rgba(15, 42, 23, 0.08);
}

.col-lg-8 > .card.in-view {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: 0 30px 60px rgba(15, 42, 23, 0.08);
}

.col-lg-8 > .card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 40px 90px rgba(15, 42, 23, 0.12);
}

.col-lg-8 > .card img.rounded-circle {
    transition: transform 0.45s ease, box-shadow 0.45s ease;
}
.col-lg-8 > .card:hover img.rounded-circle {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(2, 23, 6,0.12);
}

/* Stagger utility: reset transition-delay to 0 initially */
.col-lg-8 > .card { transition-delay: 0ms; }

