/* ═══════════════════════════════════════════
   HR IMMOBILIARE — shared stylesheet
   ═══════════════════════════════════════════ */

/* ── VARIABLES ── */
:root {
  --c-teal:        #2D7D78;
  --c-teal-dark:   #1F5F5B;
  --c-teal-deeper: #163F3C;
  --c-teal-light:  #EBF4F3;
  --c-teal-mid:    #3A9590;
  --c-text:        #1A1A1A;
  --c-text-muted:  #4E6866;
  --c-text-light:  #8AA4A3;
  --c-white:       #FFFFFF;
  --c-off-white:   #FAFAFA;
  --c-bg-alt:      #F0F7F6;
  --c-border:      #CBE3E2;
  --c-border-soft: #E2F0EF;

  --ff-serif: 'Cormorant Garamond', Georgia, serif;
  --ff-sans:  'DM Sans', system-ui, -apple-system, sans-serif;

  --nav-h:     72px;
  --r:         4px;
  --r-md:      8px;
  --r-lg:      16px;
  --sh-sm:     0 1px 4px rgba(0,0,0,0.05);
  --sh-md:     0 4px 24px rgba(0,0,0,0.09);
  --sh-lg:     0 12px 48px rgba(0,0,0,0.13);
  --t:         0.3s ease;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--ff-sans);
  color: var(--c-text);
  background: var(--c-off-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-top: var(--nav-h);
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── CONTAINER ── */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── SECTION BASE ── */
.section     { padding: 5rem 0; background: var(--c-white);    box-shadow: inset 0 16px 32px -16px rgba(0,0,0,0.14); }
.section-alt { padding: 5rem 0; background: var(--c-bg-alt);  box-shadow: inset 0 16px 32px -16px rgba(0,0,0,0.10); }
.section-dark{ padding: 5rem 0; background: var(--c-teal-dark);box-shadow: inset 0 16px 32px -16px rgba(0,0,0,0.35); }

/* ── SECTION TYPOGRAPHY ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-teal);
  margin-bottom: 0.85rem;
}
.section-label::before {
  content: '';
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  flex-shrink: 0;
}
.section-dark .section-label { color: rgba(255,255,255,0.55); }

.section-title {
  font-family: var(--ff-serif);
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--c-text);
  margin-bottom: 1.25rem;
}
.section-dark .section-title { color: var(--c-white); }

.section-body {
  font-size: 1rem;
  color: var(--c-text-muted);
  line-height: 1.78;
}
.section-dark .section-body { color: rgba(255,255,255,0.72); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--ff-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: var(--r);
  transition: all var(--t);
  cursor: pointer;
  border: 2px solid transparent;
  line-height: 1;
}
.btn-primary {
  background: var(--c-teal);
  color: var(--c-white);
  border-color: var(--c-teal);
}
.btn-primary:hover {
  background: var(--c-teal-dark);
  border-color: var(--c-teal-dark);
  transform: translateY(-2px);
  box-shadow: var(--sh-md);
}
.btn-outline {
  background: transparent;
  color: var(--c-teal);
  border-color: var(--c-teal);
}
.btn-outline:hover {
  background: var(--c-teal);
  color: var(--c-white);
  transform: translateY(-2px);
}
.btn-ghost-white {
  background: transparent;
  color: var(--c-white);
  border-color: rgba(255,255,255,0.5);
}
.btn-ghost-white:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--c-white);
}
.btn-sm { padding: 0.6rem 1.35rem; font-size: 0.72rem; }

/* ── NAVBAR ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--c-white);
  border-bottom: 1px solid var(--c-border-soft);
  box-shadow: var(--sh-sm);
  transition: box-shadow var(--t);
}
.navbar.scrolled { box-shadow: var(--sh-md); }

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: -1rem;
}
.nav-logo img,
.nav-logo svg { height: 42px; width: auto; }
.logo-svg { flex-shrink: 0; }
.logo-roof, .logo-line { stroke: #527C7C; }
.logo-hr, .logo-name   { fill: #111111; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0;
}
.nav-link {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text-muted);
  transition: color var(--t);
  position: relative;
  white-space: nowrap;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0.85rem;
  right: 0.85rem;
  height: 2px;
  background: var(--c-teal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}
.nav-link:hover { color: var(--c-teal); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.active { color: var(--c-teal); font-weight: 600; }
.nav-link.active::after { transform: scaleX(1); }

.nav-cta {
  background: var(--c-teal) !important;
  color: var(--c-white) !important;
  padding: 0.55rem 1.1rem !important;
  border-radius: var(--r) !important;
  margin-left: 0.5rem;
  font-weight: 600 !important;
}
.nav-cta:hover {
  background: var(--c-teal-dark) !important;
  color: var(--c-white) !important;
}
.nav-cta::after { display: none !important; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 6px 4px;
  cursor: pointer;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-text);
  transition: all var(--t);
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── FOOTER ── */
.footer {
  background: var(--c-teal-dark);
  padding: 4rem 0 1.5rem;
  color: rgba(255,255,255,0.75);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 2.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-logo-img {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
  margin-bottom: 1rem;
}
.logo-footer { height: 36px !important; margin-bottom: 1rem; }
.footer .logo-svg .logo-hr,
.footer .logo-svg .logo-name  { fill: #ffffff; }
.footer .logo-svg .logo-roof,
.footer .logo-svg .logo-line  { stroke: rgba(255,255,255,0.72); }
.footer-tagline {
  font-size: 0.88rem;
  color: var(--c-white);
  font-weight: 500;
  margin-bottom: 0.35rem;
  line-height: 1.4;
}
.footer-piva {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 1.25rem;
}
.footer-info { display: flex; flex-direction: column; gap: 0.45rem; margin-bottom: 1.25rem; }
.footer-info-item {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.4;
}
.footer-info-item a { color: inherit; transition: color var(--t); }
.footer-info-item a:hover { color: var(--c-white); }
.footer-socials { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
.footer-soc {
  width: 34px; height: 34px;
  border-radius: var(--r);
  border: 1px solid rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.55);
  transition: all var(--t);
}
.footer-soc:hover { border-color: rgba(255,255,255,0.5); color: var(--c-white); background: rgba(255,255,255,0.08); }
.footer-soc svg { width: 15px; height: 15px; }
.fimaa-tag {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.35);
}
.footer-col h5 {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 1rem;
}
.footer-col ul { display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col li a {
  font-size: 0.83rem;
  color: rgba(255,255,255,0.58);
  transition: color var(--t);
  line-height: 1.3;
}
.footer-col li a:hover { color: var(--c-white); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.28);
}
.footer-bottom a { color: rgba(255,255,255,0.38); transition: color var(--t); }
.footer-bottom a:hover { color: rgba(255,255,255,0.65); }
.footer-bottom-links { display: flex; gap: 1.25rem; }

/* ── PAGE HEADER ── */
.page-header {
  background: var(--c-teal-light);
  padding: 3.5rem 0 3rem;
  border-bottom: 1px solid var(--c-border);
}
.page-header-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--c-teal);
  margin-bottom: 0.75rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.page-header-eyebrow::before {
  content: ''; display: block; width: 20px; height: 1.5px; background: var(--c-teal); flex-shrink: 0;
}
.page-header-title {
  font-family: var(--ff-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 400;
  color: var(--c-text);
  margin-bottom: 0.85rem;
  line-height: 1.1;
}
.page-header-sub {
  font-size: 0.95rem;
  color: var(--c-text-muted);
  max-width: 580px;
  line-height: 1.7;
}

/* ── PROPERTY CARDS ── */
.props-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.prop-card {
  background: var(--c-white);
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--c-border-soft);
  box-shadow: var(--sh-sm);
  transition: transform var(--t), box-shadow var(--t);
  display: flex;
  flex-direction: column;
}
.prop-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-lg);
}
.prop-img {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.prop-img-bg {
  width: 100%; height: 100%;
  transition: transform 0.55s ease;
}
.prop-card:hover .prop-img-bg { transform: scale(1.05); }
/* placeholder gradients */
.pi-1 { background: linear-gradient(145deg, #bfd4d0 0%, #6ea29c 100%); }
.pi-2 { background: linear-gradient(145deg, #d0cec4 0%, #9e9882 100%); }
.pi-3 { background: linear-gradient(145deg, #bec8d4 0%, #6e8ea2 100%); }
.pi-4 { background: linear-gradient(145deg, #d4c4bc 0%, #a2806e 100%); }
.pi-5 { background: linear-gradient(145deg, #c4d4c4 0%, #7ea27e 100%); }
.pi-6 { background: linear-gradient(145deg, #d4c4d4 0%, #a27ea2 100%); }
.prop-badge {
  position: absolute;
  top: 0.75rem; left: 0.75rem;
  padding: 3px 10px;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  z-index: 1;
}
.badge-vendita { background: var(--c-teal); color: var(--c-white); }
.badge-affitto { background: var(--c-teal-deeper); color: var(--c-white); }
.prop-body {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.prop-price {
  font-family: var(--ff-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--c-teal-dark);
  margin-bottom: 0.4rem;
  line-height: 1;
}
.prop-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 0.3rem;
  line-height: 1.3;
}
.prop-zone {
  font-size: 0.78rem;
  color: var(--c-text-muted);
  margin-bottom: 0.75rem;
}
.prop-desc {
  font-size: 0.8rem;
  color: var(--c-text-light);
  line-height: 1.65;
  margin-bottom: 1rem;
  flex: 1;
}
.prop-specs {
  display: flex;
  gap: 1rem;
  font-size: 0.76rem;
  color: var(--c-text-muted);
  padding: 0.75rem 0;
  border-top: 1px solid var(--c-border-soft);
  border-bottom: 1px solid var(--c-border-soft);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.prop-spec { display: flex; align-items: center; gap: 0.3rem; }

/* ── FORM CONTROLS ── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 1.25rem; }
.form-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--c-text);
}
.form-control {
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r);
  background: var(--c-white);
  font-size: 0.95rem;
  color: var(--c-text);
  transition: border-color var(--t), box-shadow var(--t);
  outline: none;
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--c-teal);
  box-shadow: 0 0 0 3px rgba(45,125,120,0.12);
}
.form-control::placeholder { color: var(--c-text-light); }
.form-control.error { border-color: #c0392b; }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
}
.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  margin-top: 3px;
  accent-color: var(--c-teal);
  cursor: pointer;
  flex-shrink: 0;
}
.form-check-label {
  font-size: 0.82rem;
  color: var(--c-text-muted);
  line-height: 1.55;
  cursor: pointer;
}
.form-check-label a { color: var(--c-teal); text-decoration: underline; }
.form-error {
  font-size: 0.72rem;
  color: #c0392b;
  margin-top: 3px;
}
.form-success {
  display: none;
  text-align: center;
  padding: 3rem 2rem;
}
.form-success-icon {
  width: 52px; height: 52px;
  background: var(--c-teal-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
}
.form-success-icon svg { width: 26px; height: 26px; color: var(--c-teal); }
.form-success h3 {
  font-family: var(--ff-serif);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 0.5rem;
}
.form-success p { color: var(--c-text-muted); font-size: 0.95rem; }

/* ── FADE UP ── */
.fade-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: none; }

/* ════════════════════════════
   RESPONSIVE
   ════════════════════════════ */

@media (max-width: 1200px) {
  .props-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }

  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--c-white);
    padding: 1.25rem 1.5rem 2rem;
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--sh-md);
    z-index: 999;
    gap: 0;
  }
  .nav-menu.open { display: flex; }
  .nav-link { padding: 0.75rem 0; font-size: 0.88rem; width: 100%; border-bottom: 1px solid var(--c-border-soft); }
  .nav-link::after { display: none; }
  .nav-link.active { border-left: 3px solid var(--c-teal); padding-left: 0.75rem; }
  .nav-cta { margin-left: 0 !important; margin-top: 0.75rem; }

  .section, .section-alt, .section-dark { padding: 3rem 0; }
  .page-header { padding: 2.25rem 0 2rem; }

  .props-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom-links { justify-content: center; }
}

/* ── PROP CARD LINK ── */
.prop-card-link { display: block; text-decoration: none; color: inherit; }

/* ── DETTAGLIO IMMOBILE ── */
.gallery-main { width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:8px; background:#E0DDD8; cursor:pointer; }
.gallery-thumbs { display:flex; gap:8px; margin-top:8px; }
.gallery-thumb { flex:1; aspect-ratio:4/3; background:#D0CDC8; border-radius:4px; cursor:pointer; border:2px solid transparent; transition:border-color 0.2s; }
.gallery-thumb.active,
.gallery-thumb:hover { border-color:#2D7D78; }
.caratteristiche-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:20px; }
.caratteristica-item { display:flex; gap:10px; align-items:center; font-size:14px; padding:10px; background:#F5F5F5; border-radius:6px; }
.mappa-placeholder { width:100%; height:400px; background:#F0F0F0; border:2px dashed #CCCCCC; border-radius:8px; display:flex; align-items:center; justify-content:center; margin-top:32px; }
.mappa-inner { text-align:center; color:#666; padding:24px; }
.mappa-istruzioni { font-size:13px; margin-top:12px; line-height:1.6; max-width:400px; }
.card-contatto { background:#2D7D78; color:white; padding:32px; border-radius:8px; position:sticky; top:90px; }
.card-contatto input,
.card-contatto textarea { background:rgba(255,255,255,0.15); border:1px solid rgba(255,255,255,0.3); color:white; border-radius:4px; padding:10px; width:100%; font-family:inherit; margin-bottom:12px; }
.card-contatto input::placeholder,
.card-contatto textarea::placeholder { color:rgba(255,255,255,0.6); }
