/* ==========================================================================
   B&B Villa Giuli — foglio di stile unico (nessun framework esterno)
   Italiano = arancione, English = blu (come nel sito originale).
   Per cambiare i colori basta modificare le variabili qui sotto.
   ========================================================================== */

@font-face {
  font-family: "Montserrat";
  src: url("fonts/montserrat-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent: #d4420f;        /* arancione (pagine in italiano) */
  --accent-dark: #b2360b;
  --book: #2e7d32;          /* verde dei pulsanti "Prenota" */
  --book-dark: #1f5f24;
  --ink: #303030;           /* titoli */
  --text: #5c5c5c;          /* testo */
  --grey: #f6f6f6;          /* sfondo sezioni alternate */
  --line: #dddddd;
  --header-h: 52px;
  --font: "Montserrat", Verdana, Geneva, sans-serif;
}

html[lang="en"] {
  --accent: #457ba9;        /* blu (pagine in inglese) */
  --accent-dark: #35638b;
}

html[lang="de"] {
  --accent: #1f7a76;        /* verde petrolio (pagine in tedesco) */
  --accent-dark: #175d5a;
}

/* ---------- Base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-top: var(--header-h);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  background: #fff;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 { color: var(--ink); line-height: 1.3; margin: 0 0 0.6em; }
h2 { font-size: 24px; font-weight: 600; text-transform: uppercase; }
h3 { font-size: 19px; font-weight: 600; }
h4 { font-size: 16px; font-weight: 600; }
p  { margin: 0 0 1em; }

a { color: var(--accent); }
a:hover { color: var(--accent-dark); }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }

.skip-link {
  position: absolute; left: 8px; top: -60px; z-index: 200;
  background: #fff; color: var(--ink); padding: 8px 14px;
}
.skip-link:focus { top: 8px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.icon {
  width: 1em; height: 1em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Barra di navigazione ---------- */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: var(--accent); color: #fff;
}

.nav {
  max-width: 1170px; margin: 0 auto; padding: 0 16px;
  min-height: var(--header-h);
  display: flex; align-items: center; flex-wrap: wrap; gap: 0 12px;
  font-size: 12px; letter-spacing: 4px; line-height: 1.4;
}

.nav a { color: #fff; text-decoration: none; }

.brand { font-size: 18px; letter-spacing: 3px; padding: 14px 0; margin-right: auto; }

.menu {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap;
}
.menu a {
  display: block; padding: 17px 14px; text-transform: uppercase;
}
.menu a:hover,
.menu a[aria-current="page"] { background: #fff; color: var(--accent); }

.lang {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 4px; letter-spacing: 1px;
}
.lang img { width: 30px; height: 15px; border: 1px solid rgba(255, 255, 255, 0.7); }
.lang:hover { text-decoration: underline; }

.nav-toggle {
  display: none;
  background: none; border: 0; color: #fff; padding: 10px; cursor: pointer;
  font-size: 26px; line-height: 0;
}

@media (max-width: 860px) {
  .js .nav-toggle { display: block; order: 3; }
  .lang { order: 2; }
  .menu { order: 4; width: 100%; flex-direction: column; padding-bottom: 8px; }
  .js .menu { display: none; }
  .js .menu.is-open { display: flex; }
  .menu a { padding: 12px 4px; }
}

/* ---------- Sezioni ---------- */

.section { padding: 48px 20px; }
.section--grey { background: var(--grey); }
.section--tight { padding-top: 16px; padding-bottom: 16px; }
.wrap { max-width: 1100px; margin: 0 auto; }
.wrap--narrow { max-width: 760px; }
.center { text-align: center; }
.lead { font-size: 17px; color: var(--ink); }

.page-title { padding: 40px 20px 28px; text-align: center; }
.page-title h1 {
  font-size: 26px; font-weight: 600; text-transform: uppercase; margin-bottom: 0.5em;
}
.page-title p { max-width: 720px; margin: 0 auto; }

/* ---------- Testata con foto (Home) ---------- */

.hero { position: relative; background: #1f3a5c; }
.hero img {
  width: 100%; height: clamp(220px, 32vw, 420px); object-fit: cover;
}
.hero::after {
  content: ""; position: absolute; inset: 40% 0 0 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}
.hero-text {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: 0;
  padding: 0 20px 22px; text-align: center; color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}
.hero-text h1 {
  color: #fff; font-weight: 500; margin: 0;
  font-size: clamp(30px, 5vw, 52px); letter-spacing: 1px;
}
.hero-text p { margin: 4px 0 0; font-size: clamp(14px, 1.6vw, 17px); }

/* ---------- Griglie ---------- */

.grid { display: grid; gap: 32px; }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cols-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.about { display: grid; gap: 32px; grid-template-columns: 1fr; }
.about-photos { display: grid; gap: 16px; align-content: start; }
@media (min-width: 800px) {
  .about { grid-template-columns: 1fr 2fr; }
}
@media (min-width: 480px) and (max-width: 799px) {
  .about-photos { grid-template-columns: 1fr 1fr; }
}

/* ---------- Pulsanti ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 20px; min-height: 46px;
  font: inherit; font-size: 16px; line-height: 1.3; text-align: center; text-decoration: none;
  color: #fff; background: var(--accent);
  border: 1px solid var(--accent); border-radius: 4px;
  transition: background-color 0.15s, color 0.15s;
}
.btn:hover { background: #fff; color: var(--accent); }
.btn--book { background: var(--book); border-color: var(--book); }
.btn--book:hover { background: #fff; color: var(--book); }
.btn-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; justify-items: start; }
.center .btn-list { justify-items: center; }
.btn-list--fill .btn { width: 100%; }

/* ---------- Servizi (Home) ---------- */

.features { margin-top: 28px; row-gap: 40px; }
@media (min-width: 700px) {
  .features { grid-template-columns: repeat(3, 1fr); }
}
.feature .icon { font-size: 46px; color: var(--accent); margin: 0 auto 8px; display: block; }
.feature h3 { font-weight: 500; margin-bottom: 4px; }
.feature p { margin: 0; }

/* ---------- Prezzi (Home) ---------- */

.price-card {
  border: 1px solid var(--accent); background: #fff; text-align: center;
  transition: box-shadow 0.3s;
}
.price-card:hover { box-shadow: 0 6px 30px rgba(0, 0, 0, 0.18); }
.price-card h3 {
  margin: 0; padding: 22px 12px; background: var(--accent); color: #fff;
  font-size: 26px; font-weight: 500;
}
.price-card .amount { font-size: 30px; color: var(--ink); margin: 26px 0 14px; }
.price-card .btn { margin-bottom: 24px; }

/* ---------- Camere ---------- */

.room { display: grid; gap: 32px; align-items: start; }
@media (min-width: 900px) {
  .room { grid-template-columns: 2fr 3fr; }
}
.room + .room { margin-top: 56px; }
.room h2 { text-transform: none; font-size: 22px; }

.rates { width: 100%; border-collapse: collapse; margin: 20px 0 24px; }
.rates th,
.rates td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.rates th:first-child,
.rates td:first-child { text-align: left; }
.rates thead th { color: var(--ink); border-bottom-width: 2px; }
.rates tbody th { font-weight: 400; }

.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li { margin-bottom: 0.7em; line-height: 1.5; }
.info h2 { font-size: 15px; letter-spacing: 1px; }

/* ---------- Galleria fotografica (scorre anche col dito, senza JavaScript) ---------- */

.carousel { position: relative; background: #222; align-self: start; min-width: 0; }
.carousel-track {
  list-style: none; margin: 0; padding: 0;
  display: flex; overflow-x: auto;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > li { flex: 0 0 100%; scroll-snap-align: start; }
.carousel figure { margin: 0; position: relative; }
.carousel img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.carousel figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 56px 38px; text-align: center; color: #fff; line-height: 1.4;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.65));
}
@media (max-width: 500px) {
  .carousel figcaption { padding: 30px 12px 36px; font-size: 14px; }
}
.carousel figcaption strong { display: block; font-size: 20px; font-weight: 500; }

.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; font-size: 24px;
  background: rgba(255, 255, 255, 0.85); color: var(--accent);
}
.carousel-btn:hover { background: #fff; }
.carousel-btn--prev { left: 10px; }
.carousel-btn--next { right: 10px; }

.carousel-dots {
  position: absolute; left: 0; right: 0; bottom: 8px;
  display: flex; justify-content: center; flex-wrap: wrap; gap: 2px;
}
.carousel-dots button {
  width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center;
}
.carousel-dots button::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid #fff; background: transparent;
}
.carousel-dots button[aria-current="true"]::before { background: #fff; }

/* ---------- Dove siamo ---------- */

.map { display: block; width: 100%; height: min(500px, 70vh); border: 0; background: var(--grey); }
.map-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0; padding: 16px 20px 0; }

.directions { margin: 0; }
.directions > div {
  display: grid; gap: 4px 24px; padding: 16px 0; border-top: 1px solid var(--line);
}
@media (min-width: 700px) {
  .directions > div { grid-template-columns: 160px 1fr; }
}
.directions dt { font-weight: 700; color: var(--ink); }
.directions dd { margin: 0; }
.directions dd p:last-child { margin-bottom: 0; }

/* ---------- Contatti ---------- */

.contact { display: grid; gap: 16px 40px; align-items: start; }
@media (min-width: 700px) {
  .contact { grid-template-columns: 150px 1fr; }
}
.contact > .icon { font-size: 110px; stroke-width: 1.2; margin: 0 auto; }
.contact--info > .icon { color: #5aa832; }
.contact--book > .icon { color: #2aa7d6; }
.contact h2 { text-transform: none; font-size: 19px; font-weight: 500; }
.contact a[href^="tel"],
.contact a[href^="mailto"] { white-space: nowrap; }

/* ---------- Dintorni: testi lunghi ---------- */

.prose p { margin-bottom: 1.4em; }
.prose h3 { margin-top: 2em; text-transform: uppercase; font-size: 16px; letter-spacing: 1px; }
.toc { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 28px; }
.credits { font-size: 13px; text-align: center; margin: 12px 0 0; }

/* ---------- Piè di pagina ---------- */

.site-footer { padding: 32px 20px 40px; text-align: center; font-size: 13px; line-height: 1.7; }
.site-footer p { margin: 0 0 6px; }
.to-top { display: inline-grid; place-items: center; width: 44px; height: 44px; font-size: 26px; margin-bottom: 8px; }

/* ---------- Preferenze utente / stampa ---------- */

@media (prefers-reduced-motion: reduce) {
  html, .carousel-track { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .site-header, .carousel-btn, .carousel-dots, .to-top, .map { display: none; }
  body { padding-top: 0; }
}

/* ---------- Anteprime delle camere (Home) ---------- */

.room-cards { margin: 24px 0 28px; }
.room-card { display: block; text-decoration: none; background: #fff; border: 1px solid var(--line); transition: box-shadow 0.3s; }
.room-card:hover { box-shadow: 0 6px 30px rgba(0, 0, 0, 0.18); }
.room-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.room-card h3 { margin: 0; padding: 14px 16px; text-align: center; font-weight: 500; }

/* ---------- Link che portano fuori dal sito: piccola freccia ---------- */

a[target="_blank"]:not(.btn)::after {
  content: ""; display: inline-block; width: 0.7em; height: 0.7em; margin-left: 0.25em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 1H1v10h10V8M7 1h4v4M11 1 5.5 6.5' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 1H1v10h10V8M7 1h4v4M11 1 5.5 6.5' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
