/* Videos page specific styles */

#all-videos h1 {
  margin-top: 2.5rem;
  font-size: 2rem;
  text-align: center;
}

/* Search and filter container styling */
#all-videos .search-filter-container {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: flex-start;
  max-width: 600px;
  margin: 1.5rem auto 2rem auto;
}

#video-search {
  flex: 1;
  padding: .75rem 1rem;
  border-radius: .5rem;
  border: 2px solid var(--bs-border);
  background: var(--bs-surface-0);
  color: var(--bs-text-0);
  font-size: 1rem;
  font-family: 'Lexend', sans-serif;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#video-search:focus {
  outline: none;
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 3px var(--bs-border-soft);
}

.note-container {
  max-width: 700px;
  margin: 1rem auto 2rem auto;
  background: var(--bs-surface-0);
  border: 1px solid var(--bs-border);
  border-left: 3px solid var(--bs-primary);
  border-radius: 10px;
  padding: 1em 1.25em;
  display: flex;
  flex-direction: column;
  gap: 0.6em;
  box-shadow: none;
}

.note-content {
  color: var(--bs-text-1);
  font-size: 0.88em;
  font-weight: 400;
  line-height: 1.6;
}

.note-content .note-label {
  font-weight: 700;
  color: var(--bs-text-0);
}

.note-disclaimer {
  padding-top: 0.5em;
  border-top: 1px solid var(--bs-border);
  font-size: 0.85em;
}

.note-link {
  color: var(--bs-primary);
  text-decoration: underline;
}

/* Video grid layout */
#all-video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 2rem;
  margin-top: 1rem;
  margin-bottom: 4rem;
}

/* Video card styling */
.video-card {
  background: var(--bs-surface-0);
  border: 1px solid var(--bs-border);
  border-radius: 16px;
  box-shadow: 0 2px 16px -6px rgba(0, 0, 0, 0.14);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.video-card:hover {
  transform: translateY(-5px);
  border-color: var(--bs-primary);
  box-shadow: 0 8px 28px -8px rgba(0, 0, 0, 0.2);
}

.video-card iframe {
  width: 100%;
  height: 220px;
  border: none;
  flex-shrink: 0;
}

.video-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.video-card-body h3 {
  margin: 0 0 0.75rem 0;
  font-size: 1.1rem;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--bs-text-0);
  line-height: 1.3;
}

.video-card-body p {
  margin: 0 0 1rem 0;
  color: var(--bs-text-1);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}

.video-resources-btn {
  text-align: center;
  margin-top: auto;
  padding-top: 1rem;
}

/* ── Dark mode overrides ── */

html[data-theme="dark"] .video-card:hover {
  box-shadow: 0 8px 32px -8px rgba(59, 206, 185, 0.18);
}

/* ── Light mode (Pergamino) overrides ── */
html[data-theme="light"] .video-card {
  background: var(--bs-surface-0);
  box-shadow: 0 2px 14px -4px rgba(90, 70, 30, 0.12);
}

html[data-theme="light"] .video-card:hover {
  box-shadow: 0 8px 28px -6px rgba(26, 128, 112, 0.20);
  border-color: var(--bs-primary);
}

html[data-theme="light"] .note-container {
  box-shadow: none;
}

@media (max-width: 768px) {
  #all-videos .search-filter-container {
    flex-direction: column;
    gap: 0.75rem;
    margin: 1rem auto 1.5rem auto;
    padding: 0 1rem;
  }

  #video-search {
    width: 100%;
    max-width: none;
  }

  .custom-select-wrapper {
    width: 100%;
    max-width: 200px;
  }

  #all-video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    padding: 0 0.5rem;
  }

  .note-container {
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  h2 {
    margin-top: 2rem !important;
    font-size: 1.8rem;
    text-align: center;
  }

  #all-videos .search-filter-container {
    margin: 1rem auto 1rem auto;
  }

  .video-card iframe {
    height: 130px;
  }

  .video-card-body {
    padding: 0.65rem 0.75rem 0.75rem;
  }

  .video-card-body h3 {
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
    line-height: 1.25;
  }

  .video-card-body p {
    font-size: 0.75rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .video-resources-btn {
    margin-top: 0.5rem;
  }

  .video-resources-btn .btn {
    font-size: 0.72rem;
    padding: 6px 12px;
  }

  .note-content {
    padding: 0.6em 0.9em;
    font-size: 0.95em;
  }
}

/* ── Paginación ── */
.videos-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 2rem;
  flex-wrap: wrap;
}
.videos-pagination button {
  min-width: 2.4rem;
  height: 2.4rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1.5px solid var(--bs-border);
  background: transparent;
  color: var(--bs-text-1);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.videos-pagination button:hover {
  border-color: var(--bs-primary);
  color: var(--bs-primary);
}
.videos-pagination button.active {
  border-color: var(--bs-primary);
  background: color-mix(in srgb, var(--bs-primary) 15%, transparent);
  color: var(--bs-primary);
  font-weight: 600;
}
.videos-pagination button:disabled {
  opacity: 0.35;
  cursor: default;
}


/* Estado "sin resultados" del buscador/filtro de videos */
.videos-empty-state{grid-column:1/-1;text-align:center;padding:3rem 1rem;color:var(--text-dark)}

/* ── Selector Videos / Minijuegos ── */
.videos-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: 340px;
  margin: 1.5rem auto 2rem;
  background: var(--bs-surface-1);
  border: 1px solid var(--bs-border);
  border-radius: 999px;
  padding: 4px;
}
/* Son <a> (cada vista tiene su propia URL), no <button>: de ahí el reset de
   text-decoration/color y el centrado explícito. */
.videos-tab-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  display: block;
  text-align: center;
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bs-text-1);
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.videos-tab-btn:hover:not(.active) { color: var(--bs-primary); }
.videos-tab-btn.active {
  background: var(--bs-primary);
  color: #040D14;
  box-shadow: 0 0 18px -6px color-mix(in srgb, var(--bs-primary) 60%, transparent);
}
.videos-tab-btn:focus-visible {
  outline: 2px solid var(--bs-primary);
  outline-offset: 2px;
}

.videos-empty-state p{font-size:1.1rem;margin-bottom:1.25rem;opacity:.85}
