/* === VARIABLES & RESET === */
:root {
    --primary-color: #556B2F;
    /* Verde Olivo elegante */
    --primary-dark: #3A4A20;
    /* Verde Olivo oscuro para hover */
    --secondary-color: #1a1a1a;
    /* Negro suave */
    --accent-color: #8F9779;
    /* Verde grisáceo para acentos sutiles */
    --text-dark: #111827;
    /* Casi negro para texto principal */
    --text-light: #4B5563;
    /* Gris oscuro para texto secundario */
    --bg-light: #F3F4F1;
    /* Blanco hueso/muy grisáceo claro para fondos alternos */
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

/* === UTILITIES === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.23);
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    line-height: 1.2;
}

/* === NAVBAR === */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.logo-img {
    height: 90px;
    width: auto;
    object-fit: contain;
}

/* === HERO SECTION === */
.hero {
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1522202176988-66273c2fd55f?auto=format&fit=crop&w=1951&q=80') center/cover no-repeat fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(20, 30, 10, 0.9) 0%, rgba(0, 0, 0, 0.95) 100%);
    /* Overlay más oscuro y verdoso */
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.9);
    /* Sombra fuerte */
    color: var(--white);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    font-weight: 300;
}

/* === SECTIONS === */
.section-header {
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.divider {
    height: 4px;
    width: 70px;
    background-color: var(--primary-color);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.lead-text {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

/* === NEWS GRID === */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: row-reverse;
    /* Texto izquierda, imagen derecha */
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-image {
    height: 100%;
    min-height: 250px;
    width: 40%;
    object-fit: cover;
}

.news-content {
    padding: 30px;
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.news-date {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-title {
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-family: var(--font-body);
    /* Override for cleaner look */
    font-weight: 700;
}

.news-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition);
}

.read-more:hover {
    gap: 10px;
}

/* === FOOTER === */
.footer {
    background-color: #0d1209;
    /* Negro verdoso muy oscuro */
    color: #E5E7EB;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer h3,
.footer h4 {
    color: var(--white);
    margin-bottom: 25px;
    font-family: var(--font-body);
}

.footer-contact p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #9CA3AF;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    color: #6B7280;
    font-size: 0.9rem;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === PUBLICACIONES === */
.publications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.pub-card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border-left: 5px solid var(--primary-color);
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.pub-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pub-icon {
    background-color: rgba(85, 107, 47, 0.1);
    color: var(--primary-color);
    min-width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.pub-content {
    flex-grow: 1;
}

.pub-date {
    font-size: 0.8rem;
    color: var(--text-light);
    display: block;
    margin-bottom: 5px;
}

.pub-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.pub-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.pub-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.pub-link:hover {
    color: var(--primary-dark);
}

/* === MODAL NOTICIAS === */
.modal {
    display: none;
    /* Oculto por defecto */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    /* Fondo oscuro semitransparente */
    backdrop-filter: blur(5px);
    overflow-y: auto;
    /* Permite scroll si el contenido es muy largo */
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: fadeInUp 0.3s ease-out;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: var(--text-light);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--primary-color);
}

.modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.modal-body {
    line-height: 1.8;
    color: var(--text-dark);
    margin-top: 20px;
    white-space: pre-wrap;
    /* Respeta los saltos de línea del texto */
}

@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        margin: 10% auto;
    }

    .modal-image {
        height: 200px;
    }
}

/* === MEDIA QUERIES === */
@media (max-width: 768px) {
    .news-card {
        flex-direction: column;
        /* Vuelta a vertical en móvil */
    }

    .news-image,
    .news-content {
        width: 100%;
    }

    .news-image {
        height: 250px;
        /* Altura fija en móvil */
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: white;
        /* Asegurar fondo sólido */
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .section-padding {
        padding: 60px 0;
    }
}