:root {
    --rojo: #1e5631;
    --rojo-oscuro: #1e5631;
    --gris: #f4f4f4;
    --negro: #0a0a0a;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--gris);
    color: var(--negro);
    overflow-x: hidden;
}

/* =========================
        HERO CORREGIDO
========================= */
.hero {
    position: relative;
    height: 70vh; /* más altura para que la imagen no se corte */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0 1rem;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.5), rgba(0,0,0,0.2));
    z-index: 1;
}

.hero img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(65%); /* oscurecemos más para que el texto contraste */
    animation: zoomHero 20s ease-in-out infinite alternate;
}

.hero-text {
    position: relative;
    text-align: center;
    color: #fff;
    max-width: 800px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    z-index: 2;
    animation: fadeIn 1.8s ease-out forwards;
}

.hero-text h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem); /* Responsive: se adapta al ancho */
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1.2;
    margin-bottom: 1rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); /* Mejora contraste sobre la foto */
}

.hero-text p {
    font-size: clamp(1rem, 2.5vw, 1.3rem); /* Responsive */
    margin-top: 0.5rem;
    font-weight: 400;
    color: #f5f5f5;
    line-height: 1.7;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4); /* Legibilidad extra */
}

.btn-hero {
    display: inline-block;
    margin-top: 1.5rem;
    background: var(--rojo);
    color: #fff;
    padding: 0.8rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.3s, transform 0.2s;
}

.btn-hero:hover {
    background: var(--rojo-oscuro);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .hero { height: 55vh; }
    .hero-text h1 { font-size: 2rem; }
    .hero-text p { font-size: 1rem; }
    .btn-hero { padding: 0.6rem 1.5rem; font-size: 0.9rem; }
}


/* =========================
        HISTORIA CON CARDS
========================= */
.story-section {
    padding: 80px 20px;
    background: #f9f9f9;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    color: var(--rojo);
    text-align: center;
    position: relative;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-title::after {
    content: '';
    width: 90px;
    height: 4px;
    background: linear-gradient(90deg, var(--rojo), #ff7a7a);
    display: block;
    margin: 12px auto 0;
    border-radius: 3px;
    transition: width 0.4s ease, background 0.4s ease;
}

.section-title:hover::after {
    width: 140px;
    background: linear-gradient(90deg, #ff7a7a, var(--rojo));
}


.story-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1100px;
    margin: 0 auto;
}

.card-story {
    background: #ffffff;
    border-radius: 10px; /* más redondeado */
    padding: 30px 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* sombra más suave */
    text-align: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease; /* transición más fluida */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center; /* centrado vertical y horizontal */
    max-width: 350px; /* ancho limitado para que se vea mejor en grid */
    margin: 15px; /* espacio entre cards */
}

.card-story:hover {
    transform: translateY(-10px) scale(1.03); /* efecto más dinámico */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15); /* sombra más marcada */
}

.card-story h3 {
    font-size: 1.5rem; /* un poco más grande */
    font-weight: 700; /* más fuerte */
    margin-bottom: 15px;
    color: #03832f; /* reemplazo de var(--rojo) con color vibrante */
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.card-story h3:hover {
    color: #241c6f; /* pequeño cambio de color al pasar el mouse */
}

.card-story p {
    font-size: 1rem;
    color: #555; /* tono más suave que #444 */
    line-height: 1.7;
    margin: 0; /* evita márgenes extra */
}

/* Opcional: agregar efecto para links dentro de la card */
.card-story a {
    color: #1d3557;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.card-story a:hover {
    color: #457b9d;
}


@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
    }
    .card-story {
        padding: 25px 18px;
    }
    .card-story h3 {
        font-size: 1.2rem;
    }
    .card-story p {
        font-size: 0.95rem;
    }
}

/* =========================
        TIMELINE CAROUSEL
========================= */
.carousel-item img {
    width: 100%;
    height: 90vh;              /* más bajo en vista normal */
    object-fit: contain;       /* mostrar imagen completa */
    object-position: center;
    filter: brightness(75%);
    border-radius: 12px;
    background: #000;          /* fondo negro si sobra espacio */
}

.carousel-caption {
    bottom: 10%;
    background: rgba(0,0,0,0.6);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.carousel-caption h5 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--rojo);
}

.carousel-caption p {
    font-size: 1rem;
    color: #fff;
    margin-top: 0.5rem;
    line-height: 1.5;
}

.fullscreen-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 20;
    background: var(--rojo);
    color: white;
    border: none;
    padding: 0.6em 1em;
    font-size: 1em;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: background 0.3s, transform 0.2s;
}

.fullscreen-btn:hover {
    background: var(--rojo-oscuro);
    transform: scale(1.05);
}

/* =========================
   ESTILOS PARA FULLSCREEN
========================= */
:fullscreen .carousel-item img {
    height: 100vh !important;  /* ocupar toda la pantalla */
    width: 100%;
    object-fit: contain;       /* no recorta nada */
    border-radius: 0;
    background: #000;
}

:fullscreen .carousel-caption {
    bottom: 8%;
    max-width: 85%;
    background: rgba(0,0,0,0.5);
    font-size: 1.1rem;
}

:fullscreen .carousel-caption h5 {
    font-size: 1.8rem;
    color: #fff;
}

:fullscreen .carousel-caption p {
    font-size: 1.1rem;
    color: #f1f1f1;
}

:fullscreen .fullscreen-btn {
    top: 20px;
    right: 20px;
    background: #000;
    opacity: 0.8;
    padding: 0.7em 1.2em;
}

/* =========================
        RESPONSIVE TIMELINE
========================= */
@media (max-width: 992px) {
    .carousel-item img {
        height: 40vh;
    }
    .carousel-caption h5 {
        font-size: 1.3rem;
    }
    .carousel-caption p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .carousel-item img {
        height: 35vh;
    }
    .carousel-caption {
        padding: 0.8rem;
        font-size: 0.85rem;
    }
    .carousel-caption h5 {
        font-size: 1rem;
    }
    .carousel-caption p {
        font-size: 0.85rem;
    }
}
/* ===== FULLSCREEN FALSO (COMPATIBLE CON TODO) ===== */

.carousel-fullscreen {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    background: #000;
    z-index: 9999;
    padding: 0;
    margin: 0;
    overflow: hidden;
}

.carousel-fullscreen .carousel-item img {
    height: 100vh !important;
    width: 100vw !important;
    object-fit: contain !important;
    background: #000;
}

.carousel-fullscreen .carousel-caption {
    bottom: 8%;
    background: rgba(0,0,0,0.5) !important;
    max-width: 80%;
}

.carousel-fullscreen .fullscreen-btn {
    position: fixed;
    top: 20px !important;
    right: 20px !important;
    z-index: 10000;
    background: #000;
    color: #fff;
    opacity: 0.8;
}
