/**
 * Hero Slider Styles
 * Optimized alternative to Slider Revolution
 * Mobile-first, performance-focused design
 */

/* Google Fonts loaded via wp_head for better performance */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    --hero-button-border-radius: 25px;
    --hero-button-padding: 12px 25px;
}

/* ============================================
   Hero Slider Container
   ============================================ */
.hero-slider {
    position: relative;
    width: 100%;
    min-height: 740px;
    height: 740px;
    overflow: hidden;
    background: #000;
}

/* Remove padding/margin from parent containers */
.site-main .hero-slider {
    margin: 0 !important;
}

#primary.site-main {
    max-width: none !important;
    padding: 0 !important;
}

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

.site-main {
    overflow-x: hidden;
    width: 100%;
}

.hero-slider-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* ============================================
   Individual Slide
   ============================================ */
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 740px;
    height: 740px;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
}

.hero-slide.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

/* ============================================
   Background & Effects
   ============================================ */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8) 0%, rgba(10, 22, 40, 0.85) 50%, rgba(0, 8, 20, 0.8) 100%);
    /* Background image added via inline styles in template for better WordPress compatibility */
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(2, 119, 246, 0.15) 0%, transparent 70%);
}

.hero-wave-animation {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    pointer-events: none;
}

.hero-wave-animation canvas {
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

/* ============================================
   Content Layout
   ============================================ */
.hero-content-wrapper {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    padding: 0;
    min-height: 740px;
    height: 740px;
}

@media (min-width: 992px) {
    .hero-content-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        padding: 0;
    }
}

/* ============================================
   Text Content
   ============================================ */
.hero-text-content {
    color: #fff;
    max-width: 600px;
    padding: 2rem 0;
}

.hero-title {
    font-family: 'Lato', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 3rem;
    margin-bottom: 1.5rem;
    color: #fff;
}

.hero-title-line {
    display: block;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-description {
    font-family: 'Open Sans', sans-serif;
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-cta {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-button {
    display: inline-block;
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #0277f6 0%, #0156b3 100%);
    color: #fff;
    padding: var(--hero-button-padding);
    border-radius: var(--hero-button-border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(2, 119, 246, 0.3);
    border: none;
    cursor: pointer;
}

.hero-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(2, 119, 246, 0.5);
    background: linear-gradient(135deg, #0156b3 0%, #013d82 100%);
    color: #fff;
}

.hero-button:active {
    transform: translateY(0);
}

.hero-button:focus,
.hero-button:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 4px;
}

/* ============================================
   Phone Mockup
   ============================================ */
.hero-phone-mockup {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    opacity: 0;
    transform: translateX(0) scale(0.95);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    max-width: 100%;
}

.phone-device {
    position: relative;
    width: 100%;
    max-height: 690px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    filter: drop-shadow(0 20px 60px rgba(2, 119, 246, 0.3));
}

.phone-image {
    width: auto;
    height: auto;
    max-height: 690px;
    max-width: 100%;
    display: block;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
    object-fit: contain;
}

.phone-image.active {
    opacity: 1;
    transform: translateX(-50%);
    z-index: 2;
}

.phone-image.fadeout {
    opacity: 0;
    transform: translateX(-50%) translateX(100px);
    z-index: 1;
}

/* Desktop Mockup - Más ancho (hasta 800px) */
.phone-image.mockup-desktop {
    max-width: 800px;
}

/* Phone Mockup - Vertical (hasta 500px por defecto) */
.phone-image.mockup-phone {
    max-width: 500px;
}

/* Remove float animation for mockup images */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ============================================
   Slider Controls
   ============================================ */
.hero-slider-controls {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 1rem;
}

.hero-slider-prev,
.hero-slider-next {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
}

.hero-slider-prev:hover,
.hero-slider-next:hover {
    background: rgba(2, 119, 246, 0.3);
    border-color: rgba(2, 119, 246, 0.5);
    transform: scale(1.1);
}

.hero-slider-prev:active,
.hero-slider-next:active {
    transform: scale(0.95);
}

.hero-slider-prev:focus,
.hero-slider-next:focus,
.hero-slider-prev:focus-visible,
.hero-slider-next:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(2, 119, 246, 0.5);
}

/* ============================================
   Slider Dots/Pagination
   ============================================ */
.hero-slider-dots {
    position: absolute;
    bottom: 4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 0.75rem;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.hero-dot.active {
    width: 32px;
    border-radius: 6px;
    background: #0277f6;
}

.hero-dot:focus,
.hero-dot:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 991px) {
    .hero-slider {
        min-height: auto;
        height: auto;
    }

    .hero-slide {
        min-height: auto;
        height: auto;
    }

    .hero-content-wrapper {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
        min-height: auto;
        height: auto;
        display: flex;
        flex-direction: column;
    }

    .hero-text-content {
        text-align: center;
        max-width: 100%;
        order: 1;
        display: flex;
        flex-direction: column;
    }

    .hero-title {
        order: 1;
    }

    .hero-description {
        order: 2;
    }

    .hero-cta {
        order: 3;
    }

    .hero-phone-mockup {
        order: 4;
        margin-top: 2rem;
        margin-bottom: 0;
        height: auto;
        align-items: center;
    }

    .phone-device {
        max-width: 100%;
        max-height: none;
        position: relative;
        height: auto;
        padding: 0 1rem;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 300px;
    }

    .phone-image {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        max-height: 470px;
        max-width: 100%;
        width: auto;
        height: auto;
        transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .phone-image.active {
        transform: translate(-50%, -50%);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        z-index: 2;
    }

    .phone-image.fadeout {
        transform: translate(-50%, -50%);
        opacity: 0;
        visibility: visible;
        pointer-events: none;
        z-index: 1;
    }

    /* Limitar tamaños en mobile */
    .phone-image.mockup-desktop {
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.45rem;
        line-height: 2.3rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-slider-controls {
        bottom: 1rem;
    }

    .hero-slider-prev,
    .hero-slider-next {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .hero-slider-dots {
        bottom: 2.5rem;
    }
}

@media (max-width: 576px) {
    .hero-content-wrapper {
        padding: 3rem 0 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    .phone-device {
        max-width: 280px;
    }

    .hero-wave-animation {
        height: 50%;
    }
}

/* ============================================
   Performance Optimizations
   ============================================ */

/* Reduce motion for users with vestibular disorders */
@media (prefers-reduced-motion: reduce) {
    .hero-title-line,
    .hero-description,
    .hero-cta,
    .hero-phone-mockup,
    .hero-slide {
        transition: none;
        animation: none;
    }

    .phone-device {
        animation: none;
    }

    .hero-title-line,
    .hero-description,
    .hero-cta,
    .hero-phone-mockup {
        opacity: 1;
        transform: none;
    }
}

/* Hardware acceleration for smoother animations */
.hero-slide,
.hero-title-line,
.hero-description,
.hero-cta,
.hero-phone-mockup,
.phone-device {
    will-change: auto;
}

.hero-slide.active .hero-title-line,
.hero-slide.active .hero-description,
.hero-slide.active .hero-cta,
.hero-slide.active .hero-phone-mockup {
    will-change: opacity, transform;
}

/* Prevent layout shift - REMOVED: not needed with fixed height */
