/* =========================================
   Global Variables & Design System
   ========================================= */
:root {
  /* Color Palette - Based on the "AfriHut" Amber/Gold theme */
  --primary-color: #d49a12;
  /* Main accent color */
  --primary-dark: #b07d0d;
  /* Darker shade for hover states */
  --secondary-color: #2c3e50;
  /* Dark slate for headings/text */

  /* Background Colors */
  --dark-bg: #1a1a1a;
  --light-bg: #f8f9fa;
  --white: #ffffff;

  /* Text Colors */
  --text-color: #333333;
  /* Main body text */
  --text-light: #666666;
  /* Muted text for secondary info */

  /* Decoration & Spacing */
  --border-color: #e1e1e1;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --radius: 8px;
  /* Consistent border radius for cards/inputs */

  /* Typography */
  --font-main: "Inter", "Segoe UI", Roboto, sans-serif;

  /* Fluid Typography Base */
  --fs-base: 16px;
  --fs-h1: clamp(2rem, 8vw, 3.5rem);
  --fs-h2: clamp(1.5rem, 5vw, 2.5rem);
  --fs-h3: clamp(1.2rem, 3vw, 1.75rem);
}

/* =========================================
   Reset & Base Styles
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  /* Ensures padding doesn't affect total width */
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background-color: var(--light-bg);
  color: var(--text-color);
  line-height: 1.6;
  /* Improved readability */
  animation: fadeIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Smooth page entry */
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }

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

/* Optimized mobile-only fade without vertical shift */
@keyframes fadeInMobile {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

a {
  text-decoration: none;
  color: inherit;
  transition: 0.3s;
  /* Smooth transition for hover effects */
}

img {
  max-width: 100%;
  display: block;
  /* Removes bottom spacing whitespace */
}

/* =========================================
   Utility Classes
   ========================================= */
/* Centered container with max-width */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Button Base Styles */
.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
}

/* Primary Button (Solid Amber) */
.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  /* Subtle lift effect */
}

/* Outline Button (Transparent with Border) */
.btn-outline {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background: transparent;
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Standard Section Padding */
.section-padding {
  padding: 60px 0;
}

.section-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

/* Responsive Utilities */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 15px;
}

.grid-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

@media (max-width: 600px) {
    .premium-header, .ms-header { flex-direction: column; align-items: center !important; text-align: center; }
    .premium-header > div:last-child, .ms-header-right { align-items: center !important; width: 100%; }
    .ms-tabs { 
        border-radius: 12px; 
        width: 100%; 
        justify-content: flex-start; /* Ensure scrollability from start */
        padding: 8px;
        gap: 8px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none;  /* IE and Edge */
    }
    .ms-tabs::-webkit-scrollbar {
        display: none; /* Chrome, Safari and Opera */
    }
    .ms-tab { 
        padding: 10px 18px; 
        font-size: 0.85rem; 
        flex: 0 0 auto; /* Don't shrink, keep width for scrolling */
    }
}

@media (max-width: 768px) {
  .section-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .mobile-stack {
    flex-direction: column !important;
    gap: 20px !important;
  }
}


/* =========================================
   Header & Navigation
   ========================================= */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  /* Prevent horizontal overflow bleed without clipping absolute dropdowns */
  overflow-x: clip;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: auto;
  min-height: 80px;
  width: 100%;
  position: relative;
}

.logo {
  font-size: clamp(20px, 4vw, 32px);
  /* Slightly bigger and responsive brand name */
  font-weight: 800;
  color: var(--secondary-color);
  /* Changed to secondary for better contrast against white */
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.5vw, 12px);
}

.logo img {
  height: clamp(90px, 12vw, 130px);
  /* Responsive logo height */
  width: auto;
  border-radius: 0;
}

.agent-avatar {
  width: auto;
  height: auto;
  max-width: 200px;
  max-height: 120px;
  border-radius: 4px;
  object-fit: contain;
}

/* Language Selector */
.lang-selector-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  background: #f8f9fa;
  transition: all 0.3s ease;
  cursor: pointer;
}

.lang-selector-wrapper .language-select {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.mobile-only {
  display: none !important;
}

@media (max-width: 768px) {
  .mobile-only {
    display: flex !important;
  }
  .desktop-only {
    display: none !important;
  }
}

.lang-selector-wrapper:hover {
  border-color: var(--primary-color);
  background: white;
  box-shadow: var(--shadow-sm);
}

.lang-selector-wrapper i {
  color: var(--primary-color);
  font-size: 1.1rem;
}

/* =========================================
   Google Translate Overrides
   ========================================= */
/* =========================================
   Google Translate Overrides
   ========================================= */
/* Hide the top banner frame completely */
.goog-te-banner-frame.skiptranslate,
.goog-te-banner-frame,
iframe[id^=":"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
}

/* Correct body shift caused by Google Translate */
body {
  top: 0px !important;
  margin-top: 0px !important;
  position: static !important;
}

/* Hide the tooltip on hover */
.goog-tooltip,
.goog-tooltip:hover {
  display: none !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}


/* =========================================
   Professional Mobile Footer Redesign
   ========================================= */
@media (max-width: 768px) {
  footer {
    padding: 15px 0 !important;
    margin-top: 30px !important;
    background: #1a252f !important;
    /* Deep Slate Professional Background */
    border-top: 1px solid rgba(212, 154, 18, 0.2);
  }

  .footer-grid {
    display: none !important;
    /* Hide bulky footer content */
  }

  /* Stationary Fade Indicators for Horizontal Scroll */
  .footer-mobile-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
  }

  .footer-mobile-wrapper::before,
  .footer-mobile-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40px;
    z-index: 2;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .footer-mobile-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
  }

  .footer-mobile-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.15) 0%, transparent 100%);
  }

  .footer-mobile-strip {
    display: flex !important;
    gap: 20px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px 15px;
    align-items: center;
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
  }

  .footer-mobile-strip::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
  }

  /* Professional Font Buttons */
  .footer-btn {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
  }

  .footer-btn i {
    color: var(--primary-color);
    font-size: 1.1rem;
  }

  .footer-btn:active {
    background: rgba(212, 154, 18, 0.15);
    color: var(--primary-color);
  }

  /* Copyright Tweak */
  footer div[style*="text-align: center"] {
    margin-top: 10px !important;
    padding-top: 10px !important;
    font-size: 0.7rem !important;
  }
}

/* Hide mobile strip on desktop */
.footer-mobile-strip {
  display: none;
}

.lang-dropdown {
  border: none;
  background: transparent;
  font-family: var(--font-main);
  font-weight: 600;
  color: var(--secondary-color);
  font-size: 0.95rem;
  cursor: pointer;
  outline: none;
  padding-right: 5px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Currency selector — constrain width to prevent header overflow */
.lang-dropdown.currency-switcher {
  max-width: 180px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.lang-dropdown option {
  color: #333;
  padding: 10px;
}

.mobile-lang-selector {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
  padding: 10px;
  background: #f5f5f5;
  border-radius: 8px;
  justify-content: center;
}

/* Hide Google Translate Banner */
.goog-te-banner-frame.skiptranslate {
  display: none !important;
}

body {
  top: 0px !important;
}

/* Hide mobile-only elements on desktop by default */
.mobile-nav-header,
.nav-overlay {
  display: none !important;
}

/* Premium Marketplace Cards (Used in Mobiles, Cars, etc.) */
.premium-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    flex: 0 1 350px;
    width: 100%;
}

.premium-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary-color);
    box-shadow: 0 20px 40px rgba(212, 154, 18, 0.2);
}

.premium-img-box {
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    position: relative;
    height: 260px;
}

.premium-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.4));
    transition: transform 0.6s ease;
}

.premium-card:hover .premium-img {
    transform: scale(1.08) rotate(2deg);
}

.premium-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.premium-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 4px 14px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
}

.save-btn-overlay {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 38px;
    height: 38px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 5;
}

.save-btn-overlay:hover {
    transform: scale(1.15);
    background: var(--primary-color);
}

.save-btn-overlay:hover i {
    color: white !important;
}

.seller-overlay {
    position: absolute;
    bottom: 15px;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    padding: 5px 12px;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.1);
    z-index: 3;
    cursor: pointer;
    transition: all 0.3s ease;
}

.seller-overlay:hover {
    background: rgba(212, 154, 18, 0.8);
}

.seller-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--primary-color);
}

.seller-name {
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .premium-img-box {
        height: 220px;
        padding: 15px;
    }
    
    .premium-content {
        padding: 20px;
    }
}

/* Details Page Components */
.property-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 30px;
  gap: 20px;
}

/* Property Gallery Hero Slider */
.main-gallery-hero {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  background: #000;
}

.main-gallery-hero img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.4s ease-in-out;
}

.thumbnail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
  margin-top: 15px;
}

.specs-grid-v2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .property-header-flex {
    flex-direction: column;
    align-items: flex-start;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 15px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-weight: 600;
  color: var(--secondary-color);
  font-size: clamp(0.85rem, 1.2vw, 1.1rem);
  transition: color 0.3s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary-color);
}

/* Navigation Scroll Wrapper (Container for nav-links) */
.nav-scroll-wrapper {
  display: flex;
  align-items: center;
  order: 2;
  /* Middle on desktop */
  flex: 1;        /* Take available space between logo and actions */
  min-width: 0;   /* Allow it to compress below intrinsic width */
  justify-content: center;
}

.nav-mobile-header {
  display: contents;
  /* Children behave as direct flex children of 'nav' on desktop */
}

.logo {
  order: 1;
  /* Left on desktop */
}

@media (min-width: 1201px) {
  .logo {
    margin-left: -35px;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  order: 3;
  /* Right on desktop */
  position: relative;
  z-index: 50000;
}

@media (min-width: 1201px) {
  .nav-actions {
    margin-left: 30px;
  }
}

/* =========================================
   Small Desktop Compression (900–1200px)
   Keep full desktop nav, just tighter
   ========================================= */
@media (max-width: 1200px) {
  .logo {
    margin-left: 0 !important;
  }

  .logo img {
    height: clamp(70px, 9vw, 110px);
  }

  .nav-links {
    gap: 10px;
  }

  .nav-links a {
    font-size: clamp(0.78rem, 1.05vw, 0.95rem);
  }

  .nav-actions {
    margin-left: 10px !important;
    gap: 8px;
  }

  .lang-selector-wrapper {
    padding: 4px 8px;
    gap: 5px;
  }

  /* Shrink the currency selector to save space */
  .lang-selector-wrapper select.lang-dropdown.currency-switcher,
  .currency-switcher {
    max-width: 100px;
    font-size: 0.8rem;
  }
}

/* =========================================
   Tight Small Desktop (769px–1000px)
   Still desktop nav but very compact
   ========================================= */
@media (max-width: 1000px) {
  .nav-links {
    gap: 8px;
  }

  .nav-links a {
    font-size: 0.8rem;
    letter-spacing: -0.2px;
  }

  .nav-actions {
    margin-left: 6px !important;
    gap: 6px;
  }

  .search-icon-btn {
    margin-right: 8px;
    font-size: 1rem;
  }

  /* Hide the long text from currency selector, show only icon */
  .lang-selector-wrapper:has(.currency-switcher) {
    max-width: 90px;
    overflow: hidden;
  }

  .lang-selector-wrapper .currency-switcher {
    max-width: 75px;
    font-size: 0.75rem;
  }

  /* Tighten login button */
  .nav-actions .btn-primary,
  .nav-links .btn-primary {
    padding: 8px 16px;
    font-size: 0.82rem;
  }

  /* Keep logo from being oversized */
  .logo img {
    height: clamp(55px, 8vw, 85px);
  }
}

.search-icon-btn {
  font-size: 1.2rem;
  color: var(--secondary-color);
  margin-right: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-icon-btn:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}

/* --- POLISHED SEARCH RESULTS --- */
.partner-search-card {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.partner-search-card:hover {
  transform: translateY(-10px);
}

.partner-search-card:hover img {
  transform: scale(1.1);
}

.verified-badge-float {
  position: absolute;
  top: 15px;
  left: 15px;
  background: white;
  color: #10b981;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  font-size: 1.1rem;
  z-index: 5;
}

#results-container > div {
  animation: cardFadeIn 0.5s ease backwards;
}

@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Delay for staggered effect */
#results-container > div:nth-child(1) { animation-delay: 0.1s; }
#results-container > div:nth-child(2) { animation-delay: 0.15s; }
#results-container > div:nth-child(3) { animation-delay: 0.2s; }
#results-container > div:nth-child(4) { animation-delay: 0.25s; }
#results-container > div:nth-child(5) { animation-delay: 0.3s; }
#results-container > div:nth-child(6) { animation-delay: 0.35s; }

/* Specialized Login Button in Header */
.nav-actions .btn-primary,
.nav-links .btn-primary {
  padding: clamp(10px, 1.2vw, 14px) clamp(20px, 2.5vw, 30px);
  font-size: clamp(0.95rem, 1.1vw, 1.05rem);
  font-weight: 700;
  border-radius: 50px;
  /* Modern pill shape */
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-toggle {
  display: none;
  font-size: 24px;
  color: var(--secondary-color);
  cursor: pointer;
  z-index: 1001;
}

/* =========================================
   Hero Section (Homepage)
   ========================================= */
.hero {
  /* Reverted to Gradient as requested */
  background: linear-gradient(135deg, var(--secondary-color) 0%, #1a252f 100%);
  background-size: cover;
  background-position: center;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
}

.hero-content {
  margin-top: 30px;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -1px;
  margin-bottom: 20px;
  font-weight: 800;
}

/* Search Box Container */
.search-box {
  background: var(--white);
  /* Fluid padding based on screen width */
  padding: clamp(25px, 3vw, 45px) clamp(30px, 4vw, 60px);
  border-radius: clamp(20px, 3vw, 40px);
  display: flex;
  /* Fluid gap between filters */
  gap: clamp(15px, 2.5vw, 40px);
  max-width: min(1200px, 92vw);
  width: 100%;
  margin: 40px auto 0;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15);
  align-items: flex-end;
  position: relative;
  overflow: visible !important;
}

.search-btn-wrapper {
  display: flex;
  align-items: flex-end;
  height: 50px;
}

#search-btn {
  padding: 0 40px;
  height: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0px;
}

.form-group {
  flex: 1;
  /* Allow all inputs to grow equally */
  min-width: 0;
  /* Prevent flex children from overflowing */
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--primary-color);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.search-label i {
  font-size: 0.9rem;
  color: var(--primary-color);
}

.form-group select,
.form-group input,
.dropdown-trigger {
  width: 100%;
  padding: 12px 18px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: white;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--secondary-color);
  transition: all 0.3s ease;
  cursor: pointer;
  height: 50px;
}

@media (max-width: 480px) {
  .form-group select,
  .form-group input,
  .dropdown-trigger {
    font-size: 16px; /* Prevent iPhone zoom on focus */
    padding: 10px 14px;
    height: 48px;
  }
}

.dropdown-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.dropdown-trigger span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: left;
  color: #555;
  font-weight: 500;
}

.form-group select,
.form-group input {
  display: block;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d49a12' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 18px;
  padding-right: 45px;
}

.form-group select:hover,
.form-group input:focus,
.dropdown-trigger:hover {
  border-color: var(--primary-color);
  background-color: #fafafa;
  outline: none;
}

/* Custom Searchable Dropdown */
.custom-dropdown {
  position: relative;
  width: 100%;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-top: 5px;
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 9999;
  max-height: 300px;
  overflow-y: auto;
  color: var(--secondary-color) !important;
  text-align: left;
}

.dropdown-menu.active {
  display: block;
  animation: fadeInDown 0.3s ease;
}

.dropdown-search {
  padding: 10px;
  position: sticky;
  top: 0;
  background: white;
  border-bottom: 1px solid var(--border-color);
}

.dropdown-search input {
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 0.95rem;
  width: 100%;
  color: var(--secondary-color);
  background: #f8f9fa;
}

.dropdown-search input:focus {
  border-color: var(--primary-color);
  background: white;
  outline: none;
}

.dropdown-options {
  padding: 5px 0;
}

.dropdown-option {
  padding: 12px 15px;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--secondary-color);
  font-weight: 500;
}

.dropdown-option:hover {
  background: var(--light-bg);
  color: var(--primary-color);
}

.dropdown-option.selected {
  background: rgba(212, 154, 18, 0.1);
  color: var(--primary-color);
  font-weight: 600;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

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

/* Removed search-mobile-title as it's replaced by search-labels */

/* =========================================
   Property Components (Grid & Cards)
   ========================================= */
.properties-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 992px) {
  .properties-grid {
    gap: 20px;
  }
}

@media (max-width: 580px) {
  .properties-grid {
    gap: 15px;
    padding: 0;
  }
}

/* Standardized Card Styles for Uniformity */
.property-card {
  background: #11141c; /* Clean, premium dark grey */
  border-radius: 16px; /* Slightly sharper, modern corners */
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  display: flex;
  flex-direction: column;
  height: auto;
  border: 1px solid rgba(255,255,255,0.05); /* Subtle border */
  position: relative;
  flex: 0 1 350px;
  width: 100%;
}

/* Mobile: Cards go full-width at 768px and below */
@media (max-width: 768px) {
  .property-card,
  .car-card,
  .premium-card {
    min-width: 0 !important;      /* Remove the 300px floor */
    flex: 1 1 100% !important;    /* Stretch to fill single column */
    width: 100% !important;
    max-width: 100% !important;
  }
}

.property-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.12); /* Subtle highlight on hover */
}

/* Unified Image Container */
.card-image, 
.property-image {
  height: 240px; /* Slightly taller for more visual impact */
  background-color: #111;
  position: relative;
  overflow: hidden;
  flex-shrink: 0; /* Prevents image from shrinking in flex container */
}

.card-image img, 
.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
  filter: brightness(0.95) contrast(1.05);
}

.property-card:hover img {
  transform: scale(1.08) rotate(1deg);
  filter: brightness(1.05) contrast(1.1);
}

/* Unified Tag/Status Style */
.property-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary-color);
  color: white;
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 2;
  text-transform: uppercase;
}

/* Unified Content Area */
.card-content, 
.property-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1; /* Occupies remaining space */
}

/* =========================================
   Card Description — Truncated Preview
   Shows 2 lines with ellipsis, clicking
   the card leads to the full description.
   ========================================= */
.card-description {
  color: var(--text-light);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 10px;
  /* 2-line truncation with ellipsis (...) */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =========================================
   Price Container — Price + Currency Badge
   ========================================= */
.price-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

/* =========================================
   Original Currency Sign — Seller badge
   Shows original seller currency as a
   subtle pill badge beside the price.
   ========================================= */
.original-currency-sign {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(212, 154, 18, 0.1);
  border: 1px solid rgba(212, 154, 18, 0.3);
  color: var(--primary-color);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 50px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.6;
}

.original-currency-sign i {
  font-size: 0.65rem;
}

.price {
  color: var(--primary-color);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff;
  line-height: 1.4;
  height: 3.2em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.location {
  color: #94a3b8; /* Slate 400 */
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.features, 
.property-features {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(8px, 2vw, 15px);
  color: #cbd5e1; /* Slate 300 - better contrast */
  font-size: 0.85rem;
  margin-bottom: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.05); /* Extremely subtle border */
}

/* Unified Footer with Bottom Anchoring */
.card-footer, 
.property-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  gap: 10px;
}

/* Responsive Button Container inside Footer */
.footer-btns, .car-actions, .mobile-actions {
  display: flex;
  gap: 12px;
  width: 100%;
}

.footer-btns .btn, .car-actions .btn, .mobile-actions .btn {
  flex: 1;
  text-align: center;
  padding: 12px 10px;
  font-size: 0.9rem;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .car-actions, .mobile-actions {
    flex-direction: column;
    gap: 8px;
  }
  .car-actions .btn, .mobile-actions .btn {
    width: 100%;
    padding: 14px 10px;
  }
}

/* --- View All Button Section --- */
.view-all-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 50px;
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 45px;
  background-color: var(--secondary-color);
  color: var(--white);
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  text-decoration: none;
}

.btn-view-all:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px rgba(212, 154, 18, 0.25);
}

.btn-view-all i {
  transition: transform 0.3s;
}

.btn-view-all:hover i {
  transform: translateX(5px);
}

/* =========================================
   Property Detail Page Layout
   ========================================= */
.detail-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  /* Main content is twice as wide as sidebar */
  gap: 40px;
  margin-top: 40px;
}

.main-gallery img {
  width: 100%;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.property-specs {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Agent Contact Sidebar */
.agent-card {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  position: sticky;
  /* Keeps contact agent box in view while scrolling */
  top: 100px;
}

.agent-profile {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.agent-avatar {
  width: 60px;
  height: 60px;
  background: #ccc;
  border-radius: 50%;
}

/* =========================================
   Footer Area
   ========================================= */
footer {
  background: #0f172a;
  color: var(--white);
  padding: 60px 0 20px;
  margin-top: 60px;
  border-top: 1px solid rgba(212, 154, 18, 0.15);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer h3, footer h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.footer ul {
  list-style: none;
  /* Remove bullet points */
}

.footer li {
  margin-bottom: 10px;
}

/* =========================================
   Login Page Styles
   ========================================= */
.login-body {
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url("img/auth_bg.webp");
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Glassmorphism Effect for Login Card */
.login-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  padding: clamp(30px, 5vw, 50px);
  width: 100%;
  max-width: 450px;
  border-radius: 20px;
  text-align: center;
  transition: transform 0.3s ease;
  margin: 20px auto;
}

@media (max-width: 480px) {
  .login-card {
    padding: 25px 20px;
    width: 95%;
    margin: 10px auto;
  }
  .login-header img {
    height: 120px !important;
  }
}

.login-card:hover {
  transform: translateY(-5px);
}

.login-header {
  margin-bottom: 30px;
}

.login-input {
  width: 100%;
  padding: 15px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: white;
}

.login-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(212, 154, 18, 0.1);
  outline: none;
}

.password-wrapper {
  position: relative;
  margin-bottom: 15px;
}

.password-wrapper .toggle-password {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #999;
  transition: color 0.3s;
}

.password-wrapper .toggle-password:hover {
  color: var(--primary-color);
}

.login-btn {
  width: 100%;
  padding: 15px;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.login-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(212, 154, 18, 0.3);
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: var(--radius);
  background: white;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s;
}

.social-btn:hover {
  background: #f8f8f8;
  border-color: #ccc;
}

.social-btn.google i {
  color: #db4437;
}

.social-btn.facebook i {
  color: #4267b2;
}

/* =========================================
   Engagement Modal & Anonymous Tracking
   ========================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.engagement-modal {
  background: white;
  padding: 40px;
  border-radius: 12px;
  max-width: 450px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  transform: translateY(20px);
  transition: all 0.4s ease;
}

.modal-overlay.active .engagement-modal {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 1.5rem;
  color: #999;
  cursor: pointer;
  transition: color 0.3s;
}

.modal-close:hover {
  color: var(--primary-color);
}

.modal-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.engagement-modal h2 {
  margin-bottom: 15px;
  font-size: 1.8rem;
}

.engagement-modal p {
  color: #666;
  margin-bottom: 25px;
}

/* Media Queries for Responsiveness */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 2.8rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablets (portrait) and smaller (max-width: 768px) */
@media (max-width: 768px) {
  body {
    animation: fadeInMobile 0.8s ease-out !important;
  }

  header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 10000 !important;
    background: #fff !important;
    width: 100%;
    display: block;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 0;
    border-bottom: 2px solid var(--primary-color);
    animation: fadeInMobile 0.8s ease-out; /* Apply stable animation specifically for mobile body/header */
  }

  /* Ensure page content starts below the fixed header */
  /* Ensure page content starts below the fixed header */
  header+* {
    margin-top: 130px !important;
    transition: margin-top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }

  header.header-minimized+* {
    margin-top: 75px !important;
  }

  header .container {
    padding: 0 !important;
    max-width: none;
    width: 100%;
    display: block;
    overflow: visible;
    /* Ensure dropdowns show through container */
  }

  nav {
    display: block;
    /* Stack rows reliably */
    height: auto;
  }

  .mobile-toggle {
    display: none !important;
  }

  .nav-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    max-height: 160px;
    opacity: 1;
    transform: translateY(0);
    position: relative;
    z-index: 100;
    /* Higher than .nav-scroll-wrapper to ensure dropdowns overlap it */
  }

  .nav-mobile-header .logo img {
    height: clamp(50px, 10vw, 65px) !important;
  }

  header.header-minimized .nav-mobile-header {
    max-height: 0;
    padding: 0 20px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
  }

  header.header-minimized .nav-mobile-header {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
  }

  /* Full Width Navigation Tier - Acts as a second header */
  .nav-scroll-wrapper {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 10px 0;
    overflow: hidden;
    background: #fdfdfd;
    /* Solid sub-header background */
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 10;
  }

  /* Fade indicators */
  .nav-scroll-wrapper::before,
  .nav-scroll-wrapper::after {
    content: "";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 80%;
    z-index: 5;
    pointer-events: none;
    opacity: 0.4;
  }

  .nav-scroll-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.9), transparent);
  }

  .nav-scroll-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent);
  }

  .nav-links {
    position: static;
    display: flex;
    flex-direction: row !important;
    overflow-x: auto;
    padding: 10px 25px !important;
    gap: 12px;
    width: 100%;
    min-height: 55px;
    /* Compact but clear */
    background: transparent;
    box-shadow: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    align-items: center;
    list-style: none;
    margin: 0 !important;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Brave */
  }

  .nav-links li {
    margin: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  /* Solid Styled Buttons for Row */
  .nav-links a,
  .nav-links .lang-selector-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 8px 14px 8px 18px !important;
    font-size: 0.85rem !important;
    font-weight: 700;
    white-space: nowrap;
    border-radius: 50px;
    background: #fff;
    color: var(--secondary-color) !important;
    border: 1px solid #eee;
    height: 36px;
    transition: all 0.3s ease;
    margin: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }

  /* Compact Login Button for Mobile */
  .nav-mobile-header .login-btn {
    padding: 8px 18px !important;
    font-size: 0.8rem !important;
    height: 36px;
    display: flex;
    align-items: center;
  }

  .nav-links a.active {
    background: var(--primary-color);
    color: white !important;
    border-color: var(--primary-color);
  }

  /* Reset Lang Selector internal styles for the row */
  .nav-links .lang-selector-wrapper i {
    font-size: 0.9rem;
    margin-right: 8px;
    color: inherit;
  }

  .nav-links .lang-dropdown {
    font-size: 0.85rem;
    padding: 0;
    background: transparent;
    border: none;
    color: inherit;
    font-weight: 600;
    cursor: pointer;
  }

  body.menu-open {
    overflow: hidden;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .available-drivers-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
  }
}

/* Phones (max-width: 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 10px; /* Reduced margins to make cards 'fit' the screen width */
  }
  
  .card-image, 
  .property-image {
    height: 180px;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }


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

  .footer-grid div {
    margin-bottom: 20px;
  }

  .price {
    font-size: 1.1rem;
  }

  .property-specs {
    padding: 15px;
  }
}

/* =========================================
   Premium Cars Section Styles
   ========================================= */
.premium-cars-section {
  background: #111;
  color: white;
  padding: 100px 0;
  overflow: hidden;
}

.premium-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 60px;
}

.premium-title {
  font-size: 3rem;
  font-weight: 800;
  margin-top: 10px;
  color: white;
}

.premium-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
}

/* =========================================
   Elite Chauffeurs Section (Home Page) - REDESIGNED HEROIC
   ========================================= */
.premium-drivers-section {
  background: #050505;
  padding: 120px 0;
  border-top: 1px solid #111;
  position: relative;
  z-index: 1; /* Ensures it stays below any fixed/floating elements if needed */
}

@media (max-width: 768px) {
  .premium-drivers-section {
    padding: 60px 0;
    margin-top: 20px;
  }
}

.premium-drivers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 50px;
  margin-top: 60px;
}

.premium-driver-hero-card {
  display: block;
  text-decoration: none;
  background: #0a0a0a;
  border-radius: 35px;
  overflow: hidden;
  position: relative;
  height: 450px;
  /* Taller vertical design */
  border: 1px solid #222;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.premium-driver-hero-card:hover {
  transform: translateY(-15px) scale(1.02);
  border-color: var(--primary-color);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 154, 18, 0.15);
}

.driver-hero-img {
  width: 100%;
  height: 100%;
  position: relative;
}

.driver-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.premium-driver-hero-card:hover .driver-hero-img img {
  transform: scale(1.1);
}

.driver-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 10%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
  z-index: 1;
}

.driver-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 40px;
  z-index: 2;
  transition: transform 0.4s ease;
}

.premium-driver-hero-card:hover .driver-hero-content {
  transform: translateY(-10px);
}

.driver-hero-badge {
  position: absolute;
  top: 30px;
  right: 30px;
  background: var(--primary-color);
  color: #000;
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  z-index: 3;
  box-shadow: 0 5px 15px rgba(212, 154, 18, 0.4);
}

.driver-hero-stats {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.hero-stat-pill {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.driver-hero-name {
  color: white;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 900;
  margin-bottom: 25px;
  letter-spacing: -0.5px;
}

.driver-hero-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 25px;
}

.driver-hero-price {
  color: var(--primary-color);
  font-size: 1.4rem;
  font-weight: 800;
}

.driver-hero-price small {
  color: #888;
  font-size: 0.8rem;
  font-weight: 500;
}

.driver-hero-link {
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: gap 0.3s ease;
}

.premium-driver-hero-card:hover .driver-hero-link {
  gap: 15px;
  color: var(--primary-color);
}

@media (max-width: 1100px) {
  .premium-driver-hero-card {
    height: auto;
    min-height: 400px;
  }

  .premium-driver-img-box {
    width: 100%;
    height: 250px;
  }
}

@media (max-width: 768px) {
  .premium-drivers-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

/* =========================================
   Global Responsiveness Fixes
   ========================================= */

/* Fix for horizontal overflow on very small screens */
html,
body {
  width: 100%;
  margin: 0;
  padding: 0;
}

@media (max-width: 768px) {
  .search-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 15px auto;
    gap: 12px;
    padding: 20px;
    border-radius: 20px;
    width: 94%;
    align-items: stretch;
    /* Reset large screen shadows & max-width for mobile */
    max-width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }

  @media (max-width: 480px) {
    .container {
        padding: 0 10px !important; /* Full width fit */
    }
    .properties-hero {
        padding: 40px 0 30px;
    }
    .results-header {
        margin: 0 5px 20px;
        padding: 12px;
    }
    .mobile-filter-toggle {
        margin: 0 5px 20px;
        width: calc(100% - 10px);
    }
    .search-box {
      grid-template-columns: 1fr;
      padding: 15px;
      gap: 15px;
    }
    
    .search-btn-wrapper {
      grid-column: 1;
    }
  }

  .search-btn-wrapper {
    grid-column: span 2;
    height: auto;
    margin-top: 5px;
  }

  #search-btn {
    width: 100%;
    justify-content: center;
    border-radius: 10px;
    height: 45px;
    font-size: 1rem;
  }

  .form-group {
    gap: 4px;
    min-width: 0;
  }

  .search-label {
    font-size: 0.7rem;
    font-weight: 700;
    gap: 4px;
  }

  .search-label i {
    font-size: 0.75rem;
  }

  .dropdown-trigger {
    height: 42px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
  }

  .dropdown-trigger i {
    font-size: 0.8rem;
  }

  .premium-grid,
  .cars-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }

  .premium-header,
  .section-header-flex {
    flex-direction: column;
    align-items: center; /* Centered for better mobile aesthetics */
    text-align: center;
    gap: 15px;
    margin-bottom: 40px;
  }

  .premium-header .btn,
  .section-header-flex .btn {
    width: 100%;
    max-width: 300px; /* Prevent button from being too wide on tablets */
    margin: 0 auto;
    text-align: center;
  }

  .premium-header p {
    margin-bottom: 15px !important;
  }
}


@media (max-width: 480px) {
  header {
    height: auto;
  }

  nav {
    height: auto;
  }

  .logo img {
    height: 40px;
  }

  .logo {
    font-size: 20px;
  }

  /* Details Title & Price Scaling for Mobile */
  h1 {
    font-size: clamp(1.5rem, 6vw, 2.2rem) !important;
  }

  .property-header-flex h1 {
    font-size: 1.8rem !important;
  }

  #prop-price,
  .price-tag {
    font-size: 1.6rem !important;
  }

  .section-padding {
    padding: 40px 0;
  }
}

/* Video Player Styles */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-top: 10px;
}

.video-wrapper iframe,
.video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* =========================================
   User Profile Dropdown
   ========================================= */
/* User Profile Action Area */
.user-profile-container {
  position: relative;
  display: flex;
  align-items: center;
  cursor: pointer;
  z-index: 40000;
  /* Extremely high to beat any fixed headers */
}

.user-initial-avatar {
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 3px 10px rgba(212, 154, 18, 0.3);
  transition: all 0.3s ease;
  border: 2px solid white;
}

.user-profile-container:hover .user-initial-avatar {
  transform: scale(1.08);
}

/* Ensure dropdown is always on top and visible */
.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: 220px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
  display: none;
  flex-direction: column;
  overflow: visible;
  /* Crucial for child elements */
  z-index: 99999 !important;
  animation: slideDown 0.3s ease forwards;
  border: 1px solid rgba(0, 0, 0, 0.1);
  margin-top: 10px;
}

/* Integrated positioning for auth pages (within card) */
.auth-lang-selector {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  margin: -10px auto 25px !important;
  /* Pull up closer to logo */
  width: fit-content;
  padding: 8px 18px !important;
  border: 1px solid #f0f0f0;
  border-radius: 50px !important;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-lang-selector i {
  color: var(--primary-color);
}

.user-dropdown.active {
  display: flex;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

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

.dropdown-header {
  padding: 18px 20px;
  background: #fcfcfc;
  border-bottom: 1px solid #f0f0f0;
}

.dropdown-header .user-name {
  display: block;
  font-weight: 800;
  color: var(--secondary-color);
  font-size: 1rem;
  margin-bottom: 2px;
}

.dropdown-header .user-email {
  display: block;
  font-size: 0.8rem;
  color: #888;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown-item {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #444 !important;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.dropdown-item i {
  width: 20px;
  color: var(--primary-color);
  font-size: 1.05rem;
}

.dropdown-item:hover {
  background: #f8f9fa;
  color: var(--primary-color) !important;
}

.dropdown-item.logout {
  color: #dc3545 !important;
  border-top: 1px solid #eee;
  background: #fff5f5;
}

.dropdown-item.logout i {
  color: #dc3545;
}

.dropdown-item.logout:hover {
  background: #fff5f5;
  color: #bd2130;
}

/* Arrow indicator */
.user-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  right: 15px;
  width: 12px;
  height: 12px;
  background: white;
  transform: rotate(45deg);
  border-left: 1px solid rgba(0, 0, 0, 0.05);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* End of Responsive Adjustments - Dropdown is handled by absolute/relative positioning above */

/* =========================================
   Car Slider Arrows
   ========================================= */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  user-select: none;
}

.slider-arrow:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev {
  left: 20px;
}

.slider-arrow.next {
  right: 20px;
}

/* Specific adjustments for car-details-hero to host arrows */
.car-details-hero {
  overflow: hidden;
  background-size: contain !important;
  /* Force show whole picture */
  background-repeat: no-repeat;
  background-color: #000;
  /* Professional black fill for gaps */
}

/* Fade animation for background (handled via CSS transition) */
#hero-bg {
  transition: background-image 0.5s ease-in-out;
}

.lang-selector-wrapper i {
  color: var(--primary-color);
  font-size: 1.05rem;
  margin-right: 6px;
  display: inline-block;
  vertical-align: middle;
}

/* =========================================
   Google Translate Overrides
   ========================================= */
/* Hide the top banner frame */
.goog-te-banner-frame.skiptranslate {
  display: none !important;
}

/* Correct body shift caused by Google Translate */
body {
  top: 0px !important;
}

/* Hide the tooltip on hover */
.goog-tooltip {
  display: none !important;
}

.goog-tooltip:hover {
  display: none !important;
}

.goog-text-highlight {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* =========================================
   Final Mobile Polish (Consolidated)
   ========================================= */
@media (max-width: 768px) {
  nav {
    height: auto !important;
    padding: 0 !important;
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .nav-mobile-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 15px !important;
    width: 100% !important;
    border-bottom: 1px solid #f0f0f0 !important;
  }

  .logo img {
    height: 35px !important; /* Dainty logo for slimmer header */
    width: auto !important;
  }

  /* Hide the Hamburger Toggle */
  .mobile-toggle {
    display: none !important;
  }

  /* Horizontal Scroll Wrapper */
  .nav-scroll-wrapper {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: #fdfdfd !important;
    padding: 0 !important;
    transform: none !important;
    box-shadow: none !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    z-index: 1000 !important;
    visibility: visible !important;
    display: block !important;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid #e1e1e1;
    
    /* Hide scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .nav-scroll-wrapper::-webkit-scrollbar {
    display: none;
  }

  /* Linear Nav Links */
  .nav-links {
    flex-direction: row !important;
    align-items: center !important;
    gap: 0 !important;
    width: max-content !important;
    display: flex !important;
    padding: 0 10px !important;
    margin: 0 !important;
  }

  .nav-links li {
    width: auto !important;
    border-bottom: none !important;
    height: 45px !important;
    display: flex !important;
    align-items: center !important;
  }

  .nav-links a {
    display: block !important;
    padding: 0 15px !important;
    font-size: 0.9rem !important;
    white-space: nowrap !important;
    color: var(--secondary-color) !important;
    height: 100% !important;
    line-height: 45px !important;
  }

  .nav-links li a.active {
    color: white !important;
    background: var(--primary-color) !important;
    border-radius: 50px !important;
  }

  /* Hero Section Mobile Revert */
  .hero {
    height: auto !important;
    min-height: 380px !important;
    padding: 50px 20px 70px !important;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a252f 100%) !important;
  }

  .hero-content h1 {
    font-size: 1.8rem !important;
    line-height: 1.2 !important;
  }

}

/* =========================================
   Seller Profile Modal (Premium)
   ========================================= */
.seller-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex; align-items: center; justify-content: center;
    z-index: 99999;
    opacity: 0; visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.seller-modal-overlay.active {
    opacity: 1; visibility: visible;
}

.seller-modal-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    width: 90%;
    max-width: 450px;
    padding: 40px;
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: white;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.seller-modal-overlay.active .seller-modal-card {
    transform: translateY(0) scale(1);
}

.seller-modal-close {
    position: absolute;
    top: 20px; right: 20px;
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    color: #94a3b8;
}

.seller-modal-close:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: rotate(90deg);
}

.smc-avatar-wrapper {
    width: 120px; height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, var(--primary-color), #fcd34d);
    position: relative;
}

.smc-avatar {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #1e293b;
}

.smc-verified-badge {
    position: absolute;
    bottom: 5px; right: 5px;
    background: #10b981;
    color: white;
    width: 30px; height: 30px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 3px solid #1e293b;
    font-size: 0.8rem;
}

.smc-name { font-size: 1.8rem; font-weight: 800; margin-bottom: 5px; color: white; }
.smc-company { color: var(--primary-color); font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; font-size: 0.85rem; margin-bottom: 20px; display: block; }

.smc-bio {
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 30px;
    background: rgba(0,0,0,0.2);
    padding: 15px;
    border-radius: 15px;
    font-style: italic;
}

.smc-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.smc-btn {
    padding: 14px;
    border-radius: 50px;
    font-weight: 700;
    text-align: center;
    display: flex; align-items: center; justify-content: center;
    gap: 10px;
    transition: 0.3s;
    font-size: 0.95rem;
}

.smc-btn-call { background: var(--primary-color); color: white; box-shadow: 0 10px 20px rgba(212,154,18,0.2); }
.smc-btn-whatsapp { background: #25d366; color: white; box-shadow: 0 10px 20px rgba(37,211,102,0.2); }

.smc-btn:hover { transform: translateY(-3px); filter: brightness(1.1); }




/* --- Seller Avatar Badge --- */
.seller-avatar-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10;
    background: white;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.seller-avatar-badge:hover {
    transform: scale(1.1);
}

.seller-avatar-badge img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 480px) {
    .seller-avatar-badge {
        width: 35px;
        height: 35px;
        top: 10px;
        right: 10px;
    }
}
/* --- Saved Items Sidebar --- */
.saved-items-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    z-index: 9999;
    transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    color: white;
}

.saved-items-sidebar.active {
    right: 0;
}

.saved-header {
    padding: 30px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.saved-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.saved-item-card {
    display: flex;
    gap: 15px;
    background: rgba(255,255,255,0.05);
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
}

.saved-item-img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.saved-item-info h4 {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    color: #f8fafc;
}

.saved-item-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 700;
}

.remove-saved {
    position: absolute;
    top: 10px;
    right: 10px;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.8rem;
    opacity: 0.6;
    transition: 0.3s;
}

.remove-saved:hover {
    opacity: 1;
}

.saved-footer {
    padding: 25px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Global Heart Button Header */
#header-saved-btn {
    position: relative;
    color: #ef4444;
    font-size: 1.3rem;
    cursor: pointer;
    margin-right: 15px;
    transition: transform 0.3s ease;
}

#header-saved-btn:hover {
    transform: scale(1.1);
}

.saved-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 50px;
    font-weight: 800;
    border: 2px solid #0f172a;
}

/* Heart Interaction on Cards */
.save-btn-overlay {
    position: absolute;
    bottom: 15px; /* Moved to bottom to avoid overlapping with seller avatar */
    right: 15px;
    width: 38px;
    height: 38px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 20;
}

.save-btn-overlay.active {
    color: #ef4444;
    transform: scale(1.1);
}

.save-btn-overlay:hover {
    transform: scale(1.2);
}

@media (max-width: 480px) {
    .saved-items-sidebar {
        width: 100%;
        right: -100%;
    }
}

/* Fix for dashboards to remove the gap between header and hero section */
@media (max-width: 768px) {
  header + .dashboard-header-wrapper {
    margin-top: 57px !important;
  }
}

/* --- Dashboard Mobile Responsiveness Fixes --- */
@media (max-width: 768px) {
  /* 1. Stack all inline grid columns vertically in dashboards */
  .dashboard-header-wrapper [style*="display: grid"],
  .admin-card [style*="display: grid"],
  .modal-content [style*="display: grid"] {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  /* 2. Optimize inputs for mobile (prevent squishing and iOS zoom) */
  .admin-card input,
  .admin-card select,
  .admin-card textarea,
  .modal-content input,
  .modal-content select,
  .modal-content textarea {
    padding: 12px 14px !important;
    font-size: 16px !important; /* Prevent iOS Safari auto-zoom */
    border-radius: 10px !important;
  }

  /* 3. Adjust stat cards for mobile */
  .stat-card-mini {
    padding: 12px !important;
  }
  
  /* 4. Fix admin card padding to maximize screen space */
  .admin-card {
    padding: 20px 15px !important;
    border-radius: 15px !important;
  }
  
  /* 5. Adjust form group margins */
  .form-group {
    margin-bottom: 20px !important;
  }
  
  /* 6. Fix Profile Upload Avatar section on mobile */
  .image-upload-wrapper {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px !important;
  }
}

/* --- Dashboard Tabs Mobile Responsiveness --- */
@media (max-width: 768px) {
  .dashboard-tabs {
    flex-wrap: wrap !important;
    justify-content: center !important;
    overflow-x: visible !important;
    padding-bottom: 10px !important;
  }
  .tab-btn {
    flex: 1 1 auto !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 10px 15px !important;
    font-size: 0.85rem !important;
    white-space: normal !important;
  }
}

/* Original Currency Indicator */
.original-currency-sign { display: inline-flex; align-items: center; gap: 4px; font-size: 0.65rem; font-weight: 700; color: #64748b; background: #f1f5f9; padding: 2px 8px; border-radius: 4px; border: 1px solid #e2e8f0; margin-left: 2px; text-transform: uppercase; letter-spacing: 0.5px; vertical-align: middle; white-space: nowrap; }
.original-currency-sign i { font-size: 0.7rem; color: #d49a12; }
.price-container { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }

/* Floating Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    border: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    background: var(--secondary-color);
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 85px;
        left: 20px;
        width: 40px;
        height: 40px;
    }
}
