/* =========================================================
   LE TERRAZZE — stile "Google Sites" (sidebar fissa)
   Ispirato a lacorteribes.it: pulito, istituzionale,
   niente parallax/animazioni vistose, tipografia Roboto-like
========================================================= */

:root {
  --verde:      #93b168;   /* verde naturale / accenti link */
  --verde-dark:  #93b168;
  --grigio-testo:#3c3c3c;
  --grigio-chiaro:#5f6368;
  --bordo:      #e0e0e0;
  --sfondo-side:#f8f9fa;
  --bianco:     #ffffff;

  --font-base: 'futura-100', 'Inter', Arial, sans-serif; 
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--grigio-testo);
  font-size: 15px;
  line-height: 1.7;
  background: var(--bianco);
}

a { color: var(--verde); text-decoration: none; }
a:hover { color: var(--verde-dark); text-decoration: underline; }

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

h1, h2, h3, h4 {
  font-family: var(--font-base);
  font-weight: 400;
  color: #202124;
}

/* =========================================================  LAYOUT */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* =========================================================  SIDEBAR */
#sidebar {
  width: 280px;
  flex-shrink: 0;
  background: var(--sfondo-side);
  border-right: 1px solid var(--bordo);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  padding-bottom: 2rem;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.sidebar-brand {
  padding: 1.6rem 1.4rem 1.2rem;
  border-bottom: 1px solid var(--bordo);
}

.sidebar-brand a {
  display: block;
  font-size: 1.3rem;
  font-weight: 500;
  color: #202124;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.sidebar-brand small {
  display: block;
  font-size: 0.75rem;
  color: var(--grigio-chiaro);
  font-weight: 400;
  margin-top: 0.2rem;
}

.sidebar-nav {
  padding: 0.5rem 0;
}

.sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-nav .nav-link-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.4rem;
  font-size: 0.92rem;
  color: var(--grigio-testo);
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.15s ease;
}

.sidebar-nav .nav-link-top:hover {
  background: #eef1ee;
  text-decoration: none;
}

.sidebar-nav .nav-link-top.active {
  border-left-color: var(--verde);
  background: #eef1ee;
  font-weight: 500;
  color: var(--verde-dark);
}

.sidebar-nav .chevron {
  font-size: 0.7rem;
  color: var(--grigio-chiaro);
  transition: transform 0.2s ease;
}

.sidebar-nav .nav-group.open .chevron {
  transform: rotate(90deg);
}

.sidebar-nav .submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  background: #f1f3f1;
}

.sidebar-nav .nav-group.open .submenu {
  max-height: 600px;
}

.sidebar-nav .submenu a {
  display: block;
  padding: 0.5rem 1.4rem 0.5rem 2.2rem;
  font-size: 0.85rem;
  color: var(--grigio-chiaro);
  text-decoration: none;
  border-left: 3px solid transparent;
}

.sidebar-nav .submenu a:hover {
  color: var(--verde-dark);
  background: #e6eae6;
}

.sidebar-nav .submenu a.active {
  color: var(--verde-dark);
  font-weight: 500;
  border-left-color: var(--verde);
  background: #e6eae6;
}

.sidebar-nav .submenu-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-nav .submenu-sub a {
  padding-left: 3rem;
  font-size: 0.8rem;
}

.sidebar-footer {
  padding: 1.4rem;
  border-top: 1px solid var(--bordo);
  margin-top: 1rem;
  font-size: 0.75rem;
  color: var(--grigio-chiaro);
}

/* Mobile sidebar toggle */
#sidebarToggle {
  display: none;
  position: fixed;
  top: 0.8rem;
  left: 1rem;
  z-index: 1100;
  background: var(--bianco);
  border: 1px solid var(--bordo);
  border-radius: 4px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--grigio-testo);
  cursor: pointer;
}

#sidebarOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 999;
}

/* =========================================================  MAIN CONTENT */
#main {
  margin-left: 280px;
  width: calc(100% - 280px);
  min-height: 100vh;
}

.page-header {
  padding: 0;
  position: relative;
  overflow: hidden;
  background: #2c2c2c;
}

.page-header img.header-img {
  width: 100%;
  display: block;
  max-height: 800px;
  object-fit: cover;
}

.page-header-overlay {
/*  position: absolute;*/
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.55));
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.page-header-title {
  text-align: center;
  padding: 1.5rem;
  width: 100%;
}

.page-header-overlay_small {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.05), rgba(0,0,0,0.15));
  align-items: center;
}

.page-header-title {
  text-align: center;
  padding: 1rem;
}

.page-header-title h1 {
  color: #fff;
  font-size: 2.2rem;
  font-weight: 400;
  margin: 0;
}

.page-header-title .breadcrumb-custom {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}

.content-area {
  max-width: 980px;
  padding: 2.5rem 2.5rem 4rem;
  margin: 0 auto;
}

.content-area.wide { max-width: 1140px; }

.italic-caption {
  font-style: italic;
  font-size: 1.15rem;
  color: var(--grigio-chiaro);
  text-align: center;
  padding: 1.8rem 1rem;
  max-width: 700px;
  margin: 0 auto;
}

.section-block {
  margin-bottom: 3rem;
}

.section-block h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--bordo);
  padding-bottom: 0.6rem;
  margin-bottom: 1.2rem;
  color: #202124;
}

.section-block p {
  color: var(--grigio-testo);
  font-size: 0.95rem;
}


.section-block-2 {
  margin-bottom: 0.5rem;
}

.section-block-2 h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--bordo);
  color: #202124;
}

.section-block-2 p {
  color: var(--grigio-testo);
  font-size: 0.95rem;
}


.full-img {
  margin: 1.5rem 0;
}

.full-img img {
  width: 100%;
  border: 1px solid var(--bordo);
}

.full-img figcaption {
  font-size: 0.78rem;
  color: var(--grigio-chiaro);
  text-align: center;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Card grid (finiture, connessioni, ecc.) */
.simple-card {
  border: 1px solid var(--bordo);
  padding: 1.5rem;
  height: 100%;
  background: var(--bianco);
}

.simple-card h5 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  color: #202124;
}

.simple-card p {
  font-size: 0.88rem;
  color: var(--grigio-chiaro);
  margin: 0;
}

/* Card grid (contatti.) */
.simple-card-contatti {
  border: 1px solid var(--bordo);
  padding: 1.5rem;
  background: var(--bianco);
}

.simple-card-contatti h5 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
  color: #202124;
}

.simple-card-contatti p {
  font-size: 0.88rem;
  color: var(--grigio-chiaro);
  margin: 0;
}

/* Stat row */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--bordo);
  margin: 2rem 0;
}

.stat-box {
  flex: 1 1 200px;
  text-align: center;
  padding: 1.8rem 1rem;
  border-right: 1px solid var(--bordo);
}

.stat-box-2 {
  flex: 1 1 200px;
  text-align: center;
  border-right: 1px solid var(--bordo);
}

.stat-box:last-child { border-right: none; }

.stat-box .num {
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--verde-dark);
}

.stat-box .lbl {
  font-size: 0.75rem;
  color: var(--grigio-chiaro);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Unit grid for piano terra/primo links */
.unit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.7rem;
  margin: 1.5rem 0;
}

.unit-grid a {
  display: block;
  text-align: center;
  padding: 0.9rem 0.5rem;
  border: 1px solid var(--bordo);
  color: var(--grigio-testo);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s ease;
}

.unit-grid a:hover {
  background: var(--verde);
  color: #fff;
  border-color: var(--verde);
}

/* Map embed */
.map-embed {
  aspect-ratio: 16/8;
  border: 1px solid var(--bordo);
  overflow: hidden;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Tabs (piano terra/primo/interrato) */
.floor-tabs {
  border-bottom: 1px solid var(--bordo);
  margin-bottom: 0;
}

.floor-tabs button {
  background: none;
  border: none;
  padding: 0.7rem 1.3rem;
  font-size: 0.85rem;
  color: var(--grigio-chiaro);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.floor-tabs button.active {
  color: var(--verde-dark);
  border-bottom-color: var(--verde);
  font-weight: 500;
}

.piano-panel { display: none; padding-top: 1.5rem; }
.piano-panel.active { display: block; }

/* Footer */
.page-footer {
  border-top: 1px solid var(--bordo);
  padding: 1.5rem 2.5rem;
  font-size: 0.78rem;
  color: var(--grigio-chiaro);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Contact form */
.form-control-simple {
  border: 1px solid var(--bordo);
  border-radius: 2px;
  padding: 0.6rem 0.8rem;
  font-size: 0.88rem;
  width: 100%;
}

.form-control-simple:focus {
  outline: none;
  border-color: var(--verde);
}

.btn-simple {
  background: var(--verde);
  color: #fff;
  border: none;
  padding: 0.7rem 1.8rem;
  font-size: 0.85rem;
  border-radius: 2px;
  cursor: pointer;
}

.btn-simple:hover { background: var(--verde-dark); }

label.lbl-simple {
  font-size: 0.8rem;
  color: var(--grigio-chiaro);
  margin-bottom: 0.3rem;
  display: block;
}

/* Lightbox (riusato) */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.active { display: flex; }
.lightbox-inner { position: relative; max-width: 90vw; max-height: 90vh; }
.lightbox-inner img { max-width: 90vw; max-height: 85vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: -2.5rem; right: 0;
  color: rgba(255,255,255,0.7); font-size: 1.5rem;
  cursor: pointer; background: none; border: none;
}
.lightbox-close:hover { color: #fff; }

/* =========================================================  RESPONSIVE */
@media (max-width: 900px) {
  #sidebar {
    transform: translateX(-100%);
  }
  #sidebar.open { transform: translateX(0); }
  #sidebarOverlay.show { display: block; }
  #sidebarToggle { display: flex; }
  #main { margin-left: 0; width: 100%; }
  .content-area { padding: 2rem 1.2rem 3rem; }
  .page-header-title { padding: 1.5rem 1.2rem; }
  .page-header-title h1 { font-size: 1.6rem; }
  .page-footer { padding: 1.2rem; flex-direction: column; }
}
.stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bordo);
  cursor: pointer;
  display: inline-block;
}
.stat-dot.active { background: var(--verde); }

@media (max-width: 900px) {
  .page-header .header-img-small {
    max-height: 800px;
    object-fit: cover;
    width: 100%;
  }
}

.carousel-item img {
  pointer-events: none;
}

.btn-brochure {
    background-color: #93b168;
    color: #000000;
    font-family: "Futura-100";
    font-size: 16px;
    font-weight: 500;
    padding: 12px 30px;
    border: none;
    border-radius: 2;
    text-decoration: none;
}

.btn-brochure:hover {
    background-color: #86a15f;
    color: #ffffff;
}