/* =========================================================
   HEADER — Responsive con !important
   ========================================================= */

/* 🔹 Móviles pequeños (hasta 480px) */
@media (max-width: 480px) {

  /* ======== BLOQUE SUPERIOR ======== */

  /* Contenedor general del header */
  header article:first-child {
    position: relative !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Imagen del header */
  header article:first-child img {
    width: 100% !important;
    height: auto !important;
    border-bottom: 2px solid orange !important;
  }

  /* Bloque de teléfonos + dirección */
  header article:first-child > div {
    position: static !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    padding: 10px 0 !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  /* Cada fila dentro del bloque */
  header article:first-child > div div {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    margin-bottom: 10px !important;
  }

  /* Iconos */
  header article:first-child img {
    max-width: 26px !important;
  }

  /* ======== BLOQUE INFERIOR ======== */

  /* Título */
  header h1 {
    font-size: 1.4rem !important;
    padding-left: 0 !important;
    padding-top: 10px !important;
    text-align: center !important;
    line-height: 1.2 !important;
  }

  /* Menú */
  nav ul {
    flex-direction: column !important;
    gap: 14px !important;
    padding: 0 !important;
    margin-top: 10px !important;
    text-align: center !important;
    justify-content: center !important;
  }

  nav ul li,
  nav ul a {
    padding: 0 !important;
    font-size: 1.2rem !important;
  }

  /* Submenú */
  nav ul li ul {
    position: static !important;
    width: 100% !important;
    margin-top: 6px !important;
    background: white !important;
  }
}

/* 🔹 Tablets (hasta 768px) */
@media (max-width: 768px) {

  /* Título */
  header h1 {
    padding-left: 20px !important;
    font-size: 1.8rem !important;
  }

  /* Menú */
  nav ul {
    gap: 20px !important;
    padding-right: 20px !important;
  }
}


/* =========================================================
   FOOTER — Responsive
   ========================================================= */

/* 🔹 Móviles pequeños (hasta 480px) */
@media (max-width: 480px) {

  footer {
    padding: 30px 15px !important;
  }

  /* Fila superior: pasar de horizontal a vertical */
  footer > div:first-child {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
  }

  /* Logo */
  footer img[width="400"][height="400"] {
    width: 180px !important;
    height: auto !important;
    margin: 0 auto;
  }

  /* Columna central */
  footer > div:first-child > div:nth-child(2) {
    width: 100% !important;
    padding: 20px !important;
  }

  /* Iconos de contacto */
  footer > div:first-child > div:nth-child(2) img {
    height: 40px !important;
  }

  /* Enlaces legales */
  footer > div:first-child > div:nth-child(3) {
    text-align: center;
    margin-top: 20px;
  }

  footer > div:first-child > div:nth-child(3) a {
    padding-top: 6px !important;
  }

  /* Fila inferior */
  footer > div:last-child {
    flex-direction: column;
    gap: 20px !important;
    text-align: center;
    padding-top: 20px !important;
  }

  footer > div:last-child img {
    width: 120px !important;
    height: auto !important;
  }
}

/* 🔹 Tablets (hasta 768px) */
@media (max-width: 768px) {

  footer {
    padding: 40px 20px !important;
  }

  footer > div:first-child {
    gap: 40px;
  }

  footer img[width="400"][height="400"] {
    width: 260px !important;
  }

  footer > div:last-child {
    gap: 40px !important;
  }
}