/* =========================================================
   Bibbi's House — CSS completo (con hotfix responsive App)
   =======================================================*/

/* ============ Variabili & Reset ================== */
:root{
  --nav-h: 82px;

  --text: #5b7392;
  --muted: #5b7392;
  --white: #ffffff;

  --brand: #5b7392;
  --brand-contrast: #ffffff;

  --radius: 14px;
  --h2-gap: clamp(22px, 3vw, 40px);
  --info-width: 720px;

  /* Colori stanze */
  --c-bamboo:  #E3C897;
  --c-orange:  #DB5800;
  --c-purple:  #915F91;
  --c-blue:    #97B8C4;
  --c-green:   #A0AA93;

  /* Gradienti */
  --grad: linear-gradient(45deg, var(--c-bamboo), var(--c-orange), var(--c-purple), var(--c-blue), var(--c-green));
  --grad-a: linear-gradient(45deg, #E3C89785,#DB580085,#915F9185,#97B8C485,#A0AA9385);

  /* Dimensione base del quadrato logo app */
  --app-logo-size: 150px;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  color: var(--text);
  font-family: "Montserrat", sans-serif;
  font-weight: 400;
  line-height: 1.7;
  background: #fafafa;
}
a{ color: inherit; text-decoration: none; }
p{ margin: 0; }

/* Titoli */
.upper-thin{
  text-transform: uppercase;
  font-weight: 300;
  letter-spacing: .14em;
  margin-bottom: 80px;
  color: var(--text);
}

/* Layout */
.container{ max-width: 1200px; padding: 0 clamp(16px,4vw,48px); margin: 0 auto; }
.container.narrow{ max-width: 900px; }
.section{ padding: clamp(54px, 8vw, 96px) 0; }
.center{ text-align: center; }

/* Headings */
h1,h2,h3,h4,h5,h6{ color: var(--text); }
h2{
  text-align: center;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.25;
  margin: var(--h2-gap) 0 calc(var(--h2-gap) / 2);
}
.section > h2:first-child,
.container > h2:first-child{ margin-top: 0; }

/* ============ Navbar =================================== */
.navbar{
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  z-index: 999;
  background: transparent;
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.menu{
  list-style: none;
  margin: 0;
  padding: 0 clamp(16px,4vw,48px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: min(2vw, 22px);
}
.menu a{
  color: var(--white);
  text-transform: uppercase;
  font-weight: 300;
  letter-spacing: .12em;
  position: relative;
  padding: 10px 2px;
  display: inline-block;
  text-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.menu a::after{
  content: "";
  position: absolute; left: 0; bottom: -12px;
  height: 2px; width: 0%;
  background: currentColor;
  transition: width .22s ease;
}
.menu a:hover::after,
.menu a.active::after{ width: 100%; }
.menu .prenota{ display: flex; align-items: center; gap: 8px; }
.menu .prenota svg{ fill: currentColor; }

/* Navbar scrolled */
.navbar.scrolled{
  background: var(--grad-a);
  background-size: 300% 300%;
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
  animation: footerGradient 28s ease-in-out infinite;
}
.navbar.scrolled .menu a{ color: #fff; text-shadow: none; }
.navbar.scrolled .menu a::after{ background: currentColor; }

/* ============ Hero ===================================== */
.hero{
  height: 100vh;
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  background: url("images/hero.jpg") center/cover no-repeat fixed;
}
.hero.half{ height: 50vh; }
.hero__overlay{
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,.25) 40%, rgba(0,0,0,.45));
}
.hero__content{ position: relative; z-index: 2; padding-top: calc(var(--nav-h) * .6); }
.hero h1{
  font-size: clamp(28px, 5vw, 56px);
  margin: 0; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.65);
}

/* ============ Testi contenuto ========================== */
.intro p,
.posizione p,
.poi p,
.info-box p,
.card p{ color: var(--text); }

/* ============ Bottoni (generici) ======================= */
.btn{
  border: 1.5px solid var(--brand);
  border-radius: 999px;
  padding: 14px 22px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 600;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  display: inline-block;
  margin-top: 26px;
  transition: background .2s ease, color .2s ease, transform .1s ease, border-color .2s ease;
}
.btn:hover{
  background: var(--brand);
  border-color: var(--brand);
  color:#fff;
  transform: translateY(-1px);
}
.btn:focus-visible{ outline: 2px solid var(--brand); outline-offset: 2px; }

/* ============ Sezione Rooms ============================ */
.rooms{ width: 100%; }
.room{
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: clamp(420px, 60vh, 640px);
}
.room-image img{
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
.room-text{
  display: grid; place-items: center; text-align: center;
  color: #2d3650; padding: clamp(28px, 5vw, 64px);
}
.room-text__inner{ max-width: 48ch; }
.room-title{
  font-size: clamp(22px, 3.2vw, 34px);
  letter-spacing: .14em; margin: 0 0 12px;
}
.rooms .room-title{ color: currentColor !important; }

/* Colori testo stanze */
.room--bamboo .room-text{ color:#E3C897 !important; }
.room--orange .room-text{ color:#DB5800 !important; }
.room--purple .room-text{ color:#915F91 !important; }
.room--green  .room-text{ color:#A0AA93 !important; }
.room--blue   .room-text{ color:#97B8C4 !important; }

/* Bottoni stanze */
.room--bamboo .btn{ background:transparent !important; color:#E3C897 !important; border-color:#E3C897 !important; }
.room--bamboo .btn:hover{ background:#E3C897 !important; color:#fff !important; border-color:#E3C897 !important; }

.room--orange .btn{ background:transparent !important; color:#DB5800 !important; border-color:#DB5800 !important; }
.room--orange .btn:hover{ background:#DB5800 !important; color:#fff !important; border-color:#DB5800 !important; }

.room--purple .btn{ background:transparent !important; color:#915F91 !important; border-color:#915F91 !important; }
.room--purple .btn:hover{ background:#915F91 !important; color:#fff !important; border-color:#915F91 !important; }

.room--green .btn{ background:transparent !important; color:#A0AA93 !important; border-color:#A0AA93 !important; }
.room--green .btn:hover{ background:#A0AA93 !important; color:#fff !important; border-color:#A0AA93 !important; }

.room--blue .btn{ background:transparent !important; color:#97B8C4 !important; border-color:#97B8C4 !important; }
.room--blue .btn:hover{ background:#97B8C4 !important; color:#fff !important; border-color:#97B8C4 !important; }

.room .btn:focus-visible{ outline: 2px solid currentColor !important; outline-offset: 2px; }

/* ============ CTA ====================================== */
.cta p{ text-align:center; }

/* ============ Carousel (home) ========================== */
.carousel{ position: relative; margin-top: 100px; padding: 0 clamp(10px,3vw,20px); }
.track{
  display: flex; overflow: auto; scroll-snap-type: x mandatory;
  gap: 12px; padding-bottom: 6px;
}
.slide{
  scroll-snap-align: center;
  flex: 0 0 clamp(220px, 30vw, 360px);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.08); background: #ddd;
}
.slide img{
  width: 100%; height: clamp(150px, 20vw, 220px);
  object-fit: cover; display: block;
}
.arrow{
  position: absolute; top: 50%; transform: translateY(-50%);
  border: none; background: rgba(0,0,0,.55); color: #fff;
  width: 38px; height: 38px; border-radius: 999px;
  cursor: pointer; line-height: 38px; font-size: 24px;
}
.arrow.prev{ left: 4px; } .arrow.next{ right: 4px; }
.arrow:hover{ background: rgba(0,0,0,.75); }

/* Zoom immagine al hover */
.carousel .arrow{ display:none; }
.slide img{ transition: transform .28s ease; transform-origin: center center; will-change: transform; }
.slide:hover img{ transform: scale(1.06); }
.track:focus-visible{ outline: 2px solid rgba(91,115,146,.45); outline-offset: 2px; }
.track { scrollbar-width: none; } .track::-webkit-scrollbar { display: none; }

/* ===== Animazione gradiente ===== */
@keyframes footerGradient{
  0%{ background-position: 0% 50%; }
  50%{ background-position:100% 50%; }
  100%{ background-position:0% 50%; }
}
@media (prefers-reduced-motion: reduce){
  .navbar.scrolled, .site-footer{ animation: none; background-size: auto; }
}

/* ============ ROMA (pagina roma.html) ================== */
/* POI / sezioni luoghi */
.poi{ width: 100%; }
.poi-row{
  display: grid; grid-template-columns: 1fr 1fr;
  align-items: stretch; height: clamp(420px, 62vh, 720px);
}
.poi-row.reverse .poi-image{ order: 2; }
.poi-row.reverse .poi-text{  order: 1; }
.poi-image, .poi-text{ height: 100%; }
.poi-image img{ width: 100%; height: 100%; object-fit: cover; display: block; }

.poi-text{
  background:#fff; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0;
}
.poi-inner{ max-width: 60ch; padding: clamp(24px, 4vw, 48px); }
.poi .feature-title{
  color:#5c6f8a; font-size: clamp(22px, 3.2vw, 34px); margin: 0 0 12px;
}
.poi p{ color: var(--text); }

/* ======== APP CONSIGLIATE — layout + responsive ======== */

/* Griglia (desktop) */
.section.intro .app-row{
  display:grid !important;
  grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  gap:clamp(16px,2.5vw,24px) !important;
  align-items:stretch !important;
  margin-top:clamp(12px,2vw,18px) !important;
}

/* Card */
.section.intro .app-item{
  background:#fff !important;
  border:1px solid #d6dde8 !important;
  border-radius:16px !important;
  box-shadow:0 4px 16px rgba(0,0,0,.06) !important;
  padding:clamp(14px,1.6vw,20px) !important;
  text-align:center !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:space-between !important;
  gap:12px !important;
}

/* ======= LOGO: box quadrato a misura fissa per breakpoint ======= */
.section.intro .app-logo{
  display:grid !important;
  place-items:center !important;
  width: var(--app-logo-size) !important;
  height: var(--app-logo-size) !important;
  margin: 0 auto !important;
  overflow:hidden !important;
  border-radius:12px !important;
  background:#fff !important;
  flex: 0 0 auto !important; /* non stirarlo in flex */
}
.section.intro .app-logo img{
  display:block !important;
  max-width:80% !important;
  max-height:80% !important;
  width:auto !important;
  height:auto !important;
  object-fit:contain !important;
  object-position:center !important;
}

/* Badge store */
.section.intro .store-links{
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:center !important;
  gap:10px !important;
}
.section.intro .store-badge{
  display:inline-flex !important;
  align-items:center !important;
  gap:8px !important;
  padding:10px 16px !important;
  border:1.5px solid #d6dde8 !important;
  border-radius:999px !important;
  background:#fff !important;
  color:var(--brand) !important;
  font-weight:700 !important;
  font-size:.95rem !important;
  line-height:1 !important;
  transition:background .2s ease, color .2s ease, border-color .2s ease, transform .08s ease !important;
}
.section.intro .store-badge:hover{
  background:var(--brand) !important;
  color:#fff !important;
  border-color:var(--brand) !important;
  transform:translateY(-1px) !important;
}
.section.intro .store-badge svg{
  width:18px !important;
  height:18px !important;
  fill:currentColor !important;
}

/* ===== Tablet ===== */
@media (max-width:1100px){
  :root{ --app-logo-size: 130px; }
  .section.intro .app-row{ grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  .section.intro .store-badge{ padding:9px 14px !important; font-size:.94rem !important; }
}

/* ===== Mobile ===== */
@media (max-width:640px){
  :root{ --app-logo-size: 96px; }
  .section.intro .app-row{ grid-template-columns:1fr !important; }
  .section.intro .app-item{ padding:12px !important; gap:10px !important; }
  .section.intro .store-links{ gap:8px !important; }
  .section.intro .store-badge{
    width:100% !important;
    justify-content:center !important;
    font-size:.9rem !important;
  }
  .section.intro .store-badge svg{ width:16px !important; height:16px !important; }
}

/* ============ Contatti (contatti.html) ================== */
.info-box{
  background:#fff;
  border:1px solid #d6dde8;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.03);
  padding: clamp(18px, 3vw, 28px);
  text-align:center;
  max-width: var(--info-width);
  margin: 0 auto;
}
.info-box p{ color: var(--text); }

/* Griglia card contatti */
.contact-cards{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: clamp(14px, 2.8vw, 22px);
  margin-top: clamp(10px, 2vw, 16px);
}

/* Variante “narrow” */
.contact-cards--narrow{
  max-width: var(--info-width);
  margin: clamp(22px, 3vw, 34px) auto 0;
  grid-template-columns: 1fr 1fr;
  justify-items: stretch;
}
.contact-cards--narrow .card{ width: 100%; min-height: 220px; }

/* Card */
.card{
  background:#fff;
  border:1px solid #d6dde8;
  border-radius: var(--radius);
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  padding: clamp(18px, 2.6vw, 24px);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover{ transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.08); }

/* Icona tonda */
.card__icon{
  width: 68px; height: 68px; border-radius: 999px;
  display: grid; place-items: center;
  background: #eef3fa; color: var(--brand);
  box-shadow: 0 6px 16px rgba(0,0,0,.06) inset, 0 2px 8px rgba(0,0,0,.06);
  margin-bottom: 12px;
}
.card__icon svg{ width: 28px; height: 28px; }

/* Corpo card */
.card__body{ display:flex; flex-direction:column; align-items:center; gap: 6px; }
.card__title{ margin: 4px 0 2px; font-weight: 700; letter-spacing: .02em; }
.card p{ color: var(--text); }
.card .actions{ margin-top: 8px; }
.card .btn{ margin-top: 8px; padding: 12px 18px; }

/* Mappa */
.map-embed{ margin-top: 16px; border-radius: 14px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.map-embed iframe{ display:block; width:100%; height: 420px; border:0; }

/* ============ Footer =================================== */
.site-footer{
  background: var(--grad); background-size: 300% 300%;
  color:#fff; padding: 26px 0 18px;
  animation: footerGradient 28s ease-in-out infinite;
  position: relative;
}
.site-footer .brand{
  margin:0; text-align:center;
  font-size: clamp(22px,3.2vw,42px);
  letter-spacing:.14em; color:#fff;
}
.site-footer .footer-rule{
  border:none; border-top:2px solid rgba(255,255,255,.95);
  width: min(92%, 1200px); margin: 10px auto 8px;
}
.footer-nav{
  display:flex; flex-wrap:wrap; gap: clamp(16px,4vw,34px); justify-content:center;
}
.footer-nav a{ color:#fff; position:relative; padding:4px 0; }
.footer-nav a::after{
  content:""; position:absolute; left:0; right:0; bottom:-6px;
  height:2px; width:0; background:#fff; margin:auto; transition:width .2s;
}
.footer-nav a:hover::after{ width:100%; }
.footer-bottom{ text-align:center; font-size:.92rem; color:#fff; }
.footer-bottom p{ margin:6px 0; }
.footer-bottom a{ color:#fff; text-decoration:underline; text-underline-offset:3px; }

/* ============ Utility & Responsive ===================== */
@media (max-width: 1000px){
  .menu{ gap:10px; }
  .menu a{ font-size:.78rem; }
}

@media (max-width: 900px){
  .room{ grid-template-columns: 1fr; min-height: auto; }
  .room .room-image{ order: 1; }
  .room .room-text{ order: 2; }

  .poi-row{ grid-template-columns: 1fr; height: auto; }
  .poi-row .poi-text{ order: 1; }
  .poi-row .poi-image{ order: 2; }

  .poi-text{ padding: 0; }
  .poi-inner{ padding: 24px; }

  .contact-cards{ grid-template-columns: 1fr; }
}

/* Menu su due righe su telefoni */
@media (max-width: 640px){
  .menu{ flex-wrap:wrap; row-gap:4px; justify-content:center; padding-top:10px; }
  .menu a::after{ bottom:-6px; }
}

/* Griglia contatti “narrow” a singola colonna sotto i 720 */
@media (max-width: 720px){
  .contact-cards--narrow{ grid-template-columns: 1fr; }
}

/* ======= HAMBURGER + MENU MOBILE ======= */
.hamburger{
  position: absolute; right: clamp(16px, 4vw, 32px); top: 50%; transform: translateY(-50%);
  width: 42px; height: 36px; background: transparent; border: 0; padding: 0;
  display: none; cursor: pointer; z-index: 1001;
}
.hamburger:focus-visible{ outline: 2px solid #fff; outline-offset: 2px; }
.hamburger__bar{
  display: block; width: 100%; height: 2px; margin: 6px 0;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.45);
  transition: transform .2s ease, opacity .2s ease;
}
.hamburger.is-active .hamburger__bar:nth-child(1){ transform: translateY(8px) rotate(45deg); }
.hamburger.is-active .hamburger__bar:nth-child(2){ opacity: 0; }
.hamburger.is-active .hamburger__bar:nth-child(3){ transform: translateY(-8px) rotate(-45deg); }

/* Pannello mobile */
.mobile-menu{
  position: fixed; inset: 0 0 auto 0; height: 50vh;
  background: var(--grad); background-size: 300% 300%;
  animation: footerGradient 28s ease-in-out infinite;
  color: #fff; transform: translateY(-100%); transition: transform .24s ease-out;
  z-index: 1000; display: grid; place-items: center;
}
.mobile-menu.open{ transform: translateY(0); }

.mobile-menu__list{
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 14px; text-align: center;
}
.mobile-menu__list a{
  color:#fff; text-transform: uppercase; letter-spacing:.12em; font-weight:300;
  font-size: clamp(16px, 3.6vw, 20px); padding: 10px 16px; display: inline-flex; gap:10px; align-items:center; justify-content:center;
  text-shadow: none;
}
.mobile-menu__list .prenota{ border:1.5px solid #fff; border-radius:999px; padding:12px 18px; font-weight:600; }

.menu-backdrop{ position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 999; }
body.no-scroll{ overflow: hidden; }

/* Visibilità desktop vs mobile */
@media (max-width: 900px){
  .hamburger{ display: block; }
  .menu{ display: none; }
  .mobile-menu svg{ fill:#fff; stroke:#fff; }
}

/* =========================
   PATCH ANTI-ICONE GIGANTI
   (mettila sempre in fondo)
   ========================= */

/* Base: SVG decorativi dentro link/bottoni non crescono oltre il testo */
a svg,
button svg,
.btn svg,
.menu .prenota svg,
.section.intro .store-badge svg,
.card__icon svg {
  width: 1em !important;
  height: 1em !important;
  min-width: 16px !important;
  min-height: 16px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  flex: 0 0 auto !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

/* Se un reset imposta svg{width:100%}, neutralizzato nei badge/link */
.section.intro .store-badge{
  white-space: nowrap !important;
  align-items: center !important;
}

/* Hard-fix specifico mobile */
@media (max-width: 680px){
  a svg,
  button svg,
  .btn svg,
  .menu .prenota svg,
  .mobile-menu__list svg,
  .section.intro .store-badge svg,
  .card__icon svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    flex: 0 0 20px !important;
  }

  .section.intro .store-badge{
    justify-content: center !important;
    gap: 8px !important;
  }
}

/* Footer: niente sottolineatura di default */
.site-footer .footer-bottom a,
.site-footer .footer-bottom a span,
.site-footer .footer-bottom [href^="mailto:"],
.site-footer .footer-bottom [href^="tel:"]{
  text-decoration: none !important;
}

/* Solo su hover/focus */
.site-footer .footer-bottom a:hover,
.site-footer .footer-bottom a:focus-visible{
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

