/* CTS Hero Slider Styles - Responsive Backgrounds */
/* Optimizado para transiciones ultra suaves */

.cts-hero-slider {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    top: -9px;
    /* Optimizaciones de performance */
    transform: translateZ(0);
    will-change: auto;
}

.cts-hero-slides {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 560px;
}

.cts-hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 560px;
    opacity: 0;
    transform: translateX(30px) scale(0.98);
    transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    align-items: center;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
    will-change: opacity, transform;
}

.cts-hero-slide.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    z-index: 2;
}

.cts-hero-slide.fade-out {
    opacity: 0;
    transform: translateX(-30px) scale(0.95);
    transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cts-hero-content {
    max-width: 1400px;/*ajuste personalizado de ancho para escritorio*/
    margin: 0 auto;
    padding: 40px 70px 40px 70px; /* Reducir padding vertical, ajuste de los paddin de 200 a 70px */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 2;
    min-height: 560px;
    width: 100%;
    box-sizing: border-box;
}

.cts-hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    position: relative;
    z-index: 3;
    width: 800px; /*css adicional colocado*/
}

.cts-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #035f06a3;
    color: #FFBB00;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.cts-hero-badge svg {
    width: 12px;
    height: 12px;
}

.cts-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    margin: 0 0 20px 0;
}

.cts-hero-title span {
    display: block;
    color: #4CAF50;
}

.cts-hero-subtitle {
    font-size: 1.25rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0 30px 0;
}

.cts-hero-content-text {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 30px 0;
}

.cts-hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 0px; /* Subir botones, para subir los botones se quito el margin-top de 40px */
}

.cts-hero-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cts-hero-buttons .btn-yellow {
    background: linear-gradient(135deg, #FFC107 0%, #FF9800 100%);
    color: #1a1a1a;
}

.cts-hero-buttons .btn-yellow:hover {
    background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
}

.cts-hero-buttons .btn-secondary {
    background: transparent;
    color: #4CAF50;
    border: 2px solid #4CAF50;
}

.cts-hero-buttons .btn-secondary:hover {
    background: #4CAF50;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
}

.cts-hero-right {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
}

.cts-hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.cts-hero-image:hover {
    transform: scale(1.05);
}

/* Navigation Arrows - Controles de Flecha */
.cts-hero-arrows {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10;
}

.cts-hero-arrow {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    opacity: 0.7;
    transform: translateY(-50%);
}

.cts-hero-arrow:hover {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.cts-hero-arrow:active {
    transform: translateY(-50%) scale(0.95);
    transition: all 0.2s ease;
}

.cts-hero-arrow svg {
    width: 20px;
    height: 20px;
    fill: #1a1a1a;
    transition: fill 0.3s ease;
}

.cts-hero-arrow.prev {
    left: 20px;
}

.cts-hero-arrow.next {
    right: 20px;
}

/* Navigation Dots - Mejorados */
.cts-hero-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 16px;
    z-index: 10;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.cts-hero-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid transparent;
    position: relative;
}

.cts-hero-dot:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: scale(1.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.cts-hero-dot.active {
    background: #4CAF50;
    transform: scale(1.4);
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
}

.cts-hero-dot.active:hover {
    transform: scale(1.5);
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.7);
}

/* Placeholder para cuando no hay imagen de fondo */
.cts-hero-placeholder {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #fff;
    font-size: 1.2rem;
}

/* Botón Volver Arriba - Scroll to Top AISLADO */
#cts-scroll-to-top {
    position: fixed !important;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    z-index: 9999 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    /* Aislamiento específico */
    isolation: isolate;
    contain: layout style;
    pointer-events: none;
}

#cts-scroll-to-top.cts-visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto;
}

#cts-scroll-to-top.cts-hidden {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(20px) scale(0.8) !important;
    pointer-events: none;
}

#cts-scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1) !important;
    box-shadow: 0 8px 30px rgba(76, 175, 80, 0.5);
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
}

#cts-scroll-to-top:active {
    transform: translateY(-2px) scale(1.05) !important;
    transition: all 0.2s ease !important;
}

#cts-scroll-to-top svg {
    width: 24px;
    height: 24px;
    fill: white;
    transition: transform 0.3s ease;
    pointer-events: none;
}

#cts-scroll-to-top:hover svg {
    transform: translateY(-2px);
}

/* Asegurar que las imágenes de fondo se apliquen correctamente */
.cts-hero-slide[style*="background-image"] {
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

/* Overlay para mejorar legibilidad del texto */
.cts-hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.cts-hero-content {
    position: relative;
    z-index: 2;
}
    background: #f5f5f5;
    color: #666;
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .cts-hero-slider {
        min-height: 400px;
    }
    
    .cts-hero-slides {
        min-height: 400px;
    }
    
    .cts-hero-slide {
        min-height: 400px;
    }
    
    .cts-hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
        padding: 40px 60px;
        min-height: 400px;
    }
    
    .cts-hero-left {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    /* Imagen mobile es portrait (450×540px) — el hero debe tener
       altura suficiente para mostrarla correctamente */
    .cts-hero-slider {
        min-height: 540px;
    }
    
    .cts-hero-slides {
        min-height: 540px;
    }
    
    .cts-hero-slide {
        min-height: 540px;
        /* Posición del fondo: centrar el producto en la imagen portrait */
        background-position: center center !important;
        background-size: cover !important;
        /* Mantener transiciones suaves en móvil */
        transition: all 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .cts-hero-content {
        /* Una sola columna: solo el texto, sin la imagen HTML (ya está en el fondo) */
        grid-template-columns: 1fr;
        padding: 40px 24px;
        min-height: 540px;
        gap: 0;
        align-items: flex-start !important;
    }
    
    .cts-hero-left {
        width: 100%;
        max-width: 75%; /* deja el lado derecho para ver el producto de fondo */
        margin: 0;
        align-items: flex-start;
    }
    
    /* Ocultar la imagen HTML en móvil — el producto ya está en el fondo */
    .cts-hero-right {
        display: none !important;
    }

    /* Ocultar el bloque de contenido duplicado (repite el subtítulo) */
    .cts-hero-content-text {
        display: none !important;
    }
    
    .cts-hero-title {
        font-size: 2rem !important; /* override inline style */
        line-height: 1.2 !important;
    }

    .cts-hero-subtitle {
        font-size: 1rem !important; /* override inline style */
    }
    
    .cts-hero-buttons {
        justify-content: flex-start;
    }
    
    /* Flechas más pequeñas en móvil */
    .cts-hero-arrows {
        padding: 0 10px;
    }
    
    .cts-hero-arrow {
        width: 40px;
        height: 40px;
        transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .cts-hero-arrow svg {
        width: 16px;
        height: 16px;
    }
    
    /* Dots más pequeños pero mantienen suavidad */
    .cts-hero-dots {
        bottom: 20px;
        gap: 12px;
        padding: 8px 16px;
    }
    
    .cts-hero-dot {
        width: 12px;
        height: 12px;
        /* Mantener transiciones suaves */
        transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    /* Botón scroll to top en móvil */
    #cts-scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
    }
    
    #cts-scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .cts-hero-content {
        padding: 30px 20px;
        gap: 20px;
    }
    
    .cts-hero-left {
        width: 100%;
        max-width: none;
    }

    .cts-hero-title {
        font-size: 2.6rem !important; /* override inline style */
        line-height: 1.1 !important;
    }

    .cts-hero-subtitle {
        font-size: 0.9rem !important; /* override inline style */
    }
    
    .cts-hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .cts-hero-buttons .btn-custom,
    .cts-hero-buttons .btn-custom-2 {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        /* Mantener transiciones suaves en botones */
        transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    /* Flechas muy pequeñas en pantallas tiny */
    .cts-hero-arrow {
        width: 35px;
        height: 35px;
    }
    
    .cts-hero-arrow svg {
        width: 14px;
        height: 14px;
    }
    
    /* Dots aún más compactos pero suaves */
    .cts-hero-dots {
        gap: 10px;
        padding: 6px 12px;
    }
    
    .cts-hero-dot {
        width: 10px;
        height: 10px;
    }
    
    /* Botón scroll to top más pequeño */
    #cts-scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
    
    #cts-scroll-to-top svg {
        width: 18px;
        height: 18px;
    }
}

/* Optimizaciones adicionales para transiciones ultra suaves */
@media (prefers-reduced-motion: reduce) {
    .cts-hero-slide {
        transition: opacity 0.3s ease;
        transform: none;
    }
    
    .cts-hero-slide.active {
        transform: none;
    }
    
    .cts-hero-slide.fade-out {
        transform: none;
    }
}

/* Mejoras de performance */
.cts-hero-slider,
.cts-hero-slide {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Suavizar toda la experiencia */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Botones personalizados con colores dinámicos */
.cts-hero-buttons .btn-custom,
.cts-hero-buttons .btn-custom-2 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cts-hero-buttons .btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

.cts-hero-buttons .btn-custom-2:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Mejorar títulos y subtítulos */
.cts-hero-title {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin-bottom: 15px;
}

.cts-hero-subtitle {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-bottom: 25px;
}