/* Ajustes de dimensionamiento consistentes entre navegadores */
*, *::before, *::after { box-sizing: border-box; }
html { width: 100%; }

:root {
      --primary: #0a2e5c;
      --primary-hover: #0c5197;
      --text-light: #ffffff;
      --text-dark: #0a2e5c;
      --top-bar-h: 45px;
      --header-h: 60px;         
      --bg-gradient: linear-gradient(to right, #ffffff, #c4d3de);
    }

    body {
      margin: 0;
      font-family: 'Poppins', sans-serif;
      background: var(--bg-gradient);
      font-size: 14px;
      display: flex;
      flex-direction: column;
      min-height: 100vh;
      min-width: 0;
      width: 100%;
    }


   
 /* ===== TOP BAR SUPERIOR ===== */
    .top-bar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      min-height: var(--top-bar-h);
      background: var(--primary-hover);
      color: #fff;
      font-size: 16px;
      font-weight: 600;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding: 0 16px;
      box-sizing: border-box;
      z-index: 1001;
      
    }

    .top-bar a {
      display: inline-flex;          /* 👈 CLAVE */
      align-items: center;
      gap: 6px;
      color: #fff;
      font-size: 12px;
      font-weight: 600;
      text-decoration: none;
      /*border: 1px solid #fff;*/
      background-color: var(--primary);
      padding: 7px;
      padding-left: 10PX;
      padding-right: 10PX;
      border-radius: 7px;
      transition: transform 0.3s ease;
    }

    .top-bar svg {
      width: 16px;
      height: 16px;
      stroke: #fff;
      flex-shrink: 0;
    }

 
    .top-bar a:hover {
      color: var(--primary-hover);
      background-color: #fff;
      opacity: 1;
    }

   .top-bar a:hover svg {
      stroke: var(--primary-hover);
    }


    
    header {
      position: fixed;
      top: var(--top-bar-h); left: 0; right: 0;
      background: var(--primary);
      display: flex;
      align-items: center;
      justify-content: space-between; /* brand izquierda, menú/drawer derecha */
      z-index: 1000;
      box-shadow: 0 2px 8px rgba(0,0,0,0.15);
      height: var(--header-h);
      padding: 0 16px;
      box-sizing: border-box;
    }  

        /* ===== MAIN ===== */
    /* El banner ya separa el contenido del encabezado fijo. */
    main { padding-top: 0; }    

    nav {
      display: flex;
      gap: 1rem;
    }
    nav a {
      color: var(--text-light);
      text-decoration: none;
      font-weight: 600;
      padding: 0.5rem 1rem;
      border-radius: 6px;
      transition: background 0.3s;
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 12px;
    }
    nav a:hover { background: var(--primary-hover); }

    /* Botón hamburguesa */
    .menu-toggle {
      display: none;
      flex-direction: column;
      justify-content: space-between;
      width: 25px;
      height: 20px;
      cursor: pointer;
      margin-left: auto;
    }
    .menu-toggle span {
      display: block;
      height: 3px;
      width: 100%;
      background: var(--text-light);
      border-radius: 2px;
    }

    /* Overlay */
    .overlay {
      display: none;
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: rgba(0,0,0,0.5);
      z-index: 9998;
    }
    .overlay.show { display: block; }

    /* Sidebar */
    .sidebar {
      position: fixed;
      top: 0; right: -260px;
      width: 260px; height: 100%;
      background: var(--primary);
      display: flex; flex-direction: column;
      padding: 2rem 1rem;
      gap: 1rem;
      z-index: 9999;
      transition: right 0.3s ease;
      box-sizing: border-box;
    }
    .sidebar.show { right: 0; }
    .close-btn {
      align-self: flex-end;
      font-size: 2rem;
      background: none;
      border: none;
      color: var(--text-light);
      cursor: pointer;
      margin-bottom: 1rem;
    }
    
    .sidebar a {
      font-size: 12px;
      color: var(--text-light);
      text-decoration: none;
      font-weight: 600;
      padding: 0.75rem 1rem;
      border-radius: 6px;
      transition: background 0.3s;
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }

    .sidebar a:hover { background: var(--primary-hover); }

    
    /* Menú controlado exclusivamente por ancho, no por tipo de puntero. */
    @media (max-width: 1024px) {
      header nav { display: none; }
      .menu-toggle { display: flex; }
    }
    @media (min-width: 1025px) {
      header nav { display: flex; }
      .menu-toggle { display: none; }
      .overlay, .sidebar { display: none !important; }
    }

    /* ===== Ajuste del menú lateral en orientación apaisada (landscape mobile) ===== */
    @media screen and (orientation: landscape) and (max-width: 1024px) {
      .sidebar {
        padding: 1rem 0.5rem;  /* reduce espacio interno */
        gap: 0.5rem;
        overflow-y: auto;      /* permite hacer scroll si igual no entra */
      }

      .sidebar a {
        padding: 0.4rem 0.5rem;  /* menos alto */
        font-size: 11px;         /* texto un poco más chico */
      }

      .close-btn {
        margin-bottom: 0.5rem;
        font-size: 1.6rem;       /* botón más chico también */
      }
    }




    @media (max-width: 1024px) {
      header { padding: 0 12px; }
      .brand .brand-title { display: block; }
    }

    /* Banner */
    .banner {
      position: relative;
      margin-top: calc(var(--header-h) + var(--top-bar-h));
      width: 100%;
      height: 130px;
      background: url("../../../img/banner_equipo.webp") center center no-repeat;
      background-size: cover;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
    }
    .banner::after {
      content: "";
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.35);
    }
    .banner h2 {
      position: relative;
      color: #fff;
      font-size: 1.6rem;
      font-weight: 700;
      z-index: 1;
      margin: 0;
      letter-spacing: 1px;
    }

    

    .container {
      flex: 1 0 auto;
      width: 100%;
      max-width: 1000px;
      min-width: 0;
      padding: 2rem;
      margin: 0 auto;
    }
    @media (max-width: 768px) {
      .container { padding: 1rem; }
    }
    footer { background: var(--primary); color: var(--text-light); text-align: center; padding: 1rem; }

    /* Bloques */
    .important-box { text-align: center; margin: 2rem auto; font-weight: 600; }
    .important-box div { margin: 0.3rem 0; font-size: 1.1rem; }
    .highlight { color: var(--primary); font-size: 1.3rem; }
    .prof-img {
      max-width: 75px !important;
      border-radius: 50%;
      background-color: #fff;
      box-shadow: 7px 17px 20px 2px rgb(0 0 0 / 20%);
    }

    /* Acordeón */
    .accordion { width: 100%; max-width: 700px; margin: 2rem auto; }
    .accordion-item {
      border: 1px solid #ddd;
      border-radius: 8px;
      margin-bottom: 15px;
      background: #fff;
      overflow: hidden;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    }
    .accordion-header {
      padding: 1rem;
      cursor: pointer;
      font-weight: 600;
      background: var(--primary);
      color: #fff;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .accordion-body {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.4s ease;
    }
    .accordion-content { padding: 1rem; color: #333; font-size: 0.95rem; line-height: 1.6; }
    .accordion-item.active .accordion-body { max-height: 800px; }

    /* Texto intermedio */
    .section-title {
      text-align: center;
      font-weight: 700;
      margin: 2rem 0 1rem;
      color: var(--primary);
    }


  .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    justify-items: center;
    margin-top: 2rem;
  }

  .grid a {
    display: block;
    width: 100%;
  }

   .link-pago-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
    text-decoration: none;
  }

  .link-pago-img:hover{
     transform: translateY(-20px) !important;
  }

  .grid img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
  }

  .grid img:hover {
    transform: translateY(-20px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    
  }

  /* Mobile: todas las imágenes en una columna */
  @media (max-width: 768px) {
    .grid {
      grid-template-columns: 1fr;
    }
  }


  .payment-options {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2rem 0;
}

.payment-card {
  flex: 1 1 200px;
  max-width: 250px;
  display: block;
  text-align: center;
  padding: 15px;
  border-radius: 10px;
  
  background: #fff;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);

  /* transición suave igual que consultorios */
  transition: transform 0.4s ease, box-shadow 0.4s ease, border 0.4s ease;
}

.payment-card:hover {
  transform: translateY(-20px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.3);
  
}


.payment-card img {
  max-width: 120px;
  height: auto;
  margin-bottom: 10px;
}

.subtitle {
  font-weight: bold;
  margin-top: 10px;
  color: var(--primary);
}

.extra-info {
  font-size: 14px;
  color: #444;
}


.step-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 2rem 0 1rem;
  flex-wrap: wrap; /* para permitir que se acomoden */
}

@media (max-width: 768px) {
  .step-title {
    flex-direction: column;   /* apila los hijos */
    gap: 8px;                 /* espacio más chico */
    text-align: center;
  }

  .step-title h2 {
    font-size: 1rem;          /* texto un poco más chico en mobile */
    text-align: center;
  }
}

.step-number {
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  font-size: 18px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.step-title h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}






.payment-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 10px;
}

        /* Bloque marca: foto + leyenda */
        .brand {
          display: inline-flex;
          align-items: center;
          gap: 10px;
          text-decoration: none;
          color: var(--text-light);
          min-width: 0;
        }
        .brand img {
          width: 34px;
          height: 34px;
          border-radius: 50%;
          object-fit: cover;
          border: 1px solid rgba(255,255,255,0.35);
          box-shadow: 0 2px 6px rgba(0,0,0,0.25);
          display: block;
        }
        .brand .brand-title {
          font-weight: 700;
          font-size: 15px;
          line-height: 1;
          white-space: nowrap;
        }


        /* Mantener SIEMPRE la leyenda en móviles (más chica, con ellipsis si hace falta) */
        @media (max-width: 480px) {
          .brand { gap: 8px; max-width: 70vw; overflow: hidden; }
          .brand img { width: 28px; height: 28px; }
          .brand .brand-title {
            font-size: 15px; line-height: 1.1; font-weight: 700;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .1px;
          }
          .menu-toggle { flex: 0 0 26px; }
        }
        @media (max-width: 360px) {
          .brand img { width: 26px; height: 26px; }
          .brand .brand-title { font-size: 15px; }
        }

 /* ===== HEADER responsive <= 1240px ===== */
    @media (min-width: 1025px) and (max-width: 1240px) {
      /* En pantallas intermedias, ocultar el texto para que entre el menú. */
      .brand .brand-title { display: none; }

      /* Reducir tamaño de fuentes del header (≈40%) */
      header nav a {
        font-size: 10px; /* antes 12px */
        padding: 0.4rem 0.6rem;
      }

      /* Reducir íconos de navegación */
      header nav a svg,
      header nav a i,
      header .top-bar svg {
        width: 15px;
        height: 15px;
      }

      /* Reducir tamaño íconos Lucide (data-lucide) */
      i[data-lucide] {
        width: 15px;
        height: 15px;
      }

      /* Ajuste leve del brand (foto) */
      .brand img {
        width: 28px; /* antes 34px */
        height: 28px;
      }



      /* Ajustar padding horizontal */
      header {
        padding: 0 12px;
      }
    }


    .matriculas {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
        margin-top: 5px;
        
    }
    .matriculas img{
       max-width: 30px;
    }

/* Prevención de desbordamiento horizontal en dispositivos pequeños */
img, svg { max-width: 100%; }
.brand img { flex-shrink: 0; }
.accordion, .accordion-item, .grid, .payment-options { min-width: 0; }
@media (max-width: 480px) {
  .brand { flex: 0 1 auto; min-width: 0; }
  .brand .brand-title { min-width: 0; }
  .step-title h2 { overflow-wrap: anywhere; }
}
