/* ═══════════════════════════════════════════════════════════════════════════
 * Faretrucks Theme — theme.css
 * Custom styles complementing Tailwind CDN v3
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { 
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; 
  margin: 0; 
  background-color: #ffffff; 
  color: #1a1a2e;
  overflow-x: hidden;
  max-width: 100vw;
}
img { max-width: 100%; height: auto; }
a { text-decoration: none; }

/* ── Navbar ───────────────────────────────────────────────────────────────── */
.navbar-bg {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ── Mobile Menu ──────────────────────────────────────────────────────────── */
#mobile-menu {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}
#mobile-menu.is-open {
  max-height: 600px;
  opacity: 1;
}

/* ── Hero Grid Background ─────────────────────────────────────────────────── */
.hero-grid {
  background-image:
    linear-gradient(rgba(3,86,79,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(3,86,79,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* ── Hero Animations (above fold — no AOS) ────────────────────────────────── */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeRight {
  from { opacity: 0; transform: translateX(-16px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

.hero-badge     { animation: heroFadeRight 0.6s ease forwards; }
.hero-heading   { animation: heroFadeUp 0.8s 0.1s ease both; }
.hero-sub       { animation: heroFadeUp 0.8s 0.25s ease both; }
.hero-ctas      { animation: heroFadeUp 0.8s 0.4s ease both; }
.hero-image     { animation: heroFadeIn 1s 0.3s ease both; }
.hero-stat-item { animation: heroFadeUp 0.55s ease both; }
.hero-stat-item:nth-child(1) { animation-delay: 0.85s; }
.hero-stat-item:nth-child(2) { animation-delay: 0.95s; }
.hero-stat-item:nth-child(3) { animation-delay: 1.05s; }
.hero-stat-item:nth-child(4) { animation-delay: 1.15s; }

/* ── Stats Strip Hover ────────────────────────────────────────────────────── */
.stat-strip-item {
  transition: background-color 0.2s ease;
  cursor: default;
}
.stat-strip-item:hover { background-color: rgba(3,86,79,0.05); }
.stat-strip-item .stat-dot {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-strip-item:hover .stat-dot {
  transform: scale(1.7);
  box-shadow: 0 0 0 5px rgba(238,113,27,0.15);
}
.stat-strip-item .stat-val {
  transition: color 0.18s ease;
}
.stat-strip-item:hover .stat-val { color: #ee711b !important; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn-orange {
  background-color: #ee711b;
  color: #fff;
  box-shadow: 0 4px 16px rgba(238,113,27,0.3);
  transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-orange:hover {
  background-color: #d4621a;
  box-shadow: 0 8px 28px rgba(238,113,27,0.45);
  transform: scale(1.04);
}
.btn-orange:active { transform: scale(0.97); }

.btn-green {
  background-color: #03564f;
  color: #fff;
  transition: background-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-green:hover  { background-color: #024840; box-shadow: 0 6px 20px rgba(3,86,79,0.35); transform: scale(1.04); }
.btn-green:active { transform: scale(0.97); }

.btn-outline-green {
  border: 1.5px solid rgba(3,86,79,0.3);
  color: #03564f;
  background: transparent;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-outline-green:hover {
  background-color: rgba(3,86,79,0.06);
  border-color: rgba(3,86,79,0.6);
  box-shadow: 0 6px 20px rgba(3,86,79,0.2);
  transform: scale(1.04);
}
.btn-outline-green:active { transform: scale(0.97); }

/* ── Service Cards ────────────────────────────────────────────────────────── */
.service-card-cta {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.875rem; font-weight: 600; color: #fff;
  padding: 10px 20px; border-radius: 9999px;
  transition: transform 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease;
}
.service-card-cta:hover { transform: scale(1.05); filter: brightness(1.08); box-shadow: 0 6px 18px rgba(0,0,0,0.15); }

/* ── Pallet Accordion ─────────────────────────────────────────────────────── */
.accordion-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.28s ease-in-out, opacity 0.28s ease-in-out;
}
.accordion-body.is-open { max-height: 1200px; opacity: 1; }

.accordion-chevron { transition: transform 0.22s ease; }
.accordion-chevron.is-open { transform: rotate(180deg); }

.accordion-trigger { transition: background-color 0.15s ease; }

/* ── Feature Cards ────────────────────────────────────────────────────────── */
.feature-card {
  border: 2px solid rgba(3,86,79,0) !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0) !important;
  will-change: box-shadow;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}
.feature-card:hover {
  border-color: rgba(3,86,79,0.1) !important;
  box-shadow: 0 8px 20px rgba(0,0,0,0.08) !important;
}
.feature-icon { transition: transform 0.25s ease !important; }
.feature-card:hover .feature-icon { transform: scale(1.1) !important; }

/* ── Location Cards ───────────────────────────────────────────────────────── */
.location-card {
  border: 2px solid rgba(3,86,79,0.1) !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0) !important;
  will-change: border-color, box-shadow;
  transition: border-color 0.3s ease, box-shadow 0.3s ease !important;
}
.location-card:hover {
  border-color: rgba(3,86,79,0.4) !important;
  box-shadow: 0 20px 40px rgba(0,0,0,0.08) !important;
}
.location-icon { transition: background-color 0.3s ease !important; }
.location-card:hover .location-icon { background-color: rgba(3,86,79,0.18) !important; }

/* ── Quiz ─────────────────────────────────────────────────────────────────── */
/* Annulla effetti hover sui pulsanti "Richiedi preventivo" del risultato */
.quiz-no-hover:hover,
.quiz-no-hover:active {
  transform: none !important;
  filter: none !important;
  cursor: pointer;
}

.quiz-option {
  border: 2px solid #e2e8f0;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  cursor: pointer;
  background: #fff;
  width: 100%;
  text-align: left;
  padding: 1rem;
  border-radius: 0.75rem;
}
.quiz-option:hover { border-color: #03564f; background-color: rgba(3,86,79,0.04); }
.quiz-option:hover .quiz-opt-text { color: #03564f; }
.quiz-option:hover .quiz-opt-arrow { color: #03564f; }
.quiz-opt-text  { color: #1a1a2e; font-weight: 500; transition: color 0.2s; }
.quiz-opt-arrow { color: #94a3b8; transition: color 0.2s; flex-shrink: 0; }

/* Animazione fade-out verso sinistra al cambio step del quiz */
@keyframes quizFadeOutLeft {
  0%   { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-20px); }
}
#quiz-wrap.quiz-fade-out {
  animation: quizFadeOutLeft 0.3s ease forwards;
  pointer-events: none;
}

/* Animazione fade-in da destra per il nuovo step */
@keyframes quizFadeInRight {
  0%   { opacity: 0; transform: translateX(20px); }
  100% { opacity: 1; transform: translateX(0); }
}
#quiz-wrap.quiz-fade-in {
  animation: quizFadeInRight 0.3s ease forwards;
}

/* ── Floating CTA ─────────────────────────────────────────────────────────── */
#floating-cta {
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
#floating-cta.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ── Contact Form ─────────────────────────────────────────────────────────── */
.form-field {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  background-color: #f3f4f6;
  font-size: 0.875rem;
  font-family: inherit;
  color: #1a1a2e;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}
.form-field:focus {
  border-color: #03564f;
  box-shadow: 0 0 0 3px rgba(3,86,79,0.12);
}
.form-field::placeholder { color: #94a3b8; }

/* ── CF7 Compatibility ───────────────────────────────────────────────────── */
.wpcf7-form input, .wpcf7-form textarea, .wpcf7-form select {
  margin-top: 0.25rem;
  /* margin-bottom: 1rem; */
}

.wpcf7-form .mt-5 {
  margin-top: 1rem;
}

.wpcf7-form label{ 
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

/* Rendi block il wrapper che CF7 mette attorno ad ogni input */
.wpcf7-form-control-wrap {
  display: block;
}

/* Messaggi di validazione */
.wpcf7-not-valid-tip {
  font-size: 0.75rem;
  color: #ee711b;
  margin-top: 0.25rem;
}

/* Input non validi: bordo rosso */
.wpcf7-form-control.wpcf7-not-valid {
  border-color: #ee711b !important;
}

/* Box di risposta (successo / errore generale) */
.wpcf7-response-output {
  font-size: 0.875rem;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem!important;
  margin: 1rem 0 0 0!important;
  border: 2px solid transparent;
}
.wpcf7-mail-sent-ok {
  background-color: rgba(3,86,79,0.08);
  border-color: #03564f !important;
  color: #03564f;
}
.wpcf7-validation-errors,
.wpcf7-acceptance-missing {
  background-color: rgba(238,113,27,0.06);
  border-color: #ee711b !important;
  color: #d4621a;
}

/* Spinner AJAX */
.wpcf7-spinner {
  display: none;
}

/* ── Privacy Checkbox Row ─────────────────────────────────────────────────── */
.cf7-privacy-row {
  font-size: 0.8125rem;
}
.cf7-privacy-row .wpcf7-list-item {
  margin: 0;
}
.cf7-privacy-row .wpcf7-list-item-label {
  color: #64748b;
}
.cf7-privacy-row a {
  color: #03564f;
  text-decoration: underline;
}
.cf7-privacy-row a:hover {
  color: #024840;
}

/* Spazio extra per il checkbox */
.cf7-privacy-row input[type="checkbox"] {
  accent-color: #03564f;
  margin-right: 0.5rem;
}

/* ── Submit: nascondi la classe default wpcf7 sul button ─────────────────── */
.cf7-submit-row {
  margin-top: 0.5rem;
}
.cf7-submit-row .wpcf7-submit {
  /* eredita già btn-green dal class: shortcode */
  
  border: none;
  cursor: pointer;
}

/* ── Privacy Policy Content ───────────────────────────────────────────────── */
.privacy-content h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #03564f;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.privacy-content h3:first-child {
  margin-top: 0;
}
.privacy-content ul {
  list-style: none;
  padding-left: 0;
  margin: 0.75rem 0 1.5rem;
}
.privacy-content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
  color: rgba(26,46,43,0.7);
  font-size: 0.9375rem;
  line-height: 1.65;
}
.privacy-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #03564f;
  opacity: 0.5;
}
.privacy-content p {
  margin-bottom: 1rem;
  font-size: 0.9375rem;
}
.privacy-content a {
  color: #03564f;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.privacy-content a:hover {
  color: #024840;
}
.privacy-content strong {
  color: #1a1a2e;
}

/* ── Social Icons ─────────────────────────────────────────────────────────── */
.social-btn {
  width: 36px; height: 36px;
  background-color: rgba(255,255,255,0.1);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  transition: background-color 0.2s ease;
}
.social-btn:hover { background-color: rgba(255,255,255,0.2); }

/* ── Numbers Section Background Pattern ──────────────────────────────────── */
.numbers-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Fix offset elements */
.grecaptcha-badge {
  display: none!important;
}

.right-6 {
  right: 6.5rem!important;
}

.-right-6 {
  right: -0.5rem!important;
}

/* ── AOS override: prevent pointer-events blocking ───────────────────────── */
[data-aos] { pointer-events: none; }
[data-aos].aos-animate { pointer-events: auto; }

/* ── Responsive: remove right border on last stat in 2-col mobile layout ─── */
@media (max-width: 767px) {
  .stat-strip-item:nth-child(2) { border-right: none !important; }
}

