/* =========================================================
   MLC - CSS GLOBALE SISTEMATO
   Base, header, footer, layout generale e compatibilità pagine
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background: #fffdf8;
  color: #2f2f2f;
  line-height: 1.6;
}

main {
  width: 100%;
}

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

/* =========================================================
   LAYOUT GENERALE - EVITA EFFETTO SITO STRETTO AL CENTRO
   ========================================================= */

.home-section,
.mlc-section,
.contact-section,
.privacy-section,
.cookie-section,
.intro-servizi,
.pacchetti-section,
.servizi-extra,
.cta-final {
  width: min(100% - 56px, 1380px);
  max-width: 1380px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1600px) {
  .home-section,
  .mlc-section,
  .contact-section,
  .privacy-section,
  .cookie-section,
  .intro-servizi,
  .pacchetti-section,
  .servizi-extra,
  .cta-final {
    width: min(100% - 96px, 1520px);
    max-width: 1520px;
  }
}

@media (max-width: 768px) {
  .home-section,
  .mlc-section,
  .contact-section,
  .privacy-section,
  .cookie-section,
  .intro-servizi,
  .pacchetti-section,
  .servizi-extra,
  .cta-final {
    width: min(100% - 28px, 100%);
  }
}

/* =========================================================
   HEADER PREMIUM MLC - COMPATTO, LARGO, RESPONSIVE
   ========================================================= */

.site-header {
  position: sticky;
  top: 12px;
  z-index: 999;

  width: calc(100% - 40px);
  max-width: none;

  margin: 12px auto 0;
  padding: 12px 26px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;

  background: rgba(255, 253, 248, 0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  border: 1px solid rgba(138, 111, 53, 0.18);
  border-radius: 999px;

  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  min-width: 0;
}

.header-brand .logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex: 0 0 auto;
}

.brand-title-only {
  font-family: "Playfair Display", serif;
  font-size: clamp(24px, 2vw, 34px);
  font-weight: 700;
  line-height: 1;
  color: #263626;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.main-nav a {
  position: relative;
  text-decoration: none;
  color: #4c5549;
  font-size: 16px;
  font-weight: 500;
  padding: 8px 0;
  transition: 0.25s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: #c7a24a;
  transform: translateX(-50%);
  transition: 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active-link {
  color: #8a6f35;
}

.main-nav a:hover::after,
.main-nav a.active-link::after {
  width: 100%;
}

.hamburger {
  display: none;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #fffdf8;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  flex: 0 0 auto;
}

.hamburger span {
  width: 20px;
  height: 2px;
  background: #263626;
  border-radius: 999px;
  transition: 0.25s ease;
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 920px) {
  .site-header {
    top: 10px;
    width: calc(100% - 22px);
    margin-top: 10px;
    padding: 11px 14px;
    border-radius: 24px;
    overflow: visible;
  }

  .header-brand .logo {
    width: 44px;
    height: 44px;
  }

  .brand-title-only {
    font-size: 22px;
  }

  .hamburger {
    display: flex;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 1000;

    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;

    width: 100%;
    padding: 16px;

    border-radius: 22px;
    background: #fffdf8;
    border: 1px solid rgba(138, 111, 53, 0.22);

    box-shadow:
      0 24px 60px rgba(0, 0, 0, 0.18),
      inset 0 1px 0 rgba(255, 255, 255, 0.8);
  }

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

  .main-nav a {
    display: block;
    width: 100%;
    padding: 15px 18px;
    border-radius: 16px;
    color: #263626;
    background: rgba(248, 244, 236, 0.72);
    font-size: 16px;
    font-weight: 600;
  }

  .main-nav a:hover,
  .main-nav a.active-link {
    background: #eef3ec;
    color: #8a6f35;
  }

  .main-nav a::after {
    display: none;
  }
}

@media (max-width: 520px) {
  .site-header {
    width: calc(100% - 16px);
    padding: 10px 12px;
  }

  .header-brand {
    gap: 10px;
  }

  .header-brand .logo {
    width: 40px;
    height: 40px;
  }

  .brand-title-only {
    font-size: 18px;
    line-height: 1.05;
    white-space: normal;
  }
}

/* FOOTER PREMIUM MLC */

.site-footer {
  margin: 90px auto 0;
  padding: 0 24px 28px;
  background: transparent;
  color: #263626;
}

.footer-shell {
  width: min(100%, 1380px);
  margin: 0 auto;
  padding: 46px;

  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.9fr;
  gap: 46px;
  align-items: start;

  border-radius: 36px;

  background:
    radial-gradient(circle at 94% 0%, rgba(199, 162, 74, 0.16), transparent 28%),
    radial-gradient(circle at 0% 100%, rgba(38, 54, 38, 0.10), transparent 26%),
    linear-gradient(135deg, #fffdf8 0%, #f8f4ec 48%, #eef3ec 100%);

  border: 1px solid rgba(138, 111, 53, 0.22);

  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.07);
}

.footer-brand-area p {
  max-width: 440px;
  margin-top: 20px;
  color: #4c5549;
  line-height: 1.75;
  font-size: 16px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.footer-logo {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.footer-brand-text {
  font-family: "Playfair Display", serif;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1;
  font-weight: 700;
  color: #263626;
  letter-spacing: 0.3px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.footer-h3 {
  margin: 0 0 18px;
  font-family: "Playfair Display", serif;
  font-size: 25px;
  color: #263626;
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.footer-link,
.footer-muted {
  color: #4c5549;
  text-decoration: none;
  font-size: 15.5px;
  line-height: 1.5;
}

.footer-link {
  position: relative;
  transition: 0.25s ease;
}

.footer-link:hover {
  color: #8a6f35;
}

.footer-bottom {
  width: min(100%, 1380px);
  margin: 18px auto 0;
  padding: 18px 6px 0;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;

  color: #6a7067;
  font-size: 14px;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-divider {
  color: rgba(138, 111, 53, 0.55);
}

.footer-copy {
  color: #6a7067;
}

@media (max-width: 900px) {
  .footer-shell {
    grid-template-columns: 1fr;
    padding: 34px 26px;
    gap: 34px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .site-footer {
    padding: 0 14px 24px;
  }

  .footer-brand {
    align-items: flex-start;
  }

  .footer-logo {
    width: 56px;
    height: 56px;
  }

  .footer-brand-text {
    font-size: 27px;
  }

  .footer-shell {
    border-radius: 28px;
  }
}

/* =========================================================
   COMPATIBILITÀ VECCHIE SEZIONI / PAGINE RESIDUE
   ========================================================= */

.section {
  max-width: 1380px;
  width: min(100% - 56px, 1380px);
  margin: 80px auto;
  padding: 0;
}

.section h2 {
  font-family: "Playfair Display", serif;
  text-align: center;
  color: #b89663;
  margin-bottom: 40px;
}

body.chi-siamo .section,
body.contatti .section,
body.servizi .section {
  max-width: 1380px;
  width: min(100% - 56px, 1380px);
  margin: 100px auto;
  padding: 0;
}

body.chi-siamo .section h1,
body.contatti .section h1,
body.servizi .section h1 {
  font-family: "Playfair Display", serif;
  color: #b89663;
  text-align: center;
  font-size: 40px;
  margin-bottom: 40px;
}

body.chi-siamo .section p,
body.contatti .section p {
  font-size: 18px;
  margin-bottom: 22px;
}

@media (max-width: 768px) {
  .section,
  body.chi-siamo .section,
  body.contatti .section,
  body.servizi .section {
    width: min(100% - 28px, 100%);
  }

  .section h1,
  .section h2,
  body.chi-siamo .section h1,
  body.contatti .section h1,
  body.servizi .section h1 {
    font-size: 32px;
  }
}

/* =========================================================
   VECCHI COMPONENTI ANCORA EVENTUALMENTE USATI
   ========================================================= */

.hero {
  height: 70vh;
  background: url("https://images.unsplash.com/photo-1519741497674-611481863552") center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
}

.hero-content {
  position: relative;
  color: white;
  max-width: 700px;
  padding: 20px;
}

.hero h1 {
  font-family: "Playfair Display", serif;
  font-size: 48px;
  margin-bottom: 20px;
}

.hero p {
  font-size: 20px;
  margin-bottom: 30px;
}

.btn {
  background: #b89663;
  color: white;
  padding: 14px 28px;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 600;
}

.features,
.services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

.feature {
  flex: 1 1 260px;
  max-width: 320px;
  background: white;
  padding: 30px;
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}

.service {
  flex: 1 1 260px;
  max-width: 320px;
  background: #faf7f2;
  padding: 25px;
  border-radius: 12px;
  text-align: center;
}

/* FORM VECCHI / GENERICI */

.contact-form {
  max-width: 600px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-form input,
.contact-form textarea {
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-family: "Inter", sans-serif;
  font-size: 15px;
}

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

.contact-form button {
  background: #b89663;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 40px;
  font-weight: 600;
  cursor: pointer;
}

#successMessage {
  text-align: center;
  color: #b89663;
  margin-top: 20px;
  font-weight: 600;
  display: none;
}

/* GRAZIE */

body.grazie {
  font-family: "Inter", sans-serif;
  background: #f6f1ea;
  color: #2f2f2f;
}

body.grazie .grazie-viewport {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  text-align: center;
  padding: 40px 20px;
}

body.grazie .grazie-viewport h1 {
  color: #b89663;
  font-size: 36px;
  margin-bottom: 20px;
}

body.grazie .grazie-viewport p {
  font-size: 18px;
}

body.grazie .grazie-viewport a {
  display: inline-block;
  margin-top: 30px;
  padding: 12px 24px;
  background: #b89663;
  color: white;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
}

/* SERVIZI VECCHI / TABELLE EVENTUALI */

body.servizi table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 30px;
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

body.servizi th {
  background: #f3ebe2;
  color: #b89663;
  font-weight: 600;
  padding: 14px;
}

body.servizi td {
  padding: 14px 12px;
  border-bottom: 1px solid #eee;
  text-align: center;
}

body.servizi td:first-child {
  text-align: left;
  font-weight: 500;
}

body.servizi tr:hover {
  background: #faf7f2;
}

body.servizi .yes {
  color: #2e8b57;
  font-weight: 700;
  font-size: 18px;
}

body.servizi .no {
  color: #c94a4a;
  font-weight: 700;
  font-size: 18px;
}

body.servizi .price-info {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-top: 40px;
  flex-wrap: wrap;
}

body.servizi .price-box {
  background: white;
  border-radius: 14px;
  padding: 25px 35px;
  text-align: center;
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
  border: 1px solid #eee;
}

body.servizi .price-box h3 {
  font-family: "Playfair Display", serif;
  color: #b89663;
  margin-bottom: 10px;
}

body.servizi .extra {
  margin-top: 60px;
  padding: 30px;
  border-radius: 14px;
  background: #faf7f2;
}

body.servizi .extra h2 {
  font-family: "Playfair Display", serif;
  text-align: center;
  color: #b89663;
  margin-bottom: 20px;
}

body.servizi .extra p {
  text-align: center;
  margin-bottom: 20px;
}

body.servizi .extra ul {
  list-style: none;
  padding: 0;
  max-width: 600px;
  margin: auto;
}

body.servizi .extra li {
  margin-bottom: 10px;
}

body.servizi .extra li::before {
  content: "✓";
  color: #2e8b57;
  margin-right: 8px;
}

body.servizi .download-btn {
  display: block;
  width: 220px;
  margin: 40px auto 0;
  padding: 14px 28px;
  background: #b89663;
  color: white;
  border-radius: 40px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
}

/* =========================================================
   BOTTONI ANIMATI
   ========================================================= */

.text-box {
  text-align: center;
  margin-top: 20px;
}

.btn,
body.servizi .download-btn,
.contact-form button,
body.contatti .contact-form button,
body.grazie .grazie-viewport a {
  position: relative;
  display: inline-block;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
}

.btn:hover,
body.servizi .download-btn:hover,
.contact-form button:hover,
body.contatti .contact-form button:hover,
body.grazie .grazie-viewport a:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.btn:active,
body.servizi .download-btn:active,
.contact-form button:active,
body.contatti .contact-form button:active,
body.grazie .grazie-viewport a:active {
  transform: translateY(-1px);
  box-shadow: 0 5px 10px rgba(0,0,0,0.2);
}

.btn::after,
body.servizi .download-btn::after,
.contact-form button::after,
body.contatti .contact-form button::after,
body.grazie .grazie-viewport a::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  border-radius: 40px;
  z-index: -1;
  transition: all .4s;
  background-color: #b89663;
}

.btn:hover::after,
body.servizi .download-btn:hover::after,
.contact-form button:hover::after,
body.contatti .contact-form button:hover::after,
body.grazie .grazie-viewport a:hover::after {
  transform: scaleX(1.4) scaleY(1.6);
  opacity: 0;
}

.btn-animated,
body.servizi .download-btn,
.contact-form button,
body.contatti .contact-form button,
body.grazie .grazie-viewport a {
  animation: moveInBottom 0.8s ease-out;
  animation-fill-mode: backwards;
}

@keyframes moveInBottom {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
