/* =============================================
   HERO
   ============================================= */
.hero {
    position: relative;
    width: 100%;
    height: 85vh;
    overflow: hidden;
    font-family: inherit;
}

.hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.45) 50%,
        rgba(0, 0, 0, 0.65) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 60px;
}

/* =============================================
   CARRUSEL 3D
   ============================================= */
.carousel-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    perspective: 1000px;
}

.carousel-track {
    display: flex;
    align-items: center;
    gap: 16px;
    perspective: 1200px;
    transform-style: preserve-3d;
}

/* Item base */
.carousel-item {
    position: relative;
    width: 180px;
    height: 260px;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    flex-shrink: 0;
    transition:
        transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.5s ease,
        box-shadow 0.5s ease,
        filter 0.5s ease;
    will-change: transform;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    user-select: none;
}

/* Gradiente inferior para todos los items */
.carousel-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
    transition: opacity 0.4s ease;
}

/* Items laterales: más pequeños, inclinados, oscuros */
.carousel-item.side-left {
    transform: rotateY(18deg) scale(0.82) translateX(10px);
    opacity: 0.55;
    filter: brightness(0.55) blur(0.5px);
    box-shadow: none;
    z-index: 1;
}

.carousel-item.side-right {
    transform: rotateY(-18deg) scale(0.82) translateX(-10px);
    opacity: 0.55;
    filter: brightness(0.55) blur(0.5px);
    box-shadow: none;
    z-index: 1;
}

/* Items lejanos (2 posiciones del centro) */
.carousel-item.far-left {
    transform: rotateY(28deg) scale(0.68) translateX(30px);
    opacity: 0.25;
    filter: brightness(0.35) blur(1px);
    box-shadow: none;
    z-index: 0;
}

.carousel-item.far-right {
    transform: rotateY(-28deg) scale(0.68) translateX(-30px);
    opacity: 0.25;
    filter: brightness(0.35) blur(1px);
    box-shadow: none;
    z-index: 0;
}

/* Item CENTRAL: destacado con glow */
.carousel-item.active {
    transform: rotateY(0deg) scale(1) translateX(0px);
    opacity: 1;
    filter: brightness(1);
    z-index: 10;

    /* RESPLANDOR CENTRAL */
    box-shadow:
        0 0 0 2px rgba(255, 255, 255, 0.15),
        0 0 30px rgba(255, 255, 255, 0.12),
        0 0 60px rgba(100, 180, 255, 0.18),
        0 0 100px rgba(100, 180, 255, 0.10),
        0 20px 60px rgba(0, 0, 0, 0.8);
}

/* Elimina el gradiente oscuro del item activo */
.carousel-item.active::after {
    opacity: 0;
}

/* Borde brillante sutil en el item activo */
.carousel-item.active::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    z-index: 20;
    pointer-events: none;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.05);
}

/* Hover en items laterales */
.carousel-item.side-left:hover,
.carousel-item.side-right:hover {
    opacity: 0.75;
    filter: brightness(0.75) blur(0px);
}

/* Flecha de navegación implícita al hacer hover en laterales */
.carousel-item.side-left:hover {
    transform: rotateY(12deg) scale(0.86) translateX(6px);
}
.carousel-item.side-right:hover {
    transform: rotateY(-12deg) scale(0.86) translateX(-6px);
}

/* =============================================
   DOTS (indicadores)
   ============================================= */
.carousel-dots {
    display: flex;
    gap: 7px;
    padding-left: 4px;
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.carousel-dot.active {
    width: 22px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 8px rgba(255,255,255,0.5);
}

/* =============================================
   CONTROLES DE AUDIO
   ============================================= */
.audio-controls {
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Botón principal */
.unmute-btn {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    background: rgba(15, 15, 20, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    overflow: visible;
}

.unmute-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.7);
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(255,255,255,0.1), 0 4px 20px rgba(0,0,0,0.5);
}

/* Estado: sonido activado */
.unmute-btn.sound-on {
    border-color: rgba(80, 200, 140, 0.7);
    box-shadow:
        0 0 16px rgba(80, 200, 140, 0.25),
        0 4px 20px rgba(0,0,0,0.4);
}

.unmute-btn.sound-on:hover {
    background: rgba(80, 200, 140, 0.15);
    border-color: rgba(80, 200, 140, 0.9);
}

/* SVG iconos */
.unmute-btn svg {
    width: 22px;
    height: 22px;
    position: absolute;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Por defecto: mostrar mute, ocultar sound */
.icon-mute {
    opacity: 1;
    transform: scale(1);
}
.icon-sound {
    opacity: 0;
    transform: scale(0.7);
}

/* Cuando está sound-on */
.unmute-btn.sound-on .icon-mute {
    opacity: 0;
    transform: scale(0.7);
}
.unmute-btn.sound-on .icon-sound {
    opacity: 1;
    transform: scale(1);
}

/* Animación ondas de sonido */
.wave {
    stroke-dasharray: 20;
    stroke-dashoffset: 20;
    transition: stroke-dashoffset 0.3s ease;
}

.unmute-btn.sound-on .wave-1 {
    animation: wave-draw 0.4s ease forwards 0.1s;
}
.unmute-btn.sound-on .wave-2 {
    animation: wave-draw 0.4s ease forwards 0.25s;
}

@keyframes wave-draw {
    to { stroke-dashoffset: 0; }
}

/* Tooltip */
.btn-tooltip {
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    background: rgba(10, 10, 15, 0.9);
    color: rgba(255,255,255,0.9);
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(-50%) translateX(4px);
    border: 1px solid rgba(255,255,255,0.1);
    letter-spacing: 0.02em;
}

.unmute-btn:hover .btn-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0px);
}

/* =============================================
   SLIDER DE VOLUMEN
   ============================================= */
.volume-slider-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.audio-controls:hover .volume-slider-wrap,
.volume-slider-wrap:hover {
    opacity: 1;
    transform: translateY(0px);
    pointer-events: all;
}

.volume-slider {
    -webkit-appearance: slider-vertical;
    appearance: slider-vertical;
    writing-mode: vertical-lr;
    direction: rtl;
    width: 4px;
    height: 80px;
    cursor: pointer;
    accent-color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    outline: none;
    border: none;
}

/* =============================================
   TOAST DE NOTIFICACIÓN
   ============================================= */
.audio-toast {
    position: absolute;
    bottom: 90px;
    right: 24px;
    z-index: 200;
    background: rgba(10, 12, 18, 0.92);
    border: 1px solid rgba(255,255,255,0.12);
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    white-space: nowrap;
}

.audio-toast.show {
    opacity: 1;
    transform: translateY(0px);
}

/* =============================================
   FLECHA SCROLL DOWN
   ============================================= */
.scroll-down-arrow {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    z-index: 10;
    user-select: none;
    text-decoration: none;
}

.scroll-label {
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    font-family: inherit;
}

.arrow-chevrons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.arrow-chevrons svg {
    width: 26px;
    height: 15px;
    animation: bounce-arrow 1.5s ease-in-out infinite;
}

.arrow-chevrons svg:first-child {
    opacity: 0.35;
    animation-delay: 0s;
}

.arrow-chevrons svg:last-child {
    opacity: 0.85;
    animation-delay: 0.22s;
}

@keyframes bounce-arrow {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(6px); }
}

.scroll-down-arrow:hover .scroll-label {
    color: rgba(255, 255, 255, 0.9);
}

.scroll-down-arrow:hover svg path {
    stroke: rgba(255, 255, 255, 1);
}

/* =============================================
   BLOQUES SECTION
   ============================================= */
.blocks-section {
    padding: 80px 20px;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
    color: white;
    min-height: 50vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.8rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, #4169e1, #00d4ff);
    margin: 15px auto 0;
    border-radius: 3px;
}

/* CONTENEDOR PRINCIPAL */
.blocks-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

/* FILA: 2 LATERALES + 1 CENTRAL */
.blocks-row {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 20px;
    margin-bottom: 30px;
}

/* BANNER GRANDE INDIVIDUAL */
.banner-grande {
    grid-column: 1 / -1;
    margin-top: 30px;
}

/* BLOQUES LATERALES (CIRCULARES) */
.block-item.circular {
    width: 250px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    border: none;
    border-radius: 15px;
    position: relative;
    overflow: visible;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.block-item.circular img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 6px solid #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
    background: #fff;
}

.block-item.circular::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 170px;
    height: 170px;
    background: #ffffff;
    border-radius: 50%;
    z-index: 1;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.block-item.circular .block-title {
    background: #ffffff;
    color: #1e3a8a;
    padding: 14px 28px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    border: none;
    position: relative;
    z-index: 2;
    margin-top: 5px;
}

/* BLOQUE PEQUEÑO (hero_blocks con ancho=pequeño) */
.block-item.pequeño {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    display: block;
    min-height: 200px;
}

.block-item.pequeño img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.block-item.pequeño:hover img {
    transform: scale(1.05);
}

.block-item.pequeño .block-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    padding: 20px 14px 12px;
    text-align: center;
}

/* BLOQUE MEDIANO */
.block-item.mediano {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    display: block;
    min-height: 240px;
}

.block-item.mediano img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.block-item.mediano:hover img {
    transform: scale(1.05);
}

.block-item.mediano .block-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    padding: 20px 18px 14px;
    color: white;
}

/* BLOQUE CENTRAL (RECTANGULAR) */
.block-item.rectangular {
    min-height: 320px;
    padding: 0;
    background: linear-gradient(135deg, #1e0080 0%, #0d003d 100%);
    border: 4px solid #4169e1;
    border-radius: 20px;
    overflow: hidden;
}

.block-item.rectangular img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: transform 0.5s ease;
}

.block-item.rectangular:hover img {
    transform: scale(1.05);
}

.block-item.rectangular .block-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    padding: 25px;
    color: white;
}

.block-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.block-content p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.5;
    max-width: 80%;
}

/* BANNER GRANDE */
.block-item.grande {
    grid-column: 1 / -1;
    min-height: 350px;
    padding: 0;
    background: linear-gradient(135deg, #0d003d 0%, #1e0080 100%);
    border: 4px solid #00d4ff;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.block-item.grande img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

.block-item.grande .block-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(65,105,225,0.3));
    padding: 30px 40px;
    color: white;
}

.block-item.grande .block-content h3 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.block-item.grande .block-content p {
    font-size: 1.1rem;
    max-width: 60%;
}

/* HOVER GENERAL */
.block-item.circular:hover img {
    transform: scale(1.1) rotate(5deg);
    border-color: #FFD700;
}

.block-item.circular:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(139, 0, 0, 0.4);
}

.block-item.circular:hover .block-title {
    background: #fbbf24;
    color: #1e3a8a;
}

.block-item.rectangular:hover,
.block-item.grande:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(65, 105, 225, 0.4);
    border-color: #00d4ff;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1200px) {
    .blocks-row {
        grid-template-columns: 220px 1fr 220px;
        gap: 15px;
    }

    .block-item.circular {
        width: 220px;
    }

    .block-item.circular img {
        width: 130px;
        height: 130px;
    }

    .block-item.circular::before {
        width: 110px;
        height: 110px;
    }
}

@media (max-width: 992px) {
    .blocks-section {
        padding: 60px 15px;
    }

    .section-title {
        font-size: 2.2rem;
        margin-bottom: 40px;
    }

    .blocks-row {
        grid-template-columns: 180px 1fr 180px;
        gap: 15px;
    }

    .block-item.circular {
        width: 180px;
        min-height: 280px;
        padding: 25px 15px;
    }

    .block-item.circular img {
        width: 110px;
        height: 110px;
    }

    .block-item.circular::before {
        width: 100px;
        height: 100px;
        top: 35px;
    }

    .block-item.circular .block-title {
        font-size: 12px;
        padding: 10px 15px;
    }

    .block-content h3 {
        font-size: 1.5rem;
    }

    .block-item.grande .block-content h3 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding-left: 20px;
    }

    .carousel-item {
        width: 140px;
        height: 200px;
    }

    .carousel-item.side-left,
    .carousel-item.side-right {
        width: 120px;
        height: 175px;
    }

    .carousel-item.far-left,
    .carousel-item.far-right {
        display: none;
    }

    .scroll-down-arrow {
        bottom: 18px;
    }

    /* ── BLOQUES EN MÓVIL ── */
    .blocks-section {
        padding: 30px 10px;
    }

    .blocks-container {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .blocks-row {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 0;
        width: 100%;
        max-width: 100%;
    }

    .banner-grande {
        margin-top: 0;
    }

    /* Pequeño */
    .block-item.pequeño {
        width: 100%;
        height: 100px;
        min-height: unset;
        border-radius: 10px;
    }

    .block-item.pequeño img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .block-item.pequeño .block-title {
        font-size: 11px;
        padding: 14px 10px 8px;
        letter-spacing: 1px;
    }

    /* Mediano */
    .block-item.mediano {
        width: 100%;
        height: 140px;
        min-height: unset;
        border-radius: 10px;
    }

    .block-item.mediano img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .block-item.mediano .block-content {
        padding: 12px 12px 10px;
    }

    .block-item.mediano .block-content h3 {
        font-size: 0.95rem;
        margin: 0;
    }

    /* Grande */
    .block-item.grande {
        width: 100%;
        height: 160px;
        min-height: unset;
        border-radius: 10px;
        border-width: 2px;
    }

    .block-item.grande img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 8px;
    }

    .block-item.grande .block-content {
        padding: 12px 14px 10px;
    }

    .block-item.grande .block-content h3 {
        font-size: 1rem;
        margin-bottom: 4px;
    }

    .block-item.grande .block-content p {
        font-size: 0.78rem;
        max-width: 100%;
    }

    /* Circular */
    .block-item.circular {
        width: 100%;
        max-width: 100%;
        min-height: unset;
        height: auto;
        flex-direction: row;
        align-items: center;
        text-align: left;
        padding: 14px 16px;
        gap: 14px;
        justify-content: flex-start;
        border-radius: 10px;
        overflow: hidden;
    }

    .block-item.circular::before {
        display: none;
    }

    .block-item.circular img {
        width: 64px;
        height: 64px;
        min-width: 64px;
        margin-bottom: 0;
        flex-shrink: 0;
        border-width: 3px;
    }

    .block-item.circular .block-title {
        font-size: 11px;
        padding: 7px 12px;
        margin-top: 0;
        letter-spacing: 1px;
    }

    /* Desactivar hover translateY en móvil */
    .block-item.circular:hover,
    .block-item.rectangular:hover,
    .block-item.grande:hover,
    .block-item.pequeño:hover,
    .block-item.mediano:hover {
        transform: none;
    }
}

@media (max-width: 480px) {
    .blocks-section {
        padding: 24px 8px;
    }

    .block-item.pequeño {
        height: 85px;
    }

    .block-item.mediano {
        height: 120px;
    }

    .block-item.grande {
        height: 140px;
    }

    .block-item.grande .block-content h3 {
        font-size: 0.9rem;
    }

    .block-item.circular img {
        width: 54px;
        height: 54px;
        min-width: 54px;
    }

    .block-item.circular .block-title {
        font-size: 10px;
        padding: 6px 10px;
    }

    .block-content h3 {
        font-size: 1rem;
    }

    .block-content p {
        font-size: 0.85rem;
    }
}