/* ============================================
   IL LABORATORIO DEL TEMPO — STYLE SYSTEM
   Palette: Oro (#C9A84C, #D4AF37), Avorio (#F5F0E8, #FAF7F0), Nero (#0A0A0A, #1A1A1A)
   ============================================ */

/* ── CSS Variables ── */
:root {
  /* Gold palette */
  --gold:         #C9A84C;
  --gold-light:   #D4AF37;
  --gold-bright:  #E8C860;
  --gold-pale:    #F0DCA0;
  --gold-dark:    #9E7E2E;

  /* Neutrals */
  --ivory:        #F5F0E8;
  --ivory-light:  #FAF7F0;
  --ivory-warm:   #EDE5D8;
  --cream:        #FFF8EE;

  --black:        #0A0A0A;
  --black-soft:   #1A1A1A;
  --charcoal:     #2A2A2A;
  --gray-dark:    #3A3A3A;
  --gray:         #6A6A6A;
  --gray-light:   #9A9A9A;

  /* Functional */
  --text-dark:    #1A1A1A;
  --text-light:   #F5F0E8;
  --text-muted:   #8A8A7A;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Lato', 'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --section-py:   clamp(4rem, 10vw, 8rem);
  --container:    1200px;

  /* Transitions */
  --ease-out:     cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-smooth:  cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--ivory-light);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s var(--ease-out);
}

ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}


/* =============================================
   NAVBAR
   ============================================= */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1.25rem 0;
  transition: all 0.4s var(--ease-smooth);
}

.navbar.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.75rem 0;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-accent {
  font-style: italic;
  color: var(--gold-light);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ivory);
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.4s var(--ease-out);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--gold);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--gold);
  transition: all 0.3s var(--ease-out);
  transform-origin: center;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--black);
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(201, 168, 76, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 70% 30%, rgba(201, 168, 76, 0.05) 0%, transparent 50%),
    linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 50%, rgba(0,0,0,0.5) 100%);
  z-index: 1;
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 8s infinite;
}

@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translateY(100vh) scale(0);
  }
  10% {
    opacity: 0.6;
  }
  90% {
    opacity: 0.2;
  }
  100% {
    opacity: 0;
    transform: translateY(-10vh) scale(1);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2rem;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.75rem, 1.5vw, 0.95rem);
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 700;
  color: var(--ivory);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.hero-title .accent {
  font-style: italic;
  color: var(--gold);
  display: block;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  font-style: italic;
  color: var(--gold-pale);
  margin-bottom: 2rem;
}

.hero-desc {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: var(--gray-light);
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

/* CTA Button */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border: none;
  cursor: pointer;
  transition: all 0.4s var(--ease-out);
}

.btn-primary {
  padding: 1rem 2.5rem;
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-out);
  z-index: -1;
}

.btn-primary:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

.btn-primary:hover {
  color: var(--black);
}

/* Scroll indicator */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.hero-scroll span {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gold);
  opacity: 0.6;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(1); }
  50%      { opacity: 1;   transform: scaleY(1.3); }
}


/* =============================================
   SECTIONS — Common
   ============================================= */
.section {
  padding: var(--section-py) 0;
}

.section--light {
  background: var(--ivory-light);
  color: var(--text-dark);
}

.section--dark {
  background: var(--black-soft);
  color: var(--text-light);
}

.section-header {
  text-align: center;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 600;
  line-height: 1.2;
}

.section--dark .section-title {
  color: var(--ivory);
}

.title-decoration {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.title-decoration span:nth-child(1),
.title-decoration span:nth-child(3) {
  width: 40px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}

.title-decoration span:nth-child(2) {
  width: 8px;
  height: 8px;
  border: 1px solid var(--gold);
  transform: rotate(45deg);
}


/* =============================================
   CHI SIAMO
   ============================================= */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image-frame {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4 / 5;
  background: var(--ivory-warm);
}

.about-image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.about-image:hover .about-image-frame img {
  transform: scale(1.03);
}

/* Golden corners */
.image-corner {
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: var(--gold);
  border-style: solid;
}
.image-corner.tl { top: -6px; left: -6px;  border-width: 2px 0 0 2px; }
.image-corner.tr { top: -6px; right: -6px; border-width: 2px 2px 0 0; }
.image-corner.bl { bottom: -6px; left: -6px;  border-width: 0 0 2px 2px; }
.image-corner.br { bottom: -6px; right: -6px; border-width: 0 2px 2px 0; }

.about-badge {
  position: absolute;
  bottom: -1rem;
  right: -1rem;
  background: var(--gold);
  color: var(--black);
  padding: 1.25rem 1.5rem;
  text-align: center;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.badge-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
}

.badge-text {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.about-content h3 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  margin-bottom: 1.5rem;
  color: var(--charcoal);
}

.about-content p {
  color: var(--gray);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.about-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--ivory-warm);
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-dark);
  line-height: 1.2;
}

.stat-number::after {
  content: '+';
  font-size: 1.2rem;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gray);
}


/* =============================================
   SERVIZI
   ============================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.service-card {
  background: var(--charcoal);
  border: 1px solid rgba(201, 168, 76, 0.12);
  border-radius: 6px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  transition: all 0.5s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: scaleX(0);
  transition: transform 0.5s var(--ease-out);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  border-color: rgba(201, 168, 76, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-icon {
  width: 56px;
  height: 56px;
  color: var(--gold);
  margin-bottom: 1.5rem;
  transition: transform 0.4s var(--ease-out);
}

.service-card:hover .service-icon {
  transform: scale(1.1);
}

.service-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ivory);
  margin-bottom: 0.75rem;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--gray-light);
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.service-features {
  list-style: none;
}

.service-features li {
  font-size: 0.82rem;
  color: var(--gray-light);
  padding: 0.35rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.service-features li::before {
  content: '✦';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 0.55rem;
  top: 0.5rem;
}


/* =============================================
   GALLERIA
   ============================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 1;
  cursor: pointer;
  background: var(--ivory-warm);
}

.gallery-item--wide {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.2) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.gallery-overlay p {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--ivory);
}


/* =============================================
   CONTATTI
   ============================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.contact-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-content: start;
}

.contact-card {
  background: var(--charcoal);
  border: 1px solid rgba(201, 168, 76, 0.1);
  border-radius: 6px;
  padding: 1.5rem;
  transition: border-color 0.3s var(--ease-out);
}

.contact-card:hover {
  border-color: rgba(201, 168, 76, 0.3);
}

.contact-icon {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.contact-card h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ivory);
  margin-bottom: 0.5rem;
}

.contact-card p {
  font-size: 0.85rem;
  color: var(--gray-light);
  line-height: 1.6;
}

.contact-card a {
  color: var(--gold);
}

.contact-card a:hover {
  color: var(--gold-bright);
}

/* Form */
.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

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

.form-group--full {
  grid-column: 1 / -1;
}

.contact-form label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  background: var(--charcoal);
  border: 1px solid rgba(201, 168, 76, 0.15);
  color: var(--ivory);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.85rem 1rem;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--gray);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23C9A84C' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}

.contact-form .btn-primary {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 0.5rem;
}


/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--black);
  color: var(--gray-light);
  padding: 4rem 0 0;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--gray-light);
}

.footer-tagline {
  margin-top: 0.5rem;
  font-style: italic;
  color: var(--gold-pale) !important;
  opacity: 0.7;
}

.footer h4 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--ivory);
  margin-bottom: 1.25rem;
}

.footer-links ul li {
  margin-bottom: 0.6rem;
}

.footer-links ul li a {
  font-size: 0.85rem;
  color: var(--gray-light);
  transition: color 0.3s var(--ease-out), padding-left 0.3s var(--ease-out);
}

.footer-links ul li a:hover {
  color: var(--gold);
  padding-left: 0.5rem;
}

.footer-hours ul li {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.footer-address p {
  font-size: 0.85rem;
  line-height: 1.7;
}

.footer-phone {
  margin-top: 0.75rem;
  color: var(--gold) !important;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 1.5rem 0;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.78rem;
  color: var(--gray);
  letter-spacing: 0.05em;
}


/* =============================================
   REVEAL ANIMATIONS
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}


/* =============================================
   NAV ACTIVE STATE
   ============================================= */
.nav-links a.active {
  color: var(--gold);
}

.nav-links a.active::after {
  width: 100%;
}


/* =============================================
   PAGE HERO (subpages)
   ============================================= */
.page-hero {
  position: relative;
  padding: 10rem 0 5rem;
  text-align: center;
  background: var(--black);
  overflow: hidden;
}

.page-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(201, 168, 76, 0.1) 0%, transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.7) 100%);
}

.page-hero-content {
  position: relative;
  z-index: 1;
}

.page-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--ivory);
  line-height: 1.15;
  margin: 0.75rem 0 1.25rem;
}

.page-hero-title .accent {
  font-style: italic;
  color: var(--gold);
}

.page-hero-desc {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: var(--gray-light);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.8;
}


/* =============================================
   PRIMA E DOPO — Intro
   ============================================= */
.pd-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
}

.pd-intro-icon {
  width: 80px;
  height: 80px;
  color: var(--gold);
  margin: 0 auto 1.5rem;
}

.pd-intro h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.pd-intro p {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.8;
}


/* =============================================
   PRIMA E DOPO — Restauro Header
   ============================================= */
.restauro-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.restauro-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--gold);
  opacity: 0.3;
  line-height: 1;
  flex-shrink: 0;
}

.restauro-title {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 600;
}

.section--dark .restauro-title {
  color: var(--ivory);
}

.section--light .restauro-title {
  color: var(--charcoal);
}

.restauro-subtitle {
  font-size: 0.9rem;
  color: var(--gray-light);
  margin-top: 0.25rem;
}


/* =============================================
   PRIMA E DOPO — Before/After Slider
   ============================================= */
.ba-showcase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3rem);
  align-items: start;
}

.ba-slider {
  position: relative;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  cursor: col-resize;
  user-select: none;
  background: var(--charcoal);
  border: 1px solid rgba(201, 168, 76, 0.15);
}

.ba-image {
  position: absolute;
  inset: 0;
}

.ba-before {
  z-index: 1;
  clip-path: inset(0 50% 0 0);
}

.ba-after {
  z-index: 0;
}

.ba-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* SVG placeholder (shown when no real image loads) */
.ba-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.ba-placeholder--before {
  background:
    linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1f1f1f 100%);
  color: var(--gray);
}

.ba-placeholder--after {
  background:
    linear-gradient(135deg, #1a1a1a 0%, #2a2522 50%, #1a1a1a 100%);
  color: var(--gold);
}

.ba-image-placeholder svg {
  width: 80px;
  height: 80px;
  opacity: 0.6;
}

.ba-image-placeholder span {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  opacity: 0.5;
}

/* Labels */
.ba-label {
  position: absolute;
  bottom: 1rem;
  padding: 0.35rem 1rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  border-radius: 3px;
  z-index: 5;
  pointer-events: none;
}

.ba-label--before {
  left: 1rem;
  background: rgba(10, 10, 10, 0.8);
  color: var(--gray-light);
  border: 1px solid rgba(255,255,255,0.1);
}

.ba-label--after {
  right: 1rem;
  background: rgba(10, 10, 10, 0.8);
  color: var(--gold);
  border: 1px solid rgba(201, 168, 76, 0.3);
}

/* Handle */
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 3px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.ba-handle-line {
  flex: 1;
  width: 2px;
  background: var(--gold);
  opacity: 0.8;
}

.ba-handle-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.ba-handle-circle svg {
  width: 16px;
  height: 16px;
}


/* =============================================
   PRIMA E DOPO — Detail cards
   ============================================= */
.ba-details h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.section--dark .ba-details h3 {
  color: var(--ivory);
}

.section--light .ba-details h3 {
  color: var(--charcoal);
}

.ba-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.ba-detail-card {
  padding: 1.25rem;
  border-radius: 6px;
  border: 1px solid rgba(201, 168, 76, 0.1);
  transition: border-color 0.3s var(--ease-out);
}

.section--dark .ba-detail-card {
  background: var(--charcoal);
}

.section--light .ba-detail-card {
  background: var(--ivory-warm);
}

.ba-detail-card:hover {
  border-color: rgba(201, 168, 76, 0.35);
}

.ba-detail-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.ba-detail-card p {
  font-size: 0.85rem;
  line-height: 1.6;
}

.section--dark .ba-detail-card p {
  color: var(--gray-light);
}

.section--light .ba-detail-card p {
  color: var(--gray);
}


/* =============================================
   PRIMA E DOPO — CTA
   ============================================= */
.pd-cta {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 0;
}

.pd-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.pd-cta p {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.pd-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-outline {
  padding: 1rem 2.5rem;
  background: transparent;
  color: var(--gold-dark);
  border: 1px solid var(--gold-dark);
}

.btn-outline:hover {
  background: var(--gold-dark);
  color: var(--ivory);
}


/* =============================================
   RESPONSIVE
   ============================================= */

/* Tablet */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* Mobile */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    max-width: 320px;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2.5rem;
    transition: right 0.4s var(--ease-smooth);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1rem;
    letter-spacing: 0.2em;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .about-badge {
    right: 1rem;
    bottom: -0.75rem;
  }

  .about-stats {
    justify-content: space-around;
  }

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

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

  .gallery-item--wide {
    grid-column: span 2;
  }

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

  .contact-info {
    grid-template-columns: 1fr 1fr;
  }

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

  .form-group--full {
    grid-column: auto;
  }

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

  .ba-showcase {
    grid-template-columns: 1fr;
  }

  .ba-slider {
    aspect-ratio: 4 / 3;
  }

  .ba-detail-grid {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 8rem 1.5rem 3rem;
  }

  .restauro-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }

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

  .gallery-item--wide {
    grid-column: auto;
    aspect-ratio: 4 / 3;
  }

  .contact-info {
    grid-template-columns: 1fr;
  }

  .about-stats {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .pd-cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* iPhone SE / 375px */
@media (max-width: 375px) {
  .hero-title {
    font-size: 1.9rem;
  }

  .hero-desc {
    font-size: 0.85rem;
  }

  .hero-subtitle {
    font-size: 0.7rem;
    letter-spacing: 0.25em;
  }

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

  .contact-card {
    padding: 1rem;
  }

  .contact-card h4 {
    font-size: 0.9rem;
  }

  .about-badge {
    right: 0.5rem;
    bottom: -0.5rem;
    padding: 0.85rem 1rem;
  }

  .badge-number {
    font-size: 1.5rem;
  }

  .btn-primary {
    padding: 0.8rem 1.8rem;
    font-size: 0.75rem;
  }

  .page-hero-title {
    font-size: 2rem;
  }

  .ba-handle-circle {
    width: 32px;
    height: 32px;
  }

  .ba-handle-circle svg {
    width: 12px;
    height: 12px;
  }
}


/* =============================================
   SLIDER — Focus visible (keyboard navigation)
   ============================================= */
.ba-slider:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.ba-slider:focus:not(:focus-visible) {
  outline: none;
}


/* =============================================
   UPLOAD PROGRESS BAR
   ============================================= */
.upload-progress {
  width: 100%;
  height: 4px;
  background: rgba(201, 168, 76, 0.15);
  border-radius: 2px;
  margin-top: 0.5rem;
  overflow: hidden;
  display: none;
}

.upload-progress.active {
  display: block;
}

.upload-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-bright));
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease-out;
}

.upload-progress-bar.indeterminate {
  width: 30%;
  animation: progressIndeterminate 1.5s ease-in-out infinite;
}

@keyframes progressIndeterminate {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(400%); }
}


/* === COMPONENTS === */

/* Footer social links */
.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 50%;
  color: var(--gray-light);
  transition: all 0.3s var(--ease-out);
}

.footer-social a:hover {
  color: var(--gold);
  border-color: var(--gold);
  transform: translateY(-2px);
}

/* Footer phone link */
.footer-phone a {
  color: var(--gold);
  transition: color 0.3s var(--ease-out);
}

.footer-phone a:hover {
  color: var(--gold-bright);
}


/* === CONTATTI PAGE === */

/* Intro text */
.contatti-intro {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(3rem, 6vw, 5rem);
}

.contatti-intro p {
  font-size: 0.95rem;
  color: var(--gray);
  line-height: 1.8;
}

/* Grid: info + form side by side */
.contatti-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* Info column */
.contatti-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contatti-address-block {
  font-style: normal;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.contatti-address-block .contact-card {
  background: var(--ivory-warm);
  border: 1px solid rgba(201, 168, 76, 0.1);
  border-radius: 6px;
  padding: 1.5rem;
  transition: border-color 0.3s var(--ease-out);
}

.contatti-address-block .contact-card:hover {
  border-color: rgba(201, 168, 76, 0.3);
}

.contatti-address-block .contact-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.contatti-address-block .contact-card p {
  font-size: 0.85rem;
  color: var(--gray);
  line-height: 1.6;
}

.contatti-address-block .contact-card a {
  color: var(--gold-dark);
  transition: color 0.3s var(--ease-out);
}

.contatti-address-block .contact-card a:hover {
  color: var(--gold);
}

/* Hours table */
.contatti-orari {
  margin-top: 0.5rem;
}

.contatti-orari h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--charcoal);
  margin-bottom: 1rem;
}

.orari-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.orari-table th {
  font-family: var(--font-body);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 2px solid rgba(201, 168, 76, 0.2);
}

.orari-table td {
  padding: 0.6rem 0.75rem;
  color: var(--gray);
  border-bottom: 1px solid var(--ivory-warm);
}

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

.orari-table .orari-chiuso td {
  color: var(--gray-light);
  font-style: italic;
}

/* Map embed */
.contatti-map {
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(201, 168, 76, 0.15);
}

.contatti-map iframe {
  display: block;
  width: 100%;
  min-height: 400px;
}


/* === CTA CONTATTI (index.html) === */

.contatti-cta {
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 0;
}

.contatti-cta .section-title {
  margin-top: 1rem;
}

.contatti-cta-desc {
  font-size: 1rem;
  color: var(--gray-light);
  line-height: 1.8;
  margin: clamp(1.5rem, 3vw, 2.5rem) 0;
}

.contatti-cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}


/* === CONTATTI RESPONSIVE === */

@media (max-width: 768px) {
  .contatti-grid {
    grid-template-columns: 1fr;
  }

  .contatti-cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}
