:root {
  color-scheme: light;
  --background: #faf9f6;
  --surface: #fff;
  --line: #ddd7c8;
  --text: #1f201b;
  --muted: #5a584d;
  --accent: #785a11;
  --gold: #c0982c;
  --dark: #171713;
  --header-height: 5rem;
  font: 16px/1.55 "Vazirmatn", "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--text); background: var(--background); }
a { color: var(--accent); text-underline-offset: .2em; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip:focus { position: fixed; z-index: 5; padding: .5rem; background: var(--surface); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  min-height: var(--header-height);
  display: flex;
  gap: .75rem 2rem;
  align-items: center;
  justify-content: space-between;
  padding: .65rem clamp(1rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
  background: var(--dark);
  border-color: var(--gold);
}
.brand { display: flex; align-items: center; gap: .75rem; }
.brand a { display: block; }
.brand img { display: block; width: 5.4rem; height: auto; }
.topbar :focus-visible { outline-color: var(--gold); }
#menu { display: none; }
#search-form { display: flex; gap: .45rem; width: min(100%, 25rem); }
input, button {
  padding: .45rem .65rem;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--surface);
  color: var(--text);
}
input { min-width: 0; flex: 1; }
button { cursor: pointer; }
button:hover { border-color: var(--accent); }
.topbar button { color: var(--dark); background: var(--gold); border-color: var(--gold); font-weight: 700; }
.layout { display: grid; grid-template-columns: 17rem minmax(0, 1fr); }
#sidebar {
  position: sticky;
  top: var(--header-height);
  height: calc(100dvh - var(--header-height));
  overflow: auto;
  padding: 1.3rem 1rem;
  border-right: 1px solid var(--line);
  background: #efede5;
}
.toc-group + .toc-group { margin-top: 1.35rem; }
.toc-group h2 { margin: 0 0 .3rem .65rem; color: var(--accent); font-size: .86rem; }
.toc-group ul { list-style: none; margin: 0; padding: 0; }
.toc-group a {
  display: block;
  padding: .35rem .65rem;
  border-radius: .4rem;
  color: var(--muted);
  text-decoration: none;
}
.toc-group a:hover, .toc-group a[aria-current] {
  color: var(--accent);
  background: var(--surface);
}
main {
  min-width: 0;
  width: min(100%, 68rem);
  padding: clamp(1.25rem, 4vw, 3.5rem);
  overflow-wrap: anywhere;
}
h1, h2, .club-name { font-family: "Montserrat", "Inter", system-ui, sans-serif; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.06; }
h2 { font-size: 1.15rem; }
.heading { margin-bottom: 1.6rem; }
.heading::before {
  display: block;
  width: 2.75rem;
  height: .2rem;
  margin: .65rem 0 1rem;
  border-radius: 1rem;
  background: var(--accent);
  content: "";
}
.heading p, .jump span, .fault-list span { color: var(--muted); }
.page { min-width: 0; }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1.25rem;
  padding: .9rem clamp(1.25rem, 4vw, 3.5rem) 1.4rem;
  border-top: 1px solid var(--line);
}
.site-footer p { margin: 0; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  min-height: 22rem;
  margin-bottom: 1.5rem;
  background: var(--dark);
  border-bottom: 4px solid var(--gold);
  color: #fff;
}
.hero-copy { align-self: center; padding: clamp(1.15rem, 3.5vw, 2.6rem); }
.hero-copy img { margin: 0 0 .55rem; }
.hero-copy h1 { color: #ebc967; text-transform: uppercase; letter-spacing: -.035em; }
.hero-copy p:last-child { margin-bottom: 0; }
.club-name { margin: 0 0 .55rem; font-size: .84rem; font-weight: 650; }
main .hero-photo {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 29rem;
  margin: 0;
  object-fit: cover;
  object-position: center 58%;
  border-radius: 0;
}
.jump-grid, .details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: .8rem;
  margin-bottom: 1.1rem;
}
.jump, .details section {
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: var(--surface);
}
.jump { font-weight: 700; text-decoration: none; }
.jump:hover { border-color: var(--accent); }
.jump span { display: block; margin-top: .2rem; font-weight: 400; }
.details h2 { margin-top: 0; }
.details p { margin-bottom: 0; }
.fault-list { padding: 0; list-style: none; }
.fault-list li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.fault-list span { display: block; font-size: .9rem; }
.pager { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 1.25rem; }
.club-videos { margin: 1.6rem 0; }
.club-video {
  padding: 1rem 1.2rem;
  margin-top: .75rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: var(--surface);
}
.club-video h3 { margin: 0; font-size: 1rem; }
.club-video p { margin: .65rem 0 0; }
.club-video .youtube-player, .club-video video { margin-top: .75rem; }
.video-duration { margin-left: .35rem; color: var(--muted); font-size: .85em; font-weight: 400; white-space: nowrap; }
video, main img { display: block; max-width: 100%; margin-bottom: 1rem; border-radius: .8rem; }
.youtube-player {
  display: block;
  width: min(100%, 45rem);
  min-height: 200px;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: .8rem;
}

@media (max-width: 720px) {
  .layout { display: block; }
  .topbar { flex-wrap: wrap; }
  #menu { display: block; }
  #sidebar { display: none; position: static; height: auto; max-height: 55dvh; border-bottom: 1px solid var(--line); }
  #sidebar.open { display: block; }
  .hero { grid-template-columns: 1fr; min-height: 0; }
  main .hero-photo { height: 12rem; }
}

/* Biblioteca y correcciones */
select { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: .5rem; padding: .55rem; max-width: 100%; }
.muted, .video-meta { color: var(--muted); }
.hero { min-height: 20rem; }
.hero-copy h1 { font-size: clamp(2rem, 4vw, 3.3rem); }
.section-grid, .entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0 2rem; }
.section-card, .entry-card { display: block; color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--line); border-radius: .8rem; padding: 1.35rem; }
.section-card { border-top: 4px solid var(--gold); }
.section-card h2 { font-size: 1.45rem; line-height: 1.2; margin: .65rem 0; }
.section-card p, .entry-card p { color: var(--muted); }
.section-card:hover, .entry-card:hover { border-color: var(--accent); background: #fffdf4; }
.eyebrow { font-size: .78rem; letter-spacing: .04em; font-weight: 700; color: var(--accent); }
.card-action { color: var(--accent); font-weight: 700; }
.entry-card { position: relative; padding-bottom: 1.3rem; }
.entry-card h3 { font-size: 1.2rem; line-height: 1.3; margin: .55rem 0; }
.entry-grid:has(> :only-child) { grid-template-columns: minmax(0, 1fr); max-width: 45rem; }
.duration { margin-left: .85rem; font-size: .85rem; color: var(--muted); white-space: nowrap; }
.category-nav { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.2rem 0; }
.category-nav a { text-decoration: none; border: 1px solid var(--line); border-radius: 2rem; padding: .5rem 1rem; background: var(--surface); }
.category-nav a[aria-current] { color: #fff; background: var(--accent); border-color: var(--accent); }
.result-count { color: var(--muted); font-size: .9rem; }
.empty-state { padding: 1.5rem; border: 1px dashed var(--line); border-radius: .8rem; background: var(--surface); margin: 1.5rem 0; }
.empty-state h2 { margin-top: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: .5rem; font-size: .86rem; margin-bottom: 1.25rem; }
.video-section { margin: 1.5rem 0; }
.youtube-player { width: 100%; min-height: 0; }
.video-meta { font-size: .86rem; margin: .75rem 0 .25rem; }
.video-summary, .article-section { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.video-summary h2, .article-section h2 { margin-top: .25rem; }
.article-section li { padding: .25rem 0; }
.article-section ol { padding-left: 1.4rem; }
.external-video { display: flex; align-items: center; gap: 1rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--surface); }
.external-video h2 { margin: 0; }
.play-symbol { display: grid; place-items: center; flex: 0 0 3rem; height: 3rem; border-radius: 50%; color: var(--dark); background: var(--gold); }
.search-filters { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0; }
.search-filters label { display: grid; gap: .4rem; flex: 1 1 13rem; font-weight: 600; min-width: 0; }
@media(max-width:720px) {
  .section-grid, .entry-grid { grid-template-columns: 1fr; }
  #search-form { width: 100%; }
  .topbar { gap: .6rem; }
  .hero-copy h1 { font-size: 2.2rem; }
  .hero { min-height: 0; }
  .external-video { align-items: flex-start; padding: 1rem; }
  .category-nav a { padding: .45rem .8rem; }
  .breadcrumb { font-size: .8rem; }
}
