/* ==========================================================================
   CILENTO REAL ESTATE - ANTEPRIMA COLORI
   ========================================================================== */

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

/* CSS Variables - Personalizzabili via JavaScript */
:root {
  --primary-dark: #1a1a1a;
  --secondary-dark: #4a4a4a;
  --tertiary-dark: #2d3035;
  --accent-dark: #2d3035;
  --surface-dark: #363a40;
  --text-primary: #ffffff;
  --text-secondary: #e1e3e6;
  --text-light: #f8f9fa;
  --text-gray: #9ca3af;
  --text-muted: #9ca3af;
  --accent-gold: #d4af37;
  --accent-gold-light: #e6c966;
  --accent-gold-dark: #40c43b;
  --navbar-bg: rgba(10,11,13,0.95);
  --border-color: #ffffff;
  --gradient-primary: linear-gradient(135deg, var(--accent-gold) 0%, #b8941f 100%);
  --shadow-gold: 0 4px 15px rgba(212, 175, 55, 0.3);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--primary-dark);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }

p {
  margin-bottom: 1.2rem;
  line-height: 1.75;
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: var(--transition-normal);
}

a:hover {
  color: var(--accent-gold-light);
}

blockquote {
  margin: 1rem 0;
  padding: 0 0 0 20px;
  border-left: 3px solid var(--accent-gold);
}

blockquote p {
  margin: 0;
  font-style: italic;
  font-weight: 500;
}

strong {
  color: var(--accent-gold);
}

/* ==========================================================================
   COLOR PICKER PANEL
   ========================================================================== */

.color-picker-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #4a4a4a;
  border: 2px solid #d4af37;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  max-width: 320px;
  width: calc(100vw - 40px);
  backdrop-filter: blur(10px);
  transition: var(--transition-normal);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: #d4af37;
  border-radius: 14px 14px 0 0;
  cursor: move;
}

.panel-header h3 {
  font-size: 1.1rem;
  color: #1a1a1a;
  margin: 0;
}

.toggle-btn {
  background: transparent;
  border: none;
  color: #1a1a1a;
  font-size: 1.5rem;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
}

.toggle-btn:hover {
  transform: scale(1.1);
}

.panel-content {
  padding: 20px;
  max-height: 500px;
  overflow-y: auto;
  transition: var(--transition-normal);
}

.panel-content.collapsed {
  max-height: 0;
  padding: 0 20px;
  overflow: hidden;
}

.color-group {
  margin-bottom: 16px;
}

.color-group label {
  display: block;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.color-input-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
}

.color-input-wrapper input[type="color"] {
  width: 60px;
  height: 40px;
  border: 2px solid #9ca3af;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  transition: var(--transition-normal);
}

.color-input-wrapper input[type="color"]:hover {
  border-color: #d4af37;
  transform: scale(1.05);
}

.hex-input {
  flex: 1;
  padding: 10px;
  background: #1a1a1a;
  border: 1px solid #9ca3af;
  border-radius: 8px;
  color: #ffffff;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  transition: var(--transition-normal);
}

.hex-input:focus {
  outline: none;
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

.panel-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #9ca3af;
}

.action-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-normal);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.reset-btn {
  background: #1a1a1a;
  color: #ffffff;
  border: 2px solid #9ca3af;
}

.reset-btn:hover {
  background: #9ca3af;
  transform: translateY(-2px);
}

.export-btn {
  background: #d4af37;
  color: #1a1a1a;
}

.export-btn:hover {
  background: #e6c966;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--navbar-bg);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 3px solid var(--accent-gold);
  transition: var(--transition-normal);
  padding: 15px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 5rem;
}

.nav-logo img {
  height: 70px;
  width: auto;
  max-width: 350px;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  transition: var(--transition-normal);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--accent-gold);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition-normal);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  margin: 3px 0;
  transition: var(--transition-normal);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background:
      linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
      url(https://pub-7161d024d86c4d04b3a2c7f8d3fce4ca.r2.dev/images/cilento_home.png) center/cover no-repeat;
}

.hero-content {
  z-index: 2;
  padding: 100px 20px 20px;
  color: white;
  max-width: 850px;
  padding: 0 2rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: white;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.metodologia,
.bio-about,
.testimonials {
  padding: 1.5rem 0 4rem;
}

.metodologia {
  background: var(--secondary-dark);
}

.bio-about {
  background: var(--primary-dark);
  border-bottom: 1px solid var(--accent-gold);
}

.testimonials {
  background: var(--secondary-dark);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.section-header p {
  font-size: 1.2rem;
  color: var(--text-gray);
  margin-bottom: 1rem;
}

.divider {
  width: 80px;
  height: 2px;
  background: var(--accent-gold);
  margin-bottom: 1.5rem;
  border-radius: 2px;
}

/* ==========================================================================
   METODOLOGIA GRID
   ========================================================================== */

.metodologia-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 3rem;
}

.metodo-card {
  text-align: center;
  padding: 20px 0;
}

.metodo-card .card-icon {
  width: 100px;
  height: auto;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition-normal);
}

.metodo-card .card-icon img {
  width: 120px;
  height: 120px;
  object-fit: contain;
}

.metodo-card:hover .card-icon {
  transform: scale(1.1);
}

.metodo-card h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: var(--text-primary);
  font-weight: 600;
}

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

/* ==========================================================================
   BIO SECTION
   ========================================================================== */

.bio-content {
  padding: 80px 20px;
  color: var(--text-primary);
  text-align: center;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3.5rem;
}

.bio-content img {
  width: 450px;
  height: auto;
  object-fit: cover;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(212, 175, 55, 0.3);
  margin: 50px 20px 50px 0;
  border-radius: 30px;
  transition: var(--transition-normal);
}

.bio-content img:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 2px var(--accent-gold);
}

.bio-text {
  flex: 1;
  text-align: left;
}

.bio-text h2 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
}

.bio-text p {
  margin-bottom: 1.2rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.bio-text blockquote {
  margin: 2rem 0;
  padding-left: 1.5rem;
  border-left: 4px solid var(--accent-gold);
  font-style: italic;
}

.bio-text blockquote p {
  color: var(--accent-gold);
  font-size: 1.15rem;
  font-weight: 500;
}

.metodo-title {
  color: var(--text-primary);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */

.video-reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.video-review-card {
  background: var(--secondary-dark);
  width: 70%;
  border-radius: 50px;
  border: 1px solid var(--secondary-dark);
  transition: var(--transition-normal);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  max-width: 400px;
  margin: 0 auto;
}

.video-review-card video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
}

.video-review-card:hover {
  border-color: var(--accent-gold);
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
}

.video-play-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  cursor: pointer;
  transition: var(--transition-normal);
}

.video-play-overlay::before {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  background: rgba(212, 175, 55, 0.9);
  border-radius: 50%;
  transition: var(--transition-normal);
  box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
}

.video-play-overlay::after {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 18px 0 18px 30px;
  border-color: transparent transparent transparent #fff;
  margin-left: 6px;
  z-index: 1;
}

.video-play-overlay:hover::before {
  background: rgba(212, 175, 55, 1);
  transform: scale(1.1);
}

.video-review-card.playing .video-play-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  background: var(--primary-dark);
  border-top: 1px solid var(--accent-gold);
  padding: 40px 0 15px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.2rem;
}

.footer-section h4 {
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
  color: var(--text-gray);
}

.footer-section a {
  color: var(--text-gray);
  text-decoration: none;
  transition: var(--transition-normal);
}

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

.footer-logo {
  max-width: 180px;
  height: auto;
  margin-top: 55px;
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--accent-dark);
}

.footer-bottom p {
  color: var(--text-gray);
  font-size: 0.9rem;
}

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

@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-logo img {
    height: 60px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .metodologia-grid {
    grid-template-columns: 1fr;
  }

  .bio-content {
    flex-direction: column;
    padding: 40px 20px;
  }

  .bio-content img {
    width: 300px;
  }

  .bio-text h2 {
    font-size: 2.5rem;
  }

  .video-reviews-grid {
    grid-template-columns: 1fr;
  }

  .video-review-card {
    max-width: 100%;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-logo {
    margin: 0 auto;
  }

  /* Color Picker Panel su mobile */
  .color-picker-panel {
    bottom: 10px;
    right: 10px;
    max-width: calc(100vw - 20px);
  }

  .panel-content {
    max-height: 400px;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .metodo-card h3 {
    font-size: 1.1rem;
  }

  .bio-text h2 {
    font-size: 2rem;
  }
}
