/* ===========================
   SECCIÓN EQUIPO (SLIDER)
=========================== */

.team-section {
    position: relative;
    background: var(--color-blanco);
    z-index: 4;
    padding-bottom: 4vw;
}

.team-container {
    position: relative;
    z-index: 2;
    transform: translateY(-6vw);
}

/* Botones de navegación */
.team-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-negro);
    color: var(--color-blanco);
    border: none;
    width: 48px;
    height: 48px;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.team-btn:hover {
    background: var(--color-rojo);
}
.team-btn--prev { left: calc(5% - 24px); }
.team-btn--next { right: calc(5% - 24px); }

/* ===========================
   SLIDER
=========================== */

.slider-container { 
    width: 90%; 
    max-width: 1200px; 
    height: 65vh; 
    min-height: 550px; 
    position: relative; 
    background: #fff; 
    box-shadow: 0 15px 50px rgba(0,0,0,0.08); 
    overflow: hidden; 
    margin: 0 auto; 
    color: #111; 
}

.slide { 
    position: absolute; inset: 0; display: flex; 
    opacity: 0; pointer-events: none; 
    transition: opacity 0.8s ease; 
}
.slide.active { opacity: 1; pointer-events: auto; z-index: 2; }

.img-container { 
    flex: 1.1; 
    overflow: hidden; 
    position: relative; 
    cursor: pointer; 
}

.slide img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: center 20%; 
    filter: grayscale(100%); 
    transform: translateX(-8%) scale(1.05); 
    transition: transform 1.8s cubic-bezier(0.16, 1, 0.3, 1); 
}
.slide.active img { 
    transform: translateX(0) scale(1); 
}

.text-container { 
    flex: 1; 
    padding: 60px 80px; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    background: #fff; 
    position: relative;
}

.text-wrap { overflow: hidden; margin-bottom: 8px; }

.slide .text-container h2, 
.slide .text-container h3, 
.slide .text-container p { 
    transform: translateY(100%); 
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1); 
    margin: 0; 
}

.slide.active h2 { 
    transform: translateY(0); transition-delay: 0.2s; 
    font-size: 3rem; font-weight: 900; 
    text-transform: uppercase; letter-spacing: -1px; 
}
.slide.active h3 { 
    transform: translateY(0); transition-delay: 0.35s; 
    color: var(--color-rojo, #930C20); 
    font-size: 1.1rem; margin-top: 10px; margin-bottom: 40px; 
    font-weight: 400; 
}

.slide.active p:not(.phrase) { 
    transform: translateY(0); transition-delay: 0.5s; 
    font-size: 1.2rem; line-height: 1.7; color: #444; max-width: 500px; 
}

p.phrase {
    font-family: var(--font-secondary);   /* CASaygonText */
    font-size: 0.95rem;
    font-weight: 600;                     /* Semibold = bold en CASaygonText */
    font-style: italic;
    color: var(--color-rojo);
    text-transform: none;                 /* quitamos el uppercase anterior */
    letter-spacing: 0.3px;
    padding-top: 10px;
    line-height: 1.5;
}
.slide.active p.phrase { 
    transform: translateY(0); 
    transition-delay: 0.65s; 
}
.slide.active .text-wrap:last-child p.phrase { 
    transition-delay: 0.75s;
}

/* ===========================
   RESPONSIVE MÓVIL
=========================== */
@media (max-width: 900px) {

    .team-section {
        padding-bottom: 20vw;
    }
    .team-container {
        transform: translateY(-8vw);
    }
    .team-btn--prev { left: 4px; }
    .team-btn--next { right: 4px; }

    .slider-container { 
        width: 95%; 
        height: auto !important;
        min-height: auto; 
        flex-direction: column;
        margin-bottom: 30px;
    }
    
    .slide { 
        flex-direction: column; 
    }
    
    .slide.active {
        position: relative !important;
    }

    .img-container { 
        flex: none; 
        width: 100%;
        height: 380px; 
        background-color: #fff; 
    }
    
    .slide img {
        object-fit: contain !important; 
        object-position: center top !important; 
        transform: none; 
    }
    .slide.active img {
        transform: none;
    }

    .text-container { 
        flex: none;
        width: 100%;
        padding: 10px 20px 40px 20px; 
        box-sizing: border-box;
        overflow-y: visible;
    }
    
    .slide.active h2 { font-size: 1.8rem; margin-bottom: 5px; margin-top: 15px; } 
    .slide.active h3 { font-size: 0.9rem; margin-top: 0; margin-bottom: 20px; }
    .slide.active p:not(.phrase) { font-size: 1rem; line-height: 1.5; }
    
    p.phrase {
    font-family: var(--font-secondary);   /* CASaygonText */
    font-size: 0.85rem;
    font-weight: 600;
    font-style: italic;
    color: var(--color-rojo);
    text-transform: none;
    letter-spacing: 0.3px;
    padding-top: 5px;
    line-height: 1.4;
}

    .text-container .text-wrap {
        overflow: visible !important; 
        padding-bottom: 5px; 
    }

    .slide.active p.phrase { 
        transform: translateY(0); 
        transition-delay: 0.65s; 
    }
    .slide.active .text-wrap:last-child p.phrase { 
        transition-delay: 0.75s; 
    }
}