:root {
    --accent-yellow: #FFD700;
    --accent-yellow-hover: #E6C200;
    --dark-gray: #000000;
    --medium-gray: #1A1A1A;
    --light-gray: #333333;
    --text-light: #FFFFFF;
    --border-radius-std: 8px;
    --box-shadow: 0 6px 15px rgba(255, 215, 0, 0.2);
    --transition-std: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-20px); }
}

.article-card.entering { animation: fadeIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
.article-card.exiting { animation: fadeOut 0.5s ease-in forwards; }

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--dark-gray);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

header {
    background-color: var(--medium-gray);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 2px solid var(--accent-yellow);
}

.header-content {
    max-width: 1200px; margin: 0 auto;
    padding: 1rem 1.5rem; display: flex;
    justify-content: space-between; align-items: center;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem; font-weight: 700;
    color: var(--accent-yellow); text-decoration: none; letter-spacing: 1px;
}

nav { display: flex; gap: 1.5rem; }
nav a {
    color: var(--text-light); text-decoration: none;
    font-weight: 500; padding: 0.5rem 0;
    position: relative; transition: var(--transition-std);
}
nav a::after {
    content: ''; position: absolute; bottom: 0; left: 0;
    width: 0; height: 2px; background-color: var(--accent-yellow);
    transition: width 0.3s ease;
}
nav a:hover::after, nav a.active::after { width: 100%; }
nav a.active { color: var(--accent-yellow); }
nav a i { margin-right: 0.5rem; }

.featured-video-section {
    background: var(--medium-gray); padding: 3rem 1.5rem; text-align: center;
}
.featured-content-wrapper {
    max-width: 1100px; margin: 0 auto;
    display: flex; align-items: center; gap: 2rem;
}
.video-text-content { flex: 1; text-align: left; }
.video-text-content h1 {
    font-family: 'Montserrat', sans-serif; font-size: 2.5rem;
    color: var(--accent-yellow); margin-bottom: 1rem;
}
.video-text-content p { font-size: 1.1rem; color: #ccc; margin-bottom: 1.5rem; }
.cta-button {
    background-color: var(--accent-yellow); color: var(--dark-gray);
    padding: 0.8rem 1.8rem; text-decoration: none; font-weight: bold;
    border-radius: var(--border-radius-std); transition: var(--transition-std);
    display: inline-block; box-shadow: var(--box-shadow);
}
.cta-button:hover {
    background-color: var(--accent-yellow-hover); transform: translateY(-3px);
}
.featured-video-wrapper {
    flex: 1.2; aspect-ratio: 16 / 9; border-radius: var(--border-radius-std);
    overflow: hidden; box-shadow: var(--box-shadow); background: #000;
}
.featured-video-wrapper iframe { width: 100%; height: 100%; border: none; }

/* ========= INICIA BLOQUE DE ESTILOS PARA SECCIÓN DE NOTICIAS ========= */
.news-section {
    background-color: var(--dark-gray);
    padding: 3rem 1.5rem;
    border-bottom: 1px solid var(--light-gray);
}
.news-content-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}
.news-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.5rem;
    color: var(--accent-yellow);
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 1rem;
}
.news-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-yellow);
}
.news-section .section-intro {
    text-align: center;
    max-width: 800px;
    margin: 1rem auto 3rem auto;
    font-size: 1.1rem;
    color: #ccc;
}

.news-project-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2.5rem;
    margin-bottom: 3rem;
    background-color: var(--medium-gray);
    border-radius: var(--border-radius-std);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.news-project-row.reverse {
    flex-direction: row-reverse;
}

.news-project-image {
    flex: 1 1 400px;
    min-height: 300px;
}

.news-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-project-image:hover img {
    transform: scale(1.05);
}

.news-project-text {
    flex: 1 1 500px;
    padding: 2rem;
}

.news-project-text h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: var(--accent-yellow);
    margin-bottom: 1rem;
}
.news-project-text p {
    color: #ccc;
    line-height: 1.7;
}

.secondary-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.secondary-news-card {
    background-color: var(--medium-gray);
    border-radius: var(--border-radius-std);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.secondary-news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.2);
}

.secondary-news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.secondary-news-content {
    padding: 1.5rem;
}

.secondary-news-content h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    color: var(--accent-yellow);
    margin-bottom: 0.5rem;
}
.secondary-news-content p {
    color: #ccc;
    line-height: 1.7;
}
.news-section .conclusion {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-gray);
    text-align: center;
}
.news-section .conclusion h3 {
    border-bottom: none;
    text-align: center;
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}
/* ========= FIN DEL BLOQUE DE ESTILOS PARA SECCIÓN DE NOTICIAS ========= */


.blog-main-content { max-width: 1200px; margin: 3rem auto; padding: 0 1.5rem; }
.blog-tools {
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--light-gray);
}
.filter-buttons { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.filter-btn {
    background: transparent; border: 1px solid var(--light-gray);
    color: var(--text-light); padding: 0.6rem 1.2rem;
    border-radius: 50px; cursor: pointer; transition: var(--transition-std);
}
.filter-btn:hover { background-color: var(--light-gray); border-color: var(--accent-yellow); }
.filter-btn.active {
    background-color: var(--accent-yellow); color: var(--dark-gray);
    border-color: var(--accent-yellow); font-weight: bold;
}
.search-bar { position: relative; width: 300px; max-width: 100%; }
.search-bar input {
    width: 100%; padding: 0.7rem 1rem 0.7rem 2.5rem;
    background-color: var(--medium-gray); border: 1px solid var(--light-gray);
    color: var(--text-light); border-radius: 50px; transition: var(--transition-std);
}
.search-bar input:focus {
    outline: none; border-color: var(--accent-yellow);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}
.search-bar i {
    position: absolute; top: 50%; left: 1rem;
    transform: translateY(-50%); color: var(--light-gray);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 2rem;
}
.article-card {
    background-color: var(--medium-gray); border-radius: var(--border-radius-std);
    overflow: hidden; box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column;
    position: relative; /* Añadido para posicionar el pseudo-elemento */
}
.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3);
}

/* ========= INICIO: ESTILOS PARA EL ARTÍCULO MÁS RECIENTE ========= */
.article-card--latest {
    border: 2px solid var(--accent-yellow);
}

.article-card--latest::before {
    content: 'Más Reciente';
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--accent-yellow);
    color: var(--dark-gray);
    padding: 5px 12px;
    border-radius: 0 var(--border-radius-std) 0 var(--border-radius-std);
    font-size: 0.9rem;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
    z-index: 1;
}
/* ========= FIN: ESTILOS PARA EL ARTÍCULO MÁS RECIENTE ========= */


.article-card img {
    width: 100%; height: 200px; object-fit: cover; display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.article-card:hover img {
    transform: scale(1.05);
}
.article-content { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.category-tag {
    background-color: var(--accent-yellow); color: var(--dark-gray);
    padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.8rem;
    font-weight: bold; align-self: flex-start; margin-bottom: 1rem;
}
.article-content h3 {
    font-family: 'Montserrat', sans-serif; font-size: 1.4rem; margin-bottom: 0.8rem;
}
.article-meta {
    display: flex;
    gap: 1rem;
    color: #aaa;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.article-meta span {
    display: flex;
    align-items: center;
}
.article-meta i {
    margin-right: 0.4rem;
    color: var(--accent-yellow);
}
.article-content p { color: #ccc; flex-grow: 1; margin-bottom: 1.5rem; }
.read-more-btn {
    background: transparent; border: 1px solid var(--accent-yellow);
    color: var(--accent-yellow); padding: 0.6rem; text-align: center;
    border-radius: var(--border-radius-std); text-decoration: none;
    font-weight: bold; transition: var(--transition-std); margin-top: auto;
}
.read-more-btn:hover { background-color: var(--accent-yellow); color: var(--dark-gray); }

.modal {
    display: none; position: fixed; z-index: 2000;
    left: 0; top: 0; width: 100%; height: 100%;
    overflow: auto; background-color: rgba(0, 0, 0, 0.8);
}
.modal-content {
    background-color: var(--medium-gray); margin: 5% auto;
    padding: 2rem; border: 1px solid var(--accent-yellow);
    width: 80%; max-width: 800px; border-radius: var(--border-radius-std);
    position: relative; box-shadow: var(--box-shadow);
}
.close-btn {
    color: #aaa; position: absolute; top: 1rem; right: 1.5rem;
    font-size: 2rem; font-weight: bold; cursor: pointer;
}
.close-btn:hover, .close-btn:focus { color: var(--accent-yellow); }
#modal-body h2 {
    color: var(--accent-yellow); font-family: 'Montserrat', sans-serif; margin-bottom: 1.5rem;
}
#modal-body img { max-width: 100%; height: auto; border-radius: var(--border-radius-std); margin-bottom: 1.5rem; }
#modal-body p, #modal-body li { line-height: 1.8; color: #ccc; margin-bottom: 1rem; }

footer {
    background-color: var(--medium-gray); color: #ccc;
    padding: 3rem 1.5rem; margin-top: 3rem;
    border-top: 2px solid var(--accent-yellow);
}
.footer-content {
    max-width: 1200px; margin: 0 auto; display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}
.footer-column h3 {
    color: var(--accent-yellow); margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
}
.footer-column p { margin-bottom: 1rem; color: #aaa; }
.footer-logo {
    font-family: 'Montserrat', sans-serif; font-size: 1.8rem;
    font-weight: 700; color: var(--accent-yellow); margin-bottom: 0.5rem;
}
.footer-links a {
    color: #ccc; text-decoration: none; display: block;
    margin-bottom: 0.5rem; transition: var(--transition-std);
}
.footer-links a:hover { color: var(--accent-yellow); }
.newsletter-form { display: flex; margin-bottom: 1.5rem; }
.newsletter-form input {
    flex-grow: 1; padding: 0.7rem; border: 1px solid var(--light-gray);
    background: var(--dark-gray); color: var(--text-light);
    border-radius: var(--border-radius-std) 0 0 var(--border-radius-std);
}
.newsletter-form input:focus { outline: none; border-color: var(--accent-yellow); }
.newsletter-form button {
    padding: 0.7rem 1rem; border: none; background: var(--accent-yellow);
    color: var(--dark-gray); font-weight: bold; cursor: pointer;
    border-radius: 0 var(--border-radius-std) var(--border-radius-std) 0;
    transition: var(--transition-std);
}
.newsletter-form button:hover { background: var(--accent-yellow-hover); }
.social-icons a {
    color: #ccc; background: var(--light-gray); width: 40px; height: 40px;
    border-radius: 50%; display: inline-flex; justify-content: center;
    align-items: center; margin-right: 0.5rem; text-decoration: none;
    transition: var(--transition-std); font-size: 1.2rem;
}
.social-icons a:hover {
    background: var(--accent-yellow); color: var(--dark-gray); transform: translateY(-3px);
}
.footer-bottom {
    max-width: 1200px; margin: 2rem auto 0; padding-top: 1.5rem;
    text-align: center; border-top: 1px solid var(--light-gray);
    color: #aaa; font-size: 0.9rem;
}

@media (max-width: 992px) {
    .featured-video-section { padding: 2rem 1.5rem; }
    .featured-content-wrapper { flex-direction: column; }
    .video-text-content h1 { font-size: 2rem; }
    .news-section h2 { font-size: 2rem; }
    .blog-tools { justify-content: center; }
}

@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 1rem; }
    nav { justify-content: center; flex-wrap: wrap; }
    .search-bar { width: 100%; }
    .news-project-row.reverse { flex-direction: row; } /* Mantener el orden en móvil */
}