/* ============================================
   DENSIA IMPEX SRL — Forms
   ============================================ */

.form-group {
  margin-bottom: 1.2rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 0.9rem 1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239aa5b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Form states */
.form-group input.error,
.form-group textarea.error {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-group .error-message {
  color: #e74c3c;
  font-size: 0.8rem;
  margin-top: 0.3rem;
  display: none;
}

.form-group input.error + .error-message,
.form-group textarea.error + .error-message {
  display: block;
}

/* Contact form container */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 2rem;
  backdrop-filter: blur(20px);
}

.contact-form h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.form-submit {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
  color: var(--bg-primary);
  border: none;
  padding: 1rem;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform var(--duration-fast), box-shadow var(--duration-fast);
  font-family: inherit;
}

.form-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.form-success {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
}

.form-success i {
  font-size: 3rem;
  color: var(--accent-green);
  margin-bottom: 1rem;
}

.form-success h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.form-success p {
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .contact-form { padding: 1.5rem; }
}

/* Lead forms: honeypot, errors, notes, sending state */
.hp-field { display: none !important; }
.lead-form .form-error {
  margin: 1rem 0;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(255, 99, 99, 0.45);
  border-radius: 12px;
  background: rgba(255, 99, 99, 0.08);
  color: var(--text-primary);
  line-height: 1.6;
}
.lead-form .form-error a { color: var(--accent-gold); font-weight: 600; }
.lead-form .form-note { margin-top: 0.9rem; font-size: 0.85rem; color: var(--text-muted); }
.lead-form .form-note a { color: var(--text-secondary); }
.lead-form.is-sending .form-submit { opacity: 0.6; cursor: progress; }
.lead-form [aria-invalid="true"] { border-color: #ff6363; }

/* Quote page: Hims & Hers-style quiz. One question per screen with JS; all questions in one form without. */
.page-hero--compact { min-height: 0; padding: 8.5rem 5% 1.25rem; }
.page-hero--compact h1 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); margin-bottom: 0.6rem; }
.page-hero--compact .section-subtitle { font-size: 1rem; }
.quiz-section { padding-top: 1.25rem; }
.container.quiz-wrap { max-width: 680px; }   /* beats the wide-screen .container width */
.lead-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 600; color: var(--text-secondary); font-size: 0.9rem; }
.quiz { padding: 2rem 2.25rem 2.25rem; scroll-margin-top: 90px; }
.quiz-top { display: none; align-items: center; gap: 0.9rem; margin-bottom: 1.75rem; }
.js .quiz .quiz-top { display: flex; }
.quiz-back {
  flex: none; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--border-glass); background: transparent; color: var(--text-primary);
  cursor: pointer; transition: border-color var(--duration-fast), color var(--duration-fast);
}
.quiz-back[hidden] { visibility: hidden; }   /* keeps its place so the bar doesn't jump */
.quiz-back:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.quiz-progress { flex: 1; height: 6px; border-radius: var(--radius-full); background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.quiz-progress-bar {
  display: block; height: 100%; width: 14.2857%; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-light)); transition: width 0.35s ease;
}
.quiz-count { flex: none; min-width: 2.8rem; text-align: right; font-size: 0.85rem; font-weight: 700; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.lead-form legend.quiz-question {
  display: block; width: 100%; padding: 0; margin-bottom: 0.5rem; outline: none;
  font-size: clamp(1.45rem, 3.2vw, 1.9rem); font-weight: 800; line-height: 1.25; color: var(--text-primary);
}
.quiz-hint { color: var(--text-secondary); margin-bottom: 1.5rem; }
.quiz-question + .quiz-options { margin-top: 1.5rem; }
.quiz-options { display: grid; gap: 0.75rem; margin-bottom: 1.5rem; }
.quiz-options--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 0; }
.quiz-field { margin-bottom: 1.2rem; }
.quiz-option { display: block; position: relative; cursor: pointer; }
.quiz-option input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.quiz-option-box {
  display: flex; align-items: center; gap: 0.9rem; min-height: 60px; padding: 0.9rem 1.1rem;
  border: 1.5px solid var(--border-glass); border-radius: 16px; background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary); font-weight: 600; font-size: 1.02rem;
  transition: border-color var(--duration-fast), background var(--duration-fast), transform var(--duration-fast);
}
.quiz-option:hover .quiz-option-box { border-color: rgba(212, 175, 55, 0.55); background: rgba(212, 175, 55, 0.05); }
.quiz-option:active .quiz-option-box { transform: scale(0.99); }
.quiz-option-icon { width: 1.4rem; text-align: center; font-size: 1.15rem; color: var(--accent-gold); }
.quiz-option .fa-whatsapp { color: var(--accent-green); }
.quiz-option-label { flex: 1; min-width: 0; }
.quiz-option-check { font-size: 1.2rem; color: var(--accent-gold); opacity: 0; transform: scale(0.6); transition: opacity var(--duration-fast), transform var(--duration-fast); }
.quiz-option input:checked + .quiz-option-box { border-color: var(--accent-gold); background: rgba(212, 175, 55, 0.1); }
.quiz-option input:checked + .quiz-option-box .quiz-option-check { opacity: 1; transform: none; }
.quiz-option input:focus-visible + .quiz-option-box { outline: 2px solid var(--accent-gold); outline-offset: 3px; }
.quiz-option input.error + .quiz-option-box { border-color: #ff6363; }
.quiz .form-group textarea { min-height: 140px; }
.quiz .form-submit { margin-top: 0.25rem; }
.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;
}

/* Screens */
[data-step-next] { display: none; }
.is-stepped [data-step-next] { display: flex; justify-content: center; width: 100%; }
.is-stepped .form-step[data-auto]:not(.is-answered) [data-step-next] { display: none; }   /* tap a card instead */
.is-stepped .form-step:not(.is-active) { display: none; }
.is-stepped .form-step.is-active { animation: quiz-in 0.3s ease both; }
@keyframes quiz-in { from { opacity: 0; transform: translateY(8px); } }
.form-step + .form-step { margin-top: 2.5rem; }
.is-stepped .form-step + .form-step { margin-top: 0; }
/* Before forms.js runs only question 1 shows. If it never runs, all questions appear after 4 s. */
.js .quiz:not(.is-stepped) .form-step + .form-step { animation: quiz-hold 4s steps(1, end); }
@keyframes quiz-hold { from { visibility: hidden; max-height: 0; margin: 0; overflow: hidden; } }

/* Under the quiz: trust points and the WhatsApp alternative */
.quiz-aside { margin-top: 1.75rem; display: grid; gap: 1rem; justify-items: center; text-align: center; }
.quote-trust { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, auto); justify-content: center; gap: 0.6rem 1.75rem; font-size: 0.9rem; color: var(--text-secondary); }
.quote-trust i { color: var(--accent-gold); width: 1.2rem; }
.quiz-alt { color: var(--text-secondary); }
.quiz-alt a { color: var(--text-primary); font-weight: 700; white-space: nowrap; }
.quiz-alt .fa-whatsapp { color: var(--accent-green); }
@media (max-width: 560px) {
  .page-hero--compact { padding-top: 7rem; }
  .quiz { padding: 1.5rem 1.15rem 1.75rem; }
  .quiz-option-box { min-height: 56px; }
  .quote-trust { grid-template-columns: 1fr; justify-items: start; }
}
@media (max-width: 430px) { .quiz-options--pair { grid-template-columns: 1fr; } }
