/*
Theme Name: BIOTA Tema a Medida
Theme URI: https://biota.org.bo
Author: Tu Nombre o Equipo de Desarrollo
Author URI: https://biota.org.bo
Description: Tema personalizado desarrollado desde cero y sin plugins para el Centro de Estudios en Biología Teórica y Aplicada (BIOTA).
Version: 1.0
Text Domain: biota-theme
*/

/* A partir de aquí escribiremos todo el diseño CSS más adelante */

/* ==========================================
   RESET Y ESTILOS GLOBALES
========================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; color: #333; }
.contenedor { max-width: 1200px; margin: 0 auto; padding: 20px; }
a { text-decoration: none; color: #e65100; }
.titulo-seccion { text-align: center; margin-bottom: 30px; font-size: 2rem; color: #2e7d32; }

/* ==========================================
   CARRUSEL (Preparación para JavaScript)
========================================== */
.hero-carrusel { position: relative; width: 100%; height: 500px; overflow: hidden; background: #000; }
.slide { display: none; width: 100%; height: 100%; position: absolute; top: 0; left: 0; }
.slide.activo { display: block; }
.slide img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.texto-slide { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: #fff; width: 80%; }
.texto-slide h2 { font-size: 3rem; text-shadow: 2px 2px 4px rgba(0,0,0,0.8); }

/* ==========================================
   GRID DE NOTICIAS (3 Columnas)
========================================== */
.grid-noticias { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.tarjeta-noticia { border: 1px solid #eee; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.imagen-noticia img { width: 100%; height: 200px; object-fit: cover; }
.contenido-noticia { padding: 20px; }
.btn-leer-mas { display: inline-block; margin-top: 10px; font-weight: bold; }

/* ==========================================
   CABECERA: Franja Naranja Superior
========================================== */
.top-bar { background-color: #d84315; color: #fff; font-size: 0.9rem; padding: 5px 0; }
.top-bar-flex { display: flex; justify-content: space-between; align-items: center; padding-top: 0; padding-bottom: 0; }
.contactos-top span { margin-right: 20px; }
.contactos-top i { margin-right: 5px; }
.redes-top { display: flex; align-items: center; gap: 15px; }
.texto-siguenos { font-weight: bold; }
.redes-top a { color: #fff; font-size: 1.2rem; background: #000; border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; }

/* ==========================================
   CABECERA: Barra Negra (Menú y Logo)
========================================== */
.nav-bar { background-color: #000; border-bottom: 3px solid #eee; }
.nav-bar-flex { display: flex; justify-content: space-between; align-items: center; padding-top: 10px; padding-bottom: 10px; }
.logo img { max-height: 50px; /* Ajusta este valor según el tamaño de tu logo */ }

/* Estilos del Menú de WordPress */
.menu-dinamico { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; }
.menu-dinamico li { position: relative; }
.menu-dinamico a { color: #fff; text-transform: uppercase; font-weight: bold; font-size: 0.85rem; padding: 10px 0; display: block; transition: color 0.3s ease; }
.menu-dinamico a:hover { color: #7cb342; /* Verde BIOTA */ }
.menu-dinamico .current-menu-item > a { color: #7cb342; } /* Color activo */

/* Botones de Control del Carrusel */
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background-color: rgba(0, 0, 0, 0.6); color: white; border: none; padding: 15px 20px; cursor: pointer; font-size: 24px; z-index: 10; transition: background 0.3s; }
.slider-btn:hover { background-color: #d84315; /* Naranja institucional */ }
.slider-btn.prev { left: 20px; }
.slider-btn.next { right: 20px; }

/* Botón Saber Más */
.btn-saber-mas { display: inline-block; margin-top: 20px; padding: 10px 25px; background-color: #7cb342; /* Verde BIOTA */ color: #fff; border-radius: 5px; font-weight: bold; transition: background 0.3s; }
.btn-saber-mas:hover { background-color: #558b2f; color: #fff; }

/* ==========================================
   PIE DE PÁGINA (FOOTER)
========================================== */
.pie-pagina { border-top: 3px solid #7cb342; padding: 30px 0; margin-top: 50px; background-color: #fff; }
.footer-flex { display: flex; justify-content: space-between; align-items: center; }
.footer-logo img { max-width: 250px; height: auto; }
.footer-derechos { color: #666; font-size: 0.95rem; }

/* Ajuste responsive para pantallas pequeñas */
@media (max-width: 768px) {
    .footer-flex { flex-direction: column; gap: 20px; text-align: center; }
}

/* ==========================================
   GRID DE PROYECTOS (4 Columnas)
========================================== */
.inicio-proyectos { background-color: #fafafa; padding-bottom: 40px; }
.grid-proyectos { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 30px; }
.tarjeta-proyecto { background: linear-gradient(to bottom, #ffe082, #ffecb3); border-radius: 15px; padding: 15px; text-align: center; box-shadow: 0 4px 8px rgba(0,0,0,0.1); display: flex; flex-direction: column; justify-content: space-between; }
.imagen-proyecto img { width: 100%; height: 180px; object-fit: cover; border-radius: 10px; margin-bottom: 15px; }
.titulo-proyecto { font-size: 1.1rem; color: #333; margin-bottom: 10px; min-height: 45px; }
.extracto-proyecto { font-size: 0.9rem; margin-bottom: 15px; flex-grow: 1; }

/* Botones y contenedores */
.ver-todos-contenedor { text-align: center; margin-top: 30px; border-top: 4px solid #7cb342; padding-top: 20px; }
.btn-ver-todos { font-size: 1.2rem; font-weight: bold; color: #2e7d32; text-transform: uppercase; transition: color 0.3s; }
.btn-ver-todos:hover { color: #d84315; }

/* ==========================================
   ARCHIVO DE PROYECTOS Y PAGINACIÓN
========================================== */
.archivo-proyectos { padding: 40px 0; background-color: #fafafa; }
.paginacion-proyectos { margin-top: 50px; text-align: center; }
.paginacion-proyectos .nav-links { display: flex; justify-content: center; gap: 10px; align-items: center; }
.paginacion-proyectos .page-numbers { padding: 10px 15px; border: 1px solid #7cb342; color: #333; font-weight: bold; border-radius: 5px; transition: 0.3s; }
.paginacion-proyectos .page-numbers:hover { background-color: #7cb342; color: #fff; }
.paginacion-proyectos .current { background-color: #7cb342; color: #fff; border-color: #7cb342; }


/* ==========================================
   VISTA INDIVIDUAL DE PROYECTO (Single)
========================================== */
.cabecera-proyecto-single { background-color: #2e7d32; color: #fff; padding: 40px 0; text-align: center; margin-bottom: 30px; }
.titulo-proyecto-single { font-size: 2.5rem; margin: 0; }
.contenido-proyecto-single { max-width: 900px; margin: 0 auto; background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.imagen-destacada-single img { width: 100%; height: auto; border-radius: 8px; margin-bottom: 30px; display: block; }
.cuerpo-texto-proyecto { font-size: 1.1rem; line-height: 1.8; color: #444; }
.cuerpo-texto-proyecto h2, .cuerpo-texto-proyecto h3 { color: #d84315; margin-top: 30px; margin-bottom: 15px; }
.text-center { text-align: center; }

/* ==========================================
   LÍNEAS DE ACCIÓN (PROGRAMAS)
========================================== */
.cabecera-lineas { margin: 40px 0; }
.titulo-principal-lineas { font-size: 3rem; font-style: italic; margin-bottom: 20px; }
.subtitulo-lineas { font-size: 1.3rem; font-style: italic; max-width: 900px; margin: 0 auto; font-weight: bold; }

.grid-programas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-bottom: 60px; }
.tarjeta-programa { background-color: #fcf9f2; border: 1px solid #e0dcd3; display: flex; flex-direction: column; box-shadow: 2px 2px 8px rgba(0,0,0,0.1); }
.imagen-programa img { width: 100%; height: 220px; object-fit: cover; }
.contenido-programa { padding: 20px; flex-grow: 1; }
.titulo-programa { color: #d84315; font-size: 1.2rem; text-align: center; text-transform: uppercase; font-style: italic; margin-bottom: 15px; }
.texto-programa { color: #d84315; font-style: italic; font-size: 1rem; }
.btn-programa { display: block; background-color: #7cb342; color: #fff; text-align: center; padding: 15px 0; font-weight: bold; text-decoration: none; transition: 0.3s; margin: 0 20px 20px 20px; }
.btn-programa:hover { background-color: #558b2f; color: #fff; }

@media (max-width: 900px) {
    .grid-programas { grid-template-columns: 1fr; }
}


/* ==========================================
   PUBLICACIONES (BOLIVIA INDAGA)
========================================== */
.layout-publicaciones { display: grid; grid-template-columns: 250px 1fr; gap: 40px; margin-bottom: 60px; align-items: start; }

/* Botones Izquierda */
.menu-publicaciones { display: flex; flex-direction: column; gap: 10px; }
.btn-pub-tab { background: #f9f9f9; border: 1px solid #e57373; color: #333; padding: 12px 15px; text-align: center; cursor: pointer; font-weight: bold; font-size: 0.95rem; transition: 0.3s; }
.btn-pub-tab:hover { background: #e57373; color: #fff; }
.btn-pub-tab.activo { background-color: #7cb342; border-color: #7cb342; color: #fff; }

/* Carruseles Derecha */
.pub-carrusel-contenedor { display: none; position: relative; width: 100%; background: #000; border-radius: 8px; overflow: hidden; }
.pub-carrusel-contenedor.activo { display: block; }
.pub-slider { position: relative; width: 100%; min-height: 400px; display: flex; align-items: center; justify-content: center; }
.pub-slide { display: none; width: 100%; text-align: center; }
.pub-slide.activo { display: block; }
.pub-slide img { max-width: 100%; max-height: 600px; object-fit: contain; }

/* Botones del Carrusel */
.pub-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.7); color: #000; border: none; padding: 10px 15px; cursor: pointer; font-size: 20px; font-weight: bold; border-radius: 50%; }
.pub-btn:hover { background: #fff; }
.pub-btn.prev { left: 10px; }
.pub-btn.next { right: 10px; }

@media (max-width: 768px) {
    .layout-publicaciones { grid-template-columns: 1fr; }
}

/* ==========================================
   MENÚ MÓVIL (RESPONSIVE)
========================================== */
.btn-menu-movil { display: none; background: none; border: none; color: #fff; font-size: 1.8rem; cursor: pointer; padding: 5px 10px; }

@media (max-width: 900px) {
    /* Ajustes barra superior */
    .contactos-top { display: none; /* Oculta teléfono/correo para ahorrar espacio */ }
    .top-bar-flex { justify-content: center; }
    
    /* Mostrar botón hamburguesa */
    .btn-menu-movil { display: block; }
    .nav-bar-flex { flex-wrap: wrap; }
    
    /* Ocultar menú principal por defecto */
    .menu-navegacion { display: none; width: 100%; background-color: #111; margin-top: 10px; padding: 15px 0; text-align: center; }
    .menu-navegacion.activo { display: block; }
    .menu-dinamico { flex-direction: column; gap: 15px; }
}