/* Estilos CSS COMPLETOS Y CORREGIDOS */

/* Header mejorado */

.text-gradient-services {
    background: linear-gradient(45deg, #ffffff, #f8f9fa, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.divider-animated {
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #17a2b8, transparent);
    border-radius: 2px;
    animation: shimmer 2s ease-in-out infinite;
}

.lead-enhanced {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 0.95;
}

/* Stats */
.stat-item {
    text-align: center;
    padding: 0 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item:last-child { border-right: none; }

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #17a2b8;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Navegación ultra mejorada */
.service-navigation {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.nav-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.nav-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.filter-pills-container {
    flex: 1;
    overflow: hidden;
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.filter-pill.active,
.filter-pill:hover {
    background: linear-gradient(45deg, #17a2b8, #138496);
    color: white;
    border-color: #17a2b8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(23, 162, 184, 0.3);
}

/* CORRECCIÓN PARA CENTRADO MOBILE */
.services-carousel-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.services-carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    width: 100%;
}

.services-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s ease;
    padding: 1rem 0;
    width: max-content;
}

/* Cards COMPACTAS y RESPONSIVAS */
.service-card-compact {
    min-width: 280px;
    max-width: 340px;
    flex-shrink: 0;
}

.card-glass-compact {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    height: auto;
    display: flex;
    flex-direction: column;
}

.card-glass-compact:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.card-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1rem 0;
}

.service-icon-compact {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.reparacion-icon { background: linear-gradient(45deg, #dc3545, #c82333); }
.instalacion-icon { background: linear-gradient(45deg, #28a745, #218838); }
.asesoria-icon { background: linear-gradient(45deg, #17a2b8, #138496); }
.urgencia-icon { background: linear-gradient(45deg, #fd7e14, #e65100); }

.service-badge-compact {
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.reparacion-badge { background: linear-gradient(45deg, #dc3545, #c82333); }
.instalacion-badge { background: linear-gradient(45deg, #28a745, #218838); }
.asesoria-badge { background: linear-gradient(45deg, #17a2b8, #138496); }
.urgencia-badge { background: linear-gradient(45deg, #fd7e14, #e65100); }

.card-image-container-compact {
    position: relative;
    margin: 0.75rem 1rem;
    border-radius: 15px;
    overflow: hidden;
    height: 140px;
}

.card-image-compact {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card-glass-compact:hover .card-image-compact {
    transform: scale(1.05);
}

.image-overlay-compact {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-glass-compact:hover .image-overlay-compact {
    opacity: 1;
}

.btn-detail-compact {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    transform: translateY(15px);
}

.card-glass-compact:hover .btn-detail-compact {
    transform: translateY(0);
}

.price-tag-compact {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(45deg, #17a2b8, #138496);
    color: white;
    padding: 0.3rem 0.75rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 2px 10px rgba(23, 162, 184, 0.3);
}

.price-tag-compact.urgente {
    background: linear-gradient(45deg, #dc3545, #c82333);
    color: white;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.4);
    animation: pulse 2s infinite;
}

.card-content-compact {
    padding: 0 1rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-title-compact {
    color: white;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.service-description-compact {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
    margin-bottom: 1rem;
    flex: 1;
    font-size: 0.9rem;
}

.service-features-compact {
    margin-bottom: 0.75rem;
}

.feature-item-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
}

.rating-stars-compact {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.8rem;
}

.rating-text-compact {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
    margin-left: 0.3rem;
}

.btn-action-compact {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border: none;
    color: white;
    padding: 0.6rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-weight: 600;
    margin-top: auto;
    font-size: 0.9rem;
}

.btn-action-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    background: linear-gradient(45deg, #0056b3, #003d82);
}

.btn-action-compact.urgente {
    background: linear-gradient(45deg, #dc3545, #c82333);
    animation: pulse-glow 2s infinite;
}

.btn-action-compact.urgente:hover {
    background: linear-gradient(45deg, #c82333, #a71e2a);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

/* Paginación mejorada */
.pagination-container {
    text-align: center;
    margin-top: 2rem;
}

.service-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pagination-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-dot.active {
    background: #17a2b8;
    transform: scale(1.2);
}

.pagination-progress {
    width: 80px;
    height: 3px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #17a2b8);
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 20%;
}

/* CTA final */
.cta-container {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta-modern {
    padding: 0.75rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    border: 2px solid transparent;
}

.btn-cta-modern.whatsapp {
    background: linear-gradient(45deg, #25d366, #20b954);
    border-color: #25d366;
}

.btn-cta-modern.phone {
    background: linear-gradient(45deg, #007bff, #0056b3);
    border-color: #007bff;
}

.btn-cta-modern:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: white;
}

/* CORRECCIONES RESPONSIVE PARA CENTRADO PERFECTO */

/* TABLET ESPECÍFICO (768px - 1200px) - CORRECCIÓN OPTIMIZADA */
@media (min-width: 769px) and (max-width: 1199px) {
    /* Contenedor principal más compacto */
    .service-navigation {
        max-width: 100%;
        margin: 0 auto 1.5rem;
        padding: 0.75rem;
    }

    .services-carousel-wrapper {
        max-width: 100%;
        margin: 0 auto;
        padding: 0 1rem;
    }

    .services-carousel-container {
        padding: 0;
        overflow: hidden;
        width: 100%;
    }

    .services-track {
        gap: 1rem;
        padding: 0.5rem 0;
        display: flex;
        transition: transform 0.5s ease;
        justify-content: flex-start;
        margin: 0;
    }

    /* TARJETAS MÁS PEQUEÑAS Y COMPACTAS PARA TABLET */
    .service-card-compact {
        min-width: 260px !important; /* Reducido de 280px */
        max-width: 260px !important;
        flex-shrink: 0;
        height: auto;
    }

    .card-glass-compact {
        border-radius: 16px; /* Bordes más suaves */
        overflow: hidden;
        height: 100%;
        max-height: 400px; /* Limitar altura máxima */
    }

    /* Header más compacto */
    .card-header-compact {
        padding: 0.75rem 0.75rem 0;
    }

    /* Imagen MÁS PEQUEÑA */
    .card-image-container-compact {
        height: 100px !important; /* Reducido significativamente de 120px */
        margin: 0.5rem 0.75rem; /* Márgenes reducidos */
        border-radius: 12px;
    }

    /* Contenido más compacto */
    .card-content-compact {
        padding: 0 0.75rem 0.75rem; /* Padding reducido */
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        height: auto;
    }

    /* Tipografía MÁS PEQUEÑA */
    .service-title-compact {
        font-size: 0.95rem !important; /* Reducido aún más */
        font-weight: 700;
        margin-bottom: 0.4rem;
        line-height: 1.2;
    }

    .service-description-compact {
        font-size: 0.8rem !important; /* Reducido de 0.85rem */
        line-height: 1.25;
        margin-bottom: 0.6rem; /* Menos espacio */
        flex: 1;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Limitar a 2 líneas */
        line-clamp: 2; /* Estándar CSS */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Features más compactas */
    .service-features-compact {
        margin-bottom: 0.5rem;
    }

    .feature-item-compact {
        font-size: 0.7rem !important; /* Aún más pequeño */
        margin-bottom: 0.25rem;
        gap: 0.4rem;
    }

    .feature-item-compact i {
        font-size: 0.75rem; /* Iconos más pequeños */
    }

    /* Estrellas más compactas */
    .rating-stars-compact {
        margin-bottom: 0.5rem;
        font-size: 0.7rem;
        gap: 0.1rem;
    }

    .rating-text-compact {
        font-size: 0.7rem;
        margin-left: 0.2rem;
    }

    /* Botones MÁS PEQUEÑOS */
    .btn-action-compact {
        padding: 0.45rem 0.75rem !important; /* Más pequeño */
        font-size: 0.8rem !important;
        border-radius: 16px;
        margin-top: 0.25rem;
    }

    .btn-detail-compact {
        padding: 0.35rem 0.7rem;
        font-size: 0.75rem;
        border-radius: 12px;
    }

    /* Iconos y badges más pequeños */
    .service-icon-compact {
        width: 36px; /* Reducido de 40px */
        height: 36px;
        font-size: 1.1rem; /* Reducido */
        border-radius: 10px;
    }

    .service-badge-compact {
        padding: 0.15rem 0.5rem; /* Más pequeño */
        font-size: 0.7rem;
        border-radius: 10px;
    }

    .price-tag-compact {
        padding: 0.25rem 0.6rem; /* Más pequeño */
        font-size: 0.75rem;
        border-radius: 12px;
        top: 8px;
        right: 8px;
    }

    /* Overlay mejorado para tablet */
    .image-overlay-compact {
        opacity: 0 !important; /* Volver al comportamiento hover */
        background: rgba(0, 0, 0, 0.7);
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.3s ease;
    }

    .card-glass-compact:hover .image-overlay-compact {
        opacity: 1 !important;
    }

    .card-glass-compact:hover .btn-detail-compact {
        transform: translateY(0) !important;
    }

    /* Navegación optimizada */
    .nav-btn {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .filter-pills-container {
        overflow-x: auto;
        padding: 0 0.5rem;
    }

    .filter-pill {
        padding: 0.5rem 0.9rem;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Stats más pequeñas */
    .stat-number {
        font-size: 1.6rem;
    }

    .stat-label {
        font-size: 0.8rem;
    }

    /* Paginación ajustada */
    .pagination-container {
        margin-top: 1rem;
    }

    .pagination-dot {
        width: 8px;
        height: 8px;
    }

    .pagination-progress {
        width: 60px;
        height: 2px;
    }
}

@media (max-width: 768px) {
    .services-carousel-container {
        padding: 0 1rem;
        overflow: visible;
    }

    .services-track {
        gap: 1rem;
        padding: 1rem 0.5rem;
    }

    .service-card-compact {
        min-width: calc(100vw - 4rem);
        max-width: calc(100vw - 4rem);
        flex-shrink: 0;
    }

    /* Botón overlay siempre visible en mobile */
    .image-overlay-compact {
        opacity: 0.9 !important;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
        position: absolute;
        bottom: 0;
        top: auto;
        height: 50%;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding-bottom: 1rem;
    }

    .btn-detail-compact {
        transform: translateY(0) !important;
        background: linear-gradient(45deg, #007bff, #0056b3);
        border: 2px solid rgba(255, 255, 255, 0.3);
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        border-radius: 15px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    .nav-container {
        gap: 1rem;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .filter-pills {
        gap: 0.25rem;
    }

    .filter-pill {
        padding: 0.5rem 0.9rem;
        font-size: 0.8rem;
    }

    .stat-item {
        padding: 0 0.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .services-carousel-container {
        padding: 0 0.5rem;
    }

    .service-card-compact {
        min-width: calc(100vw - 2rem);
        max-width: calc(100vw - 2rem);
    }

    .services-track {
        gap: 0.5rem;
        padding: 1rem 0.25rem;
    }

    .card-content-compact {
        padding: 0 0.75rem 0.75rem;
    }

    .card-image-container-compact {
        height: 120px;
        margin: 0.5rem 0.75rem;
    }

    .service-navigation {
        padding: 0.75rem;
    }

    .filter-pill {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Animaciones */

/* PREVENIR INTERACCIONES NO DESEADAS CON MODALES */
.modal {
    z-index: 9999;
}

.modal-backdrop {
    z-index: 9998;
}

.btn-detail-compact,
.btn-action-compact {
    position: relative;
    z-index: 10;
}
