/* ==========================================================================
   LUMINA — components.css
   Blocchi riutilizzabili: banner con foto, gallerie, schermo intero,
   menu a fisarmonica, pannello prenotazione, riga dei canali social.
   ========================================================================== */

/* ---------- Banner con foto a tutta larghezza --------------------------- */
.banner-hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: clamp(350px, 29vw, 465px);
  overflow: hidden;
}
.banner-slides, .banner-shade { position: absolute; inset: 0; }
.banner-slides { z-index: -3; background: var(--photo-bg); }
.banner-slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 53%;
  opacity: 0;
  transition: opacity 900ms ease-in-out;
}
.banner-slide.is-active { opacity: 1; }
.banner-shade {
  z-index: -2;
  background: linear-gradient(180deg, #282a2700 0%, #282a2766 100%);   /* da 0 a 40% */
}

.banner-copy {
  position: absolute;
  inset: auto var(--page-pad) 58px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  color: #fff;
}
.property-banner .banner-copy { bottom: 40px; }
.banner-copy h1 {
  font-size: clamp(40px, 4.5vw, 68px);
  letter-spacing: -.04em;
  color: #fff;
}
.banner-copy p {
  margin: 15px 0 0;
  max-width: 640px;
  color: #fff;
}
.banner-copy .eyebrow { margin-bottom: 14px; font-size: 14px; letter-spacing: 2.6px; }
/* Logo bianco della home: in alto a sinistra, grande quanto lo spazio libero sopra i testi */
.banner-home .banner-copy { top: 22px; bottom: 40px; gap: 16px; }
.banner-logo-box { position: relative; flex: 1 1 0; min-height: 56px; width: 100%; }
.banner-logo { position: absolute; left: 0; top: 0; width: auto; height: 100%; max-width: 100%; opacity: .9; object-fit: contain; object-position: left top; }
@media (max-width: 760px) { .banner-home .banner-copy { top: 16px; bottom: 60px; } }
@media (max-width: 480px) { .banner-logo-box { min-height: 0; } }

.banner-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.hero-cta { height: 54px; padding-inline: 23px; gap: 14px; font-size: 16px; }
.hero-cta .icon:last-child { margin-left: 6px; }
.banner-book { color: #282a27; background: #fdfcf9; border-color: #fdfcf9; }
.banner-book:hover { background: #efede6; color: #282a27; }

.banner-property-facts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 16px;
  font-size: 17px;
  color: #fff;
}
.banner-property-facts > span { display: inline-flex; align-items: center; gap: 8px; }
.banner-property-facts .icon { --icon: 17px; }

.banner-motion-toggle {
  position: absolute;
  bottom: 12px;
  right: var(--page-pad);
  height: 30px;
  padding: 5px 12px;
  font-size: 12px;
  color: #fff;
  background: #282a27ba;
  border: 1px solid #ffffffa6;
}
.banner-home .banner-motion-toggle { display: none; }
.banner-motion-toggle:hover { background: #282a27; }
.banner-motion-toggle:focus-visible { outline-color: #fff; }

@media (max-width: 1050px) {
  .banner-copy { inset-inline: 32px; }
  .banner-copy h1 { font-size: 48px; }
  .banner-copy p { max-width: 440px; }
}
@media (max-width: 760px) {
  .banner-hero { height: 250px; }
  .property-banner .banner-copy h1 { font-size: 36px; }
  .banner-hero.banner-home { height: 250px; }
  .banner-home .banner-logo-box { display: none; }
  .banner-home .banner-copy { top: auto; bottom: 40px; gap: 20px; }
  .banner-home .banner-copy h1 { font-size: 36px; }
  .banner-home .banner-copy p { margin-top: 12px; }
  .banner-copy { inset: auto 22px 60px; }
  .property-banner .banner-copy { bottom: 40px; }
  .banner-copy h1 { max-width: 470px; font-size: 43px; }
  .banner-copy p { max-width: 430px; margin-top: 12px; font-size: 16px; }
  .banner-copy .eyebrow { margin-bottom: 12px; font-size: 12px; letter-spacing: 2.2px; }
  .banner-actions { gap: 10px; }
  .banner-actions .hero-cta { height: 42px; padding-inline: 12px; gap: 8px; font-size: 13px; }
  .banner-actions .hero-cta .icon:first-child { display: none; }
  .banner-property-facts { gap: 8px 18px; font-size: 15px; }
  .banner-motion-toggle { right: 22px; }
}
@media (max-width: 360px) {
  .banner-copy h1 { font-size: 38px; }
}

/* ---------- Galleria ---------------------------------------------------- */
.gallery {
  position: relative;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  aspect-ratio: 1.44;
  background: var(--photo-bg);
}
.gallery-slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 900ms ease-in-out;     /* dissolvenza tra una foto e l'altra */
}
.gallery-slide.is-active { opacity: 1; }
.gallery::after {
  content: '';
  position: absolute;
  inset: 75% 0 0;
  z-index: 0;
  background: linear-gradient(transparent, #28251e66);
  pointer-events: none;
}
.gallery-caption {
  position: absolute;
  left: 26px; right: 26px; bottom: 22px;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 1.7px;
  color: #fff;
  text-shadow: 0 1px 4px #28251e;
}
.gallery-controls {
  position: absolute;
  right: 18px; bottom: 58px;
  z-index: 2;
  display: flex;
  gap: 5px;
}
.gallery-controls .btn {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: #fdfcf9f2;
  color: #282a27;
}
.gallery-controls .btn:hover { background: var(--accent); }
.gallery-controls .icon { --icon: 13px; }

@media (max-width: 760px) {
  .gallery-caption { left: 18px; right: 18px; font-size: 8px; }
  .gallery-controls { right: 13px; }
}

/* Cartella senza foto: riquadro vuoto con il nome */
.gallery.is-empty::after { display: none; }
.gallery.is-empty .gallery-caption { color: #62645c; text-shadow: none; }

/* ---------- Schermo intero (finestra <dialog>) -------------------------- */
.lumina-lightbox {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 22px;
  border: 0;
  border-radius: 0;
  background: #fdfcf9;
  color: #282a27;
  overflow: hidden;
}
.lumina-lightbox[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 16px;
}
.lumina-lightbox::backdrop { background: #282a27; }
.lightbox-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.lightbox-heading h2 { margin: 0; font-size: 25px; font-weight: 100; }
.lightbox-image { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.lightbox-image.is-fading { animation: lightbox-fade 700ms ease-in-out; }
@keyframes lightbox-fade { from { opacity: 0; } to { opacity: 1; } }
.lightbox-controls .btn-icon { width: 36px; padding: 0; }
.lightbox-controls { display: flex; align-items: center; justify-content: center; gap: 20px; }
.lumina-lightbox .btn { background: #fdfcf9; color: #282a27; border-color: #a09f96; }
.lumina-lightbox .btn:hover { background: var(--accent); }
@media (max-width: 480px) {
  .lumina-lightbox { padding: 14px; }
  .lightbox-heading h2 { font-size: 21px; }
  .lightbox-controls { gap: 10px; }
}

/* ---------- Mappa Google (alta quanto la colonna dei servizi) -------------- */
.map-embed { position: relative; min-height: 260px; border: 1px solid var(--border); background: var(--photo-bg); }
.map-open { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 15px; color: inherit; text-decoration: underline; text-underline-offset: 4px; }
.map-open:hover { text-decoration-thickness: 2px; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Menu a fisarmonica (<details>) ------------------------------ */
.host-detail, .service-detail { border-bottom: 1px solid var(--border); }
.host-detail summary, .service-detail summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  list-style: none;
  font-size: 17px;
  cursor: pointer;
}
.host-detail summary::-webkit-details-marker,
.service-detail summary::-webkit-details-marker { display: none; }
.host-detail summary .icon, .service-detail summary .icon { --icon: 17px; transition: transform .15s; }
.host-detail[open] > summary .icon, .service-detail[open] > summary .icon { transform: rotate(45deg); }

/* Servizi: secondo livello (dentro "Gli ambienti", "Generali") e elenchi */
.service-detail > summary { font-size: 18px; }
.service-body {
  margin: 0 0 6px 6px;
  padding-left: 20px;
  border-left: 1px solid var(--border);
}
.service-sub { border-top: 1px solid var(--border); }
.service-sub:first-child { border-top: 0; }
.service-sub > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  list-style: none;
  font-size: 17px;
  cursor: pointer;
}
.service-sub > summary::-webkit-details-marker { display: none; }
.service-sub > summary .icon { --icon: 17px; transition: transform .15s; }
.service-sub[open] > summary .icon { transform: rotate(45deg); }
.service-items { margin: 0 0 14px; padding-left: 22px; list-style: disc; color: var(--text-soft); font-size: 17px; line-height: 1.8; }
.service-items li { margin: 0 0 8px; }
.service-items ul { margin: 8px 0 0; padding-left: 26px; list-style: circle; }
.service-detail > .service-items { margin-top: 14px; }

/* ---------- Titoli di sezione ------------------------------------------- */
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 39px;
}
.section-heading .eyebrow { margin-bottom: 16px; }
.section-heading h2 { font-size: 43px; }
.section-aside { padding-bottom: 5px; font-size: 9px; letter-spacing: 2px; }
@media (max-width: 760px) {
  .section-heading { margin-bottom: 28px; }
  .section-heading h2 { font-size: 36px; }
  .section-aside { display: none; }
}

/* ---------- Pannello "Prenotazione Diretta" ----------------------------- */
.booking-panel {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  margin: 30px 0;
  padding: 45px;
  background: var(--band-warm);
}
.booking-panel h2 { margin: 20px 0; font-size: 39px; }
.booking-panel p { margin-bottom: 0; }
.booking-panel .booking-state { margin-top: 14px; font-size: 13px; font-weight: 500; }
.booking-choice { display: flex; flex-direction: column; justify-content: center; align-items: stretch; }
.apartment-selector { display: flex; gap: 10px; }
.apartment-selector .btn { flex: 1; height: 43px; font-size: 15px; }
.apartment-selector .btn[aria-pressed=false] .i-check { display: none; }
.apartment-selector .i-check { --icon: 14px; }
.booking-cta {
  width: 100%;
  height: 44px;
  margin-top: 15px;
  justify-content: space-between;
  background: transparent;
  font-size: 15px;
}
.booking-cta[aria-expanded=false] .i-minus,
.booking-cta[aria-expanded=true] .i-plus { display: none; }
.booking-detail { padding-left: 15px; border-left: 2px solid #7d7f70; }

/* Spazio in cui incollare il codice di Lodgify (vedi LEGGIMI.md) */
.lodgify-slot { margin-top: 15px; }
.lodgify-slot .booking-detail { margin: 0; }

@media (max-width: 1050px) { .booking-panel { gap: 30px; padding: 35px; } }
@media (max-width: 760px) {
  .booking-panel { grid-template-columns: 1fr; gap: 30px; margin-block: 15px; padding: 28px 22px; }
  .booking-panel h2 { font-size: 33px; }
}

/* ---------- Riga dei canali (Instagram, Facebook, WhatsApp...) ---------- */
.social-section { padding: 49px 0; text-align: center; }
.social-row {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 20px;
  margin-top: 22px;
}
.social-row .btn { height: 36px; gap: 8px; font-size: 16px; font-weight: 500; }
.social-row .brand-mark { width: 30px; height: 30px; }
.social-row .icon { --icon: 13px; }
.channel-detail { max-width: 620px; margin: 18px auto 0; }

@media (max-width: 760px) {
  .social-section { padding-block: 40px; }
  .social-row { gap: 5px; justify-content: space-between; }
  .social-row .btn {
    flex-direction: column;
    gap: 8px;
    height: auto;
    padding: 10px 2px;
    font-size: 13px;
  }
  .social-row .brand-mark { width: 28px; height: 28px; }
  .social-row .btn > .icon { display: none; }
}
@media (max-width: 360px) { .social-row .btn { font-size: 11px; } }

/* ---------- Cookie: banner e pannello preferenze ------------------------ */
.cookie-banner {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 40;
  width: min(460px, calc(100% - 40px));
  padding: 22px 24px 20px;
  background: var(--background);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px #282a2724;
}
.cookie-title { font-size: 26px; margin-bottom: 8px; }
.cookie-banner p, .cookie-dialog p { margin: 0; font-size: 15px; line-height: 1.6; }
.cookie-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 18px; }
.cookie-actions .btn { height: 42px; padding-inline: 18px; font-size: 15px; }
.cookie-actions .cookie-link { text-decoration: underline; text-underline-offset: 3px; }

.cookie-dialog {
  width: min(620px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 26px 28px;
  border: 1px solid var(--border);
  background: var(--background);
  color: var(--foreground);
  overflow: auto;
}
.cookie-dialog::backdrop { background: #282a27a6; }
.cookie-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.cookie-dialog-head h2 { font-size: 30px; }
.cookie-list { margin-top: 18px; border-top: 1px solid var(--border); }
.cookie-item { padding: 16px 0; border-bottom: 1px solid var(--border); }
.cookie-item-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.cookie-item h3 { font-family: var(--font-body); font-size: 18px; font-weight: 500; letter-spacing: 0; }
.cookie-always { font-size: 13px; color: var(--muted-foreground); }
.cookie-none { margin-top: 16px !important; }
.cookie-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.cookie-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.cookie-slider { position: absolute; inset: 0; border-radius: 26px; background: #b9b8ad; transition: background .15s; }
.cookie-slider::before { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.cookie-switch input:checked + .sr-only + .cookie-slider { background: var(--primary); }
.cookie-switch input:checked + .sr-only + .cookie-slider::before { transform: translateX(20px); }
.cookie-switch input:focus-visible + .sr-only + .cookie-slider { outline: 2px solid var(--ring); outline-offset: 2px; }
@media (max-width: 599px) {
  .cookie-banner { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 18px 18px 16px; }
  .cookie-title { font-size: 23px; }
  .cookie-actions .btn { flex: 1 1 auto; }
}

/* ---------- Contrasto elevato di Windows -------------------------------- */
@media (forced-colors: active) {
  .lumina-header, .lumina-footer, .lumina-navigation.is-open, .lumina-lightbox,
  .booking-panel, .homes-section, .closing-section, .map-embed, .cookie-banner, .cookie-dialog { background: Canvas; color: CanvasText; border-color: CanvasText; }
  .banner-copy { padding: 12px; background: Canvas; color: CanvasText; }
  .banner-copy h1, .banner-copy p, .banner-property-facts { color: CanvasText; }
  .banner-motion-toggle, .gallery-controls .btn { background: ButtonFace; color: ButtonText; border: 1px solid ButtonText; }
  .circle-link { border-color: ButtonText; }
  .text-link { border-color: LinkText; }
}

/* Titolo dei banner: peso 200 e ombra lievissima per la leggibilita' sulle foto chiare */
.banner-copy h1 { font-family: var(--font-display-banner); font-weight: 200; letter-spacing: -.035em; text-shadow: 0 1px 8px #00000038; }

/* Altre scritte del banner: stessa ombra lieve del titolo */
.banner-copy p, .banner-copy .eyebrow, .banner-property-facts { text-shadow: 0 1px 8px #00000038; }
.banner-copy .icon { filter: drop-shadow(0 1px 6px #00000038); }
.banner-actions .btn { text-shadow: none; }
/* Piccolo velo scuro, sfumato, dietro al logo bianco della home */
.banner-home .banner-shade::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 38% 62% at 9% 14%, #282a2761 0%, #282a2733 45%, #282a2700 100%);
}
