/*
Theme Name: Casa Vacanza Clivis
Theme URI: https://casavacanza.clivis.it
Author: Casa Vacanza Clivis
Description: Tema WordPress su misura per la vetrina e le richieste di prenotazione di Casa Vacanza Clivis.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: liri-guesthouse
*/

:root {
  --ink: #18302d;
  --ink-soft: #4e625e;
  --paper: #fbf8f2;
  --paper-strong: #f1eadf;
  --white: #fff;
  --sage: #78978e;
  --sage-dark: #395f57;
  --terracotta: #b9694e;
  --gold: #c79b56;
  --line: rgba(24, 48, 45, .14);
  --shadow: 0 22px 60px rgba(24, 48, 45, .14);
  --radius: 24px;
  --wrap: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.menu-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed !important; z-index: 9999; top: 12px; left: 12px;
  width: auto; height: auto; padding: 10px 16px; margin: 0;
  clip: auto; background: var(--white); border-radius: 8px;
}
.site-wrap { width: var(--wrap); margin-inline: auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 16px; color: var(--terracotta);
  font-size: .76rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 28px; height: 2px; background: currentColor; }
h1, h2, h3 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 500; line-height: 1.08; }
h1 { font-size: clamp(3.1rem, 7vw, 6.9rem); letter-spacing: -.055em; }
h2 { font-size: clamp(2.25rem, 4.8vw, 4.4rem); letter-spacing: -.04em; }
h3 { font-size: clamp(1.35rem, 2.4vw, 2rem); }
p { margin: 0 0 1em; }
.lead { color: var(--ink-soft); font-size: clamp(1.05rem, 1.7vw, 1.25rem); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--sage-dark); color: var(--white);
  font-weight: 750; cursor: pointer;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.btn:hover, .btn:focus-visible { transform: translateY(-2px); background: var(--ink); box-shadow: 0 12px 30px rgba(24,48,45,.2); }
.btn--ghost { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.08); backdrop-filter: blur(8px); }
.btn--light { background: var(--white); color: var(--ink); }
.btn--light:hover, .btn--light:focus-visible { background: var(--paper-strong); color: var(--ink); }

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100;
  transition: background .25s ease, box-shadow .25s ease;
}
.site-header.is-scrolled { background: rgba(251,248,242,.96); box-shadow: 0 8px 30px rgba(24,48,45,.09); backdrop-filter: blur(14px); }
.header-inner { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--white); }
.is-scrolled .brand { color: var(--ink); }
.brand-mark { width: 41px; height: 41px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-family: Georgia, serif; font-size: 1.1rem; }
.brand-name { display: grid; line-height: 1.05; }
.brand-name strong { font-family: Georgia, serif; font-size: 1.08rem; font-weight: 500; }
.brand-name small { margin-top: 4px; font-size: .61rem; letter-spacing: .2em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: 30px; color: var(--white); font-size: .9rem; font-weight: 700; }
.is-scrolled .nav-links { color: var(--ink); }
.nav-links a:not(.btn) { position: relative; }
.nav-links a:not(.btn)::after { content: ""; position: absolute; inset: auto 0 -7px; height: 2px; transform: scaleX(0); background: currentColor; transition: transform .2s; }
.nav-links a:hover::after { transform: scaleX(1); }
.menu-toggle { display: none; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.4); border-radius: 50%; background: transparent; color: white; }
.is-scrolled .menu-toggle { color: var(--ink); border-color: var(--line); }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after { content: ""; display: block; width: 19px; height: 2px; margin: 4px auto; background: currentColor; transition: .2s; }

.hero { min-height: 95svh; position: relative; display: grid; align-items: end; overflow: hidden; color: var(--white); background: var(--ink); }
.hero-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::before { content: ""; position: absolute; z-index: 1; inset: 0; background: linear-gradient(90deg, rgba(12,28,26,.82) 0%, rgba(12,28,26,.42) 49%, rgba(12,28,26,.14) 75%), linear-gradient(0deg, rgba(12,28,26,.5), transparent 45%); }
.hero-content { position: relative; z-index: 2; padding: 170px 0 78px; }
.hero-copy { max-width: 790px; }
.hero h1 span { display: block; color: #d7b576; font-style: italic; }
.hero-text { max-width: 640px; margin-top: 23px; color: rgba(255,255,255,.86); font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 31px; }
.hero-facts { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); max-width: 790px; margin-top: 55px; padding-top: 26px; border-top: 1px solid rgba(255,255,255,.3); }
.hero-facts div { padding: 0 24px; border-left: 1px solid rgba(255,255,255,.26); }
.hero-facts div:first-child { padding-left: 0; border-left: 0; }
.hero-facts strong { display: block; font-family: Georgia, serif; font-size: 1.8rem; font-weight: 500; }
.hero-facts span { color: rgba(255,255,255,.68); font-size: .78rem; text-transform: uppercase; letter-spacing: .11em; }

.section { padding: clamp(84px, 11vw, 145px) 0; }
.section-head { display: grid; grid-template-columns: minmax(0,.9fr) minmax(280px,.55fr); align-items: end; gap: 70px; margin-bottom: 58px; }
.section-head .lead { max-width: 520px; justify-self: end; }
.intro-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 7vw, 100px); align-items: center; }
.intro-visual { position: relative; padding: 0 40px 45px 0; }
.intro-visual img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.intro-card { position: absolute; right: 0; bottom: 0; width: min(260px,65%); padding: 25px; border-radius: 18px; background: var(--terracotta); color: white; box-shadow: var(--shadow); }
.intro-card strong { display: block; font-family: Georgia, serif; font-size: 1.75rem; }
.intro-card span { font-size: .84rem; color: rgba(255,255,255,.78); }
.intro-copy .lead { margin: 25px 0; }
.feature-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin: 32px 0 0; padding: 0; list-style: none; }
.feature-list li { display: flex; align-items: center; gap: 12px; padding: 15px 0; border-top: 1px solid var(--line); font-weight: 700; }
.feature-list svg { width: 22px; height: 22px; color: var(--terracotta); flex: 0 0 auto; }

.gallery-section { overflow: hidden; background: var(--ink); color: var(--white); }
.gallery-section .lead { color: rgba(255,255,255,.65); }
.gallery-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; grid-template-rows: repeat(2, 285px); gap: 14px; }
.gallery-item { position: relative; overflow: hidden; border: 0; padding: 0; border-radius: 18px; background: #243f3b; cursor: zoom-in; }
.gallery-item:first-child { grid-row: 1 / 3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-item:hover img { transform: scale(1.035); }
.gallery-item::after { content: "+"; position: absolute; right: 14px; bottom: 14px; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); font-size: 1.3rem; transform: translateY(8px); opacity: 0; transition: .2s; }
.gallery-item:hover::after { transform: translateY(0); opacity: 1; }
.gallery-more { margin-top: 22px; color: rgba(255,255,255,.65); font-size: .88rem; }

.amenities-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.amenity { min-height: 210px; padding: 31px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.46); }
.amenity-number { display: block; margin-bottom: 38px; color: var(--terracotta); font-size: .72rem; letter-spacing: .16em; }
.amenity p { margin: 10px 0 0; color: var(--ink-soft); font-size: .95rem; }

.location { background: var(--paper-strong); }
.location-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 28px; align-items: stretch; }
.location-copy { padding: clamp(36px,5vw,68px); border-radius: var(--radius); background: var(--sage-dark); color: var(--white); }
.location-copy .eyebrow { color: #dfb87a; }
.location-copy p { color: rgba(255,255,255,.72); }
.location-address { margin: 28px 0; padding: 23px 0; border-block: 1px solid rgba(255,255,255,.18); }
.location-address strong { display: block; font-family: Georgia, serif; font-size: 1.45rem; font-weight: 500; }
.location-points { display: grid; gap: 13px; margin-bottom: 28px; }
.location-points span { display: flex; gap: 10px; align-items: center; }
.location-points span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #dfb87a; }
.map-card { min-height: 520px; position: relative; display: grid; place-items: center; overflow: hidden; border-radius: var(--radius); background: #d9d2c5; }
.map-card::before { content: ""; position: absolute; inset: 0; opacity: .42; background-image: linear-gradient(25deg, transparent 47%, #aebbb5 48%, #aebbb5 52%, transparent 53%), linear-gradient(155deg, transparent 47%, #c5a77c 48%, #c5a77c 52%, transparent 53%); background-size: 110px 95px, 160px 130px; }
.map-card--photo { background-position: center; background-size: cover; }
.map-card--photo::before { opacity: 1; background: linear-gradient(0deg, rgba(16,40,36,.34), rgba(16,40,36,.03) 65%); }
.map-pin { position: relative; z-index: 1; width: 180px; height: 180px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.88); box-shadow: var(--shadow); text-align: center; }
.map-pin strong { display: block; font-family: Georgia, serif; font-size: 1.2rem; }
.map-pin span { display: block; margin-top: 3px; color: var(--ink-soft); font-size: .78rem; }

.booking-section { position: relative; overflow: hidden; background: var(--white); }
.booking-grid { display: grid; grid-template-columns: .72fr 1.28fr; gap: clamp(36px,6vw,82px); align-items: start; }
.booking-copy { position: sticky; top: 120px; }
.booking-copy .lead { margin: 25px 0; }
.booking-note { display: flex; gap: 13px; margin-top: 30px; padding: 20px; border-radius: 16px; background: var(--paper-strong); color: var(--ink-soft); font-size: .9rem; }
.booking-note strong { color: var(--ink); }
.booking-form-shell { padding: clamp(25px,4vw,50px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 30px 70px rgba(24,48,45,.09); }

.liri-booking-form { display: grid; gap: 20px; }
.liri-form-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.liri-field { display: grid; gap: 7px; }
.liri-field--full { grid-column: 1/-1; }
.liri-field label { font-size: .78rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.liri-field input, .liri-field select, .liri-field textarea {
  width: 100%; min-height: 54px; padding: 13px 15px; border: 1px solid rgba(24,48,45,.2); border-radius: 11px; background: var(--white); color: var(--ink); outline: none; transition: border .2s, box-shadow .2s;
}
.liri-field textarea { min-height: 105px; resize: vertical; }
.liri-field input:focus, .liri-field select:focus, .liri-field textarea:focus { border-color: var(--sage-dark); box-shadow: 0 0 0 4px rgba(57,95,87,.12); }
.liri-consent { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); font-size: .86rem; }
.liri-consent input { margin-top: 5px; }
.liri-form-status { min-height: 24px; margin: 0; font-weight: 700; }
.liri-form-status.is-success { color: #2c6a45; }
.liri-form-status.is-error { color: #a03731; }
.liri-booking-form .btn[disabled] { opacity: .55; cursor: wait; transform: none; }

.lightbox { position: fixed; z-index: 999; inset: 0; display: none; place-items: center; padding: 30px; background: rgba(11,24,22,.94); }
.lightbox.is-open { display: grid; }
.lightbox img { max-width: min(1100px,90vw); max-height: 86vh; border-radius: 14px; }
.lightbox-close { position: absolute; top: 20px; right: 20px; width: 48px; height: 48px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: transparent; color: white; font-size: 1.7rem; cursor: pointer; }

.site-footer { padding: 65px 0 25px; background: #102824; color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 55px; padding-bottom: 50px; }
.footer-brand { max-width: 380px; }
.footer-brand p { margin-top: 18px; color: rgba(255,255,255,.58); }
.footer-title { margin-bottom: 16px; color: #ddb579; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.footer-links { display: grid; gap: 9px; color: rgba(255,255,255,.74); }
.footer-links a:hover { color: white; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); color: rgba(255,255,255,.48); font-size: .78rem; }

.content-page { width: min(820px,calc(100% - 40px)); min-height: 70vh; margin: 0 auto; padding: 150px 0 90px; }
.content-page h1 { margin-bottom: 35px; font-size: clamp(2.8rem,6vw,5rem); }
.content-page a { color: var(--terracotta); text-decoration: underline; }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .nav-links { position: fixed; inset: 0; z-index: -1; display: flex; flex-direction: column; justify-content: center; gap: 28px; visibility: hidden; opacity: 0; background: var(--ink); color: white !important; transition: opacity .2s, visibility .2s; }
  .nav-links.is-open { visibility: visible; opacity: 1; }
  .section-head, .intro-grid, .location-grid, .booking-grid { grid-template-columns: 1fr; }
  .section-head { gap: 22px; }
  .section-head .lead { justify-self: start; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-template-rows: 400px 230px 230px; }
  .gallery-item:first-child { grid-column: 1/-1; grid-row: auto; }
  .amenities-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .booking-copy { position: static; }
}

@media (max-width: 620px) {
  :root { --wrap: min(100% - 24px, 1180px); --radius: 18px; }
  .header-inner { min-height: 72px; }
  .brand-name small { display: none; }
  .hero { min-height: 100svh; }
  .hero-content { padding-bottom: 38px; }
  .hero-actions { display: grid; }
  .hero-facts { grid-template-columns: repeat(2,1fr); gap: 20px 0; margin-top: 38px; }
  .hero-facts div:nth-child(3) { padding-left: 0; border-left: 0; }
  .feature-list, .amenities-grid, .liri-form-row { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; grid-template-rows: repeat(4,290px); }
  .gallery-item:first-child { grid-column: auto; }
  .intro-visual { padding-right: 20px; }
  .intro-card { width: 72%; }
  .amenity { min-height: auto; }
  .amenity-number { margin-bottom: 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
