/* ======================================================
   1. VARIABLES Y ESTILOS BASE
   ====================================================== */
:root {
    --primary-color: #C62828;
    --secondary-color: #3f3ec1;
    --dark-color: #1a1a1a;
    --light-color: #f4f4f4;
    --text-color: #333;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fdddd9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

img {
    max-width: 100%;
    display: block;
}

/* ======================================================
   2. ESTRUCTURA Y COMPONENTES (MÓVIL PRIMERO)
   ====================================================== */

/* --- Header y Navegación --- */
.site-header {
    background: #3f3ec1;
    color: #333;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    padding: 0 20px;
}
.logo {
    font-size: 24px;
    font-weight: bold;
color: #fff;
}

.logo { display: inline-block; background: var(--secondary-color); color: #fff !important; padding: 12px 25px; border-radius: 5px; font-weight: bold; transition: background-color 0.3s; }
.logo:hover { background: var(--primary-color); }


.hamburger-button {
    display: block;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color:  #fff;
}
.navigation-wrapper {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.navigation-wrapper.is-active { display: block; }
.main-nav { display: flex; flex-direction: column; }
.main-nav a { padding: 15px 20px; color: var(--text-color); border-bottom: 1px solid var(--light-color); font-weight: 600; }

/* --- Secciones Generales y Botones --- */
.hero {
    height: 70vh;
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('img/hero-background.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 20px;
}
.hero-content h1 { font-size: 2.5rem; margin-bottom: 10px; }
.btn-primary { display: inline-block; background: var(--primary-color); color: #fff !important; padding: 12px 25px; border-radius: 5px; font-weight: bold; transition: background-color 0.3s; }
.btn-primary:hover { background: var(--secondary-color); }

.page-title-section { background-color: var(--light-color); padding: 40px 20px; text-align: center; }
.page-title-section h1 { font-size: 2.2rem; }

/* --- Carrusel (Swiper) --- */
.swiper { width: 100%; height: 60vh; margin: 40px auto; }
.swiper-slide { text-align: center; font-size: 18px; background: #ddd; display: flex; justify-content: center; align-items: center; }
.swiper-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.swiper-pagination-bullet-active { background-color: var(--primary-color) !important; }
.swiper-button-next, .swiper-button-prev { color: var(--primary-color) !important; }

/* --- Tarjetas (Noticias, Equipo) --- */
.latest-news, .team-section { padding: 60px 20px; }
.latest-news h2, .team-preview h2 { text-align: center; font-size: 2.5rem; margin-bottom: 40px; }
.news-grid, .team-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
.news-card, .team-member-card { background: #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.1); border-radius: 8px; overflow: hidden; }
.news-card img, .member-photo img { width: 100%; height: 220px; object-fit: cover; }
.news-content, .member-info { padding: 20px; }
.member-name { font-size: 1.4em; }
.member-position { color: var(--primary-color); font-weight: 600; }
.btn-read-more { display: inline-block; padding: 8px 18px; margin-top: 15px; background: var(--dark-color); color: #fff; border-radius: 5px; }

/* --- Página de Artículo --- */
.article-container { max-width: 800px; margin: auto; padding: 40px 20px; }
.article-video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; margin-bottom: 30px; border-radius: 5px; }
.article-video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* --- Botón Flotante de WhatsApp --- */
.whatsapp-flotante { position: fixed; width: 60px; height: 60px; bottom: 30px; right: 30px; background-color: #25D366; color: #FFF; border-radius: 50%; text-align: center; font-size: 30px; box-shadow: 2px 2px 6px rgba(0,0,0,0.25); z-index: 100; display: flex; justify-content: center; align-items: center; animation: floatAnimation 3s ease-in-out infinite; }
.whatsapp-flotante:hover { transform: scale(1.1); animation-play-state: paused; }
@keyframes floatAnimation { 0% { transform: translateY(0); } 50% { transform: translateY(-10px); } 100% { transform: translateY(0); } }

/* --- Footer --- */
.site-footer { background: var(--dark-color); color: #a0a0a0; padding: 40px 20px 0 20px; }
.footer-container { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; text-align: center; gap: 30px; }
.footer-bottom { background: #000; padding: 20px; text-align: center; font-size: 14px; margin-top: 30px; }
.footer-bottom a { color: #fff; text-decoration: underline; }

/* ======================================================
   3. MEDIA QUERIES PARA TABLET Y ESCRITORIO
   ====================================================== */

@media (min-width: 768px) {
    .hamburger-button { display: none; }
    .navigation-wrapper, .navigation-wrapper.is-active {
        display: block; position: static; width: auto; background: none; box-shadow: none;
    }
    .main-nav { flex-direction: row; }
    .main-nav a { border-bottom: none; margin: 0 15px; }
    .news-grid, .team-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-container { flex-direction: row; text-align: left; justify-content: space-between; }
    .contact-grid { grid-template-columns: 2fr 1fr; }
    .about-grid { grid-template-columns: 1fr 1.5fr; }
}

@media (min-width: 1024px) {
    .news-grid { grid-template-columns: repeat(3, 1fr); }
    .team-grid { grid-template-columns: repeat(4, 1fr); }
    .hero-content h1 { font-size: 3.5rem; }
}