/* ==========================================================
   QWOOD — GLOBAL CONTACT FOOTER
   Extraído de home.css — render global vía qwood_render_global_footer()
   ========================================================== */

/* Tokens (autocontenidos para que el footer renderice bien aunque
   home.css no esté en la página) */
.qw-contact-footer {
  --qw-green:          var(--qwood-color-primary,   #1bcf17);
  --qw-green-hover:    #1bcf17;
  --qw-celeste:        var(--qwood-color-secondary, #0ea5e9);
  --qw-celeste-deep:   #0ea5e9;
  --qw-white:          #ffffff;
  --qw-ink:            var(--qwood-color-text,      #0f172a);
  --qw-radius:         18px;
  --qw-speed:          .25s;
  --qw-ease:           cubic-bezier(.2,.8,.2,1);
  --qw-wm-tree:        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 140'%3E%3Cg fill='%231bcf17'%3E%3Cpolygon points='50,0 80,40 65,40 90,75 70,75 95,115 5,115 30,75 10,75 35,40 20,40'/%3E%3Crect x='43' y='115' width='14' height='25'/%3E%3C/g%3E%3C/svg%3E");
}

/* Section + inner (solo para el footer global; no afecta a otros módulos) */
.qw-contact-footer.qw-section { position: relative; overflow: hidden; }
.qw-section--dark { background-color: var(--qw-green, #1bcf17); }
.qw-contact-footer .qw-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3rem;
  position: relative;
  z-index: 1;
}
@media (min-width: 1280px) {
  .qw-contact-footer .qw-inner { max-width: 1240px; }
}

/* Heading */
.qw-contact-footer .qw-heading {
  font-size: clamp(2.1rem, 3.6vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -.025em;
  line-height: 1.08;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}
.qw-contact-footer .qw-heading--center { text-align: center; }
.qw-contact-footer .qw-heading--white  { color: #ffffff; }
.qw-contact-footer .qw-heading::after {
  content: "";
  display: block;
  margin-top: .9rem;
  width: min(110px, 38%);
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  opacity: .85;
}
.qw-contact-footer .qw-heading--center::after { margin-left: auto; margin-right: auto; }

/* Buttons (subset usados en el footer) */
.qw-section--dark.qw-contact-footer .qw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .92rem 2.2rem;
  min-height: 54px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--qwood-font, "Montserrat", system-ui, sans-serif);
  font-size: 1.02rem;
  font-weight: 900;
  letter-spacing: .02em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  outline: none;
  white-space: nowrap;
  user-select: none;
  box-sizing: border-box;
  max-width: 100%;
  transition:
    transform var(--qw-speed) var(--qw-ease),
    box-shadow var(--qw-speed) var(--qw-ease),
    background-color var(--qw-speed) var(--qw-ease),
    color var(--qw-speed) var(--qw-ease),
    border-color var(--qw-speed) var(--qw-ease);
  text-decoration: none;
}
.qw-section--dark.qw-contact-footer .qw-btn:active { transform: translateY(1px); }
.qw-section--dark.qw-contact-footer .qw-btn--primary {
  background: var(--qw-green);
  color: var(--qw-white);
  border-color: rgba(27,207,23,.28);
  box-shadow: 0 10px 28px rgba(27,207,23,.16);
}
.qw-section--dark.qw-contact-footer .qw-btn--primary:focus-visible {
  background: var(--qw-green-hover);
  border-color: rgba(27,207,23,.36);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(27,207,23,.22);
}
@media (hover: hover) and (pointer: fine) {
  .qw-section--dark.qw-contact-footer .qw-btn--primary:hover {
    background: var(--qw-green-hover);
    border-color: rgba(27,207,23,.36);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(27,207,23,.22);
  }
}
.qw-section--dark.qw-contact-footer .qw-btn--celeste {
  background: var(--qw-celeste);
  color: var(--qw-white);
  border-color: rgba(14, 165, 233,.34);
  box-shadow: 0 10px 28px rgba(14, 165, 233,.18);
}
.qw-section--dark.qw-contact-footer .qw-btn--celeste:focus-visible {
  background: var(--qw-celeste-deep);
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(14, 165, 233,.22);
}
@media (hover: hover) and (pointer: fine) {
  .qw-section--dark.qw-contact-footer .qw-btn--celeste:hover {
    background: var(--qw-celeste-deep);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(14, 165, 233,.22);
  }
}
.qw-section--dark.qw-contact-footer .qw-btn--outline-white {
  background: transparent;
  color: var(--qw-white);
  border-color: rgba(255,255,255,.52);
  box-shadow: none;
}
.qw-section--dark.qw-contact-footer .qw-btn--outline-white:focus-visible {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.76);
  transform: translateY(-2px);
}
@media (hover: hover) and (pointer: fine) {
  .qw-section--dark.qw-contact-footer .qw-btn--outline-white:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.76);
    transform: translateY(-2px);
  }
}

/* Footer base */
.qw-contact-footer {
  background: var(--qw-green, #1bcf17);
  color: rgba(255,255,255,.95);
}
/* Bloque legacy ::before con inset:0 + bg var(--qw-wm-tree) eliminado
   2026-05-08 — generaba residuo "chevron" al mergearse con el ::before
   del pino. SSOT abajo. */

/* Grid */
.qw-contact-footer .qw-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

/* Brand column — card blanca compacta sobre fondo verde, con bordes ola */
.qw-contact-footer .qw-footer-brand {
  position: relative;
  background: #ffffff;
  padding: 1.85rem 1.6rem;
  max-width: 380px;
  border-radius: 28px;
  /* Shadow negro sutil — depth sobre fondo verde. */
  box-shadow: 0 6px 20px rgba(15,23,42,.08);
  color: var(--qw-ink, #0f172a);
}
.qw-contact-footer .qw-footer-brand-logo {
  display: inline-block;
  margin-bottom: 1.4rem;
  text-decoration: none;
  line-height: 0;
}
.qw-contact-footer .qw-footer-logo {
  display: block;
  max-width: 180px;
  height: auto;
  opacity: 1;
  transition: opacity var(--qw-speed) var(--qw-ease);
}
.qw-contact-footer .qw-footer-brand-logo:hover .qw-footer-logo { opacity: 1; }
.qw-contact-footer .qw-footer-brand-name {
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--qw-green);
  letter-spacing: .06em;
  margin-bottom: 1.25rem;
}

/* CTAs */
.qw-contact-footer .qw-footer-ctas {
  display: flex;
  gap: .85rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Social */
.qw-contact-footer .qw-social-links {
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}
.qw-contact-footer .qw-social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: none;
  box-shadow: 0 4px 12px rgba(15,23,42,.10);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--qw-green, #1bcf17);
  text-decoration: none;
  transition:
    background var(--qw-speed) var(--qw-ease),
    box-shadow var(--qw-speed) var(--qw-ease),
    transform var(--qw-speed) var(--qw-ease),
    color var(--qw-speed) var(--qw-ease);
}
.qw-contact-footer .qw-social-link:hover {
  background: var(--qw-green, #1bcf17);
  box-shadow: 0 6px 16px rgba(27,207,23,.22);
  color: #ffffff;
  transform: translateY(-3px);
}
.qw-contact-footer .qw-social-link svg {
  width: 22px; height: 22px; fill: currentColor;
}
.qw-contact-footer .qw-social-link:focus-visible {
  outline: 2px solid rgba(255,255,255,.6);
  outline-offset: 2px;
}

/* Contact list */
.qw-contact-footer .qw-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.qw-contact-footer .qw-contact-item {
  display: flex;
  gap: .85rem;
  align-items: center;
  font-size: .92rem;
  font-weight: 700;
  color: var(--qw-ink, #0f172a);
  line-height: 1.55;
}
.qw-contact-footer .qw-contact-item-icon {
  width: 26px;
  height: 26px;
  color: var(--qw-green, #1bcf17);
  flex-shrink: 0;
}
.qw-contact-footer .qw-contact-item a {
  color: var(--qw-ink, #0f172a);
  text-decoration: none;
  transition: color var(--qw-speed) var(--qw-ease);
}
.qw-contact-footer .qw-contact-item a:hover { color: var(--qw-green, #1bcf17); text-decoration: underline; }

/* Map placeholder */
.qw-contact-footer .qw-map-container {
  border-radius: var(--qw-radius);
  overflow: hidden;
  min-height: 280px;
  width: 100%;
  box-shadow: 0 6px 20px rgba(15,23,42,.08);
  display: flex;
  background: #ffffff;
}
.qw-contact-footer .qw-map-container > iframe {
  flex: 1 1 auto;
  width: 100% !important;
  height: 100% !important;
  min-height: 280px !important;
  border: 0 !important;
}
.qw-contact-footer .qw-map-placeholder {
  border-radius: var(--qw-radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  width: 100%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .75rem;
  text-align: center;
  cursor: pointer;
  padding: 1.5rem;
  transition:
    background var(--qw-speed) var(--qw-ease),
    border-color var(--qw-speed) var(--qw-ease);
}
.qw-contact-footer .qw-map-placeholder:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(27,207,23,.28);
}
.qw-contact-footer .qw-map-placeholder:focus-visible {
  outline: 2px solid rgba(255,255,255,.6);
  outline-offset: 2px;
}
.qw-contact-footer .qw-map-placeholder-text {
  font-size: .82rem;
  font-weight: 700;
  color: rgba(255,255,255,.55);
  line-height: 1.4;
  margin: 0;
}
.qw-contact-footer .qw-map-placeholder-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .65rem;
  margin-top: .5rem;
}
.qw-contact-footer .qw-map-link {
  font-size: .82rem;
  font-weight: 700;
  color: rgba(255,255,255,.55);
  transition: color var(--qw-speed) var(--qw-ease);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.qw-contact-footer .qw-map-link:hover { color: rgba(255,255,255,.85); }

/* Legal bar */
.qw-contact-footer .qw-footer-legal {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.qw-contact-footer .qw-footer-copy {
  font-size: .85rem;
  font-weight: 800;
  color: rgba(255,255,255,.55);
  margin: 0;
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
}
.qw-contact-footer .qw-footer-copy__year { color: rgba(255,255,255,.55); }
.qw-contact-footer .qw-footer-copy__brand { color: #ffffff; }
/* Wordmark inline en el copy: paths del SVG en blanco para que destaque sobre
   el bg verde-deep del footer. */
.qw-contact-footer .qw-footer-copy__brand .qw-wordmark g,
.qw-contact-footer .qw-footer-copy__brand .qw-wordmark path {
  fill: #ffffff !important;
}

/* ============================================================
   FOOTER NATURE WATERMARKS (2026-05-07)
   ============================================================
   Mismas siluetas naturales (pino, montaña, nube) que las secciones,
   pero en blanco translúcido sobre el bg dark del footer.
   Aplicadas al wrapper qw-contact-footer (rich y simplified). */
.qw-contact-footer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.qw-contact-footer::before,
.qw-contact-footer::after {
  content: "";
  position: absolute;
  pointer-events: none;
  background-color: #ffffff;
  opacity: .10;
  mask-repeat: no-repeat;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  z-index: 0;
}
.qw-contact-footer::before {
  /* pino top-left — fix definitivo 2026-05-08 (3a iteración):
     sin transform:rotate (rotación expandía bbox y clipaba contra
     overflow:hidden). left/top fijos en px. */
  left: 36px;
  top: 24px;
  width: 150px;
  height: 200px;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 140'%3E%3Cg fill='black'%3E%3Cpolygon points='50,5 28,42 38,42 18,80 32,80 8,125 92,125 68,80 82,80 62,42 72,42'/%3E%3Crect x='44' y='125' width='12' height='15'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 140'%3E%3Cg fill='black'%3E%3Cpolygon points='50,5 28,42 38,42 18,80 32,80 8,125 92,125 68,80 82,80 62,42 72,42'/%3E%3Crect x='44' y='125' width='12' height='15'/%3E%3C/g%3E%3C/svg%3E");
}
.qw-contact-footer::after {
  /* montaña bottom-right — sin rotate por consistencia. */
  right: 36px;
  bottom: 32px;
  width: 220px;
  height: 130px;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 90'%3E%3Cg fill='black'%3E%3Cpolygon points='0,88 28,28 48,55 75,8 105,42 130,22 150,88'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 150 90'%3E%3Cg fill='black'%3E%3Cpolygon points='0,88 28,28 48,55 75,8 105,42 130,22 150,88'/%3E%3C/g%3E%3C/svg%3E");
}
/* Asegurar que el contenido del footer queda por encima de los watermarks */
.qw-contact-footer > .qw-footer-inner,
.qw-contact-footer > * {
  position: relative;
  z-index: 1;
}

/* En mobile estrecho, ocultar watermarks (proporcionalmente dominan) */
@media (max-width: 640px) {
  .qw-contact-footer::before,
  .qw-contact-footer::after { display: none; }
}
.qw-contact-footer .qw-footer-legal-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.qw-contact-footer .qw-footer-legal-links a {
  font-size: .8rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0,0,0,.45), 0 0 8px rgba(0,0,0,.30);
  text-decoration: none;
  transition: text-shadow var(--qw-speed) var(--qw-ease);
}
.qw-contact-footer .qw-footer-legal-links a:hover {
  color: #ffffff;
  text-shadow: 0 2px 5px rgba(0,0,0,.60), 0 0 10px rgba(0,0,0,.40);
}

/* ============================================================
   SIMPLIFIED VARIANT (checkout / cart)
   - oculta mapa, redes, CTAs grandes; deja brand + contacto + legal.
   ============================================================ */
.qw-contact-footer.qw-contact-footer--simplified .qw-map-container,
.qw-contact-footer.qw-contact-footer--simplified .qw-social-links,
.qw-contact-footer.qw-contact-footer--simplified .qw-footer-ctas { display: none; }
.qw-contact-footer.qw-contact-footer--simplified .qw-footer-grid {
  grid-template-columns: 1fr;
  max-width: 540px;
  margin: 0 auto 2rem;
  justify-items: center;
}
/* Brand card centrado en simplified (sin mapa al lado) */
.qw-contact-footer.qw-contact-footer--simplified .qw-footer-brand {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.qw-contact-footer.qw-contact-footer--simplified .qw-contact-list,
.qw-contact-footer.qw-contact-footer--simplified .qw-footer-brand-logo {
  margin-left: auto;
  margin-right: auto;
}
.qw-contact-footer.qw-contact-footer--simplified .qw-heading {
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  margin-bottom: 1.5rem;
}
.qw-contact-footer.qw-contact-footer--simplified .qw-inner {
  padding: 2.5rem 1.5rem 1.5rem;
}
/* Footer simplified es más bajo (2.5rem/1.5rem padding) que el rich (4.5rem/3rem)
   → escalamos watermarks para que no se recorten contra overflow:hidden. */
.qw-contact-footer.qw-contact-footer--simplified::before {
  width: 130px;
  height: 180px;
  top: 28px;
}
.qw-contact-footer.qw-contact-footer--simplified::after {
  width: 200px;
  height: 120px;
  bottom: 32px;
}

/* ============================================================
   WAVE DIVIDER (transición sección clara → footer dark)
   ============================================================ */
.qw-wave-div--global-footer {
  width: 100%;
  line-height: 0;
  font-size: 0;
  position: relative;
  display: block;
}
.qw-wave-div--global-footer svg {
  display: block;
  width: 100%;
  height: 48px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .qw-contact-footer .qw-footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
  }
  .qw-contact-footer .qw-footer-brand { grid-column: 1 / -1; text-align: center; }
  .qw-contact-footer .qw-footer-brand-name { text-align: center; }
  .qw-contact-footer .qw-contact-list { align-items: center; }
  .qw-contact-footer .qw-contact-item {
    justify-content: center;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }
  .qw-contact-footer .qw-social-links { justify-content: center; }
  .qw-contact-footer .qw-map-container {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
  }
  .qw-contact-footer .qw-map-placeholder { aspect-ratio: 16/9; }
  .qw-contact-footer .qw-footer-ctas { flex-direction: column; align-items: center; }
  .qw-contact-footer .qw-footer-ctas .qw-btn {
    width: 100%;
    max-width: 360px;
    text-align: center;
    justify-content: center;
    box-sizing: border-box;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
  }
  .qw-contact-footer .qw-footer-legal {
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    text-align: center;
  }
  .qw-contact-footer .qw-footer-legal-links {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .qw-contact-footer .qw-footer-copy { text-align: center; }
}
