/* ============================================================
   ETRUSKA DOLOMITES – main.css
   Versione ottimizzata: HTML5, mobile-first, niente codice morto
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Jost:wght@300;400;500&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  --font-title:  'Cormorant Garamond', Georgia, serif;
  --font-body:   'Jost', Arial, sans-serif;
  --color-dark:  #3a3530;
  --color-mid:   #5c5550;
  --color-light: #f7f4f0;
  --color-accent:#8b6f5e;
  --color-cta:   #c9a88a;
  --nav-h:       58px;
  --content-w:   1100px;
  --radius:      3px;
  --transition:  0.25s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-dark);
  background: #fff;
  position: relative;
  transition: right var(--transition);
  right: 0;
}
body.menu-open { right: 240px; overflow: hidden; }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.03em;
}
h3 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 0.6em; }
h5 { font-size: 0.95rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; }

p { margin-bottom: 1em; }
strong { font-family: var(--font-title); font-size: 1.25em; font-weight: 400; letter-spacing: 0.02em; }

a { color: var(--color-dark); text-decoration: none; }
a:hover { border-bottom: 1px solid currentColor; }

ul { list-style: none; padding-left: 1.4em; margin-bottom: 1em; }
ul li { margin-bottom: 0.3em; }
ul li::before {
  content: "✦"; /* qualsiasi emoji o carattere unicode */
  margin-right: 8px;
  color: #8b6f5e;
  font-size: 0.8rem;
}

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

/* ---------- Layout Helpers ---------- */
.content-wrap { max-width: var(--content-w); margin: 0 auto; padding: 0 20px; }
.clearfix::after { content: ''; display: table; clear: both; }

/* ---------- Navigation ---------- */
#top {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}
#top.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: 0 1px 10px rgba(0,0,0,0.08);
}
#top li::before {content: none !important;}
#mainnav { height: 100%; }
#mainnav .content-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Desktop menu */
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  padding: 0; margin: 0;
}
.nav-links li a {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ccc;
  transition: opacity var(--transition);
}
.home .nav-links li a {
  color: #fff;
}
#top.scrolled .nav-links li a { color: var(--color-dark); }
.nav-links li a:hover { opacity: 0.65; border-bottom: none; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.lang-list {
  display: flex;
  gap: 10px;
  list-style: none;
  padding: 0; margin: 0;
}
.lang-list a {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.75);
}
#top.scrolled .lang-list a { color: var(--color-mid); }
.lang-list a:hover { opacity: 0.7; border-bottom: none; }

/* Hamburger button (mobile only) */
.btn-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 1100;
}
.btn-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: background var(--transition);
}
#top.scrolled .btn-hamburger span { background: var(--color-dark); }

/* Mobile slide-in panel */
.nav-panel {
  position: fixed;
  top: 0; right: -260px;
  width: 240px;
  height: 100%;
  background: var(--color-light);
  z-index: 1200;
  padding: 70px 24px 24px;
  transition: right var(--transition);
  overflow-y: auto;
}
.nav-panel.open { right: 0; }
.nav-panel .nav-links {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}
.nav-panel .nav-links li { width: 100%; border-bottom: 1px solid rgba(0,0,0,0.07); }
.nav-panel .nav-links li a {
  display: block;
  padding: 12px 0;
  color: var(--color-dark);
  font-size: 0.85rem;
}
.nav-panel .lang-list { margin-top: 20px; }
.nav-panel .lang-list a { color: var(--color-mid); font-size: 0.8rem; }

.btn-close-panel {
  position: absolute;
  top: 18px; right: 18px;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--color-mid);
  line-height: 1;
}

/* ---------- Slideshow (homepage hero) ---------- */
#slideshow {
  position: relative;
  width: 100%;
  overflow: hidden;
}
#bg-slide {
  width: 100%;
  height: 100vh;
  min-height: 500px;
}
#bg-slide .tns-item img {
  width: 100%;
  height: 100vh;
  min-height: 500px;
  object-fit: cover;
  object-position: center;
}
.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.22) 0%, rgba(0,0,0,0.08) 60%, rgba(0,0,0,0.28) 100%);
  pointer-events: none;
  z-index: 2;
}
#scroll-notice {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: 36px;
  height: 36px;
  /*border: 1px solid rgba(255,255,255,0.6);*/
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  animation: bounce 2s infinite;
}
#scroll-notice::after {
  content: '';
  display: block;
  width: 18px; height: 18px;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  transform: rotate(45deg) translateY(-2px);
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(16px); }
}
#scroll-notice:hover {border: none;}
/* ---------- Slideshow: logo sovrapposto ---------- */
.slide-logo {
  position: absolute;
/*  top: 50%;
  left: 50%;*/
  top: 17%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
  text-align: center;
  
/*  background: rgba(58, 53, 48, 0.1);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 3px;
  padding: 18px 18px 0px;*/
  
  /*border: 1px solid rgba(201, 168, 138, 0.5);*/

}
.slide-logo img {
  width: clamp(90px, 22vw, 160px);
  height: auto;
  /* Schiarisce il logo scuro per renderlo leggibile sulle foto */
  filter: brightness(0) invert(1) opacity(1);
/*  filter: brightness(0) invert(1) opacity(0.90)
          drop-shadow(0 2px 12px rgba(0,0,0,0.5));*/
  /* Se il logo è già chiaro/trasparente, commenta il filter sopra */
  
/*  filter: brightness(0) invert(1) opacity(0.90)
        contrast(1.6)
        drop-shadow(0 0 2px rgba(255,255,255,0.9))
        drop-shadow(0 0 1px rgba(255,255,255,0.9));*/
  
}

/* ---------- Slideshow: CTA popup ---------- */
.slide-cta {
  position: absolute;
  bottom: 60px;
  right: 40px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  background: rgba(58, 53, 48, 0.72);   /* --color-dark con trasparenza */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(201, 168, 138, 0.45);  /* --color-cta sottile */
  border-radius: 3px;
  padding: 16px 22px;
  color: #fff;
  text-decoration: none;
  max-width: 240px;
  transition: background 0.3s, transform 0.2s;
}
.slide-cta:hover {
  background: rgba(58, 53, 48, 0.88);
  transform: translateY(-2px);
  border-bottom: 1px solid rgba(201, 168, 138, 0.45) !important;
}
.slide-cta-tag {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-cta);
}
.slide-cta strong {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #fff;
  line-height: 1.2;
}
.slide-cta-sub {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 300;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.04em;
}

/* ---------- Content Sections ---------- */
#contentarea { margin-top: 0; }

/* Text section */
.section-text {
  padding: 80px 0;
}
.section-text .content-wrap { max-width: 780px; }
.section-text.wide .content-wrap { max-width: var(--content-w); }

/* Parallax image divider */
.section-parallax {
  height: 380px;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
@media (max-width: 768px) {
  .section-parallax {
    height: 240px;
    background-attachment: scroll;
  }
}
@media (max-width: 480px) {
  .section-parallax { /*height: 180px;*/ height: 260px; }
}

/* ---------- Apartment Slider (homepage) ---------- */
.apartments-slider-wrap { margin-top: 36px; }

.tns-outer { position: relative; }
.home .tns-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.home .tns-controls button {
  background: var(--color-light);
  border: none;
  padding: 5px 14px;
  border-radius: var(--radius);
  font-size: 1rem;
  cursor: pointer;
  color: var(--color-dark);
  opacity: 0.7;
}
.home .tns-controls button:hover { opacity: 1; background: #fff; }
.home .tns-controls [data-controls="next"] { margin-left: auto; }

.tns-nav {
  text-align: right;
  margin-bottom: 6px;
}
.tns-nav > [aria-controls] {
  width: 8px; height: 8px;
  padding: 0;
  margin: 0 4px;
  border-radius: 50%;
  background: #ccc;
  border: none;
  cursor: pointer;
}
.tns-nav > .tns-nav-active { background: var(--color-accent); }

/* Apartment card */
.apartment-card {
  background: var(--color-light);
  display: flex;
  flex-direction: column;
  height: 100%;
}
.apartment-card .card-img img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.apartment-card .card-body {
  padding: 18px 16px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.apartment-card .card-body h5 { margin-bottom: 4px; }
.de .apartment-card .card-body h5 { font-size: 74%; }
.apartment-card .card-body p { font-size: 0.85rem; margin-bottom: 12px; color: var(--color-mid); }
.card-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 7px 16px;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-align: center;
  transition: background var(--transition), color var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.btn:hover { border-bottom: none; }
.btn-info  { background: #fff; color: var(--color-dark); }
.btn-info:hover  { background: var(--color-dark); color: #fff; }
.btn-request { background: var(--color-cta); color: #fff; }
.btn-request:hover { background: var(--color-accent); }
.btn-primary { background: var(--color-dark); color: #fff; }
.btn-primary:hover { background: var(--color-accent); }
a.btn-services { background: #fff; }
a.btn-services:hover { background: var(--color-dark); color: #fff; }

/* Inline text link styled as CTA */
a.inline-cta {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-accent) !important;
  padding-bottom: 2px;
  color: var(--color-accent) !important;
}

/* ---------- Apartment Detail (single page) ---------- */
.apt-detail { display: flex; gap: 0; flex-wrap: wrap; }
.apt-detail .apt-info {
  width: 35%;
  min-width: 260px;
  background: var(--color-light);
  padding: 28px 24px;
}
.apt-detail .apt-slider { width: 65%; min-width: 300px; flex: 1; }
.apt-detail .apt-slider img { width: 100%; /*height: 380px;*/ object-fit: cover; }
/* Piantina appartamento: contain invece di cover */
.apt-slider img.floorplan {object-fit: contain; background-color: #f8f6f3;}
.apt-info h5 { margin: 18px 0 8px; }
.apt-info .apt-actions { margin-top: 24px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- Apartments List Page ---------- */
.apartments-grid { display: flex; flex-direction: column; gap: 32px; }
.apartment-row {
  display: flex;
  flex-wrap: wrap;
  background: var(--color-light);
}
.apartment-row .row-img { width: 60%; min-width: 300px; flex: 1; }
.apartment-row .row-img img { width: 100%; height: 300px; object-fit: cover; }
.apartment-row .row-info { width: 40%; min-width: 260px; padding: 28px 24px; display: flex; flex-direction: column; }
.apartment-row .row-info h5 { margin-bottom: 6px; }
.apartment-row .row-info p.meta { font-size: 0.82rem; color: var(--color-mid); margin-bottom: 16px; }
.row-actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* Slider inside apartments page */
.apt-img-slider img { width: 100%; height: 350px !important; object-fit: cover; object-position: bottom; }

/* ---------- Request Form ---------- */
.request-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
}
.form-block {
  flex: 1;
  min-width: 280px;
  background: var(--color-light);
  padding: 28px 24px;
}
.form-block h3 { margin-bottom: 20px; }
.form-row { margin-bottom: 14px; }
.form-row label {
  display: block;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: var(--color-mid);
}
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="date"],
.form-row input[type="number"],
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9rem;
  background: #fff;
  color: var(--color-dark);
  outline: none;
  transition: border-color var(--transition);
  box-sizing: border-box;
}
.form-row input:focus,
.form-row textarea:focus { border-color: var(--color-accent); }
.form-row textarea { resize: vertical; min-height: 100px; }
.form-row-inline { display: flex; gap: 14px; }
.form-row-inline .form-row { flex: 1; }
.form-row-inline .form-row input[type="date"] {font-family: 'Cormorant Garamond', Georgia, serif;}
  
.form-submit {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--color-dark);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 10px;
  transition: background var(--transition);
}
.form-submit:hover { background: var(--color-accent); }

#msg-sent { color: var(--color-accent); margin-bottom: 16px; display: none; }

/* Apartments selection sidebar */
.apt-selection { min-width: 260px; width: 320px; }
.apt-selection h5 {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 14px;
  color: var(--color-mid);
}
.apt-check-card {
  display: flex;
  gap: 10px;
  background: #fff;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: var(--radius);
  cursor: pointer;
  align-items: center;
  transition: box-shadow var(--transition);
}
.apt-check-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.apt-check-card input[type="checkbox"] { transform: scale(1.3); flex-shrink: 0; accent-color: var(--color-accent); }
.apt-check-card img { width: 72px; height: 54px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }
.apt-check-info h5 { font-size: 0.78rem; margin-bottom: 2px; }
.apt-check-info p { font-size: 0.72rem; color: var(--color-mid); margin: 0; }

/* Pre-select highlight */
.apt-check-card.selected { box-shadow: 0 0 0 2px var(--color-accent); }

/* ---------- Services Page ---------- */
.services-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.service-block { background: var(--color-light); padding: 24px; }
.service-block h5 { margin-bottom: 12px; }
.service-block ul { margin: 0; }

/* ---------- Map iframe ---------- */
/*.map-wrap {
  margin-top: 24px;
  width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
}*/
.map-wrap {
  margin-top: 24px;
  overflow: hidden;
  position: relative;
}
.map-wrap img {
  display: block;
  width: 100%;
  transform-origin: center center;
  transform: scale(2) translateY(19%); 
  filter: brightness(0) invert(-1) opacity(1);
  /* scale(2) = zoom 2x centrato
     translateY aggiusta verticalmente — valori negativi salgono */
}
/*.map-wrap img {margin: auto; text-align: center; width: 200%; }*/
.map-wrap iframe { display: block; width: 100%; height: 350px; border: none; text-align: center;}
.map-wrap a {color: #003cff; background: url("../img/map-link.png") no-repeat right center; background-size: 14%; padding-right: 22px; float: right; }
/* ---------- Footer ---------- */
#footer {
  background: var(--color-light);
  padding: 50px 20px;
  text-align: center;
}
#footer img { margin: 0 auto 20px; max-width: 180px; }
#footer p { font-size: 0.85rem; line-height: 1.8; color: var(--color-mid); }
#footer a { color: var(--color-mid); }
#footer a:hover { border-bottom: 1px solid currentColor; }
#backtotop {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent);
}
/*#backtotop::before { content: '↑  '; }*/
#backtotop:hover {border: none !important;}

/* ---------- Cookie Bar ---------- */
.cookie-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(40,36,32,0.95);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 9999;
  font-size: 0.82rem;
  flex-wrap: wrap;
}
.cookie-bar p { margin: 0; opacity: 0.85; }
.cookie-bar .btn-cookie {
  flex-shrink: 0;
  background: var(--color-cta);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font-body);
  letter-spacing: 0.06em;
}
.cookie-bar .btn-cookie:hover { background: var(--color-accent); }

/* ---------- Sub-page header (no slideshow) ---------- */
.page-header {
  height: var(--nav-h);
  background: var(--color-light);
}

/* ---------- Tiny Slider overrides ---------- */
.tns-item { vertical-align: top; }



/* ------------ Emiliano --------------*/
.chiudi{clear: both;}
.partners {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0;
}
.partners img {
  display: block;
  max-width: 110px;
  width: 42vw;
  height: auto;
  padding: 0 10px;
}
.tns-outer{
    position: relative;
}
.tns-nav {
    position: absolute;
    z-index: 100;
    right: 0px;
    top: -30px;
}
.input-error {
  border-color: #e53e3e !important;
  outline-color: #e53e3e;
}
.field-error {
  display: block;
  color: #e53e3e;
  font-size: 0.82rem;
  margin-top: 4px;
}
/* ---------------------------- */


/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .apt-detail .apt-info  { width: 100%; }
  .apt-detail .apt-slider { width: 100%; }
  .apt-detail .apt-slider img { height: 260px; }

  .apartment-row .row-img,
  .apartment-row .row-info { width: 100%; }
  .apartment-row .row-img img { height: 220px; }

  .services-grid { grid-template-columns: 1fr; }

  .request-wrap { flex-direction: column; }
  .apt-selection { width: 100%; }
  .row-img {margin-top: 13px;}
  .apt-info {padding-bottom: 40px !important;}
  .form-block {width: 100%;}
  
  .form-row-inline .form-row input[type="date"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    padding: 8px 10px !important;
    height: 38.4px !important;
    line-height: normal !important;
  }
}

@media (max-width: 767px) {
  /* Show hamburger, hide desktop nav */
  .btn-hamburger { display: flex; }
  .desktop-nav   { display: none; }

  .section-text  { padding: 50px 0; }
  .section-parallax { background-attachment: scroll; }

  #bg-slide,
  #bg-slide .tns-item img { height: 60vw; min-height: 320px; }
    
 
  /* Logo: sposta in alto centrato, non più al centro verticale */
  .slide-logo {
    /*top: calc(var(--nav-h, 64px) + 16px);*/
    top: calc(var(--nav-h, 0px) + -35px);
    left: 50%;
    transform: translateX(-50%);
    /* rimuove il translate verticale del desktop */
  }
  .slide-logo img {
    width: clamp(100px, 32vw, 160px);
  }

  /* CTA: rimane in basso a destra, compatta */
  .slide-cta {
    bottom: 12px;
    right: 12px;
    left: auto;
    max-width: 186px;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    padding: 10px 14px;
  }
  .slide-cta-tag { font-size: 0.58rem; letter-spacing: 0.12em; }
  .slide-cta strong { font-size: 1rem; }
  .slide-cta-sub { display: none; }

  #scroll-notice{display: none; }
  
  #footer img { max-width: 140px; }
}

@media (max-width: 480px) {
  :root { --nav-h: 52px; }
  h3 { font-size: 1.5rem; }
  .form-row-inline { flex-direction: column; gap: 0; }
  #bg-slide,
  #bg-slide .tns-item img { height: 70vw; min-height: 260px; }
  .partners img { max-width: 90px !important; }
}

/********************************************************************/