:root {
  --color-bg: #f7f2e9;
  --color-bg-bottom: #f0e9d8;
  --color-surface: #ffffff;
  --color-text: #1e3a45;
  --color-muted: #5a7a86;
  --color-water: #7eb8c9;
  --color-water-deep: #3d8ea5;
  --color-accent: #e07a4a;
  --color-accent-soft: #fde8df;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(30, 58, 69, 0.08);
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Roboto', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-bottom) 100%);
  min-height: 100vh;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-water-deep);
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.narrow {
  max-width: 680px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-surface);
  border-bottom: 1px solid rgba(126, 184, 201, 0.25);
}

.header-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 0;
}

.brand {
  text-decoration: none;
  color: inherit;
}

.brand-title {
  display: block;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-sub {
  display: block;
  font-size: 0.9rem;
  color: var(--color-muted);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.search-toggle {
  border: 0;
  background: var(--color-surface);
  color: var(--color-text);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(126, 184, 201, 0.35);
  flex-shrink: 0;
}

.search-toggle:hover,
.search-toggle[aria-expanded="true"] {
  color: var(--color-accent);
  box-shadow: inset 0 0 0 2px var(--color-accent);
}

.search-panel {
  border-top: 1px solid rgba(126, 184, 201, 0.25);
  background: var(--color-surface);
  padding: 1rem 0;
}

.search-input {
  width: 100%;
  font: inherit;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  border: 0;
  box-shadow: inset 0 0 0 1px rgba(126, 184, 201, 0.35);
  background: var(--color-bg);
  color: var(--color-text);
}

.search-input:focus {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--color-accent);
}

.search-results {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: min(60vh, 420px);
  overflow-y: auto;
}

.search-result {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  padding: 0.4rem;
  border-radius: var(--radius-sm);
}

.search-result:hover {
  background: var(--color-accent-soft);
}

.search-result img,
.search-result__placeholder {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}

.search-result__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-accent-soft);
  color: var(--color-muted);
  font-size: 0.75rem;
}

.search-result__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.search-result__title {
  font-weight: 500;
}

.search-result__cat {
  font-size: 0.85rem;
  color: var(--color-muted);
}

.search-empty {
  color: var(--color-muted);
  margin: 0;
}

.search-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.search-pager__btn {
  border: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font: inherit;
  font-weight: 500;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(126, 184, 201, 0.35);
}

.search-pager__btn:disabled {
  opacity: 0.4;
  cursor: default;
}

.search-pager__btn:not(:disabled):hover {
  box-shadow: inset 0 0 0 2px var(--color-accent);
}

.search-pager__status {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.nav-link {
  text-decoration: none;
  color: var(--color-muted);
  font-weight: 500;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--color-text);
  border-bottom-color: var(--color-accent);
}

.site-main {
  padding-bottom: 3rem;
}

.hero {
  padding: 2rem 0 1rem;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.15;
}

.hero-lead {
  margin: 0;
  font-size: 1.05rem;
  color: var(--color-muted);
  max-width: 38rem;
}

.section {
  padding: 1.5rem 0 2rem;
}

.section-head {
  margin-bottom: 1.25rem;
}

.section-head h1,
.section-head h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
}

.section-head p {
  margin: 0;
  color: var(--color-muted);
}

.section-cta {
  margin-top: 1.75rem;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  box-shadow: var(--shadow);
}

.button:hover {
  filter: brightness(1.05);
}

.reel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.reel-grid__sentinel {
  height: 1px;
}

.reel-card {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.reel-card[hidden] {
  display: none !important;
}

.reel-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(30, 58, 69, 0.12);
}

.reel-card__link {
  display: contents;
  text-decoration: none;
  color: inherit;
}

.reel-card__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0 1rem 1rem;
  margin-top: -0.3rem;
}

.reel-card__cat {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-muted);
  background: var(--color-accent-soft);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  text-decoration: none;
  white-space: nowrap;
}

.reel-card__cat:hover {
  color: var(--color-text);
  box-shadow: inset 0 0 0 1px var(--color-accent);
}

.reel-card__cat--more {
  background: none;
  color: var(--color-muted);
  padding: 0.2rem 0.3rem;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.reel-card__media {
  position: relative;
  aspect-ratio: 9 / 16;
  background: linear-gradient(135deg, var(--color-water) 0%, var(--color-water-deep) 100%);
}

.reel-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.reel-card__placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.reel-card__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.reel-card__title {
  margin: 0;
  padding: 0.9rem 1rem 1.1rem;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.45;
}

.guide {
  margin-bottom: 2rem;
  padding: 1.5rem 1.25rem;
  border-radius: var(--radius);
  background: var(--color-accent-soft);
}

.guide .section-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.guide .section-head p {
  margin: 0 0 1.25rem;
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 540px) {
  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .guide-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.guide-step {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.guide-step__note {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text);
}

.tabs {
  display: grid;
  grid-auto-flow: column;
  grid-template-rows: repeat(2, auto);
  grid-auto-columns: max-content;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.tab {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background: var(--color-surface);
  color: var(--color-muted);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(126, 184, 201, 0.35);
}

.tab.is-active {
  background: var(--color-accent-soft);
  color: var(--color-text);
  box-shadow: inset 0 0 0 2px var(--color-accent);
}

.tab--guide {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--color-accent);
  color: #fff;
  box-shadow: none;
}

.tab--guide:hover {
  filter: brightness(1.05);
}

.tab--guide::after {
  content: '▾';
  font-size: 0.65em;
  transition: transform 0.15s ease;
}

.tab--guide[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.prose p {
  margin: 0 0 1rem;
}

.prose .muted {
  color: var(--color-muted);
  font-style: italic;
}

.contacto-placeholder {
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

.empty-state {
  grid-column: 1 / -1;
  color: var(--color-muted);
}

.glossary-sticky {
  position: sticky;
  top: var(--site-header-h, 4.5rem);
  z-index: 5;
  background: var(--color-bg);
  padding: 1rem 0;
  border-bottom: 1px solid rgba(126, 184, 201, 0.25);
}

.glossary-sticky h1 {
  margin: 0;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
}

.glossary-lead {
  margin: 0.75rem 0 1.75rem;
  color: var(--color-muted);
}

.glossary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.glossary-nav__link {
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  background: var(--color-surface);
  color: var(--color-muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px rgba(126, 184, 201, 0.35);
}

.glossary-nav__link:hover {
  color: var(--color-text);
  box-shadow: inset 0 0 0 2px var(--color-accent);
}

.glossary-section {
  margin-bottom: 2rem;
  scroll-margin-top: calc(var(--site-header-h, 4.5rem) + 6.5rem);
}

.glossary-section h2 {
  font-size: 1.15rem;
  margin: 0 0 1rem;
}

.glossary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 700px) {
  .glossary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.glossary-term {
  background: var(--color-surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.25rem 1.25rem;
}

.glossary-term h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
}

.glossary-term p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.glossary-term__videos {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(126, 184, 201, 0.25);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.glossary-term__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 0.15rem;
}

.glossary-term__videos a {
  font-size: 0.88rem;
  color: var(--color-water-deep);
}

.acerca-photo {
  display: block;
  width: 160px;
  height: 160px;
  margin: 0 0 1.5rem;
  border: 4px solid var(--color-surface);
  box-shadow: var(--shadow);
  object-fit: cover;
}

@media (min-width: 540px) {
  .acerca-photo {
    width: 200px;
    height: 200px;
  }
}

.error-404 {
  text-align: center;
  padding: 2rem 0 3rem;
}

.error-404__img {
  max-width: 220px;
  width: 100%;
  height: auto;
  margin: 0 auto 1.5rem;
  display: block;
}

.site-footer {
  padding: 1.5rem 0 2rem;
  border-top: 1px solid rgba(126, 184, 201, 0.25);
}

.footer-inner {
  text-align: center;
}

.footer-copy {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

@media (min-width: 540px) {
  .reel-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .hero {
    padding-top: 2.5rem;
  }

  .reel-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .tabs {
    grid-template-rows: repeat(3, auto);
  }
}

@media (min-width: 1024px) {
  .reel-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
