/* ════════════════════════════════════════════════
   RESPONSIVE — CEA FÉNIX
   Breakpoints: 900px (tablet/hamburger) · 768px (mobile) · 480px (small)
════════════════════════════════════════════════ */

/* ══ HEADER ══════════════════════════════════════ */
@media (max-width: 900px) {
  .main-header {
    height: auto;
    min-height: 4rem;
    padding: .75rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 999;
  }
  .logo img { width: 110px; }

  /* Hamburger */
  .menu-toggle { display: block; }

  /* Navbar dropdown */
  #navbar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(10,10,15,0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease;
  }
  .dark-mode #navbar { background: rgba(10,10,15,0.97); }

  #navbar.show { max-height: 700px; }

  #navbar ul {
    flex-direction: column;
    padding: 1.25rem 1.5rem 1.5rem;
    gap: 1.1rem;
  }

  /* Redes sociales dentro del navbar en móvil */
  .social-nav {
    display: flex !important;
    gap: 1.25rem;
    padding: .75rem 0 .25rem;
    border-top: 1px solid rgba(255,255,255,.1);
  }
  .social-nav a {
    color: rgba(255,255,255,.8);
    font-size: 1.3rem;
    transition: color .2s;
  }
  .social-nav a:hover { color: var(--secondary); }

  /* Ocultar la barra lateral de redes en móvil */
  .social-bar { display: none !important; }
}

/* ══ HERO ═════════════════════════════════════════ */
@media (max-width: 900px) {
  .hero {
    margin-top: 0;
    padding: 2.5rem 1.25rem;
    grid-template-columns: 1fr;
    text-align: center;
    min-height: auto;
    border-radius: 0;
    background-size: cover;
  }
  .hero h1 { font-size: clamp(1.8rem, 6vw, 2.4rem); line-height: 1.2; }
  .hero p  { font-size: 1rem; margin: .875rem auto; max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .hero-img {
    min-height: 220px;
    max-height: 300px;
    border-radius: 12px;
  }
}

/* ══ SECCIONES PADRE — ancho máximo en móvil ════ */
@media (max-width: 768px) {
  section {
    padding: 3rem 1.25rem;
    max-width: 100%;
  }

  /* Contenedores padre: ancho 100%, sin margen lateral */
  .services,
  .requirements,
  .trust,
  .testimonios,
  .ubicacion,
  .pagos-aliados,
  .about-section {
    width: 100%;
    border-radius: 0;
    margin-left: 0;
    margin-right: 0;
  }

  /* Colores de sección en responsive (consistentes con el diseño) */
  .courses     { background-color: var(--bg); width: 100%; border-radius: 0; }
  .testimonios { background-color: var(--bg-section); }
  .trust       { background: var(--bg-section); }
}

/* ══ CURSOS ══════════════════════════════════════ */
@media (max-width: 768px) {
  .courses { margin-top: 0; width: 100%; border-radius: 0; }
  .courses-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .course-card { padding: 1.5rem; }
  /* Cards de curso A2/C1/B1: mantener colores en responsive */
  .course-img1,
  .course-img2,
  .course-img3 { border-radius: 16px; }
}

/* ══ SERVICIOS ════════════════════════════════════ */
@media (max-width: 768px) {
  .super-contenedor { height: auto; min-height: 80vh; }
  .grid { flex-direction: column; overflow-y: auto; }
  .services h2 { text-shadow: none; }
  .card { height: auto; min-height: 12rem; }
}

/* ══ TESTIMONIOS ══════════════════════════════════ */
@media (max-width: 768px) {
  .testimonios { width: 100%; border-radius: 0; }
  .testimonios-grid { grid-template-columns: 1fr; }
  .testimonio { margin-bottom: 1.25rem; }
}

/* ══ TRUST / ALIADOS ══════════════════════════════ */
@media (max-width: 768px) {
  .trust { width: 100%; border-radius: 0; }
  .trust-items { gap: 1rem; }
  .trust-box { max-width: 100%; }
  .aliados-pagos { gap: 1.25rem; flex-wrap: wrap; }
  .logo-img { height: 28px; }
}

/* ══ NOSOTROS ═════════════════════════════════════ */
@media (max-width: 768px) {
  .about-section { padding: 3rem 1rem; }
  .about-container { padding: 1.25rem; min-height: 140px; }
  .text-slider { height: 90px; }
  .text-slider h3 { font-size: clamp(1.4rem, 5vw, 1.9rem); }
  .texto p { font-size: .95rem; }
  .sedes { flex-direction: column; align-items: center; }
  .sede { width: 100%; max-width: 340px; justify-content: center; }
  /* Imagen del auto en nosotros */
  .about-section::before { background-position: center top; opacity: .25; }
}

/* ══ VIDEOS ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .video-card iframe,
  iframe[src*="youtube"],
  iframe[src*="maps.google"] {
    width: 100%;
    height: 210px;
    border-radius: 10px;
  }
  .capa-video iframe { height: 56.25vw; min-height: 200px; transform: translate(-50%,-50%) scale(1); }
  .blog-content { padding: 1.25rem; }
  .newsletter-content { padding: 2.5rem 1.25rem; }
  .blog-hero { min-height: 40vh; }
}

/* ══ MAPA ═════════════════════════════════════════ */
@media (max-width: 768px) {
  .ubicacion iframe { width: 100%; height: 250px; border-radius: 10px; }
  .map-section iframe { width: 100%; height: 260px; }
}

/* ══ TIENDA ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .store-section { padding: 3rem 1rem; }
  .store-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }
  .product-card { border-radius: 12px; }
  .product-card img { height: 130px; }
}

/* ══ NORMAS ═══════════════════════════════════════ */
@media (max-width: 768px) {
  .normas-grid-section, .tips-viales { padding: 3rem 1rem; }
  .hero-content h1 { font-size: 2rem; }
  .card-senales { grid-template-columns: 1fr; }
  .senales-img { height: 190px; }
  .card-info { padding: 1.25rem; }
  .normas-transito { padding: 3rem 1rem; }
}

/* ══ CONTACTO ═════════════════════════════════════ */
@media (max-width: 768px) {
  .contact-hero { min-height: 42vh; padding: 2.5rem 1rem; }
  .contact-section { padding: 3rem 1rem; grid-template-columns: 1fr; }
  .contact-form { padding: 1.5rem; }
}

/* ══ SEDES ════════════════════════════════════════ */
@media (max-width: 768px) {
  .sede-img { height: 220px; }
  .sede-info { padding: 1.5rem; }
  .btn-group { flex-direction: column; }
  .btn-whatsapp, .btn-map { width: 100%; text-align: center; }
}

/* ══ TÍTULOS GENERALES ════════════════════════════ */
@media (max-width: 768px) {
  h1 { font-size: clamp(1.7rem, 6vw, 2.4rem) !important; }
  h2 { font-size: clamp(1.4rem, 5vw, 2rem) !important; }
  h3 { font-size: clamp(1.1rem, 4vw, 1.5rem) !important; }
  .section-title h2 { font-size: clamp(1.4rem, 5vw, 1.9rem); }
}

/* ══ CTA FINAL ════════════════════════════════════ */
@media (max-width: 768px) {
  .cta-final { max-width: 100%; border-radius: 0; margin: 2rem 0; padding: 3rem 1.5rem; }
}

/* ══ PAGOS / ALIADOS ══════════════════════════════ */
@media (max-width: 600px) {
  .aliados-pagos { gap: 1.25rem; }
  .logo-img { height: 26px; }
}

/* ══ SMALL PHONES (480px) ════════════════════════ */
@media (max-width: 480px) {
  .main-header { padding: .6rem 1rem; }
  .logo img { width: 95px; }
  .hero h1 { font-size: 1.75rem; }
  .store-grid { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .course-card { padding: 1.25rem; }
  .trust-box { padding: 1.25rem; }
}

/* ══ DARK MODE RESPONSIVE ═════════════════════════
   Los colores de sección se mantienen consistentes
   con el modo oscuro en desktop
════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .dark-mode .courses     { background-color: var(--bg); }
  .dark-mode .testimonios { background-color: var(--bg-section); }
  .dark-mode .trust       { background: var(--bg-section); }
  .dark-mode .services    { background: var(--bg-section); }
  .dark-mode .requirements{ background: var(--bg-section); }
}
