/**
 * Elementor Modern Carousel - Custom Carousel Styles
 */

/* =============================================
   VARIABLES CSS
   ============================================= */
.emc-custom-carousel {
    --peek-amount: 15%;
    --slide-gap: 20px;
    --transition-speed: 400ms;
}

/* =============================================
   ESTRUCTURA PRINCIPAL
   ============================================= */
.emc-custom-carousel-wrapper {
    position: relative;
    width: 100%;
}

.emc-custom-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.emc-custom-carousel-track {
    display: flex;
    transition: transform var(--transition-speed) cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}

/* =============================================
   SLIDES
   ============================================= */
.emc-custom-slide {
    flex-shrink: 0;
    position: relative;
    box-sizing: border-box;
    padding: 0 calc(var(--slide-gap) / 2);
}

.emc-custom-slide-inner {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.emc-custom-slide-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.emc-custom-slide-image {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.emc-custom-slide-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.5s ease, filter 0.3s ease;
}

/* =============================================
   EFECTOS HOVER
   ============================================= */
.emc-hover-zoom:hover .emc-custom-slide-image img {
    transform: scale(1.08);
}

.emc-hover-brightness:hover .emc-custom-slide-image img {
    filter: brightness(1.1);
}

.emc-hover-blur:hover .emc-custom-slide-image img {
    filter: blur(3px);
}

/* =============================================
   OVERLAY
   ============================================= */
.emc-custom-overlay {
    --overlay-color: rgba(0, 0, 0, 0.5);
    --gradient-direction: to top;
    --gradient-size: 70%;
    
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    padding: 25px;
    box-sizing: border-box;
    z-index: 5;
    border-radius: inherit;
    pointer-events: none;
}

.emc-custom-overlay > * {
    pointer-events: auto;
}

/* Overlay solido */
.emc-overlay-solid {
    background-color: var(--overlay-color);
}

/* Overlay gradiente */
.emc-overlay-gradient {
    background: linear-gradient(var(--gradient-direction), var(--overlay-color) 0%, transparent var(--gradient-size));
}

/* Sin overlay */
.emc-overlay-none {
    background: transparent;
}

/* =============================================
   POSICIONES DEL CONTENIDO
   ============================================= */
/* Top */
.emc-position-top-left {
    align-items: flex-start;
    justify-content: flex-start;
}

.emc-position-top-center {
    align-items: flex-start;
    justify-content: center;
}

.emc-position-top-right {
    align-items: flex-start;
    justify-content: flex-end;
}

/* Center */
.emc-position-center-left {
    align-items: center;
    justify-content: flex-start;
}

.emc-position-center-center {
    align-items: center;
    justify-content: center;
}

.emc-position-center-right {
    align-items: center;
    justify-content: flex-end;
}

/* Bottom */
.emc-position-bottom-left {
    align-items: flex-end;
    justify-content: flex-start;
}

.emc-position-bottom-center {
    align-items: flex-end;
    justify-content: center;
}

.emc-position-bottom-right {
    align-items: flex-end;
    justify-content: flex-end;
}

/* =============================================
   CONTENIDO
   ============================================= */
.emc-custom-content {
    max-width: 100%;
}

.emc-custom-content-below {
    padding: 15px 5px;
}

.emc-custom-title {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.3;
}

.emc-custom-content-below .emc-custom-title {
    color: #333333;
}

.emc-custom-content-below .emc-custom-title a {
    color: inherit;
    text-decoration: none;
}

.emc-custom-content-below .emc-custom-title a:hover {
    opacity: 0.8;
}

.emc-custom-subtitle {
    display: block;
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
}

.emc-custom-content-below .emc-custom-subtitle {
    color: #666666;
}

.emc-custom-description {
    margin: 0 0 15px 0;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.emc-custom-content-below .emc-custom-description {
    color: #555555;
}

/* =============================================
   BOTON
   ============================================= */
.emc-custom-button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #ffffff;
    background-color: #333333;
    border: 2px solid #333333;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 5px;
}

.emc-custom-button:hover {
    color: #333333;
    background-color: #ffffff;
    border-color: #ffffff;
}

/* =============================================
   BADGE
   ============================================= */
.emc-custom-badge {
    position: absolute;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #e53935;
    color: #ffffff;
    border-radius: 4px;
    z-index: 10;
}

.emc-badge-top-left {
    top: 15px;
    left: 15px;
}

.emc-badge-top-right {
    top: 15px;
    right: 15px;
}

.emc-badge-bottom-left {
    bottom: 15px;
    left: 15px;
}

.emc-badge-bottom-right {
    bottom: 15px;
    right: 15px;
}

/* =============================================
   CONTADOR
   ============================================= */
.emc-custom-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    padding: 6px 12px;
    background-color: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    z-index: 10;
}

/* =============================================
   NAVEGACION SIDES
   ============================================= */
.emc-nav-sides-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.emc-nav-sides-btn.emc-prev {
    left: 25px;
}

.emc-nav-sides-btn.emc-next {
    right: 25px;
}

.emc-nav-sides-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .emc-custom-slide-image {
        height: 380px;
    }
    
    .emc-custom-title {
        font-size: 20px;
    }
}

@media (max-width: 767px) {
    .emc-custom-slide-image {
        height: 320px;
    }
    
    .emc-custom-title {
        font-size: 18px;
    }
    
    .emc-custom-subtitle {
        font-size: 11px;
    }
    
    .emc-custom-description {
        font-size: 14px;
    }
    
    .emc-custom-overlay {
        padding: 20px 15px;
    }
    
    .emc-custom-button {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* =============================================
   INICIALIZACION
   ============================================= */
.emc-custom-carousel:not(.initialized) .emc-custom-carousel-track {
    opacity: 0;
}

.emc-custom-carousel.initialized .emc-custom-carousel-track {
    opacity: 1;
    transition: opacity 0.3s ease, transform var(--transition-speed) cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* =============================================
   DRAGGING
   ============================================= */
.emc-custom-carousel.dragging {
    cursor: grabbing;
}

.emc-custom-carousel.dragging .emc-custom-carousel-track {
    transition: none;
}

.emc-custom-carousel.dragging .emc-custom-slide-link,
.emc-custom-carousel.dragging .emc-custom-button {
    pointer-events: none;
}

/* Mejorar clicks en móvil */
@media (max-width: 1024px) {
    .emc-custom-slide-link {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    .emc-custom-carousel:not(.dragging) .emc-custom-slide-link,
    .emc-custom-carousel:not(.dragging) .emc-custom-button {
        pointer-events: auto;
    }
}

/* =============================================
   ACCESIBILIDAD
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    .emc-custom-carousel-track,
    .emc-custom-slide-image img {
        transition: none;
    }
}
