@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600&family=Inter:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --amber:   #E8931A;
  --amber-light: #F5B84A;
  --amber-pale:  #FEF3DC;
  --amber-dark:  #B86D0A;
  --yellow:  #F7D96B;
  --cream:   #FFFBF2;
  --dark:    #1C1508;
  --mid:     #5C4A1E;
  --muted:   #8A7040;
  --white:   #FFFFFF;
  --border:  #E8D9B0;
  --radius:  12px;
  --radius-lg: 20px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--cream);
  color: var(--dark);
  line-height: 1.7;
}

/* ── NAV ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 251, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--amber-dark);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--mid);
  letter-spacing: 0.02em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--amber); }

/* ── NAV: hamburger (mobile) ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 24px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--dark);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.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); }

@media (max-width: 700px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
    background: var(--cream);
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a { font-size: 0.95rem; }
}

/* ── HERO ── */
.hero {
  padding: 7rem 2rem 5rem;
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  background: var(--amber-pale);
  border: 1px solid var(--amber-light);
  border-radius: 999px;
  padding: 0.3rem 1rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--dark);
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--amber);
}

.hero p {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
}

.hero-cta {
  display: inline-block;
  background: var(--amber);
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
}
.hero-cta:hover { background: var(--amber-dark); transform: translateY(-1px); }

/* ── QUICK FILTER ── */
.quick-filter {
  max-width: 700px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
}

.quick-filter h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 600;
  color: var(--dark);
  margin: 0.75rem 0 0.5rem;
}

.quick-filter-inner > p {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 300;
  margin-bottom: 2rem;
}

.filter-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: 1rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  text-align: left;
}

.filter-group label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-group select {
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--dark);
  background: var(--cream);
  outline: none;
  min-width: 200px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.filter-group select:focus { border-color: var(--amber); }

.filter-submit {
  background: var(--amber);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: 0.75rem 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.filter-submit:hover { background: var(--amber-dark); transform: translateY(-1px); }

.filter-no-results {
  display: none;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.filter-no-results a {
  color: var(--amber);
  font-weight: 500;
}

@media (max-width: 600px) {
  .filter-form { flex-direction: column; align-items: stretch; }
  .filter-group select { min-width: 0; width: 100%; }
}

/* ── QUOTE ── */
.quote-section {
  max-width: 680px;
  margin: 0 auto;
  padding: 4rem 2rem;
  text-align: center;
  border: none;
}

.quote-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 400;
  font-style: italic;
  color: var(--mid);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  position: relative;
}

.quote-text::before {
  content: '\201C';
  font-size: 4rem;
  color: var(--amber-light);
  line-height: 0;
  vertical-align: -0.55em;
  margin-right: 0.15em;
  font-style: normal;
}

.quote-author {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  font-style: normal;
}

.quote-author::before { content: '\2014\00A0'; }

/* ── DIVIDER ── */
.section-divider {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem;
  border: none;
  border-top: 1px solid var(--border);
}

/* ── TUTORS SECTION ── */
.tutors {
  max-width: 900px;
  margin: 0 auto;
  padding: 5rem 2rem 6rem;
}

.tutors-heading {
  text-align: center;
  margin-bottom: 4rem;
}

.tutors-heading h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.tutors-heading p {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 300;
}

/* ── TUTOR CARD ── */
.tutor-card {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 3rem;
  align-items: center;
  padding: 2.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--white);
  margin-bottom: 2.5rem;
  transition: box-shadow 0.25s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}

.tutor-card:hover {
  box-shadow: 0 8px 32px rgba(232, 147, 26, 0.12);
  transform: translateY(-3px);
}

.tutor-card.reverse { grid-template-columns: 1fr 220px; }
.tutor-card.reverse .tutor-image { order: 2; }
.tutor-card.reverse .tutor-info  { order: 1; }

.tutor-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.avatar-circle {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--amber-pale);
  border: 2px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.avatar-circle svg {
  width: 120px;
  height: 130px;
  display: block;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.tutor-name-badge {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-dark);
  background: var(--amber-pale);
  border: 1px solid var(--amber-light);
  border-radius: 999px;
  padding: 0.25rem 0.85rem;
}

.tutor-info h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.35rem;
}

.tutor-info .role {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--amber);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.tutor-info p {
  font-size: 0.95rem;
  color: var(--mid);
  margin-bottom: 1.25rem;
  font-weight: 300;
  line-height: 1.75;
}

.subject-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--amber-dark);
  background: var(--amber-pale);
  border: 1px solid var(--amber-light);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
}

.card-link-hint {
  font-size: 0.82rem;
  color: var(--amber);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.card-link-hint::after { content: '\2192'; }

/* ── FOOTER ── */
footer {
  background: var(--dark);
  color: rgba(255,255,255,0.65);
  padding: 3.5rem 2rem 2rem;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 2rem;
}

.footer-brand .logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--yellow);
  margin-bottom: 0.75rem;
}

.footer-brand p { font-size: 0.875rem; line-height: 1.7; }

.footer-col h4 {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1rem;
}

.footer-col ul { list-style: none; }
.footer-col ul li { font-size: 0.875rem; margin-bottom: 0.5rem; }
.footer-col ul li a { color: rgba(255,255,255,0.65); text-decoration: none; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--yellow); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* ── DETAIL PAGE ── */
.detail-hero {
  background: linear-gradient(135deg, var(--amber-pale) 0%, var(--cream) 60%);
  padding: 5rem 2rem 4rem;
  border-bottom: 1px solid var(--border);
}

.detail-hero-inner {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 3rem;
  align-items: center;
}

.detail-avatar {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--border);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.detail-avatar svg { width: 130px; height: 140px; }

.detail-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.detail-hero-text .back-link {
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 1rem;
  transition: color 0.2s;
}
.detail-hero-text .back-link:hover { color: var(--amber); }
.detail-hero-text .back-link::before { content: '\2190'; }

.detail-hero-text h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.3rem;
}

.detail-hero-text .role {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
}

.detail-hero-text p {
  color: var(--mid);
  font-size: 0.95rem;
  font-weight: 300;
  max-width: 500px;
}

.detail-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.detail-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}

.detail-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.detail-card ul { list-style: none; }
.detail-card ul li {
  font-size: 0.9rem;
  color: var(--mid);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--amber-pale);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.detail-card ul li:last-child { border-bottom: none; }
.detail-card ul li::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); flex-shrink: 0; }

.detail-card.full { grid-column: 1 / -1; }

.contact-cta {
  text-align: center;
  padding: 3rem 2rem;
  background: var(--amber-pale);
  border-top: 1px solid var(--border);
}

.contact-cta p {
  color: var(--mid);
  margin-bottom: 1.25rem;
  font-weight: 300;
}

/* ── CONTATTI ICONE ── */
.contact-methods {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.contact-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--white);
  border: 1px solid var(--amber-light);
  color: var(--amber-dark);
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.6rem 1.15rem;
  border-radius: 999px;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}

.contact-pill svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.contact-pill:hover {
  background: var(--amber-pale);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(232, 147, 26, 0.18);
}

.btn-primary {
  display: inline-block;
  background: var(--amber);
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.8rem 2rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
  transition: background 0.2s, transform 0.15s;
}
.btn-primary:hover { background: var(--amber-dark); transform: translateY(-1px); }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .hero { padding: 3.5rem 1.25rem 3rem; }
  .quick-filter { padding: 2.5rem 1.25rem; }
  .filter-form { padding: 1.25rem; }
  .tutor-card, .tutor-card.reverse {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .tutor-card.reverse .tutor-image,
  .tutor-card.reverse .tutor-info { order: unset; }
  .subject-tags { justify-content: center; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .detail-hero-inner { grid-template-columns: 1fr; text-align: center; }
  .detail-body { grid-template-columns: 1fr; }
  .detail-card.full { grid-column: 1; }
  .detail-avatar { margin: 0 auto; }
}