/* Variables de color y tipografía */
:root {
    --primary-green: #2ecc71;
    --dark-green: #27ae60;
    --white: #ffffff;
    --bg-light: #f4f9f5;
    --text-main: #333333;
    --text-muted: #666666;
    --font-family: 'Inter', sans-serif;
}

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-green {
    color: var(--primary-green);
}

.bg-light {
    background-color: var(--bg-light);
}

/* --- Navegación (Header) --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo a {
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-main);
}

.logo span {
    color: var(--primary-green);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary-green);
}

.btn-login {
    background-color: var(--primary-green);
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 50px;
    transition: background-color 0.3s;
}

.btn-login:hover {
    background-color: var(--dark-green);
}

/* Botón Hamburguesa */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-main);
    transition: all 0.3s ease;
}

/* --- Hero Section --- */
.hero {
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    background: linear-gradient(to bottom, var(--bg-light), var(--white));
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* --- Secciones Generales --- */
section {
    padding: 80px 0;
}

h2 {
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 40px;
    color: var(--dark-green);
}

/* --- Acerca de --- */
.about-text p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    text-align: justify;
}

/* --- Noticias --- */
.news-card {
    display: flex;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    gap: 20px;
}

.news-image {
    flex: 1;
    min-height: 300px;
    background-color: #e0e0e0; /* Fondo por si no carga la imagen */
}

.placeholder-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.badge {
    align-self: flex-start;
    background-color: var(--primary-green);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.news-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.news-content p {
    margin-bottom: 15px;
    color: var(--text-muted);
}

/* --- Footer --- */
footer {
    background-color: var(--dark-green);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.footer-logo span {
    color: #a8e6cf; /* Un verde más claro para contraste en el footer */
}

/* --- Responsividad (Móviles) --- */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        padding: 20px 0;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        margin: 15px 0;
        display: block;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .news-card {
        flex-direction: column;
    }
    
    .news-image {
        min-height: 250px;
    }
}

/* =========================================
   ESTILOS PARA LA PÁGINA DE LOGIN
   ========================================= */

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    /* Calcula el alto de la pantalla menos el header y footer para centrarlo perfecto */
    min-height: calc(100vh - 170px); 
    background-color: var(--bg-light);
    padding: 40px 20px;
}

.login-container {
    background-color: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-container h2 {
    margin-bottom: 10px;
    color: var(--dark-green);
    font-size: 2rem;
}

.login-container p {
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

.input-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-family);
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-green);
    /* Le da un ligero resplandor verde al escribir */
    box-shadow: 0 0 5px rgba(46, 204, 113, 0.3); 
}

.btn-submit {
    width: 100%;
    background-color: var(--primary-green);
    color: var(--white);
    border: none;
    padding: 15px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-family: var(--font-family);
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: var(--dark-green);
}

.login-note {
    margin-top: 25px !important;
    font-size: 0.85rem !important;
    color: #888 !important;
    border-top: 1px solid #eee;
    padding-top: 20px;
    line-height: 1.4;
}


/* =========================================
   ANIMACIONES DE SCROLL Y HOVER
   ========================================= */

/* Estado inicial (oculto y desplazado) */
.animate {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Tipos de movimiento */
.slide-up {
    transform: translateY(40px);
}

.slide-right {
    transform: translateX(-50px);
}

.slide-left {
    transform: translateX(50px);
}

.fade-in {
    transform: scale(0.95);
}

/* Estado final (Visible - Activado por JS) */
.animate.visible {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Retrasos para crear efecto cascada (uno tras otro) */
.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Efecto Hover extra para la tarjeta de noticias */
.news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}


/* =========================================
   FONDO ANIMADO DE BURBUJAS
   ========================================= */
.bubbles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Lo manda detrás de toda la página */
    overflow: hidden;
    pointer-events: none; /* Evita que las burbujas bloqueen clics en botones */
}

.bubble {
    position: absolute;
    bottom: -150px;
    background: rgba(46, 204, 113, 0.15); /* Verde TlaliBot muy transparente */
    border-radius: 50%;
    /* La animación se llama bounce-float y dura infinito */
    animation: bounce-float linear infinite;
}

/* Efecto de subir y rebotar de lado a lado */
@keyframes bounce-float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 1;
    }
    33% {
        transform: translateY(-35vh) translateX(30px);
    }
    66% {
        transform: translateY(-70vh) translateX(-20px);
    }
    100% {
        transform: translateY(-110vh) translateX(15px);
        opacity: 0; /* Desaparece suavemente arriba */
    }
}