:root {
  --red: #e10600;
  --red-dark: #9a0400;
  --red-soft: #fff0f0;
  --text: #241417;
  --muted: #8a7275;
  --border: #ece2e2;
  --surface: #faf8f8;
  --font: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: linear-gradient(180deg, #fff 0%, var(--surface) 100%);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem 1.1rem 2.5rem;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.brand__nav {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.brand__nav a {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  transition: color 0.15s, border-color 0.15s;
}

.brand__nav a:hover {
  color: var(--red);
  border-color: rgba(225, 6, 0, 0.25);
}

.hero {
  text-align: center;
  margin-bottom: 1.75rem;
}

.hero__breadcrumb {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.hero__breadcrumb a { color: var(--red); text-decoration: none; }

.hero h1 {
  font-size: clamp(1.35rem, 4.5vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.65rem;
}

.hero h1 span { color: var(--red); }

.hero__sub {
  font-size: 0.88rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 1rem;
}

.hero__stats {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem 1.1rem;
  font-size: 0.72rem;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  box-shadow: 0 4px 20px rgba(36, 20, 23, 0.04);
}

.hero__stats strong { color: var(--text); }

.hero__channel {
  color: var(--red);
  font-weight: 800;
  text-decoration: none;
}

.hero__channel:hover { text-decoration: underline; }

.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.75rem;
  margin-bottom: 1.5rem;
  display: grid;
  gap: 0.65rem;
}

.toolbar__search {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.6rem 0.75rem;
  font: inherit;
  font-size: 0.85rem;
}

.toolbar__search:focus {
  outline: 2px solid rgba(225, 6, 0, 0.25);
  border-color: rgba(225, 6, 0, 0.35);
}

.toolbar__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.filter-chip {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s;
}

.filter-chip:hover { border-color: rgba(225, 6, 0, 0.25); color: var(--text); }

.filter-chip--active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.section { margin-bottom: 2rem; }

.section__head {
  margin-bottom: 0.85rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
}

.section__head h2 {
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}

.section__head p {
  font-size: 0.75rem;
  color: var(--muted);
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.85rem;
}

.video-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.video-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.video-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(225, 6, 0, 0.1);
  border-color: rgba(225, 6, 0, 0.2);
}

.video-card--featured {
  border-color: rgba(225, 6, 0, 0.25);
  box-shadow: 0 8px 24px rgba(225, 6, 0, 0.08);
}

.video-card__play {
  position: relative;
  border: none;
  padding: 0;
  background: #111;
  cursor: pointer;
  aspect-ratio: 16 / 9;
  width: 100%;
}

.video-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.92;
  transition: opacity 0.2s, transform 0.25s;
}

.video-card__play:hover .video-card__thumb {
  opacity: 1;
  transform: scale(1.03);
}

.video-card__play-icon {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(36, 20, 23, 0.28);
  transition: background 0.2s;
}

.video-card__play-icon svg {
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.35));
}

.video-card__play:hover .video-card__play-icon {
  background: rgba(225, 6, 0, 0.45);
}

.video-card__body {
  padding: 0.85rem 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.45rem;
}

.video-card__tag {
  align-self: flex-start;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red-dark);
}

.video-card__tag--ejecucion { background: #eef6ff; color: #1a5fb4; }
.video-card__tag--supervision { background: #f3eefc; color: #613583; }
.video-card__tag--tecnico { background: #eef8f0; color: #2e7d32; }

.video-card__title {
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.video-card__desc {
  font-size: 0.74rem;
  color: var(--muted);
  flex: 1;
}

.video-card__actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.video-card__btn {
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.15s;
}

.video-card__btn--primary {
  background: var(--red);
  color: #fff;
}

.video-card__btn--primary:hover { background: var(--red-dark); transform: translateY(-1px); }

.video-card__btn--ghost {
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--border);
}

.video-card__btn--ghost:hover { color: var(--red); border-color: rgba(225, 6, 0, 0.25); }

.empty {
  text-align: center;
  color: var(--muted);
  padding: 2rem 1rem;
  font-size: 0.85rem;
}

.cta-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.75rem;
  margin: 2rem 0 1.5rem;
}

.cta-card {
  background: linear-gradient(165deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  border-radius: 14px;
  padding: 1.15rem 1.1rem;
}

.cta-card--dark {
  background: linear-gradient(165deg, #2a2224 0%, #141012 100%);
}

.cta-card h2 {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.cta-card p {
  font-size: 0.75rem;
  opacity: 0.92;
  margin-bottom: 0.85rem;
}

.cta-card__btn {
  display: inline-block;
  background: #fff;
  color: var(--red-dark);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
}

.cta-card__btn--light {
  background: var(--red);
  color: #fff;
}

.foot {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  padding-top: 0.5rem;
}

.foot a { color: var(--red); font-weight: 700; text-decoration: none; }
.foot a:hover { text-decoration: underline; }

.modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(920px, 96vw);
  width: 100%;
}

.modal::backdrop {
  background: rgba(20, 16, 18, 0.75);
  backdrop-filter: blur(4px);
}

.modal__inner {
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
}

.modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.modal__close:hover { background: rgba(255,255,255,0.28); }

.modal__frame-wrap {
  aspect-ratio: 16 / 9;
}

.modal__frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

@media (max-width: 640px) {
  .video-grid, .video-grid--compact { grid-template-columns: 1fr; }
  .brand { flex-direction: column; align-items: flex-start; }
}
