/**
 * Homepage Referral Section Styles
 * 
 * Premium referral program section for homepage
 * Matches Twins Real Estate luxury branding
 * @version 2.1.0
 */

.referral-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 80px 0;
  margin: 0;
  border-radius: 0;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.05);
  border: none;
  position: relative;
  overflow: hidden;
  transition: background-color 0.4s ease;
}

/* Subtle decorative gradient accent */
.referral-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    radial-gradient(ellipse at 10% 90%, rgba(212, 175, 55, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 10%, rgba(12, 35, 64, 0.03) 0%, transparent 50%);
  z-index: 0;
  pointer-events: none;
}

[data-theme="dark"] .referral-section {
  background: #000000 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .referral-section::before {
  background-image:
    radial-gradient(ellipse at 10% 90%, rgba(212, 175, 55, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 10%, rgba(212, 175, 55, 0.04) 0%, transparent 50%);
}

.referral-section__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.referral-section__content {
  text-align: center;
}

/* Section Header - Premium Styling */
.referral-section__header {
  position: relative;
  z-index: 1;
  margin-bottom: 3rem;
}

.referral-section__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #d4af37 0%, #b49225 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 8px 24px rgba(212, 175, 55, 0.3),
    0 0 0 4px rgba(212, 175, 55, 0.1);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.referral-section__icon:hover {
  transform: scale(1.08) rotate(2deg);
}

.referral-section__icon i {
  font-size: 32px;
  color: #fff;
}

.referral-section__title {
  font-family: var(--font-family-heading);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
  letter-spacing: -0.02em;
}

/* Gold accent underline */
.referral-section__title::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #d4af37, transparent);
  border-radius: 2px;
}

[data-theme="dark"] .referral-section__title {
  color: #f8fafc;
}

.referral-section__subtitle {
  font-size: 1.1rem;
  color: #64748b;
  max-width: 550px;
  margin: 1.5rem auto 0;
  line-height: 1.7;
}

[data-theme="dark"] .referral-section__subtitle {
  color: #94a3b8;
}

/* Benefits Grid - Premium Card Design */
.referral-section__benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative;
  z-index: 1;
  margin-bottom: 2.5rem;
}

.referral-benefit-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #ffffff;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.06),
    0 1px 0 rgba(0, 0, 0, 0.02);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.referral-benefit-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #d4af37, #f4d03f);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.referral-benefit-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(212, 175, 55, 0.2);
}

.referral-benefit-card:hover::before {
  opacity: 1;
}

[data-theme="dark"] .referral-benefit-card {
  background: #0a0a0a !important;
  border-color: #2a2a2a !important;
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: #ffffff !important;
}

[data-theme="dark"] .referral-benefit-card:hover {
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(212, 175, 55, 0.3);
}

/* Icon styling */
.referral-benefit-card__icon {
  font-size: 1.5rem;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.referral-benefit-card:hover .referral-benefit-card__icon {
  transform: scale(1.1);
}

/* Color variations for each benefit card */
.referral-benefit-card:nth-child(1) .referral-benefit-card__icon {
  background: linear-gradient(135deg, #d4af37 0%, #b49225 100%);
}

.referral-benefit-card:nth-child(2) .referral-benefit-card__icon {
  background: linear-gradient(135deg, #0c2340 0%, #1a3a5c 100%);
}

.referral-benefit-card:nth-child(3) .referral-benefit-card__icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.referral-benefit-card__icon i {
  font-size: 24px;
}

.referral-benefit-card__title {
  font-family: var(--font-family-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

[data-theme="dark"] .referral-benefit-card__title {
  color: #ffffff !important;
}

.referral-benefit-card__description {
  font-size: 0.95rem;
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}

[data-theme="dark"] .referral-benefit-card__description {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .referral-section__title {
  color: #ffffff !important;
}

[data-theme="dark"] .referral-section__subtitle {
  color: #e0e0e0 !important;
}

/* CTA Button - Matching site button patterns */
.referral-section__cta {
  margin-top: 2rem;
  position: relative;
  z-index: 1;
}

.referral-section__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
  color: var(--white-color);
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-family: var(--font-family-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  transition: all var(--transition);
  box-shadow: 0 10px 30px rgba(var(--primary-color-rgb), 0.3);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

.referral-section__button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-color-light) 100%);
  transition: left var(--transition-slow);
}

.referral-section__button:hover::before {
  left: 0;
}

.referral-section__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(var(--primary-color-rgb), 0.4);
}

.referral-section__button-text {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.referral-section__button-text i {
  font-size: 20px;
  transition: transform var(--transition-fast);
}

.referral-section__button:hover .referral-section__button-text i {
  transform: translateX(3px);
}

/* Dark Mode Support - Ultra Black (overrides above, ensures consistency) */
[data-theme="dark"] .referral-section {
  background-color: #000000 !important;
  border-color: #2a2a2a !important;
}

/* Responsive Design - Matching property-statistics breakpoints */
@media (max-width: 1200px) {
  .referral-section__benefits {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .referral-section {
    padding: 2.5rem 0;
  }

  .referral-section__title {
    font-size: var(--font-size-3xl);
  }

  .referral-section__benefits {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .referral-benefit-card {
    padding: 1rem;
  }

  .referral-benefit-card__icon {
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }

  .referral-section__button {
    width: 100%;
    justify-content: center;
    padding: 1rem 2rem;
  }
}

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

  .referral-section__icon {
    width: 56px;
    height: 56px;
  }

  .referral-section__icon i {
    font-size: 28px;
  }

  .referral-section__title {
    font-size: var(--font-size-2xl);
  }

  .referral-benefit-card {
    padding: 1rem;
  }
}