/* =====================
  MOVFAP MEDIA QUERIES
  Medidas estándar: 1024px, 768px, 425px, 375px, 320px
====================== */

/* =====================
   DESKTOP - 1024px
====================== */
@media (max-width: 1024px) {
  /* Header */
  header {
    padding: 12px 15px;
  }

  .menu-principal {
    gap: 20px;
  }

  .menu-principal a {
    font-size: 0.95rem;
    padding: 8px 12px;
  }

  /* Hero Section */
  .hero-content h1 {
    font-size: 2.8rem;
  }
  
  .hero-movfap {
    height: 60vh; /* Mantener 60% de altura en pantallas grandes (PC/tablet horizontal) */
    padding: 0 15px;

  .hero-content p {
    font-size: 1.1rem;
  }

  /* Contenido */
  .contenido-movfap {
    padding: 60px 15px;
  }

  .movfap-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
  }
}

/* =====================
   TABLET - 768px
====================== */
@media (max-width: 768px) {
  /* Ajustar padding del header (estructura de columnas se mantiene desde header.css) */
  header {
    padding: 10px 15px;
    grid-template-columns: auto auto auto;
    justify-content: space-around;
  }

  /* LOGO // REDES // BTN HAMBURGUESA en una fila */
  .logo {
    grid-column: 1;
    order: 1;
  }

  .redes-sociales {
    grid-column: 2;
    display: flex;
    justify-content: center;
    order: 2;
  }

  .menu-principal {
    display: none;
  }

  .btn-hamburguesa {
    grid-column: 3;
    justify-self: end;
    display: flex;
    order: 3;
  }

  /* Hero Section */
  .hero-content h1 {
    font-size: 2.3rem;
  }

  .hero-content p {
    font-size: 1.05rem;
  }

  .hero-movfap {
    height: 50vh; /* 50% de la altura en <=768px */
    padding: 0 15px;
  }

  /* Contenido */
  .contenido-movfap {
    padding: 40px 15px;
  }

  .contenido-movfap h2 {
    font-size: 2rem;
  }

  .movfap-card {
    padding: 20px;
  }

  .movfap-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  /* Footer */
  footer {
    padding: 30px 15px 15px;
  }

  .footer-content {
    gap: 20px;
  }

  .footer-nav {
    gap: 15px;
  }

  .footer-nav a {
    font-size: 0.9rem;
    padding: 6px 12px;
  }

  .footer-social {
    gap: 15px;
  }

  .footer-social a {
    width: 40px;
    height: 40px;
  }
}

/* =====================
   MOBILE LARGE - 425px
====================== */
@media (max-width: 425px) {
  /* Header - LOGO, RED SOCIAL, BTN-HAMBURGUESA usando grid */
  header {
    padding: 10px 15px;
    grid-template-columns: auto auto auto;
    justify-content: space-around;
    gap: 15px;
  }

  .logo {
    grid-column: 1;
    order: 1;
  }

  .redes-sociales {
    grid-column: 2;
    display: flex !important;
    justify-content: center;
    order: 2;
  }

  .btn-hamburguesa {
    grid-column: 3;
    justify-self: end;
    display: flex !important;
    flex-direction: column;
    order: 3;
  }

  .menu-principal {
    display: none;
  }

  /* Mostrar navegación inferior */
  .bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1001 !important;
  }

  /* Ajustar body para el bottom nav */
  body {
    padding-bottom: 80px !important; /* Espacio para el bottom nav */
  }

  .sidebar-nav {
    width: 95vw;
    padding: 50px 15px 15px;
  }

  .sidebar-nav a {
    font-size: 1rem;
    padding: 12px 15px;
  }

  .logo img {
    height: 35px;
  }

  /* Reducir tamaño de iconos de redes en móvil grande */
  .icono-red-social {
    width: 36px;
    height: 36px;
  }

  .icono-red-social i {
    font-size: 16px;
  }

  /* Hero Section */
  .hero-content h1 {
    font-size: 2rem !important;
    margin-bottom: 15px !important;
  }
  
  .hero-movfap {
    height: 50vh; /* 50% de altura en 425px */
    padding: 0 15px;

  .hero-content p {
    font-size: 1rem;
    margin-bottom: 25px;
  }

  /* Contenido */
  .contenido-movfap {
    padding: 30px 10px;
  }

  .contenido-movfap h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .contenido-movfap p {
    font-size: 1.1rem;
    margin-bottom: 20px;
  }

  .movfap-card {
    padding: 15px;
    margin-bottom: 20px;
  }

  .movfap-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  /* Footer */
  .footer-nav {
    flex-direction: column;
    gap: 10px;
  }

  .footer-nav a {
    padding: 8px 15px;
    font-size: 0.85rem;
  }

  .footer-content p {
    font-size: 0.9rem;
    text-align: center;
  }

  /* Mostrar navegación inferior */
  .bottom-nav {
    display: flex !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1001 !important;
  }

  /* Ajustar body para el bottom nav */
  body {
    padding-bottom: 80px !important; /* Espacio para el bottom nav */
  }

  .sidebar-nav {
    width: 95vw;
    padding: 50px 15px 15px;
  }

  .sidebar-nav a {
    font-size: 1rem;
    padding: 12px 15px;
  }

  .logo img {
    height: 35px;
  }

  /* Hero Section */
  .hero-content h1 {
    font-size: 1.8rem !important;
    margin-bottom: 15px !important;
  }

  .hero-content p {
    font-size: 1.1rem;
    margin-bottom: 25px;
  }

  .hero-movfap {
    padding: 80px 10px 50px;
  }

  /* Contenido */
  .contenido-movfap {
    padding: 30px 10px;
  }

  .contenido-movfap h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .contenido-movfap p {
    font-size: 1.1rem;
    margin-bottom: 20px;
  }

  .movfap-card {
    padding: 15px;
    margin-bottom: 20px;
  }

  .movfap-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
  }

  /* Footer */
  .footer-nav {
    flex-direction: column;
    gap: 10px;
  }

  .footer-nav a {
    padding: 8px 15px;
    font-size: 0.85rem;
  }

  .footer-content p {
    font-size: 0.9rem;
    text-align: center;
  }
}

/* =====================
   MOBILE MEDIUM - 375px
====================== */
@media (max-width: 375px) {
  /* Header - LOGO, RED SOCIAL, BTN-HAMBURGUESA usando grid */
  header {
    grid-template-columns: auto auto auto;
    justify-content: space-around;
    gap: 12px;
  }

  .logo {
    grid-column: 1;
    order: 1;
  }

  .logo img {
    height: 32px;
  }

  /* Reducir tamaño de iconos de redes en móvil medio */
  .icono-red-social {
    width: 34px;
    height: 34px;
  }

  .icono-red-social i {
    font-size: 15px;
  }

  .redes-sociales {
    grid-column: 2;
    display: flex !important;
    justify-content: center;
    order: 2;
  }

  .btn-hamburguesa {
    grid-column: 3;
    justify-self: end;
    order: 3;
  }

  /* Mantener bottom nav */
  .bottom-nav {
    display: flex !important;
    padding: 6px 8px 10px;
    position: fixed !important;
    bottom: 0 !important;
  }

  .bottom-nav-item {
    padding: 4px 6px;
    min-width: 55px;
  }

  .bottom-nav-icon {
    font-size: 1.3rem;
  }

  .bottom-nav-label {
    font-size: 0.65rem;
  }

  body {
    padding-bottom: 75px !important;
  }

  /* Hero Section */
  .hero-content h1 {
    font-size: 1.8rem !important; /* Igual que en 425px */
    margin-bottom: 15px !important;
  }

  .hero-content p {
    font-size: 1.1rem; /* Igual que en 425px */
    margin-bottom: 25px;
    line-height: 1.3;
  }

  .hero-movfap {
    height: 50vh; /* 50% de altura en 375px */
    padding: 0 10px;
  }

  /* Contenido */
  .contenido-movfap {
    padding: 25px 8px;
  }

  .contenido-movfap h2 {
    font-size: 1.6rem;
  }

  .contenido-movfap p {
    font-size: 1rem;
  }

  .movfap-card {
    padding: 12px;
    border-radius: 10px;
  }

  .movfap-card h3 {
    font-size: 1.3rem;
  }

  /* Footer */
  footer {
    padding: 25px 8px 12px;
  }

  .footer-nav a {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .footer-social a {
    width: 35px;
    height: 35px;
  }

  .footer-social img {
    width: 16px;
    height: 16px;
  }

  /* Trivias - 375px */
  .trivia-contenido {
    padding: 8px 5px; /* Reducido a la mitad de 15px 10px */
    margin: 0 8px;
  }

  .trivia-header h3 {
    font-size: 1.5rem;
    margin: 12px 0 6px;
  }

  .pregunta {
    font-size: 1.2rem;
    margin-bottom: 20px;
  }

  .explicacion {
    padding: 0;
    margin-top: 12px;
    font-size: 0.9rem;
  }

  .opcion-btn {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .opciones {
    gap: 12px;
    margin-bottom: 20px;
  }

  /* Mantener bottom nav */
  .bottom-nav {
    display: flex !important;
    padding: 6px 8px 10px;
    position: fixed !important;
    bottom: 0 !important;
  }

  .bottom-nav-item {
    padding: 4px 6px;
    min-width: 55px;
  }

  .bottom-nav-icon {
    font-size: 1.3rem;
  }

  .bottom-nav-label {
    font-size: 0.65rem;
  }

  body {
    padding-bottom: 75px !important;
  }

  /* Hero Section */
  .hero-content h1 {
    font-size: 1.8rem !important; /* Igual que en 425px */
    margin-bottom: 15px !important;
  }

  .hero-content p {
    font-size: 1.1rem; /* Igual que en 425px */
    margin-bottom: 25px;
    line-height: 1.3;
  }

  .hero-movfap {
    height: 50vh; /* 50% de altura en 320px */
    padding: 0 10px;
  }

  /* Contenido */
  .contenido-movfap {
    padding: 25px 8px;
  }

  .contenido-movfap h2 {
    font-size: 1.6rem;
  }

  .contenido-movfap p {
    font-size: 1rem;
  }

  .movfap-card {
    padding: 12px;
    border-radius: 10px;
  }

  .movfap-card h3 {
    font-size: 1.3rem;
  }

  /* Footer */
  footer {
    padding: 25px 8px 12px;
  }

  .footer-nav a {
    padding: 6px 12px;
    font-size: 0.8rem;
  }

  .footer-social a {
    width: 35px;
    height: 35px;
  }

  .footer-social img {
    width: 16px;
    height: 16px;
  }

  /* Trivias - 375px */
  .trivia-contenido {
    padding: 8px 5px; /* Reducido a la mitad de 15px 10px */
    margin: 0 8px;
  }

  .trivia-header h3 {
    font-size: 1.5rem;
    margin: 12px 0 6px;
  }

  .pregunta {
    font-size: 1.2rem;
    margin-bottom: 20px;
  }

  .explicacion {
    padding: 0;
    margin-top: 12px;
    font-size: 0.9rem;
  }

  .opcion-btn {
    padding: 10px 12px;
    font-size: 0.95rem;
  }

  .opciones {
    gap: 12px;
    margin-bottom: 20px;
  }
}

/* =====================
   MOBILE SMALL - 320px
====================== */
@media (max-width: 320px) {
  /* Header - LOGO, RED SOCIAL, BTN-HAMBURGUESA usando grid */
  header {
    padding: 8px 10px;
    grid-template-columns: auto auto auto;
    justify-content: space-around;
    gap: 10px;
  }

  .logo {
    grid-column: 1;
    order: 1;
  }

  .logo img {
    height: 28px;
  }

  /* Reducir tamaño de iconos de redes en móvil pequeño */
  .icono-red-social {
    width: 32px;
    height: 32px;
  }

  .icono-red-social i {
    font-size: 14px;
  }

  .redes-sociales {
    grid-column: 2;
    display: flex !important;
    justify-content: center;
    order: 2;
  }

  .btn-hamburguesa {
    grid-column: 3;
    justify-self: end;
    width: 25px;
    height: 20px;
    order: 3;
  }

  /* Mantener bottom nav optimizado */
  .bottom-nav {
    display: flex !important;
    padding: 5px 5px 8px;
    position: fixed !important;
    bottom: 0 !important;
  }

  .bottom-nav-item {
    padding: 3px 4px;
    min-width: 50px;
  }

  .bottom-nav-icon {
    font-size: 1.2rem;
    margin-bottom: 1px;
  }

  .bottom-nav-label {
    font-size: 0.6rem;
  }

  body {
    padding-bottom: 70px !important;
  }

  .sidebar-nav {
    width: 100vw;
    padding: 45px 12px 12px;
  }

  .sidebar-nav a {
    font-size: 0.9rem;
    padding: 10px 12px;
  }

  /* Hero Section */
  .hero-content h1 {
    font-size: 1.8rem !important; /* Igual que en 425px */
    margin-bottom: 15px !important;
  }

  .hero-content p {
    font-size: 1.1rem; /* Igual que en 425px */
    margin-bottom: 25px;
    line-height: 1.3;
  }

  .hero-movfap {
    padding: 80px 10px 50px; /* Igual que en 425px */
  }

  /* Contenido */
  .contenido-movfap {
    padding: 20px 5px;
  }

  .contenido-movfap h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }

  .contenido-movfap p {
    font-size: 0.95rem;
    margin-bottom: 15px;
  }

  .movfap-card {
    padding: 10px;
    margin-bottom: 15px;
  }

  .movfap-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }

  .movfap-card p {
    font-size: 0.9rem;
  }

  /* Footer */
  footer {
    padding: 20px 5px 10px;
  }

  .footer-content {
    gap: 15px;
  }

  .footer-nav a {
    padding: 5px 10px;
    font-size: 0.75rem;
  }

  .footer-content p {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .footer-social {
    gap: 12px;
  }

  .footer-social a {
    width: 32px;
    height: 32px;
  }

  .footer-social img {
    width: 14px;
    height: 14px;
  }

  .close-sidebar {
    font-size: 1.5rem;
    top: 15px;
    right: 15px;
  }

  /* Bepoli - 320px */
  .bepoli-carreras-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .bepoli-carrera-card {
    padding: 20px 12px;
  }

  .carrera-icono {
    font-size: 2.5rem;
    margin-bottom: 15px;
  }

  .carrera-nombre {
    font-size: 1.2rem;
  }

  .carrera-descripcion {
    font-size: 0.85rem;
  }

  .bepoli-libros-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .bepoli-libro-card {
    padding: 20px;
  }

  .libro-imagen {
    width: 80px;
    height: 100px;
  }

  .trivia-contenido {
    padding: 20px;
  }

  .pregunta {
    font-size: 1.2rem;
  }

  .opcion-btn {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  /* Trivias - 320px */
  .trivia-contenido {
    padding: 6px 4px; /* Reducido a la mitad de 12px 8px */
    margin: 0 5px;
  }

  .trivia-header h3 {
    font-size: 1.4rem;
    margin: 10px 0 5px;
  }

  .pregunta {
    font-size: 1.1rem;
    margin-bottom: 18px;
    line-height: 1.3;
  }

  .explicacion {
    padding: 0;
    margin-top: 10px;
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .opcion-btn {
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .opciones {
    gap: 10px;
    margin-bottom: 18px;
  }

  .btn-siguiente,
  .btn-finalizar {
    padding: 10px 20px;
    font-size: 0.9rem;
    margin-top: 15px;
  }

  /* Mantener bottom nav optimizado */
  .bottom-nav {
    display: flex !important;
    padding: 5px 5px 8px;
    position: fixed !important;
    bottom: 0 !important;
  }

  .bottom-nav-item {
    padding: 3px 4px;
    min-width: 50px;
  }

  .bottom-nav-icon {
    font-size: 1.2rem;
    margin-bottom: 1px;
  }

  .bottom-nav-label {
    font-size: 0.6rem;
  }

  body {
    padding-bottom: 70px !important;
  }

  .sidebar-nav {
    width: 100vw;
    padding: 45px 12px 12px;
  }

  .sidebar-nav a {
    font-size: 0.9rem;
    padding: 10px 12px;
  }

  /* Hero Section */
  .hero-content h1 {
    font-size: 1.7rem !important;
    line-height: 1.2 !important;
    margin-bottom: 12px !important;
  }

  .hero-content p {
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.3;
  }

  .hero-movfap {
    padding: 40px 5px 25px; /* Reducido de 60px a 40px arriba y de 35px a 25px abajo */
  }

  /* Contenido */
  .contenido-movfap {
    padding: 20px 5px;
  }

  .contenido-movfap h2 {
    font-size: 1.4rem;
    margin-bottom: 15px;
  }

  .contenido-movfap p {
    font-size: 0.95rem;
    margin-bottom: 15px;
  }

  .movfap-card {
    padding: 10px;
    margin-bottom: 15px;
  }

  .movfap-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
  }

  .movfap-card p {
    font-size: 0.9rem;
  }

  /* Footer */
  footer {
    padding: 20px 5px 10px;
  }

  .footer-content {
    gap: 15px;
  }

  .footer-nav a {
    padding: 5px 10px;
    font-size: 0.75rem;
  }

  .footer-content p {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .footer-social {
    gap: 12px;
  }

  .footer-social a {
    width: 32px;
    height: 32px;
  }

  .footer-social img {
    width: 14px;
    height: 14px;
  }

  .close-sidebar {
    font-size: 1.5rem;
    top: 15px;
    right: 15px;
  }

  /* Bepoli - 320px */
  .bepoli-carreras-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .bepoli-carrera-card {
    padding: 20px 12px;
  }

  .carrera-icono {
    font-size: 2.5rem;
    margin-bottom: 15px;
  }

  .carrera-nombre {
    font-size: 1.2rem;
  }

  .carrera-descripcion {
    font-size: 0.85rem;
  }

  .bepoli-libros-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .bepoli-libro-card {
    padding: 20px;
  }

  .libro-imagen {
    width: 80px;
    height: 100px;
  }

  .trivia-contenido {
    padding: 20px;
  }

  .pregunta {
    font-size: 1.2rem;
  }

  .opcion-btn {
    padding: 12px 15px;
    font-size: 0.9rem;
  }

  /* Trivias - 320px */
  .trivia-contenido {
    padding: 6px 4px; /* Reducido a la mitad de 12px 8px */
    margin: 0 5px;
  }

  .trivia-header h3 {
    font-size: 1.4rem;
    margin: 10px 0 5px;
  }

  .pregunta {
    font-size: 1.1rem;
    margin-bottom: 18px;
    line-height: 1.3;
  }

  .explicacion {
    padding: 0;
    margin-top: 10px;
    font-size: 0.85rem;
    line-height: 1.4;
  }

  .opcion-btn {
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .opciones {
    gap: 10px;
    margin-bottom: 18px;
  }

  .btn-siguiente,
  .btn-finalizar {
    padding: 10px 20px;
    font-size: 0.9rem;
    margin-top: 15px;
  }
}

/* =====================
   BEPOLI RESPONSIVE ADICIONAL
====================== */

/* 425px - Móviles grandes */
@media (max-width: 425px) and (min-width: 321px) {
  .bepoli-carreras-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .bepoli-carrera-card {
    padding: 25px 15px;
  }

  /* Trivias - 425px */
  .trivia-contenido {
    padding: 10px 8px; /* Reducido a la mitad de 20px 15px */
    margin: 0 10px; /* Reducir margen lateral */
  }

  .trivia-header h3 {
    font-size: 1.6rem;
    margin: 15px 0 8px;
  }

  .pregunta {
    font-size: 1.3rem;
    margin-bottom: 25px;
  }

  .explicacion {
    padding: 0; /* Sin padding */
    margin-top: 15px;
  }

  .opcion-btn {
    padding: 12px 15px; /* Reducido de 15px 20px */
  }

  .opciones {
    margin-bottom: 25px;
  }
}