/* assets/css/services-section.css */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&family=Open+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Copiado de index.css para tipografía */
  --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
}

* { 
    margin:0; 
    padding:0; 
    box-sizing:border-box; 
    font-family: var(--font-body);
    line-height: 1.7;
}

.slideshow {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    padding: 2rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

/* Capa de fondo con imagen - SIN z-index negativo */
.slideshow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: var(--background-image, none);
    opacity: 0.3;
    transition: opacity 0.8s ease, background-image 0.8s ease;
    pointer-events: none;
}

/* Overlay oscuro sobre el fondo */
.slideshow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(15, 23, 42, 0.7), rgba(30, 41, 59, 0.7));
    pointer-events: none;
}

/* Asegurar que el contenido esté sobre el fondo */
.section-header,
.services-content,
.arrow-controls {
    position: relative;
    z-index: 10;
}

/* Título de la sección */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl, 2rem);
    padding-top: 1rem;
}

.section-header h2 {
    font-size: var(--text-4xl); 
    font-weight: var(--font-bold);
    margin-bottom: 0.5rem;
    color: #ffffff;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative; 
    display: inline-block;
}

.section-header h2::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border-radius: 2px;
  transition: width .4s ease;
}

.section-header h2:hover::after {
  width: 100px;
}

.section-subtitle {
    font-size: var(--text-lg);
    color: #cbd5e1;
    max-width: 600px;
    margin: 0 auto;
}

/* Contenido principal - INFO IZQUIERDA, CARRUSEL DERECHA */
.services-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Panel de información - IZQUIERDA */
.info-panel {
    flex: 1;
    max-width: 500px;
    padding: 2rem;
    z-index: 10;
}

.service-title {
    font-size: var(--text-3xl); 
    font-weight: var(--font-bold);
    margin-bottom: 1.5rem;
    color: #ffffff;
    line-height: 1.2;
}

.service-text {
    font-size: var(--text-lg);
    line-height: 1.7;
    color: #e2e8f0;
    margin-bottom: 2.5rem;
}

.actions .btn {
    display: inline-block;
    padding: 12px 30px;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: var(--text-lg); 
    font-weight: var(--font-semibold);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.actions .btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

/* Contenedor del Carrusel - DERECHA */
.carousel-container {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 500px;
    min-height: 400px;
    z-index: 10;
}

/* Carrusel sin borde punteado, solo efecto pulsante */
.carousel {
    position: relative;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    animation: carouselPulse 4s ease-in-out infinite;
}

/* Pulso suave sin borde visible */
@keyframes carouselPulse {
    0%, 100% { 
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.2);
    }
    50% { 
        box-shadow: 0 0 0 30px rgba(59, 130, 246, 0.1);
    }
}

/* Slides que giran como galaxia */
.slide {
    position: absolute;
    border-radius: 50%;
    border: 3px solid rgba(59, 130, 246, 0.6);
    width: 90px;
    height: 90px;
    background-size: cover;
    background-position: center;
    background-color: #1e293b;
    transition: all 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* NO rotación automática en todos los slides, solo el activo pulsa */
.slide:hover {
    transform: scale(1.1);
    border-color: #3b82f6;
}

/* Resplandor del slide activo con rotación de imagen interna */
.slide.active {
    border: 3px solid #3b82f6;
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.8),
                0 0 40px rgba(59, 130, 246, 0.4);
    animation: activeSlideGlow 2s ease-in-out infinite;
    transform: scale(1.2);
}

/* Efecto de rotación de la imagen dentro del slide activo */
.slide.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    background-size: cover;
    background-position: center;
    animation: galaxyRotation 20s linear infinite;
    border-radius: 50%;
}

/* Rotación continua como galaxia */
@keyframes galaxyRotation {
    0% { 
        transform: rotate(0deg);
    }
    100% { 
        transform: rotate(360deg);
    }
}

@keyframes activeSlideGlow {
    0%, 100% { 
        box-shadow: 0 0 25px rgba(59, 130, 246, 0.8),
                    0 0 40px rgba(59, 130, 246, 0.4);
    }
    50% { 
        box-shadow: 0 0 35px rgba(59, 130, 246, 1),
                    0 0 60px rgba(59, 130, 246, 0.6);
    }
}

.arrow-controls {
    position: absolute;
    right: 2rem;
    bottom: 2rem;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    z-index: 20;
}

.arrow {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.arrow:hover {
    background: #3b82f6;
    transform: scale(1.1);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.5);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .services-content {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
    
    .info-panel {
        max-width: 100%;
        order: 1;
    }
    
    .carousel-container {
        order: 2;
    }
    
    .section-header h2 {
        font-size: clamp(var(--text-3xl), 4vw, var(--text-4xl));
    }
    
    .service-title {
        font-size: var(--text-2xl);
    }
}

@media (max-width: 768px) {
    .slideshow {
        padding: 1rem;
    }
    
    .section-header {
        margin-bottom: 1rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .carousel {
        width: 350px;
        height: 350px;
    }
    
    .slide {
        width: 80px;
        height: 80px;
    }
    
    .arrow {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .carousel {
        width: 280px;
        height: 280px;
    }
    
    .slide {
        width: 70px;
        height: 70px;
    }
    
    .arrow-controls {
        right: 1rem;
        bottom: 1rem;
    }
    
    .arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}