/* =============================================
   AL JANABIYA GATE — UX ENHANCEMENTS
   Smooth scroll, lazy images, mobile nav, badges
   ============================================= */

/* 1. Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* 2. Image lazy loading with fade-in */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s ease-in;
}
img[loading="lazy"].loaded,
img[loading="lazy"][complete] {
  opacity: 1;
}
/* Fallback: if JS doesn't add .loaded, show after a delay */
img[loading="lazy"] {
  animation: imgFadeIn 0.6s ease-in forwards;
  animation-delay: 0.1s;
}
@keyframes imgFadeIn {
  to { opacity: 1; }
}

/* 3. Better mobile nav */
@media (max-width: 991px) {
  /* Slide-in overlay nav */
  .navbar-area .navbar-collapse {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: #fff;
    z-index: 10000;
    padding: 80px 30px 40px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    display: block !important;
  }
  .navbar-area .navbar-collapse.show {
    right: 0;
  }

  /* Nav items stack vertically */
  .navbar-area .navbar-collapse .navbar-nav {
    text-align: left !important;
  }
  .navbar-area .navbar-collapse .navbar-nav li {
    display: block !important;
    line-height: 1.4;
    margin-left: 0 !important;
    border-bottom: 1px solid #f0f0f0;
  }
  .navbar-area .navbar-collapse .navbar-nav li a {
    display: block;
    padding: 14px 0;
    font-size: 16px;
    color: #101425;
    transition: color 0.2s ease, padding-left 0.2s ease;
  }
  .navbar-area .navbar-collapse .navbar-nav li a:hover {
    color: #95B935;
    padding-left: 8px;
  }
  .navbar-area .navbar-collapse .navbar-nav li:last-child {
    border-bottom: none;
  }

  /* Close button inside the drawer */
  .mobile-nav-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f6f7fb;
    border-radius: 50%;
    font-size: 18px;
    color: #101425;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10001;
  }
  .mobile-nav-close:hover {
    background: #95B935;
    color: #fff;
    transform: rotate(90deg);
  }

  /* Overlay backdrop */
  .mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 9999;
    pointer-events: none;
    transition: background 0.35s ease;
  }
  .mobile-nav-overlay.active {
    background: rgba(0, 0, 0, 0.4);
    pointer-events: all;
  }

  /* Hamburger animation */
  .toggle-btn {
    transition: transform 0.2s ease;
  }
  .toggle-btn:active {
    transform: scale(0.9);
  }

  /* CTA in mobile nav */
  .mobile-nav-cta {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #f0f0f0;
  }
  .mobile-nav-cta .btn-yellow {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* Hide mobile nav elements on desktop */
@media (min-width: 992px) {
  .mobile-nav-close,
  .mobile-nav-overlay,
  .mobile-nav-cta {
    display: none !important;
  }
}

/* 4. Search tab count badges */
.tab-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 11px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  background: rgba(255, 255, 255, 0.25);
  color: inherit;
  vertical-align: middle;
}
.nav-link.active .tab-count-badge {
  background: rgba(255, 255, 255, 0.3);
}
.nav-link:not(.active) .tab-count-badge {
  background: rgba(149, 185, 53, 0.15);
  color: #95B935;
}

/* Smooth section transitions */
section,
article {
  scroll-margin-top: 80px;
}

/* Featured Projects — solid green pill on the title only */
.featured-projects .section-title {
  display: inline-block;
  background: #95B935;
  padding: 6px 20px;
  border-radius: 4px;
}

/* Floating WhatsApp button */
.floating-whatsapp {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9998;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37,211,102,0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.floating-whatsapp:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37,211,102,0.6);
}
.floating-whatsapp i {
  color: #fff;
  font-size: 28px;
}
@media (max-width: 768px) {
  .floating-whatsapp {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  .floating-whatsapp i { font-size: 24px; }
}

/* Better touch targets on mobile */
@media (max-width: 768px) {
  .btn-yellow,
  .btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .rld-single-select select,
  .rld-single-input input {
    min-height: 48px;
    font-size: 16px; /* prevents iOS zoom on focus */
  }
}

/* =============================================
   PREMIUM POLISH — Card Animations, Skeletons,
   Typography, Hover Effects, Transitions, Spacing
   ============================================= */

/* Card entrance + hover + spacing (merged) */
.single-feature {
  opacity: 0;
  transform: translateY(20px);
  animation: cardEntrance 0.5s ease forwards;
  transition: transform 0.3s ease 0.5s, box-shadow 0.3s ease 0.5s;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 30px;
}
.single-feature:nth-child(1) { animation-delay: 0.05s; }
.single-feature:nth-child(2) { animation-delay: 0.1s; }
.single-feature:nth-child(3) { animation-delay: 0.15s; }
.single-feature:nth-child(4) { animation-delay: 0.2s; }
.single-feature:nth-child(5) { animation-delay: 0.25s; }
.single-feature:nth-child(6) { animation-delay: 0.3s; }
.single-feature:nth-child(7) { animation-delay: 0.35s; }
.single-feature:nth-child(8) { animation-delay: 0.4s; }
.single-feature:nth-child(9) { animation-delay: 0.45s; }

@keyframes cardEntrance {
  to { opacity: 1; transform: translateY(0); }
}

/* Skeleton loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton-card {
  height: 380px;
  border-radius: 8px;
  margin-bottom: 20px;
}
.skeleton-text {
  height: 14px;
  margin-bottom: 10px;
  width: 80%;
}
.skeleton-text.short { width: 50%; }
.skeleton-title {
  height: 22px;
  margin-bottom: 14px;
  width: 60%;
}
.skeleton-image {
  height: 260px;
  border-radius: 8px 8px 0 0;
}

/* Typography enhancements */
.single-feature .price,
.property-price {
  font-size: 22px;
  font-weight: 700;
  color: #95B935;
  letter-spacing: -0.5px;
}
.single-feature h6,
.single-feature .title {
  font-size: 17px;
  font-weight: 600;
  color: #101425;
  line-height: 1.3;
}
.readeal-top .title,
section .section-title h2 {
  font-weight: 700;
  letter-spacing: -0.5px;
}
.single-feature .meta-inner li {
  font-size: 13px;
  color: #666;
}

/* Property details page typography */
.property-details-area .price-badge {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

/* Card hover effects */
.single-feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}
.single-feature .thumb img,
.single-feature .thumb video {
  transition: transform 0.5s ease;
}
.single-feature:hover .thumb img,
.single-feature:hover .thumb video {
  transform: scale(1.08);
}
.single-feature .thumb {
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}

/* Page transitions */
.page-transition {
  animation: pageIn 0.35s ease-out;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Consistent section spacing (scoped — not banner/hero) */
.properties-area,
.featured-projects,
.mission-area,
.explore-area,
.why-choose-us-area,
.team-area,
.pd-top-100 {
  padding-top: 80px;
  padding-bottom: 80px;
}
@media (max-width: 768px) {
  .properties-area,
  .featured-projects,
  .mission-area,
  .explore-area,
  .why-choose-us-area,
  .team-area,
  .pd-top-100 {
    padding-top: 50px;
    padding-bottom: 50px;
  }
}


