/* =============================================
   RANCHO LOS POTRILLOS: contact CTAs
   Sticky mobile contact bar, hero WhatsApp button, WhatsApp quote form.
   Loaded on the homepage and every service page (after style.css / landing.css).
   ============================================= */

:root {
  --cta-wa-green: #25D366;
  --cta-wa-green-hover: #1ebe5d;
  --cta-ink: #1A1A2E;          /* dark text on green: white fails contrast */
  --cta-bar-h: 70px;           /* updated at runtime by cta.js */
  --cta-banner-offset: 0px;    /* cookie banner height while it is visible */
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* WhatsApp buttons that already exist: dark text on the green for contrast */
.whatsapp-btn,
#left-widgets .promo-btn,
#left-widgets .promo-opt-wa { color: var(--cta-ink); }

/* ── Hero WhatsApp button (homepage) ── */
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--cta-wa-green);
  color: var(--cta-ink);
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 14px 28px;
  border: 2px solid var(--cta-wa-green);
  border-radius: 2px;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.btn-whatsapp:hover {
  background: var(--cta-wa-green-hover);
  border-color: var(--cta-wa-green-hover);
  transform: translateY(-2px);
}
.btn-whatsapp:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.btn-whatsapp svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ── Links from homepage sections to the detail pages ── */
.service-links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 0 0 28px;
  padding: 0;
}
.service-links-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold, #c9a84c);
  margin: 0 0 10px;
}
.service-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid var(--gold, #c9a84c);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s, color 0.2s;
}
.section-light .service-links a { color: var(--brown-dark, #3b2a1a); }
.section-dark .service-links a { color: var(--cream, #f5efe6); }
.service-links a::after { content: '\2192'; margin-left: 8px; }
.service-links a:hover { background: var(--gold, #c9a84c); color: var(--brown-dark, #3b2a1a); }

/* ── Quote form ── */
.quote-block {
  max-width: 640px;
  margin: 0 auto 40px;
  padding: 28px 24px 24px;
  text-align: left;
  background: rgba(245, 239, 230, 0.06);
  border: 1px solid rgba(201, 168, 76, 0.5);
  border-radius: 10px;
}
.quote-block[hidden] { display: none; }
.quote-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  color: var(--cream, #f5efe6);
  text-align: center;
  margin: 0 0 6px;
}
.quote-intro {
  text-align: center;
  color: rgba(245, 239, 230, 0.9);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0 0 22px;
}
.quote-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.quote-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.quote-field label {
  color: var(--cream, #f5efe6);
  font-family: 'Lato', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.quote-field input,
.quote-field select {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font-family: 'Lato', sans-serif;
  font-size: 1rem;             /* 16px keeps iOS from zooming on focus */
  color: #2c1a0e;
  background: #fffaf2;
  border: 1px solid var(--gold, #c9a84c);
  border-radius: 6px;
  -webkit-appearance: none;
  appearance: none;
}
.quote-field select {
  background-image: linear-gradient(45deg, transparent 50%, #6b4c2a 50%), linear-gradient(135deg, #6b4c2a 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.quote-field input:focus-visible,
.quote-field select:focus-visible { outline: 3px solid var(--gold, #c9a84c); outline-offset: 2px; }
.quote-submit {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 24px;
  background: var(--cta-wa-green);
  color: var(--cta-ink);
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.06em;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.quote-submit:hover { background: var(--cta-wa-green-hover); transform: translateY(-1px); }
.quote-submit:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.quote-submit svg { width: 22px; height: 22px; flex-shrink: 0; }
.quote-note {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  line-height: 1.5;
  color: rgba(245, 239, 230, 0.8);
}
.contact-inner .quote-block { margin-bottom: 48px; }
.landing-cta .quote-block { margin-bottom: 32px; }
.quote-alt {
  color: rgba(245, 239, 230, 0.85);
  font-size: 0.9rem;
  margin: 0 0 16px;
}

@media (max-width: 600px) {
  .quote-form { grid-template-columns: 1fr; }
  .quote-block { padding: 22px 16px 18px; }
}

/* ── Sticky contact bar (mobile only) ── */
.cta-bar { display: none; }

@media (max-width: 768px) {
  .cta-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: var(--cta-banner-offset);
    z-index: 950;               /* under the navbar (999) and cookie banner (9999) */
    display: flex;
    gap: 10px;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(26, 14, 6, 0.97);
    border-top: 2px solid var(--gold, #c9a84c);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
  }
  .cta-bar-btn {
    flex: 1 1 0;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 50px;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-decoration: none;
  }
  .cta-bar-btn svg { width: 22px; height: 22px; flex-shrink: 0; }
  .cta-bar-wa { background: var(--cta-wa-green); color: var(--cta-ink); }
  .cta-bar-call {
    background: transparent;
    color: var(--gold, #c9a84c);
    border: 2px solid var(--gold, #c9a84c);
  }
  .cta-bar-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

  /* Keep the last bit of the page reachable above the bar (and the banner). */
  body { padding-bottom: calc(var(--cta-bar-h) + var(--cta-banner-offset)); }

  /* While typing in a form the keyboard is up; get the bar out of the way. */
  .cta-typing .cta-bar { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-whatsapp, .quote-submit, .service-links a { transition: none; }
  .btn-whatsapp:hover, .quote-submit:hover { transform: none; }
}
