:root {
  /* Colori Primari - Ispirati dal salone */
  --color-primary-beige: #D4C5B0;
  --color-primary-oro: #C9A877;
  --color-primary-brown: #8B7355;
  --color-primary-dark: #4A4A4A;
  
  /* Colori Secondari */
  --color-secondary-white: #FFFFFF;
  --color-secondary-mauve: #C9A5A0;
  --color-secondary-beige-light: #E8DDCE;
  --color-secondary-gray: #F5F5F5;
  
  /* Colori Funzionali */
  --color-success: #7CB342;
  --color-warning: #F57C00;
  --color-error: #D32F2F;
  --color-info: #1976D2;
  
  /* Legacy variables per compatibilità */
  --bg: #F5F5F5;
  --surface: #FFFFFF;
  --text: #8B7355;
  --muted: #4A4A4A;
  --primary: #C9A877;
  --primary-dark: #B39467;
  --accent: #E8DDCE;
  --border: #E8DDCE;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;
  
  /* Typography */
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Lato', 'Segoe UI', sans-serif;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.15);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: var(--font-serif);
}

img {
  max-width: 100%;
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  background: var(--surface);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  height: 85px;
  width: auto;
  display: block;
}

.brand-text h1 {
  margin: 0;
  font-size: 1.4rem;
}

.brand-text p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.brand h1 {
  margin: 0;
  font-size: 1.4rem;
}

.brand p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.main-nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

/* Dropdown nav (admin submenu) */
.nav-dropdown {
  position: relative;
}
.nav-dropdown-toggle {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: .3rem;
}
.nav-dropdown-toggle::after {
  content: '▾';
  font-size: .7rem;
}
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + .5rem);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  min-width: 150px;
  z-index: 200;
  flex-direction: column;
  overflow: hidden;
}
.nav-dropdown.dropdown-open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.nav-dropdown-menu a:last-child { border-bottom: none; }
.nav-dropdown-menu a:hover { background: var(--accent); }

@media (max-width: 900px) {
  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
  .nav-dropdown-toggle::after { margin-left: auto; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    border-radius: 0;
    border-left: 3px solid var(--primary);
    background: var(--accent);
  }
  .nav-dropdown-menu a { padding-left: 1.75rem; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-secondary {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}

.hero-section {
  padding: 4rem 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--primary-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
}

.hero-content h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
}

.hero-content p {
  max-width: 42rem;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}


.hero-image {
  min-height: 380px;
  width: 100%;
  border-radius: 2rem;
  object-fit: cover;
  display: block;
}

.section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header small {
  display: block;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.6rem);
}

.section-header p {
  color: var(--muted);
  max-width: 720px;
  margin: 1rem auto 0;
}

.cards,
.gallery-grid,
.weekly-photos-grid,
.review-list,
.faq-list {
  display: grid;
  gap: 1.5rem;
}

.cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.weekly-photos-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.legend-item {
  padding: 0.6rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--text);
  border: 1px solid var(--border);
}

.legend-free {
  background: #eaf6ed;
  border-color: #c4e2c2;
}

.legend-busy {
  background: #fbe7e5;
  border-color: #f4beb8;
}

.legend-overlap {
  background: #fff0d1;
  border-color: #f2c77f;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.calendar-column {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
}

.calendar-column h4 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.calendar-slot {
  padding: 0.8rem 1rem;
  border-radius: 0.9rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  font-weight: 600;
}

.slot-free {
  background: #eaf6ed;
}

.slot-busy {
  background: #fbe7e5;
}

.slot-overlap {
  background: #fff0d1;
}

.collab-card,
.pending-card,
.faq-action-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 1.4rem;
  padding: 1.5rem;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.full-width {
  grid-column: 1 / -1;
}

.faq-action-card {
  margin-bottom: 2rem;
}

.faq-action-card label {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
}

.faq-action-card input,
.faq-action-card textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.9rem 1rem;
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .schedule-grid,
  .calendar-grid {
    grid-template-columns: 1fr;
  }
}

.service-card,
.gallery-item,
.review-card,
.faq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 1.5rem;
}

/* FAQ Accordion */
.faq-accordion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  overflow: hidden;
}
.faq-accordion-item {
  border-bottom: 1px solid var(--border);
}
.faq-accordion-item:last-child { border-bottom: none; }
.faq-accordion-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: none;
  border: none;
  padding: 1.1rem 1.5rem;
  cursor: pointer;
  font-size: .98rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text);
  text-align: left;
  gap: 1rem;
  transition: background .15s;
}
.faq-accordion-btn:hover { background: var(--accent); }
.faq-icon {
  font-size: 1.4rem;
  font-weight: 300;
  line-height: 1;
  flex-shrink: 0;
  color: var(--primary);
  transition: transform .25s;
}
.faq-accordion-item.open .faq-icon { transform: rotate(45deg); }
.faq-accordion-body {
  display: none;
  padding: 0 1.5rem 1.2rem;
  color: var(--muted);
  line-height: 1.7;
  font-size: .95rem;
}
.faq-accordion-item.open .faq-accordion-body { display: block; }

.service-card {
  overflow: hidden;
  padding: 0;
}

.service-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 1.2rem 1.2rem 0 0;
  display: block;
}

.service-card-body {
  padding: 1.5rem;
}

.service-card h3,
.review-card h3,
.faq-card h3 {
  margin-top: 0;
}

.service-card p,
.review-card p,
.faq-card p {
  color: var(--muted);
}

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 1rem 0 0;
  color: var(--primary-dark);
  font-size: 0.95rem;
}

.weekly-photo-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.weekly-photo-card:hover {
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.weekly-photo-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.weekly-photo-overlay {
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.weekly-photo-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: var(--secondary-white);
}

.weekly-photo-meta {
  flex: 1;
}

.weekly-photo-meta h4 {
  margin: 0 0 0.25rem 0;
  font-size: 1rem;
  color: var(--secondary-white);
}

.weekly-photo-meta p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

.weekly-photo-likes {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--color-success);
}

/* WhatsApp button — photo card (weekly + galleria) */
.wa-card-btn {
  position: absolute; top: .7rem; right: .7rem; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: #25D366; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.35);
  transition: transform .15s, background .15s;
  flex-shrink: 0;
}
.wa-card-btn:hover { background: #1da851; transform: scale(1.1); }
.wa-card-btn svg { width: 18px; height: 18px; fill: #fff; }

/* WhatsApp button — service card */
.wa-service-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: #25D366; flex-shrink: 0;
  transition: transform .15s, background .15s;
}
.wa-service-btn:hover { background: #1da851; transform: scale(1.1); }
.wa-service-btn svg { width: 18px; height: 18px; fill: #fff; }

.booking-section {
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.booking-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 2rem;
}

.booking-card {
  display: grid;
  gap: 1rem;
  background: var(--bg);
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 1.4rem;
}

.booking-card label {
  font-weight: 600;
}

.booking-card input,
.booking-card select,
.booking-card textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.95rem 1rem;
  font: inherit;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.contact-details {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  color: var(--muted);
}

.contact-details li {
  margin-bottom: 0.65rem;
}

/* Authentication Forms */
.auth-container {
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.2rem;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  margin: 0 0 0.5rem 0;
  color: var(--color-primary-brown);
  font-size: 2rem;
}

.auth-header p {
  color: var(--muted);
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--color-primary-brown);
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.9rem 1rem;
  border: 2px solid var(--color-secondary-beige-light);
  border-radius: 0.5rem;
  font: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary-oro);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.forgot-password,
.auth-link {
  color: var(--color-primary-oro);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.forgot-password:hover,
.auth-link:hover {
  text-decoration: underline;
}

.btn-full {
  width: 100%;
  padding: 1rem;
  font-size: 1rem;
  font-weight: 700;
}

.auth-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.auth-footer p {
  color: var(--muted);
  margin: 0;
}

.password-wrapper {
  position: relative;
}
.password-wrapper input {
  padding-right: 2.8rem;
  width: 100%;
  box-sizing: border-box;
}
.btn-eye {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  color: var(--muted);
  padding: 0;
  display: flex;
  align-items: center;
  line-height: 1;
}
.btn-eye:hover { color: var(--primary); }
.btn-eye svg { width: 20px; height: 20px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: var(--muted);
  font-size: .85rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  width: 100%;
  padding: .8rem 1rem;
  border: 1.5px solid #dadce0;
  border-radius: 8px;
  background: #fff;
  color: #3c4043;
  font-size: .95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, box-shadow .15s;
}
.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 1px 6px rgba(0,0,0,.12);
}

/* Verify Email Page */
.verify-section {
  padding: 4rem 0;
  min-height: 60vh;
  display: flex;
  align-items: center;
}

.verify-status {
  text-align: center;
}

.verify-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-secondary-beige-light);
  border-top: 4px solid var(--color-primary-oro);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.verify-success,
.verify-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.success-icon,
.error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.verify-success h3 {
  color: var(--color-success);
  margin: 0;
}

.verify-error h3 {
  color: var(--color-error);
  margin: 0;
}

.error-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.hidden {
  display: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .auth-container {
    margin: 1rem;
    padding: 1.5rem;
  }

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

  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .error-actions {
    flex-direction: column;
  }

  .btn-full {
    padding: 1.2rem;
  }
}

/* Auth Messages */
.auth-message {
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-message.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--color-error);
}

.auth-message.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--color-success);
}

.auth-message.info {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}

.auth-message .error-icon,
.auth-message .success-icon,
.auth-message .info-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.auth-message p {
  margin: 0;
  font-weight: 500;
}

.contact-form label {
  display: block;
  margin-bottom: 0.65rem;
  font-weight: 600;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.95rem 1rem;
  margin-bottom: 1rem;
}

.site-footer {
  background: var(--surface);
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.nav-reload {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  color: var(--text);
  padding: 6px 8px;
  line-height: 1;
  margin-left: 4px;
  align-items: center;
  gap: 4px;
}
.nav-reload .reload-label {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
}

@media (max-width: 900px) {
  .nav-reload { display: flex; }
}

/* ── Banner installazione PWA ── */
#pwa-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--primary-dark, #6b4c3b);
  color: #fff;
  padding: .9rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  z-index: 9999;
  box-shadow: 0 -2px 16px rgba(0,0,0,.25);
  font-size: .9rem;
  animation: slideUp .35s ease;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

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

.nav-burger.burger-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.burger-open span:nth-child(2) { opacity: 0; }
.nav-burger.burger-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
  }

  .brand-text p {
    display: none;
  }

  .nav-burger {
    display: flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-md);
    z-index: 100;
    gap: 0;
  }

  .main-nav.nav-open {
    display: flex;
  }

  .main-nav a {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
  }

  .site-header {
    position: relative;
  }
}

/* Hero Socials - specific styling if needed, currently uses footer-socials styles */
.hero-socials.footer-socials {
  margin-top: 1.5rem; /* Add some space below the hero actions */
  justify-content: flex-start; /* Allinea a sinistra nella Hero */
  /* Additional styling for hero-specific social icons can go here */
}


/* Social Links Footer */
.footer-socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.footer-socials svg {
  width: 24px;
  height: 24px;
  fill: var(--primary);
  transition: transform 0.2s, fill 0.2s;
}

.footer-socials a:hover svg {
  transform: scale(1.1);
  fill: var(--primary-dark);
}

@media (max-width: 650px) {
  .section {
    padding: 3rem 0;
  }

  .hero-content {
    gap: 1.5rem;
  }
}
