/* =========================================================
   Ghe Pensi Mì! — stili pagine catalogo / immobile / vetrina
   (complementare a styles.css)
   ========================================================= */

/* ---- Pezzi usati anche in home ---- */
.property-link {
  display: inline-block;
  margin-top: 6px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--green);
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}
.property-link:hover {
  border-color: var(--green);
}
.showcase-cta {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

/* ---- Page hero (catalogo) ---- */
.page-hero {
  padding: clamp(40px, 8vh, 86px) var(--gut) clamp(24px, 4vh, 40px);
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}
.page-hero-inner {
  max-width: var(--maxw);
  margin-inline: auto;
}
.page-hero h1 {
  font-size: clamp(30px, 5vw, 50px);
  margin: 6px 0 14px;
}
.page-hero-lead {
  color: var(--muted);
  font-size: clamp(17px, 2vw, 19px);
  max-width: 60ch;
}

/* ---- Catalogo ---- */
.catalog-section {
  padding-top: clamp(36px, 6vw, 64px);
}
.catalog-grid {
  display: grid;
  /* Sempre 3 colonne su desktop (2 su tablet, 1 su mobile — vedi media query). */
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: var(--maxw);
  margin-inline: auto;
}
.catalog-state {
  max-width: var(--maxw);
  margin: 0 auto 24px;
  background: var(--green-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  color: var(--ink-soft);
}
.property-photo {
  display: block;
}
.property-price {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  padding: 6px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-s);
}
.property-price small {
  font-weight: 500;
  color: var(--muted);
}

/* ---- CTA proprietari ---- */
.owner-cta {
  padding-top: 0;
}
.owner-cta-card {
  max-width: var(--maxw);
  margin-inline: auto;
  background: var(--blue-deep);
  color: #fff;
  border-radius: var(--radius-l);
  padding: clamp(28px, 4vw, 44px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 26px;
  flex-wrap: wrap;
}
.owner-cta-card h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  margin-bottom: 8px;
}
.owner-cta-card p {
  color: rgba(255, 255, 255, 0.82);
  max-width: 48ch;
}
.owner-cta-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* =========================================================
   Pagina singolo immobile
   ========================================================= */
.property-page {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: 24px var(--gut) clamp(60px, 8vw, 100px);
}
.property-crumbs {
  padding: 8px 0 18px;
}
.property-crumbs a {
  color: var(--muted);
  font-weight: 600;
  font-size: 15px;
}
.property-crumbs a:hover {
  color: var(--green);
}
.property-loading {
  padding: 60px 0;
  color: var(--muted);
}
.property-missing {
  padding: 60px 0;
  text-align: center;
}
.property-missing h1 {
  font-size: clamp(28px, 5vw, 40px);
  margin-bottom: 12px;
}
.property-missing p {
  color: var(--muted);
  margin-bottom: 22px;
}

.property-head {
  margin-bottom: 22px;
}
.property-head h1 {
  font-size: clamp(28px, 4.6vw, 46px);
  margin: 4px 0 8px;
}
.property-meta-line {
  color: var(--muted);
  font-weight: 500;
}

/* ---- CIN (Codice Identificativo Nazionale) ---- */
.property-cin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  padding: 5px 11px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink, #11151c);
  background: rgba(10, 49, 95, 0.06);
  border: 1px solid rgba(10, 49, 95, 0.18);
  border-radius: 8px;
}
.cin-tag {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0a315f;
}
.booking-cin {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink, #11151c);
}
.card-cin {
  margin: 2px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* =========================================================
   Pagine legali (Note legali / Privacy / Cookie)
   ========================================================= */
.legal-section {
  padding-top: clamp(32px, 5vw, 56px);
}
.legal-wrap {
  max-width: 760px;
  margin-inline: auto;
  display: grid;
  gap: 22px;
}
.legal-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: clamp(22px, 3vw, 34px);
}
.legal-card h2 {
  font-size: clamp(20px, 2.6vw, 26px);
  margin-bottom: 14px;
}
.legal-card h3 {
  font-size: 17px;
  margin: 18px 0 8px;
}
.legal-card p,
.legal-card li {
  color: var(--ink-soft);
  line-height: 1.65;
  margin-bottom: 12px;
}
.legal-card a {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
}
.legal-dl {
  margin: 0;
}
.legal-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 8px 18px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}
.legal-row:last-child {
  border-bottom: none;
}
.legal-row dt {
  font-weight: 700;
  color: var(--ink);
  font-size: 14.5px;
}
.legal-row dd {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14.5px;
  word-break: break-word;
}
.legal-note {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}
.legal-card ul,
.legal-card ol {
  margin: 0 0 12px;
  padding-left: 22px;
}
.legal-card ul {
  list-style: disc;
}
.legal-updated {
  margin-top: 12px;
  font-size: 13.5px;
  color: var(--muted);
  font-weight: 500;
}
@media (max-width: 560px) {
  .legal-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* ---- Galleria mosaico ---- */
.gallery {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
  margin-bottom: clamp(28px, 4vw, 44px);
}
.gallery-main,
.gallery-thumb {
  padding: 0;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  background: var(--paper-2);
}
.gallery-main {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-l);
}
.gallery-main img,
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-main:hover img,
.gallery-thumb:hover img {
  transform: scale(1.04);
}
.gallery-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gallery-thumb {
  aspect-ratio: 1 / 1;
}
.gallery-more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 28, 50, 0.55);
  color: #fff;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
}

/* ---- Layout contenuto + booking ---- */
.property-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
.property-highlights {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.property-highlights li {
  background: var(--green-soft);
  color: var(--green-deep);
  font-weight: 600;
  font-size: 14px;
  padding: 8px 15px;
  border-radius: 999px;
}
.property-block {
  margin-bottom: 32px;
}
.property-block h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin-bottom: 14px;
}
.property-block p {
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.amenities-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.amenity {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.amenity h3 {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}
.amenity p {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0;
}

/* ---- Booking box ---- */
.property-aside {
  position: sticky;
  top: 100px;
}
.booking-box {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 24px;
  box-shadow: var(--shadow);
}
.booking-box h2 {
  font-size: 21px;
  margin-bottom: 12px;
}
.booking-price {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 14px;
}
.booking-price strong {
  font-size: 22px;
  color: var(--ink);
}
.smoobu-calendar {
  width: 100%;
  min-height: 480px;
  border: 0;
  border-radius: var(--radius);
  margin-bottom: 14px;
  background: var(--paper-2);
}
.smoobu-embed {
  width: 100%;
  margin-bottom: 14px;
}
.smoobu-embed iframe {
  width: 100% !important;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper-2);
}
.booking-placeholder {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 14px;
}
.booking-alt {
  display: inline-block;
  margin-top: 12px;
  font-weight: 600;
  color: var(--green);
  font-size: 14.5px;
}
.booking-alt:hover {
  text-decoration: underline;
}
.booking-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

/* ---- Richiesta preventivo (date + WhatsApp) ---- */
.quote-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.quote-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}
.quote-field:last-child {
  grid-column: 1 / -1;
}
.quote-field input {
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  width: 100%;
}
.quote-field input:focus-visible {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.quote-warn {
  margin: -4px 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: #b06a6a;
}

/* ---- Calendario disponibilità (custom, da iCal) ---- */
.booking-body {
  margin-bottom: 4px;
}
.cal {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 12px 8px;
  margin-bottom: 14px;
  background: var(--white);
}
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.cal-title {
  font-weight: 700;
  font-size: 15px;
}
.cal-nav {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.cal-nav:hover {
  background: var(--green-soft);
  border-color: var(--green);
}
.cal-month + .cal-month {
  margin-top: 14px;
}
.cal-mname {
  text-align: center;
  font-weight: 600;
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.cal-dow,
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-dow {
  margin-bottom: 4px;
}
.cal-dow span {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding: 4px 0;
}
.cal-day {
  aspect-ratio: 1 / 1;
  border: 0;
  background: transparent;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.12s ease, color 0.12s ease;
}
.cal-day.empty {
  visibility: hidden;
  cursor: default;
}
.cal-day.free:hover {
  background: var(--green-soft);
}
.cal-day.past,
.cal-day.busy {
  cursor: not-allowed;
  font-weight: 500;
}
.cal-day.past {
  color: var(--line);
}
.cal-day.busy {
  color: #b06a6a;
  background: rgba(214, 110, 110, 0.14);
  text-decoration: line-through;
}
.cal-day.inrange {
  background: var(--green-soft);
  border-radius: 0;
}
.cal-day.checkin,
.cal-day.checkout {
  background: var(--green);
  color: #fff;
}
.cal-day.checkin {
  border-radius: 8px 0 0 8px;
}
.cal-day.checkout {
  border-radius: 0 8px 8px 0;
}
.cal-legend {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 8px 0 2px;
  font-size: 11.5px;
  color: var(--muted);
}
.cal-legend .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: -1px;
}
.cal-legend .dot.free {
  background: var(--green-soft);
  border: 1px solid var(--green);
}
.cal-legend .dot.busy {
  background: rgba(214, 110, 110, 0.3);
  border: 1px solid #b06a6a;
}

/* ---- Riepilogo prezzo ---- */
.booking-summary:not(:empty) {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-bottom: 14px;
}
.sum-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14.5px;
  margin-bottom: 6px;
}
.sum-row.muted {
  color: var(--muted);
  font-size: 13.5px;
}
.sum-row.total {
  font-weight: 700;
  font-size: 16px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
  margin-top: 2px;
}
.sum-hint {
  font-size: 14px;
  color: var(--muted);
}
.sum-warn {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #b06a6a;
}
.booking-box .button.is-disabled {
  opacity: 0.5;
  pointer-events: none;
}
.booking-box [data-booking-online] {
  margin-top: 10px;
  background: var(--white);
  color: var(--green-deep);
  border: 1px solid var(--green);
}
.booking-box [data-booking-online]:hover {
  background: var(--green-soft);
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(6, 28, 50, 0.92);
  display: grid;
  place-items: center;
  padding: 30px;
}
.lightbox[hidden] {
  display: none;
}
.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 86vh;
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: none;
  cursor: pointer;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  transition: background 0.2s ease;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}
.lightbox-close {
  top: 22px;
  right: 22px;
  font-size: 30px;
}
.lightbox-prev {
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}
.lightbox-next {
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1000px) {
  .property-layout {
    grid-template-columns: 1fr;
  }
  .property-aside {
    position: static;
  }
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .gallery {
    grid-template-columns: 1fr;
  }
  .gallery-side {
    grid-template-columns: 1fr 1fr;
  }
  .amenities-grid {
    grid-template-columns: 1fr;
  }
  .owner-cta-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================
   Landing locali SEO + Blog (complementare a styles.css)
   ========================================================= */

/* Sezione con fondo tenue per dare ritmo verticale */
.section.tint {
  background: var(--paper-2);
}

/* Link dentro le risposte FAQ: visibili come link */
.faq-list details p a {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
}

/* Contenitore di lettura confortevole dentro una .section */
.lp-wrap {
  max-width: 760px;
  margin-inline: auto;
}
.lp-wrap.wide {
  max-width: var(--maxw);
}
.lp-wrap h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  margin-bottom: 16px;
}
.lp-wrap h3 {
  font-size: clamp(18px, 2.3vw, 22px);
  margin: 24px 0 8px;
}
.lp-wrap p,
.lp-wrap li {
  color: var(--ink-soft);
  line-height: 1.72;
  margin-bottom: 14px;
}
.lp-wrap ul,
.lp-wrap ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
.lp-wrap ul {
  list-style: disc;
}
.lp-wrap a:not(.button) {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
}
.lp-lead {
  font-size: clamp(17px, 2vw, 19px);
  color: var(--muted);
  max-width: 62ch;
}

/* Riquadro CTA contestuale (a metà e in fondo agli articoli) */
.inline-cta {
  max-width: 760px;
  margin: 30px auto;
  background: var(--blue-deep);
  color: #fff;
  border-radius: var(--radius-l);
  padding: clamp(24px, 4vw, 36px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
}
.inline-cta h2,
.inline-cta h3 {
  font-size: clamp(20px, 3vw, 27px);
  margin: 0 0 6px;
}
.inline-cta p {
  color: rgba(255, 255, 255, 0.82);
  margin: 0;
  max-width: 44ch;
}
.inline-cta .button.primary {
  white-space: nowrap;
}

/* Griglia di rimandi interni (altre zone / articoli) */
.link-cards {
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.link-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 24px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.link-card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: var(--shadow-s);
}
.link-card .eyebrow {
  margin-bottom: 8px;
}
.link-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 6px;
}
.link-card p {
  color: var(--muted);
  font-size: 14.5px;
  margin: 0;
}

/* Meta riga articolo (data · tempo di lettura) */
.post-meta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  margin-top: 12px;
}
.post-disclaimer {
  margin-top: 26px;
  padding: 16px 18px;
  background: var(--green-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--ink-soft);
}
.post-disclaimer strong {
  color: var(--ink);
}

/* Card articolo nell'indice blog */
.post-grid {
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-s);
}
.post-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.post-card-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card h2 {
  font-size: 21px;
  margin: 6px 0 8px;
}
.post-card p {
  color: var(--muted);
  font-size: 15px;
  margin: 0 0 16px;
}
.post-card .property-link {
  margin-top: auto;
}

@media (max-width: 900px) {
  .link-cards,
  .post-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 620px) {
  .link-cards,
  .post-grid {
    grid-template-columns: 1fr;
  }
  .inline-cta {
    flex-direction: column;
    align-items: flex-start;
  }
}
