/* ============================================
   DAKHLA INVEST AGENCY — HOMEPAGE STYLES
   ============================================ */

/* HERO SECTION */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(26, 26, 46, 0.75) 0%,
    rgba(42, 157, 143, 0.35) 50%,
    rgba(201, 169, 110, 0.15) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 8rem 1.5rem 3rem;
  max-width: 900px;
  width: 100%;
}

.hero-title {
  font-family: var(--font-titre);
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--blanc-pur);
  line-height: 1.1;
  margin-bottom: var(--space-5);
  text-shadow: 0 2px 20px rgba(0,0,0,0.25);
}

.hero-title .text-or {
  color: var(--or-saharien);
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.85);
  margin-bottom: var(--space-10);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: var(--leading-relaxed);
}

.hero-search {
  margin-bottom: var(--space-10);
}

/* SEARCH TABS */
.search-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  flex-wrap: wrap;
}

.search-tab {
  padding: 0.5rem 1.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.1);
  color: var(--blanc-pur);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all .2s ease;
}

.search-tab:hover {
  background: rgba(255,255,255,0.25);
}

.search-tab.active {
  background: var(--or-saharien);
  border-color: var(--or-saharien);
  color: var(--blanc-pur);
}

/* Hero search bar pill style */
.search-bar.hero-search {
  background: var(--blanc-pur);
  border-radius: 9999px;
  padding: var(--space-2);
  box-shadow: var(--shadow-xl);
  align-items: center;
  max-width: 800px;
}

.search-bar.hero-search .search-field {
  border-right: 1px solid var(--gris-leger);
  padding: var(--space-3) var(--space-5);
  flex: 1;
}

.search-bar.hero-search .search-field:last-of-type {
  border-right: none;
}

.search-bar.hero-search .search-field select,
.search-bar.hero-search .search-field input {
  width: 100%;
  border: none;
  background: none;
  font-size: var(--text-base);
  color: var(--gris-fonce);
  outline: none;
  cursor: pointer;
}

.search-bar.hero-search .search-field select:invalid,
.search-bar.hero-search .search-field input::placeholder {
  color: var(--gris-moyen);
}

.search-bar.hero-search .search-field input[type="number"]::-webkit-outer-spin-button,
.search-bar.hero-search .search-field input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.search-bar.hero-search .search-field input[type="number"] {
  -moz-appearance: textfield;
}

.search-bar.hero-search .search-btn {
  border-radius: 9999px;
  padding: var(--space-4) var(--space-8);
}

@media (max-width: 768px) {
  .search-bar.hero-search {
    flex-direction: column;
    border-radius: var(--radius-lg);
  }

  .search-bar.hero-search .search-field {
    border-right: none;
    border-bottom: 1px solid var(--gris-leger);
    width: 100%;
  }

  .search-bar.hero-search .search-field:last-of-type {
    border-bottom: none;
  }

  .search-bar.hero-search .search-btn {
    width: 100%;
    justify-content: center;
  }
}

/* Hero Stats Row */
.hero-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-6);
  backdrop-filter: blur(4px);
}

.hero-stat-number {
  display: block;
  font-family: var(--font-titre);
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--or-saharien);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.hero-stat-label {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.3);
}

/* Hero Scroll Indicator */
.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: linear-gradient(135deg, #C9A96E 0%, #D4AF37 100%);
  color: var(--blanc-pur);
  font-size: var(--text-base);
  font-weight: 600;
  padding: 16px 40px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(201, 169, 110, 0.35);
  transition: all var(--transition-base);
  z-index: 1;
}

.hero-scroll:hover {
  transform: translateX(-50%) scale(1.05);
  box-shadow: 0 12px 40px rgba(201, 169, 110, 0.5);
  background: linear-gradient(135deg, #D4AF37 0%, #C9A96E 100%);
}

.hero-scroll svg {
  animation: bounce 2s infinite;
}

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

/* FEATURED GRID */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
}

/* STATS SECTION */
.stats-section {
  background: linear-gradient(135deg, #1A1A2E 0%, #2C3E50 100%);
  padding: var(--space-20) 0;
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(201, 169, 110, 0.1);
  border-radius: 50%;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  position: relative;
  z-index: 1;
}

.stats-grid .counter-number {
  color: var(--or-saharien);
  font-size: clamp(3rem, 5vw, 4rem);
}

.stats-grid .counter-label {
  color: rgba(255,255,255,0.7);
}

/* ZONES GRID */
.zones-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  margin-top: var(--space-12);
}

/* TESTIMONIALS GRID */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-top: var(--space-12);
}

/* PARTNERS */
.partner-logo-placeholder {
  display: inline-flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  white-space: nowrap;
  letter-spacing: 0.05em;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .featured-grid,
  .zones-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .featured-grid,
  .zones-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-stats-row {
    gap: var(--space-4);
  }
  
  .hero-stat-divider {
    display: none;
  }
  
  .hero-title {
    font-size: var(--text-4xl);
  }
}

/* ============================================
   FEATURED CARDS — DARK STYLE (comme l'image)
   ============================================ */

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.featured-slider {
  position: relative;
}

.featured-slider-item {
  height: 100%;
}

.featured-slider .owl-stage {
  display: flex;
}

.featured-slider .owl-item {
  display: flex;
}

.featured-slider .owl-item > .featured-slider-item {
  width: 100%;
}

.featured-slider .owl-nav {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
}

.featured-slider .owl-nav button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--blanc-pur);
  color: var(--bleu-marine);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-fast);
  border: none;
  cursor: pointer;
}

.featured-slider .owl-nav button:hover {
  background: var(--or-saharien);
  color: var(--blanc-pur);
  transform: scale(1.1);
}

.featured-slider .owl-nav button svg {
  width: 20px;
  height: 20px;
}

.featured-slider .owl-dots {
  display: flex;
  justify-content: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  display: none;
}

.featured-slider .owl-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--gris-moyen);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.featured-slider .owl-dot.active {
  background: var(--or-saharien);
  width: 28px;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  align-items: stretch;
}

.listings-grid .property-card-wrapper {
  height: 100%;
}

@media (max-width: 1024px) {
  .listings-grid {
    grid-template-columns: 1fr;
  }
}

.property-card-wrapper,
.property-card-featured .property-card-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.property-card-wrapper > a {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  color: inherit;
}

.property-card-featured .property-card-wrapper > a {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
  text-decoration: none;
}

.property-card-featured {
  background: var(--blanc-pur);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform .3s ease, box-shadow .3s ease;
  border: 1px solid var(--gris-leger);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  height: 100%;
}

.property-card-featured:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

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

.property-card-featured .property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}

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

.property-card-featured .property-image-badges {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
}

.property-card-featured .property-type-badge {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(4px);
  color: var(--bleu-marine);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.property-card-featured .property-ref-badge {
  background: rgba(42, 157, 143, 0.85);
  backdrop-filter: blur(4px);
  color: var(--blanc-pur);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.property-card-featured .property-favorite {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.95);
  color: var(--gris-fonce);
  border: none;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: all .2s ease;
}

.property-card-featured .property-favorite:hover {
  background: var(--blanc-pur);
  color: #ff4757;
  transform: scale(1.1);
}

.property-card-featured .property-favorite.active {
  background: #ff4757;
  color: var(--blanc-pur);
}

.property-card-featured .property-price-overlay {
  position: absolute;
  bottom: var(--space-3);
  left: var(--space-3);
  right: var(--space-3);
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(6px);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  text-align: center;
  z-index: 2;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.property-card-featured .property-price-overlay .property-price {
  font-family: var(--font-titre);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--bleu-marine);
  margin: 0;
}

.property-card-featured .property-price-overlay .property-price small {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--gris-moyen);
}

.property-card-featured .property-content {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.property-card-featured .property-title {
  font-family: var(--font-corps);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--bleu-marine);
  margin-bottom: var(--space-2);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.property-card-featured .property-location {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--gris-texte);
  margin-bottom: var(--space-3);
}

.property-card-featured .property-location svg {
  color: var(--or-saharien);
  flex-shrink: 0;
}

.property-card-featured .property-desc {
  font-size: var(--text-sm);
  color: var(--gris-texte);
  line-height: 1.6;
  margin-bottom: var(--space-4);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.6em * 2);
}

.property-card-featured .property-info-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  min-height: 3rem;
  padding: var(--space-3) var(--space-4);
  background: var(--blanc-casse);
  border: 1px solid var(--gris-leger);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-4);
}

.property-card-featured .property-info-bar.is-placeholder {
  visibility: hidden;
}

.property-card-featured .property-info-bar span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--bleu-marine);
}

.property-card-featured .property-info-bar svg {
  color: var(--vert-lagon);
  flex-shrink: 0;
}

.property-card-featured .property-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--gris-leger);
  margin-top: auto;
}

.property-card-featured .property-author {
  font-size: var(--text-xs);
  color: var(--gris-moyen);
  font-style: italic;
}

.property-card-featured .property-details-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--or-saharien);
  text-decoration: none;
  transition: color .2s ease;
}

.property-card-featured .property-details-link:hover {
  color: var(--or-saharien-light);
}

.property-card-featured .property-details-link svg {
  transition: transform .2s ease;
}

.property-card-featured:hover .property-details-link svg {
  transform: translateX(4px);
}

/* Responsive featured cards */
@media (max-width: 1024px) {
  .featured-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .featured-grid {
    grid-template-columns: 1fr;
  }
  
  .property-card-featured .property-image {
    height: 220px;
  }
  
  .property-card-featured .property-info-bar {
    gap: var(--space-3);
  }
}
