/* =========================
   SECCION SERVICIOS - REDISEÑADA
========================= */

.servicios {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 80px 60px;
    background: linear-gradient(180deg, rgba(25,22,40,0.3) 0%, rgba(30,26,50,0.5) 100%);
}

.servicios-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
}

.servicios-header h2 {
    font-size: 48px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff, #a66bd3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
}

.servicios-header h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #a66bd3, #5267D9, #3a2097);
    border-radius: 4px;
}

.servicios-header p {
    font-size: 18px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 30px;
}

/* =========================
   CARRUSEL PRINCIPAL
========================= */

.carousel-wrapper {
    width: 100%;
    max-width: 1300px;
    position: relative;
    margin: 20px auto;
}

.servicios-carousel {
    width: 100%;
    height: 600px;
    position: relative;
    overflow: hidden;
    border-radius: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(166, 107, 211, 0.2);
    transition: box-shadow 0.4s ease;
}

.servicios-carousel:hover {
    box-shadow: 0 40px 80px rgba(166, 107, 211, 0.3), 0 0 0 2px rgba(166, 107, 211, 0.3);
}

/* Slides - CORREGIDO: eliminar efectos de movimiento */
.slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.2s ease;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) contrast(1.1);
    /* ELIMINADO: transform: scale(1.05) y transition de transform */
    transition: filter 0.5s ease;
}

.slide.active img {
    /* ELIMINADO: transform: scale(1) */
    filter: brightness(0.7) contrast(1.2);
}

/* Overlay gradiente sobre la imagen - mejorado */
.slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(25, 22, 40, 0.8) 0%, 
        transparent 30%,
        transparent 70%,
        rgba(25, 22, 40, 0.8) 100%
    );
    pointer-events: none;
}

/* =========================
   PANEL DE SERVICIO - REDISEÑADO BLURRY
========================= */

.service-panel {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 480px;
    padding: 45px;
    border-radius: 40px;
    /* BLURRY INTENSO */
    background: rgba(20, 18, 30, 0.4);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-right: 1px solid rgba(166, 107, 211, 0.3);
    border-bottom: 1px solid rgba(166, 107, 211, 0.3);
    color: white;
    z-index: 20;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(166, 107, 211, 0.2) inset;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: panelFloat 6s infinite alternate ease-in-out;
}

@keyframes panelFloat {
    0% { transform: translateY(-50%) translateY(0); }
    100% { transform: translateY(-50%) translateY(-8px); }
}

.service-panel.left {
    left: 50px;
}

.service-panel.right {
    right: 50px;
}

.service-panel:hover {
    background: rgba(25, 22, 40, 0.5);
    backdrop-filter: blur(25px) saturate(200%);
    border-color: rgba(166, 107, 211, 0.5);
    border-right-color: rgba(166, 107, 211, 0.8);
    border-bottom-color: rgba(166, 107, 211, 0.8);
    box-shadow: 0 40px 80px rgba(166, 107, 211, 0.3), 0 0 0 2px rgba(166, 107, 211, 0.3) inset;
    transform: translateY(-50%) translateY(-5px) scale(1.02);
    animation-play-state: paused;
}

.service-panel h2 {
    font-size: 36px;
    margin-bottom: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff, #d4b5ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    letter-spacing: -0.5px;
}

.service-panel h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #a66bd3, #5267D9, #a66bd3);
    border-radius: 4px;
    box-shadow: 0 0 15px #a66bd3;
}

.service-panel.right h2::after {
    left: auto;
    right: 0;
}

.service-panel p {
    font-size: 17px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 25px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    font-weight: 400;
}

/* Características rápidas - chips */
.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 25px 0;
}

.service-feature {
    background: rgba(166, 107, 211, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(166, 107, 211, 0.4);
    border-radius: 40px;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 500;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.service-feature::before {
    content: '→';
    color: #a66bd3;
    font-weight: bold;
    font-size: 16px;
}

/* Botón de detalles mejorado - más blurry */
.service-detail-btn {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(166, 107, 211, 0.5);
    border-bottom: 1px solid rgba(166, 107, 211, 0.5);
    color: white;
    padding: 16px 32px;
    border-radius: 60px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.service-detail-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.service-detail-btn:hover {
    background: rgba(166, 107, 211, 0.25);
    backdrop-filter: blur(20px);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 40px rgba(166, 107, 211, 0.4);
    border-color: rgba(166, 107, 211, 0.8);
}

.service-detail-btn:hover::before {
    left: 100%;
}

.service-detail-btn svg {
    width: 22px;
    height: 22px;
    fill: white;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 5px rgba(166, 107, 211, 0.5));
}

.service-detail-btn:hover svg {
    transform: translateX(8px) scale(1.1);
}

/* =========================
   INDICADORES Y CONTROLES
========================= */

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-top: 30px;
}

/* Flechas mejoradas */
.carousel-arrow {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    font-size: 30px;
    color: white;
    background: rgba(20, 18, 30, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    cursor: pointer;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(166, 107, 211, 0.4);
    border-bottom: 1px solid rgba(166, 107, 211, 0.4);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.carousel-arrow:hover {
    background: rgba(166, 107, 211, 0.3);
    transform: scale(1.15) rotate(5deg);
    border-color: rgba(166, 107, 211, 0.8);
    box-shadow: 0 15px 30px rgba(166, 107, 211, 0.4);
}

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

/* Tabs/Dots mejorados */
.carousel-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
}

.tab {
    position: relative;
    padding: 12px 22px;
    color: white;
    border-radius: 50px;
    background: rgba(20, 18, 30, 0.35);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    font-size: 14px;
    font-weight: 500;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-right: 1px solid rgba(166, 107, 211, 0.3);
    border-bottom: 1px solid rgba(166, 107, 211, 0.3);
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.tab:hover {
    background: rgba(166, 107, 211, 0.25);
    border-color: rgba(166, 107, 211, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(166, 107, 211, 0.3);
}

.tab.active {
    background: rgba(166, 107, 211, 0.35);
    backdrop-filter: blur(20px);
    border-color: rgba(166, 107, 211, 0.8);
    font-weight: 600;
    box-shadow: 0 5px 20px rgba(166, 107, 211, 0.4);
}

/* Progress bar mejorada */
.progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 0%;
    background: linear-gradient(90deg, #a66bd3, #5267D9, #3a2097, #a66bd3);
    background-size: 200% 100%;
    animation: progressShimmer 2s linear infinite;
    box-shadow: 0 0 15px #a66bd3;
}

.tab.active .progress {
    animation: progressFill 10s linear forwards, progressShimmer 2s linear infinite;
}

@keyframes progressFill {
    from { width: 0%; }
    to { width: 100%; }
}

@keyframes progressShimmer {
    0% { background-position: 0% 0%; }
    100% { background-position: 200% 0%; }
}

/* =========================
   TARJETAS DE DETALLES (estilo Nosotros)
========================= */

.detalles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1300px;
    width: 100%;
    margin: 80px 0 20px;
}

.detalle-card {
    background: rgba(20, 18, 30, 0.35);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(166, 107, 211, 0.2);
    border-bottom: 1px solid rgba(166, 107, 211, 0.2);
    border-radius: 40px;
    padding: 40px 30px;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.3);
}

.detalle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: linear-gradient(180deg, #a66bd3, #5267D9, #3a2097);
    transition: height 0.6s ease;
    box-shadow: 0 0 20px #a66bd3;
}

.detalle-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(166, 107, 211, 0.4);
    background: rgba(30, 26, 45, 0.45);
    backdrop-filter: blur(20px);
    box-shadow: 0 40px 70px rgba(166, 107, 211, 0.3);
}

.detalle-card:hover::before {
    height: 100%;
}

.detalle-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 30px;
    color: #a66bd3;
    filter: drop-shadow(0 0 20px rgba(166, 107, 211, 0.5));
}

.detalle-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.detalle-card h3 {
    font-size: 26px;
    margin-bottom: 20px;
    color: #fff;
    font-weight: 600;
}

.detalle-card p {
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 25px;
}

.detalle-features {
    list-style: none;
    padding: 0;
}

.detalle-features li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.detalle-features li::before {
    content: '→';
    color: #a66bd3;
    font-weight: bold;
    font-size: 16px;
}

/* Animaciones de entrada */
.detalle-card {
    opacity: 0;
    transform: translateY(30px);
    animation: cardAppear 0.8s ease forwards;
}

.detalle-card:nth-child(1) { animation-delay: 0.1s; }
.detalle-card:nth-child(2) { animation-delay: 0.3s; }
.detalle-card:nth-child(3) { animation-delay: 0.5s; }

@keyframes cardAppear {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (max-width: 1200px) {
    .service-panel {
        width: 400px;
        padding: 35px;
    }
    
    .service-panel h2 {
        font-size: 30px;
    }
    
    .detalles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .servicios {
        padding: 60px 20px;
    }
    
    .servicios-carousel {
        height: 550px;
    }
    
    .service-panel {
        width: 85%;
        padding: 30px;
        left: 50% !important;
        right: auto !important;
        transform: translate(-50%, -50%);
        text-align: center;
    }
    
    .service-panel h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .service-panel.right h2::after {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }
    
    .service-panel.left,
    .service-panel.right {
        left: 50%;
        right: auto;
    }
    
    .service-features {
        justify-content: center;
    }
    
    .service-detail-btn {
        width: 100%;
        justify-content: center;
    }
    
    .detalles-grid {
        grid-template-columns: 1fr;
    }
    
    .carousel-controls {
        flex-direction: column;
        gap: 20px;
    }
    
    .carousel-tabs {
        order: -1;
    }
    
    .tab {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .carousel-arrow {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}







/* =========================
   MODO EXPANDIDO (FULLSCREEN)
========================= */

.service-panel.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 90%;
    max-width: 1100px;
    z-index: 10000;
    background: rgba(20, 18, 30, 0.7);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border: 1px solid rgba(166, 107, 211, 0.6);
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8), 0 0 0 2px rgba(166, 107, 211, 0.4) inset;
    animation: expandPanel 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
    padding: 60px;
}

.service-panel.expanded.left,
.service-panel.expanded.right {
    left: 50%;
    right: auto;
}

.service-panel.expanded:hover {
    transform: translate(-50%, -50%) scale(1.02);
    background: rgba(25, 22, 45, 0.75);
    border-color: rgba(166, 107, 211, 0.8);
}

.service-panel.expanded .service-features {
    margin: 30px 0;
}

.service-panel.expanded .service-feature {
    padding: 10px 22px;
    font-size: 15px;
    background: rgba(166, 107, 211, 0.25);
}

.service-panel.expanded .service-detail-btn {
    display: none; /* Ocultar botón en modo expandido */
}

.service-panel.expanded .close-expanded {
    display: flex !important;
}

.close-expanded {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 30px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10010;
}

.close-expanded:hover {
    background: rgba(166, 107, 211, 0.3);
    transform: rotate(90deg) scale(1.1);
    border-color: rgba(166, 107, 211, 0.8);
}

/* Overlay para modo expandido */
.expanded-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.expanded-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Contenido expandido adicional */
.expanded-content {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards 0.3s;
}

.expanded-section {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 30px;
}

.expanded-section h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #a66bd3;
    position: relative;
    display: inline-block;
}

.expanded-section h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #a66bd3, #5267D9);
    border-radius: 3px;
}

.expanded-section ul {
    list-style: none;
    padding: 0;
}

.expanded-section li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
}

.expanded-section li::before {
    content: '✓';
    color: #a66bd3;
    font-weight: bold;
    font-size: 18px;
    text-shadow: 0 0 10px #a66bd3;
}

.expanded-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 30px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50px;
}

.expanded-stat {
    text-align: center;
}

.expanded-stat .number {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #a66bd3, #5267D9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.expanded-stat .label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 5px;
}

@keyframes expandPanel {
    0% {
        transform: translate(-50%, -50%) scale(0.3);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ocultar elementos del carrusel cuando hay un panel expandido */
body.panel-expanded .carousel-controls,
body.panel-expanded .detalles-grid,
body.panel-expanded .servicios-header,
body.panel-expanded .slide:not(.active) {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.panel-expanded .slide.active {
    filter: brightness(0.3);
    transition: filter 0.5s ease;
}

body.panel-expanded .slide.active img {
    filter: brightness(0.3) blur(5px);
}

body.panel-expanded .carousel-tabs .tab {
    opacity: 0.2;
    pointer-events: none;
}

body.panel-expanded .carousel-tabs .tab.active {
    opacity: 1;
    pointer-events: none;
    background: rgba(166, 107, 211, 0.4);
}

/* Responsive para modo expandido */
@media (max-width: 768px) {
    .service-panel.expanded {
        padding: 40px 25px;
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .expanded-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .expanded-section {
        padding: 20px;
    }
    
    .expanded-stats {
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .close-expanded {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}

