/* ======================================================
   VARIABLES BASE (colores, fuentes)
====================================================== */
:root {
  --color-primario: #007BFF;
  --color-secundario: #0056b3;
  --color-fondo: #f5f5f5;
  --color-claro: #ffffff;
  --color-oscuro: #333333;
  --fuente-principal: 'Arial', sans-serif;
}

/* ======================================================
   RESET / BASE
====================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  font-family: Arial, Helvetica, sans-serif;
  height: 100%;
  width: 100%;
  background-color: var(--color-fondo);
  padding-top: 50px;
}

/* ======================================================
   TIPOGRAFÍA GENERAL
====================================================== */
h1, h2, h3, h4 {
  font-weight: bold;
}

p {
  line-height: 1.6;
}

/* ======================================================
   HEADER / NAVEGACIÓN
====================================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--color-primario);
  color: white;
  padding: 10px 0;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1rem 1rem 0.5rem; 
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: nowrap;
}

/* === Logo === */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.5rem 1rem;
}

.logo img {
  height: 70px; /* ajusta según tu header */
  width: auto;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo img:hover {
  transform: scale(1.05);
  opacity: 0.9;
}
/* === fin Logo === */

.nav-links {
  list-style: none;
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.nav-links a:hover {
  background-color: var(--color-secundario);
}

/* ======================================================
   HERO / SECCIÓN PRINCIPAL
====================================================== */
#hero {
  height: 100vh;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
              url('fondo.jpg') no-repeat center center/cover;
  color: white;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 1rem;
}

#hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* ======================================================
   SECCIONES GENERALES
====================================================== */
section, #Sobre-nosotros, #Material-de-clases {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

#Sobre-nosotros h2, #Material-de-clases h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-oscuro);
}

#Sobre-nosotros p, #Material-de-clases p {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: var(--color-oscuro);
}

/* ======================================================
   FORMULARIOS
====================================================== */
form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

input, textarea, select {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  width: 100%;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group {
  margin-bottom: 1.5rem;
}

/* ======================================================
   BOTONES
====================================================== */
button,
.boton-redireccion {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  background-color: var(--color-primario);
  color: white;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

button:hover,
.boton-redireccion:hover {
  background-color: var(--color-secundario);
}

#hero .boton-redireccion {
  margin: 0.5rem;
}

@media (max-width: 768px) {
  #hero .boton-redireccion {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* ======================================================
   FORO: Temas y respuestas
====================================================== */
.container, .foro-container {
  max-width: 900px;
  margin: 2rem auto;
  background: var(--color-claro);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.tema, .respuesta {
  background-color: #fff;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 8px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.1);
}

.tema h3, .respuesta h4 {
  margin: 0 0 10px;
}

.meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.usuario-info {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.acciones {
  margin-top: 10px;
}

.acciones a {
  margin-right: 10px;
  color: var(--color-primario);
  text-decoration: none;
}

.acciones a:hover {
  text-decoration: underline;
}

/* ======================================================
   UTILS / CLASES REUTILIZABLES
====================================================== */
.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 2rem;
}

.mb-2 {
  margin-bottom: 2rem;
}

/* ======================================================
   FOOTER
====================================================== */
footer {
  background-color: var(--color-oscuro);
  color: white;
  text-align: center;
  padding: 1rem 0;
}

/* ======================================================
   RESPONSIVE (MÓVIL)
====================================================== */
@media screen and (max-width: 768px) {
  nav {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    flex-direction: column;
    align-items: center;
  }

  #hero h1 {
    font-size: 2.2rem;
  }

  .foro-container, .container {
    padding: 1rem;
  }

  .nav-links a {
    padding: 10px;
  }
}

@media screen and (max-width: 480px) {
  .logo {
    font-size: 1.2rem;
  }

  .nav-links {
    gap: 1rem;
  }
}
/* ======================================================
   MEJORAS RESPONSIVE (solo móviles)
====================================================== */

/* --- 1. Header y navegación en móvil --- */
@media screen and (max-width: 768px) {
  header {
    padding: 0.5rem 0;
  }

  nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 0.5rem 1rem;
    position: relative;
  }

  .logo img {
    height: 55px;
  }

  /* Botón hamburguesa */
  .menu-toggle {
    display: block;
    cursor: pointer;
    font-size: 1.8rem;
    color: white;
    background: none;
    border: none;
    position: absolute;
    right: 1rem;
    top: 1rem;
  }

  /* Ocultar enlaces al inicio */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: var(--color-primario);
    border-top: 1px solid rgba(255,255,255,0.2);
    margin-top: 1rem;
    padding-top: 0.5rem;
  }

  /* Mostrar enlaces cuando se active */
  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 12px;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
  }
}

/* --- 2. Ajustes generales de texto y secciones --- */
@media screen and (max-width: 600px) {
  section, #Sobre-nosotros, #Material-de-clases {
    padding: 2.5rem 1rem;
  }

  #hero h1 {
    font-size: 1.8rem;
    line-height: 1.3;
  }

  #hero p {
    font-size: 1rem;
  }

  form {
    width: 90%;
  }

  input, textarea, select, button {
    font-size: 0.95rem;
  }

  footer {
    font-size: 0.9rem;
    padding: 1rem;
  }
}
/* === MENÚ HAMBURGUESA === */

/* Ocultar el botón hamburguesa en escritorio */
.menu-toggle {
  display: none;
  font-size: 2rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* --- MODO MÓVIL --- */
@media (max-width: 768px) {
  nav {
    position: relative;
    flex-wrap: wrap;
  }

  /* Mostrar el botón hamburguesa */
  .menu-toggle {
    display: block;
  }

  /* Ocultar enlaces por defecto en móvil */
  .nav-links {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: var(--color-primario);
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  /* Mostrar cuando está activo */
  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 0.5rem 0;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 10px 0;
    font-size: 1.1rem;
  }
}
.financiacion {
  text-align: center;
  margin-top: 50px;
  margin-bottom: 30px;
}

.financiacion p {
  font-size: 1rem;
  color: #333;
  margin-bottom: 10px;
}

.financiacion img {
  width: 160px;
  height: auto;
  display: inline-block;
}

/* ====== Sección SOBRE NOSOTROS ====== */
.sobre-nosotros {
  text-align: center;
  max-width: 900px;
  margin: 3rem auto;
  line-height: 1.8;
}

.sobre-nosotros h1 {
  font-size: 2.2rem;
  color: #000;
  margin-bottom: 1.5rem;
}

.sobre-nosotros p {
  font-size: 1.1rem;
  color: #333;
  margin: 0 auto;
  max-width: 750px;
  line-height: 1.8;
}

/* ====== Sección MISIÓN Y VISIÓN ====== */
.mision-vision {
  background: #f9f9f9;
  padding: 2.5rem;
  border-radius: 10px;
  margin: 3rem auto;
  max-width: 900px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mision-vision h2 {
  color: #000;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.mision-vision p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 1rem;
}
/* --- FIX superposición en versión móvil (hero + formulario) --- */
@media (max-width: 768px) {

  /* Corrige el hero */
  .hero,
  #hero {
    position: relative !important;
    height: auto !important;
    padding: 3rem 1rem !important;
    background-size: cover !important;
    background-position: center !important;
  }

  /* Asegura que el texto del hero no tape el contenido siguiente */
  .hero * {
    position: relative !important;
    z-index: 2 !important;
  }

  /* Fija el espacio inferior del hero para que no empuje el formulario */
  .hero::after,
  #hero::after {
    content: "";
    display: block;
    height: 2rem;
  }

  /* Espacio superior extra para el formulario */
  #contacto {
    margin-top: 2rem !important;
    position: relative !important;
    z-index: 1;
    background: #fff !important;
  }

  /* Ajuste general de secciones */
  main, section {
    display: block;
    overflow: visible;
  }
}
