/* ---------- Tokens ---------- */
:root {
  --bg: #FBF8F3;
  --bg-alt: #F4EEE5;
  --card-bg: #FFFFFF;
  --text-dark: #4A4038;
  --text-muted: #8A7F72;
  --lavender: #D7CEEA;
  --lavender-dark: #A17EB4;
  --sage: #A9C3AC;
  --sage-dark: #4E8A73;
  --rose: #F3D9DE;
  --rose-dark: #B98090;
  --gold: #C99A45;
  --border: #EAE1D4;
  --star-empty: #DDD5C6;
  --shadow: 0 14px 34px rgba(120, 100, 80, 0.09);
  --shadow-sm: 0 4px 14px rgba(120, 100, 80, 0.08);
  --radius-lg: 30px;
  --radius-md: 20px;
  --radius-sm: 12px;
  --font-heading: 'Cormorant Garamond', serif;
  --font-body: 'Quicksand', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* L'attributo [hidden] deve sempre vincere, anche su elementi con display
   impostato da altre regole (es. .diventa-form { display: flex }) — senza
   questa regola quegli elementi restano visibili nonostante "hidden". */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  margin: 0 0 0.5em;
  color: var(--text-dark);
}

p { margin: 0 0 1em; color: var(--text-muted); }

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 13px 28px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.6s ease-in-out, box-shadow 0.6s ease-in-out, background 0.6s ease-in-out;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--lavender-dark), #B48ECE);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { box-shadow: 0 8px 20px rgba(150, 112, 172, 0.35); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--lavender-dark);
  color: var(--lavender-dark);
}
.btn-outline:hover { background: var(--lavender-dark); color: #fff; }

.btn-light { background: #fff; color: var(--lavender-dark); }

.btn-sm { padding: 9px 20px; font-size: 0.85rem; }

.btn-disabled { opacity: 0.55; pointer-events: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 248, 243, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-dark);
  flex-shrink: 0;
  line-height: 1;
}
.logo-icon {
  display: inline-flex;
  align-items: center;
  color: var(--lavender-dark);
  font-size: 1.4rem;
  line-height: 1;
  transform: translateY(-1px);
}
.logo-text {
  font-size: 1.65rem;
  line-height: 1;
}

.main-nav { display: flex; flex-wrap: wrap; gap: 10px 22px; row-gap: 10px; justify-content: center; margin: 0 auto; }
.main-nav a { font-size: 0.95rem; font-weight: 500; color: var(--text-dark); padding: 4px 0; }
.main-nav a:hover { color: var(--lavender-dark); }

.nav-cta { flex-shrink: 0; }

.lang-switcher { display: flex; gap: 2px; align-items: center; flex-shrink: 0; }
.lang-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  padding: 0 7px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  opacity: 0.65;
  transition: opacity 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.lang-btn:hover { opacity: 1; color: var(--lavender-dark); background-color: rgba(90, 74, 122, 0.08); }
.lang-btn:focus-visible { opacity: 1; color: var(--lavender-dark); outline: 2px solid var(--lavender-dark); outline-offset: 1px; }
.lang-btn.active { opacity: 1; color: var(--lavender-dark); font-weight: 700; background-color: rgba(161, 126, 180, 0.12); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text-dark); border-radius: 2px; transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { padding: 90px 0 100px; overflow: hidden; }

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 50px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lavender-dark);
  margin-bottom: 14px;
}
.eyebrow.center { text-align: center; }

.hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  line-height: 1.18;
  margin-bottom: 22px;
}

.hero-subtitle { font-size: 1.08rem; max-width: 540px; margin-bottom: 36px; }

/* Search bar */
.search-bar {
  display: flex;
  gap: 10px;
  background: #fff;
  padding: 10px;
  border-radius: 100px;
  box-shadow: var(--shadow);
  max-width: 620px;
}

.search-field {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  min-width: 0;
}
.search-field input,
.search-field select {
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  width: 100%;
  background: transparent;
  color: var(--text-dark);
}
.icon-search { width: 18px; height: 18px; color: var(--text-muted); flex-shrink: 0; }
.select-field { border-left: 1px solid var(--border); }
.select-field select { cursor: pointer; }

/* Trust strip */
.trust-strip {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 30px 0 0;
  padding: 0;
}
.trust-strip li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-dark);
}
.trust-strip svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Hero illustration */
.hero-illustration {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  aspect-ratio: 4 / 5;
  border-radius: 42% 58% 55% 45% / 50% 45% 55% 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #FDF6E6, #F3D9DE 60%, #E3D3F1);
  box-shadow: var(--shadow);
}
.hero-illustration img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Decorative section watermark ---------- */
.section-decor {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.section-decor svg { width: 60%; max-width: 520px; opacity: 0.16; }

/* ---------- Real image slots + clean placeholders ---------- */
.image-placeholder {
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #FDF6E6, #F3D9DE 55%, #E3D3F1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.image-placeholder svg { opacity: 0.4; }
.image-placeholder img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-placeholder.wide {
  max-width: 900px;
  margin: 40px auto 0;
  aspect-ratio: 21 / 9;
}
.image-placeholder.portrait {
  aspect-ratio: 3 / 4;
  max-width: 320px;
  margin-top: 28px;
}

/* ---------- Section generic ---------- */
section { padding: 100px 0; }
.section-title { font-size: clamp(1.9rem, 3.5vw, 2.5rem); }
.section-title.center { text-align: center; }
.section-subtitle { max-width: 580px; font-size: 1.02rem; }
.section-subtitle.center { text-align: center; margin: 0 auto 56px; }

/* ---------- Disciplines (scrollable) ---------- */
.disciplines { position: relative; background: var(--bg-alt); overflow: hidden; }
.disciplines .container { position: relative; z-index: 1; }

.discipline-scroll-wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
}
.discipline-scroll-wrap::before,
.discipline-scroll-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 60px;
  pointer-events: none;
  z-index: 2;
}
.discipline-scroll-wrap::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg-alt), transparent);
}
.discipline-scroll-wrap::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg-alt), transparent);
}

.discipline-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding: 6px 24px 20px;
  scrollbar-width: thin;
  scrollbar-color: var(--lavender) transparent;
}
.discipline-scroll::-webkit-scrollbar { height: 8px; }
.discipline-scroll::-webkit-scrollbar-thumb { background: var(--lavender); border-radius: 100px; }
.discipline-scroll::-webkit-scrollbar-track { background: transparent; }

.discipline-card {
  flex: 0 0 auto;
  scroll-snap-align: start;
  width: 190px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 20px;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-body);
  transition: transform 0.6s ease-in-out, box-shadow 0.6s ease-in-out;
}
.discipline-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }

.discipline-icon {
  width: 50px;
  height: 50px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.discipline-icon svg { width: 24px; height: 24px; }

.discipline-name {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}

.discipline-card-cta {
  border-style: dashed;
  border-color: var(--lavender-dark);
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.discipline-card-cta:hover { background: var(--bg-alt); }

/* ---------- Professionals ---------- */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  margin-bottom: 48px;
}
.filter-bar .search-field {
  background: #fff;
  border: 1px solid var(--border);
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-sm);
}

.search-row {
  display: flex;
  gap: 14px;
  width: 100%;
  max-width: 920px;
}
.search-row .search-field,
.search-row .region-filter {
  max-width: none;
  flex: 1;
  min-width: 0;
}

.region-filter {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 20px;
  max-width: 260px;
  width: 100%;
  box-shadow: var(--shadow-sm);
}
.region-filter select {
  border: none;
  outline: none;
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.92rem;
  background: transparent;
  color: var(--text-dark);
  cursor: pointer;
}

.filter-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-dark);
  padding: 9px 20px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.6s ease-in-out;
}
.chip:hover { border-color: var(--lavender-dark); }
.chip.active { background: var(--lavender-dark); border-color: var(--lavender-dark); color: #fff; }

.professional-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  scroll-margin-top: 100px;
}

.pro-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 34px 30px;
  text-align: center;
  transition: transform 0.6s ease-in-out, box-shadow 0.6s ease-in-out;
  display: flex;
  flex-direction: column;
}
.pro-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }

.pro-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(239, 200, 115, 0.22), 0 0 20px rgba(239, 200, 115, 0.28);
}
.pro-avatar svg { width: 40px; height: 40px; }
.pro-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.pro-tag {
  display: inline-block;
  align-self: center;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}

.pro-name { font-size: 1.35rem; margin-bottom: 2px; }
.pro-location { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; }
.pro-desc { font-size: 0.92rem; margin-bottom: 16px; }

/* Star rating */
.rating-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}
.stars {
  position: relative;
  display: inline-block;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--star-empty);
  letter-spacing: 2px;
}
.stars::before { content: "\2605\2605\2605\2605\2605"; }
.stars::after {
  content: "\2605\2605\2605\2605\2605";
  position: absolute;
  top: 0;
  left: 0;
  width: var(--rating, 0%);
  overflow: hidden;
  white-space: nowrap;
  color: var(--gold);
}
.rating-value { font-weight: 700; font-size: 0.9rem; color: var(--text-dark); }
.rating-count { font-size: 0.82rem; color: var(--text-muted); }
.no-reviews-yet { text-align: center; font-size: 0.85rem; font-style: italic; color: var(--text-muted); margin: 0 0 18px; }

/* Pulsante "Salva nei preferiti" (professionista.html, solo profili reali) */
.favorite-btn { width: 100%; margin-bottom: 14px; }
.favorite-icon { width: 18px; height: 18px; flex-shrink: 0; }
.favorite-icon path { transition: fill 0.3s ease-in-out, stroke 0.3s ease-in-out; }
.favorite-btn.favorited .favorite-icon path { fill: var(--rose-dark); stroke: var(--rose-dark); }
.favorite-btn.favorited { border-color: var(--rose-dark); color: var(--rose-dark); }

/* Reviews */
.pro-reviews { text-align: left; margin-bottom: 8px; }
.review {
  margin: 0 0 10px;
  padding: 14px 16px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-style: italic;
  color: var(--text-dark);
}
.review cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.review-toggle {
  background: none;
  border: none;
  color: var(--lavender-dark);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.84rem;
  cursor: pointer;
  padding: 0 0 20px;
  text-align: left;
  align-self: flex-start;
}
.review-toggle:hover { text-decoration: underline; }

.pro-footer { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--border); }

.no-results { text-align: center; padding: 40px 0; font-size: 1rem; display: none; }

/* ---------- Pratiche (listing cards, used on the professional's profile page) ---------- */
.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.listing-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.6s ease-in-out, box-shadow 0.6s ease-in-out;
}
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.listing-card-link { display: flex; flex-direction: column; flex: 1; color: inherit; text-decoration: none; }
.listing-photo {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.listing-photo svg { width: 36px; height: 36px; opacity: 0.55; }
.listing-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.listing-body { padding: 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.listing-title { font-size: 1.15rem; margin: 0; }
.listing-desc { font-size: 0.92rem; margin: 0; }
.listing-price { font-weight: 700; color: var(--sage-dark); font-size: 0.92rem; margin: 0; }
.listing-pro {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px 26px;
  border-top: 1px solid var(--border);
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text-dark);
  transition: color 0.5s ease-in-out;
}
.listing-pro:hover { color: var(--lavender-dark); }
.listing-pro-avatar { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.listing-pro-avatar svg { width: 14px; height: 14px; }

/* ---------- Eventi (home, thin horizontal list) ---------- */
.events-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.event-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 10px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background 0.4s ease-in-out;
}
.event-row:hover { background: var(--bg-alt); }
.event-row-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.event-row-icon svg { width: 18px; height: 18px; }
.event-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.event-row-title { font-weight: 600; font-size: 0.98rem; }
.event-row-desc { font-size: 0.85rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-row-date {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lavender-dark);
  background: var(--bg-alt);
  border-radius: 100px;
  padding: 5px 12px;
  white-space: nowrap;
}
.event-row-pro { flex-shrink: 0; font-size: 0.85rem; color: var(--text-muted); }
.event-row-price { flex-shrink: 0; font-weight: 700; color: var(--sage-dark); font-size: 0.9rem; white-space: nowrap; }

/* ---------- Trust section ---------- */
.trust-section { background: var(--bg-alt); }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.trust-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 26px;
}
.trust-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.trust-icon svg { width: 26px; height: 26px; }
.trust-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.trust-card p { font-size: 0.9rem; margin: 0; }

/* Disclaimer box */
.disclaimer-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 40px;
  padding: 34px 38px;
  background: linear-gradient(135deg, #FFFDF7, #FBF0EC);
  border: 1px solid #F0E1D6;
  border-radius: var(--radius-lg);
}
.disclaimer-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #FDF6E6, #F3D9DE);
}
.disclaimer-text h3 { font-size: 1.25rem; margin-bottom: 10px; }
.disclaimer-text p {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-dark);
  margin: 0;
}

/* ---------- How it works ---------- */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.step-card {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  border: 1px solid var(--border);
}
.step-number {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--lavender);
  margin-bottom: 8px;
}
.step-card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.step-card p { font-size: 0.9rem; margin: 0; }

/* ---------- Diventa facilitatore/trice ---------- */
.diventa { background: var(--bg-alt); }

.diventa-inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 50px;
  align-items: start;
}

.diventa-copy .section-title,
.diventa-copy .section-subtitle { text-align: left; margin-left: 0; margin-right: 0; }

.diventa-form {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

.diventa-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
}

.diventa-form input[type="text"],
.diventa-form input[type="email"],
.diventa-form input[type="password"],
.diventa-form input[type="number"],
.diventa-form select,
.diventa-form textarea {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-dark);
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  outline: none;
  resize: vertical;
  transition: border-color 0.5s ease-in-out;
}
.diventa-form input[type="text"]:focus,
.diventa-form input[type="email"]:focus,
.diventa-form input[type="password"]:focus,
.diventa-form input[type="number"]:focus,
.diventa-form select:focus,
.diventa-form textarea:focus { border-color: var(--lavender-dark); }

.services-fieldset {
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.services-fieldset legend {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  padding: 0 8px;
  color: var(--text-dark);
}
.services-fieldset input {
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  outline: none;
  transition: border-color 0.5s ease-in-out;
}
.services-fieldset input:focus { border-color: var(--lavender-dark); }

/* Multi-select discipline chips (dashboard.html) */
.discipline-fieldset {
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}
.discipline-fieldset legend {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  padding: 0 8px;
  color: var(--text-dark);
}
.discipline-select-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.discipline-check { position: relative; cursor: pointer; }
.discipline-check input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}
.discipline-check span {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-dark);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  transition: all 0.6s ease-in-out;
}
.discipline-check input:checked + span { background: var(--lavender-dark); border-color: var(--lavender-dark); color: #fff; }
.discipline-check input:focus-visible + span { outline: 2px solid var(--lavender-dark); outline-offset: 2px; }
.discipline-select-error { color: var(--rose-dark); font-size: 0.85rem; font-weight: 600; margin: 12px 0 0; }

/* Photo uploads (dashboard.html) */
.upload-field { display: flex; flex-direction: column; gap: 8px; }
.upload-field > label { font-size: 0.9rem; font-weight: 600; color: var(--text-dark); }
.upload-hint { font-size: 0.8rem; color: var(--text-muted); margin: 0; }

.char-counter {
  display: block;
  text-align: right;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: -10px;
}
.char-counter.char-counter-limit { color: var(--rose-dark); font-weight: 600; }

input[type="file"] {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
}
input[type="file"]::file-selector-button {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 9px 16px;
  margin-right: 12px;
  border-radius: 100px;
  border: none;
  background: var(--lavender-dark);
  color: #fff;
  cursor: pointer;
  transition: background 0.5s ease-in-out;
}
input[type="file"]::file-selector-button:hover { background: #7A5490; }

.upload-previews { display: flex; flex-wrap: wrap; gap: 10px; }
.upload-thumb { position: relative; width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.upload-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-thumb-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(74, 64, 56, 0.72);
  color: #fff;
  border: none;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.5s ease-in-out;
}
.upload-thumb-remove:hover { background: var(--rose-dark); }

.service-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
}
.service-block-label { font-family: var(--font-heading); font-weight: 700; font-size: 0.95rem; color: var(--text-dark); margin: 0; }
.service-block input[type="text"],
.service-block textarea {
  font-family: var(--font-body);
  font-size: 0.92rem;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  outline: none;
  resize: vertical;
  transition: border-color 0.5s ease-in-out;
}
.service-block input[type="text"]:focus,
.service-block textarea:focus { border-color: var(--lavender-dark); }

.diventa-form .btn { align-self: flex-start; }

.form-confirmation {
  font-weight: 600;
  color: var(--sage-dark);
  background: #EAF5EE;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 0;
}

/* ---------- Auth link expired/used notice ---------- */
.auth-notice {
  background: linear-gradient(135deg, #EAF5EE, #F3EFE3);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.auth-notice-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  text-align: center;
}
.auth-notice-inner p {
  margin: 0;
  color: var(--sage-dark);
  font-weight: 600;
  max-width: 520px;
}
.auth-notice-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.form-error {
  font-weight: 600;
  color: #A5573F;
  background: #FBEAEA;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 0;
}

/* ---------- Auth pages (registrati / accedi / dashboard) ---------- */
.auth-section { padding-bottom: 100px; }
.auth-wrap { max-width: 480px; margin: 0 auto; }
.auth-wrap .diventa-form { padding: 40px; }
.auth-wrap .btn { align-self: stretch; }
.auth-switch { text-align: center; font-size: 0.9rem; color: var(--text-muted); margin: 4px 0 0; }
.auth-switch a { color: var(--lavender-dark); font-weight: 700; }

.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 0 auto 28px;
}
.dashboard-account { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.dashboard-email { font-weight: 600; font-size: 0.92rem; color: var(--text-dark); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
}
.status-badge.pending { background: #FDF1DC; color: #9C7326; }
.status-badge.approved { background: #E2EEE6; color: #3F7255; }
.status-badge.suspended { background: #FBEAEA; color: #A5573F; }

.dashboard-form-wrap { max-width: 900px; margin: 0 auto; }

/* ---------- Dashboard: pratiche ed eventi ---------- */
.dashboard-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 900px;
  margin: 56px auto 20px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
}
.dashboard-section-header h2 { margin: 0; }
.dashboard-section-header.first { border-top: none; margin-top: 0; padding-top: 0; }

.dashboard-section-hint { max-width: 900px; margin: -8px auto 20px; font-size: 0.85rem; color: var(--text-muted); }

.dashboard-items-list { max-width: 900px; margin: 0 auto 24px; display: flex; flex-direction: column; gap: 14px; }

.dashboard-empty-hint {
  max-width: 900px;
  margin: 0 auto 24px;
  padding: 22px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
}

.dashboard-item-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  flex-wrap: wrap;
}
.dashboard-item-thumbs { display: flex; gap: 6px; flex-shrink: 0; }
.dashboard-item-thumb { width: 56px; height: 56px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); flex-shrink: 0; }
.dashboard-item-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.dashboard-item-body { flex: 1; min-width: 200px; }
.dashboard-item-body h3 { font-size: 1.1rem; margin: 0 0 4px; }
.dashboard-item-body p { font-size: 0.88rem; margin: 0; color: var(--text-muted); }
.dashboard-item-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 0.82rem; color: var(--text-muted); margin-top: 8px; }

.dashboard-item-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
.dashboard-item-actions .btn { min-width: 122px; }

.dashboard-existing-photos { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 6px; }

/* ---------- Dashboard: area professionale "app" (tab + pannelli) ---------- */
.dashboard-app { padding-bottom: 110px; }

.dashboard-shell {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 32px;
  align-items: start;
  margin-top: 32px;
}

.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 12px;
  position: sticky;
  top: 100px;
}
.dashboard-tab {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease;
}
.dashboard-tab:hover { background: var(--bg-alt); color: var(--text-dark); }
.dashboard-tab.active { background: linear-gradient(135deg, var(--lavender-dark), #B48ECE); color: #fff; }

.dashboard-content { min-width: 0; }
.dashboard-panel .dashboard-section-header.first { margin-top: 0; }

.dashboard-panel .rating-row,
.dashboard-panel .profile-reviews,
.dashboard-panel .no-reviews-yet {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.dashboard-panel .rating-row { justify-content: flex-start; margin-bottom: 24px; }
.dashboard-panel .no-reviews-yet { text-align: left; }

.overview-card {
  max-width: 640px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.overview-card p { margin: 0; }
.overview-card .btn { align-self: flex-start; }

.dashboard-panel .plans-grid { max-width: 900px; margin: 0 auto 40px; }
.dashboard-panel .legal-content { margin-left: auto; margin-right: auto; }

@media (max-width: 860px) {
  .dashboard-shell { grid-template-columns: 1fr; }
  .dashboard-sidebar {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
    padding: 8px;
  }
  .dashboard-tab { width: auto; white-space: nowrap; }
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--lavender-dark), #B48ECE 55%, var(--rose-dark));
  color: #fff;
  padding: 76px 0;
}
.cta-inner { text-align: center; max-width: 560px; margin: 0 auto; }
/* Stessa dimensione/stile del titolo e sottotitolo del page-hero (es. area-clienti.html),
   solo con i colori adattati per restare leggibili sullo sfondo viola. */
.cta-band .eyebrow { color: #fff; }
.cta-band .section-title { margin-bottom: 14px; color: #fff; }
.cta-band .section-subtitle { margin: 0 auto 32px; color: rgba(255,255,255,0.9); }
/* Fallback per titoli/paragrafi senza le classi sopra (es. sezione "Contattaci" di faq.html):
   senza queste regole erediterebbero i colori scuri globali di h1-h4/p, illeggibili sullo sfondo viola. */
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.9); }
.cta-login-link { margin: 18px 0 0; font-size: 0.88rem; }
.cta-login-link a { color: rgba(255,255,255,0.85); text-decoration: underline; font-weight: 600; }
.cta-login-link a:hover { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: #3E362F; color: #D9D1C6; padding: 76px 0 0; }
.site-footer .logo { color: #fff; }
.site-footer .logo-icon { color: var(--lavender); }

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 0.9fr 0.9fr 1.2fr;
  gap: 32px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand p { color: #B7AE9F; margin-top: 16px; font-size: 0.9rem; }

.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 18px;
}
.footer-col a { display: block; color: #B7AE9F; font-size: 0.92rem; margin-bottom: 12px; transition: color 0.5s ease-in-out; }
.footer-col a:hover { color: var(--lavender); }

.newsletter p { color: #B7AE9F; font-size: 0.88rem; margin-bottom: 16px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 11px 16px;
  border-radius: 100px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-family: var(--font-body);
  outline: none;
}
.newsletter-form input::placeholder { color: #8f8677; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-size: 0.85rem;
  color: #8f8677;
}
.footer-social { display: flex; gap: 16px; }
.footer-social a { font-size: 1.2rem; color: #B7AE9F; transition: color 0.5s ease-in-out; }
.footer-social a:hover { color: var(--lavender); }

/* ---------- Footer legal row ---------- */
.footer-legal { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-legal a { color: #B7AE9F; font-size: 0.85rem; transition: color 0.5s ease-in-out; }
.footer-legal a:hover { color: var(--lavender); }

/* ---------- Badges ---------- */
.badge-available {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 100px;
  background: linear-gradient(135deg, #EAF5EE, #D3E7DA);
  color: var(--sage-dark);
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-soon {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 100px;
  background: linear-gradient(135deg, #FDF6E6, #F7E6C0);
  color: var(--gold);
  font-weight: 700;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---------- Page hero (subpages) ---------- */
.page-hero { padding: 70px 0 60px; text-align: center; }
.page-hero .section-title { margin-bottom: 14px; }
.page-hero .section-subtitle { margin: 0 auto; }
.page-hero .cta-actions { margin-top: 32px; }

/* ---------- Legal content ---------- */
.legal-content { max-width: 760px; margin: 0 auto; }
.legal-content h2 { font-size: 1.5rem; margin-top: 44px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { font-size: 1.15rem; margin-top: 28px; }
.legal-content p, .legal-content li { color: var(--text-muted); font-size: 0.98rem; }
.legal-content ul { padding-left: 22px; }
.legal-content .legal-updated { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 40px; }
.legal-content .legal-note {
  background: var(--bg-alt);
  border-left: 3px solid var(--gold);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}

/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 780px; margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.faq-item { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
}
.faq-icon { flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; transition: transform 0.5s ease-in-out, background 0.5s ease-in-out; }
.faq-icon svg { width: 12px; height: 12px; transition: transform 0.5s ease-in-out; color: var(--text-dark); }
.faq-item.open .faq-question { color: var(--lavender-dark); }
.faq-item.open .faq-icon { background: var(--lavender-dark); }
.faq-item.open .faq-icon svg { transform: rotate(45deg); color: #fff; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.5s ease-in-out; }
.faq-answer-inner { padding: 0 26px 24px; font-size: 0.95rem; color: var(--text-muted); }
.faq-item.open .faq-answer { max-height: 600px; }

/* ---------- Profile page ---------- */
.profile-hero { background: var(--bg-alt); padding: 60px 0 50px; }
.profile-hero-inner { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.profile-avatar-lg { width: 140px; height: 140px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 6px rgba(239,200,115,0.22), 0 0 30px rgba(239,200,115,0.28); }
.profile-avatar-lg svg { width: 62px; height: 62px; }
.profile-avatar-lg img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.profile-heading { flex: 1; min-width: 240px; }
.profile-heading h1 { font-size: clamp(1.8rem, 3.5vw, 2.4rem); margin-bottom: 6px; }
.profile-tagline { font-size: 1.05rem; color: var(--text-muted); margin: 0 0 12px; max-width: 560px; }
.profile-meta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }

.profile-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 44px; align-items: start; padding-top: 64px; }
.profile-section { margin-bottom: 52px; }
.profile-section h2 { font-size: 1.4rem; margin-bottom: 16px; }
.profile-section p { font-size: 0.98rem; }
.profile-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px 28px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.profile-section-header h2 { margin-bottom: 0; }

.profile-gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.profile-gallery-tile { aspect-ratio: 1; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; }
.profile-gallery-tile svg { width: 24px; height: 24px; opacity: 0.55; }
.profile-gallery-tile img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* ---------- Pagina di dettaglio (dettaglio.html) ---------- */
.detail-content { max-width: 720px; margin: 0 auto; padding-top: 64px; }
.detail-back-link { text-align: center; margin-top: 44px; }

.cert-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.cert-list li { display: flex; align-items: center; gap: 12px; font-size: 0.95rem; color: var(--text-dark); }
.cert-list svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--sage-dark); }

.profile-stats { display: flex; gap: 28px; flex-wrap: wrap; margin: 22px 0; }
.profile-stat strong { display: block; font-family: var(--font-heading); font-size: 1.6rem; color: var(--text-dark); }
.profile-stat span { font-size: 0.82rem; color: var(--text-muted); }

.profile-reviews { display: flex; flex-direction: column; gap: 14px; }
.profile-review { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 22px 24px; }
.profile-review p { font-style: italic; color: var(--text-dark); margin-bottom: 10px; font-size: 0.96rem; }
.profile-review cite { font-style: normal; font-weight: 700; font-size: 0.85rem; color: var(--text-muted); }

.profile-sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 22px; }
.contact-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; }
.contact-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.contact-card p { font-size: 0.88rem; margin-bottom: 20px; }
.contact-card form { display: flex; flex-direction: column; gap: 14px; }
.contact-card label { display: flex; flex-direction: column; gap: 6px; font-size: 0.88rem; font-weight: 600; color: var(--text-dark); }
.contact-card input, .contact-card textarea {
  font-family: var(--font-body); font-size: 0.92rem; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); outline: none; resize: vertical;
  transition: border-color 0.5s ease-in-out;
}
.contact-card input:focus, .contact-card textarea:focus { border-color: var(--lavender-dark); }
.contact-card .btn { width: 100%; }
.contact-note { font-size: 0.78rem; color: var(--text-muted); margin-top: 12px; }
.contact-login-actions { flex-wrap: wrap; }
.contact-login-actions .btn { width: auto; flex: 1; }

/* ---------- Form di recensione (sidebar profilo professionista) ---------- */
.star-input { display: flex; gap: 6px; margin-bottom: 4px; }
.star-input-btn {
  background: none;
  border: none;
  padding: 2px;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--star-empty);
  cursor: pointer;
  transition: color 0.15s ease;
}
.star-input-btn.is-filled { color: var(--gold); }
#reviewExistingContent { margin-bottom: 16px; }
#reviewCancelEditBtn { margin-top: -4px; }
.review-existing-actions { display: flex; gap: 10px; }
.review-existing-actions .btn { width: auto; flex: 1; }

/* ---------- Pannello admin: statistiche ---------- */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 18px;
  max-width: 1000px;
  margin: 0 auto 20px;
}
.admin-stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 20px;
  text-align: center;
}
.admin-stat-card strong { display: block; font-family: var(--font-heading); font-size: 2.1rem; color: var(--lavender-dark); margin-bottom: 4px; }
.admin-stat-card span { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- Pannello admin: gestione professionisti (ricerca, flag, sospensione) ---------- */
.admin-filter-row { margin-bottom: 24px; }

.dashboard-item-card.is-flagged { border-color: #E0A857; box-shadow: 0 0 0 1px #E0A857; }

/* Flag automatico "ambito sanitario": colore distinto dal flag manuale
   "dubbio" (oro) sopra, per non confonderli a colpo d'occhio nel pannello. */
.dashboard-item-card.is-health-flagged { border-color: var(--rose-dark); box-shadow: 0 0 0 1px var(--rose-dark); }
.health-flag-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--rose-dark);
  background: var(--rose);
  border-radius: 6px;
  padding: 2px 8px;
  margin-bottom: 8px;
}
.health-flag-terms-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.health-flag-term-badge {
  font-size: 0.78rem;
  color: var(--text-dark);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
}
.health-flag-term-badge em { color: var(--lavender-dark); font-style: normal; font-weight: 600; }

.flag-note {
  margin-top: 6px;
  font-size: 0.82rem;
  font-style: italic;
  color: #9C7326;
  background: #FDF6E8;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
}

.admin-flag-note-row { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.admin-flag-note-row input {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  outline: none;
}
.admin-flag-note-row input:focus { border-color: var(--lavender-dark); }

.admin-edit-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.admin-edit-form .form-row { grid-template-columns: 1fr 1fr; }
.admin-edit-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--text-dark); }
.admin-edit-form input,
.admin-edit-form select,
.admin-edit-form textarea {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  outline: none;
  resize: vertical;
}
.admin-edit-form input:focus,
.admin-edit-form select:focus,
.admin-edit-form textarea:focus { border-color: var(--lavender-dark); }
.admin-edit-form-actions { display: flex; gap: 8px; }

/* ---------- Pannello admin: statistiche espanse (Panoramica) ---------- */
.admin-substats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}
.admin-substat-block {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
}
.admin-substat-block h3 { font-size: 1rem; margin: 0 0 14px; }
.admin-substat-block h4 { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 8px; }

.admin-simple-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.admin-simple-table th { text-align: left; color: var(--text-muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.admin-simple-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); }
.admin-simple-table tr:last-child td { border-bottom: none; }

.admin-rank-list { margin: 0; padding-left: 20px; font-size: 0.88rem; display: flex; flex-direction: column; gap: 6px; }
.admin-rank-list li { color: var(--text-dark); }
.admin-rank-list .admin-rank-count { color: var(--text-muted); font-size: 0.82rem; }

.admin-active-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.admin-quick-links { display: flex; flex-direction: column; gap: 10px; }
.admin-quick-links a { font-size: 0.9rem; font-weight: 600; color: var(--lavender-dark); }
.admin-quick-links a:hover { text-decoration: underline; }

/* ---------- Avviso "recensione non ammessa" — tono caldo, non allarmante ---------- */
.review-warning {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #FDF6E8;
  border: 1px solid #F3E1B8;
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.review-warning-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #FBEACB;
  color: #9C7326;
  display: flex;
  align-items: center;
  justify-content: center;
}
.review-warning-icon svg { width: 18px; height: 18px; }
.review-warning .review-warning-body h4 { font-size: 0.98rem; margin: 0 0 4px; color: #7A5A1E; }
.review-warning .review-warning-body p { font-size: 0.85rem; color: #8A7148; margin: 0 0 12px; }
.review-warning-link { font-size: 0.85rem; font-weight: 700; color: #9C7326; text-decoration: underline; background: none; border: none; padding: 0; cursor: pointer; font-family: var(--font-body); }
.review-warning-link:hover { color: #7A5A1E; }

/* ---------- Segnalazione profilo/recensione: link discreto + mini-form (professionista.html) ---------- */
.report-profile-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: var(--font-body);
}
.report-profile-link:hover { color: var(--text-dark); }

.report-profile-form {
  margin-top: 12px;
  padding: 18px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  text-align: left;
}
.report-profile-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; font-weight: 600; color: var(--text-dark); }
.report-profile-form input,
.report-profile-form textarea {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  outline: none;
  resize: vertical;
}
.report-profile-form input:focus,
.report-profile-form textarea:focus { border-color: var(--lavender-dark); }

.form-success {
  font-weight: 600;
  color: #3F7255;
  background: #E2EEE6;
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 0;
}

/* ---------- Messaggistica interna (professionista.html, dashboard-cliente.html, dashboard.html) ---------- */
.message-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding-right: 4px;
}
.message-bubble { max-width: 88%; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.86rem; }
.message-bubble p { margin: 0; color: inherit; }
.message-bubble.mine { align-self: flex-end; background: var(--lavender); color: var(--text-dark); border-bottom-right-radius: 4px; }
.message-bubble.theirs { align-self: flex-start; background: var(--bg-alt); color: var(--text-dark); border-bottom-left-radius: 4px; }

/* ---------- Cuoricino "preferiti" sulle card della directory (index.html) ---------- */
.pro-card { position: relative; }
.card-favorite-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: transform 0.2s ease-in-out, border-color 0.3s ease-in-out;
}
.card-favorite-btn:hover { transform: scale(1.08); }
.card-favorite-btn .favorite-icon { width: 18px; height: 18px; color: var(--text-muted); }
.card-favorite-btn.favorited { border-color: var(--rose-dark); }
.card-favorite-btn.favorited .favorite-icon { color: var(--rose-dark); }
.card-favorite-btn.favorited .favorite-icon path { fill: var(--rose-dark); stroke: var(--rose-dark); }

/* ---------- Conversazioni (dashboard-cliente.html, dashboard.html) ---------- */
.conversation-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
.conversation-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  cursor: pointer;
}
.conversation-summary-body h3 { font-size: 1.05rem; margin: 0 0 4px; display: flex; align-items: center; gap: 8px; }
.conversation-summary-body p { font-size: 0.86rem; margin: 0; color: var(--text-muted); }
.conversation-date { font-size: 0.78rem; color: var(--text-muted); flex-shrink: 0; white-space: nowrap; }
.unread-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--rose-dark); }
.conversation-card.has-unread .conversation-summary-body h3 { font-weight: 700; }
.conversation-thread { padding: 0 18px 18px; border-top: 1px solid var(--border); }
.conversation-thread .message-thread { margin-top: 16px; }
.message-reply-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.message-reply-error { flex: 1 0 100%; margin: 0; font-size: 0.8rem; padding: 8px 12px; }
.message-reply-form textarea {
  flex: 1;
  font-family: var(--font-body); font-size: 0.9rem; padding: 10px 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); outline: none; resize: vertical;
}
.message-reply-form textarea:focus { border-color: var(--lavender-dark); }

/* ---------- Badge messaggi non letti nel menu ---------- */
.nav-unread-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 100px;
  background: var(--rose-dark);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}

/* ---------- Plans page ---------- */
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; align-items: stretch; }
.plan-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px 30px; display: flex; flex-direction: column; text-align: center; }
.plan-card.featured { border-color: var(--lavender-dark); box-shadow: var(--shadow); position: relative; }
.plan-name { font-size: 1.3rem; margin-bottom: 6px; }
.plan-price { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }
.plan-price small { font-family: var(--font-body); font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.plan-desc { font-size: 0.9rem; margin-bottom: 22px; }
.plan-card .btn, .plan-card .btn-disabled { margin-top: auto; }

/* ---------- Carousel arrows ---------- */
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-dark);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.5s ease-in-out, color 0.5s ease-in-out, border-color 0.5s ease-in-out;
}
.carousel-arrow:hover { background: var(--lavender-dark); color: #fff; border-color: var(--lavender-dark); }
.carousel-arrow.prev { left: -6px; }
.carousel-arrow.next { right: -6px; }
.carousel-arrow svg { width: 18px; height: 18px; }

/* ---------- Outline button on dark backgrounds ---------- */
.btn-outline-light { background: transparent; border: 1.5px solid rgba(255,255,255,0.7); color: #fff; transition: background 0.5s ease-in-out; }
.btn-outline-light:hover { background: rgba(255,255,255,0.15); }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { order: 1; }
  .hero-illustration { order: 2; max-width: 340px; }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .search-bar { margin-left: auto; margin-right: auto; }
  .trust-strip { justify-content: center; }

  .professional-grid { grid-template-columns: repeat(2, 1fr); }
  .listings-grid { grid-template-columns: repeat(2, 1fr); }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .diventa-inner { grid-template-columns: 1fr; }
  .diventa-copy { text-align: center; }
  .diventa-copy .section-title,
  .diventa-copy .section-subtitle { text-align: center; margin-left: auto; margin-right: auto; }
  .image-placeholder.portrait { margin-left: auto; margin-right: auto; }

  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; }
  .plans-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-bottom: 1px solid var(--border);
  }
  .main-nav.open { max-height: 480px; }
  .main-nav a { width: 100%; text-align: center; padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav-cta { display: none; }
  .header-inner { gap: 12px; }
  .nav-toggle { display: flex; margin-left: auto; }
  .lang-switcher { gap: 5px; }
  .logo-text { font-size: 1.4rem; }

  .search-bar { flex-direction: column; border-radius: var(--radius-md); }
  .search-row { flex-direction: column; }
  .select-field { border-left: none; border-top: 1px solid var(--border); }

  .professional-grid { grid-template-columns: 1fr; }
  .listings-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }

  .event-row { flex-wrap: wrap; gap: 4px 18px; }
  .event-row-desc { display: none; }
  .event-row-date { order: 1; }
  .event-row-pro { order: 2; }
  .event-row-price { order: 3; margin-left: auto; }

  .footer-grid { grid-template-columns: 1fr; padding-bottom: 30px; }
  .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }

  section { padding: 64px 0; }
  .hero { padding: 60px 0 50px; }
  .discipline-card { width: 165px; }

  .disclaimer-box { flex-direction: column; padding: 26px; }

  .diventa-form { padding: 26px; }
  .form-row { grid-template-columns: 1fr; }
  .image-placeholder.wide { margin-top: 24px; }

  .carousel-arrow { display: none; }
  .profile-hero-inner { text-align: center; justify-content: center; }
  .profile-meta { justify-content: center; }
  .profile-gallery { grid-template-columns: repeat(3, 1fr); }
  .waitlist-form { flex-direction: column; }
  .footer-legal { justify-content: center; }

  .admin-edit-form .form-row { grid-template-columns: 1fr; }
  .admin-active-columns { grid-template-columns: 1fr; }
}

/* ---------- Scroll reveal (sobrio: dissolvenza + leggero sollevamento) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.7s ease-in-out, transform 0.7s ease-in-out;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Floating "Segnala un problema" button (icona, compatto, tooltip) ---------- */
.report-button {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 200;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lavender-dark), #B48ECE);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
}
.report-button svg { width: 18px; height: 18px; flex-shrink: 0; }
.report-button:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(150, 112, 172, 0.35); }

.report-button::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 48px;
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: var(--text-dark);
  color: #fff;
  padding: 6px 12px;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}
.report-button:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

@media (max-width: 720px) {
  .report-button { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Avviso "termini di ambito medico" (tutela legale) ---------- */
body.health-warning-open { overflow: hidden; }

.health-warning-overlay {
  position: fixed;
  inset: 0;
  background: rgba(74, 64, 56, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.health-warning-modal {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  padding: 32px;
  width: min(600px, 100%);
  max-height: 88vh;
  overflow-y: auto;
}

.health-warning-modal h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--text-dark);
  margin: 0 0 14px;
}

.health-warning-body {
  color: var(--text-dark);
  font-size: 0.95rem;
  line-height: 1.7;
  margin: 0 0 22px;
}

.health-warning-terms {
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin-bottom: 20px;
}

.health-warning-terms h4,
.health-warning-reword h4 {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lavender-dark);
  margin: 0 0 12px;
}

.health-warning-field-group { margin-bottom: 14px; }
.health-warning-field-group:last-child { margin-bottom: 0; }

.health-warning-field-group h5 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 6px;
}

.health-warning-terms-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.health-warning-terms-list li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-dark);
}

.health-warning-lang-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--lavender-dark);
  background: rgba(161, 126, 180, 0.14);
  border-radius: 6px;
  padding: 1px 6px;
}

.health-warning-context mark {
  background: rgba(201, 154, 69, 0.28);
  color: var(--text-dark);
  border-radius: 3px;
  padding: 0 2px;
}

.health-warning-reword { margin-bottom: 22px; }
.health-warning-reword ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.health-warning-reword li {
  font-size: 0.88rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}
.health-warning-reword-from { color: var(--text-muted); }
.health-warning-reword-arrow { color: var(--gold); }
.health-warning-reword-to { color: var(--text-dark); font-weight: 600; }

.health-warning-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.health-warning-actions .btn { flex: 1 1 auto; }

.health-warning-field-highlight {
  outline: 2px solid var(--gold) !important;
  outline-offset: 2px;
  transition: outline-color 0.3s ease;
}

@media (max-width: 720px) {
  .health-warning-modal { padding: 22px; }
  .health-warning-actions { flex-direction: column; }
}

/* ---------- Avviso permanente "regole di contenuto" nei form professionista ---------- */
.content-rules-notice {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--lavender-dark);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-bottom: 24px;
}
.content-rules-notice h3 {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lavender-dark);
  margin: 0 0 8px;
}
.content-rules-notice p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-dark);
  margin: 0;
}

.field-risk-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.disclaimer-line {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 10px;
  font-style: italic;
}

.terms-checkbox-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px;
}
.terms-checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--lavender-dark);
  cursor: pointer;
}
.terms-checkbox-label span {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-muted);
}
.terms-checkbox-label a { color: var(--lavender-dark); }
