/* Services Widget - Diseño Completamente Responsivo */

.ewg-services-carousel {
    position: relative;
    width: 100%;
    padding: clamp(40px, 8vw, 80px) 0;
    background: transparent;
}

.ewg-carousel-container {
    position: relative;
    width: 100%;    
    margin: 0 auto;
    padding: 0 clamp(15px, 4vw, 40px);
    overflow: hidden;
}

.ewg-carousel-track {
    display: flex;
    gap: clamp(10px, 2.5vw, 20px);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.ewg-service-card {
    position: relative;
    flex: 0 0 auto;
    width: clamp(260px, 30vw, 350px);
    min-height: clamp(380px, 45vw, 500px);
    overflow: hidden;
    cursor: pointer;
    background: #1a1a1a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ewg-service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

.ewg-service-card__image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.ewg-service-card:hover .ewg-service-card__image {
    transform: scale(1.12);
}

.ewg-service-card__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 0%,
        rgba(0, 0, 0, 0.3) 40%,
        rgba(0, 0, 0, 0.75) 70%,
        rgba(0, 0, 0, 0.9) 100%
    );
    transition: background 0.5s ease;
    z-index: 2;
}

.ewg-service-card:hover .ewg-service-card__overlay {
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.6) 30%,
        rgba(0, 0, 0, 0.85) 60%,
        rgba(0, 0, 0, 0.96) 100%
    );
}

.ewg-service-card__title-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: clamp(20px, 4vw, 40px) clamp(15px, 3vw, 30px) clamp(15px, 3vw, 30px);
    z-index: 3;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ewg-service-card__title {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 600;
    color: #ffffff;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    transition: all 0.5s ease;
}

.ewg-service-card:hover .ewg-service-card__title-wrapper {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.ewg-service-card__hover-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    padding: clamp(20px, 4vw, 40px) clamp(15px, 3vw, 30px);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    opacity: 0;
    visibility: hidden;
    transform: translateY(30px);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 15;
    pointer-events: none;
}

.ewg-service-card:hover .ewg-service-card__hover-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.ewg-service-card__content {
    width: 100%;
    color: #ffffff;
}

.ewg-service-card__hover-title {
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 clamp(10px, 2vw, 20px) 0;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ewg-service-card__description {
    font-size: clamp(13px, 1.5vw, 15px);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
    margin: 0 0 clamp(15px, 2.5vw, 25px) 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.1s backwards;
}

.ewg-service-card__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: clamp(6px, 1vw, 8px) clamp(8px, 1.5vw, 12px);
    background: transparent;
    color: #FDE047;
    text-decoration: none;
    font-weight: 600;
    font-size: clamp(13px, 1.5vw, 15px);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    animation: slideUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s backwards;
    z-index: 20;
    pointer-events: auto;
}

.ewg-service-card__button::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FDE047;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.ewg-service-card__button:hover::after {
    width: calc(100% - 24px);
}

.ewg-service-card__button svg {
    transition: transform 0.3s ease;
    color: #FDE047;
    width: clamp(14px, 1.5vw, 16px);
    height: clamp(14px, 1.5vw, 16px);
}

.ewg-service-card__button:hover {
    color: #FFB74D;
    text-decoration: none;
}

.ewg-service-card__button:hover svg {
    transform: translateX(5px);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ewg-carousel-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 12;
    padding: 0 clamp(5px, 1vw, 10px);
}

.ewg-carousel-arrow {
    width: clamp(45px, 6vw, 60px);
    height: clamp(45px, 6vw, 60px);
    background: #293b6b!important;
    border: none!important;
    border-radius: 50%!important;
    display: flex!important;
    align-items: center!important;
    justify-content: center!important;
    cursor: pointer!important;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94)!important;
    pointer-events: all;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15)!important;
    backdrop-filter: blur(10px);
}

.ewg-carousel-arrow:hover {
    background: #facc15!important;
    transform: scale(1.15);
    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.25);
}

.ewg-carousel-arrow:active {
    transform: scale(1.05);
}

.ewg-carousel-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none !important;
}

.ewg-carousel-arrow svg {
    color: #ffffff;
    width: clamp(24px, 4vw, 40px);
    height: clamp(24px, 4vw, 40px);
    transition: all 0.3s ease;
}

.ewg-carousel-arrow:hover:not(:disabled) svg {
    color: #ffffff;
    transform: scale(1.1);
}

.ewg-carousel-dots {
    display: flex;
    justify-content: center;
    gap: clamp(6px, 1vw, 10px);
    margin-top: clamp(30px, 5vw, 50px);
}

.ewg-carousel-dot {
    width: clamp(6px, 1vw, 8px);
    height: clamp(6px, 1vw, 8px);
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 0;
}

.ewg-carousel-dot:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: scale(1.4);
}

.ewg-carousel-dot.active {
    width: clamp(20px, 3vw, 28px);
    border-radius: 4px;
    background: #FDE047;
}

.ewg-services-carousel.is-dragging {
    cursor: grabbing;
}

.ewg-services-carousel.is-dragging .ewg-service-card {
    pointer-events: none;
    user-select: none;
}

.ewg-services-carousel.is-dragging .ewg-carousel-track {
    transition: none;
}

/* Breakpoints específicos para mejor control */

/* Desktop grande */
@media (min-width: 1400px) {
    .ewg-service-card {
        width: min(380px, 28vw);
        min-height: min(520px, 40vw);
    }
}

/* Desktop estándar */
@media (max-width: 1399px) and (min-width: 1200px) {
    .ewg-service-card {
        width: clamp(320px, 32vw, 350px);
        min-height: clamp(460px, 42vw, 500px);
    }
}

/* Tablet horizontal */
@media (max-width: 1199px) and (min-width: 992px) {
    .ewg-service-card {
        width: clamp(280px, 35vw, 320px);
        min-height: clamp(420px, 45vw, 480px);
    }
    
    .ewg-carousel-container {
        padding: 0 clamp(20px, 3vw, 30px);
    }
}

/* Tablet vertical */
@media (max-width: 991px) and (min-width: 768px) {
    .ewg-services-carousel {
        padding: clamp(40px, 6vw, 60px) 0;
    }
    
    .ewg-service-card {
        width: clamp(260px, 40vw, 300px);
        min-height: clamp(380px, 48vw, 450px);
    }
    
    .ewg-carousel-track {
        gap: clamp(8px, 2vw, 15px);
    }
}

/* ===== MÓVIL: SIN HOVER, CONTENIDO SIEMPRE VISIBLE ===== */
@media (max-width: 768px) {
    /* Quitar todos los efectos hover en móvil */
    .ewg-service-card:hover {
        transform: none !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
    }
    
    .ewg-service-card:hover .ewg-service-card__image {
        transform: none !important;
    }
    
    .ewg-service-card:hover .ewg-service-card__overlay {
        background: linear-gradient(
            180deg,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0.3) 40%,
            rgba(0, 0, 0, 0.75) 70%,
            rgba(0, 0, 0, 0.9) 100%
        ) !important;
    }
    
    /* Ocultar el título wrapper en móvil */
    .ewg-service-card__title-wrapper {
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(20px) !important;
    }
    
    /* Hacer el contenido hover siempre visible en móvil */
    .ewg-service-card__hover-content {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
        animation: none !important;
    }
    
    /* Asegurar que el contenido sea visible */
    .ewg-service-card__content {
        animation: none !important;
    }
    
    .ewg-service-card__hover-title {
        animation: none !important;
    }
    
    .ewg-service-card__description {
        animation: none !important;
    }
    
    .ewg-service-card__button {
        animation: none !important;
    }
    
    /* Quitar hover del botón en móvil */
    .ewg-service-card__button:hover {
        color: #FDE047 !important;
    }
    
    .ewg-service-card__button:hover::after {
        width: 0 !important;
    }
    
    .ewg-service-card__button:hover svg {
        transform: none !important;
    }
}

/* Móvil grande */
@media (max-width: 767px) and (min-width: 576px) {
    .ewg-services-carousel {
        padding: clamp(30px, 5vw, 50px) 0;
    }
    
    .ewg-service-card {
        width: clamp(240px, 50vw, 280px);
        min-height: clamp(360px, 55vw, 420px);
    }
    
    .ewg-carousel-container {
        padding: 0 clamp(10px, 2vw, 20px);
    }
    
    .ewg-carousel-track {
        gap: clamp(6px, 1.5vw, 12px);
    }
}

/* Móvil estándar */
@media (max-width: 575px) {
    .ewg-services-carousel {
        padding: clamp(25px, 4vw, 40px) 0;
    }
    
    .ewg-service-card {
        width: clamp(220px, 60vw, 260px);
        min-height: clamp(340px, 60vw, 400px);
    }
    
    .ewg-carousel-container {
        padding: 0 clamp(8px, 1.5vw, 15px);
    }
    
    .ewg-carousel-track {
        gap: clamp(5px, 1vw, 10px);
    }
    
    .ewg-carousel-arrow {
        width: clamp(40px, 8vw, 50px);
        height: clamp(40px, 8vw, 50px);
    }
    
    .ewg-carousel-arrow svg {
        width: clamp(20px, 5vw, 28px);
        height: clamp(20px, 5vw, 28px);
    }
}

/* Móvil muy pequeño */
@media (max-width: 375px) {
    .ewg-service-card {
        width: clamp(200px, 70vw, 240px);
        min-height: clamp(320px, 65vw, 380px);
    }
    
    .ewg-service-card__title-wrapper,
    .ewg-service-card__hover-content {
        padding: clamp(15px, 3vw, 25px) clamp(12px, 2.5vw, 20px);
    }
    
    .ewg-service-card__description {
        margin-bottom: clamp(10px, 2vw, 15px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}