/* ============================================================
   Hotel Napoli Mia — foglio di stile
   Palette: oro #A5782F · nero #060606 · testo #4a4a4a
   ============================================================ */

/* ---------- font self-hosted ---------- */
@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/PlayfairDisplay-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/PlayfairDisplay-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("/fonts/PlayfairDisplay-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Oswald";
  src: url("/fonts/Oswald-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  --oro: #A5782F;
  --oro-scuro: #8a6325;
  --nero: #060606;
  --testo: #4a4a4a;
  --titolo: #1d1d1d;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  --condensed: "Oswald", "Arial Narrow", sans-serif;
  --card-w: 1020px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--testo);
  font-size: 15px;
  line-height: 1.65;
  background: #6d6a60;
}
/* sfondo affrescato fisso (pseudo-elemento: fluido anche su mobile) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url("/images/bg-affresco.jpg") center top / cover no-repeat;
}
@media (max-width: 800px) {
  body::before { background-image: url("/images/bg-affresco-mobile.jpg"); }
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--oro); text-decoration: none; }
a:hover { color: var(--oro-scuro); }

.skip {
  position: absolute; left: -9999px; top: 0; background: #fff; padding: 8px 16px; z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */
.masthead {
  background: #fff;
  text-align: center;
  padding: 22px 16px 18px;
}
.masthead .logo { display: inline-block; width: 221px; height: auto; }

/* ---------- navbar ---------- */
.navbar {
  background: var(--nero);
  position: sticky; top: 0; z-index: 50;
}
.nav-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: stretch; justify-content: space-between;
  min-height: 56px; padding-left: 16px;
}
.nav-links {
  display: flex; list-style: none; align-items: stretch;
}
.nav-links a {
  display: flex; align-items: center; height: 100%;
  padding: 0 26px;
  color: #fff; font-size: 14.5px; letter-spacing: .02em;
}
.nav-links a:hover { color: #d9b36a; }
.nav-links a.active { color: #d9b36a; box-shadow: inset 0 -3px 0 var(--oro); }
.nav-right { display: flex; align-items: stretch; }
.nav-phones {
  display: flex; flex-direction: column; justify-content: center;
  text-align: right; padding-right: 20px; line-height: 1.45;
}
.nav-phones a { color: #fff; font-size: 13.5px; white-space: nowrap; }
.nav-phones a:hover { color: #d9b36a; }
.btn-prenota {
  display: flex; align-items: center;
  background: var(--oro); color: #fff !important;
  padding: 0 34px; font-size: 15px; letter-spacing: .03em;
  transition: background .2s;
}
.btn-prenota:hover { background: var(--oro-scuro); }
.nav-toggle { display: none; }

/* ---------- card contenuto ---------- */
.card {
  max-width: var(--card-w);
  margin: 78px auto 110px;
  background: #fff;
  box-shadow: 0 0 22px rgba(0,0,0,.35);
  padding: 64px clamp(20px, 6vw, 78px) 72px;
}

/* ---------- tipografia ---------- */
.kicker {
  font-size: 19px; letter-spacing: .38em; color: var(--titolo);
  text-transform: none; margin-bottom: 2px; text-align: center;
}
.serif {
  font-family: var(--serif); font-weight: 600; font-size: 34px;
  color: var(--titolo); line-height: 1.2; text-align: center;
}
.serif-italic { font-family: var(--serif); font-style: italic; }
.big-title {
  font-family: var(--condensed); font-weight: 500; font-size: clamp(34px, 6vw, 46px);
  color: var(--titolo); text-align: center; letter-spacing: .02em; line-height: 1.15;
}
.gold-title {
  color: var(--oro); font-size: 15px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
  text-align: center; margin-bottom: 12px;
}
.divider {
  display: block; width: 36px; height: 1px; background: #9a9a9a;
  margin: 26px auto;
}
.page-head { margin-bottom: 40px; }
.page-head .intro { text-align: center; max-width: 560px; margin: 14px auto 0; }

/* ---------- cornice dorata ---------- */
.frame {
  border: 26px solid transparent;
  border-image: url("/images/cornice-oro.png") 62 stretch;
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.28));
  background: #fff;
  margin: 0 auto;
}
.frame-photo img { width: 100%; }

/* ---------- home hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; gap: 44px;
  align-items: center; margin-bottom: 64px;
}
.hero-text p:not(.kicker) { text-align: center; margin-bottom: 14px; }

/* ---------- home features ---------- */
.features {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 46px 54px; margin: 20px 0 30px;
}
.feature { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
.feature img { width: 200px; height: 250px; object-fit: cover; box-shadow: 0 8px 16px rgba(0,0,0,.18); }
.feature:nth-child(3), .feature:nth-child(4) { direction: rtl; }
.feature:nth-child(3) > div, .feature:nth-child(4) > div { direction: ltr; }
.feature:nth-child(3) img, .feature:nth-child(4) img { direction: ltr; }
.feature p { font-size: 14.5px; text-align: center; }

/* ---------- cta ---------- */
.cta-band { text-align: center; margin-top: 56px; }
.cta-band .serif { margin: 6px 0 4px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.btn-gold, .btn-ghost, .btn-dark {
  display: inline-block; padding: 13px 34px; font-size: 15px;
  letter-spacing: .04em; cursor: pointer; transition: all .2s;
}
.btn-gold { background: var(--oro); color: #fff; }
.btn-gold:hover { background: var(--oro-scuro); color: #fff; }
.btn-ghost { border: 1px solid #bbb; color: var(--testo); }
.btn-ghost:hover { border-color: var(--oro); color: var(--oro); }
.btn-dark { background: var(--nero); color: #fff; border: 0; }
.btn-dark:hover { background: #333; }

/* ---------- struttura ---------- */
.two-col {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 60px;
  margin-top: 56px;
}
.two-col p:not(.kicker) { margin-bottom: 14px; }
.servizi { list-style: none; }
.servizi li {
  padding: 9px 0 9px 26px; border-bottom: 1px solid #eee;
  position: relative;
}
.servizi li::before {
  content: ""; position: absolute; left: 4px; top: 17px;
  width: 7px; height: 7px; background: var(--oro); transform: rotate(45deg);
}

/* ---------- griglia stanze ---------- */
.rooms-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 44px 30px;
}
.room-card { text-align: center; color: var(--testo); }
.oval {
  display: block; width: min(100%, 250px); aspect-ratio: 25 / 16;
  margin: 0 auto 14px; border-radius: 50%;
  overflow: hidden; border: 6px solid #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.3);
  transition: transform .25s ease;
}
.oval img { width: 100%; height: 100%; object-fit: cover; }
.room-card:hover .oval { transform: scale(1.04); }
.room-name { display: block; font-size: 17px; color: var(--titolo); }
.room-type { display: block; font-size: 12.5px; color: #8d8d8d; margin-top: 2px; }

/* ---------- pagina camera ---------- */
.room-head .poesia {
  text-align: center; font-size: 19px; color: #555;
  margin-top: 14px; line-height: 1.7;
}
.room-desc { max-width: 640px; margin: 48px auto 0; text-align: center; }
.room-desc p { margin-bottom: 14px; }
.room-tipo { color: var(--oro); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 14px; }

/* ---------- carosello ---------- */
.carousel { position: relative; overflow: hidden; }
.slides { display: flex; transition: transform .45s ease, height .35s ease; }
.slide {
  flex: 0 0 100%; aspect-ratio: 3 / 2;
  display: flex; align-items: center; justify-content: center;
  background: #f6f3ee;
}
.slide img { width: 100%; height: 100%; object-fit: contain; }
/* mobile: l'altezza dello stage segue la foto corrente (via JS),
   così le foto verticali riempiono lo schermo invece di rimpicciolirsi */
.carousel.adaptive .slides { height: var(--stage-h, 62vw); }
.carousel.adaptive .slide { aspect-ratio: auto; height: 100%; }
.carousel.adaptive .slide img { object-fit: cover; }
.c-prev, .c-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,.28); color: #fff; border: 0;
  font-size: 22px; line-height: 1; padding: 14px 15px; cursor: pointer;
  transition: background .2s; user-select: none;
}
.c-prev:hover, .c-next:hover { background: rgba(0,0,0,.55); }
.c-prev { left: 0; } .c-next { right: 0; }
.c-counter {
  position: absolute; right: 10px; bottom: 8px;
  background: rgba(0,0,0,.45); color: #fff;
  font-size: 12.5px; padding: 3px 10px; border-radius: 12px;
}

/* ---------- contatti ---------- */
.contact-intro { text-align: center; max-width: 640px; margin: 0 auto; }
.contact-intro p { margin-bottom: 12px; }
.contact-cols {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  margin: 30px 0 46px; align-items: start;
}
.contact-info { font-style: normal; }
.contact-info p { margin-bottom: 14px; }
.contact-info .gold-title { text-align: left; }
.contact-form label {
  display: block; font-size: 13.5px; color: #777; margin-bottom: 14px;
}
.contact-form input, .contact-form textarea {
  display: block; width: 100%; margin-top: 4px;
  border: 1px solid #ccc; padding: 10px 12px;
  font: inherit; font-size: 16px; /* ≥16px: evita lo zoom automatico su iOS */
  color: var(--titolo); background: #fff;
}
.contact-form input:focus, .contact-form textarea:focus {
  outline: none; border-color: var(--oro);
}
.contact-form .btn-dark { float: right; }
.contact-form .btn-dark:disabled { opacity: .55; cursor: wait; }
/* honeypot anti-spam: invisibile agli umani */
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { clear: both; font-size: 13.5px; color: #777; padding-top: 14px; min-height: 1.4em; }
.form-status.ok { color: #2e7d32; }
.form-status.err { color: #b3261e; }
.mappa iframe {
  width: 100%; height: 340px; border: 0; display: block;
  filter: grayscale(15%);
}

/* ---------- privacy / prose ---------- */
.prose { max-width: 760px; margin: 0 auto; font-size: 14px; }
.prose h2 {
  font-family: var(--condensed); font-weight: 500; font-size: 22px;
  color: var(--titolo); margin: 34px 0 12px;
}
.prose h3 { font-size: 15.5px; color: var(--titolo); margin: 22px 0 8px; }
.prose p, .prose li { margin-bottom: 10px; }
.prose ol { padding-left: 22px; }

/* ---------- footer ---------- */
.footer { background: var(--nero); color: #c9c9c9; }
.footer-inner {
  max-width: 1240px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 30px; align-items: center;
  padding: 34px 24px;
}
.footer-social { display: flex; gap: 12px; align-items: center; }
.footer-social img { border-radius: 6px; }
.footer-social .ig { color: #c9c9c9; display: flex; }
.footer-social .ig:hover { color: #fff; }
.footer-info p { font-size: 12.5px; line-height: 1.75; text-align: center; }
.footer-right { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; }
.footer-cards { display: flex; gap: 8px; }
.footer-privacy { color: var(--oro); font-size: 14px; }

/* ============================================================
   responsive
   ============================================================ */

/* il blocco contatti dentro il menu esiste solo nella versione mobile */
.nav-menu-contact { display: none; }

@media (max-width: 1080px) {
  .nav-links a { padding: 0 16px; }
  .nav-phones { display: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 34px; }
  .hero .frame-photo { max-width: 560px; }
  .features { grid-template-columns: 1fr; gap: 38px; max-width: 620px; margin-left: auto; margin-right: auto; }
  .feature { grid-template-columns: 220px 1fr; align-items: center; }
  .two-col { grid-template-columns: 1fr; gap: 44px; }
  .rooms-grid { grid-template-columns: repeat(2, 1fr); gap: 34px 20px; }
}

/* ---------- telefono ---------- */
@media (max-width: 800px) {
  .masthead { padding: 16px; }
  .masthead .logo { width: 180px; }

  .nav-inner { min-height: 54px; align-items: stretch; padding-left: 10px; }
  .nav-toggle {
    display: block; background: none; border: 0;
    padding: 0 14px; min-width: 52px; cursor: pointer;
  }
  .nav-toggle span {
    display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0;
    transition: transform .25s, opacity .25s;
  }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--nero);
    border-top: 1px solid #222; box-shadow: 0 14px 20px rgba(0,0,0,.4);
    max-height: calc(100vh - 54px); overflow-y: auto;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 16px 22px; min-height: 44px; }
  .nav-links a.active { box-shadow: inset 3px 0 0 var(--oro); }

  /* contatti rapidi in fondo al menu */
  .nav-menu-contact {
    display: flex; flex-direction: column;
    border-top: 1px solid #2c2c2c; padding: 6px 0 10px;
  }
  .nav-menu-contact a { color: #d9b36a; font-size: 14px; padding: 12px 22px; }

  /* Prenota sempre tappabile: tutta l'altezza della barra */
  .nav-right { align-items: stretch; }
  .btn-prenota { padding: 0 24px; min-height: 54px; }

  .card { margin: 22px 10px 54px; padding: 38px 18px 46px; }

  .kicker { font-size: 15px; letter-spacing: .3em; }
  .serif { font-size: 29px; }

  .feature { grid-template-columns: 1fr; }
  .feature img { width: 100%; height: auto; aspect-ratio: 3 / 2; }
  .feature:nth-child(3), .feature:nth-child(4) { direction: ltr; }

  .contact-cols { grid-template-columns: 1fr; gap: 36px; }
  .mappa iframe { height: 260px; }
  .frame { border-width: 15px; }

  .c-prev, .c-next { padding: 16px 16px; }

  .footer-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 22px; padding: 30px 18px; }
  .footer-right { align-items: center; }
}

@media (max-width: 460px) {
  .rooms-grid { grid-template-columns: 1fr; }
  .cta-actions .btn-gold, .cta-actions .btn-ghost { width: 100%; text-align: center; }
}

/* telefono in orizzontale: header più compatto */
@media (max-height: 480px) and (max-width: 950px) {
  .masthead { padding: 8px; }
  .masthead .logo { width: 140px; }
  .card { margin-top: 16px; }
}
