/* Servizi Immobiliari Page */
.bfz-servizi-immobiliari {
  position: relative;
}

/* ===== HERO SECTION ===== */
.bfz-servizi-hero {
  padding: clamp(34px, 6vw, 70px) 0 clamp(76px, 8vw, 116px);
  background: var(--bfz-blue);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.bfz-servizi-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(243, 244, 247, 0), rgba(243, 244, 247, 0.96));
  pointer-events: none;
}

.bfz-servizi-hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
}

.bfz-servizi-hero-title {
  margin: 0 0 18px 0;
  font-size: clamp(1.85rem, 4vw, 3.15rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.bfz-servizi-hero-desc {
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.26rem);
  line-height: 1.45;
  opacity: 0.87;
  max-width: 64ch;
}

/* ===== HERO SECTION ===== */
.bfz-servizi-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 6vw, 70px) 0 clamp(76px, 8vw, 116px);
  background: var(--bfz-blue);
}

.bfz-servizi-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background: linear-gradient(180deg, rgba(243, 244, 247, 0), rgba(243, 244, 247, 0.96));
  pointer-events: none;
}

.bfz-servizi-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
}

.bfz-servizi-hero-content {
  max-width: 900px;
  text-align: center;
}

.bfz-servizi-hero-title {
  margin: 0;
  color: var(--bfz-white);
  font-size: clamp(1.85rem, 4vw, 3.15rem);
  line-height: 1.05;
  font-weight: 800;
}

.bfz-servizi-hero-desc {
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.87);
  font-size: clamp(1rem, 1.4vw, 1.26rem);
  line-height: 1.45;
  max-width: 64ch;
}

/* ===== SERVICES SECTION ===== */
.bfz-servizi-section {
  margin-top: clamp(-72px, -6vw, -48px);
  position: relative;
  z-index: 3;
  padding-bottom: 44px;
}

/* Large wrapper card */
.bfz-servizi-wrapper {
  background: #f3f4f7;
  border: 1px solid rgba(23, 72, 142, 0.14);
  border-radius: 22px;
  padding: clamp(30px, 4vw, 60px) clamp(30px, 4vw, 50px);
  box-shadow: 0 24px 48px rgba(23, 43, 70, 0.18);
  overflow: hidden;
}

.bfz-servizi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* ===== SERVICE CARD ===== */
.bfz-servizi-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(23, 43, 70, 0.08);
  border: 1px solid rgba(0, 107, 169, 0.08);
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bfz-servizi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--bfz-blue);
  opacity: 0;
  transition: opacity 0.5s ease;
}

.bfz-servizi-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(0, 107, 169, 0.02) 0%, transparent 100%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.bfz-servizi-card:hover {
  transform: translateY(-16px) scale(1.02);
  box-shadow: 
    0 32px 64px rgba(0, 107, 169, 0.16),
    0 0 40px rgba(0, 107, 169, 0.08);
  border-color: rgba(0, 107, 169, 0.2);
}

.bfz-servizi-card:hover::before,
.bfz-servizi-card:hover::after {
  opacity: 1;
}

.bfz-servizi-card-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bfz-blue), #004d8f);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  transition: all 0.5s ease;
}

.bfz-servizi-card-icon svg {
  width: 40px;
  height: 40px;
}

.bfz-servizi-card:hover .bfz-servizi-card-icon {
  transform: scale(1.15) rotateZ(-5deg);
  box-shadow: 0 16px 40px rgba(0, 107, 169, 0.3);
}

.bfz-servizi-card-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--bfz-blue);
  line-height: 1.3;
  transition: all 0.5s ease;
}

.bfz-servizi-card:hover .bfz-servizi-card-title {
  color: #003a6b;
  transform: translateY(-2px);
}

.bfz-servizi-card-desc {
  margin: 0;
  font-size: 0.95rem;
  color: #666;
  line-height: 1.6;
  flex-grow: 1;
}

.bfz-servizi-card-btn {
  align-self: center;
  margin-top: auto;
  padding: 12px 32px;
  background: var(--bfz-blue);
  color: white;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.4s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 8px 16px rgba(0, 107, 169, 0.2);
}

.bfz-servizi-card-btn:hover {
  background: #003a6b;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(0, 107, 169, 0.3);
}

.bfz-servizi-card-btn:active {
  transform: translateY(-1px);
}

/* ===== MODAL POPUP ===== */
.bfz-servizi-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bfz-servizi-modal-overlay.is-active {
  display: flex;
  opacity: 1;
}

.bfz-servizi-modal {
  background: white;
  border-radius: 24px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.bfz-servizi-modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border: none;
  background: rgba(0, 107, 169, 0.1);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bfz-blue);
  transition: all 0.3s ease;
  z-index: 10;
}

.bfz-servizi-modal-close:hover {
  background: rgba(0, 107, 169, 0.2);
  transform: rotate(90deg);
}

.bfz-servizi-modal-close svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.5;
}

.bfz-servizi-modal-header {
  padding: 40px 40px 24px;
  border-bottom: 2px solid #f0f0f0;
  background: linear-gradient(135deg, rgba(0, 107, 169, 0.02) 0%, transparent 100%);
}

.bfz-servizi-modal-header h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 800;
  color: var(--bfz-blue);
  line-height: 1.2;
}

.bfz-servizi-modal-body {
  padding: 40px;
}

/* ===== TIMELINE INSIDE MODAL ===== */
.bfz-servizi-timeline {
  position: relative;
  padding-left: 28px;
}

.bfz-servizi-timeline::before {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 7px;
  width: 2px;
  background: linear-gradient(180deg, var(--bfz-blue), rgba(0, 107, 169, 0.15));
  border-radius: 2px;
}

.bfz-servizi-timeline-item {
  position: relative;
  padding: 0 0 28px 0;
}

.bfz-servizi-timeline-item:last-child {
  padding-bottom: 0;
}

.bfz-servizi-timeline-marker {
  position: absolute;
  left: -28px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bfz-blue);
  box-shadow: 0 2px 8px rgba(0, 107, 169, 0.35);
  z-index: 2;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bfz-servizi-timeline-item:hover .bfz-servizi-timeline-marker {
  transform: scale(1.3);
  box-shadow: 0 4px 14px rgba(0, 107, 169, 0.45);
}

.bfz-servizi-timeline-card {
  padding: 0 0 0 20px;
  transition: transform 0.3s ease;
}

.bfz-servizi-timeline-item:hover .bfz-servizi-timeline-card {
  transform: translateX(4px);
}

.bfz-servizi-timeline-card-title {
  margin: 0 0 4px 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--bfz-blue);
  line-height: 1.3;
}

.bfz-servizi-timeline-card-desc {
  margin: 0;
  font-size: 0.9rem;
  color: #666;
  line-height: 1.55;
}

.bfz-servizi-modal-body p {
  margin: 0 0 24px 0;
  font-size: 1rem;
  color: #555;
  line-height: 1.7;
}

.bfz-servizi-modal-body p:last-child {
  margin-bottom: 0;
}

.bfz-servizi-modal-body strong {
  color: var(--bfz-blue);
  font-weight: 700;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
  .bfz-servizi-section {
    margin-top: clamp(-60px, -5vw, -40px);
  }

  .bfz-servizi-wrapper {
    padding: clamp(24px, 3vw, 48px) clamp(24px, 3vw, 36px);
    border-radius: 18px;
  }

  .bfz-servizi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }

  .bfz-servizi-card {
    padding: 36px 28px;
  }

  .bfz-servizi-hero {
    padding: 60px 0 80px;
  }

  .bfz-servizi-hero-title {
    font-size: clamp(1.65rem, 3.5vw, 2.5rem);
  }
}

@media (max-width: 575px) {
  .bfz-servizi-section {
    margin-top: clamp(-50px, -4vw, -30px);
    padding-bottom: 32px;
  }

  .bfz-servizi-wrapper {
    padding: clamp(20px, 3vw, 32px) clamp(20px, 3vw, 28px);
    border-radius: 16px;
  }

  .bfz-servizi-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .bfz-servizi-card {
    padding: 32px 24px;
  }

  .bfz-servizi-hero {
    padding: 40px 0 60px;
  }

  .bfz-servizi-hero-title {
    font-size: 2rem;
    margin-bottom: 16px;
  }

  .bfz-servizi-hero-desc {
    font-size: 1rem;
  }

  .bfz-servizi-card-icon {
    width: 70px;
    height: 70px;
  }

  .bfz-servizi-card-icon svg {
    width: 36px;
    height: 36px;
  }

  .bfz-servizi-card-title {
    font-size: 1.2rem;
  }

  .bfz-servizi-modal {
    max-width: calc(100% - 40px);
  }

  .bfz-servizi-modal-header {
    padding: 32px 24px 20px;
  }

  .bfz-servizi-modal-header h2 {
    font-size: 1.5rem;
  }

  .bfz-servizi-modal-body {
    padding: 32px 24px;
  }

  .bfz-servizi-timeline {
    padding-left: 24px;
  }

  .bfz-servizi-timeline::before {
    left: 6px;
  }

  .bfz-servizi-timeline-marker {
    left: -24px;
    width: 14px;
    height: 14px;
  }

  .bfz-servizi-timeline-card {
    padding-left: 14px;
  }

  .bfz-servizi-timeline-item {
    padding-bottom: 22px;
  }

  .bfz-servizi-timeline-card-title {
    font-size: 0.9rem;
  }

  .bfz-servizi-timeline-card-desc {
    font-size: 0.84rem;
  }
}
