/* ==============================================================================
   ETB DEEP UI FIX - PIXEL PERFECT MATCH WITH 1_Desktop.png
   ============================================================================== 
   AUDIT REFERENCE:
   - Design: /home/ubuntu/Uploads/1_ Desktop.png
   - Hero enlarged: /home/ubuntu/Uploads/Frame 12.png
   - Gradient specs: /home/ubuntu/Uploads/Screenshot 2026-02-11 at 9.50.41 PM.png
     → #00FFFF (cyan neón) → #044A8B (azul profundo)
   
   FIX REQUIREMENTS:
   - Hero: 10px left/right viewport spacing
   - Gradient: radial-gradient(circle at top left, #00FFFF 0%, #044A8B 100%)
   - Carousel gaps: 10-15px máximo
   - Side cards: 438x300px, scale(0.9), opacity 0.7, VISIBLE COMPLETAS
   - Center card: 635x400px, scale(1), opacity 1
   - Dots: inactive 10px diameter, active 28px x 10px
   ============================================================================== */

/* ===== DESIGN SYSTEM VARIABLES - PIXEL PERFECT ===== */
:root {
    /* Hero Dimensions - DESIGN EXACT */
    --hero-viewport-spacing: 10px;
    --hero-height: 405px;
    --hero-border-radius: 30px;
    
    /* Gradient Colors - FROM FIGMA */
    --gradient-cyan-neon: #00FFFF;
    --gradient-blue-deep: #044A8B;
    
    /* Carousel - MINIMAL GAP 10-15px */
    --carousel-gap-exact: 12px;
    --center-card-w: 635px;
    --center-card-h: 400px;
    --side-card-w: 438px;
    --side-card-h: 300px;
    
    /* Search/Button */
    --hero-input-width: 664px;
    --hero-input-height: 70px;
    --hero-input-radius: 25px;
    --hero-cta-bg: #214780;
    
    /* Dots */
    --dot-size: 10px;
    --dot-active-width: 28px;
    --dot-inactive-color: #D5D5D5;
    --dot-active-color: #0092BC;
}

/* ==============================================================================
   1. HERO SECTION - 10px LEFT/RIGHT VIEWPORT SPACING
   ============================================================================== */

.hero-section-home {
    /* FIX: EXACTLY 10px left/right viewport spacing */
    width: calc(100vw - 20px) !important;
    max-width: calc(100vw - 20px) !important;
    margin: 15px 10px 0 !important;
    
    /* Height and border-radius */
    height: var(--hero-height) !important;
    min-height: var(--hero-height) !important;
    border-radius: var(--hero-border-radius) !important;
    
    /* FIX: Correct gradient - radial from top left, #00FFFF to #044A8B */
    background: radial-gradient(
        circle at top left,
        var(--gradient-cyan-neon) 0%,
        #0092BC 35%,
        var(--gradient-blue-deep) 100%
    ) !important;
    
    /* Layout */
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 45px 40px !important;
    box-sizing: border-box;
}

/* Hero Content Wrapper */
.hero-content-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 700px;
    gap: 16px !important;
}

/* Title: 48-56px */
.hero-title-main {
    font-family: 'Lexend Deca', 'Lexend', sans-serif;
    font-size: 48px;
    line-height: 1.1;
    text-align: center;
    color: #FFFFFF;
    margin: 0 0 8px 0 !important;
    letter-spacing: 0;
}

.hero-title-light {
    font-weight: 500;
    display: block;
}

.hero-title-bold {
    font-weight: 700;
    display: block;
}

/* Subtitle */
.hero-subtitle-main {
    font-family: 'Lexend Deca', 'Lexend', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    text-align: center;
    color: #FFFFFF;
    margin: 0 0 16px 0 !important;
}

/* Search Input: 664x70px, radius 25px */
.hero-search-wrapper {
    width: var(--hero-input-width) !important;
    max-width: 100%;
    height: var(--hero-input-height) !important;
    background: #F8F8F9;
    border-radius: var(--hero-input-radius) !important;
    display: flex;
    align-items: center;
    padding: 15px 15px 15px 37px;
    box-sizing: border-box;
    margin: 0 0 16px 0 !important;
    box-shadow: 0px 59.34px 118.68px -22.25px rgba(0, 0, 0, 0.14);
}

.hero-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Lexend', 'Lexend Deca', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #333333;
    background: transparent;
}

.hero-search-input::placeholder {
    color: #999999;
}

.hero-search-btn {
    background: #0092BC;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.hero-search-btn:hover {
    background: #007a9c;
}

/* CTA Button: 664x70px */
.hero-invoice-btn {
    width: var(--hero-input-width) !important;
    max-width: 100%;
    height: var(--hero-input-height) !important;
    background: var(--hero-cta-bg) !important;
    border-radius: var(--hero-input-radius) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'Lexend', 'Lexend Deca', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #FFFFFF;
    text-decoration: none;
    margin: 0 !important;
    box-shadow: 0px 59.34px 118.68px -22.25px rgba(0, 0, 0, 0.14);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-invoice-btn:hover {
    background: #1a3a66 !important;
    transform: translateY(-2px);
}

/* Decorative Curves */
.hero-curve-top {
    position: absolute;
    top: -80px;
    left: -80px;
    width: 400px;
    height: 400px;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
}

.hero-curve-bottom {
    position: absolute;
    bottom: -120px;
    right: -80px;
    width: 400px;
    height: 400px;
    z-index: 1;
    pointer-events: none;
    opacity: 1;
}

/* ==============================================================================
   2. CAROUSEL WRAPPER - PROPER CENTERING & OVERFLOW
   ============================================================================== */

.carousel-wrapper-home {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    width: 100%;
    margin: 0 auto 35px;
    padding: 0 60px;
    box-sizing: border-box;
}

.carousel-container-home {
    width: 100%;
    max-width: 1200px;
    overflow: hidden; /* FIX: Use hidden to clip properly, JS handles positioning */
    position: relative;
}

/* Carousel Track - MINIMAL GAP 10-15px */
.carousel-track-hogar,
.carousel-track-mobile,
.beneficios-carousel-track {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* FIX: flex-start so JS transform works correctly */
    /* FIX: Minimal gap 10-15px */
    gap: var(--carousel-gap-exact);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 25px 0;
}

/* ==============================================================================
   3. PLAN CARDS - HOGAR CAROUSEL (Center 635x400, Side 438x300)
   ============================================================================== */

.carousel-card-hogar-home {
    flex-shrink: 0;
    width: var(--side-card-w); /* FIX: Set wrapper width for layout calculation */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-card-hogar-home.active {
    width: var(--center-card-w); /* FIX: Active wrapper is center width */
}

/* Side Cards - 438x300px, scale 0.9, opacity 0.7 */
.plan-card-home {
    width: 100%;
    height: var(--side-card-h);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.9);
    opacity: 0.7;
    z-index: 5;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Center Card - 635x400px, scale 1, opacity 1 */
.carousel-card-hogar-home.active .plan-card-home,
.plan-card-home.active {
    height: var(--center-card-h);
    transform: scale(1);
    opacity: 1;
    z-index: 10;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.plan-card-home:hover {
    transform: scale(0.93);
}

.plan-card-home.active:hover {
    transform: scale(1.02);
}

/* ==============================================================================
   4. MOBILE CARDS - "Tu conexión te acompaña"
   ============================================================================== */

.carousel-card-mobile-home {
    flex-shrink: 0;
    width: var(--side-card-w); /* FIX: Set wrapper width for layout calculation */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-card-mobile-home.active {
    width: var(--center-card-w); /* FIX: Active wrapper is center width */
}

/* Side Cards - 438x300px */
.mobile-card-home {
    width: 100%;
    height: var(--side-card-h);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.9);
    opacity: 0.7;
    z-index: 5;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #0092BC 0%, #044A8B 100%);
}

/* Center Card - 635x400px */
.carousel-card-mobile-home.active .mobile-card-home,
.mobile-card-home.active {
    height: var(--center-card-h);
    transform: scale(1);
    opacity: 1;
    z-index: 10;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* ==============================================================================
   5. BENEFICIOS CAROUSEL CARDS
   ============================================================================== */

.carousel-card-beneficio-home {
    flex-shrink: 0;
    width: var(--side-card-w); /* FIX: Set wrapper width for layout calculation */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-card-beneficio-home.active {
    width: var(--center-card-w); /* FIX: Active wrapper is center width */
}

/* Side Cards - 438x300px */
.beneficio-image-card {
    width: 100%;
    height: var(--side-card-h);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.9);
    opacity: 0.7;
    z-index: 5;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    background-size: cover;
    background-position: center;
}

/* Center Card - 635x400px */
.carousel-card-beneficio-home.active .beneficio-image-card,
.beneficio-image-card.active {
    height: var(--center-card-h);
    transform: scale(1);
    opacity: 1;
    z-index: 10;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* ==============================================================================
   6. CAROUSEL DOTS - ELONGATED ACTIVE (28x10px)
   ============================================================================== */

.carousel-dots-home {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 45px;
}

/* Inactive dot - Circular 10px diameter */
.dot-home,
.carousel-dot-home {
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    background: var(--dot-inactive-color);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.dot-home:hover,
.carousel-dot-home:hover {
    background: #A8A8A8;
}

/* Active dot - Elongated 28px width x 10px height */
.dot-home.active,
.carousel-dot-home.active {
    background: var(--dot-active-color);
    width: var(--dot-active-width);
    height: var(--dot-size);
    border-radius: 5px;
}

/* ==============================================================================
   7. NAVIGATION BUTTONS - 48px
   ============================================================================== */

.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #FFFFFF;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    color: #0092BC;
}

.carousel-nav-btn:hover {
    background: #0092BC;
    color: #FFFFFF;
    box-shadow: 0 6px 16px rgba(0, 146, 188, 0.4);
}

.carousel-nav-prev {
    left: 10px;
}

.carousel-nav-next {
    right: 10px;
}

/* ==============================================================================
   8. RESPONSIVE STYLES
   ============================================================================== */

/* Large Desktop - ALWAYS 10px left/right spacing */
@media (min-width: 1441px) {
    .hero-section-home {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        margin: 15px 10px 0 !important;
    }
}

/* Desktop - ALWAYS 10px left/right spacing */
@media (max-width: 1440px) {
    .hero-section-home {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        margin: 15px 10px 0 !important;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --center-card-w: 500px;
        --center-card-h: 320px;
        --side-card-w: 350px;
        --side-card-h: 240px;
        --carousel-gap-exact: 10px;
    }
    
    .hero-section-home {
        height: auto;
        min-height: 380px;
        padding: 40px 25px;
    }
    
    .hero-search-wrapper,
    .hero-invoice-btn {
        width: 100%;
        max-width: 560px;
    }
    
    .hero-title-main {
        font-size: 40px;
    }
    
    .carousel-container-home {
        overflow: hidden;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --center-card-w: 85vw;
        --center-card-h: 400px;
        --side-card-w: 85vw;
        --side-card-h: 400px;
        --carousel-gap-exact: 0px;
    }
    
    .hero-section-home {
        width: calc(100vw - 20px);
        margin: 10px 10px 0;
        padding: 32px 24px;
        min-height: 340px;
        border-radius: 24px;
        background: radial-gradient(
            circle at top left,
            var(--gradient-cyan-neon) 0%,
            #0092BC 40%,
            var(--gradient-blue-deep) 100%
        );
    }
    
    .hero-content-wrapper {
        gap: 14px;
    }
    
    .hero-title-main {
        font-size: 32px;
    }
    
    .hero-subtitle-main {
        font-size: 14px;
    }
    
    .hero-search-wrapper,
    .hero-invoice-btn {
        width: 100%;
        max-width: 100%;
        height: 56px;
    }
    
    .hero-search-wrapper {
        padding: 12px 12px 12px 20px;
        margin: 0 0 12px 0;
    }
    
    .hero-curve-top,
    .hero-curve-bottom {
        width: 280px;
        height: 280px;
    }
    
    .carousel-wrapper-home {
        padding: 0 40px;
    }
    
    .carousel-container-home {
        overflow: hidden;
    }
    
    .carousel-nav-btn {
        width: 36px;
        height: 36px;
    }
    
    /* Hide side cards on mobile - show only active */
    .carousel-card-hogar-home:not(.active),
    .carousel-card-mobile-home:not(.active),
    .carousel-card-beneficio-home:not(.active) {
        display: none;
    }
    
    .plan-card-home,
    .mobile-card-home,
    .beneficio-image-card {
        transform: scale(1);
        opacity: 1;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-section-home {
        width: calc(100vw - 20px);
        margin: 10px 10px 0;
        padding: 24px 16px;
        min-height: 300px;
    }
    
    .hero-title-main {
        font-size: 28px;
    }
    
    .hero-content-wrapper {
        gap: 12px;
    }
    
    .hero-search-wrapper,
    .hero-invoice-btn {
        height: 50px;
    }
    
    .hero-search-btn {
        width: 36px;
        height: 36px;
    }
    
    .carousel-wrapper-home {
        padding: 0 32px;
    }
    
    .carousel-nav-btn {
        width: 32px;
        height: 32px;
    }
}
