body {
  margin: 0;
  padding: 0;
  background: #f3f4f6;
  color: #042826;
  font-family: 'Manrope', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  font-size: 17px;
}

main {
  width: 100%;
}

.container {
  max-width: 1200px;
  margin: 2em auto;
}

/* Menu Nav */

    .navbar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      background-color: #ffffff;
      padding: 0 2rem;
      box-shadow: 0 2px 6px rgba(0,0,0,0.05);
      position: sticky;
      top: 0;
      z-index: 999;
    }

    .navbar .logo {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-weight: bold;
      font-size: 1.2rem;
    }

    .navbar nav {
      display: flex;
      gap: 2rem;
      align-items: center;
    }

    .navbar nav a {
      text-decoration: none;
      color: #042826;
      font-weight: 700;
      position: relative;
      padding: 1.5rem 0;
    }

.navbar nav a:hover {
  border-bottom: solid 3px #EF8354;
  transition: all 0.2s ease;
}

.dropdown {
  position: relative;
}

    .dropdown-content {
      display: none;
      position: absolute;
      top: 100%;
      left: 0;
      background-color: white;
      box-shadow: 0 4px 10px rgba(0,0,0,0.08);
      border-radius: 8px;
      overflow: hidden;
      min-width: 180px;
      z-index: 1000;
    }

.dropdown-content a {
  display: block;
  text-decoration: none;
  padding: 15px 10px !important;
}

    .dropdown:hover .dropdown-content {
      display: block;
    }

.perfil {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  position: relative;
  cursor: pointer;
}

.perfil .avatar {
      background-color: #72a276;
      color: white;
      font-weight: bold;
      border-radius: 50%;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
}

.perfil .dropdown-perfil {
      display: none;
      position: absolute;
      right: 0;
      top: 110%;
      background-color: white;
      box-shadow: 0 4px 10px rgba(0,0,0,0.08);
      border-radius: 8px;
      overflow: hidden;
      width: 200px;
      z-index: 1000;
    }

    .perfil:hover .dropdown-perfil {
      display: block;
    }

.dropdown-perfil a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: #042826;
}

.dropdown-perfil a:hover {
  background-color: #f4f4f4;
}

.dropdown-perfil .puntos {
      padding: 0.75rem 1rem;
      font-weight: bold;
      background-color: #f4f4f4;
}

.btn-pregunta {
  background-color: #EF8354;
  color: white;
  font-weight: bold;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  margin-right: 1rem;
  transition: background 0.2s ease;
}

.btn-pregunta:hover {
  background-color: darkorange;
}

.perfil-conjunto {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}


/* Fonts */

h1 {
  font-size: 2.5rem;
  margin: 1rem 0;
  color: #042826;
  font-family: 'Asap Condensed', sans-serif;
  font-weight: 600;
}

h2 {
  font-family: 'Asap Condensed', sans-serif;
  font-weight: 600;
  color: #042826;
}

h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 20px;
}

/* General */

button {
  background: #EF8354;
  color: #042826;
  border: none;
  padding: 10px 15px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
}

.button {
  background: #EF8354;
  color: #042826;
  border: none;
  padding: 10px 15px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
}

/** Comunidad **/

.cabecera {
  justify-items: center;
  margin: 0;
  padding: 2rem;
  background-color: #FAD6C7;
  width: 100%;
  text-align: center;
}

.cabecera p {
  font-size: 18px;
  margin-bottom: 2rem;
} 

.buscador {
  width: 600px;
  height: auto;
  text-align: left;
  border: solid 1px #a19ba2;
  background-color: #fff;
  border-radius: 999px;
  padding: 10px 20px;
  margin-bottom: 20px;
}

.categorias {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.categoria-card {
  background-color: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.categoria-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.categoria-card i {
  font-size: 2rem;
  color: #72a276;
}

.categoria-card h3 {
  font-size: 1.2rem;
  margin: 0.5rem 0 0;
}

.categoria-card p {
  font-size: 0.95rem;
  margin: 10px 0;
}

.recuadros {
  margin: 30px 0;
  padding: 20px;
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 12px rgba(0, 0, 0, 0.05);
}

.recuadro-pregunta {
  max-width: 800px;
  background-color: #FAD6C7;
  border-radius: 20px;
  padding: 10px 30px;
  margin: 0 auto;
}

.form-respuesta {
  border: solid 1px #a19ba2;
  border-radius: 30px;
  padding: 5px 10px;
  color: #a19ba2;
}

.form-respuesta input,
.form-respuesta textarea,
.form-respuesta select {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  background-color: #fff;
  font-family: inherit;
  color: #042826;
  outline: none;
  box-sizing: border-box;
}

.subir-foto label {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  background-color: #fff;
  border-radius: 12px;
  padding: 12px;
  cursor: pointer;
  font-weight: bold;
}

.subir-foto input[type="file"] {
  display: none;
}

/* Cuadros de últimas preguntas */

.ultimas-preguntas {
      background-color: #fff;
      padding: 2rem;
      border-radius: 12px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    }

    .pregunta-item {
      padding: 1rem 0;
      border-bottom: 1px dashed #ccc;
    }

    .pregunta-item:last-child {
      border-bottom: none;
    }

    .pregunta-item a {
      font-weight: bold;
      text-decoration: none;
      color: #EF8354;
      font-size: 1rem;
    }

    .pregunta-meta {
      font-size: 0.85rem;
      color: #777;
      margin-top: 0.25rem;
    }

.preguntas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2rem 0;
}

.badge-categoria {
  display: inline-block;
  background-color: #FAD6C7;
  color: #EF8354 !important;
  font-size: 0.75rem;
  padding: 3px 8px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  margin-left: 5px;
}

.estadisticas-foro {
  background-color: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.estadistica-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background-color: #f4f8f6;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: background 0.3s ease;
}

.estadistica-item i {
  font-size: 1.5rem;
  color: #72a276;
  min-width: 32px;
  text-align: center;
}

.estadistica-item strong {
  font-size: 1.2rem;
  color: #042826;
}

.estadistica-item p {
  margin: 0;
  font-size: 0.9rem;
  color: #555;
}

/* footer */

.cta-banner {
  text-align: center;
  background-color: #EF8354;
  padding: 3rem 2rem;
  border-radius: 20px;
  margin: 4rem auto;
  max-width: 1000px;
}

.cta-banner h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta-banner p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.btn-unirse {
  background-color: #042826;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
}

.footer {
  background-color: #042826;
  color: white;
  padding: 3rem 1.5rem 1rem;
  font-size: 0.95rem;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-col p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #EF8354;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col ul li a {
  color: white;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col ul li a:hover {
  color: #EF8354;
}

.footer-copy {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: #ccc;
}

/* Desplegables */

.pregunta-toggle {
  background-color: white;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.pregunta-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pregunta-toggle span {
  font-size: 1.2rem;
  font-weight: bold;
  color: #042826;
}

.icono-mas {
  background-color: #EF8354;
  color: white;
  border-radius: 8px;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icono-mas i {
  font-size: 1rem;
}

.formulario-contenedor {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding-top: 0;
}

.formulario-contenedor.activo {
  max-height: 1000px;
  padding-top: 1.5rem;
}

/* Preguntas */

.listado-preguntas {
  max-width: 800px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pregunta-cuadro {
  background-color: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.pregunta-titulo {
  font-size: 1.2rem;
  font-weight: bold;
  color: #042826;
  text-decoration: none;
}

.pregunta-texto {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #444;
}

.pregunta-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.pregunta-usuario {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pregunta-usuario img {
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.pregunta-usuario span {
  font-size: 0.85rem;
  color: #777;
}

.pregunta-acciones {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.respuestas {
  font-size: 0.9rem;
  font-weight: bold;
  color: #555;
}

.btn-responder {
  background: none;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-responder:hover {
  background-color: #f3f3f3;
}

/* Paginación */
.paginacion {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.paginacion a {
  text-decoration: none;
  color: #042826;
  font-weight: bold;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.paginacion a:hover {
  background-color: #eaf5ef;
}

.paginacion .activa {
  background-color: #EF8354;
  color: white;
}

#cga-buscador-resultados .resultado-item a {
  display: block;
  padding: 5px 0;
  border-bottom: 1px solid #eee;
  color: #333;
  text-decoration: none;
}
#cga-buscador-resultados .resultado-item a:hover {
  color: #0073aa;
}


.buscador {
  position: relative; /* Para que el resultado absoluto se base aquí */
  width: 100%;
}

#cga-buscador-input {
  width: 100%; border: none;
}

div#cga-buscador-resultados {
  position: absolute;
  top: 100%; /* justo debajo del input */
  left: 0;
  width: 100%; /* mismo ancho que el input */
  background-color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  z-index: 9999;
  max-height: 300px;
  overflow-y: auto;
  border-radius: 0 0 4px 4px;
}

ul#menu-inicio {
    display: flex;
    gap: 30px;
}

.logo img{
  width: 100%;
}

input[type="text"] {
    border: 0;
}

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.popup-contenido {
  background: white;
  padding: 2em;
  max-width: 600px;
  width: 90%;
  border-radius: 8px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.cerrar-popup {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #333;
}
