/* Stile di base di iRendity */
:root {
  /* Color Palette */
  --primary-color: #0A1512;      /* Blue navy profondo */
  --secondary-color: #FFB100;    /* Accent color - oro/ambra */
  --dark-color: #0A1512;         /* Variant più scura per sfondi */
  --light-gray: #F2F1EA;         /* Background light */
  --medium-gray: #E8E8E1;        /* Border color, divider */
  --dark-gray: #6E746F;          /* Text secondario */
  --text-color: #3A423E;         /* Text principale */
  --white: #FFFFFF;
  --black: #000000;
  --success: #3ECF8E;            /* Verde per feedback positivi */
  --warning: #FBBF24;            /* Giallo per avvisi */
  --error: #EF4444;              /* Rosso per errori */

  /* Typography */
  --font-family: 'Roboto', sans-serif;
  --font-size-base: 16px;
  
  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-xxl: 48px;
  
  /* Border Radius */
  --border-radius: 6px;
  --border-radius-lg: 12px;
  
  /* Transitions */
  --transition: all 0.3s ease;
  
  /* Box Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.05), 0 4px 6px rgba(0, 0, 0, 0.05);
  
  /* Container Width */
  --container-width: 1200px;
}

/* Reset Generale */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--text-color);
  background-color: var(--white);
}

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

a:hover {
  color: var(--secondary-color);
}

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

ul {
  list-style: none;
}

/* Contenitore */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Navbar */
.navbar {
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--spacing-md) 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
}
.logo-img {
  height: 44px;
  width: auto;
  display: block;
  background: #0A1512;
  border-radius: 10px;
  padding: 7px 13px;
  box-sizing: border-box;
}

.nav-menu {
  display: flex;
  align-items: center;
}

.nav-list, .auth-list {
  display: flex;
  gap: var(--spacing-md);
}

.nav-link {
  color: var(--dark-color);
  font-weight: 600;
  font-size: 15px;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius);
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
  background-color: var(--light-gray);
}

.btn-outline {
  border: 2px solid var(--primary-color);
  background-color: transparent;
  color: var(--primary-color);
  padding: var(--spacing-sm) var(--spacing-lg);
  border-radius: var(--border-radius);
  font-weight: 500;
  display: inline-block;
}

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

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

.bar {
  display: block;
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 5px 0;
  transition: var(--transition);
}

/* Hero Section */
.hero {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 120px 0 var(--spacing-xxl);
  text-align: center;
}

.hero h1 {
  font-size: 48px;
  margin-bottom: var(--spacing-md);
}

.hero p {
  font-size: 20px;
  max-width: 600px;
  margin: 0 auto var(--spacing-xl);
  opacity: 0.9;
}

.btn-primary {
  background-color: var(--secondary-color);
  color: var(--dark-color);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--border-radius);
  font-weight: 500;
  display: inline-block;
}

.btn-primary:hover {
  background-color: #e69100;
  color: var(--dark-color);
}

/* Featured Section */
.featured-section {
  padding: var(--spacing-xxl) 0;
}

.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: var(--spacing-xl);
  color: var(--primary-color);
}

.featured-properties {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
}

.property-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.property-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.property-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.property-details {
  padding: var(--spacing-lg);
}

.property-details h3 {
  font-size: 18px;
  margin-bottom: var(--spacing-xs);
  color: var(--primary-color);
}

.property-location {
  color: var(--dark-gray);
  font-size: 14px;
  margin-bottom: var(--spacing-md);
}

.property-stats {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

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

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

.stat-label {
  font-size: 12px;
  color: var(--dark-gray);
}

.btn-secondary {
  background-color: var(--primary-color);
  color: var(--white);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius);
  font-weight: 500;
  display: block;
  text-align: center;
}

.btn-secondary:hover {
  background-color: var(--dark-color);
  color: var(--white);
}

.view-all {
  text-align: center;
  margin-top: var(--spacing-xl);
}

.view-all-link {
  color: var(--primary-color);
  font-weight: 500;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

.view-all-link:hover {
  border-bottom-color: var(--primary-color);
}

/* CTA Section */
.cta-section {
  background-color: var(--light-gray);
  padding: var(--spacing-xxl) 0;
  text-align: center;
}

.cta-title {
  font-size: 32px;
  margin-bottom: var(--spacing-md);
  color: var(--primary-color);
}

.cta-text {
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto var(--spacing-xl);
  color: var(--text-color);
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
}

/* Footer */
.site-footer {
  background-color: var(--dark-color);
  color: var(--white);
  padding: var(--spacing-xl) 0;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-logo {
  flex: 1;
  min-width: 250px;
}

.footer-logo .logo-text {
  font-size: 24px;
  font-weight: 700;
  display: block;
  margin-bottom: var(--spacing-sm);
}

.footer-logo-img {
  height: 28px;
  width: auto;
  display: block;
  margin-bottom: var(--spacing-sm);
}

.tagline {
  opacity: 0.7;
}

.footer-columns {
  display: flex;
  flex: 2;
  flex-wrap: wrap;
  gap: var(--spacing-xl);
}

.footer-column {
  flex: 1;
  min-width: 150px;
}

.footer-column h4 {
  margin-bottom: var(--spacing-md);
  position: relative;
}

.footer-column h4:after {
  content: '';
  display: block;
  height: 2px;
  width: 30px;
  background-color: var(--secondary-color);
  margin-top: var(--spacing-sm);
}

.footer-column ul {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-column a {
  color: var(--white);
  opacity: 0.7;
}

.footer-column a:hover {
  opacity: 1;
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-lg);
  text-align: center;
  opacity: 0.6;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary-color);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  border: none;
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--dark-color);
}

/* Responsive */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: var(--spacing-md);
    flex-direction: column;
    align-items: flex-start;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 9999;
  }
  
  .nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .nav-list, .auth-list {
    flex-direction: column;
    width: 100%;
  }
  
  .nav-link {
    display: block;
    padding: var(--spacing-md);
  }
  
  .footer-content {
    flex-direction: column;
    gap: var(--spacing-xl);
  }
  
  .hero h1 {
    font-size: 36px;
  }
  
  .hero p {
    font-size: 18px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* ===== DARK MODE ===== */
html[data-theme="dark"] body {
  color: var(--color-text);
  background-color: var(--color-bg);
}
html[data-theme="dark"] a {
  color: var(--color-text-link);
}
html[data-theme="dark"] a:hover {
  color: var(--color-text-link-hover);
}
html[data-theme="dark"] .navbar {
  background-color: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
html[data-theme="dark"] .nav-link {
  color: var(--color-text);
}
html[data-theme="dark"] .nav-link:hover,
html[data-theme="dark"] .nav-link.active {
  color: var(--color-text-strong);
  background-color: var(--color-surface-raised);
}
html[data-theme="dark"] .property-card {
  background-color: var(--color-surface);
  box-shadow: var(--shadow-md);
}
html[data-theme="dark"] .property-card h3,
html[data-theme="dark"] .property-details h3,
html[data-theme="dark"] .stat-value,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .cta-title {
  color: var(--color-text-strong);
}
html[data-theme="dark"] .property-location,
html[data-theme="dark"] .stat-label {
  color: var(--color-text-muted);
}
html[data-theme="dark"] .cta-section {
  background-color: var(--color-bg-subtle);
}
html[data-theme="dark"] .cta-text {
  color: var(--color-text);
}
html[data-theme="dark"] .view-all-link {
  color: var(--color-text-link);
}
html[data-theme="dark"] .view-all-link:hover {
  border-bottom-color: var(--color-text-link);
}
html[data-theme="dark"] .nav-menu {
  background-color: var(--color-surface);
}