/* Villa Dari — Universal Mobile UX Styles */

/* ============= FLOATING WHATSAPP ============= */
.vd-wa-float {
  position: fixed;
  bottom: 5.5rem;
  right: 1rem;
  width: 3.5rem;
  height: 3.5rem;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 8px 20px -2px rgba(37, 211, 102, 0.5);
  z-index: 95;
  transition: transform 0.3s ease;
  animation: vd-wa-pulse 3s ease-in-out infinite;
}
.vd-wa-float svg { width: 1.75rem; height: 1.75rem; }
.vd-wa-float:hover, .vd-wa-float:focus { transform: scale(1.08); background: #1ebe5d; }

@keyframes vd-wa-pulse {
  0%, 100% { box-shadow: 0 8px 20px -2px rgba(37, 211, 102, 0.5), 0 0 0 0 rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 8px 20px -2px rgba(37, 211, 102, 0.5), 0 0 0 14px rgba(37, 211, 102, 0); }
}

@media (min-width: 1024px) {
  .vd-wa-float { bottom: 1.5rem; right: 1.5rem; }
}

/* Avoid double-float when there's existing .whatsapp-float on index */
.whatsapp-float ~ .vd-wa-float,
body:has(.whatsapp-float) .vd-wa-float { display: none; }

/* ============= STICKY BOTTOM CTA ============= */
.vd-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 0.625rem 0.75rem calc(0.625rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 80;
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 -8px 25px -5px rgba(0,0,0,0.12);
}
.vd-sticky-cta.visible { transform: translateY(0); }

.vd-sticky-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 0.75rem 0.625rem;
  border-radius: 0.625rem;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  min-height: 46px;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.2s ease;
}
.vd-sticky-btn:active { transform: scale(0.97); }

.vd-sticky-call {
  background: #f0fdf4;
  color: #15803d;
  flex: 0 0 auto;
  padding: 0.75rem 0.875rem;
}
.vd-sticky-call svg { color: #15803d; }
.vd-sticky-call:hover { background: #dcfce7; }

.vd-sticky-wa {
  background: #25d366;
  color: white;
  flex: 0 0 auto;
  padding: 0.75rem 0.875rem;
}
.vd-sticky-wa svg { color: white; }
.vd-sticky-wa:hover { background: #1ebe5d; }

.vd-sticky-book {
  background: linear-gradient(135deg, #0c4a6e, #075985);
  color: white;
  flex: 1;
  padding: 0.875rem 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 10px -2px rgba(12, 74, 110, 0.4);
}
.vd-sticky-book:hover { background: linear-gradient(135deg, #075985, #0369a1); }

/* Hide labels on very small screens */
@media (max-width: 360px) {
  .vd-sticky-call span, .vd-sticky-wa span { display: none; }
  .vd-sticky-btn { padding: 0.75rem; }
}

/* Hide on desktop */
@media (min-width: 1024px) {
  .vd-sticky-cta { display: none; }
}

/* Don't double up with page-specific sticky CTAs (family-2026 has its own) */
body:has(.lp-sticky-cta) .vd-sticky-cta,
body:has(#mobileCta) .vd-sticky-cta,
body:has(.fp-sticky-cta) .vd-sticky-cta,
body:has(.gr-sticky-cta) .vd-sticky-cta { display: none; }

/* ============= MOBILE TEXT OVERFLOW SAFETY ============= */
@media (max-width: 767px) {
  /* Само на пунктуация — НЕ break-ва думи в средата */
  h1, h2, h3, h4, h5,
  .lp-hero h1, .gr-hero h1, .cp-hero h1, .ls-hero h1, .mw-hero h1, .ex-hero h1 {
    overflow-wrap: normal;
    word-wrap: normal;
    hyphens: manual;
    max-width: 100%;
  }
  /* Badge-овете да wrap-ват normal-но между думи */
  .lp-badge, .gr-badge, .cp-badge, .ls-badge, .mw-badge, .ex-badge {
    white-space: normal !important;
    line-height: 1.3;
    max-width: 100%;
    overflow-wrap: normal;
  }
  /* Hero h1 — намалена font-size на mobile за да помества */
  .lp-hero h1, .gr-hero h1, .cp-hero h1, .ls-hero h1, .mw-hero h1, .ex-hero h1 {
    font-size: clamp(1.5rem, 7vw, 2rem) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.02em !important;
  }
  /* Tighter padding на hero за повече ширина за текст */
  .lp-hero, .gr-hero, .cp-hero, .ls-hero, .mw-hero, .ex-hero {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
}

@media (max-width: 380px) {
  .lp-hero h1, .gr-hero h1, .cp-hero h1, .ls-hero h1, .mw-hero h1, .ex-hero h1 {
    font-size: 1.375rem !important;
  }
}

/* Float WhatsApp moves up to avoid sticky CTA */
@media (max-width: 1023px) {
  body:has(.vd-sticky-cta.visible) .vd-wa-float { bottom: 5.5rem; }
}

/* ============= PWA INSTALL BANNER ============= */
.vd-pwa-banner {
  position: fixed;
  bottom: 5.5rem;
  left: 0.75rem;
  right: 0.75rem;
  background: white;
  border-radius: 1rem;
  padding: 0.875rem 1rem;
  box-shadow: 0 15px 35px -10px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  z-index: 92;
  transform: translateY(150%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0,0,0,0.05);
}
.vd-pwa-banner.visible { transform: translateY(0); }

.vd-pwa-icon { font-size: 1.875rem; }
.vd-pwa-text { flex: 1; min-width: 0; }
.vd-pwa-text strong {
  display: block;
  color: #0c4a6e;
  font-size: 0.9375rem;
  margin-bottom: 0.125rem;
}
.vd-pwa-text span {
  color: #57534e;
  font-size: 0.75rem;
  display: block;
  line-height: 1.3;
}

.vd-pwa-install {
  background: linear-gradient(135deg, #0c4a6e, #0369a1);
  color: white;
  border: none;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 0.8125rem;
  cursor: pointer;
  flex-shrink: 0;
}
.vd-pwa-install:hover { background: #075985; }

.vd-pwa-close {
  background: transparent;
  border: none;
  color: #a8a29e;
  font-size: 1.125rem;
  padding: 0.375rem 0.5rem;
  cursor: pointer;
  flex-shrink: 0;
}
.vd-pwa-close:hover { color: #57534e; }

@media (min-width: 1024px) {
  .vd-pwa-banner { display: none; }
}

/* ============= QUICK PRICE CALCULATOR ============= */
.vd-quick-calc {
  background: linear-gradient(135deg, #fffbeb 0%, #fff 100%);
  border: 2px solid #fbbf24;
  border-radius: 1rem;
  padding: 1.25rem;
  margin: 2rem 1rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 8px 25px -5px rgba(251, 191, 36, 0.2);
}

.vd-qc-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px dashed #fcd34d;
}
.vd-qc-icon { font-size: 1.375rem; }
.vd-qc-header strong {
  flex: 1;
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem;
  color: #92400e;
}
.vd-qc-toggle {
  background: transparent;
  border: 1px solid #fcd34d;
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 0.5rem;
  color: #b45309;
  font-size: 1.125rem;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.vd-quick-calc.collapsed .vd-qc-body { display: none; }

.vd-qc-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.vd-qc-body label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #78350f;
}
.vd-qc-body select {
  padding: 0.75rem 0.875rem;
  border: 1px solid #fcd34d;
  border-radius: 0.5rem;
  background: white;
  font-size: 16px; /* iOS no-zoom */
  font-family: inherit;
  color: #1c1917;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23b45309'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.625rem center;
  background-size: 1.25rem;
  padding-right: 2.25rem;
}

.vd-qc-result {
  background: white;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  margin-top: 0.5rem;
  border: 1px solid #fcd34d;
}
.vd-qc-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}
.vd-qc-amount {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 800;
  color: #b45309;
  line-height: 1;
}
.vd-qc-price small {
  color: #78716c;
  font-size: 0.75rem;
}
.vd-qc-details {
  font-size: 0.8125rem;
  color: #57534e;
  margin-top: 0.375rem;
}

.vd-qc-cta {
  display: block;
  text-align: center;
  background: linear-gradient(135deg, #b45309, #f59e0b);
  color: white;
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  font-weight: 800;
  text-decoration: none;
  font-size: 0.9375rem;
  margin-top: 0.25rem;
  box-shadow: 0 4px 12px -2px rgba(180, 83, 9, 0.3);
}
.vd-qc-cta:hover { background: linear-gradient(135deg, #92400e, #d97706); }

/* ============= SPACER ZA STICKY CTA ============= */
@media (max-width: 1023px) {
  body { padding-bottom: 75px; }
}
