/* 🔒 Nasconde la scrollbar nei browser che usano webkit */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
}

/* 📏 Font responsive con clamp */
html {
  font-size: clamp(0.7rem, 0.5vw + 0.5rem, 1.2rem);
}

main {
  flex-grow: 1;
}

/* 🖋 Tipografia globale */
h1, h2, h3, h4, h5, h6, p, a {
  color: var(--text-color); /* sostituito var(--tertiary-color) con testo coerente */
  line-height: 1.4;
}

th, td {
  text-align: center;
  vertical-align: middle;
  word-break: break-word;
  padding: var(--space-sm);
}

/* 🌌 Background primario */
.primary-bg {
  background-color: var(--color-primary);
  color: var(--text-color-light);
}

/* 🔘 Pulsanti */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--btn-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: var(--btn-radius);
  padding: var(--space-sm) var(--space-lg);
  font-weight: 600;
  box-shadow: var(--shadow-accent);
  cursor: pointer;
  transition: background var(--transition-fast);
  text-align: center;
  place-content: center;
}

.btn-primary:hover {
  background: var(--btn-bg-hover);
}

.btn:hover,
.btn:active,
.btn:focus {
  background-color: var(--btn-bg-hover);
  box-shadow: 0 4px 15px rgba(0,0,0,0.25);
  outline: none;
}

.btn:disabled {
  background-color: var(--color-muted);
  color: #fff;
  cursor: not-allowed;
  opacity: 0.65;
}

/* ⚠️ Alert system */
.alert {
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-md);
  border-radius: var(--radius-md);
  border-left: 4px solid transparent;
  box-shadow: var(--shadow-soft);
}

.alert-error {
  background-color: #fbeaea;
  color: #842029;
  border-left-color: #dc3545;
}

.alert-warning {
  background-color: #fff8e5;
  color: #664d03;
  border-left-color: #ffc107;
}

.alert-info {
  background-color: #e7f5f9;
  color: #055160;
  border-left-color: #0dcaf0;
}

/* 📜 Log Items */
.log-item {
  max-width: 100%;
  margin-bottom: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
}

.log-item .d-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 100%;
  word-wrap: break-word;
}

.log-item span {
  flex-grow: 1;
  word-break: break-word;
  margin-right: var(--space-sm);
  max-width: 85%;
}
/* ========================= */
/* 4. Footer                 */
/* ========================= */

footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  position: relative;
  overflow: hidden;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
}

/* Linea dorata superiore */
footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dark));
}

/* Links footer */
.footer a {
  color: var(--footer-text);
  text-decoration: none;
  transition: all var(--transition-fast);
  position: relative;
}

.footer a:hover {
  color: var(--color-accent);
}

.footer a:not(.social-icon)::after {
  content: '';
  position: absolute;
  width: 0;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: var(--color-accent);
  transition: width var(--transition-fast);
}

.footer a:not(.social-icon):hover::after {
  width: 100%;
}

.footer p {
    color: var(--footer-text);
}

/* Sezioni Footer */
.footer-section h4 {
  position: relative;
  display: inline-block;
  font-family: var(--font-secondary);
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.footer-section h4::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--color-accent);
}

/* Logo */
.custom-logo-footer {
  max-width: 130px;
  margin-bottom: var(--space-lg);
  transition: transform var(--transition-default);
}

.custom-logo-footer:hover {
  transform: scale(1.05);
}

/* Links */
.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: var(--space-sm);
  transition: transform var(--transition-fast);
}

.footer-links li:hover {
  transform: translateX(5px);
}

/* Contatti */
.footer-contact li {
  margin-bottom: var(--space-md);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.footer-contact li strong {
  display: inline-block;
}

/* Social icons */
.social-icons {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.social-icons a {
  color: var(--footer-text);
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.social-icons a:hover {
  color: var(--color-accent);
  transform: scale(1.1);
}

/* Bottom section */
.footer-bottom {
  text-align: center;
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
}

/* Animazioni al caricamento della pagina */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer-animate {
  animation: fadeInUp 0.7s ease forwards;
  opacity: 0;
}

.footer-animate:nth-child(1) { animation-delay: 0.1s; }
.footer-animate:nth-child(2) { animation-delay: 0.3s; }
.footer-animate:nth-child(3) { animation-delay: 0.5s; }
.footer-animate:nth-child(4) { animation-delay: 0.7s; }

/* Rotazioni icone (es. frecce) */
.rotate-icon {
  margin-left: 5px;
}

.rotate {
  transform: rotate(90deg);
  transition: transform var(--transition-fast);
}

.rotate-reverse {
  transform: rotate(0deg);
  transition: transform var(--transition-fast);
}
/* ========================= */
/* 5. Navigazione & Sidebar  */
/* ========================= */

.nav-link:hover {
  opacity: 0.7;
  text-decoration: none;
  color: var(--color-accent);
}

.admin-sidebar {
  color: var(--admin-sidebar-text);
  background-color: var(--admin-sidebar-bg);
  min-width: 180px;
  max-width: 260px;
  position: relative;
  height: 100vh;
  box-shadow: var(--shadow-soft);
}

.admin-sidebar .nav-link {
  color: var(--admin-sidebar-text);
  padding: var(--space-md);
  text-align: left;
  transition: background-color var(--transition-default),
              color var(--transition-fast);
  text-decoration: none;
  display: block;
  border-radius: var(--radius-sm);
}

.admin-sidebar .nav-link:hover {
  background-color: var(--admin-sidebar-hover);
  color: var(--color-accent);
}

.button-toggle {
  display: none;
  background: none;
  border: none;
  
  cursor: pointer;
}

/* ========================= */
/* 6. Links, Cards & Details */
/* ========================= */

a {
  text-decoration: none;
  color: var(--text-color);
  transition: color var(--transition-fast);
}

a:hover {
  text-decoration: none;
  color: var(--color-accent);
}

.sortable-ghost {
  opacity: 0.4;
}

.card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  overflow: hidden;
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-slow);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.card-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.thumbnail {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.flag {
  width: 20px;
  height: 20px;
  margin-right: var(--space-xs);
}

.text-error {
  display: none;
}

/* Navbar Brand */
.navbar-brand img {
  height: 40px;
  width: auto;
}

/* Badges */
.badge-success {
  background-color: #198754; /* verde elegante */
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.25em 0.6em;
  
}

.badge-secondary {
  background-color: #6c757d; /* grigio neutro luxury */
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.25em 0.6em;
  
}

/* Img thumbnails */
.img-thumbnail {
  width: 100%;
  max-width: 100px;
  height: 100%;
  max-height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  transition: transform var(--transition-fast);
}

.img-thumbnail:hover {
  transform: scale(1.05);
}

.handle:hover {
  text-decoration: none;
  cursor: grab;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
}

.pagination .page-link {
  padding: 5px 12px;
  
  border-radius: var(--radius-sm);
  color: var(--text-color);
  transition: background-color var(--transition-fast);
}

.pagination .page-link:hover {
  background-color: var(--color-accent-light);
  color: var(--color-primary);
}

/* ========================= */
/* 7. Cookie Banner & Prefs  */
/* ========================= */

.cookie-banner-content h2 {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cookie-banner-content p {
  color: var(--text-color);
  margin-bottom: 1rem;
}

.cookie-banner-content a {
  color: var(--cookie-secondary);
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.cookie-banner-content a:hover {
  color: var(--cookie-primary);
}

.cookie-categories {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.3rem;
}

.cookie-categories label {
  
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
}

.cookie-categories input[type="checkbox"] {
  accent-color: var(--cookie-secondary);
  width: 1.1em;
  height: 1.1em;
}

.cookie-banner-actions {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Cookie Buttons */
.cookie-btn {
  padding: 0.7em 1.4em;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast),
              color var(--transition-fast),
              box-shadow var(--transition-fast);
  box-shadow: var(--shadow-soft);
  outline: none;
}

.cookie-btn.accept {
  background: var(--color-accent);
  color: #fff;
}

.cookie-btn.accept:hover {
  color: var(--cookie-secondary);
  background: #fff;
}

.cookie-btn.reject {
  background: #fff;
  color: var(--cookie-secondary);
  border: 1.5px solid var(--cookie-secondary);
}

.cookie-btn.reject:hover {
    color: #fff;
}

.cookie-btn.prefs {
  background: var(--color-surface);
  color: var(--cookie-primary);
  border: 1.5px solid var(--cookie-primary);
}

.cookie-btn.prefs:hover {
    color: #fff;
}

.cookie-btn:focus-visible,
.cookie-prefs-fab:focus-visible {
  outline: 2px solid var(--cookie-secondary);
  outline-offset: 2px;
}

.cookie-btn:hover {
  filter: brightness(1.06);
  box-shadow: var(--shadow-strong);
}

/* Floating action for cookie prefs */
.cookie-prefs-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  background: var(--cookie-primary);
  border: none;
  border-radius: 50%;
  box-shadow: var(--shadow-strong);
  padding: 0.7em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast), box-shadow var(--transition-fast);
}

.cookie-prefs-fab:hover {
  background: var(--cookie-secondary);
  transform: scale(1.05);
}
/* ========================= */
/* 8. Navbar & Layout Admin  */
/* ========================= */

.navbar-nav .nav-link {
  color: var(--navbar-text);
  font-weight: 600;
  margin: 0 25px;
  transition: color var(--transition-fast), opacity var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.navbar-nav .nav-link:hover {
  opacity: 0.8;
  color: var(--navbar-text-hover);
}

.navbar-link-row,
.footer-link-row {
  align-items: center;
}

.dropdown-item img {
  margin-right: 8px;
}

.admin-container {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
}

ul {
  line-height: normal;
  text-align: left;
}

/* ========================= */
/* 9. Scroll Indicator       */
/* ========================= */

.scroll-indicator {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-accent);
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
  display: none;
  opacity: 0.85;
  animation: bounce 1.7s infinite;
  z-index: 9999;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ========================= */
/* 10. Responsive Design     */
/* ========================= */

@media (max-width: 768px) {
  footer {
    padding: var(--space-xl) 0 var(--space-lg);
  }

  .footer-section {
    text-align: center;
  }

  .footer-section h4 {
    padding-bottom: var(--space-sm);
  }

  .footer-section h4::after {
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
  }

  .custom-logo-footer {
    margin: 0 auto var(--space-lg);
  }

  .footer-links li:hover {
    transform: none;
  }

  .footer-contact li {
    flex-direction: column;
    align-items: center;
  }

  .footer-contact li strong {
    margin-bottom: 0.3rem;
  }

  .footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .social-icons {
    justify-content: center;
  }

  /* Sidebar mobile con slide */
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: -260px;
    width: 250px;
    height: 100%;
    transition: left var(--transition-default);
    z-index: 1000;
    margin-top: 70px;
    box-shadow: var(--shadow-strong);
  }

  .admin-sidebar.active {
    left: 0;
  }

  .button-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    
    cursor: pointer;
    color: var(--navbar-text);
  }

  .navbar {
    height: auto;
    padding: 10px 0;
  }

  .navbar-nav .nav-link {
    margin: 0 10px;
    padding: 10px 0;
  }

  /* Tabelle responsive stile "card" */
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  tr {
    margin: 0 0 var(--space-md) 0;
    border: 1px solid var(--border-light);
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    box-shadow: var(--shadow-soft);
  }

  td {
    position: relative;
    padding-left: 50%;
    text-align: left;
    border: none;
    border-bottom: 1px solid var(--border-light);
  }

  td:last-child {
    border-bottom: 0;
  }

  td:before {
    display: block;
    content: attr(data-label);
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
  }
}

.property-hero-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.card-placeholder {
    width: 100%;
    height: 200px;
    background: var(--color-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.card-placeholder i {
    opacity: 0.6;
}

.card-location {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.card-location i {
    color: var(--color-accent);
}

.card-link {
    display: inline-block;
    background: var(--color-accent);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    margin-top: var(--space-sm);
    transition: var(--transition-fast);
}

.card-link:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
}

/* Gallery Header Migliorata */
.hero-gallery {
    height: 70vh;
    min-height: 500px;
    margin-bottom: var(--space-sm);
}

.gallery-main-container {
    display: grid;
    grid-template-columns: 1fr 120px;
    gap: var(--space-md);
    height: 100%;
    padding: var(--space-lg);
}

.main-image-wrapper {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-strong);
}

.main-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition-fast);
    z-index: 10;
}

.gallery-nav:hover {
    background: rgba(0,0,0,0.9);
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev {
    left: var(--space-lg);
}

.gallery-nav.next {
    right: var(--space-lg);
}

.image-counter {
    position: absolute;
    bottom: var(--space-lg);
    right: var(--space-lg);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

.thumbnails-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    overflow-y: auto;
}

.thumbnail-item {
    width: 100px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition-fast);
}

.thumbnail-item:hover,
.thumbnail-item.active {
    border-color: var(--color-accent);
    transform: scale(1.05);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.show-all-photos {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 80px;
    background: var(--color-accent);
    color: white;
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: center;
    transition: var(--transition-fast);
}

.show-all-photos:hover {
    background: var(--color-accent-dark);
    transform: scale(1.05);
}

.show-all-photos span {
    font-weight: 700;
}

.show-all-photos small {
    margin-top: 2px;
}

/* Header Property Nuovo */
.property-header-new {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
    padding: var(--space-xl);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.property-badges {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
}

.property-type-badge {
    background: var(--color-primary);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: 20px;
    font-weight: 600;
}

.energy-badge {
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: 20px;
    font-weight: 600;
}

.negotiable-badge {
    background: var(--color-accent);
    color: white;
    padding: var(--space-xs) var(--space-md);
    border-radius: 20px;
    font-weight: 600;
}

.property-title-new {
    font-family: var(--font-secondary);
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.separator {
    color: var(--color-muted);
}

.category-name {
    color: var(--color-accent-dark);
    font-weight: 600;
}

.quick-stats {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.stat-item i {
    color: var(--color-accent);
}

.price-section-new {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.main-price-new {
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
    text-align: right;
}

.price-per-sqm-new {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.price-actions {
    display: flex;
    gap: var(--space-sm);
}

.btn-call {
    background: #27ae60;
}

.btn-call:hover {
    background: #229954;
}

.btn-info {
    min-width: 100px;
}

/* Responsive Gallery e Header */
@media (max-width: 768px) {
    .gallery-main-container {
        grid-template-columns: 1fr;
        grid-template-rows: 1fr auto;
        gap: var(--space-sm);
    }
    
    .thumbnails-sidebar {
        flex-direction: row;
        overflow-x: auto;
        padding: var(--space-sm);
    }
    
    .property-header-new {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .price-section-new {
        align-items: flex-start;
    }
    
    .main-price-new {
        text-align: left;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
    }
    
    .gallery-nav.prev {
        left: var(--space-sm);
    }
    
    .gallery-nav.next {
        right: var(--space-sm);
    }
}

/* Property Detail Styles */
.property-detail {
    background: var(--bg-main);
}

.gallery-container {
    position: relative;
    height: 100%;
}

.main-image {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: var(--color-muted);
    color: var(--color-primary);
}

.no-image-placeholder i {
    margin-bottom: var(--space-md);
}

.sold-badge {
    position: absolute;
    top: var(--space-lg);
    left: var(--space-lg);
    background: #e74c3c;
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-weight: 600;
    box-shadow: var(--shadow-soft);
}

.gallery-thumbnails {
    position: absolute;
    bottom: var(--space-lg);
    left: var(--space-lg);
    right: var(--space-lg);
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
}

.gallery-thumbnails .thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition-fast);
    border: 2px solid transparent;
}

.gallery-thumbnails .thumb:hover,
.gallery-thumbnails .thumb.active {
    opacity: 1;
    border-color: var(--color-accent);
}

.more-photos {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 60px;
    background: rgba(0,0,0,0.7);
    color: white;
    border-radius: var(--radius-sm);
    text-align: center;
}

.property-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-xl);
    gap: var(--space-lg);
}

.property-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    color: var(--text-muted);
}

.property-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.property-type {
    background: var(--color-accent-light);
    color: var(--color-accent-dark);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-weight: 500;
}

.price-section {
    text-align: right;
}

.main-price {
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
}

.negotiable {
    font-weight: 400;
    color: var(--text-muted);
    display: block;
}

.price-per-sqm {
    color: var(--text-muted);
}

/* Grid Layout */
.property-details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

/* Key Features */
.key-features {
    margin-bottom: var(--space-xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-md);
}

.feature-item.energy-class i {
    color: var(--energy-color);
}

.feature-item .value {
    font-weight: 700;
    color: var(--color-primary);
}

.feature-item .label {
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sections */
.description-section,
.detailed-features,
.nearby-section,
.amenities-section {
    margin-top: var(--space-md);
    margin-bottom: var(--space-md);
}

.description-section h2,
.detailed-features h2,
.nearby-section h2,
.amenities-section h2 {
    font-family: var(--font-secondary);
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
}

.description-content,
.nearby-content {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    line-height: 1.6;
    color: var(--text-color);
}

.features-list {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.feature-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--color-muted);
}

.feature-row:last-child {
    border-bottom: none;
}

.feature-label {
    color: var(--text-muted);
}

.feature-value {
    font-weight: 600;
    color: var(--color-primary);
}

/* Amenities */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-sm);
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: white;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-soft);
}

.amenity-item i {
    color: var(--color-accent);
}

/* Sidebar */
.property-sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-card,
.property-summary,
.share-section {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.contact-card h3,
.property-summary h3,
.share-section h3 {
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    font-family: var(--font-secondary);
}

.contact-info {
    margin-bottom: var(--space-lg);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    color: var(--text-color);
}

.contact-item i {
    color: var(--color-accent);
    width: 16px;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: white;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
}

.btn-whatsapp:hover {
    background: #128c7e;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-muted);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item .label {
    color: var(--text-muted);
}

.summary-item .value {
    font-weight: 600;
    color: var(--color-primary);
}

.status-publish {
    color: #27ae60;
}

.status-sold {
    color: #e74c3c;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: var(--space-sm);
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: var(--transition-fast);
}

.share-btn.facebook {
    background: #3b5998;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.copy {
    background: var(--color-accent);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

/* Map Section */
.map-section {
    background: white;
    padding: var(--space-xl) 0;
    margin-top: var(--space-xl);
}

.map-section h2 {
    font-family: var(--font-secondary);
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
}

.map-container {
    height: 400px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

#property-map {
    width: 100%;
    height: 100%;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: var(--space-lg);
    top: var(--space-lg);
    font-weight: bold;
    cursor: pointer;
    color: var(--text-muted);
}

.close:hover {
    color: var(--color-primary);
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-xs);
    color: var(--color-primary);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-sm);
    border: 2px solid var(--color-muted);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

/* Responsive Design */
@media (max-width: 768px) {
    .property-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .price-section {
        text-align: left;
    }
    
    .property-details-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-thumbnails {
        left: var(--space-sm);
        right: var(--space-sm);
        bottom: var(--space-sm);
    }
    
    .sold-badge {
        top: var(--space-sm);
        left: var(--space-sm);
    }
}

.custom-logo {
    height: 57.38px;
    width: 210px;
    translate: 0 -50px;
}

/* Carousel Section Styles */
.carousel-section {
    background-color: var(--primary-color);
    padding: 3rem 0;
    position: relative;
    margin-top: -80px;
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -20px 30px rgba(0, 0, 0, 0.1);
}

.carousel-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.carousel-arrow {
    background-color: var(--btn-bg-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tertiary-color);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.carousel-arrow:hover {
    background-color: var(--btn-hover-bg-color);
    transform: translateY(-2px);
}

.carousel-arrow:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.carousel-progress {
    flex: 1;
    max-width: 300px;
    height: 6px;
    background-color: var(--btn-bg-color);
    border-radius: 3px;
    position: relative;
    overflow: hidden;
}

.carousel-progress-indicator {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: linear-gradient(to right, var(--cookie-primary), var(--cookie-secondary));
    border-radius: 3px;
    transition: width 0.5s ease-in-out;
    width: 0%;
}

.carousel-wrapper {
    position: relative;
    overflow: hidden;
    margin: 0 auto;
    padding-bottom: 20px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
    flex: 0 0 100%;
    padding: 0 1rem;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .carousel-slide {
        flex: 0 0 50%;
    }
}

@media (min-width: 992px) {
    .carousel-slide {
        flex: 0 0 33.33%;
    }
}

@media (min-width: 1200px) {
    .carousel-slide {
        flex: 0 0 25%;
    }
}

.carousel-card {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.carousel-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.carousel-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--cookie-primary), var(--cookie-secondary));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
}

.carousel-card:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.card-icon {
    margin-bottom: 1.5rem;
    
    color: var(--cookie-primary);
    display: inline-block;
    transition: transform 0.3s ease;
}

.carousel-card:hover .card-icon {
    transform: scale(1.2);
}

.card-title {
    font-family: var(--site-font);
    color: var(--tertiary-color);
    
    margin: 0 0 1rem;
    font-weight: 700;
}

.card-text {
    color: var(--tertiary-color);
    opacity: 0.85;
}

.carousel-indicators {
    display: none;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: var(--btn-bg-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: var(--cookie-primary);
    transform: scale(1.3);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    
    .carousel-section {
        margin-top: -60px;
    }
}

@media (max-width: 768px) {
    .hero-background {
        height: 70vh;
    }
    
    .carousel-section {
        margin-top: -40px;
        padding: 2rem 0;
    }
    
    .carousel-progress {
        max-width: 200px;
    }

}

@media (max-width: 576px) {
    .hero-background {
        height: 60vh;
    }
    
    .hero-logo {
        max-width: 150px;
    }

    .carousel-card {
        padding: 1.5rem;
    }
}

    .animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.3s;
}

.animate-title {
    overflow: hidden;
    position: relative;
}

.title-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(50px);
    animation: titleReveal 1.2s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
    animation-delay: 0.7s;
}

.animate-width {
    width: 0;
    animation: expandWidth 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
    animation-delay: 1.2s;
}

/* Effetto highlight sul titolo */
.hero-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: translateX(-100%);
    animation: lightSweep 3s ease-in-out infinite;
    animation-delay: 2s;
}

/* Keyframes per le animazioni */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes titleReveal {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }
    20% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 80px;
    }
}

@keyframes lightSweep {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

    /* Stili aggiuntivi per l'animazione carattere per carattere */
.title-char {
    display: inline-block;
    opacity: 0;
    transform: translateY(30px) rotate(8deg);
    filter: blur(5px);
    animation: charReveal 0.7s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}

.animate-chars .title-char {
    opacity: 1;
}

@keyframes charReveal {
    0% {
        opacity: 0;
        transform: translateY(30px) rotate(8deg);
        filter: blur(5px);
    }
    30% {
        opacity: 0.3;
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotate(0);
        filter: blur(0);
    }
}

    /* Locations Section Styles */

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cookie-primary), var(--cookie-secondary));
    margin-bottom: 1.5rem;
    color: white;
    
    box-shadow: 0 15px 30px rgba(var(--cookie-primary-rgb, 173, 179, 158), 0.3);
    transition: transform 0.3s ease;
}

.section-header:hover .section-icon {
    transform: scale(1.1) rotate(5deg);
}

/* View All Button */
.view-all-wrapper {
    text-align: center;
    margin-top: 1.5rem;
}

.view-all-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--cookie-primary), var(--cookie-secondary));
    color: white;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(var(--cookie-primary-rgb, 173, 179, 158), 0.3);
}

.view-all-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(var(--cookie-primary-rgb, 173, 179, 158), 0.4);
}

.view-all-button i {
    transition: transform 0.3s ease;
}

.view-all-button:hover i {
    transform: translateX(5px);
}

/* Decorative Elements */
.decorative-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.decorative-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.07;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    
    .location-card-wrapper {
        width: 260px;
    }
}

@media (max-width: 768px) {
    .locations-section {
        padding: 4rem 0;
    }
    
    .section-icon {
        width: 70px;
        height: 70px;
        
    }

    
    .location-card-wrapper {
        width: 240px;
    }
    
    .locations-grid {
        gap: 1.5rem;
    }
    
    .location-card-media {
        height: 180px;
    }
    
}

@media (max-width: 576px) {
    .locations-section {
        padding: 3rem 0;
    }

    
    .location-card-wrapper {
        width: 280px; /* Torna a dimensione ottimale su mobile */
    }
    
    .location-card-media {
        height: 200px;
    }
}

.property-listing-section {
    padding-bottom: 5rem;
}

/* Header stile */
.listing-header {
    background-size: cover;
    background-position: center;
    padding: 5rem 0 3rem;
    margin-bottom: 2rem;
    position: relative;
    color: white;
    text-align: center;
}

.breadcrumbs {
    margin-bottom: 1.5rem;
    
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition-default);
}

.breadcrumbs a:hover {
    color: white;
    text-decoration: underline;
}

.breadcrumbs i {
    margin: 0 0.5rem;
    
}

.breadcrumbs span {
    opacity: 0.8;
}

.listing-title {
    
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
    font-family: var(--site-font);
}

.listing-subtitle {
    
    opacity: 0.9;
    color: white;
    max-width: 600px;
    margin: 0 auto;
}

.listing-subtitle i {
    margin-right: 0.5rem;
    color: var(--color-accent);
}

.back-button i {
    margin-right: 0.5rem;
}

.results-counter span {
    font-weight: 700;
    color: var(--color-accent);
}

.sort-selector:hover, .sort-selector:focus {
    border-color: var(--color-accent);
}

.clear-filters i {
    margin-right: 0.3rem;
}

.filters-list {
    display: flex;
    flex-direction: column;
}

.filter-option input {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
}

.filter-option:hover .filter-checkmark {
    border-color: var(--color-accent);
}

.filter-option input:checked ~ .filter-checkmark {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.filter-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

.filter-option input:checked ~ .filter-checkmark:after {
    display: block;
}

.property-card.hidden {
    display: none;
}

/* Animate filtri */
.property-card.fade-out {
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
    height: 0;
    margin: 0;
    padding: 0;
}

.property-card.fade-in {
    animation: cardFadeIn 0.5s forwards;
    transition: var(--transition-default);
}

@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.property-features i {
    margin-right: 5px!important;
}

.property-action {
    margin-top: auto;
    padding-top: 1rem;
}

.modal-backdrop {
    display: none;
}
.view-details i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.view-details:hover {
    color: var(--accent-hover);
}

.view-details:hover i {
    transform: translateX(5px);
}

/* Responsive */
@media (max-width: 992px) {
    .listing-content {
        grid-template-columns: 1fr;
    }
    
    .filters-sidebar {
        margin-bottom: 1rem;
    }
    
    .filters-list {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 768px) {
    .listing-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .results-counter {
        order: -1;
    }
    
    .filters-list {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .properties-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 576px) {
    .listing-header {
        padding: 3rem 0 2rem;
    }
    
    .filters-list {
        grid-template-columns: 1fr 1fr;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
}

/* Breadcrumbs */
.breadcrumb-container {
    padding: 20px 0;
}

.breadcrumb {
    margin: 0;
    padding: 0;
    background-color: transparent;
    display: flex;
    flex-wrap: wrap;
    list-style: none;
}

.breadcrumb-item {
    
    color: var(--light-text);
}

.breadcrumb-item a {
    color: var(--light-text);
    text-decoration: none;
    transition: var(--transition-default);
}

.breadcrumb-item a:hover {
    color: var(--color-accent);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    padding: 0 10px;
    color: var(--light-text);
}

.breadcrumb-item.active {
    color: var(--text-color);
    font-weight: 600;
}
    /* Hero Section Styles */
.services-hero-section {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.parallax-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-image: url('../assets/custom/servizi/servizi_intro.WebP'); /* Assicurati che questo percorso sia corretto */
    background-size: cover;
    background-position: center;
    transform: translateZ(-1px) scale(1.5);
    z-index: 1;
}

.hero-overlay {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
}

.hero-decorative-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--cookie-primary, #adb39e), var(--cookie-secondary, #c7d79e));
    margin: 0 auto;
}

@keyframes wheel {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Main Content Section */
.services-main-section {
    background-color: var(--primary-color, #ffffff);
    padding: 5rem 0;
}

.services-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* Content Styling */
.content-block {
    max-width: 550px;
}

.content-title {
    
    font-weight: 700;
    color: var(--tertiary-color, #202020);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
    font-family: var(--site-font, 'Nunito', sans-serif);
}

.content-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(to right, var(--cookie-primary, #adb39e), var(--cookie-secondary, #c7d79e));
}

.content-subheading {
    
    font-weight: 600;
    color: var(--tertiary-color, #202020);
    margin-bottom: 1.5rem;
}

/* Features */
.services-features {
    margin: 2.5rem 0;
}

.feature-item:hover .feature-icon {
    transform: translateY(-5px) rotate(5deg);
}

.feature-title {
    font-weight: 600;
    color: var(--tertiary-color, #202020);
    margin: 0 0 0.5rem;
    font-family: var(--site-font, 'Nunito', sans-serif);
}

.feature-text {
    color: rgba(var(--tertiary-color-rgb, 32, 32, 32), 0.8);
    margin-left: 5px !important;
}

.content-cta {
    margin-top: 2.5rem;
}

.primary-button i {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.primary-button:hover i {
    transform: translateX(5px);
}

/* Form Styling */
.services-form-container {
    position: relative;
    translate: 0 -10rem;
    z-index: 1;
}

.form-card {
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, var(--cookie-primary, #adb39e), var(--cookie-secondary, #c7d79e));
    opacity: 0.1;
    border-radius: 0 0 0 100%;
    z-index: -1;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-title {
    
    font-weight: 700;
    color: var(--tertiary-color, #202020);
    margin: 0 0 0.5rem;
    font-family: var(--site-font, 'Nunito', sans-serif);
}

.form-subtitle {
    color: rgba(var(--tertiary-color-rgb, 32, 32, 32), 0.7);
    margin: 0;
    
}

/* Floating Label Inputs */
.form-floating-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-floating {
    position: relative;
}

.form-floating input,
.form-floating textarea {
    width: 100%;
    padding: 1.2rem 1rem 0.5rem;
    background-color: rgba(var(--tertiary-color-rgb, 32, 32, 32), 0.03);
    border: none;
    border-radius: 8px;
    color: var(--tertiary-color, #202020);
    
    transition: all 0.3s ease;
}

.form-floating input:focus,
.form-floating textarea:focus {
    outline: none;
    background-color: rgba(var(--tertiary-color-rgb, 32, 32, 32), 0.05);
}

.form-floating label {
    position: absolute;
    left: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
    color: rgba(var(--tertiary-color-rgb, 32, 32, 32), 0.7);
    
}

.form-floating input:focus ~ label,
.form-floating textarea:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label,
.form-floating textarea:not(:placeholder-shown) ~ label {
    top: 0.4rem;
    left: 1rem;
    color: var(--cookie-primary, #adb39e);
}

.input-focus-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, var(--cookie-primary, #adb39e), var(--cookie-secondary, #c7d79e));
    transition: width 0.3s ease;
    border-radius: 0 0 8px 8px;
}

.form-floating input:focus ~ .input-focus-border,
.form-floating textarea:focus ~ .input-focus-border {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.textarea-floating {
    height: auto;
}

.form-floating textarea {
    min-height: 120px;
    resize: vertical;
}

/* Custom Checkbox */
.form-checkbox {
    margin-bottom: 1.5rem;
}

.custom-checkbox {
    display: flex;
    align-items: flex-start;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
}

.checkbox-label {
    display: flex;
    cursor: pointer;
}

.checkbox-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(var(--tertiary-color-rgb, 32, 32, 32), 0.3);
    border-radius: 4px;
    margin-right: 10px;
    margin-top: 2px;
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-icon::after {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    transition: all 0.2s ease;
}

.custom-checkbox input:checked ~ .checkbox-label .checkbox-icon {
    background-color: var(--cookie-primary, #adb39e);
    border-color: var(--cookie-primary, #adb39e);
}

.custom-checkbox input:checked ~ .checkbox-label .checkbox-icon::after {
    transform: translate(-50%, -50%) scale(1);
}

.checkbox-text {
    color: rgba(var(--tertiary-color-rgb, 32, 32, 32), 0.7);
}

.checkbox-text a {
    color: var(--cookie-primary, #adb39e);
    text-decoration: none;
    transition: color 0.3s ease;
}

.checkbox-text a:hover {
    color: var(--cookie-secondary, #c7d79e);
}

/* Submit Button */
.submit-button {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--cookie-primary, #adb39e), var(--cookie-secondary, #c7d79e));
    color: white;
    font-weight: 600;
    
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(var(--cookie-primary-rgb, 173, 179, 158), 0.2);
}

.submit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(var(--cookie-primary-rgb, 173, 179, 158), 0.3);
}

.button-text {
    margin-right: 10px;
}

.button-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.submit-button:hover .button-icon {
    transform: translateX(5px);
}

/* Success Message */
.form-success-message {
    background-color: rgba(39, 174, 96, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.success-icon {
    color: #27ae60;
    
    margin-right: 1rem;
    flex-shrink: 0;
}

.success-content h4 {
    color: #27ae60;
    margin: 0 0 0.3rem;
    font-weight: 600;
}

.success-content p {
    margin: 0;
    
    color: rgba(var(--tertiary-color-rgb, 32, 32, 32), 0.8);
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .services-content-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .content-block {
        max-width: 100%;
        text-align: center;
    }
    
    .content-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

@media (max-width: 768px) {
    
    .services-main-section {
        padding: 3rem 0;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-card {
        padding: 1.5rem;
    }
}
    /* Success Page Styles */
.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 3rem 1rem;
    overflow: hidden;
}

.parallax-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
}

.success-container {
    width: 100%;
    max-width: 650px;
    position: relative;
    z-index: 1;
}

.success-card {
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    padding: 3rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Success Animation */
.success-animation {
    margin-bottom: 2rem;
}

.checkmark-circle {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.checkmark-circle-bg {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cookie-primary, #adb39e), var(--cookie-secondary, #c7d79e));
    opacity: 0.2;
    animation: scale-in 0.5s ease-out forwards;
}

.checkmark-circle-check {
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--cookie-primary, #adb39e);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation-delay: 0.4s;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: var(--cookie-primary, #adb39e);
    animation: stroke 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes scale-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 0.2;
    }
}

/* Success Content */
.success-content {
    animation: fade-in 0.8s ease-out forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

@keyframes fade-in {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-title {
    color: var(--tertiary-color, #202020);  
    font-weight: 700;
    margin-bottom: 1rem;
    font-family: var(--site-font, 'Nunito', sans-serif);
    background: linear-gradient(135deg, var(--cookie-primary, #adb39e), var(--cookie-secondary, #c7d79e));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.success-subtitle {
    color: var(--tertiary-color, #202020);
    
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-family: var(--site-font, 'Nunito', sans-serif);
}

.success-message {
    color: rgba(var(--tertiary-color-rgb, 32, 32, 32), 0.8);
    margin-bottom: 2rem;
}

/* Countdown */
.redirect-info {
    margin-bottom: 2rem;
    
    color: rgba(var(--tertiary-color-rgb, 32, 32, 32), 0.7);
}

.countdown-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--cookie-primary, #adb39e), var(--cookie-secondary, #c7d79e));
    color: white;
    border-radius: 50%;
    font-weight: 700;
    
    margin: 0 5px;
    position: relative;
    overflow: hidden;
}

.countdown-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--cookie-primary, #adb39e), var(--cookie-secondary, #c7d79e));
    border-radius: 50%;
    z-index: -1;
    transform: scale(0);
    opacity: 0.3;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* Action Button */
.success-actions {
    margin-top: 2rem;
}

.home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--cookie-primary, #adb39e), var(--cookie-secondary, #c7d79e));
    color: white;
    border-radius: 50px;
    font-weight: 600;
    
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(var(--cookie-primary-rgb, 173, 179, 158), 0.2);
}

.home-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(var(--cookie-primary-rgb, 173, 179, 158), 0.3);
    color: white;
}

.home-button i {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.home-button:hover i {
    transform: translateX(3px);
}

.decoration {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cookie-primary, #adb39e), var(--cookie-secondary, #c7d79e));
    opacity: 0.1;
}

.decoration-1 {
    width: 100px;
    height: 100px;
    top: -30px;
    left: -30px;
}

.decoration-2 {
    width: 50px;
    height: 50px;
    bottom: 30px;
    left: 30px;
}

.decoration-3 {
    width: 70px;
    height: 70px;
    top: 50px;
    right: -20px;
}

.decoration-4 {
    width: 120px;
    height: 120px;
    bottom: -40px;
    right: -40px;
}

/* Confetti Animation */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: confetti-fall 3s ease-in-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .success-card {
        padding: 2.5rem 1.5rem;
    }
    
    .checkmark-circle {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 576px) {
    .success-card {
        padding: 2rem 1.2rem;
    }
    
    .checkmark-circle {
        width: 80px;
        height: 80px;
    }
}
.privacy-section {
    padding: 0 0 5rem 0;
    background: #f7f8fa;
}
.privacy-hero {
    position: relative;
    height: 260px;
    background: linear-gradient(135deg, var(--cookie-primary, #adb39e), var(--cookie-secondary, #c7d79e));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: hidden;
}
.privacy-hero-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('/assets/custom/privacy-bg.jpg') center/cover no-repeat;
    opacity: 0.15;
    z-index: 1;
}
.privacy-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
}
.privacy-icon {
    margin-bottom: 1rem;
    color: white;
    opacity: 0.95;
}
.privacy-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    font-family: var(--site-font, 'Nunito', sans-serif);
}
.privacy-subtitle {
    
    opacity: 0.95;
    margin-bottom: 0;
}
.privacy-container {
    max-width: 900px;
    margin: -30px auto 0 auto;
    position: relative;
    z-index: 3;
}
.privacy-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    padding: 2.5rem 2rem;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.privacy-content {
    color: var(--tertiary-color, #202020);
}
.privacy-intro {
    
    font-weight: 600;
    margin-bottom: 1.2rem;
}
.privacy-list {
    margin: 2rem 0 0 1.2rem;
    padding: 0;
    counter-reset: privacy-counter;
}
.privacy-list > li {
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 0.5rem;
}
.privacy-list > li:before {
    counter-increment: privacy-counter;
    content: counter(privacy-counter) ".";
    font-weight: bold;
    color: var(--cookie-primary, #adb39e);
    position: absolute;
    left: -1.5rem;
    top: 0.2rem;
    
}
.privacy-list ul {
    margin: 0.7rem 0 0.7rem 1.5rem;
    padding: 0;
    list-style: disc;
    color: var(--cookie-primary, #adb39e);
    
}
.privacy-list ul li {
    margin-bottom: 0.5rem;
    color: var(--tertiary-color, #202020);
}
.privacy-list strong {
    color: var(--cookie-primary, #adb39e);
}
@media (max-width: 768px) {
    .privacy-hero {
        height: 180px;
    }
    .privacy-card {
        padding: 1.2rem 0.8rem;
    }
    .privacy-container {
        margin-top: -40px;
    }
}

/* Dispositivi mobili - max-width: 768px */
@media screen and (max-width: 768px) {
    .property-content-2 {
        margin-top: 10px;
        margin-bottom: 20px;
        display: flex;
        flex-direction: column;
    }
    
    .property-sidebar {
        order: 1; /* Sposta la sidebar dopo il main-content */
        width: 100%;
        margin-top: 20px;
    }
    
    .main-content {
        order: 2; /* Il contenuto principale va prima */
        width: 100%;
    }
}
/* Ottimizzazione per tablet e dispositivi mobili */
@media screen and (max-width: 768px) {
    .nav-tabs {
        padding: 0 10px; /* Riduce il padding orizzontale per schermi piccoli */
    }
}

/* Ottimizzazione per smartphone */
@media screen and (max-width: 480px) {
    .nav-tabs {
        padding: 0 5px; /* Ulteriore riduzione del padding per schermi molto piccoli */
    }
}

.hero-intro {
  min-height: 90vh;
  background: url('https://treehouseitalia.it/storage/thumbnails/y9XzhxovtuQaBkxOk0xu9QOlCXyveUA0EJNDTXWa.webp') center center / cover no-repeat;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: var(--font-primary);
}

.hero-intro::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* patina scura semitrasparente */
  z-index: 1;
}

.hero-intro > * {
  z-index: 2; /* per far comparire il contenuto sopra la patina */
}

.hero-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  justify-items: center;
  align-items: center;
  padding: var(--space-xl);
}

.hero-title {  
  font-family: var(--font-secondary);
  font-weight: 700;
  margin-bottom: var(--space-lg);
  color: var(--color-surface);
}

.title-accent {
  display: block;
  color: var(--color-accent);
  font-family: var(--font-secondary);
}

.hero-subtitle {
  color: var(--color-muted);
  margin-bottom: var(--space-lg);
  max-width: 500px;
  text-align: center;
}

.hero-actions {
  margin-bottom: var(--space-lg);
  display: flex;
  gap: var(--space-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  border-radius: var(--btn-radius);
  padding: var(--space-sm) var(--space-lg);
  text-align: center;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  place-content: center;
}

.btn-secondary:hover {
  background: var(--color-accent-light);
  color: var(--color-primary);
}

.hero-stats {
  margin-top: var(--space-lg);
  display: flex;
  gap: var(--space-sm);
}

.hero-visual {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  width: 340px;
  max-width: 100%;
  animation: float 3s infinite ease-in-out alternate;
  border: 1px solid var(--color-muted);
}

@keyframes float {
  to { transform: translateY(-12px); }
}

.card-image {
  background: url('https://treehouseitalia.it/assets/custom/homepage/homepage-background.WebP');
  width: 100%;
  background-size: cover;
  background-position: center;
}

.card-content {
  padding: var(--space-sm);
}

.card-badge {
  display: inline-block;
  background: var(--color-accent-dark);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  
  margin-bottom: var(--space-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-price {
  color: var(--color-accent);
  
  font-weight: 600;
  margin-top: var(--space-xs);
}

.complexes-section {
    padding: calc(var(--space-xl) * 2) 0;
    background: linear-gradient(180deg, var(--bg-main) 0%, rgba(248,248,246,0.5) 100%);
    position: relative;
}

.complexes-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Header */
.section-header {
    text-align: center;
    margin-bottom: calc(var(--space-xl) * 1.5);
}

.section-subtitle {
    color: var(--color-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-sm);
    display: block;
}

.section-title {
    font-family: var(--font-secondary);
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    font-weight: 700;
    justify-self: center;
}

.section-description {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Grid */
.complexes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-xl);
    margin-bottom: calc(var(--space-xl) * 1.5);
}

.complex-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-default);
    border: 1px solid rgba(203,161,53,0.1);
    position: relative;
}

.complex-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
    border-color: var(--color-accent);
}

.complex-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.complex-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.complex-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.complex-card:hover .complex-image img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13,27,42,0.8) 0%, rgba(203,161,53,0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-default);
}

.complex-card:hover .image-overlay {
    opacity: 1;
}

.view-more {
    color: #fff;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(10px);
    transition: all var(--transition-fast);
}

.view-more:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.6);
}

.complex-content {
    padding: var(--space-lg);
}

.complex-name {
    font-family: var(--font-secondary);
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
    font-weight: 600;
}

.complex-location {
    color: var(--text-muted);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.complex-features {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.feature-item svg {
    color: var(--color-accent);
}

.complex-price-range {
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-muted);
}

.price-from {
    color: var(--color-accent);
    font-weight: 600;
}

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

/* Responsive */
@media (max-width: 768px) {
    .complexes-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .complex-image {
        height: 200px;
    }
}
/* Mortgage Calculator */
.mortgage-calculator {
    background: white;
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.mortgage-calculator h3 {
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    font-family: var(--font-secondary);
}

.mortgage-calculator label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #495057;
}

.mortgage-calculator input,
.mortgage-calculator select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    transition: border-color 0.15s ease-in-out;
}

.mortgage-calculator input:focus,
.mortgage-calculator select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.mortgage-result {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #dee2e6;
}

.mortgage-result .result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.mortgage-result .result-item:last-child {
    border-bottom: none;
    font-weight: 600;
    color: #28a745;
}

.mortgage-result .label {
    color: #6c757d;
}

.mortgage-result .value {
    font-weight: 600;
    color: #2c3e50;
}

/* PDF Brochure */
.pdf-brochure {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    text-align: center;
    color: white;
}

.pdf-brochure h3 {
    color: white;
    margin-bottom: var(--space-md);
    font-family: var(--font-secondary);
}

.pdf-brochure .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
    margin-bottom: 8px;
    width: 100%;
}

.pdf-brochure .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.pdf-brochure small {
    color: rgba(255, 255, 255, 0.8);
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mortgage-calculator,
    .pdf-brochure {
        margin-bottom: 16px;
        padding: 16px;
    }
}
/* ===== SEZIONI GENERALI ===== */
.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dark));
  margin: 1.5rem auto 0;
  border-radius: 4px;
  box-shadow: var(--shadow-accent);
}

/* ===== CHI SIAMO SECTION ===== */
.about-section {
  background: linear-gradient(135deg, #fff 0%, var(--color-surface) 100%);
  padding: calc(var(--space-xl) * 2) 0;
}

.about-text {
  max-width: 900px;
  margin: 0 auto 4rem;
  text-align: center;
  line-height: 1.8;
  color: var(--text-color);
  font-weight: 400;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
  padding: 0 1rem;
}

.value-item {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-default);
  border-top: 4px solid var(--color-accent);
  position: relative;
  overflow: hidden;
}

.value-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
}

.value-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
}

.value-item h3 {
  font-family: var(--font-secondary);
  margin-bottom: 1rem;
  color: var(--color-accent-dark);
  font-weight: 600;
  line-height: 1.3;
}

.value-item p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== STATISTICHE ===== */
.stat-item {
  text-align: center;
  padding: .5rem;
  color: var(--text-muted);
}

.stat-number {
  display: block;
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
  font-family: var(--font-primary);
}

.stat-label {
  display: block;
  color: var(--color-muted);
  text-transform: capitalize;
  font-weight: 500;
}

.hero-stats .stat-number { opacity: 0; transition: opacity .4s ease; }
.hero-stats .stat-number.is-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .hero-stats .stat-number { transition: none; }
}

/* ===== SERVIZI SECTION ===== */
.services-section {
  background: linear-gradient(135deg, #f9f9f9 0%, #f0f0f0 100%);
  padding: calc(var(--space-xl) * 2) 0;
}

.service-item {
  background: white;
  padding: 3rem 2.5rem;
  margin-bottom: 2.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border-left: 5px solid var(--color-accent);
  transition: var(--transition-default);
  position: relative;
}

.service-item:hover {
  transform: translateX(8px);
  box-shadow: var(--shadow-strong);
}

.service-item h3 {
  font-family: var(--font-secondary);
  color: var(--color-accent-dark);
  margin-bottom: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}

.service-item p {
  color: var(--text-color);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.service-item b {
  color: var(--color-accent-dark);
  font-weight: 600;
}

.service-item a:not(.btn-primary) {
  color: var(--color-accent);
  text-decoration: underline;
  font-weight: 500;
  transition: var(--transition-fast);
}

.service-item a:not(.btn-primary):hover {
  color: var(--color-accent-dark);
}

.btn-primary:active {
  transform: translateY(-1px);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .section-title {
    margin-bottom: 2rem;
  }
  
  .values-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0;
  }
  
  .value-item {
    padding: 2rem 1.5rem;
  }
  
  .service-item {
    padding: 2rem 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .service-item:hover {
    transform: none;
  }
  
  .about-text {
    margin-bottom: 3rem;
  }
}
/* ================================
   TYPE DETAIL PAGE - MODERN STYLE
   ================================ */

/* Hero Section - Parallax Premium */
.type-hero {
    position: relative;
    height: 60vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-bottom: var(--space-xl);
}

.type-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    filter: brightness(0.7);
}

.type-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(13, 27, 42, 0.8) 0%,
        rgba(27, 38, 59, 0.6) 50%,
        transparent 100%
    );
}

.type-hero__content {
    position: relative;
    z-index: 10;
    max-width: 600px;
}

.type-hero__title {
    color: var(--text-color-light);
    font-family: var(--font-secondary);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 var(--space-lg);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
}

.type-hero__subtitle {
    color: var(--text-color-light);
    line-height: 1.6;
    opacity: 0.95;
    font-weight: 300;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Section Styling */
.type-details {
    margin-bottom: var(--space-xl);
}

.type-section-title {
    font-family: var(--font-secondary);
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 var(--space-lg);
    position: relative;
}

.type-section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    border-radius: 2px;
}

.type-block-title {
    font-family: var(--font-secondary);
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.type-block-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--color-accent);
    border-radius: 2px;
}

/* Card System */
.card-soft {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(203, 161, 53, 0.1);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-default);
}

.card-soft::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--color-accent) 50%, 
        transparent 100%
    );
}

.card-soft:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-strong);
    border-color: rgba(203, 161, 53, 0.2);
}

/* Grid Layout */
.type-details__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

/* Detail Lists */
.detail-list {
    margin: 0;
}

.detail-list dt {
    font-weight: 600;
    color: var(--color-primary);
    margin: 0 0 var(--space-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-list dd {
    margin: 0 0 var(--space-lg);
    color: var(--text-muted);
    line-height: 1.6;
    padding-left: var(--space-md);
    border-left: 2px solid var(--color-accent-light);
}

.detail-list dd:last-child {
    margin-bottom: 0;
}

/* Metrics Grid */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-lg);
}

.metric {
    text-align: center;
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--color-surface), #f5f5f5);
    border-radius: var(--radius-md);
    border: 1px solid rgba(203, 161, 53, 0.15);
    transition: all var(--transition-default);
    position: relative;
}

.metric:hover {
    background: linear-gradient(135deg, #fff, var(--color-accent-light));
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.metric__value {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
    font-family: var(--font-primary);
}

.metric__unit {
    font-weight: 400;
    color: var(--color-accent);
}

.metric__label {
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Organization Cards */
.org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-md);
}

.org-card {
    background: linear-gradient(145deg, #fff, #f8f8f8);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    border: 1px solid rgba(203, 161, 53, 0.1);
    transition: all var(--transition-default);
    position: relative;
}

.org-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-light));
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.org-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
    border-color: var(--color-accent);
}

.org-card__title {
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.org-card__body {
    color: var(--text-muted);
    line-height: 1.6;
}

/* RTE Content Styling */
.rte-content {
    color: var(--text-muted);
    line-height: 1.7;
}

.rte-content p:last-child {
    margin-bottom: 0;
}

/* Listing Container */
.listing-container {
    margin-top: var(--space-xl);
}

.listing-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--btn-radius);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.back-button:hover {
    background: var(--color-secondary);
    transform: translateX(-2px);
    color: white;
}

.results-counter {
    font-weight: 600;
    color: var(--color-primary);
}

.sort-selector {
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--color-muted);
    border-radius: var(--btn-radius);
    background: white;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.sort-selector:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(203, 161, 53, 0.1);
}

/* Listing Content */
.listing-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-xl);
    align-items: start;
    margin-bottom: 5rem;
}

/* Filters Sidebar */
.filters-sidebar {
    position: sticky;
    top: var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(203, 161, 53, 0.1);
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-lg);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--color-muted);
}

.filters-header p {
    font-weight: 600;
    color: var(--color-primary);
    margin: 0;
}

.clear-filters {
    background: none;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    padding: var(--space-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.clear-filters:hover {
    background: rgba(203, 161, 53, 0.1);
}

.filter-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.filter-option:hover {
    background: rgba(203, 161, 53, 0.05);
}

.filter-option input[type="radio"] {
    display: none;
}

.filter-checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-muted);
    border-radius: 50%;
    position: relative;
    transition: all var(--transition-fast);
}

.filter-option input[type="radio"]:checked + .filter-checkmark {
    border-color: var(--color-accent);
    background: var(--color-accent);
}

.filter-option input[type="radio"]:checked + .filter-checkmark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.filter-label {
    font-weight: 500;
    color: var(--color-primary);
    flex: 1;
}

.filter-count {
    color: var(--text-muted);
    font-weight: 500;
}

/* Properties Grid */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-lg);
}

.property-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all var(--transition-default);
    border: 1px solid rgba(203, 161, 53, 0.1);
}

.property-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
    border-color: var(--color-accent);
}

.property-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.property-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.property-card:hover .property-image img {
    transform: scale(1.05);
}

.property-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.1) 70%,
        rgba(0, 0, 0, 0.3) 100%
    );
}

.property-category {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    background: var(--color-accent);
    color: white;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.property-content {
    padding: var(--space-lg);
}

.property-title {
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 var(--space-sm);
    line-height: 1.3;
}

.property-location {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

.property-location i {
    color: var(--color-accent);
}

.property-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.feature-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
}

.feature-item i {
    color: var(--color-accent);
    width: 16px;
}

.view-details {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-accent);
    font-weight: 600;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.property-card:hover .view-details {
    color: var(--color-accent-dark);
    transform: translateX(4px);
}

/* No Results */
.no-results-container {
    display: none;
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.no-results-container.show {
    display: block;
}

.no-results-content i {
    color: var(--color-muted);
    margin-bottom: var(--space-lg);
}

.no-results-content h3 {
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

.reset-button {
    padding: var(--space-md) var(--space-lg);
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: var(--btn-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.reset-button:hover {
    background: var(--color-accent-dark);
    transform: translateY(-2px);
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 1024px) {
    .type-details__grid {
        grid-template-columns: 1fr;
    }
    
    .listing-content {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .filters-sidebar {
        position: static;
    }
    
    .metric-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}

@media (max-width: 768px) {
    .type-hero {
        height: 50vh;
        min-height: 400px;
        margin-bottom: var(--space-lg);
    }
    
    .type-hero__bg {
        background-attachment: scroll;
    }
    
    .card-soft {
        padding: var(--space-lg);
    }
    
    .listing-toolbar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .org-grid {
        grid-template-columns: 1fr;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .property-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .type-hero {
        height: 40vh;
        min-height: 300px;
    }

    .card-soft {
        padding: var(--space-md);
        margin-bottom: var(--space-md);
    }
    
    .metric {
        padding: var(--space-md);
    }
}

/* ================================
   ACCESSIBILITY & PERFORMANCE
   ================================ */

/* Focus states per accessibilità */
.back-button:focus,
.sort-selector:focus,
.clear-filters:focus,
.reset-button:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .listing-toolbar,
    .filters-sidebar,
    .back-button {
        display: none;
    }
    
    .type-hero {
        height: 200px;
        break-inside: avoid;
    }
    
    .card-soft {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Modal Full Gallery Styles */
.modal-full-gallery {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-full-gallery.show {
    opacity: 1;
    visibility: visible;
}

.modal-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1;
}

.modal-gallery-content {
    position: relative;
    width: 90%;
    height: 90%;
    max-width: 1200px;
    max-height: 800px;
    background: #fff;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    z-index: 2;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-gallery-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-gallery-header h3 {
    margin: 0;
    color: #333;
}

.close-gallery {
    cursor: pointer;
    color: #666;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-gallery:hover {
    color: #000;
}

.modal-gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #000;
}

.modal-image-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image-container img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    color: #333;
    transition: all 0.3s ease;
    z-index: 3;
}

.modal-nav-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.modal-nav-btn.prev {
    left: 20px;
}

.modal-nav-btn.next {
    right: 20px;
}

.modal-image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
}

.modal-thumbnails-container {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #eee;
    max-height: 150px;
    overflow-y: auto;
}

.modal-thumbnails-grid {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-thumbnail {
    width: 80px;
    height: 60px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.modal-thumbnail:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

.modal-thumbnail.active {
    border-color: #007bff;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.3);
}

.modal-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-gallery-content {
        width: 95%;
        height: 95%;
    }
    
    .modal-gallery-header {
        padding: 15px;
    }
    
    .modal-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .modal-thumbnails-container {
        padding: 15px;
        max-height: 120px;
    }
    
    .modal-thumbnail {
        width: 60px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .modal-gallery-content {
        width: 98%;
        height: 98%;
    }
    
    .modal-nav-btn.prev {
        left: 10px;
    }
    
    .modal-nav-btn.next {
        right: 10px;
    }
    
    .modal-thumbnails-grid {
        gap: 5px;
    }
    
    .modal-thumbnail {
        width: 50px;
        height: 38px;
    }
}
