/* ===== Reset y base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', 'Arial Unicode MS', Arial, sans-serif;
  background-color: #0b0a09;
  color: #f5f0e8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* Fondo difuminado */
  background-image: url('../img/fondo-borroso.png');
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

/* ===== Header ===== */
.header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  flex-shrink: 0;
  justify-content: space-between;
}

.header__logo {
  flex-shrink: 0;
}

.header__logo-img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  display: block;
}

.header__title {
  font-size: 2.2rem;
  font-weight: 700;
  color: #f5f0e8;
  letter-spacing: 2px;
  margin: 0;
}

.header__youtube {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #f5f0e8;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  backdrop-filter: blur(8px);
  background: rgba(11, 10, 9, 0.75);
  white-space: nowrap;
}

.header__youtube:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

.header__youtube i {
  font-size: 1.2rem;
  color: #ff0000;
}

/* ===== Contenedor principal ===== */
.container {
  flex: 1;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.section-title {
  font-size: 1.5rem;
  color: #f5f0e8;
  margin-bottom: 1.5rem;
  padding-top: 20px;
  text-align: center;
}

.footer {
  color: #f5f0e8;
  margin-bottom: 1.5rem;
  padding-top: 20px;
  text-align: center;
}

/* ===== Grid de videos ===== */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

/* ===== Tarjeta de video ===== */
.video-card {
  background: rgba(11, 10, 9, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12);
}

.video-card__img-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* Relación 16:9 */
  background: #1a1a1a;
  overflow: hidden;
}

.video-card__img-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}

/* Icono de reproducción de YouTube */
.video-card__play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.8rem;
  color: #ff0000;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.video-card__img-wrap:hover .video-card__play-icon,
.video-card__img-wrap:focus-within .video-card__play-icon {
  opacity: 1;
}

/* Título debajo del video, bloque completo */
.video-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f5f0e8;
  margin: 0.75rem 1.25rem 0.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Descripción debajo del título (color de texto) */
.video-card__desc {
  font-size: 0.85rem;
  color: #b0a89e;
  line-height: 1.4;
  margin: 0 1.25rem 1.25rem;
  padding: 0 1.25rem 1.25rem;
  border-radius: 0 0 8px 8px;
}

/* ===== Tarjeta de PDF ===== */
.pdf-card {
  background: rgba(11, 10, 9, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 1.25rem;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.pdf-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12);
}

.pdf-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f5f0e8;
  margin: 0 0 0.5rem 0;
}

.pdf-card__desc {
  font-size: 0.85rem;
  color: #b0a89e;
  line-height: 1.4;
  margin: 0 0 1rem 0;
}

.pdf-card__file {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #f5f0e8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pdf-card__file:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
}

.pdf-card__file i {
  font-size: 1rem;
  color: #f5f0e8;
}

/* ===== Tarjeta de PDF ===== */
.video-card {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.video-card__play-icon {
  cursor: pointer;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header {
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
  }

  .header__logo-img {
    width: 56px;
    height: 56px;
  }

  .header__title {
    font-size: 1.6rem;
    text-align: center;
    order: 2;
  }

  .header__logo {
    order: 1;
  }

  .container {
    padding: 1rem;
  }

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

  .video-card__title {
    margin: 0.6rem 1rem 0.2rem;
    padding-bottom: 0.4rem;
  }

  .video-card__desc {
    margin: 0 1rem 1rem;
  }
}

@media (max-width: 480px) {
  .header__title {
    font-size: 1.3rem;
  }

  .header__logo-img {
    width: 44px;
    height: 44px;
  }

  .video-card__title {
    font-size: 0.95rem;
  }

  .video-card__desc {
    font-size: 0.8rem;
  }
}
