/* ============================================================
   Simona Cocco — Psicoterapeuta a Cagliari
   Stile "Sereno": colonna stretta centrata, gradiente celeste,
   accento blu, titoli serif (Lora). Mobile-first.
   ============================================================ */

/* Font self-hostato (niente CDN → GDPR-clean). Variabile 400–700. */
@font-face {
  font-family: 'Lora';
  src: url('assets/fonts/lora.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent:   #2563eb;
  --accent-d: #1d4ed8;
  --ink:      #1f3a5f;  /* blu profondo, testo titoli */
  --text:     #45586e;  /* corpo */
  --muted:    #6b7e92;
  --line:     #d8e4f3;
  --card:     #ffffff;
  --heading:  'Lora', Georgia, 'Times New Roman', serif;
  --body:     Arial, Helvetica, system-ui, sans-serif;
  --shadow:   0 10px 30px rgba(31, 58, 95, 0.10);
  --radius:   20px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  background: linear-gradient(170deg, #dfeaf8 0%, #eaf2fb 40%, #f4f8fd 100%);
  background-attachment: fixed;
}

img { max-width: 100%; display: block; }

a { color: var(--accent-d); }

/* Colonna centrata stretta */
.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 22px 56px;
}

/* ---------- Header ---------- */
.site-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 26px 2px 6px;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}
.brand {
  font-family: var(--heading);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 30px 0 8px; }
.portrait {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 22px;
  box-shadow: var(--shadow);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .74rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 12px;
}
.headline {
  font-family: var(--heading);
  font-weight: 600;
  color: var(--ink);
  font-size: 1.95rem;
  line-height: 1.2;
  margin: 0 auto 16px;
  max-width: 16ch;
}
.lede {
  color: var(--muted);
  margin: 0 auto;
  max-width: 34ch;
}

/* ---------- Bottoni ---------- */
.cta-block { text-align: center; padding: 26px 0 6px; }
.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.02rem;
  padding: 15px 30px;
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.30);
  transition: transform .15s ease, background-color .15s ease;
}
.btn-primary:hover { background: var(--accent-d); transform: translateY(-1px); }
.btn-primary.small { font-size: .95rem; padding: 13px 26px; }

/* ---------- Chips (aree) ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  padding: 24px 0 4px;
}
.chip {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: .86rem;
  font-weight: 600;
  padding: 8px 15px;
  border-radius: 999px;
}

/* ---------- Card "Chi sono" ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 24px;
  margin-top: 30px;
}
.card-title {
  /* nel design questo titolo è sans, per contrasto con i serif */
  font-family: var(--body);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 12px;
}
.bio-text { margin: 0; color: var(--text); }
.bio-more { margin-top: 13px; }
.bio-more > * + * { margin-top: 13px; }
.bio-sub { margin: 0; font-weight: 700; color: var(--ink); }
.bio-list { margin: 0; padding-left: 1.15em; color: var(--text); }
.bio-list li { margin-top: 7px; }
.bio-cred { font-size: .92rem; color: var(--muted); }

/* Bio espandibile (native <details>) */
.more { margin-top: 6px; }
.more summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--accent-d);
  font-weight: 700;
  font-size: .92rem;
}
.more summary::-webkit-details-marker { display: none; }
.readmore::after { content: "Leggi tutto ▾"; }
.more[open] .readmore::after { content: "Mostra meno ▴"; }

/* ---------- Dove ricevo ---------- */
.block { margin-top: 34px; }
.block-title {
  font-family: var(--heading);
  font-weight: 600;
  font-size: 1.4rem;
  color: var(--ink);
  margin: 0 0 16px;
}
.rows { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 13px; align-items: flex-start; }
.row-ic {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 7px;
  flex: 0 0 auto;
}
.row-t { font-weight: 700; color: var(--ink); }
.row-s { color: var(--muted); font-size: .95rem; }
.map-link { color: var(--accent-d); text-decoration: underline; text-underline-offset: 2px; }
.map-link:hover { color: var(--accent); }
.map-embed {
  margin-top: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  line-height: 0;
}
.map-embed iframe { display: block; width: 100%; }

/* ---------- Contatti ---------- */
.contacts { margin-top: 34px; text-align: center; }
.contacts-q { color: var(--muted); margin: 0 0 12px; }
.contact-link {
  display: inline-block;
  font-family: var(--heading);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  margin: 2px 12px;
}
.contact-link:hover { color: var(--accent-d); }

/* ---------- Prenota (calendario MioDottore) ---------- */
.booking {
  margin-top: 42px;
  text-align: center;
  scroll-margin-top: 18px;
  /* esce dalla colonna stretta e si centra: più larghezza per il calendario */
  width: min(92vw, 820px);
  margin-left: 50%;
  transform: translateX(-50%);
}
.booking-intro { color: var(--muted); margin: 0 0 18px; }
.booking-widget {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  min-height: 220px;          /* riserva spazio: riduce il salto durante il caricamento */
  overflow: hidden;
}
/* Messaggio di attesa: il calendario (sfondo bianco) lo copre quando si carica */
.booking-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .95rem;
}
/* Finché il widget non si carica (o se è bloccato), il link di fallback è un bottone */
.booking-widget > .zl-url {
  display: inline-block;
  margin: 70px auto;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 999px;
}

/* ---------- Footer ---------- */
.site-foot { text-align: center; margin-top: 40px; }
.foot-meta {
  margin: 20px 0 0;
  font-size: .82rem;
  color: var(--muted);
}
.foot-meta a { color: var(--muted); }
.foot-legal {
  margin: 8px 0 0;
  font-size: .78rem;
  color: var(--muted);
}
.foot-legal a { color: var(--muted); text-decoration: underline; }
.foot-legal a:hover { color: var(--accent); }

/* ============================================================
   Schermi più grandi: la colonna resta centrata, type un filo più ampio
   ============================================================ */
@media (min-width: 620px) {
  .page { max-width: 600px; padding-bottom: 72px; }
  .headline { font-size: 2.25rem; }
  .hero { padding-top: 40px; }
}

/* ============================================================
   Desktop (≥900px): layout a due colonne, look più pieno.
   Il mobile resta invariato.
   ============================================================ */
@media (min-width: 900px) {
  .page { max-width: 1080px; padding: 0 40px 80px; }

  /* Hero affiancato: foto a sinistra, testo a destra */
  .hero {
    display: grid;
    grid-template-columns: minmax(240px, 300px) 1fr;
    align-items: center;
    gap: 50px;
    text-align: left;
    padding: 56px 0 20px;
  }
  .portrait { width: 260px; height: 260px; margin: 0; }
  .eyebrow { margin-bottom: 14px; }
  .headline { font-size: 2.9rem; max-width: 18ch; margin: 0 0 18px; }
  .lede { font-size: 1.08rem; max-width: 50ch; margin: 0; }

  .cta-block { text-align: left; padding: 22px 0 6px; }
  .chips { justify-content: flex-start; padding: 28px 0 4px; }

  /* "Chi sono" + "Dove ricevo" affiancate */
  .cols-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
    margin-top: 36px;
  }
  .cols-2 > .card,
  .cols-2 > .block { margin-top: 0; }

  /* Tocco decorativo: leggero "lift" al passaggio del mouse */
  .card, .map-embed { transition: transform .18s ease, box-shadow .18s ease; }
  .card:hover, .map-embed:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(31, 58, 95, 0.14);
  }

  /* Più respiro tra le sezioni finali */
  .contacts { margin-top: 56px; }
  .booking  { margin-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-primary, .card, .map-embed { transition: none; }
}
