/* ===============================
   ROOT VARIABLES (Premium Palette)
================================ */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-main: #f8fafc;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --card-bg: #ffffff;
  --border-light: #e2e8f0;
  
  /* Modern Soft Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -4px rgba(0,0,0,0.025);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.05);
}

/* ===============================
   BRAND LOGO
================================ */
.brand-logo {
  font-size: 1.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: white !important;
  line-height: 1;
}

.brand-logo span {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 2px;
  font-weight: 500;
  margin-top: 2px;
  color: #93c5fd; /* Soft blue accent */
}

/* ===============================
   GLOBAL
================================ */
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-main);
  color: var(--text-dark);
  min-height: 100vh;
  padding-top: 60px;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  transition: all 0.2s ease;
}

/* ==========================================
   PREMIUM NAVBAR STYLING
   ========================================== */
/* Slim, shadowed navbar */
.navbar-brand img {
    height: 150px !important; /* Increased to maximum size */
    width: auto;
    object-fit: contain;
    /* Negative margin pulls the logo into the bar space */
    margin: -30px 0; 
}

/* 2. Make the navigation bar thin */
.premium-navbar {
    background-color: #ffffff !important;
    padding: 0px 0 !important; /* Reduced to 0 to keep it as thin as possible */
    height: 80px;            /* Fixed thin height */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;     /* Keeps items centered in the thin bar */
}

/* Elegant Hover Underline Effect */
.elegant-link {
    color: #1a1a1a !important;
    font-weight: 600 !important;
    position: relative;
    padding: 15px 12px !important; /* Aligns underline with bottom of bar */
}

.elegant-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 12px;
    right: 12px;
    height: 3px; /* Thickness of underline */
    background-color: #1e6c41; /* Brand green */
    transform: scaleX(0); /* Hidden by default */
    transition: transform 0.3s ease;
}

.elegant-link:hover::after {
    transform: scaleX(1); /* Slide-in underline effect */
}


/* Highlighted "Sell Property" Button */
.btn-sell-nav {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff !important;
    padding: 10px 24px !important;
    border-radius: 50px; /* Pill shape */
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-sell-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    color: #ffffff !important;
}

.btn-sell-nav::after {
    display: none; /* Disables the underline effect for this specific button */
}


/* ==========================================
   KILL GOOGLE TRANSLATE WHITE SPACE
   ========================================== */
html, body {
    top: 0px !important;
    position: static !important;
    margin-top: 0px !important;
    padding-top: 0px !important;
}

/* Ensure the navbar itself doesn't have accidental margin */
.premium-navbar {
    margin-top: 0 !important;
}

/* ===============================
   HERO SECTION
================================ */
.hero {
  position: relative;
  min-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
      rgba(15, 23, 42, 0.65),
      rgba(15, 23, 42, 0.65)
    ),
    url("/static/hero.jpg") center / cover no-repeat;
}

.hero-content {
  text-align: center;
  color: #ffffff;
  max-width: 1100px;
  padding: 0 16px;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-content p {
  font-size: 1.1rem;
  color: #e5e7eb;
  margin-bottom: 34px;
}

/* ===============================
   SEARCH BAR (Modern Floating)
================================ */
.home-search-bar {
  display: flex;
  flex-wrap: wrap;              
  gap: 12px;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.98);
  padding: 20px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 150px;
}

.search-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
}

.search-field input,
.search-field select {
  height: 48px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 0 16px;
  font-size: 0.95rem;
  background-color: var(--bg-main);
  transition: all 0.2s ease;
  color: var(--text-dark);
}

.search-field input:focus,
.search-field select:focus {
  background-color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
  outline: none;
}

.search-button button {
  height: 48px;
  padding: 0 34px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 10px;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
  transition: all 0.2s ease;
}

.search-button button:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.4);
}

/* ===============================
   CONTENT SECTIONS
================================ */
.content-section {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 36px;
  margin-top: 70px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.content-section h3 {
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 30px;
  letter-spacing: -0.02em;
}

/* ===============================
   PROPERTY CARDS (Premium UI)
================================ */
.card {
  border: 1px solid rgba(226, 232, 240, 0.8); 
  border-radius: 16px;
  background: var(--card-bg);
  box-shadow: var(--shadow-md);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); 
  overflow: hidden;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(226, 232, 240, 1);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.badge {
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
  background-color: #eff6ff !important;
  color: var(--primary) !important;
  border: 1px solid #bfdbfe;
}

.property-card {
  cursor: pointer;
}

/* ===============================
   FEATURED SLIDER
================================ */
.featured-slider {
  position: relative;
  overflow: hidden;
  padding-bottom: 40px;
}

.featured-track {
  display: flex;
  gap: 28px;
  transition: transform 0.6s ease;
}

.featured-item {
  flex: 0 0 calc(33.333% - 20px);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  padding: 10px 16px;
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
}

.slider-btn:hover {
  background: rgba(0,0,0,0.8);
}

.prev-btn { left: -10px; }
.next-btn { right: -10px; }

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.slider-dots span {
  width: 8px;
  height: 8px;
  background: #cbd5e1;
  border-radius: 50%;
  cursor: pointer;
}

.slider-dots span.active {
  background: var(--primary);
  transform: scale(1.3);
}

/* ===============================
   IMAGE ZOOM
================================ */
.zoom-wrapper {
  overflow: hidden;
  border-radius: 10px;
  cursor: zoom-in;
}

.zoom-wrapper img {
  transition: transform 0.4s ease;
}

.zoom-wrapper:hover img {
  transform: scale(1.15);
}

/* FULLSCREEN ZOOM */
.zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
}

.zoom-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 10px;
}

.zoom-close {
  position: fixed;
  top: 16px;
  right: 24px;
  font-size: 36px;
  color: #fff;
  cursor: pointer;
  z-index: 100000;
}

/* ===============================
   MODAL (Quick View)
================================ */
.modal-content {
  border-radius: 20px;
  border: none;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 28px;
}

#modalImages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

#modalImages img {
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.modal-body {
    max-height: 450px;
    overflow-y: auto;
}

.modal-body p {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ===============================
   SEARCH RESULT ANIMATION
================================ */
#searchSection {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

#searchSection.show {
  opacity: 1;
  transform: translateY(0);
}

/* ===============================
   FOOTER
================================ */
footer {
  margin-top: 60px;
  padding: 24px 0;
  background: #ffffff;
  border-top: 1px solid var(--border-light);
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

/* ===============================
   MOBILE UX
================================ */
@media (max-width: 768px) {
  .hero { min-height: 50vh; }
  .hero-content h1 { font-size: 2.2rem; }
  .home-search-bar { grid-template-columns: 1fr; padding: 18px; margin-top: -30px; }.home-search-bar { 
    flex-direction: column; /* Forces them to stack vertically */
    align-items: stretch; /* Makes inputs full width */
    padding: 18px; 
    margin-top: -30px; 
}
  .featured-item { flex: 0 0 100%; }
  .btn { min-height: 44px; }
  .admin-sidebar { display: none; }
  .admin-content { margin-left: 0; }
}

/* ---------------- ADMIN LAYOUT ---------------- */
.admin-body {
    background: var(--bg-main);
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Modern Admin Sidebar */
.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 24px;
    position: fixed;
    height: 100%;
    border-right: 1px solid rgba(255,255,255,0.05);
}

.sidebar-link {
    display: flex;
    align-items: center;
    color: #94a3b8;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(5px); 
}

.sidebar-footer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
}

/* Modern Form Inputs for Admin */
.form-control, .form-select {
    border-radius: 10px;
    border: 1px solid var(--border-light);
    padding: 12px 16px;
    font-size: 0.95rem;
    color: var(--text-dark);
    background-color: var(--bg-main);
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.form-control:focus, .form-select:focus {
    background-color: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15); 
    outline: none;
}

/* Content */
.admin-content {
    margin-left: 260px;
    flex: 1;
    padding: 30px;
}

.admin-header {
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

.admin-card {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

/* Stat cards */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 14px;
}

/* Messages */
.message-cell {
    max-width: 300px;
    white-space: pre-wrap;
    color: var(--text-dark);
}

/* ===============================
   PROPERTY DETAILS GALLERY
================================ */
.property-gallery {
    user-select: none;
}

.main-image-wrapper {
    overflow: hidden;
    border-radius: 16px;
    position: relative;
    box-shadow: var(--shadow-md);
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    z-index: 5;
    transition: background 0.2s;
}

.gallery-nav:hover {
    background: rgba(15, 23, 42, 0.9);
}

.gallery-nav.prev { left: 16px; }
.gallery-nav.next { right: 16px; }

.thumbnail-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 5px;
    margin-top: 12px;
}

.thumb-image {
    width: 90px;
    height: 65px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.thumb-image:hover {
    opacity: 1;
    transform: scale(1.05);
}

.thumb-image.active {
    opacity: 1;
    outline: 2px solid var(--primary);
}

/* MAIN IMAGE ANIMATION */
#mainImage {
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.image-fade {
    opacity: 0;
}

.image-slide-left {
    transform: translateX(-25px);
    opacity: 0;
}

.image-slide-right {
    transform: translateX(25px);
    opacity: 0;
}

/* Fullscreen viewer for details page */
.fullscreen-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
}

.fullscreen-overlay img {
    max-width: 92%;
    max-height: 92%;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}


/* ===============================
   NEWSLETTER TICKER SLIDER
================================ */
.news-section {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.news-slider-container {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.news-track {
  display: flex;
  gap: 24px;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.news-item-card {
  flex: 0 0 calc(33.333% - 16px);
  min-width: 280px;
  background: var(--bg-main);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-item-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(37, 99, 235, 0.2);
}

.news-category-badge {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 12px;
}

/* Dynamic colors based on categories */
.badge-meeting { background: #fee2e2; color: #dc2626; }
.badge-official { background: #e0f2fe; color: #0369a1; }
.badge-government { background: #fef3c7; color: #d97706; }
.badge-general { background: #f1f5f9; color: #475569; }

@media (max-width: 992px) {
  .news-item-card { flex: 0 0 calc(50% - 12px); }
}

@media (max-width: 768px) {
  .news-item-card { flex: 0 0 100%; }
}

.footer-link {
    color: #4a5568;
    text-decoration: none;
    font-size: 0.85rem;
    display: block;
    padding: 5px 0;
    transition: color 0.2s;
}
.footer-link:hover { color: #2563eb; }
.footer-main a:hover { color: #ffffff !important; }


.hero-video-section {
    position: relative;
    height: 80vh; /* Adjust height as needed */
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* This makes it fill the screen like a background image */
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Black overlay with 50% opacity */
    background: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2; /* Keeps text above the video and overlay */
    text-align: center;
    color: white;
    width: 100%;
    padding: 20px;
}


/* bento" */
.location-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 250px;
    gap: 20px;
    margin-bottom: 50px;
}

.location-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none; /* Removes link underline */
    display: block;
}

.location-card.large {
    grid-row: span 2;
}

.location-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Darkens image slightly on hover */
.location-card:hover img {
    transform: scale(1.05);
}


.card-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; /* Essential: Must fill the card height */
    padding: 20px;
    z-index: 2;

    /* The Fix: Flexbox */
    display: flex;
    flex-direction: column;         /* Stacks items vertically */
    justify-content: space-between; /* Pushes H3 to top, Button to bottom */
}

/* to make text readable against bright images */
.location-card::before {
    content: "";
    position: absolute;
    inset: 0;
    /* Dark gradient to ensure text/button always pop */
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 40%, rgba(0,0,0,0.7) 100%);
    z-index: 1;
}

/* Make text readable with a shadow */
.card-content h3 {
    color: white;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0; /* Remove margins that interfere with flex */
    text-shadow: 0 2px 4px rgba(0,0,0,0.5); 
}

.view-btn {
    align-self: flex-start; /* Keeps the button on the left */
    background-color: #0d6efd;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}