/* ============================================
   RESET Y BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: inherit;
    background: #0a0a0a;
}

/* ============================================
   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;
}

.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;
}

.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;
}

.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;
}

.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;
}

.carousel-item.active {
    transform: rotateY(0deg) scale(1) translateX(0px);
    opacity: 1;
    filter: brightness(1);
    z-index: 10;
    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);
}

.carousel-item.active::after {
    opacity: 0;
}

.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);
}

.carousel-item.side-left:hover,
.carousel-item.side-right:hover {
    opacity: 0.75;
    filter: brightness(0.75) blur(0px);
}

.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
   ============================================ */
.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;
}

.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);
}

.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);
}

.unmute-btn svg {
    width: 22px;
    height: 22px;
    position: absolute;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.icon-mute {
    opacity: 1;
    transform: scale(1);
}
.icon-sound {
    opacity: 0;
    transform: scale(0.7);
}

.unmute-btn.sound-on .icon-mute {
    opacity: 0;
    transform: scale(0.7);
}
.unmute-btn.sound-on .icon-sound {
    opacity: 1;
    transform: scale(1);
}

.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; }
}

.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
   ============================================ */
.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 - ESCRITORIO
   ============================================ */
.blocks-section {
    padding: 48px 20px;
    background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 100%);
    color: white;
}

.blocks-section .container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Contenedor principal de bloques */
.blocks-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Layout de escritorio - visible por defecto */
.desktop-layout {
    display: block;
}

/* Layout móvil - oculto por defecto */
.mobile-layout {
    display: none;
}

/* ============================================
   FILA PRINCIPAL: pequeño | mediano | pequeño
   ============================================ */
.blocks-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;  
    gap: 20px;
    align-items: center; 
    margin-bottom: 20px;
}

.blocks-row:last-child {
    margin-bottom: 0;
}

/* ============================================
   BLOQUE PEQUEÑO (circular)
   ============================================ */
.block-item.pequeño {
    /* Cambiar de cuadrado a círculo */
    width: 100%;
    aspect-ratio: 1 / 1;  /* Mantiene proporción cuadrada/círculo */
    border-radius: 50%;    /* Cambiado de 14px a 50% para que sea círculo */
    overflow: hidden;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    padding: 0;  /* Eliminar padding para que la imagen ocupe todo */
}

.block-item.pequeño:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.block-item.pequeño img {
    width: 100%;
    height: 100%;
    border-radius: 50%;    /* Imagen también circular */
    border: 3px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.block-item.pequeño:hover img {
    transform: scale(1.08);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ============================================
   BLOQUE MEDIANO (rectangular centro)
   ============================================ */
.block-item.mediano {
    height: 260px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid #4169e1;
    padding: 0;
    background: #0d1b3e;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.block-item.mediano:hover {
    transform: translateY(-5px);
    border-color: #00d4ff;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.block-item.mediano img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    border-radius: 0;
}

.block-item.mediano:hover img {
    transform: scale(1.04);
}

/* ============================================
   BLOQUE GRANDE (banner completo)
   ============================================ */
.banner-grande {
    margin-bottom: 20px;
}

.banner-grande:last-child {
    margin-bottom: 0;
}

.block-item.grande {
    height: 200px;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border: 2px solid #00d4ff;
    padding: 0;
    background: #0d003d;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    display: block;
}

.block-item.grande:hover {
    transform: translateY(-5px);
    border-color: #4169e1;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.block-item.grande img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    border-radius: 0;
}

.block-item.grande:hover img {
    transform: scale(1.03);
}

/* Fila individual (cuando solo hay un bloque) */
.blocks-row.single {
    display: block;
    margin-bottom: 20px;
}

.blocks-row.single .block-item {
    width: 100%;
}

/* ============================================
   SEPARADOR ENTRE FILAS
   ============================================ */
.blocks-separator {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 10px 0;
}

/* ============================================
   RESPONSIVE — TABLET (hasta 1100px)
   ============================================ */
@media (max-width: 1100px) {
   .blocks-row {
        grid-template-columns: 1fr 2fr 1fr;
        gap: 16px;
    }

    .block-item.pequeño {
        height: 240px;
    }

    .block-item.pequeño img {
        width: 88px;
        height: 88px;
    }

    .block-item.mediano {
        height: 240px;
    }

    .block-item.grande {
        height: 180px;
    }
}

@media (max-width: 900px) {
      .blocks-row {
        grid-template-columns: 1fr 2fr 1fr;
        gap: 14px;
    }

    .block-item.pequeño {
        height: 210px;
    }

    .block-item.pequeño img {
        width: 76px;
        height: 76px;
    }

    .block-item.mediano {
        height: 210px;
    }

    .block-item.grande {
        height: 160px;
    }
}

/* ============================================
   RESPONSIVE — MÓVIL (hasta 768px)
   ============================================ */
@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;
    }

    .blocks-section {
        padding: 24px 12px;
    }

    .blocks-section .container {
        gap: 8px;
    }

    /* Ocultar layout de escritorio en móvil */
    .desktop-layout {
        display: none;
    }

    /* Mostrar layout móvil */
    .mobile-layout {
        display: block;
    }

    /* ============================================
       LAYOUT MÓVIL - CÍRCULOS HORIZONTALES ARRIBA
       ============================================ */
    
    /* Contenedor de círculos (scroll horizontal) */
    .circles-container {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        gap: 16px;
        padding: 8px 4px 20px 4px;
        margin-bottom: 20px;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
    }
    
    .circles-container::-webkit-scrollbar {
        height: 3px;
    }
    
    .circles-container::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
    }
    
    .circles-container::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 10px;
    }

    /* Bloques pequeños como círculos */
    .mobile-layout .block-item.pequeño {
        flex-shrink: 0;
        width: 85px;
        height: 85px;
        border-radius: 50%;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
        border: 2px solid rgba(255, 255, 255, 0.25);
        transition: transform 0.2s ease, border-color 0.2s ease;
        padding: 0;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }
    
    .mobile-layout .block-item.pequeño img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
        border: none;
    }
    
    .mobile-layout .block-item.pequeño:hover {
        transform: scale(1.05);
        border-color: rgba(255, 255, 255, 0.6);
    }

    /* ============================================
       LAYOUT MÓVIL - RECTÁNGULOS VERTICALES
       ============================================ */
    
    /* Contenedor de rectángulos */
    .rectangles-container {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    /* Bloques medianos en móvil */
    .mobile-layout .block-item.mediano {
        width: 100%;
        height: 100px;
        border-radius: 14px;
        overflow: hidden;
        position: relative;
        border: 1.5px solid rgba(65, 105, 225, 0.5);
        transition: transform 0.2s ease, border-color 0.2s ease;
    }
    
    .mobile-layout .block-item.mediano img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .mobile-layout .block-item.mediano:hover {
        transform: translateY(-3px);
        border-color: #00d4ff;
    }
    
    /* Bloques grandes en móvil */
    .mobile-layout .block-item.grande {
        width: 100%;
        height: 120px;
        border-radius: 14px;
        overflow: hidden;
        position: relative;
        border: 1.5px solid rgba(0, 212, 255, 0.4);
        transition: transform 0.2s ease, border-color 0.2s ease;
    }
    
    .mobile-layout .block-item.grande img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .mobile-layout .block-item.grande:hover {
        transform: translateY(-3px);
        border-color: #4169e1;
    }

    /* Eliminar hover translateY excesivo en móvil */
    .block-item.pequeño:hover,
    .block-item.mediano:hover,
    .block-item.grande:hover {
        transform: translateY(-3px);
    }
}

/* ============================================
   RESPONSIVE — MÓVIL PEQUEÑO (hasta 480px)
   ============================================ */
@media (max-width: 480px) {
    .blocks-section {
        padding: 20px 10px;
    }
    
    .circles-container {
        gap: 12px;
        padding: 8px 4px 16px 4px;
        margin-bottom: 16px;
    }
    
    .mobile-layout .block-item.pequeño {
        width: 70px;
        height: 70px;
    }
    
    .mobile-layout .block-item.mediano {
        height: 85px;
    }
    
    .mobile-layout .block-item.grande {
        height: 100px;
    }
    
    .rectangles-container {
        gap: 12px;
    }
}

/* ============================================
   UTILIDADES ADICIONALES
   ============================================ */
.sin-bloques {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
}

a {
    text-decoration: none;
}