/* =========================================================================================
   TEMA OSCURO + NEÓN ROJO — APUNTES / GUÍAS
   Archivo: estilos-extendidos.css (aprox. 650 líneas)
   Importante: Conserva todos los selectores originales. Solo cambia estética.
   ========================================================================================= */

/* ======================= VARIABLES ======================= */
:root {
  --primary: #d9bed8;
  --dark-bg: #212529;
  --accent: #357ab8;
  --radius: 0.375rem;
  --red: #357ab8;
  --color-claro: #1e90ff;
  --color-oscuro: #357ab8;
  --green: #2ecc71;
  --yellow: #f1c40f;
  --blue: #1e90ff;

  /* Extras para el tema */
  --panel-bg: #0f1013;
  --panel-grad-1: rgba(255, 77, 77, 0.08);
  --panel-grad-2: rgba(255, 77, 77, 0.02);
  --input-bg: #0b0c0f;
  --input-border: #2a2d36;
  --input-border-hover: #3a3f4d;
  --text-strong: #f1f1f1;
  --text-soft: #c9c9c9;
  --placeholder: #7a7f8a;
  --ring: rgba(255, 77, 77, 0.55);
  --ring-soft: rgba(255, 77, 77, 0.25);
  --shadow-soft: rgba(0, 0, 0, 0.55);
  --glow-red: 0 0 15px rgba(255, 77, 77, 0.8), 0 0 30px rgba(255, 77, 77, 0.6);
  --card-bg: #111215;
  --card-border: rgba(255, 77, 77, 0.28);
  --muted: #9aa0aa;
  --muted-2: #7c818c;
}

/* Modo claro: estas variables son locales a esta página (no viven en
   theme.css), así que sin este bloque los inputs, selects y tarjetas
   se quedaban oscuros aunque el resto del sitio pasara a modo claro. */
[data-theme="light"] {
  --panel-bg: #ffffff;
  --input-bg: #ffffff;
  --input-border: #d7dbe3;
  --input-border-hover: #b9c0cc;
  --text-strong: #1b1e27;
  --text-soft: #454a55;
  --placeholder: #7a7f8a;
  --shadow-soft: rgba(15, 18, 26, 0.12);
  --card-bg: #ffffff;
  --card-border: rgba(53, 122, 184, 0.28);
  --muted: #5b6270;
  --muted-2: #6b7280;
}

/* ======================= BASE ======================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  padding-top: 100px; /* alto del encabezado */
  padding-bottom: 150px; /* alto del footer */
}

body {
  font-family: "Arial", sans-serif;
  background-color: var(--dark-bg);
  color: var(--primary);
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}
a {
  color: var(--color-claro);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

h1,
h2 {
  text-align: center;
}

/* ================= ENCABEZADO ================= */
.encabezado {
  background: var(--surface-1, #212529);
  width: 100%;
  z-index: 999;
  top: 0;
  left: 0;
  position: fixed;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: background 0.4s ease;
  padding: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid #357ab8;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.auth-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.usuario-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.usuario-info .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--primary);
}

.usuario-info .correo {
  color: var(--primary);
  font-weight: bold;
  font-size: 0.95rem;
}

.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  background-color: var(--color-claro);
  color: white;
  font-weight: bold;
  transition: filter 0.2s ease, transform 0.06s ease, box-shadow 0.2s ease;
}

.btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}

.btn.cerrar-sesion {
  background-color: var(--accent);
}

/* ================= FORMULARIO REDISEÑADO: TEMA OSCURO + NEÓN ================= */
/* ================= FORMULARIO REDISEÑADO: TEMA OSCURO + NEÓN AZUL ================= */
.formulario {
  width: 90%;
  max-width: 600px;
  margin: 2rem auto;
  padding: 2.5rem 2rem;
  border-radius: 20px;

  /* Fondo oscuro con degradado azul sutil */
  background: linear-gradient(145deg, #0b0c10, #14171f);
  border: 1px solid rgba(30, 144, 255, 0.35);

  /* Sombra neón azul y efecto glass */
  box-shadow: 0 0 20px rgba(30, 144, 255, 0.15),
    inset 0 0 60px rgba(30, 144, 255, 0.05);

  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  color: var(--text-strong);

  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.formulario:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 35px rgba(30, 144, 255, 0.25),
    inset 0 0 80px rgba(30, 144, 255, 0.08);
}

.formulario label {
  font-weight: 600;
  color: var(--text-soft);
  margin-bottom: 0.4rem;
  letter-spacing: 0.5px;
}

.formulario input,
.formulario textarea,
.formulario select {
  width: 100%;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  color: var(--text-strong);
  font-size: 1rem;
  box-sizing: border-box;
  outline: none;
  transition: all 0.25s ease;
  box-shadow: inset 0 2px 4px rgba(30, 144, 255, 0.08);
  caret-color: #1e90ff; /* azul neón */
}

.formulario input:hover,
.formulario textarea:hover,
.formulario select:hover {
  border-color: #1e90ff;
  box-shadow: 0 0 6px #1e90ff;
}

.formulario input:focus,
.formulario textarea:focus,
.formulario select:focus {
  border-color: #1e90ff;
  box-shadow: 0 0 6px #1e90ff, 0 0 12px rgba(30, 144, 255, 0.35);
  transform: translateY(-1px);
  background-color: rgba(30, 144, 255, 0.05);
}

.formulario textarea {
  min-height: 140px;
  resize: vertical;
}

/* Botón guardar */
.btn.guardar {
  background: linear-gradient(135deg, #1e90ff, #3399ff);
  border: 1px solid rgba(30, 144, 255, 0.8);
  color: #fff;
  font-weight: bold;
  padding: 12px 20px;
  border-radius: 14px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 12px rgba(30, 144, 255, 0.5),
    0 6px 20px rgba(30, 144, 255, 0.25);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn.guardar:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 0 18px rgba(30, 144, 255, 0.65),
    0 8px 28px rgba(30, 144, 255, 0.35);
}

.btn.guardar:active {
  transform: translateY(0);
  box-shadow: 0 0 12px rgba(30, 144, 255, 0.35) inset;
}

/* Divisor con neón azul */
.formulario hr {
  border: none;
  height: 1px;
  margin: 1.5rem 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(30, 144, 255, 0.5),
    transparent
  );
}

/* Responsive */
@media (max-width: 768px) {
  .formulario {
    width: 95%;
    padding: 2rem 1.5rem;
    margin-top: 5rem;
  }
}

@media (max-width: 480px) {
  .formulario {
    padding: 1.5rem 1rem;
    margin-top: 6rem;
  }
  .formulario input,
  .formulario textarea,
  .formulario select {
    font-size: 0.95rem;
  }
}

/* Responsive: mostrar solo en pantallas pequeñas */
@media (max-width: 768px) {
  .menu-toggle {
    display: block; /* ya no necesita !important */
    background: none;
    border: none;
    color: var(--red);
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
  }

  .auth-section {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    background-color: #161618;
    padding: 1rem;
    position: absolute;
    top: 60px; /* ajustar según el alto del header */
    right: 0;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
  }
}
/* Botón Iniciar sesión */
.btn.iniciar-sesion {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(135deg, #357ab899, #212529);
  color: white;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid var(--red);
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn.iniciar-sesion:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #3498db, #357ab8);
  color: #fff;
}

/* Mostrar menú cuando está activo */
.auth-section.active {
  display: flex;
}

@media (max-width: 480px) {
  .formulario {
    width: 95%;
    padding: 1.5rem 1rem;
    margin-top: 6rem; /* suficiente espacio para el navbar */
  }

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

.formulario input,
.formulario textarea,
.formulario select {
  width: 100%;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  color: var(--text-strong);
  font-size: 1rem;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease,
    background-color 0.2s ease, transform 0.06s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  caret-color: var(--red);
}

.formulario label {
  font-weight: 600;
  margin-top: 0.5rem;
  display: block;
  color: var(--text-soft);
  letter-spacing: 0.2px;
}

.file-upload-wrapper {
  position: relative;
  width: 100%;
}

.file-upload-label {
  display: inline-block;
  background-color: var(--input-bg);
  color: var(--text-soft);
  padding: 0.75rem;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease,
    background-color 0.2s ease;
  border: 1px dashed #357ab8;
  margin-top: 0.5rem;
  width: 100%;
}
input[type="file"] {
  display: none;
}

.file-upload-label:hover {
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--ring-soft), 0 0 0 4px var(--ring);
}

.formulario input:hover,
.formulario textarea:hover,
.formulario select:hover {
  border-color: var(--input-border-hover);
}

.formulario input:focus,
.formulario textarea:focus,
.formulario select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--ring-soft), 0 0 0 4px var(--ring);
  transform: translateY(-1px);
}

.formulario input::placeholder,
.formulario textarea::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

.formulario textarea {
  min-height: 120px;
  resize: vertical;
}

.form-row,
.formulario .fila,
.formulario .grupo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

/* ================= FILTROS ================= */
.filtros {
  max-width: 700px;
  margin: -10px auto 2rem; /* Ajusta 120px según necesites */
  padding: 0 1rem;
  text-align: center;
}
@media (max-width: 768px) {
  .filtros {
    margin-top: 160px; /* antes 100px, ahora más abajo */
  }
}

@media (max-width: 480px) {
  .filtros {
    margin-top: 100px; /* antes 80px, ahora más abajo */
  }
}

.filtros select {
  padding: 0.5rem;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background-color: var(--input-bg);
  color: var(--text-strong);
  width: 300px;
  margin-top: 0.5rem;
  outline: none;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.filtros select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--ring-soft), 0 0 0 4px var(--ring);
}

/* ================= TARJETAS ================= */
.contenedor-apuntes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  padding: 1rem;
}

.tarjeta {
  flex: 0 1 220px; /* fuerza ancho uniforme */
  max-width: 240px;
}

.tarjeta {
  background-color: var(--card-bg);
  border-radius: 12px;
  padding: 1rem;
  width: 200px;
  box-shadow: 0 0 0 1px #357ab8, 0 0 20px #357ab8;
  text-align: center;
  border: 1px solid var(--card-border);
  transition: transform 0.2s, box-shadow 0.25s ease, border-color 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  word-wrap: break-word;
}
.tarjeta[style*="display: none"] {
  display: none !important;
}
.tarjeta:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 0 1px #357ab8, 0 0 28px #357ab8;
}
.tarjeta h3 {
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  color: var(--red);
  font-weight: 800;
}

.tarjeta img {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
  border-radius: 10px;
  margin: 0.4rem 0;
}

.tarjeta p {
  font-size: 0.85rem;
  margin: 0.2rem 0;
  color: #cfcfd4;
}

.tarjeta pre {
  background-color: #0f1216;
  color: #8affd4;
  padding: 0.6rem;
  border-radius: 10px;
  font-family: "Courier New", monospace;
  text-align: left;
  overflow-x: auto;
  font-size: 0.78rem;
  margin: 0.4rem 0;
  border: 1px solid #2b303b;
}

.tarjeta .acciones {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.boton-editar,
.boton-eliminar {
  padding: 0.35rem 0.6rem;
  font-size: 0.72rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: white;
  transition: filter 0.2s ease, transform 0.06s ease, box-shadow 0.2s ease;
}
.boton-editar {
  background-color: #2d89ff;
}
.boton-eliminar {
  background-color: var(--red);
}
.boton-editar:hover,
.boton-eliminar:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.tarjeta .autor {
  font-size: 0.7rem;
  color: #aaa;
  margin-top: 0.5rem;
}

/* ================= COLORES ================= */
.tarjeta.rojo {
  border-color: var(--red);
}
.tarjeta.azul {
  border-color: var(--blue);
}
.tarjeta.verde {
  border-color: var(--green);
}
.tarjeta.amarillo {
  border-color: var(--yellow);
}

.tarjeta.rojo h3 {
  color: var(--red);
}
.tarjeta.azul h3 {
  color: var(--blue);
}
.tarjeta.verde h3 {
  color: var(--green);
}
.tarjeta.amarillo h3 {
  color: var(--yellow);
}

/* ================= MODAL ================= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-contenido {
  background: #111;
  padding: 20px;
  border-radius: 12px;
  max-width: 600px;
  color: #fff;
  position: relative;
  box-shadow: 0 0 0 1px #3498db, 0 0 20px #3498db,
    0 16px 40px rgba(0, 0, 0, 0.55);
  border: 1px solid #3498db;
}

.titulo-modal {
  font-size: 1.8rem;
  text-align: center;
  margin-bottom: 15px;
  color: var(--red);
  text-shadow: 0 0 12px #357ab8;
}

.descripcion-tarjeta,
.descripcion-modal {
  text-align: justify;
  line-height: 1.6;
  margin: 10px 0;
  white-space: pre-line; /* respeta los saltos de línea del textarea */
}

.descripcion-modal {
  font-size: 1rem;
  line-height: 1.5;
  margin: 10px 0;
  color: #e6e6e6;

  text-align: justify;
  line-height: 1.6;
  margin: 15px 0;
}

.bloque-comando {
  background-color: #0f1216;
  padding: 12px;
  border-radius: 10px;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  margin: 15px 0;
  overflow-x: auto;
  color: #8affd4;
  border: 1px solid #2b303b;
}

.fuente-modal a {
  color: #3399ff;
  word-break: break-all;
}
.fuente-modal,
.sistema-modal,
.fecha-modal {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #ccc;
}

.imagen-modal {
  max-width: 100%;
  height: auto;
  margin-bottom: 15px;
  border-radius: 10px;
  cursor: zoom-in;
}

/* Aplica color al borde según clase */
.modal-contenido.rojo {
  border-color: #e74c3c;
}
.modal-contenido.verde {
  border-color: #2ecc71;
}
.modal-contenido.azul {
  border-color: #3498db;
}
.modal-contenido.amarillo {
  border-color: #f1c40f;
}
.modal-contenido.morado {
  border-color: #9b59b6;
}

.modal-contenido h3 {
  font-size: 1.3rem;
  margin: 0.5rem 0;
  text-align: center;
}

.modal-contenido img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 10px;
  margin: 0 auto;
}

.modal-contenido p,
.modal-contenido pre,
.modal-contenido a {
  font-size: 0.95rem;
  line-height: 1.4;
}

.modal-contenido pre {
  background-color: #333;
  color: #00ffcc;
  padding: 0.5rem;
  border-radius: 10px;
  font-family: "Courier New", monospace;
  overflow-x: auto;
  white-space: pre-wrap;
}

.cerrar-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  color: #333;
}
.cerrar-modal:hover {
  color: #357ab8;
}

.oculto {
  display: none;
}

/* ================= NOTIFICACIONES ================= */
.notificacion {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1e90ff;
  color: white;
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  font-size: 0.95rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5), 0 0 18px #3498db;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  z-index: 9999;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.notificacion.mostrar {
  opacity: 1;
  pointer-events: auto;
}
.notificacion.error {
  background-color: #357ab8;
}

/* ================= VISOR DE IMAGEN ================= */
.visor-imagen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.imagen-grande-contenedor {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.imagen-grande-contenedor img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.cerrar-visor {
  position: absolute;
  top: -20px;
  right: -20px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  background: #357ab8;
  border-radius: 50%;
  padding: 0 12px;
  line-height: 1.2;
}

/* ================= NUEVA SECCIÓN: APUNTES / GUÍAS (DISEÑO CAPTURA) ================= */
.seccion-guias {
  text-align: center;
  margin: 3rem auto;
  padding: 1rem;
}
.seccion-guias h2 {
  color: var(--red);
  font-size: clamp(2rem, 4.4vw, 2.8rem);
  text-align: center;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 12px #357ab8;
  letter-spacing: 0.6px;
}
.seccion-guias p {
  color: #ccc;
  font-size: 1rem;
  margin-bottom: 2rem;
}

.contenedor-guias {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
}

.tarjeta-guia {
  background: #111;
  border: 2px solid var(--red);
  border-radius: 12px;
  padding: 1.5rem;
  width: min(420px, 92vw);
  color: white;
  text-align: center;
  box-shadow: var(--glow-red);
  transition: transform 0.3s ease, box-shadow 0.25s ease;
}
.tarjeta-guia:hover {
  transform: translateY(-5px) scale(1.02);
}

.tarjeta-guia h3 {
  color: var(--red);
  font-size: 1.3rem;
  margin-bottom: 0.8rem;
  line-height: 1.2;
}
.tarjeta-guia img {
  max-width: 110px;
  margin: 0.5rem auto 0.6rem;
}
.tarjeta-guia p {
  font-size: 0.98rem;
  color: #d7d7d9;
  margin-bottom: 1.5rem;
}
.btn-guia {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  background: var(--red);
  color: white;
  font-weight: bold;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.3s, transform 0.2s, box-shadow 0.2s ease;
  border: 1px solid var(--red);
  box-shadow: 0 0 0 1px #357ab8, 0 8px 22px #357ab8;
}
.btn-guia:hover {
  background: #357ab8;
  transform: scale(1.05);
  box-shadow: 0 0 0 1px #357ab8, 0 12px 30px #357ab8;
}

/* ================= TITULARES PRINCIPALES ================= */
h1.titulo-principal,
h2.titulo-principal {
  color: var(--red);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 1.8rem 0 0.6rem;
  text-align: center;
  text-shadow: 0 0 12px #357ab8;
  letter-spacing: 0.6px;
}
.subtitulo-principal {
  text-align: center;
  color: var(--text-soft);
  margin-bottom: 1.6rem;
}

/* ================= ESTADOS DE FORMULARIO ================= */
.is-valid,
.formulario .is-valid {
  border-color: rgba(46, 204, 113, 0.7) !important;
  box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.25) !important;
}
.is-invalid,
.formulario .is-invalid {
  border-color: #3498db !important;
  box-shadow: 0 0 0 2px #3498db !important;
}

.formulario .help,
.formulario .ayuda,
.formulario small {
  display: block;
  margin-top: 0.4rem;
  color: var(--placeholder);
  font-size: 0.85rem;
}

.formulario .divider,
.formulario hr {
  border: none;
  height: 1px;
  margin: 1.25rem 0;
  background: linear-gradient(90deg, transparent, #3498db, transparent);
}
.formulario .subtitulo {
  color: var(--red);
  font-weight: 700;
  margin: 0.75rem 0 0.5rem;
}

/* ================= UTILIDADES (no rompen funcionalidad) ================= */
.hide {
  display: none !important;
}
.center {
  text-align: center !important;
}
.mt-0 {
  margin-top: 0 !important;
}
.mt-1 {
  margin-top: 0.25rem !important;
}
.mt-2 {
  margin-top: 0.5rem !important;
}
.mt-3 {
  margin-top: 1rem !important;
}
.mt-4 {
  margin-top: 1.5rem !important;
}
.mb-0 {
  margin-bottom: 0 !important;
}
.mb-1 {
  margin-bottom: 0.25rem !important;
}
.mb-2 {
  margin-bottom: 0.5rem !important;
}
.mb-3 {
  margin-bottom: 1rem !important;
}
.mb-4 {
  margin-bottom: 1.5rem !important;
}
.p-0 {
  padding: 0 !important;
}
.p-1 {
  padding: 0.25rem !important;
}
.p-2 {
  padding: 0.5rem !important;
}
.p-3 {
  padding: 1rem !important;
}
.p-4 {
  padding: 1.5rem !important;
}
.round {
  border-radius: 10px !important;
}
.round-2 {
  border-radius: 14px !important;
}
.shadow-soft {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
}

/* ================= ANIMACIONES SUAVES ================= */
@keyframes pop-in {
  from {
    transform: scale(0.97);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
@keyframes glowPulse {
  0% {
    box-shadow: 0 0 0 1px #3498db, 0 0 18px #3498db;
  }
  50% {
    box-shadow: 0 0 0 1px #3498db, 0 0 30px #3498db;
  }
  100% {
    box-shadow: 0 0 0 1px #3498db, 0 0 18px #3498db;
  }
}
.tarjeta-guia,
.tarjeta {
  animation: pop-in 0.2s ease-out;
}

/* ================= EXTRAS VISUALES PARA LA SECCIÓN (NO ROMPEN NADA) ================= */
.badge {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: #3498db;
  color: var(--red);
  border: 1px solid #3498db;
}
.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.divisor-luminoso {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #3498db, transparent);
  margin: 1.25rem 0;
}

/* ================= VARIANTES DE TARJETA (COHERENTES CON TU SISTEMA DE COLORES) ================= */
.tarjeta.variant-red {
  border-color: var(--red);
  box-shadow: 0 0 0 1px #3498db, 0 0 22px #3498db;
}
.tarjeta.variant-blue {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px rgba(30, 144, 255, 0.12),
    0 0 22px rgba(30, 144, 255, 0.22);
}
.tarjeta.variant-green {
  border-color: var(--green);
  box-shadow: 0 0 0 1px rgba(46, 204, 113, 0.12),
    0 0 22px rgba(46, 204, 113, 0.22);
}
.tarjeta.variant-yellow {
  border-color: var(--yellow);
  box-shadow: 0 0 0 1px rgba(241, 196, 15, 0.12),
    0 0 22px rgba(241, 196, 15, 0.22);
}

/* ================= BOTONES PEQUEÑOS UNIFORMES ================= */
.btn-xs {
  padding: 0.28rem 0.5rem;
  font-size: 0.72rem;
  border-radius: 8px;
  border: 1px solid transparent;
}
.btn-danger {
  background: var(--red);
  color: #fff;
  border-color: #3498db;
}
.btn-danger:hover {
  filter: brightness(1.05);
}
.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover {
  filter: brightness(1.05);
}

/* ================= CABECERA DE SECCIÓN ================= */
.section-header {
  display: grid;
  place-items: center;
  margin: 2rem 0 1rem;
}
.section-header .title {
  color: var(--red);
  font-weight: 900;
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
  text-shadow: 0 0 10px #3498db;
}
.section-header .subtitle {
  color: var(--muted);
  margin-top: 0.35rem;
}

/* ================= ESTILOS SOBRESCRITOS SEGÚN TU CAPTURA ================= */
h1,
h2 {
  color: var(--primary);
}
h1.titulo-principal,
.seccion-guias h2,
.titulo-modal {
  color: var(--red);
}

/* ================= FOOTER ================= */
footer {
  background-color: var(--surface-1, #212529);
  color: var(--text-soft);
  text-align: center;
  padding: 1.5rem 0.5rem;
  border-top: 1px solid #3498db;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.25);
  position: relative;
  bottom: 0;
  left: 0;
  width: 100%;
  font-size: 1rem; /* un poquito más grande */
  font-weight: 500;
  z-index: 999;
}
footer p {
  margin: 0;
  letter-spacing: 0.5px; /* le da más aire al texto */
}
/* ================= RESPONSIVE ================= */

/* Botón Regresar */
.btn.regresar {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(135deg, #357ab899, #212529);
  color: white;
  font-weight: bold;
  text-decoration: none;
  border-radius: 8px;
  border: 2px solid var(--red);
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn.regresar:hover {
  /* Eliminamos el movimiento */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  background: linear-gradient(135deg, #3498db, #357ab8);
  color: #fff;
}

.filtros-publico {
  max-width: 700px;
  margin: 6rem 0 2rem 2rem; /* subimos de 3rem a 6rem */
  text-align: left;
}

/* Ajuste para el select */
.filtros-publico select {
  width: 250px; /* ancho del select */
  margin-top: 0.5rem; /* separación superior */
}
/* ================= NAV DESKTOP ORDENADO ================= */
@media (min-width: 769px) {
  .encabezado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    padding: 1rem 2rem;
  }

  .encabezado h1 {
    flex: 1;
    text-align: right; /* mantiene alineación a la derecha */
    margin: 0;
    padding-right: 230px; /* ajusta este valor para moverlo un poco hacia la izquierda */
    font-size: 2rem;
  }

  .auth-section {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: flex-end; /* Botones a la derecha */
  }

  /* Ajuste para los botones dentro de auth-section */
  .auth-section .btn,
  .auth-section .btn.regresar {
    margin: 0;
  }

  /* Ocultar botón hamburguesa en escritorio */
  .menu-toggle {
    display: none;
  }
}
