/* ========================================
   AISRENO — HEADER ET FOOTER COMMUNS
   ======================================== */

header.nav,
footer.footer {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  letter-spacing: -0.01em;
  line-height: normal;
}

header.nav *,
footer.footer * {
  box-sizing: border-box;
}

header.nav .container,
footer.footer .container {
  width: min(1180px, 92%);
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   HEADER
   ======================================== */

header.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #edf1ee;
  box-shadow: 0 4px 22px rgba(15, 23, 42, 0.035);
}

header.nav .navin {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header.nav .logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}

header.nav .logo-img {
  display: block;
  width: 150px;
  height: auto;
  max-height: 52px;
  object-fit: contain;
}

header.nav .navlinks {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}

header.nav .navlinks a {
  color: #0f172a;
  text-decoration: none;
  transition: color 0.18s ease;
}

header.nav .navlinks a:hover,
header.nav .navlinks a[aria-current="page"] {
  color: #15803d;
}

header.nav .nav-cta {
  display: inline-block;
  padding: 15px 25px;
  border: 0;
  border-radius: 12px;
  background: #15803d;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 6px 16px rgba(21, 128, 61, 0.16);
  transition:
    background-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

header.nav .nav-cta:hover {
  background: #166534;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(21, 128, 61, 0.22);
}

header.nav .mobile-menu-toggle,
header.nav .mobile-menu {
  display: none;
}

/* ========================================
   FOOTER
   ======================================== */

footer.footer {
  position: relative;
  overflow: hidden;
  padding: 52px 0 0;
  background: #03261f;
  color: #ffffff;
}

footer.footer::before {
  content: "";
  position: absolute;
  left: -45px;
  bottom: -55px;
  width: 150px;
  height: 110px;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(88, 150, 64, 0.55),
    transparent 55%
  );
  filter: blur(6px);
  border-radius: 50%;
  transform: rotate(-18deg);
  pointer-events: none;
}

footer.footer::after {
  content: "⌂";
  position: absolute;
  right: -10px;
  bottom: -55px;
  font-size: 270px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.045);
  font-weight: 300;
  pointer-events: none;
}

footer.footer .footergrid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 1fr 0.9fr;
  gap: 0;
  padding-bottom: 34px;
}

footer.footer .footer-col {
  min-width: 0;
  padding: 0 26px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

footer.footer .footer-col:first-child {
  padding-left: 0;
  padding-right: 55px;
  border-left: 0;
}

footer.footer .footer-logo {
  display: block;
  width: 145px;
  height: auto;
  margin-bottom: 12px;
}

/* Titres du footer (h2 ; h4 conservé pour compatibilité) :
   style neutralisé face aux règles globales des h2 des pages */
footer.footer h2,
footer.footer h4 {
  position: relative;
  margin: 0 0 18px;
  color: #ffffff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  text-wrap: wrap;
}

footer.footer h2::after,
footer.footer h4::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  margin-top: 10px;
  background: #15803d;
  border-radius: 2px;
}

footer.footer p {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.55;
}

footer.footer a {
  display: block;
  margin: 9px 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  text-decoration: none;
}

footer.footer a:hover {
  color: #15803d;
}

footer.footer .contact-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 13px;
}

footer.footer .contact-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #0a5b42;
  color: #ffffff;
  font-size: 12px;
}

footer.footer .contact-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

footer.footer .contact-text strong {
  display: block;
  margin-bottom: 3px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

footer.footer .contact-text span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 9px;
  line-height: 1.35;
}

footer.footer .contact-text .footer-whatsapp {
  margin-top: 6px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 700px) {
  footer.footer .contact-text .footer-whatsapp {
    font-size: 14px;
  }
}

footer.footer .legal {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  align-items: center;
  gap: 25px;
  padding: 18px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
}

footer.footer .legal-note {
  padding-left: 28px;
  border-left: 1px solid #15803d;
  line-height: 1.45;
}

/* Navigation au clavier */

header.nav a:focus-visible,
header.nav button:focus-visible,
footer.footer a:focus-visible {
  outline: 3px solid #b58010;
  outline-offset: 4px;
}

/* ========================================
   MOBILE
   ======================================== */

@media (max-width: 700px) {
  header.nav .container,
  footer.footer .container {
    width: calc(100% - 32px);
  }

  header.nav .navin {
    width: 100%;
    height: 68px;
    padding: 0 16px;
    gap: 12px;
  }

  header.nav .logo-img {
    width: 118px;
    max-height: 42px;
  }

  header.nav .navlinks,
  header.nav .nav-cta {
    display: none;
  }

  header.nav .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    cursor: pointer;
  }

  header.nav .mobile-menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: #0f172a;
  }

  header.nav .mobile-menu {
    padding: 10px 16px 18px;
    border-top: 1px solid #edf1ee;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  }

  header.nav .mobile-menu.open {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  header.nav .mobile-menu a {
    display: block;
    width: 100%;
    padding: 13px 12px;
    border-radius: 8px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
  }

  header.nav .mobile-menu a:hover,
  header.nav .mobile-menu a[aria-current="page"] {
    background: #f0fdf4;
    color: #15803d;
  }

  header.nav .mobile-menu a.mobile-menu-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 8px;
    background: #15803d;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    text-align: center;
  }

  footer.footer {
    padding-top: 45px;
  }

  footer.footer .footergrid {
    grid-template-columns: 1fr;
    gap: 35px;
    padding-bottom: 30px;
  }

  footer.footer .footer-col {
    padding: 0 0 25px;
    border-left: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  footer.footer .footer-col:first-child {
    padding-right: 0;
  }

  footer.footer .footer-col:last-child {
    border-bottom: 0;
  }

  footer.footer .contact-text strong {
    font-size: 14px;
  }

  footer.footer .contact-text span {
    font-size: 11px;
  }

  footer.footer .legal {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

  footer.footer .legal-note {
    padding-left: 0;
    padding-top: 14px;
    border-left: 0;
    border-top: 1px solid #15803d;
  }
}

@media (prefers-reduced-motion: reduce) {
  header.nav a {
    transition: none;
  }

  header.nav .nav-cta:hover {
    transform: none;
  }
}

/* Photos sous le hero en attente de chargement (data-src, voir commun.js) :
   case vide comme une image lazy native, sans icône ni texte alternatif. */
img[data-src] {
  visibility: hidden;
}

/* ========================================
   BLOC DE CONTACT DE LA FAQ (« Cómo funciona » et « Requisitos »)
   Règles ici plutôt que dans un fichier à part : aucune feuille bloquante de
   plus dans le <head> (LCP). Toutes limitées aux classes .faq-contact*.
   HTML : la carte et les badges suivent les questions (ordre mobile, rendu sans
   JavaScript). Sur PC (≥ 900 × 760 px), faq-contact.js les place sous le titre,
   dans la colonne de gauche, qui devient collante.
   ======================================== */

/* Texte lu par les lecteurs d'écran, invisible à l'écran */
.faq-contact-oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- CARTE ---------- */

.faq-contact-tarjeta {
  background: #f0fdf4;
  border: 1px solid #cdebd6;
  border-radius: 16px;
  padding: 22px;
}

.faq-contact-tarjeta h3 {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.3;
  color: var(--ink);
}

.faq-contact-tarjeta p {
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}

.faq-contact-botones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.faq-contact-boton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 11px 12px;
  border: 2px solid var(--green);
  border-radius: 10px;
  background: #ffffff;
  color: #166534;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.faq-contact-boton:hover {
  background: #f0fdf4;
}

.faq-contact-boton-principal {
  grid-column: 1 / -1;
  background: var(--green);
  color: #ffffff;
}

.faq-contact-boton-principal:hover {
  background: #166534;
  border-color: #166534;
}

/* ---------- BADGES VÉRIFIÉS (C5, jamais dans le JSON-LD) ---------- */

.faq-contact-sellos {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.faq-contact-sellos li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.25;
}

.faq-contact-sellos b {
  display: block;
  font-size: 14.5px;
}

.faq-contact-icono {
  flex: 0 0 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fef9e7;
  color: #8b6914;
  font-size: 14px;
  font-weight: 900;
}

/* ---------- DISPOSITION ---------- */

/* PC : titre en haut à gauche, carte + badges dessous, questions à droite.
 Mêmes positions avant et après le déplacement du bloc (aucun décalage). */
@media (min-width: 900px) {
  .faq-contact-layout {
    grid-template-areas:
      "columna preguntas"
      "contacto preguntas";
    grid-template-rows: auto 1fr;
    row-gap: 0;
  }

  .faq-contact-columna {
    grid-area: columna;
  }

  .faq-contact-layout > .questions {
    grid-area: preguntas;
  }

  .faq-contact-layout > .faq-contact {
    grid-area: contacto;
    align-self: start;
  }
}

/* Écran assez grand : la colonne entière reste visible sous le header (86 px) */
@media (min-width: 900px) and (min-height: 760px) {
  .faq-contact-layout.faq-contact-listo .faq-contact-columna {
    grid-row: 1 / -1;
    align-self: start;
    position: sticky;
    top: 110px;
  }
}

/* Moins de 900 px : une colonne (titre + téléphone, questions, carte + badges) */
@media (max-width: 899px) {
  .faq-contact-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 330px) {
  .faq-contact-sellos {
    grid-template-columns: 1fr;
  }
}
