:root {
  --b: #000102;
  --g: #f1f5f9;
  --c: #334155;
  --a: #193B2B;                    /* color de marca */
  --a-soft: rgba(25, 59, 43, 0.15); /* sombra suave verde */
}

/* ==========================================
   RESETEO SIMPLE
   ========================================== */

* {
  box-sizing: border-box;
}

/* ==========================================
   TIPOGRAFÍAS
   ========================================== */

/* General → Merriweather */
body {
  font-family: 'Merriweather', serif;
  margin: 0;
  background: #ffffff;
  color: #000102;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Definiciones → Lato */
.def,
.def-line,
.sense,
.subentry,
.zones,
.chip {
  font-family: 'Lato', sans-serif;
}

/* Menú hamburguesa → Lato */
.menu-nav,
.menu-link,
.menu-link-arrow {
  font-family: 'Lato', sans-serif;
}

/* ==========================================
   CONTENEDOR GENERAL
   ========================================== */

header,
main,
.site-footer {
  width: 100%;
}

.box {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 2.5rem;
}

/* ==========================================
   HEADER
   ========================================== */

header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  position: relative;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.8rem;
  padding-bottom: 1.8rem;
}

/* Enlace completo del header */
.link-header {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  text-decoration: none;
  color: inherit;
}

/* Logo */
.header-logo {
  width: 70px;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

/* Título en dos líneas */
.header-title {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.header-title-top,
.header-title-bottom {
  font-size: 1.55rem;
  font-weight: 700;
  color: #193B2B;
}

/* Botón hamburguesa */
.header-right {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.menu-toggle {
  width: 26px;
  height: 20px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

.menu-toggle span {
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: #193B2B;
  transition: transform 0.2s ease, opacity 0.2s ease, width 0.2s ease;
}

.menu-toggle.is-open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================
   BUSCADOR
   ========================================== */

.header-search {
  padding-top: 0;
  padding-bottom: 2rem;
}

.search {
  position: relative;
  max-width: 100%;
  width: 100%;
  margin-bottom: 1.5rem;
}

/* Buscador → Merriweather */
.search input {
  width: 100%;
  padding: 1.2rem 1.4rem;
  font-size: 1.1rem;
  font-family: 'Merriweather', serif;
  border: 1px solid #dce3eb;
  border-radius: 18px;
  background: #f8fafc;
  outline: none;
  transition:
    border-color .15s ease,
    box-shadow .15s ease,
    background .15s ease;
}

.search input::placeholder {
  color: #9ca3af;
}

.search input:focus {
  border-color: var(--a);
  background: #ffffff;
  box-shadow: 0 0 0 4px var(--a-soft);
}

/* Sugerencias → Lato */
.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: .75rem;
  max-height: 280px;
  overflow-y: auto;
  z-index: 30;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.suggestions div {
  padding: .7rem 1rem;
  cursor: pointer;
  font-size: 1rem;
  font-family: 'Lato', sans-serif;
}

.suggestions div:hover,
.suggestions .active {
  background: #e9f2ec;
}

/* ==========================================
   MENÚ LATERAL (overlay)
   ========================================== */

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 9999;
}

.menu-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.menu-panel {
  width: 320px;
  max-width: 85%;
  background: #ffffff;
  height: 100%;
  padding: 2rem 2rem;
  box-shadow: -8px 0 24px rgba(15, 23, 42, 0.25);
  display: flex;
  flex-direction: column;
}

.menu-panel-header {
  position: relative;
  margin-bottom: 2.2rem;
}

.menu-logo {
  display: block;
  margin: 0 auto;
  width: 80px;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
}

.menu-close {
  border: none;
  background: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: #193B2B;
  position: absolute;
  top: 0;
  right: 0;
}

.menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.menu-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .7rem .4rem;
  font-size: 1rem;
  text-decoration: none;
  color: #193B2B;
  border-bottom: 1px solid #e5e7eb;
  transition: color .15s ease, background .15s ease, padding-left .15s ease;
}

.menu-link:last-child {
  border-bottom: none;
}

.menu-link:hover {
  background: #e9f2ec;
  color: #193B2B;
  padding-left: .6rem;
}

.menu-link-arrow {
  font-size: 1.1rem;
}

/* ==========================================
   MAIN Y TARJETAS
   ========================================== */

main {
  flex: 1;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

/* Sin caja alrededor del artículo completo */
.entry {
  border: none;
  border-radius: 0;
  padding: 1.6rem 0 2rem;
  background: transparent;
  box-shadow: none;
}

/* ==========================================
   LEMA (palabra principal + animación)
   ========================================== */

.lema {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  font-size: 68px;
  line-height: 85px;
  color: #193B2B;
  margin-bottom: 1.2rem;

  position: sticky;
  top: 0;
  z-index: 10;
  background: #ffffff;
  padding: .8rem 0 .6rem;
  border-bottom: 1px solid #eef1f3;

  transition:
    font-size .35s ease,
    line-height .35s ease,
    padding .35s ease;
}

.lema.compact {
  font-size: 52px;
  line-height: 60px;
  padding: .5rem 0 .4rem;
}

.meta {
  color: var(--c);
  margin-top: .25rem;
  font-size: 1rem;
}

/* ==========================================
   DEFINICIONES Y ACEPCIONES
   ========================================== */

.def {
  margin-top: 1rem;
  line-height: 1.7;
  font-size: 1.05rem;
}

.senses {
  display: grid;
  gap: .9rem;
  margin-top: 1.1rem;
}

.sense {
  border: 1px solid #e5e7eb;
  border-radius: .75rem;
  padding: .9rem 1rem;
  background: #f9fafb;
}

.sense-head {
  font-weight: 600;
  margin-bottom: .2rem;
}

.sense-num {
  margin-right: .45rem;
  font-weight: 600;
}

.zones {
  margin-top: .5rem;
  color: #334155;
  font-size: .95rem;
}

.def-line {
  line-height: 1.6;
}

.def-line .sense-num {
  margin-right: .3rem;
}

.def-line .meta {
  margin-left: .3rem;
  margin-right: .3rem;
  color: #374151;
  font-style: italic;
  font-size: 20px;   /* abreviatura gramatical más grande */
}

.def-line i {
  font-style: italic;
}

.subs {
  margin: .35rem 0 .7rem;
}

/* ==========================================
   AÑADIDO → TAMAÑOS NUEVOS
   ========================================== */

.def-line,
.sense,
.sense-head {
  font-size: 20px;           /* Definición más grande */
}

.zones {
  font-size: 16px !important; /* Localidades más pequeñas */
}

/* ==========================================
   “Subentradas” – estilo de subtítulo
   ========================================== */
.subs-list {
  margin-top: .9rem;
}

.subs-list > strong {
  display: block;
  margin-bottom: .5rem;
  font-family: 'Merriweather', serif;
  font-weight: 600;
  font-size: 40px;
  line-height: 85px;
  color: #193B2B;
}

.chip {
  display: inline-block;
  margin: .2rem .35rem 0 0;
  padding: .25rem .55rem;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  background: #f8fafc;
  cursor: pointer;
  font-size: .92rem;
}

.chip:hover {
  background: rgba(25, 59, 43, 0.04);
  border-color: #94a3b8;
}

.subentry {
  border-top: 1px dashed #e5e7eb;
  padding-top: .6rem;
  margin-top: .6rem;
}

.sub-lema {
  font-weight: 700;
  margin: .25rem 0;
  font-size: 24px;   /* tamaño del sub-lema */
}

/* Estado "vacío" / home */
.empty {
  color: var(--c);
  padding: 3rem 0;
  font-size: 1rem;
}

/* ================================
   HOME A DOS COLUMNAS
   ================================ */

.home {
  padding-top: 1.5rem;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr);
  gap: 2.5rem;
  align-items: flex-start;
}

.home-left {
  max-width: 640px;
}

.home-title {
  font-family: 'Merriweather', serif;
  font-weight: 900;
  font-size: 3.6rem;
  line-height: 1.1;
  color: #193B2B;
  margin: 0 0 1.5rem;
}

.home-text {
  font-size: 0.98rem;
  line-height: 1.7;
  margin: 0 0 0.85rem;
}

.home-cite-block {
  margin-top: 1.8rem;
  padding: 1rem 1.2rem;
  background: #f1f5f9;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}

.home-cite-title {
  font-weight: 700;
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.home-cite-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Columna derecha (tarjeta) */

.home-right {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}


.home-card {
  background: #f1f5f9;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  padding: 1.4rem 1.3rem;
}

.home-menu {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1.1rem;
}

.home-menu-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.3rem;
  text-decoration: none;
  color: #193B2B;
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  border-bottom: 1px solid #e5e7eb;
  transition: background 0.15s ease, padding-left 0.15s ease;
}

.home-menu-link:last-child {
  border-bottom: none;
}

.home-menu-link:hover {
  background: #e9f2ec;
  padding-left: 0.5rem;
}

.home-menu-arrow {
  font-size: 1.05rem;
}

.home-stats {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.home-stats p {
  margin: 0.15rem 0;
}

.home-stat-number {
  font-weight: 700;
}

/* Responsive home */

@media (max-width: 900px) {
  .home-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-right {
    max-width: 420px;
  }
}


/* ==========================================
   FOOTER
   ========================================== */

.site-footer {
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

.footer-inner {
  text-align: center;
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.footer-text {
  max-width: 900px;
  margin: 0 auto 1.8rem;
  font-size: .95rem;
  line-height: 1.6;
}

.footer-text a {
  color: #193B2B;
  text-decoration: none;
}

.footer-text a:hover {
  text-decoration: underline;
}

.footer-logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.footer-logos img {
  height: 70px;
  object-fit: contain;
}

.footer-bottom {
  font-size: .9rem;
  line-height: 1.5;
}

.footer-bottom a {
  color: #193B2B;
  text-decoration: none;
}

.footer-bottom a:hover {
  text-decoration: underline;
}

/* ==========================================
   TOOLTIP BIBLIOGRÁFICO EN SIGLAS DE ZONAS
   ========================================== */

.zone-code {
  position: relative;
  cursor: help;
  border-bottom: 1px dotted #64748b;
  font-weight: 700;        /* ← fuerza la negrita en todas las siglas */
}

/* Recuadro oscuro con la referencia */
.zone-code::after {
  content: attr(data-bib);
  position: absolute;
  left: 0;
  bottom: 125%;
  transform: translateY(-4px);
  width: 260px;
  max-width: 80vw;
  background: #111827;
  color: #f9fafb;
  padding: .55rem .75rem;
  border-radius: .5rem;
  font-size: .8rem;
  line-height: 1.4;
  box-shadow: 0 10px 25px rgba(15, 23, 42, .35);
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  white-space: normal;
}

/* Flechita del tooltip */
.zone-code::before {
  content: "";
  position: absolute;
  left: 10px;
  bottom: 110%;
  border-width: 6px;
  border-style: solid;
  border-color: #111827 transparent transparent transparent;
  opacity: 0;
  pointer-events: none;
  z-index: 1000;
}

/* Mostrar al pasar el ratón */
.zone-code:hover::after,
.zone-code:hover::before {
  opacity: 1;
}

/* ==========================================
   EJEMPLOS (Example) EN VERDE
   ========================================== */

.example {
  color: #008000 !important;
  font-style: italic; /* opcional, queda elegante */
}


/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 900px) {
  .box {
    padding: 1.8rem 1.6rem;
  }

  .header-inner {
    flex-direction: row;
    gap: 1rem;
  }

  .header-title-top,
  .header-title-bottom {
    font-size: 1.35rem;
  }

  .lema {
    font-size: 52px;
    line-height: 64px;
  }

  .lema.compact {
    font-size: 42px;
    line-height: 54px;
  }

  .subs-list > strong {
    font-size: 28px;
    line-height: 40px;
  }

  /* ↓ NUEVO: título grande de las páginas (home, Introducción, etc.) */
  .home-title {
    font-size: 2.6rem;
  }
}

@media (max-width: 600px) {
  .box {
    padding: 1.5rem 1.2rem;
  }

  .header-logo {
    width: 50px;
  }

  .header-title-top,
  .header-title-bottom {
    font-size: 1.2rem;
  }

  /* ↓ NUEVO: aún un poco más pequeño en móvil estrecho */
  .home-title {
    font-size: 2.1rem;
  }

  .menu-panel {
    width: 260px;
    padding-inline: 1.5rem;
  }

  .menu-logo {
    width: 70px;
  }

  .footer-logos img {
    height: 56px;
  }
}

  /* ↓ NUEVO: lema un poco más pequeño en móviles */
  .lema {
    font-size: 44px;
    line-height: 52px;
  }

  .lema.compact {
    font-size: 36px;
    line-height: 44px;
  }

  .menu-panel {
    width: 260px;
    padding-inline: 1.5rem;
  }

  .menu-logo {
    width: 70px;
  }

  .footer-logos img {
    height: 56px;
  }
