/* Estilos específicos para la página sobre-nosotros.html */

/* ===== HERO SECTION ===== */
.about-hero {
    background: linear-gradient(135deg, rgba(75, 60, 187, 0.1) 0%, rgba(43, 212, 230, 0.1) 100%);
    padding: 150px 0 80px;
    text-align: center;
}

.about-hero h1 {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    position: relative;
}

.about-hero h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--secondary);
}

.about-hero p {
    font-size: 1.2rem;
    color: var(--gray);
    max-width: 800px;
    margin: 0 auto;
}

/* ===== SECCIÓN DE CONTENIDO PRINCIPAL ===== */
.about-content {
    background-color: white;
    padding: 80px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 30px;
    position: relative;
}

.about-text h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--secondary);
}

.about-text p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ===== CARRUSEL CIRCULAR INFINITO ===== */
.carousel-container {
    width: 100%;
    height: 350px;
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.carousel-track {
    display: flex;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    align-items: center;
    animation: slide 40s linear infinite;
}

.carousel-item {
    height: 300px; /* Fixed height */
    width: 300px; /* Fixed width */
    flex-grow: 0;
    flex-shrink: 0;
    flex-basis: 300px;
    margin: 0 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.carousel-item:hover {
    transform: scale(1.05);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@keyframes slide {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pausar animación al pasar el ratón */
.carousel-container:hover .carousel-track {
    animation-play-state: paused;
}

/* ===== SECCIÓN DE VALORES ===== */
.values {
    background: linear-gradient(135deg, rgba(75, 60, 187, 0.05) 0%, rgba(230, 55, 134, 0.05) 100%);
    padding: 80px 0;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.value-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.value-card:hover {
    transform: translateY(-10px);
}

.value-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.value-card h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 15px;
}

.value-card p {
    color: var(--gray);
}

/* ===== SECCIÓN DE MATERIALES ===== */
.materials {
    background-color: white;
    padding: 80px 0;
}

.material-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.material-text h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 30px;
    position: relative;
}

.material-text h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--accent);
}

.material-text p {
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.8;
}

.material-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.material-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===== DISEÑO RESPONSIVE ===== */
@media (max-width: 992px) {
    .about-grid, .material-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-hero h1 {
        font-size: 2.5rem;
    }
    
    .carousel-item {
        height: 250px;
        width: 250px;
        flex-grow: 0;
        flex-shrink: 0;
        flex-basis: 250px;
    }
}

@media (max-width: 768px) {
    .about-hero {
        padding: 130px 0 60px;
    }
    
    .about-hero h1 {
        font-size: 2.2rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }

    .carousel-container {
        height: 300px;
    }
    
    .carousel-item {
        height: 220px;
        width: 220px;
        flex-grow: 0;
        flex-shrink: 0;
        flex-basis: 220px;
    }
}

@media (max-width: 576px) {
    .about-hero h1 {
        font-size: 2rem;
    }
    
    .about-text h2, .material-text h2 {
        font-size: 2rem;
    }
    
    .carousel-container {
        height: 250px;
    }
    
    .carousel-item {
        height: 200px;
        width: 200px;
        flex-grow: 0;
        flex-shrink: 0;
        flex-basis: 200px;
        margin: 0 10px;
    }
}

/* ===== NUEVO CARRUSEL RECONSTRUIDO ===== */
.new-carousel-container {
    width: 100%;
    height: 350px; /* Altura fija para el contenedor del carrusel */
    overflow: hidden;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.new-carousel-track {
    display: flex;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    /* Calculamos el ancho total del track: (número de items * (ancho del item + margen)) */
    /* Si queremos mostrar "casi dos" items, el ancho del item será un poco menos del 50% del contenedor */
    /* Para 12 items, y si cada item es 200px + 30px de margen, el track sería 12 * 230px = 2760px */
    /* Pero para el efecto de "casi dos", necesitamos que el track sea lo suficientemente largo para que la animación se vea fluida */
    width: max-content; /* Permitir que el contenido determine el ancho */
    align-items: center;
    animation: newSlide 40s linear infinite; /* Animación de desplazamiento */
}

.new-carousel-item {
    height: 300px; /* Altura fija para los items */
    width: 300px; /* Ancho fijo para los items, haciéndolos cuadrados */
    flex-shrink: 0; /* Evita que los items se encojan */
    flex-grow: 0; /* Evita que los items se estiren */
    flex-basis: 300px; /* Define el tamaño base para flexbox */
    margin: 0 15px; /* Margen entre items */
    border-radius: 8px; /* Bordes redondeados */
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.new-carousel-item:hover {
    transform: scale(1.05);
}

.new-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cubre el área del item, recortando si es necesario */
    display: block;
}

@keyframes newSlide {
    0% {
        transform: translateX(0);
    }
    /* El 50% de la animación debe mover exactamente la mitad de los items (los originales) */
    /* Si tenemos 6 items originales y 6 duplicados, el 50% del track es el ancho de los 6 originales */
    100% {
        transform: translateX(calc(-1 * (var(--item-width) + var(--item-margin)) * var(--num-original-items)));
    }
}

/* Pausar animación al pasar el ratón */
.new-carousel-container:hover .new-carousel-track {
    animation-play-state: paused;
}

/* Variables CSS para la animación */
.new-carousel-container {
    --item-width: 300px;
    --item-margin: 30px; /* 15px a cada lado */
    --num-original-items: 6; /* Número de items sin duplicar */
}

/* Responsive adjustments for the new carousel */
@media (max-width: 992px) {
    .new-carousel-container {
        --item-width: 250px;
        height: 300px;
    }
    .new-carousel-item {
        height: 250px;
        width: 250px;
        flex-basis: 250px;
    }
}

@media (max-width: 768px) {
    .new-carousel-container {
        --item-width: 220px;
        height: 270px;
    }
    .new-carousel-item {
        height: 220px;
        width: 220px;
        flex-basis: 220px;
    }
}

@media (max-width: 576px) {
    .new-carousel-container {
        --item-width: 200px;
        height: 250px;
    }
    .new-carousel-item {
        height: 200px;
        width: 200px;
        flex-basis: 200px;
        margin: 0 10px; /* Ajustar margen para pantallas pequeñas */
    }
}