/* ==========================================================================
   LUMINA — pages.css
   Stili delle singole sezioni: home, pagine degli appartamenti,
   contatti, prenota.
   ========================================================================== */

/* ---------- Home: filosofia -------------------------------------------- */
.philosophy { padding-block: 40px; }
.philosophy h2 { font-size: 45px; }
.philosophy p { max-width: none; margin-bottom: 0; }
@media (max-width: 760px) {
  .philosophy h2 { font-size: 36px; }
}

/* ---------- Home: "Scegli la tua casa" --------------------------------- */
.homes-section { padding: 46px 0 48px; background: var(--band-light); }
.home-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
.home-card { min-width: 0; }
.home-card-title { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; }
.home-card-title h3 { font-size: 36px; }
.circle-link {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid #aaa99d;
  border-radius: 50%;
  transition: background .2s;
}
.circle-link:hover { background: #e3dfd3; }
.circle-link .icon { --icon: 23px; }
.home-card-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 25px;
  margin-top: 17px;
  font-size: 17px;
  color: var(--muted-foreground);
}
.home-card-facts span { display: flex; align-items: center; gap: 9px; }
.home-card-facts .icon { --icon: 20px; }

@media (max-width: 760px) {
  .home-card-title { margin-top: 19px; }
  .home-card-title h3 { font-size: 33px; }
  .home-card-facts { flex-direction: column; }
}
@media (min-width: 600px) and (max-width: 760px) {
  .home-grid { gap: 24px; }
  .home-card-title h3 { font-size: 30px; }
}
@media (max-width: 599px) {
  .philosophy { padding-block: 28px; }
  .homes-section { padding-block: 32px; }
  .home-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
}
/* separatore tra Lumina 1 e Lumina 2: verticale su computer, orizzontale quando le schede sono una sotto l'altra */
.home-card + .home-card { position: relative; }
.home-card + .home-card::before { content: ""; position: absolute; top: 0; bottom: 0; left: -18px; width: 1px; background: #8a8b80; opacity: .6; }
@media (max-width: 1050px) { .home-card + .home-card::before { left: -12px; } }
@media (max-width: 760px) { .home-card + .home-card::before { top: -20px; bottom: auto; left: 0; right: 0; width: auto; height: 1px; } }

/* ---------- Home: "Conosci il tuo Host" -------------------------------- */
.host-section {
  display: grid;
  grid-template-columns: minmax(0, clamp(180px, 22.5%, 270px)) minmax(0, 1fr);   /* colonna della foto */
  column-gap: clamp(28px, 4vw, 56px);
  align-items: stretch;
  padding-block: 30px;
}
.host-image { position: relative; display: flex; flex-direction: column; margin: 0; }
.host-photo { position: relative; flex: none; aspect-ratio: 960 / 1102; }
.host-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: left center; }
.host-name { margin: 22px 0 0; font-weight: 700; color: var(--muted-foreground); }
.host-photo img.host-sign { inset: auto 12px 4px auto; width: 112px; height: auto; }   /* firma sovrapposta alla foto, in basso a destra */
.host-image figcaption { margin: 0 0 12px; font-size: 8px; letter-spacing: 1.8px; }
.host-image .text-link { align-self: flex-start; margin-top: 12px; }
.host-copy { min-width: 0; }
.host-copy h2 { font-size: 45px; }
.host-copy p { max-width: none; }
.host-detail { margin-bottom: 25px; padding: 16px 0; border-top: 1px solid var(--border); }

@media (max-width: 1050px) {
  .host-copy h2 { font-size: 38px; }
}
@media (max-width: 760px) {
  .host-section { gap: 35px; }
  .host-copy h2 { font-size: 34px; }
}
@media (min-width: 600px) and (max-width: 760px) {
  .host-section { gap: 6%; }
}
/* Telefono: a sinistra scritta, foto, nome e link; a destra titolo e frase; sotto "Qualcosa in piu" */
@media (max-width: 599px) {
  .host-section { grid-template-columns: minmax(0, 0.64fr) minmax(0, 1.5fr); gap: 0 24px; grid-template-rows: auto 1fr auto; padding-block: 20px; }
  .host-image { grid-column: 1; grid-row: 1 / span 2; }
  .host-photo { flex: none; height: auto; min-height: 0; aspect-ratio: 960 / 1102; }
  .host-image figcaption { margin-bottom: 12px; line-height: 1.5; white-space: nowrap; position: relative; z-index: 1; }   /* una riga */
  .host-photo img.host-sign { inset: auto 6px 2px auto; width: 39px; }
  .host-image .text-link { font-size: 14px; white-space: nowrap; gap: 6px; margin-top: 10px; }
  .host-copy { display: contents; }
  .host-copy h2 { grid-column: 2; grid-row: 1; align-self: start; padding-top: 26px; white-space: nowrap; font-size: clamp(16px, calc((100vw - 64px) * 0.7 / 9.4), 32px); }   /* una riga, si adatta allo schermo */
  .host-copy > p, .host-copy > .clamp-wrap { grid-column: 2; grid-row: 2; align-self: start; margin-block: 0; }
  .host-copy > .clamp-wrap > p { margin-block: 0; }
  .host-copy > details { grid-column: 1 / -1; grid-row: 3; margin: 24px 0 0; }
}

/* ---------- Chiusura (comune a home) ----------------------------------- */
.closing-section { padding: 44px 24px 46px; text-align: center; background: var(--band-warm); }
.closing-section h2 { margin: 20px 0 29px; font-size: 48px; }
.closing-actions { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 16px; }
.closing-actions .btn {
  height: auto;
  min-height: 72px;
  padding: 18px 32px;
  gap: 18px;
  font-size: 22px;
  white-space: normal;
}
.closing-actions .icon { --icon: 22px; }
.closing-whatsapp { background: transparent; }
.closing-whatsapp .brand-mark { width: 28px; height: 28px; }
@media (max-width: 760px) {
  .closing-section h2 { font-size: 38px; }
}
@media (max-width: 599px) {
  .closing-section { padding: 32px 20px; }
  .closing-actions { gap: 12px; }
  .closing-actions .btn { min-height: 60px; padding: 14px 22px; font-size: 20px; }
  .closing-actions .btn .icon:first-child { display: none; }
}

/* ---------- Pagina appartamento ---------------------------------------- */
.apartment-text { padding-block: 38px 48px; }
.apartment-text p { margin: 0; max-width: none; }

/* Dov'è + servizi, su due colonne allineate */
.location-services {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: auto 1fr;
  column-gap: clamp(24px, 5vw, 65px);
  row-gap: 27px;
  align-items: start;
  padding: 0 0 85px;
}
.location-block, .service-block {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: 1 / span 2;
  min-width: 0;
}
.location-block { grid-column: 1; }
.service-block { grid-column: 2; }
.location-services h2 { margin: 0; font-size: 35px; }
.service-detail { padding: 18px 0; }
.service-detail > summary { min-height: 30px; }
.service-detail:first-of-type { border-top: 1px solid var(--border); }
@media (max-width: 760px) {
  .location-services { padding-bottom: 50px; }
  .location-services h2 { font-size: 32px; }
}
@media (max-width: 599px) {
  .location-services { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; row-gap: 36px; }
  .location-block, .service-block { display: block; grid-column: auto; grid-row: auto; }
  .map-embed { height: 300px; }
  .location-services h2 { margin-bottom: 22px; }
}

/* Gli ambienti: gallerie alternate a sinistra e a destra */
.rooms-section { padding-top: 65px; border-top: 1px solid var(--border); }
.rooms-section .section-heading { margin-bottom: 15px; }
.rooms-section .section-heading h2 { font-size: 42px; }
.room-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 6vw, 80px);
  align-items: center;
  margin: 45px 0 65px;
}
.room-row > .gallery { grid-column: 1; grid-row: 1; min-width: 0; }
.room-row > .room-copy { grid-column: 2; grid-row: 1; min-width: 0; }
.room-reverse > .gallery { grid-column: 2; }
.room-reverse > .room-copy { grid-column: 1; }
.room-copy h3 { margin-top: 0; font-size: 35px; }
@media (max-width: 760px) {
  .rooms-section { padding-top: 45px; }
  .rooms-section .section-heading h2 { font-size: 35px; }
  .room-row { margin-bottom: 42px; }
  .room-copy h3 { font-size: 31px; }
  .room-copy p { margin-top: 15px; }
}
@media (max-width: 599px) {
  .room-row { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .room-row > .gallery, .room-reverse > .gallery { grid-column: 1; grid-row: 1; }
  .room-row > .room-copy, .room-reverse > .room-copy { grid-column: 1; grid-row: 2; }
}

#ambienti, #disponibilita { scroll-margin-top: 108px; }

/* ---------- Contatti e Prenota ----------------------------------------- */
.contact-page, .reservation-page { padding-block: 70px 90px; }
.contact-page h1, .contact-hero h1, .reservation-page h1 {
  margin-top: 26px;
  font-size: 65px;
  white-space: pre-line;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "intro list" "reach list";   /* a sinistra testo e "Raggiungi Lumina", a destra i contatti */
  grid-template-rows: auto 1fr;
  gap: 0 110px;
  margin-top: 70px;
}
.contact-grid > div:first-child { grid-area: intro; }
.contact-grid > .contact-list { grid-area: list; }
.contact-grid > .reach-list { grid-area: reach; align-self: start; margin-top: 34px; }
.contact-grid h2 { font-size: 34px; }
.contact-list article {
  display: flex;
  gap: 23px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 30px;
}
.contact-list article:first-child { padding-top: 0; }
.contact-list h3 { font-size: 24px; }
.contact-list p { margin: 8px 0 0; }
.contact-list article > .icon { --icon: 24px; color: #111; }
.contact-list article > .brand-mark { width: 25px; height: 25px; }
.contact-list .text-link .icon { --icon: 17px; }

.legal-section { padding-top: 35px; border-top: 1px solid var(--border); }
.legal-section h2 { font-size: 25px; }
.legal-section p { max-width: 850px; }

.reservation-lead { margin-bottom: 45px; }
.reservation-page > .text-link { margin-top: 26px; }

@media (max-width: 1050px) { .contact-grid { column-gap: 60px; } }
@media (max-width: 760px) {
  .contact-page, .reservation-page { padding-block: 45px 60px; }
  .contact-hero h1 { font-size: 45px; letter-spacing: -1.8px; }
  .contact-page h1, .reservation-page h1 { font-size: 45px; letter-spacing: -1.8px; }
  .contact-grid { grid-template-columns: 1fr; grid-template-areas: "intro" "list" "reach"; grid-template-rows: auto; gap: 40px; margin-top: 45px; }
  .contact-grid h2 { font-size: 31px; }
  .contact-list article:first-child { padding-top: 20px; }
  .legal-section h2 { font-size: 24px; }
}

/* Titolo "Gli Ambienti" con il pulsante "Tutte le foto" accanto */
.section-heading-actions { justify-content: flex-start; align-items: center; flex-wrap: wrap; gap: 14px 26px; }
.all-photos { height: 48px; padding-inline: 24px; gap: 12px; font-size: 16px; font-weight: 500; box-shadow: 0 4px 14px rgba(40, 42, 39, .22); }   /* in evidenza: pieno e piu' grande */
.all-photos .icon { --icon: 22px; }

/* Telefono nella pagina Contatti: senza link su computer */
.text-link.is-plain { gap: 0; padding-bottom: 0; border-bottom: 0; cursor: text; }
.text-link.is-plain .icon { display: none; }

/* Contatti: indirizzi e codici */
.address-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 0; }
.address-link { padding-bottom: 1px; border-bottom: 1px solid #8a8b80; }
.address-link:hover { border-bottom-color: var(--foreground); }
.contact-list .text-link .icon:first-child { --icon: 20px; }
.cin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px clamp(24px, 5vw, 60px); margin-top: 28px; }
.cin-grid h3 { font-size: 38px; }
.cin-address { margin: 18px 0 20px; font-size: 17px; }
.cin-grid dl { margin: 0; }
.cin-grid dl > div { display: flex; gap: 20px; margin-bottom: 8px; }
.cin-grid dt { min-width: 36px; font-weight: 700; }
.cin-grid dt abbr { text-decoration: none; cursor: help; }
.cin-grid dd { margin: 0; letter-spacing: .03em; word-break: break-all; }
@media (max-width: 760px) { .cin-grid { grid-template-columns: 1fr; } .cin-grid h3 { font-size: 32px; } }

/* ---------- Pagina 404 (italiano + inglese) ------------------------------ */
.nf-page {
  display: flex; justify-content: center;
  padding: 44px 24px 80px;
  background: radial-gradient(ellipse 70% 60% at 50% 0%, var(--band-warm), var(--background) 70%);
}
.nf-card { width: 100%; max-width: 640px; text-align: center; }
.nf-code {
  font-family: var(--font-display); font-weight: 100;
  font-size: clamp(84px, 15vw, 150px); line-height: 1; letter-spacing: -.05em;
  color: var(--ring); opacity: .22; margin-bottom: 6px;
}
.nf-card .eyebrow { display: block; margin-bottom: 22px; }
.nf-lang h1, .nf-lang h2 { font-size: clamp(34px, 5vw, 46px); line-height: 1.1; margin-bottom: 14px; }
.nf-lang h2 { font-size: clamp(28px, 4vw, 36px); }
.nf-lang p { color: var(--text-soft); max-width: 480px; margin: 0 auto 26px; font-size: 17px; line-height: 1.6; }
.nf-rule { width: 56px; border: 0; border-top: 1px solid var(--input); margin: 30px auto; }
@media (max-width: 599px) { .nf-page { padding: 56px 20px 70px; } .nf-rule { margin: 34px auto; } }
.apartment-text p + p { margin-top: 1.1em; }

/* Contatti: fascia titolo scura con fumetti dei saluti */
.contact-hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: 324px; background: var(--band-contact); border-bottom: 1px solid var(--border); }   /* Contatti e Prenota: stessa altezza */
.contact-hero .wrap { position: relative; z-index: 1; padding-block: 28px; }
.contact-hero + .contact-page { padding-top: 55px; }
.contact-hero + .contact-page .contact-grid { margin-top: 0; }
.contact-art {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(600px, 46vw); pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 22%); mask-image: linear-gradient(to right, transparent, #000 22%);
}
.contact-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
/* Sotto i 1000px il disegno diventa uno sfondo tenue a tutta larghezza dietro il titolo */
@media (max-width: 999px) {
  .contact-art { width: 100%; opacity: .32; -webkit-mask-image: none; mask-image: none; }
  .contact-hero:not(.contact-hero--light) .contact-art { opacity: .2; }
}
@media (max-width: 760px) { .contact-hero { min-height: 248px; } .contact-hero .wrap { padding-block: 24px; } .contact-hero + .contact-page { padding-top: 35px; } }

/* Prenota: stessa fascia di Contatti ma con il colore del sito, calendario in prospettiva e medaglioni */
.contact-hero--light { --band-contact: var(--background); }
.contact-hero--light .reservation-lead { margin-bottom: 0; }
.contact-hero + .reservation-page { padding-top: 50px; }

/* Contatti: sezione CIN e social piu' compatte */
.contact-page .social-section { padding-block: 30px; }
.contact-page .legal-section { padding-top: 26px; }
.contact-page .legal-section h2 { font-size: 20px; }
.contact-page .legal-section p:not(.cin-address) { font-size: 14px; line-height: 1.5; }
.contact-page .cin-grid { margin-top: 8px; display: flex; justify-content: space-evenly; gap: 12px; }   /* desktop: le due schede centrate, con lo stesso spazio tra loro e dai bordi */
.contact-page .cin-grid h3 { font-size: 20px; white-space: nowrap; }
.contact-page .cin-address { margin: 4px 0 8px; font-size: 14px; line-height: 1.4; }
.contact-page .cin-grid dl > div { gap: 10px; margin-bottom: 2px; font-size: 14px; }
.contact-page .cin-grid dt { min-width: 0; }
.contact-page .cin-grid dd { letter-spacing: .02em; word-break: normal; }
.contact-hero + .contact-page { padding-bottom: 40px; }
/* Telefono: le due schede CIN restano affiancate, con caratteri piu' piccoli */
@media (max-width: 760px) {
  .contact-page .cin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; justify-content: normal; }
  .contact-page .cin-grid h3 { font-size: clamp(13px, 4.2vw, 17px); white-space: nowrap; }   /* nome appartamento su una riga */
  .contact-page .cin-address { margin: 6px 0 10px; font-size: clamp(10px, 3vw, 12px); line-height: 1.4; }
  .contact-page .cin-grid dl > div { gap: 6px; margin-bottom: 3px; font-size: clamp(9px, 2.9vw, 11.5px); white-space: nowrap; }   /* CIN e CIR su una riga ciascuno */
  .contact-page .cin-grid dt { min-width: 0; }
  .contact-page .cin-grid dd { letter-spacing: 0; word-break: normal; }
}
.contact-list #whatsapp > .icon { transform: scale(1.18); }

/* Descrizioni lunghe: prime 5 righe + pulsante "Leggi tutto" in basso a destra (assets/js/clamp.js) */
.clamp-wrap { position: relative; }
.clamp-wrap.is-open { padding-bottom: 46px; }
.is-clamped { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 1.6em), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 1.6em), transparent); }
.clamp-toggle {
  position: absolute; right: 0; bottom: 0; z-index: 1;
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 14px;
  border: 1px solid var(--input); border-radius: var(--radius); background: var(--background); color: var(--foreground);
  font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; box-shadow: 0 1px 6px rgba(40, 42, 39, .08);
}
.clamp-toggle:hover { background: var(--accent); }
.clamp-toggle .icon { --icon: 14px; transform: rotate(90deg); }
.clamp-wrap.is-open .clamp-toggle .icon { transform: rotate(-90deg); }
.clamp-toggle[hidden] { display: none; }

/* Telefono: "Tutte le foto" resta accanto al titolo "Gli Ambienti", sulla stessa riga */
@media (max-width: 599px) {
  .rooms-section .section-heading-actions { flex-wrap: nowrap; gap: 14px; }
  .rooms-section .section-heading h2 { font-size: clamp(24px, 9vw, 35px); white-space: nowrap; }
  .all-photos { height: 42px; padding-inline: 16px; gap: 8px; font-size: 14px; white-space: nowrap; flex: none; }
  .all-photos .icon { --icon: 19px; }
}
@media (max-width: 399px) {
  .rooms-section .section-heading-actions { gap: 10px; }
  .all-photos { height: 40px; padding-inline: 12px; gap: 6px; font-size: 13px; }
  .all-photos .icon { --icon: 17px; }
}

/* ---------- Contatti: "Raggiungi Lumina" (fisarmoniche con le indicazioni) ----
   Markup generato da reach.py. I pulsanti +/x stanno tutti sulla stessa verticale (--reach-col). */
.reach-list { --reach-col: 262px; }
.reach-list > .service-detail { border: 0; }
.reach-list > .service-detail + .service-detail { position: relative; margin-top: 18px; padding-top: 18px; }
.reach-list > .service-detail + .service-detail::before {   /* divisorio: dal bordo sinistro alla fine del pulsante */
  content: ""; position: absolute; top: 0; left: 0; height: 1px;
  width: calc(var(--reach-col) + 12px + 30px); background: #8a8b80;
}
.reach-list > .service-detail > summary { align-items: flex-start; justify-content: flex-start; }
.reach-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.reach-title, .reach-sub > summary {
  display: grid; grid-template-columns: var(--reach-col) auto; align-items: center; justify-content: start;
  column-gap: 12px; white-space: nowrap;
}
.reach-btn {
  display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px;
  border: 1px solid var(--input); transition: background .15s, border-color .15s;
}
.reach-list summary:hover .reach-btn { background: rgba(0, 0, 0, .04); border-color: #111; }
.reach-addr-link { display: inline-flex; align-items: center; gap: 9px; padding-bottom: 0; border-bottom: 0; font-size: 15px; }
.reach-addr-link strong { font-weight: 600; }
.service-detail[open] > summary .reach-addr-link .icon { transform: none; }   /* la freccia del link non ruota */
.gmaps-mark { width: 20px; height: 20px; flex: none; margin-right: 2px; }
.reach-list .service-body { margin-left: 0; padding: 4px 0 14px; border-left: 0; }
.reach-sub-list { margin-top: 6px; }
.reach-sub > summary { padding: 8px 0; list-style: none; cursor: pointer; font-size: 16px; }
.reach-sub > summary::-webkit-details-marker { display: none; }
.reach-sub > summary .icon { flex: none; transition: transform .15s; }
.reach-sub[open] > summary .icon { transform: rotate(45deg); }
.reach-sub-body { padding: 0 0 8px; }
.reach-opt { margin: 18px 0 8px; font-size: 15px; font-weight: 500; letter-spacing: .01em; }
.reach-opt:first-child { margin-top: 4px; }
.reach-steps { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.6; color: var(--muted-foreground); list-style: decimal; }
.reach-steps li { margin: 0 0 4px; padding-left: 4px; list-style: decimal; }
.reach-costs { margin: 8px 0 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.55; color: var(--muted-foreground); }
.reach-costs li { position: relative; margin: 0 0 3px; padding-left: 14px; }
.reach-costs li::before { content: "•"; position: absolute; left: 0; }
@media (max-width: 380px) {
  .reach-list { --reach-col: 218px; }
  .reach-title { font-size: 16px; }
  .reach-sub > summary { font-size: 14px; }
}

/* Pulsante "Organizza un soggiorno" */
.contact-cta { gap: 14px; margin-top: 4px; }
.contact-cta .icon { --icon: 20px; }

/* Foto cliccabili (data-href: apre la pagina; data-fullscreen: apre lo schermo intero) */
.gallery.is-link { cursor: pointer; }
.gallery.is-zoomable { cursor: zoom-in; }

/* Contatti: fascia CIN/CIR a tutta larghezza con lo sfondo beige delle altre sezioni */
.contact-page .legal-section { background: var(--band-warm); border-top: 0; padding-bottom: 30px; box-shadow: 0 0 0 100vmax var(--band-warm); clip-path: inset(0 -100vmax); }

/* Mobile: niente link "Apri in Google Maps" sotto la mappa e meno spazio prima di "Gli ambienti" */
@media (max-width: 599px) {
  .map-open { display: none; }
  .location-services { padding-bottom: 0; }
  .rooms-section { border-top: 0; }
}
