                
                
         #servicios {
    background: rgba(32, 32, 32, 0.9);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 120px;
    position: relative;
    height: 100vh;
}

.services-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 10;
}

.services-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.service-badge {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.service-badge:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.service-badge.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
}

/* CARRUSEL PANTALLA COMPLETA */
.services-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.carousel-slides {
    display: flex;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* ============================================
   IMÁGENES RESPONSIVAS OPTIMIZADAS
   ============================================ */

.carousel-slide picture.responsive-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.carousel-slide .carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
    transition: all 0.5s ease;
    
    /* Optimizaciones de renderizado */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* Mejora de rendimiento */
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform, opacity;
}

/* Estados de carga */
.carousel-img:not(.loaded) {
    opacity: 0;
    filter: blur(10px) brightness(0.3);
}

.carousel-img.loaded {
    opacity: 1;
    filter: brightness(0.4);
    animation: imageFadeIn 0.5s ease;
}

@keyframes imageFadeIn {
    from {
        opacity: 0;
        filter: blur(5px) brightness(0.3);
    }
    to {
        opacity: 1;
        filter: brightness(0.4);
    }
}

/* Fallback para imágenes sin picture */
.carousel-slide img:not(.carousel-img) {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4);
    object-position: center;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 80%;
    max-width: 800px;
    z-index: 10;
}

.slide-content h3 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.slide-content p {
    font-size: 1.3rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease 0.1s;
}

.slide-content .know-more-btn {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease 0.2s;
}

.carousel-slide.active .slide-content h3,
.carousel-slide.active .slide-content p,
.carousel-slide.active .slide-content .know-more-btn {
    opacity: 1;
    transform: translateY(0);
}

.know-more-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.know-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-nav:hover {
    background: rgba(0,0,0,0.7);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 30px;
}

.carousel-next {
    right: 30px;
}

.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.carousel-indicator {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: white;
    transform: scale(1.3);
}

/* ==========================================================================
   OPTIMIZACIONES RESPONSIVE POR DISPOSITIVO
   ========================================================================== */

/* Móviles pequeños (hasta 480px) */
@media (max-width: 480px) {
    .carousel-slide .carousel-img,
    .carousel-slide img:not(.carousel-img) {
        object-position: center 30%;
        min-height: 100vh;
        transform: translate3d(0, 0, 0); /* Forzar hardware acceleration */
    }
    
    .slide-content {
        padding: 1rem;
        width: 95%;
    }
    
    .slide-content h3 {
        font-size: 1.8rem !important;
        line-height: 1.2;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
    }
    
    .slide-content p {
        font-size: 1rem !important;
        line-height: 1.4;
    }
    
    .carousel-nav {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
    
    .carousel-prev {
        left: 10px;
    }
    
    .carousel-next {
        right: 10px;
    }
    
    .services-badges {
        gap: 0.4rem;
        padding: 0 1rem;
    }
    
    .service-badge {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }
}

/* Móviles grandes / Tablets pequeñas (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .carousel-slide .carousel-img,
    .carousel-slide img:not(.carousel-img) {
        object-position: center;
    }
    
    .slide-content h3 {
        font-size: 2.2rem !important;
    }
    
    .slide-content p {
        font-size: 1.1rem !important;
    }
    
    .carousel-nav {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .carousel-prev {
        left: 15px;
    }
    
    .carousel-next {
        right: 15px;
    }
    
    .services-badges {
        gap: 0.6rem;
    }
    
    .service-badge {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}

/* Tablets / Laptops pequeños (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    .carousel-slide .carousel-img,
    .carousel-slide img:not(.carousel-img) {
        object-position: center;
    }
    
    .slide-content h3 {
        font-size: 2.8rem !important;
    }
}

/* Laptops / Desktops (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
    .carousel-slide .carousel-img,
    .carousel-slide img:not(.carousel-img) {
        object-position: center;
    }
    
    .slide-content h3 {
        font-size: 3.2rem !important;
    }
}

/* Desktops grandes (1441px - 1920px) */
@media (min-width: 1441px) and (max-width: 1920px) {
    .carousel-slide .carousel-img,
    .carousel-slide img:not(.carousel-img) {
        object-position: center top;
    }
}

/* Pantallas 4K+ (1921px y más) */
@media (min-width: 1921px) {
    .carousel-slide .carousel-img,
    .carousel-slide img:not(.carousel-img) {
        object-position: center top;
        max-width: 100%;
        max-height: 100%;
    }
    
    .slide-content {
        max-width: 1000px;
    }
    
    .slide-content h3 {
        font-size: 4rem !important;
    }
    
    .slide-content p {
        font-size: 1.5rem !important;
    }
}

/* ==========================================================================
   OPTIMIZACIONES ESPECIALES
   ========================================================================== */

/* Optimización para orientación landscape en móviles */
@media (max-width: 768px) and (orientation: landscape) {
    .carousel-slide .carousel-img,
    .carousel-slide img:not(.carousel-img) {
        object-position: center 25%;
    }
    
    .slide-content {
        top: 45% !important;
        transform: translate(-50%, -45%) !important;
    }
    
    .services-header {
        margin-bottom: 1rem;
    }
}

/* Optimización para tablets en portrait */
@media (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
    .carousel-slide .carousel-img,
    .carousel-slide img:not(.carousel-img) {
        object-position: center 30%;
    }
    
    #servicios {
        height: 120vh;
    }
}

/* Pantallas retina */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .carousel-slide .carousel-img,
    .carousel-slide img:not(.carousel-img) {
        filter: brightness(0.35);
    }
}

/* Modo alto contraste */
@media (prefers-contrast: high) {
    .carousel-slide .carousel-img,
    .carousel-slide img:not(.carousel-img) {
        filter: brightness(0.3) contrast(1.2);
    }
    
    .slide-content h3 {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8) !important;
    }
}

/* Reducción de movimiento */
@media (prefers-reduced-motion: reduce) {
    .carousel-img.loaded {
        animation: none;
        opacity: 1;
    }
    
    .carousel-slides {
        transition-duration: 0.1ms !important;
    }
    
    .slide-content h3,
    .slide-content p,
    .slide-content .know-more-btn {
        transition: none !important;
    }
}

/* Reducción de datos */
@media (prefers-reduced-data: reduce) {
    .carousel-slide .carousel-img,
    .carousel-slide img:not(.carousel-img) {
        filter: brightness(0.45);
    }
}

/* Modo oscuro del sistema */
@media (prefers-color-scheme: dark) {
    .carousel-slide .carousel-img,
    .carousel-slide img:not(.carousel-img) {
        filter: brightness(0.35);
    }
}

/* Optimización de memoria en móviles */
@media (max-width: 768px) {
    .carousel-slide:not(.active) .carousel-img,
    .carousel-slide:not(.active) img:not(.carousel-img) {
        opacity: 0.3;
        transform: scale(0.95);
    }
    
    .carousel-slides {
        will-change: transform;
        backface-visibility: hidden;
        perspective: 1000px;
    }
}

/* Prevención de FOUC */
.carousel-slide img[data-src] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-slide img[src]:not([src=""]) {
    opacity: 1;
}

/* Para navegadores que soportan image-set (futuro) */
@supports (image-set: url("img.jpg") 1x) {
    .carousel-slide img:not(.carousel-img) {
        content: image-set(
            url("img-small.jpg") 1x,
            url("img-medium.jpg") 2x,
            url("img-large.jpg") 3x
        );
    }
}

/* Mejora Firefox */
@-moz-document url-prefix() {
    .carousel-slide .carousel-img,
    .carousel-slide img:not(.carousel-img) {
        image-rendering: auto;
    }
}

/* Evitar parpadeo en carga inicial */
.carousel-slide:first-child .carousel-img,
.carousel-slide:first-child img:not(.carousel-img) {
    opacity: 1 !important;
}

/* Fade-in mejorado cuando la imagen carga */
.carousel-slide.active .carousel-img.loaded {
    animation: enhancedFadeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes enhancedFadeIn {
    0% {
        opacity: 0;
        transform: scale(1.05);
        filter: blur(20px) brightness(0.2);
    }
    50% {
        opacity: 0.5;
        filter: blur(10px) brightness(0.3);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        filter: brightness(0.4);
    }
}

/* ==========================================================================
   RESPONSIVE GENERAL
   ========================================================================== */

@media (max-width: 768px) {
    #servicios {
        padding-top: 100px;
        height: auto;
        min-height: 100vh;
    }
    
    .services-carousel {
        position: relative;
        height: 80vh;
        min-height: 600px;
    }
    
    .carousel-container {
        height: 100%;
    }
    
    .services-header {
        position: relative;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }
    
    .modal-content {
        padding: 2rem;
        margin: 1rem;
        max-height: 90vh;
    }
}

@media (max-width: 480px) {
    #servicios {
        padding-top: 80px;
    }
    
    .services-carousel {
        height: 70vh;
        min-height: 500px;
    }
    
    .services-badges {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .service-badge {
        width: 90%;
        text-align: center;
        justify-content: center;
    }
}

/* ==========================================================================
   MODAL (mantener estilos originales)
   ========================================================================== */

.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, rgba(40, 40, 40, 0.95), rgba(32, 32, 32, 0.98));
    border-radius: 20px;
    padding: 3rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.service-modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-description {
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.modal-features {
    list-style: none;
    margin-bottom: 2rem;
}

.modal-features li {
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.modal-features li:before {
    content: "✓";
    color: #4CAF50;
    margin-right: 10px;
    font-weight: bold;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.modal-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.modal-btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.modal-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.modal-btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.modal-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}