/*
 * Hoja de estilos para la nueva página de inicio
 */

/* --- Estilos Generales de Sección --- */
.home-section {
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid #e9ecef;
}

/* Estilo para secciones alternas */
.home-section:nth-of-type(even) {
    background-color: #ffffff;
}

.home-section h2 {
    font-size: 2.2rem;
    color: #0056b3;
    margin-bottom: 2.5rem;
}

.container-seccion {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem; /* Añadido para compensar el contenedor principal eliminado */
}

/* --- 1. Hero Banner --- */
/* Estilo para el banner estático (fallback) */
.home-hero {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
}

/* Estilo para el carrusel */
.home-hero-carousel {
    position: relative;
    height: 70vh;
    color: white;
    overflow: hidden;
}
.carousel-container {
    height: 100%;
    width: 100%;
}
.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}
.carousel-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Overlay oscuro para legibilidad */
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 800px;
    padding: 2rem;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    background-color: rgba(0,0,0,0.3);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background-color 0.3s;
}
.carousel-control:hover {
    background-color: rgba(0,0,0,0.6);
}
.carousel-control.prev { left: 15px; }
.carousel-control.next { right: 15px; }

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    display: flex;
    gap: 10px;
}
.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}
.carousel-dot.active, .carousel-dot:hover {
    background-color: white;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

/* --- 2. Sección de Impacto --- */
.impacto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.stat-card {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: #333;
}

/* --- 3. Estilos de Botones CTA --- */
.cta-button {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    background-color: #007bff;
    color: white !important; /* Important para sobreescribir estilos de enlace genéricos */
    text-decoration: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* --- Sección CTA Doble --- */
.cta-doble-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    text-align: left;
}

.cta-card {
    background-color: #e9f5ff;
    padding: 2rem;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}

.cta-card h3 {
    font-size: 1.8rem;
    color: #0056b3;
    margin-bottom: 1rem;
}

.cta-card p {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.cta-button.secondary {
    background-color: #0056b3;
    align-self: flex-start;
}

/* --- 4. Sección de Blog --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.blog-post-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: left;
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.blog-post-card a {
    text-decoration: none;
    color: inherit;
}

.blog-post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.post-content h4 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.post-content .post-date {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 1rem;
    display: block;
}

.section-cta {
    margin-top: 2.5rem;
}

/* --- 5. Sección de Testimonios --- */
.testimonios-carousel {
    display: grid;
    /* Por defecto (móvil), es una columna */
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 0 auto;
}

.testimonio-slide {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-left: 2px solid #007bff;
    border-radius: 0 8px 8px 0;
    text-align: left;
}

.testimonio-texto {
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: #555;
}

.testimonio-autor {
    font-size: 0.9rem;
}

.testimonio-autor strong {
    display: block;
    color: #0056b3;
}

/* --- 6. Footer Colaboradores --- */
.footer-colaboradores {
    padding: 2rem 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 2rem;
    text-align: center;
}

.footer-colaboradores h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    font-weight: normal;
}

.colaboradores-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.colaboradores-logos img {
    max-height: 120px;
    max-width: 150px;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s, opacity 0.3s;
}

.colaboradores-logos a:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* --- Responsive --- */
@media (min-width: 992px) { /* En pantallas grandes (lg), 5 columnas */
    .testimonios-carousel {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .cta-doble-container {
        grid-template-columns: 1fr;
    }
}
