/* ===== VARIABLES ===== */
:root {
  --bg: #FDF6F0;
  --bg-alt: #F0E8DE;
  --accent: #3D7050;
  --accent-dark: #2A5238;
  --accent-light: #E4F0E8;
  --peach: #C97B6E;
  --peach-light: #FAF0EE;
  --text: #2D1F17;
  --text-muted: #6B5B52;
  --white: #FFFFFF;
  --shadow-sm: 0 2px 12px rgba(45, 31, 23, 0.07);
  --shadow-md: 0 6px 24px rgba(45, 31, 23, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --navbar-h: 68px;
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-h);
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1rem;
}

h1, h2, h3 { font-family: 'Nunito', system-ui, sans-serif; line-height: 1.2; }

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

img { max-width: 100%; display: block; }

/* ===== LAYOUT ===== */
.container { max-width: 900px; margin: 0 auto; padding: 0 1.5rem; }

.section { padding: 5rem 0; }

.section--alt { background: var(--bg-alt); }

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2.5rem;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 4px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 8px;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
  border: none;
  cursor: pointer;
}

.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); }

.btn-secondary { background: var(--white); color: var(--accent); border: 2px solid var(--accent); }
.btn-secondary:hover { background: var(--accent-light); }

/* ===== ICONS ===== */
.icon-sm { width: 20px; height: 20px; flex-shrink: 0; }
.icon-xs { width: 16px; height: 16px; flex-shrink: 0; }

/* ===== NAVBAR ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--navbar-h);
  background: rgba(253, 246, 240, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(45, 31, 23, 0.08);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.navbar-brand {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  flex-shrink: 0;
}

.navbar-brand span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-toggle-input { display: none; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.hamburger:hover { background: var(--bg-alt); }

.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-link {
  font-family: 'Nunito', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover { color: var(--text); background: var(--bg-alt); }

.nav-cta {
  background: var(--accent);
  color: var(--white) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  margin-left: 0.5rem;
  transition: background 0.15s !important;
}

.nav-cta:hover { background: var(--accent-dark) !important; }

/* ===== HERO ===== */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(135deg, var(--bg) 0%, #F5E6D8 55%, #EDD5C5 100%);
  min-height: calc(88vh - var(--navbar-h));
  display: flex;
  align-items: center;
}

.hero-inner {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: center;
}

.hero-subtitle {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

.hero-name {
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
}

.hero-location {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.hero-location .icon-sm { color: var(--peach); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-photo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.photo-wrapper {
  position: relative;
  width: min(280px, 100%);
}

.photo-wrapper::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: conic-gradient(var(--peach), var(--accent), var(--peach));
  opacity: 0.35;
  z-index: 0;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center 20%;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  border: 5px solid var(--white);
  box-shadow: var(--shadow-md);
}

/* ===== CHI SONO ===== */
.about-card p + p { margin-top: 1rem; }

/* ===== ORARI ===== */
.orari-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.card-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.card-address {
  display: flex;
  align-items: flex-start;
  gap: 0.3rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.card-address .icon-xs { color: var(--peach); margin-top: 3px; }

.card-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 1.25rem;
}

.card-note--info {
  font-style: normal;
  background: var(--accent-light);
  color: var(--accent-dark);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-top: 1rem;
  margin-bottom: 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
}

.schedule-table th {
  text-align: left;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.4rem 0.5rem 0.4rem 0;
  border-bottom: 2px solid var(--bg-alt);
}

.schedule-table td {
  padding: 0.55rem 0.5rem 0.55rem 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--bg);
}

.schedule-table tbody tr:last-child td { border-bottom: none; }

.schedule-table tbody tr:hover td { background: var(--peach-light); }

.schedule-table th:last-child {
  text-align: right;
  padding-right: 0;
  font-weight: 800;
}

.schedule-table td:last-child {
  font-weight: 700;
  color: var(--accent-dark);
  text-align: right;
  padding-right: 0;
}

.reperibilita-block {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--bg);
}

.reperibilita-block:last-of-type { border-bottom: none; }

.reperibilita-urgenze {
  background: var(--peach-light);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem !important;
  border-bottom: none !important;
  margin-bottom: 0.5rem;
}

.reperibilita-label {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.reperibilita-urgenze .reperibilita-label { color: #9B4C42; }

.reperibilita-days { font-size: 0.875rem; color: var(--text-muted); }

.reperibilita-time { font-weight: 700; font-size: 1rem; color: var(--text); }

.reperibilita-urgenze .reperibilita-time { color: #9B4C42; }

.reperibilita-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

/* ===== CONTATTI ===== */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}

a.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg { width: 22px; height: 22px; }

.contact-icon--whatsapp { background: #DCF8C6; color: #1A8A3A; }

.contact-info { display: flex; flex-direction: column; min-width: 0; }

.contact-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}

.contact-value {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  word-break: break-word;
}

.miodottore-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

.miodottore-card--solo {
  grid-template-columns: 1fr;
}

.miodottore-text h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.miodottore-text p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.miodottore-note { font-size: 0.85rem !important; font-style: italic; margin-bottom: 1.25rem !important; }

.qr-placeholder {
  width: 140px;
  height: 140px;
  border: 2px dashed var(--accent-light);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.75rem;
}

.qr-placeholder svg { width: 40px; height: 40px; color: var(--accent-light); }

.qr-placeholder p { font-size: 0.7rem; line-height: 1.3; }

.qr-note { font-size: 0.65rem !important; color: var(--peach) !important; font-style: italic; }

.qr-image {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-alt);
}

/* ===== FOOTER ===== */
.footer {
  background: #231610;
  color: rgba(253, 246, 240, 0.65);
  padding: 2.5rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
}

.footer-name {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--bg);
}

.footer-sub { font-size: 0.85rem; color: rgba(164, 200, 175, 0.8); }

.footer-nav { display: flex; gap: 1.5rem; }

.footer-nav a {
  font-size: 0.875rem;
  font-weight: 600;
  transition: color 0.15s;
}

.footer-nav a:hover { color: var(--bg); }

.footer-copy { font-size: 0.78rem; }

/* ===== RESPONSIVE: tablet ===== */
@media (max-width: 768px) {

  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--navbar-h);
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.5rem 1.5rem;
    box-shadow: 0 8px 24px rgba(45, 31, 23, 0.13);
    gap: 0.25rem;
    z-index: 200;
  }

  .nav-link { padding: 0.75rem 1rem; }

  .nav-cta { margin-left: 0; text-align: center; margin-top: 0.5rem; }

  .nav-toggle-input:checked ~ .nav-links { display: flex; }

  .nav-toggle-input:checked + .hamburger span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5.5px);
  }

  .nav-toggle-input:checked + .hamburger span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .nav-toggle-input:checked + .hamburger span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5.5px);
  }

  .hero { padding: 3rem 0 3rem; min-height: auto; }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-text { order: 2; }

  .hero-photo { order: 1; }

  .photo-wrapper { width: min(200px, 65vw); }

  .hero-location { justify-content: center; }

  .hero-actions { justify-content: center; }

  .orari-grid { grid-template-columns: 1fr; }

  .contacts-grid { grid-template-columns: 1fr; }

  .miodottore-card { grid-template-columns: 1fr; }

  .miodottore-qr { display: flex; justify-content: center; }

  .section-title { font-size: 1.7rem; }

  .section { padding: 3.5rem 0; }
}

/* ===== RESPONSIVE: mobile ===== */
@media (max-width: 480px) {
  .hero-name { font-size: 2rem; }

  .hero-actions { flex-direction: column; align-items: center; }

  .btn { width: 100%; max-width: 280px; text-align: center; }

  .reperibilita-row { grid-template-columns: 1fr; }

  .card { padding: 1.5rem; }
}
