/* ═══════════════════════════════════════════════════════════
   MYHAUS Immobiliare — Design System
   Fonte: myhaus_sito_web.html (design definitivo)
   ═══════════════════════════════════════════════════════════ */

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

/* ── Variables ───────────────────────────────────────────── */
:root {
  --navy:     #372A21;
  --navy-d:   #2B1F17;
  --brick:    #A63520;
  --brick-l:  #C4472D;
  --sand:     #F5F2EC;
  --sand-d:   #E8E4DB;
  --white:    #FFFFFF;
  --muted:    #7A9BB8;
  --text-dim: rgba(245,242,236,0.5);
  --serif:    'Cormorant Garamond', Georgia, serif;
  --sans:     'Jost', sans-serif;
  --border:   0.5px solid rgba(55,42,33,0.12);
  --border-l: 0.5px solid rgba(245,242,236,0.1);
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--sans);
  font-weight: 400;
  background: var(--sand);
  color: var(--navy);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--sans); }
input, select, textarea { font-family: var(--sans); }

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--sand); }
::-webkit-scrollbar-thumb { background: var(--brick); }

/* ── NAV ─────────────────────────────────────────────────── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 3.5rem;
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 0.5px solid transparent;
}
nav.scrolled {
  background: rgba(245,242,236,0.96);
  backdrop-filter: blur(12px);
  border-color: rgba(55,42,33,0.1);
}
nav.nav-solid {
  background: var(--navy);
  border-color: rgba(245,242,236,0.08);
  position: sticky;
}

/* logo */
.nav-logo {
  display: flex; align-items: center; gap: 0; text-decoration: none;
  color: var(--white); /* currentColor eredita questo per il testo SVG */
  transition: color 0.4s;
}
nav.scrolled .nav-logo { color: var(--navy); }
nav.nav-solid .nav-logo { color: var(--white); }

/* nav links */
.nav-links { display: flex; gap: 2.2rem; list-style: none; }
.nav-links a {
  font-family: var(--sans); font-size: 0.65rem; font-weight: 400;
  letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none; color: rgba(245,242,236,0.7);
  transition: color 0.2s;
}
nav.scrolled .nav-links a { color: rgba(55,42,33,0.6); }
nav.nav-solid .nav-links a { color: rgba(245,242,236,0.7); }
.nav-links a:hover,
.nav-links a.active { color: var(--brick) !important; }

.btn-nav {
  font-family: var(--sans); font-size: 0.6rem; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--white); background: var(--brick);
  border: none; padding: 0.65rem 1.4rem;
  cursor: pointer; transition: background 0.2s;
}
.btn-nav:hover { background: var(--brick-l); }
nav.scrolled .btn-nav { background: var(--navy); }
nav.scrolled .btn-nav:hover { background: var(--brick); }
nav.nav-solid .btn-nav { background: rgba(245,242,236,0.12); }
nav.nav-solid .btn-nav:hover { background: var(--brick); }

/* mobile menu toggle */
.nav-mobile-toggle {
  display: none;
  flex-direction: column; gap: 5px; padding: 4px;
}
.nav-mobile-toggle span {
  width: 22px; height: 1px;
  background: rgba(245,242,236,0.7);
  transition: 0.2s;
}
nav.scrolled .nav-mobile-toggle span { background: var(--navy); }

/* ── SECTION COMPONENTS ──────────────────────────────────── */
.section-tag {
  font-family: var(--sans); font-size: 0.6rem; font-weight: 400;
  letter-spacing: 0.4em; text-transform: uppercase; color: var(--brick);
  display: flex; align-items: center; gap: 10px; margin-bottom: 0.8rem;
}
.section-tag::before { content: ''; width: 20px; height: 1px; background: var(--brick); }
.section-h {
  font-family: var(--serif); font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400; color: var(--navy); line-height: 1.1;
}
.section-h--light { color: var(--white); }
.section-desc {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 400;
  color: rgba(55,42,33,0.55); line-height: 1.9;
}
.section-desc--light { color: var(--text-dim); }
.section-intro {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: end; margin-bottom: 4rem;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-line {
  display: inline-flex; align-items: center; gap: 16px;
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); padding: 0;
  transition: opacity 0.2s;
}
.btn-line-bar { width: 36px; height: 1px; background: var(--brick); transition: width 0.35s; }
.btn-line:hover .btn-line-bar { width: 70px; }
.btn-line-text {
  font-family: var(--sans); font-size: 0.62rem; font-weight: 400;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--navy);
}
.btn-line--light .btn-line-text { color: var(--white); }

.btn-solid {
  display: inline-block;
  font-family: var(--sans); font-size: 0.62rem; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--white); background: var(--brick);
  border: none; padding: 0.8rem 1.8rem;
  cursor: pointer; transition: background 0.2s;
  white-space: nowrap;
}
.btn-solid:hover { background: var(--brick-l); }
.btn-solid--navy { background: var(--navy); }
.btn-solid--navy:hover { background: var(--navy-d); }
.btn-solid--outline {
  background: transparent;
  border: 0.5px solid rgba(55,42,33,0.3);
  color: var(--navy);
}
.btn-solid--outline:hover { background: var(--navy); color: var(--white); }
.btn-solid--sm { padding: 0.55rem 1.2rem; font-size: 0.58rem; }
.btn-solid--lg { padding: 1rem 2.2rem; font-size: 0.65rem; }
.btn-solid--full { display: block; width: 100%; text-align: center; }

/* ── FORMS ───────────────────────────────────────────────── */
.form-section { display: flex; flex-direction: column; }
.form-row {
  border-bottom: 0.5px solid rgba(55,42,33,0.15);
  padding: 1rem 0;
}
.form-row label {
  display: block; font-family: var(--sans); font-size: 0.55rem;
  font-weight: 400; letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(55,42,33,0.4); margin-bottom: 6px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%; background: transparent; border: none; outline: none;
  font-family: var(--sans); font-size: 0.9rem; font-weight: 400;
  letter-spacing: 0.03em; color: var(--navy);
  -webkit-appearance: none; appearance: none;
}
.form-row select { cursor: pointer; }
.form-row textarea { resize: none; height: 64px; }
.form-row input::placeholder,
.form-row textarea::placeholder { color: rgba(55,42,33,0.2); }
.form-row:first-child { border-top: 0.5px solid rgba(55,42,33,0.15); }

.form-row--light { border-bottom-color: rgba(245,242,236,0.12); }
.form-row--light:first-child { border-top-color: rgba(245,242,236,0.12); }
.form-row--light label { color: rgba(245,242,236,0.35); }
.form-row--light input,
.form-row--light select,
.form-row--light textarea { color: var(--white); background: transparent; }
.form-row--light input::placeholder,
.form-row--light textarea::placeholder { color: rgba(245,242,236,0.25); }

/* admin-style boxed form */
.form-field { margin-bottom: 1.5rem; }
.form-field label {
  display: block; font-family: var(--sans); font-size: 0.55rem;
  font-weight: 400; letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(55,42,33,0.5); margin-bottom: 8px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--white);
  border: 0.5px solid rgba(55,42,33,0.2);
  outline: none;
  font-family: var(--sans); font-size: 0.85rem; font-weight: 400;
  color: var(--navy);
  padding: 0.7rem 0.9rem;
  transition: border-color 0.2s;
  -webkit-appearance: none; appearance: none;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--brick); }
.form-field textarea { resize: vertical; min-height: 120px; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 1.5rem; }

/* ── PROPERTY CARD ───────────────────────────────────────── */
.property-card {
  background: var(--sand-d);
  border: var(--border);
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s, box-shadow 0.35s;
  position: relative;
}
.property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(55,42,33,0.1);
}
.property-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--brick);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s;
}
.property-card:hover::after { transform: scaleX(1); }

.property-card__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: var(--sand-d);
}
.property-card__img-placeholder {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--sand-d);
  display: flex; align-items: center; justify-content: center;
  color: rgba(55,42,33,0.2);
}
.property-card__body { padding: 1.4rem 1.6rem 1.8rem; }
.property-card__cat {
  font-family: var(--sans); font-size: 0.55rem; font-weight: 400;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--brick);
  display: flex; align-items: center; gap: 8px; margin-bottom: 0.5rem;
}
.property-card__cat::before { content: ''; width: 12px; height: 1px; background: var(--brick); }
.property-card__cat--blue { color: var(--muted); }
.property-card__cat--blue::before { background: var(--muted); }

.property-card__title {
  font-family: var(--serif); font-size: 1.15rem; font-weight: 400;
  color: var(--navy); line-height: 1.3; margin-bottom: 0.7rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.property-card__meta {
  font-family: var(--sans); font-size: 0.62rem; font-weight: 400;
  color: rgba(55,42,33,0.45); letter-spacing: 0.04em;
  display: flex; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.property-card__price {
  font-family: var(--serif); font-size: 1.5rem; font-weight: 400;
  color: var(--navy);
}
.property-card__price-freq {
  font-family: var(--sans); font-size: 0.62rem; font-weight: 400;
  color: rgba(55,42,33,0.4); margin-left: 4px;
}
.property-card__badge {
  position: absolute; top: 1rem; right: 1rem;
  font-family: var(--sans); font-size: 0.52rem; font-weight: 400;
  letter-spacing: 0.2em; text-transform: uppercase;
  background: var(--brick); color: var(--white);
  padding: 3px 10px;
}

/* property grid */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1px;
  background: var(--border);
  border: var(--border);
}
.property-grid .property-card {
  border: none;
}

/* ── FILTER BAR ──────────────────────────────────────────── */
.filter-bar {
  background: var(--sand-d);
  border-top: var(--border);
  border-bottom: var(--border);
  padding: 2rem 3.5rem;
}
.filter-bar form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)) auto;
  gap: 0 2rem;
  align-items: end;
}
.filter-field { }
.filter-field label {
  display: block; font-family: var(--sans); font-size: 0.52rem;
  font-weight: 400; letter-spacing: 0.35em; text-transform: uppercase;
  color: rgba(55,42,33,0.4); margin-bottom: 8px;
}
.filter-field select,
.filter-field input {
  width: 100%; background: transparent; border: none; outline: none;
  border-bottom: 0.5px solid rgba(55,42,33,0.2);
  font-family: var(--sans); font-size: 0.85rem; font-weight: 400;
  color: var(--navy); padding: 0.4rem 0;
  -webkit-appearance: none; appearance: none;
  cursor: pointer;
}

/* ── PAGE HEADER ─────────────────────────────────────────── */
.page-header {
  background: var(--navy);
  padding: 8rem 3.5rem 3.5rem;
}
.page-header .section-tag { color: var(--brick); }
.page-header .section-h { color: var(--white); }

/* ── GALLERY ─────────────────────────────────────────────── */
.gallery { position: relative; }
.gallery__main {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  cursor: pointer;
}
.gallery__main-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--sand-d);
  display: flex; align-items: center; justify-content: center;
  color: rgba(55,42,33,0.2); font-family: var(--sans); font-size: 0.75rem;
  letter-spacing: 0.2em; text-transform: uppercase;
}
.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  margin-top: 2px;
}
.gallery__thumb {
  aspect-ratio: 4/3;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s;
  display: block;
}
.gallery__thumb:hover,
.gallery__thumb.active { opacity: 1; }
.gallery__count {
  position: absolute; bottom: calc(2px + 30% + 2px); right: 1rem;
  font-family: var(--sans); font-size: 0.58rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--white); background: rgba(55,42,33,0.6);
  padding: 4px 10px;
}

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(43,31,23,0.97);
  display: flex; align-items: center; justify-content: center;
}
.lightbox img { max-height: 90vh; max-width: 90vw; object-fit: contain; }
.lightbox__close {
  position: absolute; top: 1.5rem; right: 2rem;
  font-family: var(--sans); font-size: 0.6rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: rgba(245,242,236,0.5);
  cursor: pointer; transition: color 0.2s;
}
.lightbox__close:hover { color: var(--brick); }
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  font-family: var(--sans); font-size: 0.6rem; letter-spacing: 0.2em;
  text-transform: uppercase; color: rgba(245,242,236,0.4);
  cursor: pointer; padding: 1rem;
  transition: color 0.2s;
}
.lightbox__nav:hover { color: var(--brick); }
.lightbox__prev { left: 1rem; }
.lightbox__next { right: 1rem; }

/* ── SPECS ───────────────────────────────────────────────── */
.specs-row {
  display: flex;
  border-top: var(--border);
}
.spec-item {
  flex: 1;
  padding: 1.5rem 1.2rem;
  border-right: var(--border);
  text-align: center;
}
.spec-item:last-child { border-right: none; }
.spec-item__value {
  font-family: var(--serif); font-size: 1.6rem; font-weight: 400;
  color: var(--navy); line-height: 1;
}
.spec-item__label {
  font-family: var(--sans); font-size: 0.52rem; font-weight: 400;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: rgba(55,42,33,0.4); margin-top: 5px;
}

/* ── CONTACT INFO LIST ───────────────────────────────────── */
.contact-item {
  display: flex; flex-direction: column; gap: 3px;
  padding: 1.2rem 0;
  border-bottom: 0.5px solid rgba(55,42,33,0.1);
}
.contact-lbl {
  font-family: var(--sans); font-size: 0.55rem; font-weight: 400;
  letter-spacing: 0.35em; text-transform: uppercase; color: var(--brick);
}
.contact-val {
  font-family: var(--serif); font-size: 1rem; font-weight: 400;
  color: var(--navy); letter-spacing: 0.04em;
}

/* ── TOAST ───────────────────────────────────────────────── */
.toast-wrap {
  position: fixed; bottom: 2rem; right: 2rem;
  z-index: 9999; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  font-family: var(--sans); font-size: 0.65rem; font-weight: 400;
  letter-spacing: 0.08em; padding: 0.9rem 1.4rem;
  max-width: 320px; pointer-events: all;
  animation: toastIn 0.3s ease;
}
.toast--success { background: var(--navy); color: var(--white); }
.toast--error   { background: var(--brick); color: var(--white); }
.toast--info    { background: rgba(55,42,33,0.9); color: var(--white); }
@keyframes toastIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}

/* ── LOADER ──────────────────────────────────────────────── */
.loader {
  padding: 5rem 0; display: flex; align-items: center;
  justify-content: center; gap: 12px;
  font-family: var(--sans); font-size: 0.6rem; font-weight: 400;
  letter-spacing: 0.3em; text-transform: uppercase; color: rgba(55,42,33,0.35);
}
.loader::before {
  content: '';
  width: 20px; height: 20px;
  border: 1px solid rgba(55,42,33,0.15);
  border-top-color: var(--brick);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 6rem 2rem;
  font-family: var(--sans); font-size: 0.72rem; font-weight: 400;
  letter-spacing: 0.06em; color: rgba(55,42,33,0.4);
}
.empty-state__icon {
  font-family: var(--serif); font-size: 3rem; font-weight: 400;
  color: rgba(55,42,33,0.15); margin-bottom: 1rem;
}

/* ── PAGINATION ──────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 4px; padding: 3rem 0;
}
.pagination__btn {
  font-family: var(--sans); font-size: 0.58rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 0.5rem 1rem;
  border: 0.5px solid rgba(55,42,33,0.18);
  color: rgba(55,42,33,0.5);
  cursor: pointer; transition: all 0.2s;
  background: transparent;
}
.pagination__btn:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.pagination__btn.active { background: var(--brick); color: var(--white); border-color: var(--brick); }

/* ── ADMIN NAV ───────────────────────────────────────────── */
.admin-nav {
  background: var(--navy);
  padding: 0 3.5rem;
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
  border-bottom: 0.5px solid rgba(245,242,236,0.08);
  position: sticky; top: 0; z-index: 100;
}
.admin-nav__links {
  display: flex; gap: 2rem; list-style: none; align-items: center;
}
.admin-nav__links a {
  font-family: var(--sans); font-size: 0.6rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(245,242,236,0.5); text-decoration: none;
  transition: color 0.2s;
}
.admin-nav__links a:hover,
.admin-nav__links a.active { color: var(--brick); }
.admin-nav__links .btn-solid { line-height: 1; }

/* ── ADMIN TABLE ─────────────────────────────────────────── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border: var(--border);
}
.admin-table th {
  font-family: var(--sans); font-size: 0.52rem; font-weight: 400;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(55,42,33,0.4); text-align: left;
  padding: 1rem 1.2rem;
  border-bottom: 0.5px solid rgba(55,42,33,0.1);
  white-space: nowrap;
}
.admin-table td {
  padding: 1rem 1.2rem;
  border-bottom: 0.5px solid rgba(55,42,33,0.06);
  font-family: var(--sans); font-size: 0.78rem; font-weight: 400;
  color: var(--navy); vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(245,242,236,0.5); }
.admin-table td img { width: 60px; height: 40px; object-fit: cover; display: block; }

/* ── ADMIN STATUS BADGE ──────────────────────────────────── */
.status-badge {
  display: inline-block;
  font-family: var(--sans); font-size: 0.52rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  padding: 3px 9px;
}
.status-badge--pub  { background: rgba(55,42,33,0.08); color: var(--navy); }
.status-badge--boz  { background: rgba(166,53,32,0.08); color: var(--brick); }
.status-badge--ev   { background: var(--brick); color: var(--white); }

/* ── ADMIN ACTIONS ───────────────────────────────────────── */
.action-btn {
  font-family: var(--sans); font-size: 0.55rem; font-weight: 400;
  letter-spacing: 0.15em; text-transform: uppercase;
  padding: 4px 10px; cursor: pointer; transition: all 0.2s;
  border: 0.5px solid rgba(55,42,33,0.2); color: rgba(55,42,33,0.6);
  background: transparent;
}
.action-btn:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.action-btn--red:hover { background: var(--brick); border-color: var(--brick); }

/* ── ADMIN PHOTO UPLOAD ──────────────────────────────────── */
.upload-zone {
  border: 0.5px dashed rgba(55,42,33,0.25);
  padding: 3rem 2rem; text-align: center;
  cursor: pointer; transition: border-color 0.2s, background 0.2s;
  background: var(--white);
}
.upload-zone:hover,
.upload-zone.drag-over { border-color: var(--brick); background: rgba(166,53,32,0.02); }
.upload-zone__icon {
  font-family: var(--serif); font-size: 2.5rem; color: rgba(55,42,33,0.15);
  margin-bottom: 1rem;
}
.upload-zone__text {
  font-family: var(--sans); font-size: 0.65rem; font-weight: 400;
  letter-spacing: 0.1em; color: rgba(55,42,33,0.4);
}
.upload-zone__text span { color: var(--brick); }
.upload-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px; margin-top: 1rem;
}
.upload-preview {
  position: relative; aspect-ratio: 4/3;
}
.upload-preview img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.upload-preview__remove {
  position: absolute; top: 4px; right: 4px;
  font-family: var(--sans); font-size: 0.5rem; letter-spacing: 0.1em;
  background: rgba(166,53,32,0.9); color: var(--white);
  padding: 2px 6px; cursor: pointer;
}

/* ── TOGGLE ──────────────────────────────────────────────── */
.toggle-wrap { display: flex; align-items: center; gap: 12px; }
.toggle {
  position: relative; width: 44px; height: 22px;
  cursor: pointer; flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track {
  position: absolute; inset: 0;
  background: rgba(55,42,33,0.15);
  transition: background 0.2s;
}
.toggle input:checked + .toggle-track { background: var(--brick); }
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; background: var(--white);
  transition: transform 0.2s;
}
.toggle input:checked + .toggle-track + .toggle-thumb { transform: translateX(22px); }
.toggle-label {
  font-family: var(--sans); font-size: 0.65rem; font-weight: 400;
  letter-spacing: 0.1em; color: rgba(55,42,33,0.6);
}

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(20,40,71,0.7);
  display: flex; align-items: center; justify-content: center;
}
.modal {
  background: var(--white); padding: 2.5rem;
  max-width: 440px; width: 90%;
}
.modal h3 {
  font-family: var(--serif); font-weight: 400; font-size: 1.4rem;
  color: var(--navy); margin-bottom: 0.8rem;
}
.modal p {
  font-family: var(--sans); font-size: 0.78rem; font-weight: 400;
  color: rgba(55,42,33,0.55); margin-bottom: 1.8rem; line-height: 1.8;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ── HERO (index) ────────────────────────────────────────── */
.hero {
  min-height: 100vh; background: var(--navy);
  display: grid; grid-template-rows: 1fr auto;
  position: relative; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 80% 40%, rgba(166,53,32,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 20% 80%, rgba(55,42,33,0.8) 0%, transparent 80%);
}
.hero-noise {
  position: absolute; inset: 0; opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 200px;
}
.hero-ghost {
  position: absolute;
  font-family: var(--sans); font-weight: 400; font-size: 32vw;
  color: rgba(255,255,255,0.025);
  letter-spacing: -0.02em;
  right: -5vw; bottom: -5vw;
  line-height: 1; pointer-events: none; user-select: none;
}
.hero-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 10rem 3.5rem 4rem;
  min-height: 100vh;
}
.hero-eyebrow {
  display: flex; align-items: center; gap: 1rem;
  font-family: var(--sans); font-size: 0.6rem; font-weight: 400;
  letter-spacing: 0.4em; text-transform: uppercase; color: var(--brick);
  margin-bottom: 2rem;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.8s 0.2s forwards;
}
.hero-eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--brick); }
.hero-heading {
  font-family: var(--serif); font-size: clamp(3.2rem, 8vw, 7.5rem);
  font-weight: 400; line-height: 1.0; letter-spacing: -0.01em;
  color: var(--white); margin-bottom: 2.5rem;
  opacity: 0; transform: translateY(30px);
  animation: fadeUp 0.9s 0.4s forwards;
}
.hero-heading em { color: var(--brick); font-style: italic; }
.hero-bottom {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem;
  opacity: 0; transform: translateY(20px);
  animation: fadeUp 0.8s 0.7s forwards;
}
.hero-payoff {
  font-family: var(--sans); font-size: 0.75rem; font-weight: 400;
  letter-spacing: 0.06em; color: var(--text-dim); line-height: 2;
  max-width: 320px;
}
.hero-payoff strong {
  display: block; font-family: var(--serif); font-size: 1.1rem;
  font-weight: 400; color: var(--white); letter-spacing: 0.04em; margin-bottom: 0.5rem;
}
.hero-stats { display: flex; gap: 3rem; }
.stat { text-align: right; }
.stat-n {
  font-family: var(--serif); font-size: 3rem; font-weight: 400;
  color: var(--white); line-height: 1;
}
.stat-n sup { font-size: 1.2rem; color: var(--brick); vertical-align: top; margin-top: 0.4rem; display: inline-block; }
.stat-l {
  font-family: var(--sans); font-size: 0.55rem; font-weight: 400;
  letter-spacing: 0.3em; text-transform: uppercase; color: rgba(245,242,236,0.55); margin-top: 4px;
}
.hero-scroll {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  opacity: 0; animation: fadeIn 1s 1.2s forwards;
}
.scroll-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--brick); animation: scrollDot 2s ease-in-out infinite; }
@keyframes scrollDot { 0%,100%{opacity:0.3} 50%{opacity:1} }
.scroll-line { width: 1px; height: 44px; background: rgba(245,242,236,0.2); }

/* ── SERVICES ────────────────────────────────────────────── */
.services-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border: var(--border);
}
.service-card {
  padding: 2.5rem 2rem;
  border-right: var(--border); border-bottom: var(--border);
  transition: background 0.3s; position: relative; overflow: hidden;
}
.service-card:nth-child(3n) { border-right: none; }
.service-card:nth-child(n+4) { border-bottom: none; }
.service-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: var(--brick); transform: scaleX(0); transform-origin: left; transition: transform 0.4s;
}
.service-card:hover { background: var(--white); }
.service-card:hover::after { transform: scaleX(1); }
.service-num {
  font-family: var(--sans); font-size: 0.6rem; font-weight: 400;
  letter-spacing: 0.3em; color: var(--brick); margin-bottom: 1.5rem;
}
.service-name {
  font-family: var(--serif); font-size: 1.25rem; font-weight: 400;
  color: var(--navy); margin-bottom: 0.8rem; line-height: 1.3;
}
.service-txt {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 400;
  color: rgba(55,42,33,0.5); line-height: 1.85;
}

/* ── ZONE / POINTS ───────────────────────────────────────── */
.zone-grid {
  display: grid; grid-template-columns: repeat(2,1fr); gap: 1px;
  background: rgba(55,42,33,0.12); border: var(--border);
}
.zone-card {
  background: var(--sand-d); padding: 3rem 2.5rem;
  transition: background 0.3s; position: relative; overflow: hidden;
}
.zone-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--brick); transform: scaleY(0); transform-origin: bottom; transition: transform 0.4s;
}
.zone-card:hover { background: var(--white); }
.zone-card:hover::before { transform: scaleY(1); }
.zone-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; color: var(--navy); margin-bottom: 0.6rem; }
.zone-desc { font-family: var(--sans); font-size: 0.72rem; font-weight: 400; color: rgba(55,42,33,0.5); line-height: 1.9; }

.point {
  display: grid; grid-template-columns: auto 1fr;
  gap: 1.5rem; padding: 1.6rem 0;
  border-bottom: 0.5px solid rgba(245,242,236,0.08);
}
.point:first-child { border-top: 0.5px solid rgba(245,242,236,0.08); }
.point-bar { width: 1.5px; background: var(--brick); min-height: 40px; margin-top: 2px; }
.point-title {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 400;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--white); margin-bottom: 5px;
}
.point-desc { font-family: var(--sans); font-size: 0.7rem; font-weight: 400; color: rgba(245,242,236,0.45); line-height: 1.85; }

/* ── ORIGINAL PAGE SECTION CLASSES (da myhaus_sito_web.html) ─ */
.servizi { padding: 7rem 3.5rem; background: var(--sand); }

.perche {
  padding: 7rem 3.5rem;
  background: var(--navy);
  display: grid; grid-template-columns: 1fr 1fr; gap: 5rem;
  align-items: start;
}
.perche .section-tag { color: var(--brick); }
.perche .section-h   { color: var(--white); }
.perche-desc {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 400;
  color: var(--text-dim); line-height: 2; margin-top: 1.5rem;
}

.zone { padding: 7rem 3.5rem; background: var(--sand-d); }

.testi { padding: 7rem 3.5rem; background: var(--navy); overflow: hidden; }
.testi .section-tag { color: var(--brick); }
.testi .section-h   { color: var(--white); margin-bottom: 3.5rem; }

.contatti {
  padding: 7rem 3.5rem;
  background: var(--sand);
  display: grid; grid-template-columns: 1fr 1fr; gap: 6rem;
  align-items: start;
}
.contatti-desc {
  font-family: var(--sans); font-size: 0.8rem; font-weight: 400;
  color: rgba(55,42,33,0.55); line-height: 2; margin-top: 1.5rem;
}
.contact-list { margin-top: 2.5rem; display: flex; flex-direction: column; }

/* .form = alias di .form-section */
.form { display: flex; flex-direction: column; }

/* Bottone submit originale — linea + testo */
.btn-submit {
  margin-top: 2.5rem; display: flex; align-items: center; gap: 16px;
  background: none; border: none; cursor: pointer;
  font-family: var(--sans); padding: 0;
}
.btn-submit-line { width: 36px; height: 1px; background: var(--brick); transition: width 0.35s; }
.btn-submit:hover .btn-submit-line { width: 70px; }
.btn-submit-text {
  font-family: var(--sans); font-size: 0.62rem; font-weight: 400;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--navy);
}
.btn-submit-text--light { color: var(--white); }

/* nav-logo colori originali */
.nav-logo-dark .logo-d-name  { color: var(--white); }
.nav-logo-dark .logo-d-sub   { color: var(--muted); }
.nav-logo-light .logo-d-name { color: var(--navy); }

/* ── TESTIMONIALS ────────────────────────────────────────── */
.testi-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.testi-card {
  background: rgba(245,242,236,0.05);
  border: 0.5px solid rgba(245,242,236,0.1);
  padding: 2.5rem 2rem;
}
.testi-quote {
  font-family: var(--serif); font-size: 1.1rem; font-style: italic;
  font-weight: 400; color: rgba(245,242,236,0.85); line-height: 1.7; margin-bottom: 1.5rem;
}
.testi-stars { font-size: 1.1rem; color: var(--brick); margin-bottom: 0.8rem; letter-spacing: 2px; }
.testi-author { display: flex; align-items: center; gap: 10px; }
.testi-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brick); flex-shrink: 0; }
.testi-name {
  font-family: var(--sans); font-size: 0.62rem; font-weight: 400;
  letter-spacing: 0.15em; text-transform: uppercase; color: rgba(245,242,236,0.6);
}

/* ── FOOTER ──────────────────────────────────────────────── */
footer { background: var(--navy); }
.footer-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 2rem 3.5rem;
  border-bottom: 0.5px solid rgba(245,242,236,0.08);
}
.footer-logo-name {
  font-family: var(--sans); font-weight: 400; font-size: 0.95rem;
  letter-spacing: 0.22em; color: var(--white);
}
.footer-nav { display: flex; gap: 2rem; list-style: none; }
.footer-nav a {
  font-family: var(--sans); font-size: 0.6rem; font-weight: 400;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(245,242,236,0.35); text-decoration: none; transition: color 0.2s;
}
.footer-nav a:hover { color: var(--brick); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 3.5rem;
}
.footer-copy {
  font-family: var(--sans); font-size: 0.58rem; font-weight: 400;
  letter-spacing: 0.12em; color: rgba(245,242,236,0.25);
}
.footer-social { display: flex; gap: 1.5rem; }
.footer-social a {
  font-family: var(--sans); font-size: 0.58rem; font-weight: 400;
  letter-spacing: 0.18em; color: rgba(245,242,236,0.3);
  text-decoration: none; transition: color 0.2s;
}
.footer-social a:hover { color: var(--brick); }

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeUp  { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn  { to { opacity: 1; } }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: rgba(245,242,236,0.98); padding: 1rem 1.5rem; border-bottom: var(--border); }
  .nav-links.open { display: flex; }
  .nav-links a { color: rgba(55,42,33,0.6); }
  .nav-mobile-toggle { display: flex; }
  .btn-nav { display: none; }

  .hero-content { padding: 7rem 1.5rem 3rem; }
  .hero-bottom { flex-direction: column; align-items: flex-start; }
  .hero-stats { gap: 2rem; }

  .filter-bar { padding: 1.5rem; }
  .filter-bar form { grid-template-columns: 1fr 1fr; }
  .page-header { padding: 6rem 1.5rem 2.5rem; }

  .section-intro { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card:nth-child(n) { border-right: none; border-bottom: var(--border); }
  .service-card:last-child { border-bottom: none; }

  .zone-grid { grid-template-columns: 1fr; }
  .testi-grid { grid-template-columns: 1fr; }

  .property-grid { grid-template-columns: 1fr; }
  .gallery__thumbs { grid-template-columns: repeat(4, 1fr); }
  .specs-row { flex-wrap: wrap; }
  .spec-item { flex: 0 0 50%; }

  .footer-top { flex-direction: column; gap: 1.5rem; text-align: center; }
  .footer-nav { flex-wrap: wrap; justify-content: center; }
  .footer-bottom { flex-direction: column; gap: 0.8rem; text-align: center; }

  .admin-nav { padding: 0 1.5rem; }
  .admin-table { font-size: 0.7rem; }
  .admin-table td, .admin-table th { padding: 0.8rem; }
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .filter-bar form { grid-template-columns: 1fr; }
  .hero-heading { font-size: clamp(2.2rem, 10vw, 3.5rem); }
  .gallery__thumbs { grid-template-columns: repeat(3, 1fr); }
  .specs-row { flex-direction: column; }
  .spec-item { flex: none; border-right: none; border-bottom: var(--border); }
  .spec-item:last-child { border-bottom: none; }
}
