/*
Theme Name: Premium Estate
Theme URI: https://estates.energy-stars.com
Description: Professional real estate theme with modern design and flexible customization options. Perfect for real estate agencies, property listings, and real estate professionals.
Author: Premium Estate Team
Author URI: https://estates.energy-stars.com
Version: 1.0.21
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: premium-estate
Domain Path: /languages
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
Tags: real-estate, property-listing, agents, real-estate-agency, business, responsive, custom-header, custom-menu, custom-logo, featured-images, theme-options, threaded-comments, translation-ready, two-columns, right-sidebar
*/

/* ==========================================================================
   CSS Variables - Theme Customization
   ========================================================================== */
:root {
  /* Primary Colors */
  --primary-color: #5b63ff;
  --primary-dark: #4338ca;
  --primary-light: #8b5cf6;
  
  /* Secondary Colors */
  --secondary-color: #10b981;
  --secondary-dark: #059669;
  --secondary-light: #34d399;
  
  /* Neutral Colors */
  --text-color: #0f172a;
  --text-light: #64748b;
  --text-muted: #94a3b8;
  --bg-color: #ffffff;
  --bg-light: #f8fafc;
  --bg-dark: #1e293b;
  
  /* Border & Shadow */
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  
  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  
  /* Layout */
  --container-width: 1200px;
  --border-radius: 0.5rem;
  --border-radius-lg: 1rem;
  --transition: all 0.3s ease;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Remove WordPress admin bar margin on mobile when not logged in */
@media screen and (max-width: 782px) {
  /* Reset html and body margins/padding for mobile */
  html:not(.admin-bar) {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  body:not(.admin-bar) {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  /* Ensure header starts at top on mobile when no admin bar */
  body:not(.admin-bar) .site-header {
    top: 0 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  /* Also reset for admin-bar case but ensure proper positioning */
  body.admin-bar {
    margin-top: 0 !important;
  }
  
  /* Hide admin bar on mobile to prevent spacing issues */
  #wpadminbar {
    display: none !important;
  }
  
  /* When admin bar is hidden, reset body margin */
  body.admin-bar {
    margin-top: 0 !important;
  }
  
  body.admin-bar .site-header {
    top: 0 !important;
  }
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 var(--spacing-lg) 0;
  color: var(--text-color);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

p {
  margin: 0 0 var(--spacing-lg) 0;
  color: var(--text-light);
}

/* Entry Content */
.entry-header {
  margin-bottom: var(--spacing-xl);
}

.entry-title {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-md);
  color: var(--text-color);
}

.entry-content {
  line-height: 1.8;
}

.entry-content p {
  margin-bottom: var(--spacing-md);
}

/* Homepage Intro (optional content before sections) */
.homepage-intro {
  padding: var(--spacing-xl) 0;
  background: var(--bg-light);
}

.homepage-intro .entry-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: var(--font-size-lg);
  line-height: 1.8;
  color: var(--text-light);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: var(--spacing-xl);
  margin-bottom: var(--spacing-md);
}

.entry-content ul,
.entry-content ol {
  margin: var(--spacing-md) 0;
  padding-left: var(--spacing-xl);
}

.entry-content li {
  margin-bottom: var(--spacing-sm);
}

.entry-content img {
  max-width: 100%;
  height: auto;
  margin: var(--spacing-lg) 0;
}

.entry-content a {
  color: var(--primary-color);
  text-decoration: underline;
}

.entry-content a:hover {
  color: var(--primary-dark);
}

.entry-footer {
  margin-top: var(--spacing-xl);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--border-color);
}

.edit-link a {
  font-size: var(--font-size-sm);
  color: var(--text-light);
}

.page-empty-message {
  padding: var(--spacing-xl);
  background: var(--bg-light);
  border-radius: var(--border-radius);
  text-align: center;
  color: var(--text-light);
  margin: var(--spacing-xl) 0;
}

/* Sidebar */
.sidebar {
  background: var(--bg-light);
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  max-width: 100%;
}

.widget {
  margin-bottom: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
}

.widget:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.widget-title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--text-color);
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget ul li {
  margin-bottom: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid var(--border-light);
}

.widget ul li:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.widget a {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

.widget a:hover {
  color: var(--primary-color);
}

/* Search Widget */
.widget_search .search-form {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.widget_search input[type="search"] {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: var(--font-size-sm);
}

.widget_search input[type="submit"] {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: 600;
  transition: opacity 0.2s ease;
}

.widget_search input[type="submit"]:hover {
  opacity: 0.9;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* WordPress specific */
.site-title {
  margin: 0;
}

.site-description {
  margin: 0;
  color: var(--text-light);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999999;
}

.skip-link:focus {
  left: 6px;
  top: 7px;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ==========================================================================
   Layout
   ========================================================================== */
#page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

/* Remove any top spacing on mobile */
@media screen and (max-width: 782px) {
  #page {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  #masthead {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}

.site-content {
  flex: 1;
  padding-bottom: 60px; /* Add bottom spacing before footer */
}

/* ================================
   PAGE BANNER STYLES
   ================================ */
.page-banner {
  width: 100%;
  padding: 80px 0;
  text-align: center;
  margin: 0;
}

.page-banner .container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.page-banner .banner-title {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  line-height: 1.2;
}

.page-banner .banner-description {
  font-size: 1.25rem;
  margin: 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* Banner Styles */
.page-banner.banner-solid {
  background-color: #6366f1;
}

.page-banner.banner-gradient {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.page-banner.banner-gradient-blue {
  background: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
}

.page-banner.banner-gradient-purple {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

/* Banner Heights */
.page-banner.banner-small {
  padding: 60px 0;
}

.page-banner.banner-small .banner-title {
  font-size: 2.5rem;
}

.page-banner.banner-medium {
  padding: 80px 0;
}

.page-banner.banner-large {
  padding: 120px 0;
}

.page-banner.banner-large .banner-title {
  font-size: 3.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .page-banner {
    padding: 60px 0;
  }
  
  .page-banner .banner-title {
    font-size: 2rem;
  }
  
  .page-banner .banner-description {
    font-size: 1rem;
  }
  
  .page-banner.banner-large {
    padding: 80px 0;
  }
  
  .page-banner.banner-large .banner-title {
    font-size: 2.5rem;
  }
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  width: 100%;
}

.content-area {
  padding: var(--spacing-xl) 0;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xl);
}

.col-main {
  flex: 1;
  min-width: 0;
}

.col-sidebar {
  width: 280px;
  max-width: 280px;
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .col-sidebar {
    width: 250px;
    max-width: 250px;
  }
}

@media (max-width: 768px) {
  .row {
    flex-direction: column;
    gap: var(--spacing-lg);
  }
  
  .col-sidebar {
    width: 100%;
    max-width: 100%;
    order: -1;
  }
}

.container-fluid {
  width: 100%;
  padding: 0 var(--spacing-md);
}

.col {
  flex: 1;
  padding: 0;
}

.col-main {
  flex: 1;
  min-width: 0;
}

.col-sidebar {
  width: 300px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .row {
    flex-direction: column;
    gap: var(--spacing-lg);
  }
  
  .col-sidebar {
    width: 100%;
  }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 10px 16px;
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  line-height: 1.5;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background-color: var(--secondary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

/* ==========================================================================
   Cards
   ========================================================================== */
.card {
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: var(--transition);
}

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

.card-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--border-light);
}

.card-body {
  padding: var(--spacing-lg);
}

.card-footer {
  padding: var(--spacing-lg);
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-light);
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
}

.form-control {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-base);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background-color: white;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(91, 99, 255, 0.1);
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  width: 100%;
  margin: 0;
}

/* Adjust header position when WordPress admin bar is present */
body.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  position: relative;
}

.site-branding {
  order: 1;
}

.logo {
  font-weight: 700;
  color: var(--text-color);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  margin-left: 0;
}

.logo-line-1 {
  font-size: 1.2rem;
  margin-bottom: -2px;
}

.logo-line-2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary-color);
}

.main-navigation {
  order: 2;
}

.main-nav-list {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 10px;
}

.main-nav-list li {
  margin: 0;
}

.main-nav-list a {
  text-decoration: none;
  color: var(--text-color);
  padding: 8px 10px;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.main-nav-list a:hover {
  background: #f1f5f9;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  order: 3;
}

.search-toggle-btn {
  width: 44px;
  height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-color);
}

.burger {
  width: 44px;
  height: 44px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: none;
}

.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #0f172a;
  margin: 3px 0;
  transition: all 0.3s ease;
}

.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Dropdown Menu */
.menu-item-has-children {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  padding: 8px 0;
  border: 1px solid #e2e8f0;
  list-style: none;
  margin: 0;
}

.menu-item-has-children:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  margin: 0;
}

.dropdown-menu a {
  display: block;
  padding: 8px 16px;
  color: var(--secondary-color);
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 8px;
  margin: 0 5px;
}

.dropdown-menu a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateX(4px);
}

/* User Account Menu */
.user-account-menu {
  position: relative;
}

.user-menu-wrapper {
  position: relative;
}

.user-menu-toggle,
.user-menu-link {
  width: auto;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-color);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
}

.user-menu-toggle:hover,
.user-menu-link:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.user-menu-toggle i,
.user-menu-link i {
  font-size: 20px;
}

.user-name {
  display: none;
}

@media (min-width: 768px) {
  .user-name {
    display: inline;
  }
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  min-width: 220px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  padding: 8px 0;
  border: 1px solid #e2e8f0;
  list-style: none;
  margin: 0;
}

.user-menu-wrapper.active .user-dropdown-menu,
.user-menu-wrapper:hover .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-dropdown-menu li {
  margin: 0;
}

.user-dropdown-menu li.divider {
  height: 1px;
  background: #e2e8f0;
  margin: 8px 0;
  padding: 0;
}

.user-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 14px;
}

.user-dropdown-menu a i {
  width: 18px;
  text-align: center;
  color: var(--primary-color);
}

.user-dropdown-menu a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateX(4px);
}

.user-dropdown-menu a:hover i {
  color: white;
}

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  right: 0;
  top: 0;
  width: 90vw;
  max-width: 420px;
  height: 100vh;
  background: #fff;
  box-shadow: -12px 0 30px rgba(2, 6, 23, 0.18);
  padding: 24px;
  z-index: 10000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Adjust mobile nav position when WordPress admin bar is present */
body.admin-bar .mobile-nav {
  top: 32px;
  height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar .mobile-nav {
    top: 46px;
    height: calc(100vh - 46px);
  }
}

.mobile-nav.active {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.mobile-nav-header h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
}

.mobile-logo-line-1 {
  font-size: 1rem;
  margin-bottom: -2px;
}

.mobile-logo-line-2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary-color);
}

.mobile-close {
  width: 40px;
  height: 40px;
  border: none;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-color);
}

.mobile-close:hover {
  background: var(--primary-color);
  color: white;
  transform: rotate(90deg);
}

.mobile-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.mobile-menu-list li {
  margin: 0;
}

.mobile-menu-list a {
  display: block;
  padding: 12px 16px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.2s;
}

.mobile-menu-list a:hover {
  background: #f1f5f9;
}

/* Mobile User Account Links */
.mobile-user-account {
  border-top: 1px solid #e2e8f0;
  padding: 20px;
  margin-top: 20px;
}

.mobile-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  margin-bottom: 15px;
  font-weight: 600;
  color: var(--text-color);
}

.mobile-user-info i {
  font-size: 24px;
  color: var(--primary-color);
}

.mobile-account-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-color);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  margin-bottom: 8px;
  font-size: 15px;
}

.mobile-account-link i {
  width: 20px;
  text-align: center;
  color: var(--primary-color);
}

.mobile-account-link:hover {
  background: var(--primary-color);
  color: white;
}

.mobile-account-link:hover i {
  color: white;
}

.mobile-account-link.mobile-logout {
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
  margin-top: 8px;
  color: #ef4444;
}

.mobile-account-link.mobile-logout i {
  color: #ef4444;
}

.mobile-account-link.mobile-logout:hover {
  background: #ef4444;
  color: white;
}

.mobile-account-link.mobile-logout:hover i {
  color: white;
}

.mobile-dropdown {
  position: relative;
}

.mobile-dropdown > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-dropdown > a i {
  transition: transform 0.3s ease;
  font-size: 0.8rem;
}

.mobile-dropdown.active > a i {
  transform: rotate(180deg);
}

.mobile-dropdown-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: rgba(37, 99, 235, 0.05);
  margin: 8px 0 0 16px;
  border-radius: 8px;
  list-style: none;
  padding: 0;
}

.mobile-dropdown.active .mobile-dropdown-menu {
  max-height: 200px;
}

.mobile-dropdown-menu li {
  margin: 0;
}

.mobile-dropdown-menu a {
  display: block;
  padding: 12px 20px;
  color: var(--secondary-color);
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.mobile-dropdown-menu a:hover {
  background: var(--primary-color);
  color: white;
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* Adjust overlay position when WordPress admin bar is present */
body.admin-bar .mobile-overlay {
  top: 32px;
  height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar .mobile-overlay {
    top: 46px;
    height: calc(100vh - 46px);
  }
}

.mobile-overlay.active {
  display: block;
}

body.mobile-menu-open {
  overflow: hidden !important;
  position: fixed;
  width: 100%;
  height: 100%;
  touch-action: none;
  -webkit-overflow-scrolling: none;
}

/* Prevent scroll on iOS when menu is open */
body.mobile-menu-open,
body.mobile-menu-open html {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100%;
}

@media (max-width: 1024px) {
  .main-navigation {
    display: none;
  }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  padding: var(--spacing-2xl) 0;
  text-align: center;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
  background-size: cover;
  opacity: 0.3;
  z-index: 0;
}

.hero-section .container {
  position: relative;
  z-index: 1;
}

/* Hero content styles - only for .hero-section (not .hero) */
.hero-section .hero-content h1 {
  font-size: var(--font-size-4xl);
  margin-bottom: var(--spacing-lg);
  color: white;
}

.hero-section .hero-content p {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-xl);
  color: rgba(255, 255, 255, 0.9);
}

/* Hero Banner with Search Form */
.hero {
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: white;
  padding: 60px 0;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  position: relative;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero .hero-inner { 
  display: grid; 
  gap: 16px; 
  text-align: center;
}

.hero .hero-content { 
  max-width: var(--pe-container-width, 1200px); 
  margin: 0 auto; 
  text-align: center; 
  position: relative; 
  z-index: 1; 
}

.hero .hero-content h1 { 
  margin: 0 0 16px 0; 
  color: white; 
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
}

.hero .hero-content p { 
  margin: 0; 
  opacity: .9; 
  color: white; 
  font-size: 1.25rem;
  line-height: 1.5;
}

.hero-search { 
  max-width: var(--pe-container-width, 1200px); 
  margin: 24px auto 0; 
  background: #fff; 
  color: var(--text-color); 
  padding: 32px; 
  border-radius: 20px; 
  box-shadow: 0 12px 36px rgba(2,6,23,.18); 
}

.search-form { 
  display: grid; 
  grid-template-columns: repeat(3, 1fr); 
  gap: 20px; 
  align-items: end;
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 4px;
}

.search-form input, 
.search-form select { 
  padding: 14px 16px; 
  border: 1px solid #e5e7eb; 
  border-radius: 12px; 
  background: #fff; 
  font-size: 0.95rem;
  transition: all 0.2s ease;
  width: 100%;
}

.search-form input:focus, 
.search-form select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-actions {
  display: flex;
  gap: 12px;
  align-items: end;
}

.search-actions .btn {
  padding: 14px 24px;
  font-weight: 600;
  border-radius: 12px;
  transition: all 0.2s ease;
}

/* Featured Section */
.featured-section {
  padding: 80px 0;
  background: #f8fafc;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-xl);
}

.section-header h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-sm);
  color: var(--text-color);
}

.section-header p {
  font-size: var(--font-size-lg);
  color: var(--text-light);
  margin-bottom: 0;
}

/* Properties Grid - Main styles for catalog/properties page */
.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 48px;
}

/* Override for homepage featured section */
.featured-section .properties-grid {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-xl);
  margin: var(--spacing-2xl) 0;
}

.section-cta {
  text-align: center;
  margin-top: var(--spacing-xl);
}

/* Why Choose Section */
.why-choose-section {
  padding: 80px 0;
  background: #f8fafc;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 48px;
}

/* Front Page Content */
.front-page-content {
  width: 100%;
  /* overflow-x: hidden; - REMOVED! Blocks full-width elements like Cover blocks */
}

/* Gutenberg Group Blocks - Respect alignments */
.wp-block-group {
  clear: both;
}

.wp-block-group.alignwide {
  max-width: var(--pe-container-width, 1200px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.wp-block-group.alignfull {
  max-width: none;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* Gutenberg Columns Support */
.wp-block-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1.75em;
}

.wp-block-column {
  flex: 1;
  min-width: 0;
  word-break: break-word; /* Prevent text overflow */
}

.wp-block-column h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--pe-text-color, #0f172a);
}

.wp-block-column p {
  color: var(--pe-text-color, #0f172a);
  line-height: 1.6;
}

.wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
  flex-basis: 0;
  flex-grow: 1;
}

@media (max-width: 781px) {
  .wp-block-columns:not(.is-not-stacked-on-mobile) {
    flex-direction: column;
  }
  
  .wp-block-columns:not(.is-not-stacked-on-mobile) > .wp-block-column {
    flex-basis: 100%;
  }
}

.value-card {
  text-align: center;
  padding: 40px 32px;
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 30px rgba(2,6,23,.08);
  border: 1px solid rgba(2,6,23,.06);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.value-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), #4c63ff);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.value-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(2,6,23,.12);
}

.value-card:hover::before {
  transform: scaleX(1);
}

.value-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), #4c63ff);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  transition: all 0.3s ease;
  position: relative;
}

.value-card:hover .value-icon {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.value-icon i {
  font-size: 2rem;
  color: white;
  transition: all 0.3s ease;
}

.value-card:hover .value-icon i {
  transform: scale(1.1);
}

.value-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 16px 0;
  color: var(--text-color);
  transition: color 0.3s ease;
}

.value-card:hover h3 {
  color: var(--primary-color);
}

.value-card p {
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
  transition: color 0.3s ease;
}

.value-card:hover p {
  color: var(--text-color);
}

/* Section with container */
.container.section {
  padding: 80px 0;
}

/* CTA Section - Global styles for all pages */
.cta-section {
  padding: 60px 0 60px !important;
  margin-bottom: 0 !important;
  margin-top: 0;
  background: linear-gradient(135deg, #1e293b, #334155);
  color: white;
  text-align: center;
}

/* Ensure no external margin/padding between CTA and footer */
.cta-section + .site-footer,
.cta-section + footer {
  margin-top: 0 !important;
}

/* Ensure main doesn't add spacing after CTA */
main .cta-section:last-child {
  margin-bottom: 0 !important;
}

.cta-content h2 {
  font-size: var(--font-size-3xl);
  margin-bottom: var(--spacing-md);
  color: white;
}

.cta-content p {
  font-size: var(--font-size-lg);
  margin-bottom: var(--spacing-xl);
  color: rgba(255, 255, 255, 0.9);
}

.cta-buttons {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero-section {
    min-height: 50vh;
    padding: var(--spacing-xl) 0;
  }
  
  .hero-content h1 {
    font-size: var(--font-size-3xl);
  }
  
  .values-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-content h2 {
    font-size: var(--font-size-2xl);
  }
}

/* ==========================================================================
   Property Cards - Catalog/Properties Page
   ========================================================================== */
/* Properties grid styles are defined above - no duplication */

.property-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  max-width: 400px;
  margin: 0 auto;
  width: 100%;
}

.property-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.12);
}

.property-image {
  position: relative;
  height: 240px;
  overflow: hidden;
  background: #f5f5f5;
}

.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

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

.property-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
  background: var(--primary-color);
  color: white;
}

.property-content {
  padding: 20px;
}

/* Property card elements - catalog page */
/* 
 * PLUGIN CUSTOMIZATION GUIDE:
 * Elements can be reordered using CSS order property.
 * Each element has data-order attribute for easy manipulation.
 */
.property-card .property-content {
  display: flex;
  flex-direction: column;
}

.property-card .property-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0 0 0px 0;
  order: var(--property-price-order, 1);
}

.property-card .property-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0px 0;
  color: var(--text-color);
  order: var(--property-title-order, 2);
}

.property-card .property-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 10px;
  order: var(--property-location-order, 4);
}

.property-card .property-location i {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Property features for catalog/properties page cards */
.property-card .property-features {
  display: flex;
  gap: 5px; /* Matches verticalSpacing default - DYNAMIC via Gutenberg for carousel */
  padding-top: 5px;
  border-top: 1px solid #f1f5f9;
  margin-bottom: 5px;
  flex-wrap: wrap;
  order: var(--property-features-order, 3);
}

.property-card .property-features span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-light);
  white-space: nowrap;
}

.property-card .property-features span i {
  color: var(--primary-color);
  font-size: 0.9rem;
  width: auto;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

/* Property excerpt for catalog/properties page cards */
.property-card .property-excerpt {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin: 10px 0;
  order: var(--property-excerpt-order, 5);
}

/* Property footer for catalog/properties page cards */
/* 
 * PLUGIN CUSTOMIZATION GUIDE:
 * Button width can be controlled via:
 * 1. data-button-width="full" attribute on .property-footer
 * 2. CSS class .button-full-width on .property-footer
 * 3. CSS variable --property-button-width
 */
.property-card .property-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 0;
  padding-top: 0;
  order: var(--property-footer-order, 6);
}

/* Full width button variant */
.property-card .property-footer[data-button-width="full"],
.property-card .property-footer.button-full-width {
  flex-direction: column;
  align-items: stretch;
}

.property-card .property-footer[data-button-width="full"] .property-view-btn,
.property-card .property-footer.button-full-width .property-view-btn {
  width: 100%;
  text-align: center;
}

/* Compact button variant (default) */
.property-card .property-footer[data-button-width="auto"] .property-view-btn,
.property-card .property-footer .property-view-btn {
  flex-shrink: 0;
  padding: 10px 20px;
  font-size: 0.9rem;
  white-space: nowrap;
  width: auto;
}

/* Price in footer (if moved there) */
.property-card .property-footer .property-price {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  flex: 1;
}

.btn-sm {
  padding: 10px 16px;
  font-size: 0.9rem;
}

/* ==========================================================================
   Catalog Page - Filters & Results
   ========================================================================== */
.filters-section {
  background: #f8fafc;
  padding: 40px 0;
}

.filters-container {
  background: white;
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.06);
}

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

.filters-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.btn-text {
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s;
}

.btn-text:hover {
  background: rgba(91, 99, 255, 0.1);
}

.filters-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
  width: 100%;
  max-width: 100%;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text-color);
}

.filter-group select,
.filter-group input {
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  font-size: 1rem;
  transition: border-color 0.2s;
  width: 100%;
  box-sizing: border-box;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(91, 99, 255, 0.1);
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: 12px;
}

.price-inputs input {
  flex: 1;
}

.price-inputs span {
  color: var(--text-light);
}

.filters-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 10px;
}

.filters-actions .btn {
  padding: 12px 24px;
}

/* Results Section */
.results-section {
  padding: 60px 0;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid #e5e7eb;
}

.results-info h3 {
  margin: 0 0 4px 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-color);
}

.results-info h3 span {
  font-weight: 400;
  color: var(--text-light);
}

.results-info p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.9rem;
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sort-group label {
  font-weight: 500;
  color: var(--text-color);
}

.sort-group select {
  padding: 10px 16px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s;
}

.sort-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(91, 99, 255, 0.1);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 40px;
}

.page-btn {
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #e5e7eb;
  background: white;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.page-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-ellipsis {
  padding: 0 8px;
  color: var(--text-light);
}

/* ==========================================================================
   Agents Page
   ========================================================================== */
.agents-section {
  padding: 60px 0;
  width: 100%;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  width: 100%;
  max-width: var(--pe-container-width, 1200px);
  margin: 0 auto;
  justify-items: stretch;
  align-items: start;
}

.agent-card {
  background: white;
  border-radius: 12px;
  padding: 32px 24px;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.agent-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.agent-card:hover::before {
  transform: scaleX(1);
}

.agent-avatar {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 24px;
  border: 4px solid #f1f5f9;
}

.agent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--text-color);
}

.agent-title {
  color: var(--text-light);
  margin-bottom: 16px;
  font-size: 1rem;
}

.agent-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
  padding: 16px 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  width: 100%;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 4px;
}

.agent-languages {
  margin-bottom: 20px;
  width: 100%;
  font-size: 0.9rem;
}

.agent-languages strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text-color);
  font-weight: 600;
}

.agent-languages span {
  color: var(--text-light);
}

.agent-contact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-top: 20px;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.contact-btn.phone {
  background: var(--primary-color);
  color: white;
}

.contact-btn.phone:hover {
  background: #4c54d9;
  transform: translateY(-2px);
}

.contact-btn.telegram {
  background: #0088cc;
  color: white;
}

.contact-btn.telegram:hover {
  background: #006699;
  transform: translateY(-2px);
}

.contact-btn.whatsapp {
  background: #25d366;
  color: white;
}

.contact-btn.whatsapp:hover {
  background: #1da851;
  transform: translateY(-2px);
}

.why-agents-section {
  background: #f8fafc;
  padding: 80px 0;
}

/* ==========================================================================
   Single Property Page
   ========================================================================== */
.property-details-section .container {
  max-width: var(--pe-container-width, 1200px) !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 16px !important;
}

.property-gallery {
  position: relative;
  height: 500px;
  background: #f5f5f5;
  overflow: hidden;
}

.gallery-main {
  position: relative;
  height: 100%;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-nav {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.gallery-thumb {
  width: 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s;
}

.gallery-thumb:hover,
.gallery-thumb.active {
  border-color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 2;
}

.gallery-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-color);
}

.gallery-btn:hover {
  background: white;
  transform: scale(1.1);
}

.property-details-section {
  padding: 60px 0;
}

.property-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.property-main {
  flex: 2;
  min-width: 0;
}

.property-sidebar {
  width: 400px;
  position: sticky;
  top: 80px;
  align-self: flex-start;
  height: fit-content;
}

.property-header {
  margin-bottom: 32px;
}

.property-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--text-color);
}

.property-location {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-light);
  font-size: 1.125rem;
  margin-bottom: 20px;
}

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

.property-meta {
  display: flex;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  flex-wrap: wrap;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.meta-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(91, 99, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
}

.meta-label {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.meta-value {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-color);
}

.property-description {
  margin-bottom: 32px;
}

.property-description h2 {
  font-size: 1.5rem;
  margin: 0 0 20px 0;
  color: var(--text-color);
}

.property-description p {
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 20px;
}

/* Property features section for single property page */
.property-details-section .property-features {
  margin-bottom: 32px;
}

.property-details-section .property-features h2 {
  font-size: 1.5rem;
  margin: 0 0 20px 0;
  color: var(--text-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.feature-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 12px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #f8faff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.feature-text {
  font-weight: 500;
  color: var(--text-color);
  font-size: 1rem;
}

.property-location-section {
  margin-bottom: 32px;
}

.property-location-section h2 {
  font-size: 1.5rem;
  margin: 0 0 20px 0;
  color: var(--text-color);
}

.location-stats {
  background: white;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: #f8fafc;
  border-radius: 10px;
  transition: all 0.2s;
}

.stat-item:hover {
  background: rgba(91, 99, 255, 0.05);
  transform: translateY(-2px);
}

.stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(91, 99, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stat-info {
  flex: 1;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 2px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-light);
  font-weight: 500;
}

.nearby-amenities {
  margin-bottom: 24px;
}

.nearby-amenities h3 {
  margin: 0 0 20px 0;
  font-size: 1.125rem;
  color: var(--text-color);
}

.amenities-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.amenity-category {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: white;
  border-radius: 12px;
  border: 1px solid var(--primary-color);
  transition: all 0.2s;
}

.category-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.category-title {
  font-weight: 500;
  color: var(--text-color);
  font-size: 0.95rem;
}

.property-map {
  width: 100%;
  height: 450px;
  border-radius: 12px;
  overflow: hidden;
  background: #f5f5f5;
  margin-top: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
}

.property-sidebar .agent-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.06);
  margin-bottom: 24px;
}

.property-sidebar .agent-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: var(--text-color);
}

.agent-profile {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.property-sidebar .agent-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: none;
  margin: 0;
}

.property-sidebar .agent-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-info h4 {
  margin: 0 0 4px 0;
  font-size: 1.125rem;
  color: var(--text-color);
}

.agent-role {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.agent-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
}

.agent-rating i {
  color: #fbbf24;
}

.agent-actions {
  display: grid;
  gap: 10px;
}

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

.contact-btn-primary:hover {
  background: #4c54d9;
  transform: translateY(-2px);
}

.contact-btn-secondary {
  background: #f1f5f9;
  color: var(--text-color);
}

.contact-btn-secondary:hover {
  background: #e2e8f0;
}

/* Agent Contact Actions (for single-agent.php) */
.agent-contact-actions {
  display: flex;
  gap: 10px;
  margin: 15px 0;
  flex-wrap: wrap;
}

.contact-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 18px;
  border: none;
  cursor: pointer;
}

.contact-action-btn.btn-phone {
  background: var(--primary-color);
  color: white;
}

.contact-action-btn.btn-phone:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(91, 99, 255, 0.3);
}

.contact-action-btn.btn-telegram {
  background: #0088cc;
  color: white;
}

.contact-action-btn.btn-telegram:hover {
  background: #006699;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.contact-action-btn.btn-whatsapp {
  background: #25d366;
  color: white;
}

.contact-action-btn.btn-whatsapp:hover {
  background: #1da851;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Property Agent Contacts (for property cards) */
.property-agent-contacts {
  margin: 12px 0;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.agent-name-small {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 8px;
}

.agent-name-small i {
  color: var(--primary-color);
  font-size: 0.875rem;
}

.agent-contact-buttons {
  display: flex;
  gap: 8px;
  align-items: center;
}

.agent-contact-btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.2s ease;
  font-size: 14px;
  color: white;
  background: var(--primary-color);
}

.agent-contact-btn-small:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Phone button */
.agent-contact-btn-small.btn-phone {
  background: var(--primary-color);
}

.agent-contact-btn-small.btn-phone:hover {
  background: var(--primary-dark);
}

/* WhatsApp button */
.agent-contact-btn-small.btn-whatsapp {
  background: #25d366;
}

.agent-contact-btn-small.btn-whatsapp:hover {
  background: #1da851;
}

/* Telegram button */
.agent-contact-btn-small.btn-telegram {
  background: #0088cc;
}

.agent-contact-btn-small.btn-telegram:hover {
  background: #006699;
}

/* Agent Avatar Placeholder */
.agent-avatar-placeholder {
  width: 100%;
  height: 100%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 2rem;
  border-radius: 50%;
}

.calculator-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.06);
}

.calculator-card h3 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  color: var(--text-color);
}

.calculator-form .form-group {
  margin-bottom: 20px;
}

.calculator-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--text-color);
}

.calculator-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1rem;
  box-sizing: border-box;
}

.calculator-form input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(91, 99, 255, 0.1);
}

.calculator-form .btn {
  width: 100%;
  margin-top: 8px;
}

.calculator-results {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.result-item span {
  color: var(--text-light);
  font-size: 0.9rem;
}

.result-item strong {
  font-size: 1.25rem;
  color: var(--primary-color);
}

.similar-section {
  background: #f8fafc;
  padding: 60px 0;
}

.similar-section .properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.similar-section .property-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.similar-section .property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.similar-section .property-image {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.similar-section .property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.similar-section .property-content {
  padding: 20px;
}

.similar-section .property-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0px;
}

.similar-section .property-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0px 0;
  color: var(--text-color);
}

.similar-section .property-location {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.similar-section .property-features {
  display: flex !important;
  gap: 16px !important;
  margin-bottom: 20px !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
}

.similar-section .property-features span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.similar-section .btn-view {
  width: 100%;
  padding: 12px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.similar-section .btn-view:hover {
  background: #4c54d9;
  transform: translateY(-1px);
}

/* Responsive for Property Page */
@media (max-width: 1200px) {
  .property-layout {
    flex-direction: column;
  }
  
  .property-sidebar {
    width: 100%;
    position: static;
  }
}

@media (max-width: 768px) {
  .property-gallery {
    height: 300px;
  }
  
  .property-title {
    font-size: 1.5rem;
  }
  
  .property-price {
  }
  font-size: 1.5rem;
  
  .property-meta {
    flex-wrap: wrap;
    gap: 16px;
  }
  
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .amenities-categories {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .property-map {
    height: 300px;
  }
  
  .similar-section .properties-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .amenities-categories {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-nav {
    gap: 4px;
  }
  
  .gallery-thumb {
    width: 60px;
    height: 45px;
  }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: #0b1220;
  color: #e5e7eb;
  padding-top: 0;
  margin-top: 0;
}

/* Footer has light separator band at top when after CTA */
.cta-section + .site-footer::before {
  content: '';
  display: block;
  height: 0;
  background: transparent;
}

/* Footer padding only if not preceded by CTA section */
.site-footer:not(.cta-section + .site-footer) {
  padding-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  align-items: start;
  min-height: 300px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  height: 100%;
}

.footer-col h4,
.footer-col h5 {
  margin: 0 0 20px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.footer-col h4 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.footer-col p {
  color: #cbd5e1;
  margin: 0;
  line-height: 1.6;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  text-align: left;
  width: 100%;
}

.footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.footer-menu li {
  margin: 0;
}

.footer-col a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-col a:hover {
  color: #fff;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  width: 100%;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-left: 0;
  margin-right: 20px;
}

.contact-item i {
  color: var(--primary-color);
  width: 16px;
  text-align: center;
  margin-top: 0;
  flex-shrink: 0;
}

.social-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: flex-start;
  width: 100%;
}

.social-row {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
}

.social-link {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  display: grid;
  place-items: center;
  text-decoration: none;
  border: 2px solid transparent;
  transition: all 0.2s ease;
}

.social-link:hover {
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.footer-bottom {
  margin-top: 40px;
  border-top: 1px solid #1f2937;
  padding: 20px 0;
  text-align: center;
  color: #94a3b8;
}

@media (max-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    min-height: auto;
  }

  .footer-col:first-child {
    grid-column: 1 / -1;
    margin-bottom: 20px;
    align-items: center;
    text-align: center;
  }

  .footer-col:first-child .contact-info {
    text-align: center;
    align-items: center;
  }

  .footer-col:first-child .contact-item {
    justify-content: center;
  }
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    min-height: auto;
  }

  .footer-col {
    align-items: center;
    text-align: center;
  }

  .footer-col ul {
    text-align: center;
  }

  .contact-info {
    text-align: center;
    align-items: center;
  }

  .contact-item {
    justify-content: center;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .site-footer {
    padding: 40px 0 0 0;
  }

  .footer-grid {
    gap: 24px;
  }

  .social-links {
    gap: 8px;
  }

  .social-link {
    width: 45px;
    height: 45px;
  }
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
  :root {
    --font-size-4xl: 2rem;
    --font-size-3xl: 1.5rem;
    --font-size-2xl: 1.25rem;
  }

  html,
  body {
    overflow-x: hidden;
    width: 100%;
  }

  .container {
    padding: 0 var(--spacing-sm);
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Remove extra top spacing on mobile header */
  .site-header {
    padding-top: 0 !important;
    margin-top: 0 !important;
    top: 0 !important;
  }

  /* Only apply admin bar offset when admin bar is actually present */
  body.admin-bar .site-header {
    top: 46px;
  }

  .site-header .container {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .header-inner {
    padding: 6px 0 !important;
    margin: 0 !important;
  }

  .site-branding {
    margin: 0 !important;
    padding: 0 !important;
  }

  .logo {
    margin-left: 0;
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .header-actions {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Mobile menu improvements */
  .mobile-nav {
    width: 85vw;
    max-width: 380px;
  }

  .mobile-nav.active {
    transform: translateX(0);
  }

  /* Ensure header stays above mobile menu when menu is closed */
  .site-header {
    z-index: 999;
  }

  /* When menu is open, ensure it's above everything */
  body.mobile-menu-open .site-header {
    z-index: 9998;
  }

  body.mobile-menu-open .mobile-nav {
    z-index: 10000;
  }

  body.mobile-menu-open .mobile-overlay {
    z-index: 9999;
  }

  .properties-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }

  .hero-content h1 {
    font-size: var(--font-size-3xl);
  }

  .hero-content p {
    font-size: var(--font-size-base);
  }
}

@media (max-width: 1200px) {
  .hero-search {
    width: 100%;
    max-width: none;
  }
  
  .search-form { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 16px;
    width: 100%;
  }
  
  /* Hide extra filters on tablet */
  .search-field-extra {
    display: none;
  }
  
  .search-actions {
    grid-column: 1 / -1;
    justify-content: center;
    margin-top: 8px;
  }
}

@media (max-width: 900px) {
  .hero-search {
    padding: 24px;
    margin: 16px auto 0;
    width: 100%;
    max-width: none;
  }
  
  .search-form { 
    grid-template-columns: 1fr; 
    gap: 16px;
    width: 100%;
  }
  
  /* Hide extra filters on mobile */
  .search-field-extra {
    display: none;
  }
  
  .search-actions {
    grid-column: 1;
    flex-direction: column;
    gap: 12px;
  }
  
  .search-actions .btn {
    width: 100%;
  }
}

@media (max-width: 1200px) {
  .properties-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
  
  .filters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .filters-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .results-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 1024px) {
  .agents-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero .hero-content h1 { 
    font-size: 2rem; 
  }
  
  .hero .hero-content p { 
    font-size: 1.1rem; 
  }
  
  .filters-grid {
    grid-template-columns: 1fr;
  }
  
  .filters-container {
    padding: 24px;
  }
  
  .properties-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .filters-actions {
    flex-direction: column;
  }
  
  .filters-actions .btn {
    width: 100%;
  }
  
  .sort-group {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .sort-group select {
    width: 100%;
  }
  
  .agents-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
  
  .agent-avatar {
    width: 160px;
    height: 160px;
  }
  
  .agent-stats {
    flex-wrap: wrap;
  }
}

/* Extra small mobile devices - remove all top spacing */
@media (max-width: 480px) {
  /* Remove any extra top spacing on header for mobile */
  html:not(.admin-bar),
  body:not(.admin-bar) {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .site-header {
    padding-top: 0 !important;
    margin-top: 0 !important;
    top: 0 !important;
  }

  /* Only apply admin bar offset when admin bar is actually present */
  body.admin-bar .site-header {
    top: 46px;
  }

  .site-header .container {
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  .header-inner {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .site-branding,
  .logo {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .header-actions {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: var(--spacing-xl) 0;
  }
  
  .hero {
    padding: 40px 0;
    min-height: calc(100vh - 80px);
  }
  
  .hero .hero-content h1 { 
    font-size: 1.75rem; 
  }
  
  .hero .hero-content p { 
    font-size: 1rem; 
  }
  
  .hero-search {
    padding: 20px;
    margin: 12px auto 0;
  }
  
  .search-form {
    gap: 14px;
  }
  
  .search-form input, 
  .search-form select {
    padding: 12px 14px;
    font-size: 0.9rem;
  }
  
  .search-field label {
    font-size: 0.8rem;
  }
  
  .property-card .property-features {
    gap: 12px;
  }
  
  .property-details-section .property-features {
    margin-bottom: 24px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .filters-container {
    padding: 20px;
  }
  
  .properties-grid {
    gap: 16px;
  }
  
  .property-card .property-content {
    padding: 16px;
  }
  
  .property-card .property-price {
    font-size: 1.5rem;
  }
  
  .property-card .property-title {
    font-size: 1rem;
  }
  
  .property-card .property-features {
    gap: 10px;
  }
  
  .property-card .property-features span {
    font-size: 0.85rem;
  }
  
  .property-card .property-footer {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  
  .property-card .property-footer .property-price {
    font-size: 1.5rem;
  }
  
  .property-card .property-footer .btn {
    width: 100%;
  }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* ==========================================================================
   WordPress Specific
   ========================================================================== */
.alignleft { float: left; margin-right: var(--spacing-lg); }
.alignright { float: right; margin-left: var(--spacing-lg); }
.aligncenter { display: block; margin: 0 auto var(--spacing-lg); }

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  text-align: center;
  margin-top: var(--spacing-sm);
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ==========================================================================
   Page Header (for About, Contact, etc.)
   ========================================================================== */
.page-header {
  color: white;
  padding: 120px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Default gradient background - ONLY when NO image */
.page-header:not(.has-background-image) {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

/* Decorative wave pattern (only when no background image) */
.page-header:not(.has-background-image)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
  background-size: cover;
  opacity: 0.3;
  z-index: 0;
}

/* Background image styles - ONLY when image is present */
.page-header.has-background-image {
  /* Don't set background: none - it blocks inline background-image style */
  background-color: transparent !important;
  /* Inline style will set background-image, don't override it */
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed;
}

/* Remove wave pattern when image is present */
.page-header.has-background-image::before {
  /* Override wave pattern with dark overlay */
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(2, 6, 23, 0.55), rgba(2, 6, 23, 0.55)) !important;
  background-image: none !important;
  z-index: 1;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header.has-background-image .container {
  z-index: 2;
}

.page-header-content h1 {
  font-size: 3rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  text-shadow: 0 4px 12px rgba(0,0,0,.3);
  color: white;
}

.page-header-content p {
  font-size: 1.25rem;
  opacity: .9;
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
}

/* Stats Section */
.stats-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  padding: 80px 0;
  color: white;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.stat-card {
  text-align: center;
  padding: 32px 16px;
  background: rgba(255,255,255,.1);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.2);
}

.stat-number {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: white;
}

.stat-label {
  font-size: 1rem;
  opacity: .9;
  font-weight: 500;
  color: var(--text-light);
}

/* Story Grid */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-top: 48px;
}

.story-content p {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 24px;
  color: var(--text-light);
}

.story-image img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 40px rgba(2,6,23,.1);
}

/* Awards Section */
.awards-section {
  padding: 80px 0;
  background: var(--bg-light);
}

.awards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.award-card {
  text-align: center;
  padding: 40px 32px;
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 30px rgba(2,6,23,.08);
  border: 1px solid rgba(2,6,23,.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.award-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(2,6,23,.12);
}

.award-logo {
  font-size: 4rem;
  margin-bottom: 16px;
}

.award-card h3 {
  font-size: var(--font-size-xl);
  margin-bottom: 8px;
  color: var(--text-color);
}

.award-card p {
  color: var(--text-light);
  margin-bottom: 0;
}

/* Contact Section */
.contact-section {
  padding: 60px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 48px;
  min-height: 150vh;
}

.contact-form-container {
  position: sticky !important;
  top: 80px !important;
  height: fit-content;
  z-index: 10;
}

.contact-form-container h2 {
  font-size: 1.75rem;
  margin: 0 0 24px 0;
  color: var(--text-color);
  font-weight: 600;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-color);
  font-size: var(--font-size-base);
}

.contact-info-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 24px;
  box-shadow: 0 8px 24px rgba(2,6,23,.06);
  border: 1px solid rgba(2,6,23,.05);
}

.info-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.info-card h3 {
  font-size: var(--font-size-lg);
  margin-bottom: 12px;
  color: var(--text-color);
}

.info-card p {
  color: var(--text-light);
  margin-bottom: 0;
}

.info-card a {
  color: var(--primary-color);
  text-decoration: none;
}

.info-card a:hover {
  text-decoration: underline;
}

.social-contact .social-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.social-contact .social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-contact .social-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

/* Map Section */
.map-section {
  padding: 60px 0;
  background: var(--bg-light);
}

.map-section h2 {
  text-align: center;
  margin-bottom: 32px;
  color: var(--text-color);
}

.map-container {
  width: 100% !important;
  height: 500px !important;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(2,6,23,.08);
  background: #f5f5f5;
  position: relative !important;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--border-radius-lg);
}

#contact-map {
  width: 100% !important;
  height: 100% !important;
  min-height: 500px !important;
  border-radius: var(--border-radius-lg);
  position: relative !important;
  display: block !important;
}

/* FAQ Section */
.faq-section {
  padding: 80px 0;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.faq-item {
  background: white;
  padding: 32px;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 24px rgba(2,6,23,.06);
  border-left: 4px solid var(--primary-color);
  border-top: 1px solid rgba(2,6,23,.05);
  border-right: 1px solid rgba(2,6,23,.05);
  border-bottom: 1px solid rgba(2,6,23,.05);
}

.faq-item h3 {
  font-size: var(--font-size-lg);
  margin-bottom: 12px;
  color: var(--text-color);
}

.faq-item p {
  color: var(--text-light);
  margin-bottom: 0;
  line-height: 1.7;
}

/* Responsive for Page Sections */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .awards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-form-container {
    position: static !important;
    top: auto !important;
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .page-header {
    padding: 80px 0 60px;
  }
  
  .page-header-content h1 {
    font-size: 2rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .story-grid {
    grid-template-columns: 1fr;
  }
  
  .awards-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-form .form-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Contact Form 7 Styles
   ========================================================================== */
.wpcf7-form {
  margin: 0;
  padding: 0;
}

.wpcf7-form p {
  margin-bottom: 20px;
}

.wpcf7-form label,
.contact-form-container .wpcf7-form label {
  display: block !important;
  font-weight: 500 !important;
  margin-bottom: 8px !important;
  color: var(--text-color) !important;
  font-size: var(--font-size-base) !important;
}

/* Contact Form 7 - Override plugin styles with higher specificity */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form select,
.wpcf7-form textarea,
.contact-form-container .wpcf7-form input[type="text"],
.contact-form-container .wpcf7-form input[type="email"],
.contact-form-container .wpcf7-form input[type="tel"],
.contact-form-container .wpcf7-form input[type="url"],
.contact-form-container .wpcf7-form select,
.contact-form-container .wpcf7-form textarea,
.contact-form-container input[type="text"],
.contact-form-container input[type="email"],
.contact-form-container input[type="tel"],
.contact-form-container select,
.contact-form-container textarea {
  width: 100% !important;
  padding: 12px 16px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  font-size: 1rem !important;
  font-family: inherit !important;
  transition: border-color 0.2s ease !important;
  background: white !important;
  color: var(--text-color) !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form input[type="tel"]:focus,
.wpcf7-form input[type="url"]:focus,
.wpcf7-form select:focus,
.wpcf7-form textarea:focus,
.contact-form-container .wpcf7-form input[type="text"]:focus,
.contact-form-container .wpcf7-form input[type="email"]:focus,
.contact-form-container .wpcf7-form input[type="tel"]:focus,
.contact-form-container .wpcf7-form input[type="url"]:focus,
.contact-form-container .wpcf7-form select:focus,
.contact-form-container .wpcf7-form textarea:focus,
.contact-form-container input[type="text"]:focus,
.contact-form-container input[type="email"]:focus,
.contact-form-container input[type="tel"]:focus,
.contact-form-container select:focus,
.contact-form-container textarea:focus,
.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
  outline: none !important;
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 3px rgba(91, 99, 255, 0.1) !important;
}

.wpcf7-form textarea,
.contact-form-container .wpcf7-form textarea,
.contact-form-container textarea,
.wpcf7 textarea {
  resize: vertical !important;
  min-height: 200px !important;
  line-height: 1.6 !important;
}

.wpcf7-form select,
.contact-form-container .wpcf7-form select,
.contact-form-container select,
.wpcf7 select {
  cursor: pointer !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 12px !important;
  padding-right: 40px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

.wpcf7-form input[type="submit"],
.wpcf7-form .wpcf7-submit,
.contact-form-container .wpcf7-form input[type="submit"],
.contact-form-container .wpcf7-form .wpcf7-submit,
.contact-form-container input[type="submit"],
.wpcf7 input[type="submit"],
.wpcf7 .wpcf7-submit {
  width: 100% !important;
  padding: 10px 16px !important;
  background: var(--primary-color) !important;
  color: white !important;
  border: none !important;
  border-radius: 12px !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  text-transform: none !important;
  font-family: inherit !important;
  box-shadow: none !important;
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-form .wpcf7-submit:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(91, 99, 255, 0.3);
}

.wpcf7-form input[type="submit"]:active,
.wpcf7-form .wpcf7-submit:active {
  transform: translateY(0);
}

.wpcf7-form input[type="submit"]:disabled,
.wpcf7-form .wpcf7-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Validation Styles */
.wpcf7-not-valid-tip {
  color: #dc2626;
  font-size: var(--font-size-sm);
  margin-top: 4px;
  display: block;
}

.wpcf7-not-valid {
  border-color: #dc2626 !important;
}

.wpcf7-validation-errors {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.wpcf7-mail-sent-ok {
  background: #d1fae5;
  border: 1px solid #86efac;
  color: #065f46;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.wpcf7-mail-sent-ng,
.wpcf7-aborted {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
}

.wpcf7-spinner {
  margin-left: 8px;
  vertical-align: middle;
}

/* Loading State */
.wpcf7-form.submitting .wpcf7-submit {
  opacity: 0.7;
  cursor: wait;
}

/* Contact Form 7 - Form Row Structure (matching HTML layout) */
.contact-form-container .wpcf7-form {
  display: flex;
  flex-direction: column;
}

.contact-form-container .wpcf7-form p {
  margin-bottom: 20px;
}

.contact-form-container .wpcf7-form p:last-child {
  margin-bottom: 0;
}

/* Create two-column layout for form fields - Desktop */
@media (min-width: 769px) {
  .contact-form-container .wpcf7-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  
  /* First row: Name and Email */
  .contact-form-container .wpcf7-form p:nth-of-type(1),
  .contact-form-container .wpcf7-form p:nth-of-type(2) {
    display: block;
    width: 100%;
    margin-right: 0;
  }
  
  /* Second row: Phone and Subject */
  .contact-form-container .wpcf7-form p:nth-of-type(3),
  .contact-form-container .wpcf7-form p:nth-of-type(4) {
    display: block;
    width: 100%;
    margin-right: 0;
  }
  
  /* Message textarea - full width */
  .contact-form-container .wpcf7-form p:nth-of-type(5) {
    grid-column: 1 / -1;
    width: 100%;
  }
  
  /* Submit button - full width */
  .contact-form-container .wpcf7-form p:has(input[type="submit"]),
  .contact-form-container .wpcf7-form p:has(.wpcf7-submit),
  .contact-form-container .wpcf7-form p:last-child {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .wpcf7-form input[type="text"],
  .wpcf7-form input[type="email"],
  .wpcf7-form input[type="tel"],
  .wpcf7-form select,
  .wpcf7-form textarea {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .contact-form-container .wpcf7-form p {
    display: block !important;
    width: 100% !important;
    margin-right: 0 !important;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  .site-header,
  .site-footer,
  .btn {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
}
