/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: #1d2734;
  background: #fbfaf6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: #0e3a5f; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.2; margin: 0 0 .5em; color: #0c2942; }
ul { margin: 0; padding-left: 1.1em; }
ul li { margin: .15em 0; }

.container { width: min(1120px, 92%); margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .75em 1.4em;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  border: 1.5px solid transparent;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: #0e3a5f; color: #fff;
  box-shadow: 0 4px 14px rgba(14, 58, 95, .25);
}
.btn-primary:hover { background: #0c2942; }
.btn-ghost {
  background: transparent; color: #0e3a5f; border-color: #0e3a5f;
}
.btn-ghost:hover { background: #0e3a5f; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 246, .92);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid #ece6d5;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 0;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: #0e3a5f;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  height: 44px;
  width: auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(14, 58, 95, .15);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-title { font-family: Georgia, serif; font-size: 1rem; color: #0c2942; font-weight: 700; }
.brand-sub { font-size: .78rem; color: #6e7888; letter-spacing: .04em; text-transform: uppercase; }

.main-nav { display: flex; gap: 1.6rem; align-items: center; }
.main-nav a {
  font-weight: 500;
  font-size: .95rem;
  color: #1d2734;
  padding: .4em 0;
  border-bottom: 2px solid transparent;
}
.main-nav a:hover { border-color: #eccd6a; text-decoration: none; }
.main-nav a.cta {
  background: #0e3a5f; color: #fff;
  padding: .55em 1.2em; border-radius: 999px;
}
.main-nav a.cta:hover { background: #0c2942; border-color: transparent; }

.nav-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  color: #0e3a5f;
  border: 1.5px solid transparent;
  padding: 0 !important;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.nav-social:hover {
  background: #0e3a5f;
  color: #fff;
  border-bottom-color: transparent !important;
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 42px; height: 42px;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: #0c2942;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 3rem 0 4rem;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 80% -10%, rgba(236, 205, 106, .35), transparent 55%),
    radial-gradient(ellipse at -10% 110%, rgba(14, 58, 95, .15), transparent 50%),
    linear-gradient(180deg, #fbfaf6 0%, #f3eedd 100%);
}
.hero-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 4%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.6rem;
}
.hero-owner {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .78rem;
  font-weight: 700;
  color: #a07a1f;
  position: relative;
  padding: 0 2.6rem;
}
.hero-owner::before,
.hero-owner::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 1.8rem;
  height: 1px;
  background: #c9b378;
}
.hero-owner::before { left: 0; }
.hero-owner::after  { right: 0; }

.hero-card {
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: #5e5f61;
  box-shadow:
    0 32px 64px -24px rgba(14, 58, 95, .45),
    0 8px 20px rgba(14, 58, 95, .12);
  transform: translateZ(0);
  transition: transform .35s ease, box-shadow .35s ease;
}
.hero-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 40px 72px -22px rgba(14, 58, 95, .5),
    0 10px 24px rgba(14, 58, 95, .15);
}
.hero-image { display: block; line-height: 0; background: #c9c9c9; }
.hero-image img { display: block; width: 100%; height: auto; }

.hero-rotator {
  background: #5e5f61;
  color: #fff;
  padding: 1.6rem 1.2rem;
  display: grid;
  place-items: center;
  text-align: center;
  min-height: 5.4rem;
  position: relative;
  overflow: hidden;
}
.hero-rotator::before,
.hero-rotator::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 36px; height: 1px;
  background: rgba(255, 255, 255, .35);
}
.hero-rotator::before { left: 1.2rem; }
.hero-rotator::after  { right: 1.2rem; }
.hero-rotator-list {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
  width: 100%;
  height: 1.6em;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1rem, 2.2vw, 1.45rem);
  font-style: italic;
  letter-spacing: .01em;
}
.hero-rotator-list li {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  animation: rotateSlide 12s infinite;
  white-space: nowrap;
  padding: 0 4rem;
}
@media (max-width: 760px) {
  .hero-rotator-list li { white-space: normal; padding: 0 3rem; line-height: 1.3; }
  .hero-rotator-list { height: 3.2em; }
  .hero-rotator { min-height: 6.6rem; padding: 1.2rem 1rem; }
}
.hero-rotator-list li:nth-child(1) { animation-delay: 0s; }
.hero-rotator-list li:nth-child(2) { animation-delay: 4s; }
.hero-rotator-list li:nth-child(3) { animation-delay: 8s; }

@keyframes rotateSlide {
  0%, 2%   { opacity: 0; transform: translateY(22px); }
  8%, 30%  { opacity: 1; transform: translateY(0); }
  36%, 38% { opacity: 0; transform: translateY(-22px); }
  100%     { opacity: 0; transform: translateY(-22px); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-rotator-list li { animation: none; opacity: 1; transform: none; position: relative; }
  .hero-rotator-list { height: auto; }
  .hero-rotator-list li + li { margin-top: .4em; }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  justify-content: center;
  margin-top: .4rem;
}

.hero-scroll {
  margin-top: .8rem;
  width: 36px;
  height: 56px;
  border: 2px solid rgba(14, 58, 95, .35);
  border-radius: 999px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
  transition: border-color .2s ease;
}
.hero-scroll:hover { border-color: #0e3a5f; text-decoration: none; }
.hero-scroll span {
  width: 4px;
  height: 8px;
  background: #0e3a5f;
  border-radius: 2px;
  animation: scroll-bounce 1.6s ease-in-out infinite;
}
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: .9; }
  50%      { transform: translateY(14px); opacity: .2; }
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .8rem;
  font-weight: 600;
  color: #a07a1f;
  margin: 0 0 .6rem;
}

/* ---------- Generic section ---------- */
section { padding: 4.5rem 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 2.6rem; }
.section-head h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: .4rem; }
.section-sub { color: #4a5566; margin: .4em auto 0; }
.section-head-light .eyebrow { color: #eccd6a; }
.section-head-light h2,
.section-head-light .section-sub { color: #fbfaf6; }

/* ---------- Services grid ---------- */
.services { background: #fbfaf6; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem;
}
.card {
  background: #fff;
  border: 1px solid #ece6d5;
  border-radius: 14px;
  padding: 1.6rem 1.4rem;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity .7s cubic-bezier(.2, .65, .2, 1) var(--reveal-delay, 0ms),
    transform .7s cubic-bezier(.2, .65, .2, 1) var(--reveal-delay, 0ms),
    box-shadow .2s ease,
    border-color .2s ease;
}
.card.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(14, 58, 95, .08);
  border-color: #d8cfa7;
}
.card-icon {
  font-size: 1.7rem;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: #f3eedd;
  border-radius: 12px;
  margin-bottom: .9rem;
}
.card h3 { font-size: 1.15rem; margin: 0 0 .6rem; }
.card ul { color: #3d4a5c; padding-left: 1.05em; }
.card-wide { grid-column: span 2; }
.card-note { font-size: .82rem; color: #6e7888; margin: .9rem 0 0; }

/* ---------- Branches ---------- */
.branches { background: #f3eedd; }
.branches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.4rem;
}
.branches-single { max-width: 520px; margin: 0 auto; }
.hours-single { max-width: 520px; margin: 0 auto; }

/* Mappa Leaflet */
.map {
  height: 380px;
  margin-top: 1.6rem;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 30px -12px rgba(14, 58, 95, .35), 0 4px 10px rgba(14, 58, 95, .08);
  border: 1px solid #d8cfa7;
  background: #e8e0c4;
  z-index: 0;
}
.map-pin { background: transparent; border: 0; }
.map-pin svg {
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .25));
  transition: transform .2s ease;
}
.map-pin:hover svg { transform: translateY(-2px) scale(1.05); }
.leaflet-popup-content {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: .92rem;
  line-height: 1.5;
  color: #1d2734;
}
.leaflet-popup-content strong { color: #0c2942; font-size: 1rem; }
.leaflet-popup-content a {
  display: inline-block;
  margin-top: .4rem;
  color: #0e3a5f;
  font-weight: 600;
}
.leaflet-container a.leaflet-popup-close-button { color: #6e7888; }
@media (max-width: 600px) {
  .map { height: 300px; }
}
.branch {
  background: #fff;
  border-radius: 16px;
  padding: 1.8rem;
  box-shadow: 0 4px 18px rgba(14, 58, 95, .06);
}
.branch-owner {
  margin: 0 0 .25rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #a07a1f;
}
.branch h3 { font-size: 1.4rem; margin: 0 0 .3rem; }
.branch h3 small { font-weight: 400; color: #6e7888; font-family: inherit; font-size: .85rem; }
.branch address { font-style: normal; color: #3d4a5c; margin: 0 0 1rem; }
.branch-info {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .35rem 1rem;
  margin: 0 0 1.2rem;
  font-size: .95rem;
}
.branch-info dt { color: #6e7888; font-weight: 500; }
.branch-info dd { margin: 0; color: #1d2734; }

/* ---------- Hours ---------- */
.hours { background: #fbfaf6; }
.hours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
}
.hours-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid #ece6d5;
  padding: 1.8rem;
}
.hours-card h3 { font-size: 1.3rem; margin: 0 0 1rem; padding-bottom: .6rem; border-bottom: 2px solid #eccd6a; display: inline-block; }
.hours-card table { width: 100%; border-collapse: collapse; }
.hours-card th {
  text-align: left;
  font-weight: 500;
  color: #6e7888;
  padding: .55rem 0;
  border-bottom: 1px dashed #ece6d5;
  font-family: inherit;
}
.hours-card td {
  text-align: right;
  padding: .55rem 0;
  border-bottom: 1px dashed #ece6d5;
  color: #1d2734;
}
.hours-card tr:last-child th,
.hours-card tr:last-child td { border-bottom: 0; }
.hours-note { color: #6e7888; font-size: .9rem; margin: 1rem 0 0; }

/* ---------- Contact ---------- */
.contact {
  background: linear-gradient(135deg, #0c2942 0%, #0e3a5f 100%);
  color: #fbfaf6;
}
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  max-width: 900px;
  margin: 0 auto;
}
.contact-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  padding: 1.3rem 1.4rem;
  color: #fbfaf6;
  transition: background .2s ease, transform .2s ease;
}
a.contact-card:hover {
  background: rgba(255, 255, 255, .12);
  transform: translateY(-2px);
  text-decoration: none;
}
.contact-icon {
  font-size: 1.6rem;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: rgba(236, 205, 106, .18);
  color: #eccd6a;
  border-radius: 12px;
  flex: 0 0 48px;
}
.contact-label { margin: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: #b8c4d4; }
.contact-value { margin: .15rem 0 0; font-size: 1.1rem; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0a1f33;
  color: #c5d2e0;
  padding: 2.2rem 0;
  font-size: .9rem;
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.2rem; }
.footer-meta { color: #6e7888; margin: .3rem 0 0; }
.site-footer p { margin: 0; }
.site-footer strong { color: #fbfaf6; }
.footer-social { display: flex; gap: .6rem; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  color: #fbfaf6;
  font-size: .9rem;
  transition: background .2s ease, border-color .2s ease;
}
.footer-social a:hover { background: rgba(236, 205, 106, .18); border-color: #eccd6a; color: #eccd6a; text-decoration: none; }

/* ---------- WhatsApp floating action button ---------- */
.whatsapp-fab {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: grid;
  place-items: center;
  box-shadow:
    0 10px 24px rgba(37, 211, 102, .45),
    0 4px 10px rgba(0, 0, 0, .15);
  z-index: 100;
  transition: transform .2s ease, box-shadow .2s ease;
}
.whatsapp-fab:hover {
  transform: scale(1.06);
  text-decoration: none;
  box-shadow:
    0 14px 28px rgba(37, 211, 102, .55),
    0 6px 14px rgba(0, 0, 0, .2);
}
.whatsapp-fab svg { position: relative; z-index: 1; }
.whatsapp-fab-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #25D366;
  animation: wa-pulse 2.4s ease-out infinite;
  z-index: 0;
}
@keyframes wa-pulse {
  0%   { transform: scale(1);    opacity: .55; }
  80%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}
.whatsapp-fab::after {
  content: 'Scrivici su WhatsApp';
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  background: #0c2942;
  color: #fff;
  font-size: .82rem;
  font-weight: 500;
  padding: .45rem .8rem;
  border-radius: 8px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.whatsapp-fab:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-fab-pulse { animation: none; opacity: 0; }
}
@media (max-width: 520px) {
  .whatsapp-fab { width: 54px; height: 54px; right: 1rem; bottom: 1rem; }
  .whatsapp-fab svg { width: 26px; height: 26px; }
  .whatsapp-fab::after { display: none; }
}

/* ---------- FAQ ---------- */
.faq { background: #fbfaf6; }
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}
.faq-item {
  background: #fff;
  border: 1px solid #ece6d5;
  border-radius: 14px;
  padding: 0 1.4rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.faq-item[open] {
  border-color: #eccd6a;
  box-shadow: 0 6px 22px -14px rgba(14, 58, 95, .35);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1.1rem 0;
  font-weight: 600;
  color: #0e3a5f;
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eccd6a;
  color: #0e3a5f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1;
  transition: transform .2s ease;
}
.faq-item[open] summary::after {
  content: "−";
  transform: rotate(180deg);
}
.faq-item p {
  margin: 0 0 1.1rem;
  color: #1d2734;
  line-height: 1.65;
}
.faq-item p strong { color: #0e3a5f; }

/* ---------- Mobile ---------- */
@media (max-width: 520px) {
  .brand-text { display: none; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: .2rem;
    background: #fbfaf6;
    border-bottom: 1px solid #ece6d5;
    padding: .8rem 5%;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .main-nav a { padding: .8rem 0; border-bottom: 1px solid #ece6d5; width: 100%; }
  .main-nav a.cta { width: max-content; margin-top: .4rem; }

  .hero { padding: 3.2rem 0 4rem; }
  section { padding: 3.2rem 0; }
  .card-wide { grid-column: span 1; }
}
