/* --------------------------------------------------------------
   HEADER PARALLAX
-------------------------------------------------------------- */
.header-parallax {
    background-image: url("img/Arbol_Redwood.jpg");
    min-height: 500px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.overlay-parallax {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
}

.title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    animation: fadeIn 2s ease-in;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    font-family: 'Poppins', sans-serif;
    animation: slideUp 2s ease-out;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .header-parallax { background-attachment: scroll; }
    .title { font-size: 2.5rem; }
    .subtitle { font-size: 1.1rem; }
}

@media (min-width: 769px) {
    .title { font-size: 4rem; }
    .subtitle { font-size: 1.6rem; }
}

/* --------------------------------------------------------------
   VIDEO HERO
-------------------------------------------------------------- */
.video-container {
    position: relative;
    min-height: 100vh; /* más seguro que 100vh en móviles */
    width: 100%;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.overlay-video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

.welcome-text {
    color: white;
    font-family: 'Poppins', sans-serif;
    text-align: center;
    animation: fadeInUp 1.5s ease-out;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .welcome-text h1 { font-size: 2rem; }
}

/* --------------------------------------------------------------
   ANIMACIONES
-------------------------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll animation */
.box {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s ease-out;
}
.box.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------
   NEWS CARDS
-------------------------------------------------------------- */
.news-card {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    height: 100%;
}
.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.news-image { height: 200px; object-fit: cover; }
@media (max-width: 768px) { .news-image { height: 180px; } }

.news-category {
    position: absolute;
    top: 15px; right: 15px;
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.8rem;
}
.category-academic { background: rgba(25, 135, 84, 0.9); color: white; }
.category-sports   { background: rgba(13, 110, 253, 0.9); color: white; }
.category-culture  { background: rgba(214, 51, 132, 0.9); color: white; }

.news-date   { font-size: 0.9rem; color: #666; }
.news-title  { font-weight: bold; margin: 10px 0; }
.news-excerpt{ color: #666; }

/* --------------------------------------------------------------
   CONTENT SECTIONS
-------------------------------------------------------------- */
.content-section { padding: 2rem 0; }
.section-container {
    background-color: #f5f5f5;
    border-radius: 10px;
    padding: 30px 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    margin: 20px 0;
}
.img-container { display: flex; justify-content: center; align-items: center; padding: 15px; }
.img-fluid { max-width: 100%; height: auto; }
.text-content { padding: 15px; }

@media (max-width: 767px) {
    .container { padding-left: 20px; padding-right: 20px; }
    .img-fluid { width: 100%; }
    .section-container { padding: 20px 15px; }
}

/* --------------------------------------------------------------
   STATS SECTION
-------------------------------------------------------------- */
.stats-section {
    background: linear-gradient(135deg, #92e27a, #419427);
    color: #000;
    padding: 80px 0;
    text-align: center;
}
.stats-title { margin-bottom: 60px; font-weight: bold; }
.counter-box {
    background: rgba(243, 132, 132, 0.1);
    border-radius: 10px;
    padding: 30px 20px;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}
.counter-box:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.counter-icon { font-size: 40px; margin-bottom: 15px; color: #000; }
.counter { font-size: 48px; font-weight: bold; margin-bottom: 10px; display: inline-block; }
.counter-text { font-size: 18px; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }
.plus-sign { display: inline-block; font-size: 36px; vertical-align: top; }

/* --------------------------------------------------------------
   TARJETA ÁRBOL
-------------------------------------------------------------- */
.exterior { padding: 20px; max-width: 100%; }
.tarjeta-arbol {
    display: flex;
    flex-direction: row;
    background-color: #92e27a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin: 10px auto;
}
.zona-imagen { width: 40%; flex-shrink: 0; }
.zona-imagen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zona-texto {
    width: 60%; padding: 16px;
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
}
.tarjeta-arbol h2 {
    color: white; font-size: 24px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}
@media (max-width: 480px) { .tarjeta-arbol h2 { font-size: 20px; } }

/* --------------------------------------------------------------
   CERTIFICATE CONTAINER
-------------------------------------------------------------- */
.certificate-container {
    background-color: #fff;
    border: 15px solid #92e27a;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    margin: 2rem 0;
    padding: 2rem;
    position: relative;
}
.certificate-header { text-align: center; margin-bottom: 2rem; padding-top: 2rem; }
.certificate-title { color: #1e7e34; font-weight: bold; font-size: 2rem; margin-bottom: 1rem; }
.school-name { font-size: 1.8rem; font-weight: bold; color: #343a40; margin-bottom: 1rem; }
.certificate-text { font-size: 1.2rem; line-height: 1.6; margin-bottom: 1.5rem; }
.certification-date { font-style: italic; margin-bottom: 1.5rem; }
.eco-badge { position: absolute; top: 10px; right: 10px; width: 120px; height: 120px; border-radius: 50%; overflow: hidden; }
.eco-badge img { width: 100%; height: 100%; object-fit: cover; }
.watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); opacity: 0.1; font-size: 8rem; color: #92e27a; z-index: 0; pointer-events: none; }

@media (max-width: 768px) {
    .certificate-title { font-size: 1.5rem; }
    .school-name { font-size: 1.5rem; }
    .certificate-text { font-size: 1rem; }
    .eco-badge { width: 90px; height: 90px; }
}
