/* ════════════════════════════════════════════════════════════════
   RESTRUCTURA & DESIGN — Service Pages CSS
   Stili dedicati alle pagine di servizio dinamiche
════════════════════════════════════════════════════════════════ */

/* ── CSS Variables (fallback) ── */
:root {
  --pad: clamp(20px, 5vw, 60px);
  --s2: 0.5rem;
  --s3: 1rem;
  --s4: 1.5rem;
  --s5: 2rem;
  --s6: 3rem;
  --s8: 5rem;
  --espresso: #1C1410;
  --oro: #C8A96A;
  --oro-hover: #A8894A;
  --sfondo-chiaro: #F7F3ED;
  --bianco: #FFFFFF;
  --testo: #3d3d3d;
  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Inter', sans-serif;
  --ease: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ════════════════════════════════════════════════════════════════
   HERO SECTION
════════════════════════════════════════════════════════════════ */
.service-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  padding: 60px var(--pad) 80px;
  overflow: hidden;
}

.service-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.55);
  z-index: 0;
}

.service-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.2) 0%, rgba(28,20,16,0.7) 100%);
  z-index: 1;
}

.service-hero__content {
  position: relative;
  z-index: 2;
  color: var(--bianco);
}

.service-hero__breadcrumb {
  font-size: 0.875rem;
  margin-bottom: var(--s3);
  opacity: 0.9;
}

.service-hero__breadcrumb a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  transition: opacity var(--ease);
}

.service-hero__breadcrumb a:hover {
  opacity: 0.8;
}

.service-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: var(--s2);
  letter-spacing: -0.02em;
  color: var(--accent-secondary);
}

.service-hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 300;
  max-width: 600px;
  opacity: 0.95;
  line-height: 1.6;
  color: var(--bianco);
}

/* ════════════════════════════════════════════════════════════════
   MAIN CONTENT SECTION
════════════════════════════════════════════════════════════════ */
.service-main {
  padding: var(--s8) var(--pad);
  background: var(--sfondo-chiaro);
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s6);
  align-items: center;
}

@media (max-width: 768px) {
  .service-grid {
    grid-template-columns: 1fr;
    gap: var(--s5);
  }
}

/* ── Service Text Block ── */
.service-text-block h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--s3);
  color: var(--espresso);
  line-height: 1.2;
}

.service-text-block p {
  font-size: 1.0625rem;
  line-height: 1.7;
  margin-bottom: var(--s4);
  color: var(--testo);
}

/* ── Service Features List ── */
.service-features {
  list-style: none;
  padding: 0;
  margin: var(--s4) 0;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) 0;
  font-size: 1rem;
  color: var(--testo);
  line-height: 1.5;
}

.service-features i {
  color: var(--oro);
  font-size: 1.25rem;
  flex-shrink: 0;
}

/* ── Service Image Block ── */
.service-image-block {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 4px 24px rgba(28, 20, 16, 0.1);
}

.service-image-block img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.service-image-block:hover img {
  transform: scale(1.03);
}

/* ════════════════════════════════════════════════════════════════
   BUTTONS
════════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 14px 32px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--ease);
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--oro);
  color: var(--espresso);
}

.btn-primary:hover {
  background: var(--oro-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(200, 169, 106, 0.24);
}

.btn-text {
  color: var(--oro);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.btn-text:hover {
  transform: translateX(4px);
}

/* ════════════════════════════════════════════════════════════════
   RELATED SERVICES SECTION
════════════════════════════════════════════════════════════════ */
.related-services {
  padding: var(--s8) var(--pad);
  background: var(--bianco);
}

.related-services h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--s6);
  text-align: center;
  color: var(--espresso);
  line-height: 1.2;
}

.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--s5);
}

/* ── Service Card ── */
.service-card {
  padding: var(--s4);
  border: 1px solid #e0d4c0;
  border-radius: 8px;
  transition: all var(--ease);
  background: var(--sfondo-chiaro);
}

.service-card:hover {
  border-color: var(--oro);
  box-shadow: 0 8px 24px rgba(200, 169, 106, 0.12);
  transform: translateY(-4px);
}

.service-card__num {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--oro);
  margin-bottom: var(--s2);
  font-weight: 600;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: var(--s2);
  color: var(--espresso);
  line-height: 1.3;
}

.service-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--testo);
  margin-bottom: var(--s3);
}

/* ════════════════════════════════════════════════════════════════
   CONTACT SECTION
════════════════════════════════════════════════════════════════ */
.contact-section {
  padding: var(--s8) var(--pad);
  background: var(--sfondo-chiaro);
  color: var(--espresso);
  text-align: center;
}

.contact-section h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: var(--s6);
  line-height: 1.2;
  color: var(--espresso);
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--s4);
  margin-bottom: var(--s5);
}

.contact-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
}

.contact-item i {
  font-size: 1.75rem;
  color: var(--oro);
}

.contact-item p {
  margin: 0;
  font-size: 1rem;
  color: var(--testo);
}

.contact-item a {
  color: var(--espresso);
  text-decoration: none;
  border-bottom: 1px solid var(--oro);
  transition: all var(--ease);
}

.contact-item a:hover {
  color: var(--oro);
}

.contact-cta {
  font-size: 1.125rem;
  font-weight: 500;
  margin: 0;
  color: var(--testo);
}

/* Footer override removed — uses style.css white theme */

/* ════════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .service-hero {
    min-height: 50vh;
    padding: 40px var(--pad) 60px;
  }

  .service-main {
    padding: var(--s6) var(--pad);
  }

  .related-services {
    padding: var(--s6) var(--pad);
  }

  .contact-section {
    padding: var(--s6) var(--pad);
  }

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

/* ════════════════════════════════════════════════════════════════
   ACCESSIBILITY & ANIMATIONS
════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .service-hero__breadcrumb a,
  .btn,
  .service-card,
  .service-image-block img,
  .legal-branding,
  .footer__social a {
    transition: none;
  }
}

@media (prefers-color-scheme: dark) {
  .service-text-block p,
  .service-features li,
  .contact-cta {
    color: var(--testo-mid);
  }
}

/* ════════════════════════════════════════════════════════════════
   LEGAL PAGES — Restructura & Design theme
════════════════════════════════════════════════════════════════ */
.restructura-legal-wrap {
  padding: clamp(100px, 12vw, 140px) 0 clamp(64px, 8vw, 96px);
  min-height: 70vh;
  background: var(--sfondo-chiaro);
}
.legal-container {
  max-width: 1320px; margin: 0 auto; padding: 0 var(--pad);
  display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start;
}
.legal-sidebar {
  position: sticky; top: 100px; height: fit-content;
  max-height: calc(100vh - 240px); overflow-y: auto;
  background: var(--bianco); border-radius: 4px;
  padding: 24px; border: 1px solid #e0d4c0;
}
.legal-nav-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--oro); margin-bottom: 16px; font-weight: 600;
  font-family: 'Space Mono', monospace;
}
.legal-nav ul { list-style: none; padding: 0; margin: 0; }
.legal-nav li { margin-bottom: 4px; }
.legal-nav a {
  display: block; padding: 8px 12px; color: var(--testo);
  text-decoration: none; border-radius: 4px; font-size: 13px;
  transition: background 0.2s, color 0.2s;
}
.legal-nav a:hover { background: rgba(200, 169, 106, 0.10); color: var(--oro-hover); }
.legal-nav a.active { color: var(--espresso); font-weight: 600; background: rgba(200, 169, 106, 0.12); }
.legal-content-wrapper {
  min-height: 600px; max-height: calc(100vh - 215px); overflow-y: auto;
}
.legal-header { margin-bottom: 40px; padding-bottom: 24px; border-bottom: 1px solid #e0d4c0; }
.legal-header h1 {
  font-family: var(--font-display); font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600; color: var(--espresso); margin-bottom: 8px; padding-bottom: 0;
}
.legal-header .subtitle { color: var(--testo); font-size: 15px; }
.legal-header .last-updated { color: var(--testo); font-size: 13px; margin-top: 8px; font-style: italic; }
.legal-chapter { padding: 20px; }
.legal-chapter h2 {
  font-family: var(--font-display); font-size: 18px; font-weight: 600;
  color: var(--espresso); margin-bottom: 14px; padding-bottom: 8px;
  border-bottom: 1px solid #e0d4c0;
}
.legal-chapter .chapter-content { color: var(--testo); line-height: 1.75; font-size: 14px; }
.legal-chapter .chapter-content p { margin-bottom: 12px; color: var(--testo); }
.legal-chapter .chapter-content ul { list-style: disc; padding-left: 20px; margin-bottom: 12px; }
.legal-chapter .chapter-content li { margin-bottom: 6px; }
.legal-chapter .chapter-content a { color: var(--oro-hover); }
.legal-chapter .chapter-content table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 12px; }
.legal-chapter .chapter-content th,
.legal-chapter .chapter-content td { padding: 8px 12px; border: 1px solid #e0d4c0; text-align: left; }
.legal-chapter .chapter-content th { background: var(--sfondo-chiaro); color: var(--espresso); font-weight: 600; }
.chapter-actions { margin-top: 16px; }
.btn-text.confirm {
  background: none; border: 1px solid var(--oro); color: var(--oro);
  padding: 8px 16px; border-radius: 4px; font-size: 14px; cursor: pointer;
  transition: all var(--ease); font-family: var(--font-body);
}
.btn-text.confirm:hover { background: var(--oro); color: var(--espresso); }
@media (max-width: 900px) {
  .legal-container { grid-template-columns: 1fr; }
  .legal-sidebar { position: static; max-height: none; margin-bottom: 24px; }
  .legal-content-wrapper { max-height: none; }
}
