/* Landing Page Builder — runtime styles for blocks dragged in from the
   WYSIWYG editor. Loaded both inside the builder's canvas (so editing
   matches reality) and on the live public /lp/:slug page. Everything here
   is deliberately low-specificity so a user's own Style Manager tweaks in
   the builder always win. */

.lp-content { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #1f2937; line-height: 1.6; overflow-x: hidden; }
.lp-content img { max-width: 100%; height: auto; }
.lp-content * { box-sizing: border-box; }

/* Buttons / CTAs */
.lp-btn { display: inline-block; padding: 14px 32px; border-radius: 8px; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; border: 2px solid transparent; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease; }
.lp-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.15); opacity: .95; }
.lp-btn-primary { background: #ef4444; color: #fff; }
.lp-btn-secondary { background: #111827; color: #fff; }
.lp-btn-outline { background: transparent; border-color: currentColor; color: #111827; }
.lp-btn-block { display: block; width: 100%; text-align: center; }

/* Lead / contact forms */
.lp-form { max-width: 480px; margin: 0 auto; }
.lp-field { margin-bottom: 16px; text-align: left; }
.lp-field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.lp-field input, .lp-field textarea, .lp-field select {
  width: 100%; padding: 12px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; font-family: inherit;
}
.lp-field input:focus, .lp-field textarea:focus, .lp-field select:focus { outline: none; border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.15); }
/* Fallback for inputs dropped straight into .lp-form without the .lp-field
   wrapper (e.g. a stock GrapesJS form block) — without this they default to
   inline sizing and sit side-by-side, overflowing narrow screens. */
.lp-form > input, .lp-form > textarea, .lp-form > select {
  display: block; width: 100%; margin-bottom: 16px; padding: 12px 14px;
  border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; font-family: inherit;
}
.lp-form-message { margin-top: 12px; padding: 10px 14px; border-radius: 8px; font-size: 14px; text-align: center; }
.lp-form-message--success { background: #dcfce7; color: #166534; }
.lp-form-message--error { background: #fee2e2; color: #991b1b; }

/* Country dial-code dropdown, injected right before any form's mobile
   input — defaults to the visitor's IP-detected country. Shown regardless
   of whether OTP verification is turned on; it's just a better number
   input either way. */
.lp-otp-dial-select {
  display: inline-block; width: auto; max-width: 130px; margin-bottom: 16px; margin-right: 8px;
  padding: 12px 10px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 14px; font-family: inherit; vertical-align: top;
}

/* Mobile OTP verification widget — injected by landingRuntime.js right
   after any form's mobile input, so a lead can't be submitted with an
   unverified phone number. */
.lp-otp-widget { margin: -8px 0 16px; text-align: left; }
.lp-otp-row, .lp-otp-code-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.lp-otp-send-btn, .lp-otp-verify-btn {
  padding: 10px 16px; border-radius: 8px; font-weight: 700; font-size: 14px; cursor: pointer;
  border: 2px solid #ef4444; background: transparent; color: #ef4444; white-space: nowrap;
}
.lp-otp-verify-btn { background: #ef4444; color: #fff; }
.lp-otp-send-btn:disabled, .lp-otp-verify-btn:disabled { opacity: .6; cursor: not-allowed; }
.lp-otp-code-row input {
  flex: 1 1 140px; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; font-family: inherit;
}
.lp-otp-message { margin-top: 6px; font-size: 13px; color: #166534; }
.lp-otp-message--error { color: #991b1b; }
.lp-otp-disclosure { margin: 6px 0 0; font-size: 11.5px; color: #6b7280; }
.lp-otp-disclosure a { color: inherit; text-decoration: underline; }

/* The floating reCAPTCHA badge is hidden — see .lp-otp-disclosure above,
   which is the required alternative disclosure Google's terms call for. */
.grecaptcha-badge { visibility: hidden; }

/* "or chat instead" divider + button, appended under every landing-page form */
.lp-form-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: #6b7280; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.lp-form-divider::before, .lp-form-divider::after { content: ''; flex: 1; height: 1px; background: #e5e7eb; }
.lp-whatsapp-form-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 14px 32px; border-radius: 8px; font-weight: 700; font-size: 16px; text-decoration: none;
  border: 2px solid #16a34a; color: #16a34a; background: transparent; box-sizing: border-box;
}
.lp-whatsapp-form-btn:hover { background: #f0fdf4; }

/* Popups */
.lp-popup { position: fixed; inset: 0; z-index: 99999; display: none; align-items: center; justify-content: center; padding: 20px; }
.lp-popup.is-open { display: flex; }
.lp-popup-overlay { position: absolute; inset: 0; background: rgba(17,24,39,.6); }
.lp-popup-inner { position: relative; background: #fff; border-radius: 14px; padding: 40px 32px; max-width: 460px; width: 100%; text-align: center; box-shadow: 0 30px 60px rgba(0,0,0,.3); }
.lp-popup-inner h3 { margin-top: 0; font-size: 24px; }
.lp-popup-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 26px; line-height: 1; cursor: pointer; color: #6b7280; }
.lp-popup-close:hover { color: #111827; }

/* Testimonials */
.lp-testimonial { background: #f9fafb; border-radius: 12px; padding: 28px; text-align: center; }
.lp-testimonial .lp-stars { color: #f59e0b; font-size: 18px; margin-bottom: 10px; letter-spacing: 2px; }
.lp-testimonial p { font-size: 16px; font-style: italic; margin: 0 0 14px; }
.lp-testimonial-name { font-weight: 700; font-size: 14px; color: #374151; }

/* Pricing */
.lp-pricing-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 32px 28px; text-align: center; }
.lp-pricing-card h3 { margin-top: 0; font-size: 20px; text-transform: uppercase; letter-spacing: .05em; color: #6b7280; }
.lp-price { font-size: 44px; font-weight: 800; margin: 12px 0 20px; color: #111827; }
.lp-price-currency { font-size: 22px; vertical-align: top; }
.lp-price-period { font-size: 16px; font-weight: 500; color: #6b7280; }
.lp-pricing-features { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; }
.lp-pricing-features li { padding: 8px 0; border-bottom: 1px solid #f3f4f6; }
.lp-pricing-features li::before { content: "\2713"; color: #16a34a; font-weight: 700; margin-right: 10px; }

/* FAQ — native <details>/<summary>, no JS required */
.lp-faq-item { border-bottom: 1px solid #e5e7eb; padding: 16px 0; }
.lp-faq-item summary { cursor: pointer; font-weight: 700; font-size: 16px; list-style: none; position: relative; padding-right: 24px; }
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item summary::after { content: "+"; position: absolute; right: 0; top: 0; font-size: 20px; }
.lp-faq-item[open] summary::after { content: "\2212"; }
.lp-faq-item p { margin: 10px 0 0; color: #4b5563; }

/* Countdown bar (used by the builder's own Countdown block markup) */
.lp-countdown-bar { background: #111827; color: #fff; text-align: center; padding: 10px; font-weight: 700; font-size: 14px; }

/* Layout utilities — used by the section blocks and the ready-made templates */
.lp-section { padding: 72px 24px; }
.lp-container { max-width: 1080px; margin: 0 auto; }
.lp-section-title { font-size: 32px; font-weight: 800; text-align: center; margin: 0 0 12px; color: #111827; }
.lp-section-subtitle { font-size: 16px; text-align: center; color: #6b7280; max-width: 620px; margin: 0 auto 48px; }
.lp-badge { display: inline-block; background: #fee2e2; color: #b91c1c; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; }
.lp-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.lp-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.lp-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.lp-feature-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 28px; text-align: center; }
.lp-feature-icon { width: 56px; height: 56px; border-radius: 12px; background: #fee2e2; color: #ef4444; display: flex; align-items: center; justify-content: center; font-size: 24px; margin: 0 auto 16px; }
.lp-feature-card h3 { font-size: 18px; margin: 0 0 10px; }
.lp-feature-card p { font-size: 14px; color: #6b7280; margin: 0; }
.lp-step { text-align: center; }
.lp-step-number { width: 44px; height: 44px; border-radius: 50%; background: #111827; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; margin: 0 auto 14px; }
.lp-step h4 { margin: 0 0 8px; font-size: 16px; }
.lp-step p { margin: 0; font-size: 14px; color: #6b7280; }

/* Hero Banner */
.lp-hero { position: relative; padding: 100px 24px; text-align: center; background: #111827 center/cover no-repeat; color: #fff; }
.lp-hero-overlay { position: absolute; inset: 0; background: rgba(17,24,39,.55); }
.lp-hero-inner { position: relative; max-width: 760px; margin: 0 auto; }
.lp-hero-inner h1 { font-size: 44px; font-weight: 800; margin: 0 0 16px; line-height: 1.2; }
.lp-hero-inner p { font-size: 18px; margin: 0 0 28px; opacity: .92; }
.lp-hero-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Image Gallery */
.lp-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-gallery-item { position: relative; overflow: hidden; border-radius: 10px; cursor: pointer; aspect-ratio: 4 / 3; }
.lp-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.lp-gallery-item:hover img { transform: scale(1.06); }

/* Lightbox — opened by clicking any .lp-gallery-item image */
.lp-lightbox { position: fixed; inset: 0; z-index: 999998; background: rgba(0,0,0,.88); display: none; align-items: center; justify-content: center; padding: 32px; }
.lp-lightbox.is-open { display: flex; }
.lp-lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; }
.lp-lightbox-close { position: absolute; top: 20px; right: 24px; color: #fff; font-size: 34px; line-height: 1; background: none; border: none; cursor: pointer; }

/* Banners */
.lp-banner-bar { background: #111827; color: #fff; text-align: center; padding: 12px 20px; font-weight: 600; font-size: 14px; }
.lp-banner-bar a { color: #fbbf24; text-decoration: underline; margin-left: 8px; }
.lp-banner-promo { background: linear-gradient(135deg, #ef4444, #b91c1c); color: #fff; border-radius: 16px; padding: 44px 32px; text-align: center; }
.lp-banner-promo h3 { margin: 0 0 10px; font-size: 26px; }
.lp-banner-promo p { margin: 0 0 22px; opacity: .95; }

/* Sticky bottom Call/Chat CTA bar — optional, toggled per-page in the
   builder. Mobile-only by design (quick-tap Call/Chat is a mobile
   pattern — desktop already has the small floating WhatsApp/Call buttons,
   so this stays hidden there to avoid a redundant duplicate). */
.lp-sticky-cta { display: none; }
.lp-sticky-cta-spacer { display: none; }

@media (max-width: 640px) {
  .lp-sticky-cta {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 999996;
    display: flex; gap: 10px; padding: 10px 14px 0; margin: 0; border: none; background: #fff;
    box-shadow: 0 -6px 20px rgba(0,0,0,.12);
  }
  .lp-sticky-cta-spacer { display: block; height: 58px; }
}
.lp-sticky-cta-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  margin: 0; padding: 13px 12px; border-radius: 8px 8px 0 0; font-weight: 700; font-size: 14.5px;
  text-decoration: none; border: none; cursor: pointer; white-space: nowrap;
}
.lp-sticky-cta-call { background: #111827; color: #fff; }
.lp-sticky-cta-chat { background: #25d366; color: #fff; }
/* "Chat on WhatsApp" is long enough to wrap to two lines and look uneven
   next to "Call Now" on narrow phones — swap to shorter labels there
   instead of just shrinking text past legibility. */
.lp-sticky-cta-label-short { display: none; }
@media (max-width: 380px) {
  .lp-sticky-cta-btn { font-size: 13.5px; padding: 13px 8px; }
  .lp-sticky-cta-label-full { display: none; }
  .lp-sticky-cta-label-short { display: inline; }
}

@media (max-width: 900px) {
  .lp-grid-3, .lp-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .lp-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .lp-btn { width: 100%; text-align: center; }
  .lp-popup-inner { padding: 28px 20px; }
  .lp-price { font-size: 34px; }
  .lp-grid-2, .lp-grid-3, .lp-grid-4 { grid-template-columns: 1fr; }
  .lp-gallery { grid-template-columns: repeat(2, 1fr); }
  .lp-hero { padding: 64px 20px; }
  .lp-hero-inner h1 { font-size: 30px; }
  .lp-section { padding: 48px 20px; }
}
