/* ============================================
   FX THEME - base comune alle pagine con l'effetto a particelle
   (body.fx-theme: home e menu). Caricare dopo style.css.
   Uno spazio scuro continuo; il canvas delle particelle e' fisso sullo sfondo.
   ============================================ */

/* --- Fondo unico: niente fasce alternate tra le sezioni --- */
.fx-theme::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60vw 60vh at 88% 8%, rgba(19, 163, 185, 0.16), transparent 70%),
    radial-gradient(55vw 50vh at 0% 95%, rgba(242, 182, 48, 0.06), transparent 70%);
}

.fx-theme .section,
.fx-theme .section-divider,
.fx-theme .page-header,
.fx-theme .footer {
  background: none;
}

/* --- Navbar: trasparente in cima, piena dopo lo scroll --- */
.fx-theme .navbar:not(.scrolled) {
  background: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* --- Intestazioni di sezione allineate a sinistra --- */
.fx-theme .section__header {
  text-align: left;
  margin-bottom: 48px;
}

.fx-theme .section__title::after {
  margin-left: 0;
}

.fx-theme .section__subtitle {
  margin: 0;
}

/* --- Canvas delle particelle (creato da js/burger-fx.js o js/page-fx.js) --- */
.burger-fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Il contenuto sta sopra il canvas, gli sfondi delle sezioni sotto */
.has-burger-fx .events-banner {
  position: relative;
  z-index: 2;
}

.has-burger-fx .section > .container,
.has-burger-fx .section-divider > .container,
.has-burger-fx .page-header > .container,
.has-burger-fx .footer > .container {
  position: relative;
  z-index: 2;
}

/* --- Segnaposto dell'oggetto: esiste solo se l'effetto e' attivo --- */
.fx-stage {
  display: none;
}

.has-burger-fx .fx-stage {
  display: block;
}

/* ============================================
   PAGINE INTERNE (body.fx-inner: menu e contatti)
   L'oggetto di particelle e' js/page-fx.js. Prima telefono, poi desktop.
   ============================================ */
.fx-inner .container {
  max-width: 1140px;
}

/* L'oggetto sta sopra il contenuto: vive in spazi vuoti (segnaposto o margine) */
.fx-inner .burger-fx {
  z-index: 3;
}

.fx-inner .section {
  padding: 44px 0;
}

/* --- Intestazione: titolo a sinistra, oggetto a destra --- */
.fx-inner .page-header {
  text-align: left;
  padding-top: calc(var(--nav-height) + 28px);
  padding-bottom: 36px;
}

.fx-inner .page-header__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.fx-inner.has-burger-fx .page-header__grid {
  grid-template-columns: minmax(0, 1fr) 128px;
}

.fx-inner .page-header .fx-stage {
  height: 128px;
}

.fx-inner .page-header__title {
  font-size: clamp(2.6rem, 11vw, 5.2rem);
  line-height: 0.95;
  margin-bottom: 12px;
}

/* --- Titolo con l'oggetto accanto (.fx-head contiene il titolo e un .fx-stage) --- */
.has-burger-fx .fx-head {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 92px;
  padding-right: 104px;
}

.fx-head > .fx-stage {
  position: absolute;
  top: 50%;
  right: 0;
  width: 92px;
  height: 92px;
  transform: translateY(-50%);
}

@media (min-width: 769px) {
  .fx-inner .section {
    padding: 72px 0;
  }

  .fx-inner .page-header {
    padding-top: calc(var(--nav-height) + 56px);
    padding-bottom: 56px;
  }

  .fx-inner.has-burger-fx .page-header__grid {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 40px;
  }

  .fx-inner .page-header .fx-stage {
    height: 300px;
  }

  .has-burger-fx .fx-head {
    min-height: 120px;
    padding-right: 136px;
  }

  .fx-head > .fx-stage {
    width: 120px;
    height: 120px;
  }
}

/* ============================================
   FORME
   Bottoni e chip: piastra con un angolo tagliato, senza ombra spessa.
   Riquadri: angoli morbidi e bordo sottile.
   ============================================ */
.fx-theme {
  --radius: 14px; /* about__image, category-card, review-card, hours, map-wrapper, mn-section, feat-card, mn-legend */
}

.fx-theme .btn,
.fx-theme .mn-nav__link,
.fx-theme .map-wrapper__link {
  --cut: 12px;         /* lato dell'angolo tagliato */
  --edge: transparent; /* colore del bordo, disegnato anche lungo il taglio */
  border: 0;
  border-radius: 0;
  -webkit-clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  box-shadow: inset 0 0 0 1.5px var(--edge);
  background-image: linear-gradient(to top right, transparent calc(50% - 1.5px), var(--edge) calc(50% - 1.5px));
  background-repeat: no-repeat;
  background-position: top right;
  background-size: var(--cut) var(--cut);
}

.fx-theme .btn--outline {
  --edge: rgba(255, 255, 255, 0.8);
  background-color: rgba(255, 255, 255, 0.06);
}

.fx-theme .mn-nav__link,
.fx-theme .map-wrapper__link {
  --cut: 9px;
}

.fx-theme .mn-nav__link {
  --edge: rgba(255, 255, 255, 0.18);
}

.fx-theme .mn-nav__link:hover {
  --edge: var(--color-brand-light);
}

.fx-theme .mn-nav__link.is-active {
  --edge: transparent;
}

.fx-theme .btn:hover,
.fx-theme .map-wrapper__link:hover {
  filter: brightness(1.1);
}

.fx-theme .btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 0 0 1.5px var(--edge);
}

/* Il clip-path taglierebbe il contorno esterno: anello di focus disegnato all'interno */
.fx-theme .btn:focus-visible,
.fx-theme .mn-nav__link:focus-visible,
.fx-theme .map-wrapper__link:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--color-darker), inset 0 0 0 4px var(--color-warm);
}

/* --- Riquadri --- */
.fx-theme .mn-card,
.fx-theme .order-gallery__item {
  border-radius: 10px;
}

.fx-theme .order-badge {
  border-radius: 8px;
}

.fx-theme .review-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fx-theme .review-card:hover {
  border-color: rgba(19, 163, 185, 0.5);
}

.fx-theme .mn-legend {
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  background-color: rgba(44, 47, 45, 0.62);
  background-image: none;
}

/* --- Icone del menu: linee chiare su pannello scuro invece del blocco teal pieno.
       Le icone di serie (res/menu-assets/) hanno il fondo teal dentro l'immagine: il filtro SVG
       #fx-ink (definito in menu.html) rende trasparente il fondo e chiare le linee.
       Icone caricate dall'admin restano com'erano. --- */
.fx-theme .mn-card__icon:has(img[src^="res/menu-assets/"]) {
  background: rgba(19, 163, 185, 0.1);
  border-color: rgba(19, 163, 185, 0.3);
  border-width: 0 0 1px;
}

.fx-theme .feat-card__visual:has(.feat-card__icon[src^="res/menu-assets/"]) {
  background:
    radial-gradient(circle at 50% 58%, rgba(19, 163, 185, 0.28), transparent 62%),
    rgba(0, 0, 0, 0.28);
}

.fx-theme .mn-card__icon img[src^="res/menu-assets/"],
.fx-theme .feat-card__icon[src^="res/menu-assets/"] {
  filter: url(#fx-ink);
  opacity: 0.92;
}

@media (max-width: 600px) {
  .fx-theme .mn-card__icon:has(img[src^="res/menu-assets/"]) {
    border-width: 0 1px 0 0;
  }
}

@media (max-width: 768px) {
  .fx-theme .section__header {
    margin-bottom: 32px;
  }
}
