/* ========================================
   EQUIPOS.CSS - DPI del Perú
   Estilos para la sección de equipos
======================================== */

/* Sección Servicios */
.equipos-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10vh;
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding-top: 20vh !important;
    padding-bottom: 50vh !important;
    background-size: cover;
    background-position: bottom;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Título principal fijo */
.equipos-title {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 3;
    text-align: center;
    padding-bottom: 5vh;
}

.equipos-title.mobile {
    display: none;
}

.equipos-title h2 {
    font-size: 4vh;
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1;
}

/* Contenedor del carousel de equipos */
.equipos-carousel {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Servicio individual */
.equipo-item {
    display: none;
    align-items: center;
    transition: all 0.6s ease;
}

.equipo-item.active {
    opacity: 1;
    visibility: visible;
    display: flex;
    justify-content: center;
}

/* Contenido del equipo */
.equipo-content {
    display: grid;
    grid-template-columns: 50% 1fr;
    gap: 15vh;
    align-items: center;
    justify-items: center;
    width: 100%;
    margin: 0 auto;
}

/* Imagen lateral izquierda */
.equipo-imagen {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
}

.equipo-imagen img {
    position: relative;
    width: 75vh;
    top: 8vh;
    left: 8vh;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 3.2vh 6.4vh rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.equipo-item.active .equipo-imagen img {
    animation: slideInRight 0.8s ease forwards;
}

/* Información del equipo */
.equipo-info {
    font-size: 2vh;
    text-align: left;
    line-height: 1.3;
    color: #ffffff;
    max-width: 75vh;
    display: flex;
    flex-direction: column;
}

.equipo-item.active .equipo-info {
    animation: slideInRight 0.8s ease forwards;
}

/* Navegación siguiente */
.equipo-navegacion {
    position: absolute;
    display: flex;
    z-index: 4;
    width: 115%;
    justify-content: space-between;
}

/* Aro decorativo detrás de cada imagen */
.equipo-imagen::before {
    content: "";
    position: absolute;
    top: 35vh;
    left: 25vh;
    transform: translate(-30%, -60%);
    width: 120%;
    height: 120%;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: -1;
    opacity: 0;
    animation: none;
}

.equipo-item.active .equipo-imagen::before {
    animation: aroRotateIn 0.5s ease forwards;
}

/* Animaciones */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-16vh);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes aroRotateIn {
    0% {
        opacity: 0;
        transform: translate(-30%, -60%) rotate(-30deg) scale(0.2);
        filter: blur(0.5vh);
    }
    20% {
        opacity: 0.2;
        transform: translate(-30%, -60%) rotate(-20deg) scale(0.4);
        filter: blur(0.4vh);
    }
    50% {
        opacity: 0.6;
        transform: translate(-30%, -60%) rotate(-5deg) scale(0.7);
        filter: blur(0.2vh);
    }
    80% {
        opacity: 0.9;
        transform: translate(-30%, -60%) rotate(2deg) scale(0.95);
        filter: blur(0.8vh);
    }
    100% {
        opacity: 1;
        transform: translate(-30%, -60%) rotate(0deg) scale(1);
        filter: blur(0);
    }
}

@media (min-width: 1281px) {
    .equipo-content {
        width: 85%;
    }

    .equipo-imagen img {
        width: 70vh;
    }
}

/* Responsive */
@media (max-width: 1200px) {
    .equipo-content {
        grid-template-columns: 80vh 1fr;
        gap: 5vh;
    }
    
    .equipo-info {    
        max-width: 100%;
        padding: 0 10vh;
    }
    .equipo-navegacion {
        width: 95%;
    }
}

@media (max-width: 1200px) {
    .equipo-imagen::before {
        width: 100%;
        height: 100%;
    }
}

@media (max-width: 992px) {
    .equipos-title {
        display: none;
    }
    
    .equipos-title.mobile {
        display: flex;
        margin-bottom: 15vw;
        padding-bottom: 0;
    }

    .equipo-imagen img {
        width: 75vw;
        top: 4vh;
        left: 2vh;
    }

    .equipo-imagen::before {
        top: 30vw;
        left: 30vw;
    }

    .equipo-info {
        animation: slideInRight 0.8s ease forwards;
    }
    
    .equipos-carousel {
        padding: 0;
        min-height: auto;
        height: auto;
        position: relative;
    }
    
    .equipo-item {
        position: relative;
        height: auto;
        min-height: auto;
        display: none;
        opacity: 1;
        visibility: visible;
    }
    
    .equipo-item.active {
        position: relative;
        display: block;
    }
    
    .equipo-content {
        grid-template-columns: 1fr;
        gap: 3vh;
        text-align: center;
        height: auto;
        min-height: auto;
    }

    .equipo-imagen {
        margin-bottom: 5vh;
    }
}

@media (max-width: 768px) {
    .preparaciones-section {
        margin-top: -40vh !important;
    }
}

@media (max-width: 576px) {
    .equipos-section {
        padding-top: 15vh !important;
    }
    
    .equipo-info {
        padding: 0 8vh;
    }

    .equipos-title h2 {
        width: 80%;
        font-size: 3.5vh;
    }

    .equipo-descripcion p {
        text-align: justify;
    }

    .preparaciones-section {
        margin-top: -30vh !important;
    }

    .equipo-navegacion {
        top: 25vh;
    }
}

@media (max-width: 480px) {
    .preparaciones-section {
        margin-top: -20vh !important;
    }

    .equipo-navegacion {
        width: 100%;
    }

    .preparacion-navegacion {
        width: 150% !important;
    }
}