/*--------------------------------------------------------------
# Hero Layout Split - Imagen izquierda, Contenido + Buscador derecha
# Solo para pantallas grandes (>1024px)
--------------------------------------------------------------*/

/* 
 * Layout Split: La imagen ocupa el lado izquierdo y el contenido
 * (título, subtítulo, buscador ICNEA) está a la derecha.
 * En móvil vuelve al layout normal apilado.
 */

/* ========================================
   Desktop: Layout Split (>1024px)
   ======================================== */
@media (min-width: 1025px) {
    
    /* Contenedor principal split */
    .hero-layout-split {
        display: flex;
        align-items: stretch;
        text-align: left;
        background-size: cover;
        background-position: center;
    }
    
    .hero-layout-split .hero-split-wrapper {
        display: flex;
        width: 100%;
        min-height: 100%;
    }
    
    /* Lado izquierdo: Imagen */
    .hero-layout-split .hero-split-image {
        flex: 0 0 55%;
        max-width: 55%;
        position: relative;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    
    /* Heredar la imagen del hero-section */
    .hero-layout-split.hero-type-image .hero-split-image {
        background-image: inherit;
    }
    
    /* Para vídeo */
    .hero-layout-split .hero-split-image .hero-video-wrapper {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        overflow: hidden;
    }
    
    .hero-layout-split .hero-split-image .hero-video {
        position: absolute;
        top: 50%;
        left: 50%;
        min-width: 100%;
        min-height: 100%;
        width: auto;
        height: auto;
        transform: translate(-50%, -50%);
        object-fit: cover;
    }
    
    /* Overlay solo en la imagen */
    .hero-layout-split .hero-split-image .hero-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1;
    }
    
    /* Para slider dentro de split */
    .hero-layout-split .hero-split-image .hero-slider {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
    }
    
    .hero-layout-split .hero-split-image .hero-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-size: cover;
        background-position: center;
        opacity: 0;
        transition: opacity 0.8s ease;
    }
    
    .hero-layout-split .hero-split-image .hero-slide.active {
        opacity: 1;
    }
    
    /* Flechas del slider dentro de split */
    .hero-layout-split .hero-split-image .hero-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    }
    
    .hero-layout-split .hero-split-image .hero-arrow:hover {
        background: var(--canovas-white);
        transform: translateY(-50%) scale(1.1);
    }
    
    .hero-layout-split .hero-split-image .hero-arrow-prev {
        left: 20px;
    }
    
    .hero-layout-split .hero-split-image .hero-arrow-next {
        right: 20px;
    }
    
    .hero-layout-split .hero-split-image .hero-arrow svg {
        width: 20px;
        height: 20px;
        stroke: var(--canovas-primary);
    }
    
    /* Dots del slider dentro de split */
    .hero-layout-split .hero-split-image .hero-dots {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 8px;
        z-index: 10;
    }
    
    .hero-layout-split .hero-split-image .hero-dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .hero-layout-split .hero-split-image .hero-dot.active,
    .hero-layout-split .hero-split-image .hero-dot:hover {
        background: var(--canovas-white);
        transform: scale(1.2);
    }
    
    /* Lado derecho: Contenido */
    .hero-layout-split .hero-split-content {
        flex: 0 0 45%;
        max-width: 45%;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: var(--canovas-spacing-xl) var(--canovas-spacing-lg);
        background: var(--canovas-white);
        position: relative;
        z-index: 2;
    }
    
    .hero-layout-split .hero-split-inner {
        max-width: 500px;
        width: 100%;
    }
    
    /* Tipografía en split - colores oscuros */
    .hero-layout-split .hero-split-content .hero-title {
        color: var(--canovas-heading);
        font-size: clamp(1.75rem, 3vw, 2.5rem);
        margin-bottom: 1rem;
        line-height: 1.2;
    }
    
    .hero-layout-split .hero-split-content .hero-subtitle {
        color: var(--canovas-text);
        font-size: clamp(1rem, 1.5vw, 1.25rem);
        margin-bottom: 1.5rem;
        opacity: 1;
    }
    
    /* Botones en split */
    .hero-layout-split .hero-split-content .hero-buttons {
        justify-content: flex-start;
        margin-bottom: 2rem;
    }
    
    /* Buscador ICNEA dentro del split */
    .hero-layout-split .hero-split-search {
        margin-top: 1.5rem;
    }
    
    /* Ajustes del buscador inline en split */
    .hero-layout-split .hero-split-search .icnea-search-inline {
        background: var(--canovas-neutral-light);
        border-radius: var(--canovas-radius-lg);
        padding: 1.5rem;
        box-shadow: var(--canovas-shadow-sm);
    }
    
    /* Ocultar el scroll indicator en split */
    .hero-layout-split .hero-scroll-indicator {
        display: none;
    }
    
    /* Quitar el overlay general del hero en split */
    .hero-layout-split > .hero-overlay {
        display: none;
    }
    
    /* Quitar el contenido normal en split */
    .hero-layout-split > .hero-content {
        display: none;
    }
}

/* ========================================
   Pantallas grandes (>1200px) - Más espacio
   ======================================== */
@media (min-width: 1201px) {
    .hero-layout-split .hero-split-content {
        padding: var(--canovas-spacing-xxl) var(--canovas-spacing-xl);
    }
    
    .hero-layout-split .hero-split-inner {
        max-width: 550px;
    }
    
    .hero-layout-split .hero-split-content .hero-title {
        font-size: clamp(2rem, 3.5vw, 2.75rem);
    }
}

/* ========================================
   Tablet y Móvil (<1024px) - Layout Normal
   ======================================== */
@media (max-width: 1024px) {
    /* En móvil/tablet, el layout split se comporta como el normal */
    .hero-layout-split .hero-split-wrapper {
        display: none;
    }
    
    /* Mostrar el layout normal heredado */
    .hero-layout-split > .hero-overlay,
    .hero-layout-split > .hero-content,
    .hero-layout-split > .hero-scroll-indicator {
        display: block;
    }
    
    .hero-layout-split {
        text-align: center;
    }
    
    .hero-layout-split .hero-buttons {
        justify-content: center;
    }
}

/* ========================================
   Altura del hero en modo split
   ======================================== */
@media (min-width: 1025px) {
    .hero-layout-split.hero-height-small {
        min-height: 500px;
    }
    
    .hero-layout-split.hero-height-medium {
        min-height: 600px;
    }
    
    .hero-layout-split.hero-height-large {
        min-height: 700px;
    }
    
    .hero-layout-split.hero-height-fullscreen {
        min-height: 100vh;
    }
}

/* ========================================
   Variante: Borde decorativo
   ======================================== */
@media (min-width: 1025px) {
    .hero-layout-split .hero-split-content::before {
        content: '';
        position: absolute;
        top: 20%;
        bottom: 20%;
        left: 0;
        width: 4px;
        background: linear-gradient(
            to bottom,
            transparent,
            var(--canovas-accent) 20%,
            var(--canovas-accent) 80%,
            transparent
        );
        border-radius: 2px;
    }
}

/* ========================================
   Animaciones suaves
   ======================================== */
@media (min-width: 1025px) {
    .hero-layout-split .hero-split-content .hero-title,
    .hero-layout-split .hero-split-content .hero-subtitle,
    .hero-layout-split .hero-split-content .hero-buttons,
    .hero-layout-split .hero-split-search {
        opacity: 0;
        transform: translateX(30px);
        animation: splitFadeIn 0.6s ease forwards;
    }
    
    .hero-layout-split .hero-split-content .hero-subtitle {
        animation-delay: 0.1s;
    }
    
    .hero-layout-split .hero-split-content .hero-buttons {
        animation-delay: 0.2s;
    }
    
    .hero-layout-split .hero-split-search {
        animation-delay: 0.3s;
    }
    
    @keyframes splitFadeIn {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* ========================================
   Reducir movimiento si el usuario lo prefiere
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .hero-layout-split .hero-split-content .hero-title,
    .hero-layout-split .hero-split-content .hero-subtitle,
    .hero-layout-split .hero-split-content .hero-buttons,
    .hero-layout-split .hero-split-search {
        animation: none;
        opacity: 1;
        transform: none;
    }
}