/* ==========================================================================
   Home Page: Services Slider Section
   Estructura: Título Independiente -> Base Global -> Desktop -> Móvil
   ========================================================================== */

/* =========================================
   0. TÍTULO PRINCIPAL DE LA SECCIÓN (Independiente)
   ========================================= */
.services-global-header {
    background-color: #ffffff; /* Siempre blanco */
    width: 100%;
    padding-top: 80px; 
    padding-bottom: 30px; 
}

.services-header-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
}

.services-main-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500; 
    font-size: 40px;
    color: #000000; 
    margin: 0;
    padding-left: 2.5%; /* 40px responsivos basados en 1600px */
}

/* =========================================
   1. ESTILOS BASE GLOBALES Y TEMAS
   ========================================= */
.services-slider-section {
    width: 100%;
    /* Dejamos que el media query decida el overflow */
    transition: background-color 0.6s ease-in-out, color 0.6s ease-in-out;
}

/* --- CLASES DE TEMAS DE COLOR DINÁMICOS --- */
.services-slider-section.theme-white {
    background-color: #ffffff;
    color: #000000; 
}

.services-slider-section.theme-black {
    background-color: #000000;
    color: #ffffff; 
}

.services-slider-section.theme-beige {
    background-color: #F2F0E9;
    color: #000000; 
}

/* Tipografías base heredando el color del tema */
.service-title {
    font-size: clamp(40px, 5vw, 64px); 
    line-height: 1.1;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    color: inherit; 
}

.service-desc {
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 40px 0;
    max-width: 480px;
    color: inherit; 
    opacity: 0.8; 
}

/* =========================================
   BOTONES E INTERACCIONES (HOVER INTELIGENTE)
   ========================================= */

.btn-know-more {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    padding: 0 35px;
    height: 56px;
    border: 1px solid currentColor;
    border-radius: 50px;
    text-decoration: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px; 
    font-weight: 500;
    letter-spacing: 0.05em;
    color: inherit;
    text-transform: uppercase;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.slider-nav {
    display: flex;
    gap: 15px;
}

.nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

/* --- LÓGICA DE HOVERS SEGÚN EL TEMA --- */
.theme-white .btn-know-more:hover,
.theme-white .nav-btn:hover,
.theme-beige .btn-know-more:hover,
.theme-beige .nav-btn:hover {
    background-color: #000000;
    color: #ffffff; 
    border-color: #000000;
}

.theme-black .btn-know-more:hover,
.theme-black .nav-btn:hover {
    background-color: #ffffff;
    color: #000000; 
    border-color: #ffffff;
}

.service-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   2. DESKTOP VIEW (>= 1024px)
   Crossfade Slider Absoluto
   ========================================= */
@media (min-width: 1024px) {
    
    .services-slider-section {
        height: 700px; 
        padding: 0;
        overflow: hidden; /* En desktop sí usamos hidden para el crossfade */
    }

    .slider-main-wrapper {
        position: relative;
        height: 100%;
        max-width: 1600px;
        margin: 0 auto;
    }

    .service-slide {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        opacity: 0;
        pointer-events: none;
        visibility: hidden;
        transition: opacity 0.6s ease-in-out, visibility 0.6s;
    }

    .service-slide.active {
        opacity: 1;
        pointer-events: auto;
        visibility: visible;
        z-index: 2;
    }

    .service-img-col {
        width: 50%; 
        height: 100%;
    }

    .service-content-col {
        width: 50%; 
        padding-left: 80px; 
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .service-actions {
        display: flex;
        align-items: center;
        gap: 120px; 
    }
}

/* =========================================
   3. MOBILE VIEW (< 1024px)
   Efecto "Stacking Cards" con Position Sticky
   ========================================= */
@media (max-width: 1023px) {
    
    .services-slider-section {
        padding: 0;
        /* Usamos clip para evitar el scroll horizontal local sin romper el sticky */
        overflow: clip !important; 
        background-color: transparent !important; 
    }

    .slider-main-wrapper {
        display: block; 
        padding: 0 !important;
    }

    /* Tarjetas Pegajosas */
    .service-slide {
        display: flex;
        flex-direction: column;
        
        position: -webkit-sticky !important; /* Prefijo iOS */
        position: sticky !important;
        top: 0 !important;
        height: 100vh; 
        
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Colores individuales por tarjeta para el scroll */
    .service-slide[data-theme="white"] {
        background-color: #ffffff;
        color: #000000;
    }

    .service-slide[data-theme="black"] {
        background-color: #000000;
        color: #ffffff;
    }

    .service-slide[data-theme="beige"] {
        background-color: #F2F0E9;
        color: #000000;
    }

    /* Layout Interno Móvil */
    .service-img-col {
        width: 100%;
        height: 50vh; 
    }

    .service-content-col {
        width: 100%;
        height: 50vh; 
        padding: 40px 20px;
        display: flex;
        flex-direction: column;
        justify-content: flex-start; 
    }

    .service-title {
        font-size: 36px;
        margin-bottom: 20px;
    }

    .service-desc {
        font-size: 16px;
        margin-bottom: 30px;
    }

    /* Ocultamos navegación manual en móvil */
    .slider-nav {
        display: none;
    }
}