/* ==================================================
   RESET Y BASE - NUNCA SOBREESCRIBIR
   ================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Fuerza Nunito en TODA la página + fondo #f2f2f2 + espacio superior razonable */
html, body {
  font-family: 'Nunito', sans-serif !important;
  background: #f2f2f2;
  color: #333;
  line-height: 1.6;
  margin: 0;
}

body.training-page {
  padding-top: 140px; /* ← espacio cómodo entre header fijo y título (antes 490px era excesivo) */
}

/* Forzar Nunito en elementos de Plyr, títulos, textos y botones */
.plyr, .plyr__controls, .plyr__tooltip, .plyr__poster, .plyr__time, .plyr__volume,
h1, h2, h3, h4, h5, h6, p, a, span, div, li, button, .section-title, .section-subtitle {
  font-family: 'Nunito', sans-serif !important;
}

/* ==================================================
   HEADER + FLECHA ANIMADA
   ================================================== */
header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.header-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 12px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.main-nav ul {
  display: flex;
  list-style: none;
}

.main-nav a {
  padding: 8px 20px;
  text-decoration: none;
  color: #000;
  font-weight: 600;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: #f8dea2;
}

.service-link {
  position: relative;
}

.arrow {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.85rem;
  transition: transform 0.3s ease;
}

.dropdown:hover .arrow {
  transform: rotate(180deg);
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  visibility: hidden;
  opacity: 0;
  position: absolute;
  background: white;
  min-width: 210px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  top: 100%;
  left: 0;
  border-radius: 6px;
  overflow: hidden;
  z-index: 10;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.dropdown:hover .dropdown-content {
  display: block;
  visibility: visible;
  opacity: 1;
}

.dropdown-content li {
  border-bottom: 1px solid #eee;
}

.dropdown-content li:last-child {
  border-bottom: none;
}

.dropdown-content a {
  display: block;
  padding: 14px 20px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  font-size: 0.98rem;
}

.dropdown-content a:hover {
  background: #f0f8ff;
}

.header-logo img {
  max-height: 50px;
  width: auto;
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.phone {
  font-weight: 700;
  font-size: 0.98rem;
  color: #444;
  white-space: nowrap;
}

.login-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.login {
  background: #4a90e2;
  color: white;
  padding: 6px 16px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.3s ease;
}

.login:hover {
  background: #3a7bc8;
}

/* ==================================================
   CONTENIDO PRINCIPAL
   ================================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  font-size: 3rem;
  color: #383838;
  margin: 60px 0 10px; /* más espacio arriba del título */
  font-weight: 700;
}

.section-subtitle {
  text-align: center;
  font-size: 1.3rem;
  color: #555;
  margin-bottom: 40px;
}

/* Botones de filtro - amarillo del footer */
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 0 auto 50px;
  max-width: 900px;
}

.filter-btn {
  background: #fcdc99;
  color: #000;
  border: none;
  padding: 12px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.filter-btn:hover {
  background: #f5c66e;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.filter-btn.active {
  background: #f5c66e;
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Grid de videos - más pequeños */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-bottom: 80px;
}

.video-card {
  background: white;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

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

.plyr-video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border-radius: 12px 12px 0 0;
  max-height: 170px; /* más pequeño que antes */
}

.video-card h3 {
  font-size: 1.25rem;
  margin: 16px 16px 8px;
  color: #333;
}

.video-card p {
  font-size: 0.95rem;
  color: #666;
  margin: 0 16px 20px;
}

/* Modal de zoom */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.video-modal.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 1200px;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 48px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}

.modal-close:hover {
  color: #f8dea2;
}

#modalVideo {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
}

/* Footer */
footer {
  background: #fcdc99;
  color: #333;
  padding: 50px 20px 30px;
  margin-top: 60px;
  text-align: center;
}

footer .container {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-content {
  margin-bottom: 40px;
}

.footer-info {
  display: inline-block;
  text-align: center;
  max-width: 400px;
}

.footer-info p {
  margin: 8px 0;
  font-size: 0.98rem;
  font-weight: 500;
}

.footer-info a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-info a:hover {
  color: #4a90e2;
}

.social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 25px;
  margin-top: 25px;
}

.social-links a {
  display: block;
  transition: transform 0.3s ease;
}

.social-links img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.social-links a:hover img {
  transform: translateY(-6px) scale(1.15);
}

.copyright {
  font-size: 0.9rem;
  color: #555;
  padding-top: 20px;
  border-top: 1px solid rgba(51,51,51,0.1);
  margin-top: 20px;
}

/* Responsive */
@media (max-width: 1024px) {
  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .videos-grid {
    grid-template-columns: 1fr;
  }
  .section-title {
    font-size: 2.6rem;
  }
  .plyr-video {
    max-height: 150px; /* aún más pequeño en móvil */
  }
}