/* =============================================================
   CparraStudio — WOW additions CSS
   Quiz · Chat Preview · Portfolio Lightbox
   ============================================================= */

/* ============================================================
   1. QUIZ SECTION
   ============================================================ */
.quiz-section {
  padding: clamp(56px, 8vw, 96px) 0 !important;
  background:
    radial-gradient(ellipse at 10% 10%, rgba(184, 152, 92, 0.10) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 90%, rgba(244, 215, 204, 0.18) 0%, transparent 50%),
    var(--cream, #F5EFE6);
  position: relative;
  overflow: hidden;
}

.quiz-wrap {
  max-width: 720px;
  margin: 36px auto 0;
  background: linear-gradient(180deg, #FFFFFF 0%, var(--cream, #F5EFE6) 100%);
  border: 1px solid rgba(184, 152, 92, 0.22);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 22px 60px -24px rgba(26, 20, 16, 0.18);
  min-height: 380px;
  position: relative;
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.quiz-progress-track {
  flex: 1;
  height: 4px;
  background: rgba(184, 152, 92, 0.16);
  border-radius: 999px;
  overflow: hidden;
}
.quiz-progress-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-rich, #C4A66A), var(--rose-deep, #D88C72), var(--gold-deep, #8B7340));
  border-radius: 999px;
  transition: width 480ms cubic-bezier(0.22, 1, 0.36, 1);
}
.quiz-progress-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-deep, #8B7340);
}

.quiz-question {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(24px, 3.4vw, 32px);
  line-height: 1.15;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.quiz-help {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0 0 22px;
  line-height: 1.5;
}

.quiz-options {
  display: grid;
  gap: 10px;
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--cream, #F5EFE6);
  border: 1.5px solid rgba(184, 152, 92, 0.2);
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 280ms cubic-bezier(0.22, 1, 0.36, 1);
  min-height: 56px;
}
.quiz-option:hover {
  border-color: var(--gold, #B8985C);
  background: #FFFFFF;
  transform: translateX(4px);
  box-shadow: 0 8px 20px rgba(184, 152, 92, 0.18);
}
.quiz-option.selected {
  border-color: var(--gold, #B8985C);
  background: linear-gradient(135deg, rgba(184, 152, 92, 0.14), rgba(216, 140, 114, 0.08));
  transform: scale(1.02);
}
.quiz-option-icon {
  font-size: 22px;
  flex: 0 0 auto;
  line-height: 1;
  width: 30px;
  text-align: center;
}
.quiz-option-label { flex: 1; }

.quiz-back {
  margin-top: 20px;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  padding: 8px 0;
}
.quiz-back:hover { color: var(--gold-deep); }

/* RESULT */
.quiz-result {
  text-align: center;
  animation: quizResultIn 720ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes quizResultIn {
  0% { opacity: 0; transform: translateY(20px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.quiz-result-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep, #8B7340);
  margin-bottom: 12px;
}
.quiz-result-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(26px, 4vw, 36px);
  line-height: 1.1;
  margin: 0 0 10px;
  background: linear-gradient(135deg, var(--gold-rich, #C4A66A) 0%, var(--rose-deep, #D88C72) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.quiz-result-price-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  margin-bottom: 22px;
}
.quiz-result-price {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5vw, 48px);
  line-height: 1;
  background: linear-gradient(135deg, var(--gold-rich), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.quiz-result-duration {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.quiz-result-includes {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}
.quiz-result-includes li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}
.quiz-result-includes .ico {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: var(--cream);
  font-size: 11px;
  font-weight: 700;
  margin-top: 1px;
}

.quiz-result-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.quiz-restart {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  padding: 8px 14px;
}
.quiz-restart:hover { color: var(--gold-deep); }

@media (max-width: 600px) {
  .quiz-wrap { padding: 28px 22px; border-radius: 20px; }
  .quiz-question { font-size: 22px !important; }
  .quiz-help { font-size: 13px; margin-bottom: 18px; }
  .quiz-option { font-size: 14px; padding: 12px 14px; min-height: 52px; }
  .quiz-option-icon { font-size: 20px; }
  .quiz-result-actions { flex-direction: column; }
  .quiz-result-actions .btn { width: 100%; }
}

/* ============================================================
   2. CHAT PREVIEW WIDGET
   ============================================================ */
.chat-preview {
  position: fixed;
  bottom: 92px;
  right: 22px;
  z-index: 88;
  width: min(320px, calc(100vw - 32px));
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(184, 152, 92, 0.25);
  border-radius: 18px;
  box-shadow: 0 20px 60px -16px rgba(26, 20, 16, 0.28);
  padding: 14px;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1),
              opacity 480ms ease;
  pointer-events: none;
}
.chat-preview.visible {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}
.chat-preview-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(26, 20, 16, 0.06);
  color: var(--ink);
  font-size: 18px;
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 200ms;
}
.chat-preview-close:hover { background: rgba(26, 20, 16, 0.14); }

.chat-preview-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px 10px;
  border-bottom: 1px solid rgba(184, 152, 92, 0.18);
  margin-bottom: 10px;
}
.chat-preview-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}
.chat-preview-name {
  display: block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--ink);
}
.chat-preview-status {
  display: block;
  font-size: 11px;
  color: var(--gold-deep);
  font-weight: 600;
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.chat-preview-status .dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.25);
  animation: chatDotPulse 1.6s ease-in-out infinite;
}
@keyframes chatDotPulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.25); }
  50% { box-shadow: 0 0 0 5px rgba(37, 211, 102, 0); }
}

.chat-preview-body { padding: 4px; }
.chat-bubble {
  background: var(--champagne-glow, #F0DCC4);
  padding: 10px 14px;
  border-radius: 18px;
  border-top-left-radius: 6px;
  margin-bottom: 6px;
  max-width: 92%;
  animation: chatBubbleIn 480ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.chat-bubble:nth-child(2) { animation-delay: 280ms; }
@keyframes chatBubbleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-bubble p {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink);
}
.chat-preview-cta {
  display: block;
  margin-top: 10px;
  padding: 10px 14px;
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: filter 200ms, transform 200ms;
}
.chat-preview-cta:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .chat-preview { right: 12px; bottom: 100px; width: calc(100vw - 24px); }
}

/* ============================================================
   3. PORTFOLIO LIGHTBOX
   ============================================================ */
html.pf-lock { overflow: hidden; }

.pf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9990;
  background: rgba(15, 11, 8, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 480ms cubic-bezier(0.22, 1, 0.36, 1);
}
.pf-lightbox.open {
  opacity: 1;
  pointer-events: all;
}

.pf-stage {
  margin: 0;
  position: relative;
  max-width: 92vw;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.pf-img {
  display: block;
  max-width: 92vw;
  max-height: 76vh;
  width: auto;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(184, 152, 92, 0.3);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 480ms ease, transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}
.pf-img.loaded {
  opacity: 1;
  transform: scale(1);
}

.pf-caption {
  text-align: center;
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.pf-cat {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 20px;
  color: var(--gold-light, #D6B780);
}
.pf-sub {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.pf-counter {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(245, 239, 230, 0.5);
  margin-top: 6px;
}

.pf-close,
.pf-nav {
  position: fixed;
  background: rgba(245, 239, 230, 0.12);
  border: 1px solid rgba(184, 152, 92, 0.4);
  color: var(--cream);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 240ms ease;
  backdrop-filter: blur(8px);
  z-index: 1;
}
.pf-close {
  top: 22px;
  right: 22px;
  width: 48px;
  height: 48px;
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
}
.pf-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  font-size: 32px;
  font-weight: 300;
}
.pf-prev { left: 22px; }
.pf-next { right: 22px; }
.pf-close:hover, .pf-nav:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  transform: scale(1.06);
}
.pf-nav:hover { transform: translateY(-50%) scale(1.06); }

@media (max-width: 600px) {
  .pf-close { top: 12px; right: 12px; width: 40px; height: 40px; font-size: 22px; }
  .pf-nav { width: 44px; height: 44px; font-size: 26px; }
  .pf-prev { left: 10px; }
  .pf-next { right: 10px; }
  .pf-img { max-height: 70vh; border-radius: 12px; }
  .pf-cat { font-size: 17px; }
  .pf-sub { font-size: 10px; letter-spacing: 0.16em; }
}

@media (prefers-reduced-motion: reduce) {
  .pf-img { transition: opacity 200ms ease; }
  .chat-bubble { animation: none !important; opacity: 1 !important; transform: none !important; }
  .chat-preview { transition: opacity 200ms ease; }
}


/* ============================================================
   BRAND WHATSAPP PILL — replaces green FAB with elegant design
   ============================================================ */

/* Force-hide the old green FAB even if still in DOM (cache cleanup) */
.wa-fab,
#waFab {
  display: none !important;
}

.wa-pill {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 85;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 14px;
  background: linear-gradient(135deg, var(--ink, #1A1410) 0%, #2a2018 100%);
  color: var(--cream, #F5EFE6);
  border: 1px solid rgba(184, 152, 92, 0.42);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 16px 40px -12px rgba(26, 20, 16, 0.45),
              0 0 0 1px rgba(184, 152, 92, 0.12),
              0 2px 0 rgba(255, 255, 255, 0.06) inset;
  transform: translateY(20px) scale(0.94);
  opacity: 0;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1),
              opacity 600ms ease,
              box-shadow 280ms ease,
              border-color 280ms ease;
  white-space: nowrap;
}
.wa-pill.visible {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.wa-pill:hover {
  border-color: var(--gold, #B8985C);
  box-shadow: 0 22px 52px -10px rgba(184, 152, 92, 0.38),
              0 0 0 1px var(--gold),
              0 2px 0 rgba(255, 255, 255, 0.06) inset;
  transform: translateY(-2px) scale(1);
}
.wa-pill:active { transform: translateY(0) scale(0.98); }

.wa-pill-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-rich, #C4A66A) 0%, var(--gold-deep, #8B7340) 100%);
  color: var(--ink, #1A1410);
  box-shadow: 0 0 0 2px rgba(184, 152, 92, 0.22);
  flex: 0 0 auto;
}
.wa-pill-icon svg { display: block; }

.wa-pill-text {
  font-weight: 500;
  letter-spacing: 0.02em;
}
.wa-pill-text strong {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 1.1em;
  background: linear-gradient(135deg, var(--gold-light, #D6B780) 0%, var(--rose-soft, #F4D7CC) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.wa-pill-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25D366;
  box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
  animation: pillDotPulse 2.2s ease-in-out infinite;
  margin-left: 2px;
}
@keyframes pillDotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
  50% { box-shadow: 0 0 0 7px rgba(37, 211, 102, 0); }
}

/* Hide on mobile (sticky CTA already shows WhatsApp button) */
@media (max-width: 767px) {
  .wa-pill { display: none !important; }
}

/* Avoid overlap with chat preview widget if both visible */
.chat-preview.visible ~ .wa-pill {
  bottom: 240px;
}

/* When loading, hide */
html.loading .wa-pill {
  opacity: 0 !important;
  transform: translateY(20px) scale(0.94) !important;
}

@media (prefers-reduced-motion: reduce) {
  .wa-pill { transition: opacity 200ms ease; }
  .wa-pill-dot { animation: none !important; }
}
