/* HERO SECTION */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 70vh;
    padding: 4rem 5vw;
    background: url("../images/000slider-1536x560.jpg") center/cover no-repeat;
    color: var(--blanco);
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
}

.hero__text {
    position: relative;
    max-width: 600px;
    z-index: 1;
}

.hero__text h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero__text .accent {
    color: var(--secondary);
}

.tagline {
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.hero__features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    display: grid;
    gap: .5rem;
    font-size: 1.1rem;
}

.hero__cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.triangle {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 14px solid var(--blanco);
}

/* ABOUT SECTION */
.about {
    padding: 5rem 5vw;
    background: var(--blanco);
    color: var(--gris);
}

.about__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1100px;
    margin: auto;
}

.about__text h2 {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.about__text p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.about__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 3rem;
    color: var(--secondary); 
    line-height: 1;
}

.stat span {
    font-size: .95rem;
    color: #666;
}

@keyframes count-up {
    from {
        transform: translateY(15px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.stat strong {
    animation: count-up .6s ease forwards;
}

/* TESTIMONIOS SECTION */
.testimonios {
    padding: 5rem 5vw;
    background: var(--gris-claro);
    color: var(--gris);
}

.testimonios h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
}

.testimonios__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-width: 1100px;
    margin: auto;
}

.testimonio {
    background: var(--blanco);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .06);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonio p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    position: relative;
}

.testimonio p::before {
    content: '“';
    font-size: 3.5rem;
    color: var(--secondary); 
    position: absolute;
    top: -10px;
    left: -15px;
    opacity: .25;
}

.testimonio footer {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonio img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--verde);
    border-color: var(--primary);
}

.testimonio cite {
    font-style: normal;
    font-size: .95rem;
    color: var(--gris-medio);  
}

.testimonio strong {
    color: var(--gris);
}


/* ===== HERO OPTIMIZADO CON IMAGEN RESPONSIVE ===== */
.hero-section {
    padding-top: 5rem; /* Compensa header */
    background: var(--gris-oscuro);
    overflow: hidden;
}

.hero {
    position: relative;
    width: 100%;
    height: 85vh;
    min-height: 600px;
    max-height: 900px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

/* Overlay oscuro para mejorar legibilidad del texto */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.5) 100%
    );
    z-index: 2;
}

/* Contenedor del texto rotativo */
.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--blanco);
    max-width: 800px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-content p {
    font-size: 1.5rem;
    font-weight: 400;
    margin: 0;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    opacity: 0.95;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Animación para el cambio de texto */
.hero-content.fade-out h1,
.hero-content.fade-out p {
    opacity: 0;
    transform: translateY(-10px);
}

.hero-content.fade-in h1,
.hero-content.fade-in p {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .hero {
        height: 75vh;
        min-height: 500px;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-content p {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 4.5rem;
    }
    
    .hero {
        height: 70vh;
        min-height: 450px;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 60vh;
        min-height: 400px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}
