/**
 * Millenium Home Theme Styles
 * 
 * Note: This is a simplified CSS file. For full SCSS compilation,
 * use the original SCSS files from the React version.
 */
@font-face {
  font-family: "Font Awesome 6 Solid";
  src: url("../fonts/fontawesome/fa-solid-900.woff2") format("woff2"),
       url("../fonts/fontawesome/fa-solid-900.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Font Awesome 6 Brands";
  src: url("../fonts/fontawesome/fa-brands-400.woff2") format("woff2"),
       url("../fonts/fontawesome/fa-brands-400.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Font Awesome icon classes - use local fonts */
.fas,
.fa-solid {
  font-family: "Font Awesome 6 Solid" !important;
  font-weight: 900;
  font-style: normal;
}

.fab,
.fa-brands {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400;
  font-style: normal;
}

/* ============================================
   Variables (CSS Custom Properties)
   ============================================ */
:root {
  --bg: #0F1012;
  --surface: #1A1B1F;
  --surface-2: #24262B;
  --text: #EAEAEA;
  --muted: #9A9CA3;
  --line: #2F3136;
  --gold-1: #2BB6F2;
  --gold-2: #0A91D1;
  --gold-3: #0A5F8A;
  --blue-accent: #2A6DF2;
}

/* ============================================
   Base Styles
   ============================================ */
body {
  background-color: var(--bg);
  /* Background pattern is generated via CSS gradients in body::before */
  min-height: 100vh;
  color: var(--text);
  font-family: 'Lato', sans-serif;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    /* Subtle diagonal lines */
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 80px,
      rgba(43, 182, 242, 0.02) 80px,
      rgba(43, 182, 242, 0.02) 81px,
      transparent 81px,
      transparent 160px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 80px,
      rgba(10, 145, 209, 0.02) 80px,
      rgba(10, 145, 209, 0.02) 81px,
      transparent 81px,
      transparent 160px
    ),
    /* Subtle dots pattern */
    radial-gradient(
      circle at 50% 50%,
      rgba(43, 182, 242, 0.04) 1px,
      transparent 1px
    ),
    radial-gradient(
      circle at 25% 25%,
      rgba(10, 145, 209, 0.03) 1px,
      transparent 1px
    );
  background-size: 
    160px 160px,
    160px 160px,
    40px 40px,
    60px 60px;
  background-position: 
    0 0,
    0 0,
    0 0,
    0 0;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

body.home {
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  height: 100vh !important;
  width: 100vw !important;
}

body.home html {
  margin: 0 !important;
  padding: 0 !important;
  height: 100% !important;
  overflow: hidden !important;
}

body.home #page,
body.home .site {
  margin: 0 !important;
  padding: 0 !important;
  height: 100vh !important;
  width: 100vw !important;
  display: block !important;
  position: relative !important;
  max-width: none !important;
}

/* Prevent horizontal scroll on pages with sidebar */
#page.site {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Hide skip-link visually but keep for screen readers */
.skip-link.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px) !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  word-wrap: normal !important;
}

.skip-link.screen-reader-text:focus {
  position: fixed !important;
  top: 5px !important;
  left: 5px !important;
  z-index: 999999 !important;
  clip: auto !important;
  width: auto !important;
  height: auto !important;
  padding: 8px 16px !important;
  background: var(--gold-1) !important;
  color: var(--bg) !important;
  text-decoration: none !important;
  border-radius: 4px !important;
}

body.home .skip-link {
  display: none !important;
}

/* Reset WordPress default styles for home page */
body.home * {
  box-sizing: border-box;
}

/* Remove WordPress admin bar spacing if present */
body.home.admin-bar .home-layout {
  top: 0 !important;
}

body.home.admin-bar {
  padding-top: 0 !important;
}

/* Ensure home-layout is direct child and fills viewport */
body.home > .home-layout,
body.home #page > .home-layout,
body.home .site > .home-layout {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
}

/* ============================================
   Layout
   ============================================ */
.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-layout-wrapper {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.app-sidebar {
  width: 300px;
  flex-shrink: 0;
  padding: 2rem 1.5rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(43, 182, 242, 0.2);
  background-color: var(--bg);
  /* Background pattern is generated via CSS gradients */
  display: flex;
  flex-direction: column;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.app-sidebar {
  display: none !important;
  width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

/* Mobile menu toggle is hidden by default, shown on mobile via media queries */

.app-sidebar::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

@media (max-width: 991px) {
  .app-sidebar {
    display: none;
  }
  
  .app-mobile-menu-toggle {
    display: flex;
  }
  
  .hero-mobile-menu-toggle {
    display: flex;
  }
}

.app-content {
  flex: 1;
  padding: 2rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  max-width: 100%;
  box-sizing: border-box;
}

.app-content-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 991px) {
  .app-content {
    padding: 1rem;
    padding-top: 0.5rem; /* Reduce top padding when mobile-top-bar is present */
  }
  
  .app-content-wrapper {
    padding: 0 1rem;
    padding-top: 0.5rem; /* Add top padding to account for mobile-top-bar */
  }
  
  /* Add margin-top when mobile-top-bar is present */
  .mobile-top-bar ~ .app-container .app-content {
    padding-top: 0.5rem;
  }
  
  .mobile-top-bar ~ .app-container .app-content-wrapper {
    padding-top: 0.5rem;
  }
}

.app-content-listings {
  flex: 1;
  min-width: 0;
}

/* ============================================
   Home Page Layout
   ============================================ */
body.home {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.home-layout {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg);
  /* Background pattern is generated via CSS gradients */
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-rows: 80px 1fr;
  grid-template-areas:
    "sidebar topbar"
    "sidebar grid";
  margin: 0;
  padding: 0;
  overflow: hidden;
}

@media (max-width: 991px) {
  .home-layout {
    grid-template-columns: 1fr;
    grid-template-rows: 60px 1fr;
    grid-template-areas:
      "topbar"
      "grid";
  }
}

.home-topbar {
  grid-area: topbar;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 2rem;
  border-bottom: 1px solid rgba(43, 182, 242, 0.2);
  background-color: var(--bg);
  /* Background pattern is generated via CSS gradients */
  z-index: 10;
  margin: 0;
  height: 80px;
  box-sizing: border-box;
}

.home-hamburger-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--gold-1);
  color: var(--gold-1);
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.home-hamburger-btn:hover {
  background: rgba(43, 182, 242, 0.1);
}

@media (max-width: 991px) {
  .home-hamburger-btn {
    display: flex;
  }
}

.home-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.home-newsletter-btn {
  background: transparent;
  border: 1px solid var(--gold-1);
  color: var(--gold-1);
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.home-icon-btn {
  background: transparent;
  border: 1px solid var(--gold-1);
  color: var(--gold-1);
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-newsletter-btn:hover,
.home-icon-btn:hover {
  background: rgba(43, 182, 242, 0.1);
}

.home-sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem;
  border-right: 1px solid rgba(43, 182, 242, 0.2);
  gap: 0.5rem;
  background-color: var(--bg);
  /* Background pattern is generated via CSS gradients */
  overflow-y: auto;
  height: 100%;
  width: 300px;
  box-sizing: border-box;
  margin: 0;
}

.home-sidebar-logo {
  text-align: center;
  padding-bottom: 1.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(43, 182, 242, 0.2);
}

.home-sidebar-logo a {
  display: inline-block;
  text-decoration: none;
  transition: all 0.3s ease;
}

.home-sidebar-logo a:hover {
  opacity: 0.8;
}

.home-sidebar-logo img {
  max-width: 180px;
  height: auto;
}

.home-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* WordPress Menu Structure */
.home-sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.home-sidebar-nav ul li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-sidebar-nav ul li a {
  display: block;
  padding: 0.875rem 1rem;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  background-color: var(--surface-2);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.home-sidebar-nav ul li a:hover {
  background-color: rgba(36, 38, 43, 0.8);
  border-color: var(--gold-1);
  color: var(--gold-1);
}

.home-sidebar-nav ul li.current-menu-item > a,
.home-sidebar-nav ul li.current_page_item > a,
.home-sidebar-nav ul li.current_page_ancestor > a {
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  color: #fff;
  border-color: transparent;
}

/* Fallback menu items (when wp_nav_menu is not used) */
.home-sidebar-item {
  display: block;
  padding: 0.875rem 1rem;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  background-color: var(--surface-2);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.home-sidebar-item:hover {
  background-color: rgba(36, 38, 43, 0.8);
  border-color: var(--gold-1);
  color: var(--gold-1);
}

.home-sidebar-item.active {
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  color: #fff;
  border-color: transparent;
}

.home-grid {
  grid-area: grid;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  min-height: 0;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.home-grid > * {
  margin: 0;
}

@media (max-width: 991px) {
  .home-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
  }
  
  .home-grid-item .home-grid-overlay h2 {
    font-size: 2rem;
  }
  
  /* Hide center logo on mobile */
  .home-center-logo {
    display: none;
  }
}

.home-grid-item {
  position: relative;
  overflow: hidden; /* Prevent scrollbar on hover */
  display: block;
  border: 2px solid var(--gold-1);
  min-height: 0;
  text-decoration: none;
  height: 100%;
  width: 100%;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.home-grid-item::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.home-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  display: block;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.home-grid-item img::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.home-grid-item:hover img {
  transform: scale(1.05);
}

.home-grid-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 16, 18, 0.7) 0%, rgba(26, 27, 31, 0.5) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.home-grid-overlay h2 {
  color: white;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  text-align: center;
}

@media (max-width: 1400px) {
  .home-grid-overlay h2 {
    font-size: 1.5rem;
  }
}

.home-center-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 16, 18, 0.95);
  border: 2px solid var(--gold-1);
  padding: 2rem;
  pointer-events: auto;
  z-index: 10;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.home-center-logo a {
  display: inline-block;
  text-decoration: none;
  transition: all 0.3s ease;
}

.home-center-logo a:hover {
  opacity: 0.8;
}

.home-center-logo img {
  max-width: 250px;
  height: auto;
  display: block;
}

/* Mobile Menu */
.home-mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.home-mobile-menu-overlay.active {
  display: flex;
}

.home-mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100vh;
  background-color: var(--bg);
  /* Background pattern is generated via CSS gradients */
  padding: 2rem 1.5rem;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
}

.home-mobile-menu-header {
  display: none !important; /* Ukryj cały header, bo przycisk X jest ukryty */
}

.home-mobile-menu-header a {
  display: inline-block;
  text-decoration: none;
  transition: all 0.3s ease;
}

.home-mobile-menu-header a:hover {
  opacity: 0.8;
}

.home-mobile-menu-header img {
  max-width: 150px;
  height: auto;
}

.home-mobile-menu-close {
  display: none !important; /* Ukryj przycisk X */
}

.home-mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* WordPress Menu Structure for Mobile */
.home-mobile-menu-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.home-mobile-menu-nav ul li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-mobile-menu-nav ul li a {
  display: block;
  padding: 0.875rem 1rem;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  background-color: var(--surface-2);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.home-mobile-menu-nav ul li a:hover {
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  color: #fff;
  border-color: transparent;
}

.home-mobile-menu-nav ul li.current-menu-item > a,
.home-mobile-menu-nav ul li.current_page_item > a,
.home-mobile-menu-nav ul li.current_page_ancestor > a {
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  color: #fff;
  border-color: transparent;
}

/* Fallback menu items (when wp_nav_menu is not used) */
.home-mobile-menu-item {
  display: block;
  padding: 0.875rem 1rem;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  background-color: var(--surface-2);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.home-mobile-menu-item:hover,
.home-mobile-menu-item.active {
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  color: #fff;
  border-color: transparent;
}

@media (max-width: 991px) {
  .home-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "topbar"
      "grid";
  }
  
  .home-topbar {
    justify-content: space-between;
    padding: 0 1rem;
  }
  
  .home-sidebar {
    display: none;
  }
}


/* ============================================
   Components
   ============================================ */

.site-header {
  margin: 0;
  padding: 0;
  border: 0;
}

/* Gold Bar */
.gold-bar {
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  border-radius: 0.25rem;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

.gold-bar h1,
.gold-bar h2,
.gold-bar h3 {
  margin: 0;
  font-weight: 800;
  color: #fff;
}

.listings-page-header {
  padding-top: 2rem;
}

@media (max-width: 991px) {
  .listings-page-header {
    padding-top: 1.25rem;
  }
}

/* Card Elevated */
.card-elevated {
  background-color: var(--surface);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.5rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
  overflow-x: hidden; /* Prevent horizontal overflow */
  word-wrap: break-word; /* Break long words */
}

.card-elevated:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}

/* Side Menu */
.side-menu {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.side-menu-logo {
  text-align: center;
  padding-bottom: 1.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(43, 182, 242, 0.2);
}

.side-menu-logo a {
  display: inline-block;
  text-decoration: none;
  transition: all 0.3s ease;
}

.side-menu-logo a:hover {
  opacity: 0.8;
}

.side-menu-logo img {
  max-width: 180px;
  height: auto;
}

.side-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.side-menu-item {
  display: block;
  padding: 0.875rem 1rem;
  text-align: center;
  color: var(--text);
  text-decoration: none;
  background-color: var(--surface-2);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.side-menu-item:hover {
  background-color: rgba(36, 38, 43, 0.8);
  border-color: var(--gold-1);
  color: var(--gold-1);
}

.side-menu-item.active {
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  color: #fff;
  border-color: transparent;
}

/* Property Card */
.property-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.property-image {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem 0.5rem 0 0;
  aspect-ratio: 16 / 9;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.property-image::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.property-image img::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

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

.badge-flag {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 2;
}

.property-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
}

.property-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.property-title a {
  color: inherit;
  text-decoration: none;
}

.property-title a:hover {
  color: var(--gold-1);
}

.property-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-1);
  margin-bottom: 1rem;
}

.property-content .btn {
  margin-top: auto;
}

/* Listing Grid */
.listing-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  overflow: hidden; /* Prevent scrollbar on hover */
}

.listing-item {
  grid-column: span 12;
  overflow: hidden; /* Prevent scrollbar on hover */
}

@media (min-width: 768px) {
  .listing-item {
    grid-column: span 6;
  }
}

@media (min-width: 992px) {
  .listing-item {
    grid-column: span 4;
  }
}

/* Listings Layout */
.listings-layout {
  display: flex;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

body.page-template-page-listings .listings-layout,
body.page-listings .listings-layout,
body.page-nieruchomosci .listings-layout {
  padding-top: 1.35rem;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .listings-layout {
    flex-direction: column;
  }
}

.listings-sidebar {
  width: 300px;
  background: transparent;
  color: var(--text);
  padding: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

body.page-template-page-listings .listings-sidebar,
body.page-listings .listings-sidebar,
body.page-nieruchomosci .listings-sidebar {
  padding-top: 0.85rem;
}

.listings-sidebar::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

@media (max-width: 1024px) {
  .listings-sidebar {
    position: static;
    height: auto;
    width: 100%;
  }
}

.sidebar-logo {
  display: block;
  text-align: center;
  margin: 0;
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
}

.page-nieruchomosci .sidebar-logo,
.page-listings .sidebar-logo,
.page-template-page-listings .sidebar-logo {
  display: none !important;
}

.sidebar-logo img {
  max-width: 180px;
  height: auto;
}

.category-grid,
.transaction-buttons,
.market-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin: 0 1rem 0.5rem 1rem;
}

.category-btn,
.transaction-btn,
.market-btn {
  padding: 0.625rem 0.75rem;
  background-color: var(--surface-2);
  border: 1px solid rgba(43, 182, 242, 0.35);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  border-radius: 0.25rem;
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.3;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.category-btn:hover,
.transaction-btn:hover,
.market-btn:hover {
  background-color: rgba(36, 38, 43, 0.8);
  color: var(--gold-1);
}

.category-btn.active,
.transaction-btn.active,
.market-btn.active {
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  border-color: transparent;
  color: #fff;
}

.listings-content {
  flex: 1;
  padding: 2rem;
  background-color: var(--bg);
  /* Background pattern is generated via CSS gradients */
  min-height: 100vh;
  color: var(--text);
}

/* Location Filter */
.location-filter {
  margin: 0 1rem 0.5rem 1rem;
}

.location-dropdown-btn {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background-color: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  border-radius: 0.25rem;
  letter-spacing: 0.5px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.location-dropdown-btn:hover {
  background-color: rgba(36, 38, 43, 0.8);
  border-color: var(--gold-1);
}

.location-dropdown-btn i {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
  color: var(--gold-1);
}

.location-dropdown-btn:hover i {
  color: var(--gold-1);
}

.location-checkboxes {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-top: 0.5rem;
  background-color: var(--surface);
  border: 1px solid rgba(43, 182, 242, 0.2);
  border-radius: 0.25rem;
  padding: 0;
}

.location-checkboxes.active {
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.location-checkboxes.active::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.location-checkbox-label {
  display: flex;
  align-items: center;
  padding: 0.375rem 0;
  cursor: pointer;
  color: var(--text);
  font-size: 0.75rem;
  transition: color 0.2s ease;
}

.location-checkbox-label:hover {
  color: var(--gold-1);
}

.location-checkbox-label input[type="checkbox"] {
  margin-right: 0.75rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--gold-1);
}

/* Advanced Search Form */
.advanced-search-wrapper {
  margin: 0 1rem 0.5rem 1rem;
}

.advanced-search-toggle {
  width: 100%;
  padding: 0.625rem 0.75rem;
  background-color: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  border-radius: 0.25rem;
  letter-spacing: 0.5px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.advanced-search-toggle:hover {
  background-color: rgba(36, 38, 43, 0.8);
  border-color: var(--gold-1);
}

.advanced-search-toggle i {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
  color: var(--gold-1);
}

.advanced-search-toggle:hover i {
  color: var(--gold-1);
}

.advanced-search-form {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-top: 0.5rem;
  background-color: var(--surface);
  border: 1px solid rgba(43, 182, 242, 0.2);
  border-radius: 0.25rem;
  padding: 0;
}

.advanced-search-form.active {
  max-height: none;
  padding: 0.6rem;
  overflow: visible;
  /* Hide scrollbar if any */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.advanced-search-form.active::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Ensure form content doesn't overflow */
.advanced-search-form.active * {
  max-width: 100%;
  box-sizing: border-box;
}

.search-field {
  margin-bottom: 0.5rem;
}

.search-field label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-field input[type="text"],
.search-field input[type="number"] {
  width: 100%;
  padding: 0.45rem 0.5rem;
  background-color: var(--surface-2);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.25rem;
  color: var(--text);
  font-size: 0.7rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.search-field input[type="text"]:focus,
.search-field input[type="number"]:focus {
  outline: none;
  border-color: var(--gold-1);
  background-color: rgba(36, 38, 43, 0.8);
}

.search-field-range {
  margin-bottom: 0.5rem;
}

.search-field-range label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.range-inputs {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  width: 100%;
}

.range-inputs input[type="number"] {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.5rem;
  background-color: var(--surface-2);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.25rem;
  color: var(--text);
  font-size: 0.7rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.range-inputs input[type="number"]:focus {
  outline: none;
  border-color: var(--gold-1);
  background-color: rgba(36, 38, 43, 0.8);
}

.range-inputs span {
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: lowercase;
  min-width: 20px;
  max-width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.search-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
}

.search-checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  color: var(--text);
  font-size: 0.75rem;
  transition: color 0.2s ease;
}

.search-checkbox-label:hover {
  color: var(--gold-1);
}

.search-checkbox-label input[type="checkbox"] {
  margin-right: 0.75rem;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--gold-1);
}

.search-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.search-submit-btn {
  width: 100%;
  padding: 0.5rem 0.625rem;
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  border: none;
  border-radius: 0.25rem;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-submit-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.search-clear-btn {
  width: 100%;
  padding: 0.5rem 0.625rem;
  background-color: transparent;
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.25rem;
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  text-align: center;
  display: inline-block;
  transition: all 0.3s ease;
}

.search-clear-btn:hover {
  background-color: rgba(36, 38, 43, 0.8);
  border-color: var(--gold-1);
  color: var(--gold-1);
}

/* Agent Card */
.agent-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
}

.agent-photo {
  flex-shrink: 0;
  width: 120px;
  height: 170px;
  border-radius: 0;
  overflow: hidden;
  border: 2px solid rgba(43, 182, 242, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.agent-name {
  color: var(--gold-1);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.agent-role {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.agent-contact a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.agent-contact a:hover {
  color: var(--gold-1);
}

.agent-bio {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-top: 1rem;
}

.team-members-wrapper {
  padding: 2rem 0;
}

.team-members-wrapper .agent-card {
  background: var(--bg-dark);
  border: 1px solid rgba(43, 182, 242, 0.2);
  border-radius: 8px;
}

.team-members-wrapper .agent-card:hover {
  border-color: rgba(43, 182, 242, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* KPI Box */
.kpi {
  text-align: center;
  padding: 1.5rem;
}

.kpi i {
  font-size: 2.5rem;
  color: var(--gold-1);
  margin-bottom: 1rem;
  display: block;
}

.kpi-title {
  color: var(--gold-1);
  font-weight: 700;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

/* KPI Section Title */
.kpi-section-title {
  color: var(--gold-1) !important;
}

/* About Section Image */
.about-section .team-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: 0.5rem;
}

.kpi-text {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Career Grid */
.career-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* Center last item if odd number - Desktop only */
.career-grid .career-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  max-width: 50%;
  margin: 0 auto;
}

.career-item {
  padding: 2rem;
  text-align: center;
}

@media (max-width: 991px) {
  .career-grid {
    grid-template-columns: 1fr;
    gap: 1rem; /* Reduce gap on mobile */
  }
  
  /* Reset last item centering on mobile - all items should be full width */
  .career-grid .career-item:last-child:nth-child(odd) {
    grid-column: 1;
    max-width: 100%;
    margin: 0;
  }
  
  .career-item {
    padding: 1.5rem; /* Reduce padding on mobile */
    width: 100%;
    box-sizing: border-box;
  }
  
  .career-item i {
    font-size: 2.5rem; /* Slightly smaller icons on mobile */
    margin-bottom: 0.75rem;
  }
  
  .career-item h3 {
    font-size: 1.125rem; /* Slightly smaller title on mobile */
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
  
  .career-item p {
    font-size: 0.9rem; /* Slightly smaller text on mobile */
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
  }
}

.career-item i {
  font-size: 3rem;
  color: var(--gold-1);
  margin-bottom: 1rem;
  display: block;
}

.career-item h3 {
  color: var(--gold-1);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.career-cta-title {
  color: var(--gold-1) !important;
}

.career-item p {
  color: var(--muted);
  margin: 0;
}

/* Property Detail */
.property-detail-sidebar {
  position: sticky;
  top: 2rem;
}

.property-agent-card {
  text-align: center;
  padding: 1rem 0;
}

.property-agent-photo {
  width: 140px;
  height: 140px;
  min-width: 140px;
  min-height: 140px;
  max-width: 140px;
  max-height: 140px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.25rem;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(135deg, rgba(43, 182, 242, 0.1) 0%, rgba(10, 145, 209, 0.05) 100%);
  display: inline-block;
  box-sizing: border-box;
  border: 3px solid rgba(43, 182, 242, 0.3);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3), 0 0 0 4px rgba(43, 182, 242, 0.1);
  transition: all 0.3s ease;
}

.property-agent-photo:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(43, 182, 242, 0.2), 0 0 0 4px rgba(43, 182, 242, 0.15);
  border-color: rgba(43, 182, 242, 0.5);
}

.property-agent-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
  padding: 0;
}

.property-agent-info {
  margin-bottom: 1rem;
}

.property-agent-info h4 {
  color: #2BB6F2;
  margin-bottom: 0.375rem;
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.property-agent-info p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  font-weight: 600;
}

.property-spec-card {
  background-color: var(--surface);
}

.property-spec-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.property-spec-item {
  gap: 1rem;
}

.property-spec-icon {
  width: 42px;
  min-width: 42px;
  height: 42px;
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.5rem;
  background-color: var(--surface-2);
  color: var(--gold-1);
  font-size: 1rem;
  flex-shrink: 0;
}

.property-spec-content {
  flex: 1;
}

.property-spec-label {
  color: var(--muted) !important;
  letter-spacing: 0.02em;
}

.property-spec-value {
  color: #fff !important;
  line-height: 1.4;
  white-space: pre-line;
}

.property-price-display {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(43, 182, 242, 0.25);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  text-align: center;
}

.property-price-value {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.property-price-value span {
  font-size: 1.15rem;
  margin-left: 0.25rem;
  color: var(--muted);
}

.property-price-meta {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-1);
  font-weight: 600;
}

.property-map-wrapper {
  margin: 2rem 0;
}

.property-map-wrapper:last-child {
  margin-bottom: 0;
}

.property-map-inner {
  position: relative;
  background: linear-gradient(135deg, rgba(15, 16, 18, 0.85), rgba(26, 27, 31, 0.9));
  border: 1px solid rgba(43, 182, 242, 0.25);
  border-radius: 0.75rem;
  padding: 0.75rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.property-map-inner iframe {
  width: 100% !important;
  height: 380px !important;
  border: 0;
  border-radius: 0.5rem;
  display: block;
  filter: grayscale(0.05);
}

@media (max-width: 767px) {
  .property-map-inner iframe {
    height: 300px !important;
  }
}

/* Property Detail Page Styles */
.property-detail-page {
  padding: 2rem 0;
  min-height: 100vh;
  background-color: var(--bg);
  /* Background pattern is generated via CSS gradients */
}

.property-detail-page .app-content-wrapper {
  padding-top: 1.35rem;
}

.property-detail-gallery {
  margin-bottom: 2rem;
}

.property-detail-gallery .main-image {
  width: 100%;
  border-radius: 0.5rem;
  overflow: hidden;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.property-detail-gallery .main-image::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.property-detail-gallery .main-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.property-detail-gallery .main-image img::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.property-section-title {
  color: var(--gold-1) !important;
}

.property-agent-name {
  color: #2BB6F2 !important;
}

.property-icon {
  color: #2BB6F2 !important;
}

.property-agent-contact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.property-agent-contact .icon-text {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  width: 100%;
  max-width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  transition: color 0.3s ease;
  text-align: left;
  box-sizing: border-box;
}

.property-agent-contact .icon-text:hover {
  background: transparent;
  border: none;
  transform: none;
}

.property-agent-contact .icon-text i {
  color: #2BB6F2;
  font-size: 0.9rem;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  border: none;
  color: #fff;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border-radius: 0.25rem;
}

.btn-primary:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #fff;
}

.btn-outline-light {
  background: transparent;
  border: 1px solid rgba(43, 182, 242, 0.35);
  color: var(--text);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border-radius: 0.25rem;
}

.btn-outline-light:hover {
  background-color: rgba(43, 182, 242, 0.1);
  border-color: var(--gold-1);
  color: var(--gold-1);
}

/* Property Gallery */
.property-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  overflow: hidden; /* Prevent scrollbar on hover */
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.property-gallery-grid::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.property-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  aspect-ratio: 1;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.property-gallery-item::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.property-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.property-gallery-item img::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

.property-gallery-item:hover img {
  transform: scale(1.05);
}

/* FooGallery compatibility */
.property-gallery-grid .foogallery,
.property-gallery-grid .foogallery-container {
  width: 100%;
}

/* Gallery styles in page content (card-elevated) */
.card-elevated img {
  max-width: 100%;
  height: auto;
  /* Hide scrollbar */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.card-elevated img::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* WordPress Gallery Block */
.card-elevated .wp-block-gallery,
.card-elevated .gallery,
.card-elevated .wp-block-image {
  max-width: 100%;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.card-elevated .wp-block-gallery .wp-block-image,
.card-elevated .gallery .gallery-item {
  max-width: 100%;
  width: auto;
}

.card-elevated .wp-block-gallery .wp-block-image img,
.card-elevated .gallery .gallery-item img {
  max-width: 100%;
  height: auto;
  width: auto;
}

/* FooGallery in content */
.card-elevated .foogallery,
.card-elevated .foogallery-container,
.card-elevated .foogallery-template-default {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box;
}

.card-elevated .foogallery .fg-item,
.card-elevated .foogallery .fg-item-inner {
  max-width: 100%;
  box-sizing: border-box;
}

.card-elevated .foogallery img {
  max-width: 100% !important;
  height: auto !important;
  width: auto !important;
  /* Hide scrollbar */
  scrollbar-width: none !important; /* Firefox */
  -ms-overflow-style: none !important; /* IE and Edge */
}

.card-elevated .foogallery img::-webkit-scrollbar {
  display: none !important; /* Chrome, Safari, Opera */
}

/* Hide scrollbars on all images globally */
img {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

img::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* Hide scrollbars on image containers */
picture,
figure,
.gallery,
.wp-block-gallery,
.foogallery,
.foogallery-container {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

picture::-webkit-scrollbar,
figure::-webkit-scrollbar,
.gallery::-webkit-scrollbar,
.wp-block-gallery::-webkit-scrollbar,
.foogallery::-webkit-scrollbar,
.foogallery-container::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Opera */
}

/* General content overflow prevention */
.card-elevated > * {
  max-width: 100%;
  box-sizing: border-box;
}

.card-elevated p,
.card-elevated div,
.card-elevated section {
  max-width: 100%;
  overflow-x: auto;
  word-wrap: break-word;
}

/* Contact Popup */
.property-contact-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10010 !important; /* Highest z-index - always on top, above mobile-top-bar (10003) and app-mobile-menu-overlay (10004) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem; /* Add padding around modal to show it's a window */
  box-sizing: border-box; /* Ensure padding is included in width/height */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}


.property-contact-popup.active {
  opacity: 1;
  visibility: visible;
  z-index: 10010 !important; /* Ensure it stays on top when active */
}

.property-contact-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.property-contact-popup-content {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.75rem;
  padding: 2.5rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(43, 182, 242, 0.1);
  transform: scale(0.9);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 10011 !important; /* Higher than popup container */
}

.property-contact-popup.active .property-contact-popup-content {
  transform: scale(1);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(43, 182, 242, 0.2);
}

.property-contact-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: color 0.3s ease;
  z-index: 10012 !important; /* Highest z-index - always visible and clickable */
}

.property-contact-popup-close:hover {
  color: var(--gold-1);
}

.property-contact-popup-title {
  color: var(--gold-1);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
  margin-top: 0;
  text-align: center;
  letter-spacing: 0.5px;
}

/* Adjust contact popup for mobile top bar - make it look like hero-contact-modal on mobile */
@media (max-width: 991px) {
  /* Force mobile-top-bar to be below modal when modal is active */
  body.property-contact-popup-active .mobile-top-bar,
  body:has(.property-contact-popup.active) .mobile-top-bar,
  .property-contact-popup.active ~ * .mobile-top-bar {
    z-index: 1000 !important;
    position: relative !important; /* Change from sticky to relative to prevent stacking issues */
  }
  
  .property-contact-popup {
    align-items: center;
    padding: 0 !important; /* No padding on mobile */
    z-index: 10010 !important; /* Ensure modal is always on top on mobile */
    position: fixed !important; /* Ensure fixed positioning */
  }
  
  .property-contact-popup.active {
    z-index: 10010 !important; /* Ensure it stays on top when active */
    pointer-events: auto !important; /* Ensure modal can receive clicks */
  }
  
  .property-contact-popup-content {
    margin: 0 !important; /* No margin on mobile */
    max-height: 90vh !important; /* Same as hero-contact-modal */
    position: relative;
    z-index: 10011 !important; /* Ensure content is above overlay */
    border-radius: 0.5rem !important; /* Same as hero-contact-modal */
    width: 90% !important; /* Same as hero-contact-modal */
    max-width: 600px !important; /* Same as hero-contact-modal */
    padding: 2rem !important; /* Same as hero-contact-modal */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important; /* Same as hero-contact-modal */
  }
  
  .property-contact-popup-title {
    font-size: 1.5rem !important; /* Same as hero-contact-modal */
    margin-bottom: 1.5rem !important; /* Same as hero-contact-modal */
    text-align: left !important; /* Same as hero-contact-modal */
    letter-spacing: 0 !important;
  }
  
  .property-contact-phone {
    margin-top: 1.5rem !important;
    padding: 1.25rem !important;
    text-align: center !important;
    background: rgba(14, 19, 28, 0.6) !important;
    border: 1px solid rgba(43, 182, 242, 0.3) !important;
    border-radius: 0.35rem !important;
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.2) !important;
    margin-bottom: 0 !important;
  }
  
  .property-contact-phone .icon-text {
    display: none !important; /* Hide icon-text on mobile */
  }
  
  .property-contact-phone::before {
    content: "Wolisz zadzwonić?";
    display: block;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    color: var(--muted);
    margin-bottom: 0.35rem;
  }
  
  .property-contact-phone-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
  }
  
  .property-contact-popup-close {
    position: absolute !important; /* Absolute position like hero-contact-modal */
    top: 1rem !important;
    right: 1rem !important;
    z-index: 10012 !important; /* Highest z-index to ensure close button is always visible */
    background: transparent !important; /* Same as hero-contact-modal */
    border-radius: 0;
    padding: 0.5rem !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 0;
  }
}

.property-contact-phone {
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(14, 19, 28, 0.8) 0%, rgba(27, 34, 47, 0.8) 100%);
  border-radius: 0.5rem;
  border: 1px solid rgba(43, 182, 242, 0.3);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
  margin-bottom: 2rem;
}

.property-contact-phone-link {
  color: var(--gold-1);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 700;
  transition: all 0.3s ease;
  display: inline-block;
}

.property-contact-phone-link:hover {
  color: #2BB6F2;
  transform: translateY(-2px);
  text-decoration: none;
}

.property-contact-form {
  margin-top: 0;
}

.property-contact-form .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.property-contact-form .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.property-contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.property-contact-form input[type="text"],
.property-contact-form input[type="email"],
.property-contact-form input[type="tel"],
.property-contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--surface-2);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.25rem;
  color: var(--text);
  font-size: 0.875rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.property-contact-form input[type="text"]:focus,
.property-contact-form input[type="email"]:focus,
.property-contact-form input[type="tel"]:focus,
.property-contact-form textarea:focus {
  outline: none;
  border-color: var(--gold-1);
  background-color: rgba(36, 38, 43, 0.8);
}

.property-contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.property-contact-form .wpcf7-submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  border: none;
  border-radius: 0.25rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.property-contact-form .wpcf7-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.property-contact-form-phone {
  margin-top: 2rem;
  padding: 1.25rem;
  text-align: center;
  background: linear-gradient(135deg, rgba(14, 19, 28, 0.6) 0%, rgba(27, 34, 47, 0.6) 100%);
  border-radius: 0.5rem;
  border: 1px solid rgba(43, 182, 242, 0.25);
}

.property-contact-form-phone-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  font-size: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.property-contact-form-phone-inner > div:first-child {
  width: 100%;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.property-contact-form-phone-inner i {
  color: var(--gold-1);
  font-size: 1.25rem;
}

.property-contact-form-phone-inner a {
  color: var(--gold-1);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.125rem;
  transition: all 0.3s ease;
}

.property-contact-form-phone-inner a:hover {
  color: #2BB6F2;
  transform: translateY(-2px);
}

/* Listing Results Info */
.listing-results-info {
  display: none;
}

/* Empty State */
.listing-empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  min-height: 400px;
}

.listing-empty-icon {
  margin-bottom: 2rem;
}

.listing-empty-icon i {
  font-size: 4rem;
  color: var(--muted);
  opacity: 0.6;
}

.listing-empty-message {
  color: var(--text);
  font-size: 1.125rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  max-width: 500px;
}

.listing-clear-filters {
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  padding: 0.875rem 2rem;
}

.property-agent-contact a {
  transition: color 0.3s ease;
  color: rgba(255, 255, 255, 0.9) !important;
  text-decoration: none;
  font-weight: 400;
  word-break: break-word;
  overflow-wrap: break-word;
  flex: 1;
  min-width: 0;
  display: inline-block;
  max-width: 100%;
}

.property-agent-contact a:hover {
  color: #2BB6F2 !important;
}

/* Contact Page */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 991px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.contact-info-panel,
.contact-form-panel {
  background-color: var(--surface);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.contact-panel-title {
  color: var(--gold-1);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  margin-top: 0;
  line-height: 1.3;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info-item {
  margin: 0;
}

.contact-icon-text {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.contact-icon-text i {
  color: var(--gold-1);
  font-size: 1.5rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
  line-height: 1.2;
}

.contact-icon-text > div {
  flex: 1;
}

.contact-icon-text strong {
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.375rem;
  line-height: 1.4;
}

.contact-text {
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
  display: block;
  line-height: 1.6;
  transition: color 0.2s ease;
}

.contact-text:hover {
  color: var(--gold-1);
}

.contact-form-wrapper {
  width: 100%;
}

/* Contact Form 7 Styling */
.contact-form-wrapper .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form-wrapper .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
  margin-bottom: 0;
}

.contact-form-wrapper label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.contact-form-wrapper input[type="text"],
.contact-form-wrapper input[type="email"],
.contact-form-wrapper input[type="tel"],
.contact-form-wrapper textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--surface-2);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.25rem;
  color: var(--text);
  font-size: 0.875rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.contact-form-wrapper input[type="text"]:focus,
.contact-form-wrapper input[type="email"]:focus,
.contact-form-wrapper input[type="tel"]:focus,
.contact-form-wrapper textarea:focus {
  outline: none;
  border-color: var(--gold-1);
  background-color: rgba(36, 38, 43, 0.8);
}

.contact-form-wrapper textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-form-wrapper .wpcf7-checkbox,
.contact-form-wrapper .wpcf7-radio {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-form-wrapper .wpcf7-list-item {
  margin: 0;
}

.contact-form-wrapper .wpcf7-list-item label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-weight: 400;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}

.contact-form-wrapper .wpcf7-list-item input[type="checkbox"],
.contact-form-wrapper .wpcf7-list-item input[type="radio"] {
  margin-top: 0.25rem;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--gold-1);
  cursor: pointer;
}

.contact-form-wrapper .wpcf7-submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  border: none;
  border-radius: 0.25rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.contact-form-wrapper .wpcf7-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.contact-form-wrapper .wpcf7-response-output {
  margin: 1rem 0 0 0;
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.contact-form-wrapper .wpcf7-mail-sent-ok {
  background-color: rgba(40, 167, 69, 0.2);
  border: 1px solid rgba(40, 167, 69, 0.5);
  color: #28a745;
}

.contact-form-wrapper .wpcf7-mail-sent-ng,
.contact-form-wrapper .wpcf7-aborted,
.contact-form-wrapper .wpcf7-spam {
  background-color: rgba(220, 53, 69, 0.2);
  border: 1px solid rgba(220, 53, 69, 0.5);
  color: #dc3545;
}

.contact-form-wrapper .wpcf7-validation-errors,
.contact-form-wrapper .wpcf7-acceptance-missing {
  background-color: rgba(255, 193, 7, 0.2);
  border: 1px solid rgba(255, 193, 7, 0.5);
  color: #ffc107;
}

.contact-form-wrapper .wpcf7-not-valid-tip {
  color: #dc3545;
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: block;
}

.contact-form-wrapper .wpcf7-not-valid {
  border-color: #dc3545 !important;
}

/* Footer */
.footer {
  background-color: var(--surface);
  border-top: 1px solid rgba(43, 182, 242, 0.2);
  padding: 2rem 0;
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-content p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.footer-content a {
  color: var(--gold-1);
  text-decoration: none;
}

.footer-content a:hover {
  text-decoration: underline;
}

.footer-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-menu li a {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-menu li a:hover {
  color: var(--gold-1);
  text-decoration: underline;
}

.legal-page {
  background-color: var(--bg);
  padding: 3rem 1.5rem 4rem;
}

.legal-page-wrapper {
  max-width: 960px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid rgba(43, 182, 242, 0.2);
  border-radius: 0.75rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  padding: 2.5rem 3rem;
  line-height: 1.75;
}

.legal-page-header {
  margin-bottom: 2rem;
}

.legal-page-label {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.15rem;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.legal-page-title {
  margin: 0;
  color: #fff;
  font-size: 2rem;
  line-height: 1.3;
}

.legal-page-content {
  color: var(--muted);
  font-size: 1rem;
}

.legal-page-content p {
  margin-bottom: 1.25rem;
}

.legal-page-content h2,
.legal-page-content h3,
.legal-page-content h4 {
  color: #fff;
  margin: 2rem 0 1rem;
  line-height: 1.3;
}

.legal-page-content ul,
.legal-page-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.legal-page-content li {
  margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
  .legal-page {
    padding: 2rem 1rem 3rem;
  }
  
  .legal-page-wrapper {
    padding: 1.75rem 1.5rem;
  }
  
  .legal-page-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .legal-page-wrapper {
    padding: 1.5rem 1.25rem;
    border-radius: 0.5rem;
  }
  
  .legal-page-title {
    font-size: 1.35rem;
  }
}

/* Utility Classes */
.icon-text {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Hide empty Toaster */
[role="region"][aria-label*="Notifications"]:empty,
[role="region"][aria-label*="Notifications"] ol:empty {
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 575px) {
  .home-newsletter-btn {
    display: none;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ============================================
   Mobile Responsive Styles
   ============================================ */

/* Mobile Menu for App Pages */
.app-mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10002;
  background: var(--surface);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.25rem;
  padding: 0.75rem;
  color: var(--gold-1);
  cursor: pointer;
  font-size: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
}

/* Hero Mobile Menu Toggle */
.hero-mobile-menu-toggle {
  display: none; /* Hidden on desktop */
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10002;
  background: rgba(14, 19, 28, 0.9);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.25rem;
  padding: 0.75rem;
  color: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

/* Hide fixed toggle when mobile top bar is visible */
.mobile-top-bar ~ .hero-mobile-menu-toggle,
.mobile-top-bar ~ .app-mobile-menu-toggle,
.hero-page-wrapper .mobile-top-bar ~ #hero-mobile-menu-toggle-legacy {
  display: none !important;
}

/* Also hide app-mobile-menu-toggle on subpages when mobile-top-bar is present */
body:not(.home) .mobile-top-bar ~ .app-mobile-menu-toggle {
  display: none !important;
}

.hero-mobile-menu-toggle:hover {
  background: rgba(14, 19, 28, 0.95);
  border-color: var(--gold-1);
  transform: scale(1.05);
}

.hero-mobile-menu-toggle i {
  display: block;
}

.hero-mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none; /* Disable interactions when hidden */
  display: none !important; /* Completely hide by default */
}

.hero-mobile-menu-overlay.active {
  display: block !important; /* Show when active */
  opacity: 1;
  visibility: visible;
  pointer-events: auto; /* Enable interactions when active */
}

.hero-mobile-menu {
  position: fixed;
  top: 0;
  left: -100%; /* Move completely off-screen by default */
  width: 280px;
  height: 100%;
  background: var(--bg);
  /* Background pattern is generated via CSS gradients */
  padding: 2rem 1.5rem;
  overflow-y: auto;
  transform: translateX(0);
  transition: left 0.3s ease;
  z-index: 10000;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
  border-right: 1px solid rgba(43, 182, 242, 0.2);
  display: block; /* Keep display block for transitions */
  pointer-events: none; /* Disable interactions when hidden */
  visibility: hidden; /* Hide by default */
  opacity: 0; /* Hide by default */
}

.hero-mobile-menu-overlay.active .hero-mobile-menu {
  left: 0; /* Slide in when active */
  visibility: visible;
  opacity: 1;
  pointer-events: auto; /* Enable interactions when visible */
}

.hero-mobile-menu-header {
  display: none !important; /* Ukryj cały header, bo przycisk X jest ukryty */
}

.hero-mobile-menu-close {
  display: none !important; /* Ukryj przycisk X */
}

.hero-mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-mobile-menu-list li a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
  display: block;
  padding: 0.5rem 0;
}

.hero-mobile-menu-list li a:hover,
.hero-mobile-menu-list li.current-menu-item > a {
  color: var(--gold-1);
}

.app-mobile-menu-toggle:hover {
  background: var(--surface-2);
  border-color: var(--gold-1);
  transform: scale(1.05);
}

.app-mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10004; /* Higher than mobile-top-bar (10003) */
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* Disable interactions when hidden */
  transition: opacity 0.3s ease, visibility 0.3s ease;
  display: block !important; /* Always display to ensure it exists in DOM */
}

.app-mobile-menu-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto; /* Enable interactions when active */
}

.app-mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--bg);
  /* Background pattern is generated via CSS gradients */
  padding: 2rem 1.5rem;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 10005; /* Higher than overlay (10004) */
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.5);
  border-right: 1px solid rgba(43, 182, 242, 0.2);
  display: block;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
}

.app-mobile-menu-overlay.active .app-mobile-menu {
  transform: translateX(0);
  visibility: visible;
  opacity: 1;
  pointer-events: auto; /* Enable interactions when menu is active */
}

.app-mobile-menu-header {
  display: none !important; /* Ukryj cały header, bo przycisk X jest ukryty */
}

/* Hide logo in mobile menu on subpages (not on homepage) */
.app-mobile-menu-header a:first-child {
  display: none;
}

.app-mobile-menu-close {
  display: none !important; /* Ukryj przycisk X */
}

.app-mobile-menu-nav {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.app-mobile-menu-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.app-mobile-menu-nav ul li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.app-mobile-menu-nav a,
.app-mobile-menu-nav .home-sidebar-menu li a,
.app-mobile-menu-nav ul li a {
  display: block;
  padding: 0.5rem 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s ease;
  border-radius: 0;
  margin-bottom: 0;
  background: transparent;
  border: none;
}

.app-mobile-menu-nav a:hover,
.app-mobile-menu-nav .home-sidebar-menu li a:hover,
.app-mobile-menu-nav .home-sidebar-menu li.current-menu-item > a,
.app-mobile-menu-nav ul li a:hover,
.app-mobile-menu-nav ul li.current-menu-item > a,
.app-mobile-menu-nav ul li.current_page_item > a,
.app-mobile-menu-nav ul li.current_page_ancestor > a {
  color: var(--gold-1);
  background: transparent;
}

/* Prevent body scroll when menu is open */
body.menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Tablet and Mobile Styles */
@media (max-width: 991px) {
  .app-mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .app-mobile-menu-overlay {
    display: block;
  }
  
  .hero-mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .hero-mobile-menu-overlay {
    display: block;
  }
  
  .app-content {
    padding: 1rem;
    margin-top: 3.5rem;
  }
  
  .gold-bar {
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
  }
  
  .gold-bar h1,
  .gold-bar h2,
  .gold-bar h3 {
    font-size: 1.25rem;
  }
  
  .card-elevated {
    padding: 1.25rem;
  }
  
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .contact-info-panel,
  .contact-form-panel {
    padding: 1.5rem;
  }
  
  .contact-panel-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
  }
  
  .contact-info {
    gap: 1.75rem;
  }
  
  .contact-icon-text i {
    font-size: 1.375rem;
    width: 26px;
  }
  
  .contact-icon-text strong {
    font-size: 0.9rem;
  }
  
  .contact-text {
    font-size: 0.85rem;
  }
  
  .agent-card {
    flex-direction: row;
    text-align: left;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(36, 38, 43, 0.95) 0%, rgba(26, 28, 32, 0.98) 100%);
    border: 1px solid rgba(43, 182, 242, 0.15);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    gap: 1.25rem;
    align-items: stretch;
    min-height: 220px;
  }
  
  .agent-card:hover {
    box-shadow: 0 6px 20px rgba(43, 182, 242, 0.15);
    border-color: rgba(43, 182, 242, 0.25);
  }
  
  .agent-photo {
    flex-shrink: 0;
    width: 140px;
    min-width: 140px;
    height: 100%;
    min-height: 180px;
    padding: 0.75rem;
    box-sizing: border-box;
    border-radius: 8px;
    border: 2px solid rgba(43, 182, 242, 0.2);
    overflow: hidden;
    background: rgba(43, 182, 242, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .agent-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 0;
  }
  
  .agent-info {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }
  
  .agent-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    color: #2BB6F2;
  }
  
  .agent-role {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
    font-weight: 600;
  }
  
  .agent-contact {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-top: 0;
  }
  
  .agent-contact .icon-text {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.625rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 0.875rem;
  }
  
  .agent-contact .icon-text:hover {
    background: transparent;
    border: none;
    transform: none;
  }
  
  .agent-contact .icon-text:hover a {
    color: #2BB6F2;
  }
  
  .agent-contact .icon-text i {
    color: #2BB6F2;
    font-size: 0.9rem;
    width: 18px;
    text-align: left;
    flex-shrink: 0;
  }
  
  .agent-contact .icon-text a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.2s ease;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  
  .agent-bio {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(43, 182, 242, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8125rem;
    line-height: 1.6;
  }
  
  .team-members-wrapper {
    padding: 1rem 0;
  }
  
  .team-members-wrapper .agent-card {
    height: 100%;
  }
  
  .kpi {
    padding: 1.25rem;
    margin-bottom: 1rem;
  }
  
  .kpi i {
    font-size: 2rem;
  }
  
  .kpi-title {
    font-size: 1rem;
  }
  
  .kpi-text {
    font-size: 0.85rem;
  }
  
  .about-section {
    flex-direction: column;
  }
  
  .about-section .col-lg-6 {
    margin-bottom: 1.5rem;
  }
  
  .about-section .col-lg-6:last-child {
    overflow: hidden;
    border-radius: 0.5rem;
  }
  
  .team-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
  }
}

/* Small Mobile Styles */
@media (max-width: 768px) {
  /* Hide image on mobile if it's too large */
  .about-section .col-lg-6:last-child {
    display: none;
  }
  .app-content {
    padding: 0.75rem;
    padding-top: 0.5rem; /* Adjust for mobile-top-bar */
    margin-top: 0; /* Remove margin-top when mobile-top-bar is present */
  }
  
  /* Remove margin-top when mobile-top-bar is present */
  .mobile-top-bar ~ .app-container .app-content {
    margin-top: 0;
  }
  
  .gold-bar {
    padding: 0.625rem 0.875rem;
    margin-bottom: 1.25rem;
    border-radius: 0.25rem;
  }
  
  .gold-bar h1,
  .gold-bar h2,
  .gold-bar h3 {
    font-size: 1.125rem;
  }
  
  .card-elevated {
    padding: 1rem;
    border-radius: 0.375rem;
  }
  
  .contact-info-panel,
  .contact-form-panel {
    padding: 1.25rem;
  }
  
  .contact-info-item {
    margin-bottom: 1.5rem;
  }
  
  .contact-info {
    gap: 1.5rem;
  }
  
  .contact-icon-text {
    gap: 1rem;
  }
  
  .contact-icon-text i {
    font-size: 1.375rem;
    width: 24px;
  }
  
  .contact-icon-text strong {
    font-size: 0.875rem;
  }
  
  .contact-text {
    font-size: 0.8125rem;
  }
  
  .agent-card {
    padding: 0.875rem;
    margin-bottom: 1.25rem;
    border-radius: 10px;
    gap: 1rem;
    min-height: 200px;
  }
  
  .agent-photo {
    width: 120px;
    min-width: 120px;
    height: 100%;
    min-height: 160px;
    padding: 0.625rem;
  }
  
  .agent-photo img {
    object-fit: contain;
    object-position: center;
  }
  
  .agent-info {
    padding: 0;
  }
  
  .agent-name {
    font-size: 1.125rem;
  }
  
  .agent-role {
    font-size: 0.7rem;
    margin-bottom: 0.875rem;
  }
  
  .agent-contact {
    margin-top: 0;
    gap: 0.5rem;
  }
  
  .agent-contact .icon-text {
    padding: 0;
    font-size: 0.8125rem;
  }
  
  .agent-contact .icon-text i {
    font-size: 0.85rem;
    width: 16px;
  }
  
  .agent-bio {
    margin-top: 0.875rem;
    padding-top: 0.875rem;
    font-size: 0.75rem;
  }
  
  /* Property Agent Card Mobile Styles */
  .property-agent-card {
    padding: 1.25rem 0;
  }
  
  .property-agent-photo {
    width: 120px;
    height: 120px;
    min-width: 120px;
    min-height: 120px;
    max-width: 120px;
    max-height: 120px;
    margin-bottom: 1.25rem;
  }
  
  .property-agent-info h4 {
    font-size: 1.25rem;
  }
  
  .property-agent-contact {
    max-width: 100%;
  }
  
  .property-agent-contact .icon-text {
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
  }
  
  /* Very small screens - prevent horizontal scrolling */
  @media (max-width: 480px) {
    .team-members-wrapper {
      padding: 0.75rem 0;
      width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }
    
    .agent-card {
      padding: 0.75rem;
      gap: 0.875rem;
      min-height: 180px;
      margin-bottom: 1.25rem;
      max-width: 100%;
      width: 100%;
      box-sizing: border-box;
    }
    
    .agent-photo {
      width: 100px;
      min-width: 100px;
      max-width: 100px;
      min-height: 140px;
      padding: 0.5rem;
      flex-shrink: 0;
    }
    
    .agent-info {
      min-width: 0;
      flex: 1;
      overflow: hidden;
    }
    
    .agent-name {
      font-size: 1rem;
      margin-bottom: 0.25rem;
      word-break: break-word;
      overflow-wrap: break-word;
    }
    
    .agent-role {
      font-size: 0.65rem;
      margin-bottom: 0.75rem;
      letter-spacing: 0.5px;
      word-break: break-word;
      overflow-wrap: break-word;
    }
    
    .agent-contact {
      gap: 0.5rem;
    }
    
    .agent-contact .icon-text {
      font-size: 0.75rem;
      gap: 0.5rem;
      min-width: 0;
    }
    
    .agent-contact .icon-text i {
      font-size: 0.8rem;
      width: 14px;
      flex-shrink: 0;
    }
    
    .agent-contact .icon-text a {
      word-break: break-all;
      overflow-wrap: break-word;
      min-width: 0;
    }
    
    .agent-bio {
      margin-top: 0.75rem;
      padding-top: 0.75rem;
      font-size: 0.7rem;
      line-height: 1.5;
      word-break: break-word;
      overflow-wrap: break-word;
    }
    
    /* Property Agent Card Very Small Screens */
    .property-agent-photo {
      width: 100px;
      height: 100px;
      min-width: 100px;
      min-height: 100px;
      max-width: 100px;
      max-height: 100px;
      margin-bottom: 1rem;
    }
    
    .property-agent-info h4 {
      font-size: 1.125rem;
    }
    
    .property-agent-contact .icon-text {
      padding: 0.5rem 0.75rem;
      font-size: 0.8125rem;
    }
  }
  
  .kpi {
    padding: 1rem;
  }
  
  .kpi i {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
  }
  
  .kpi-title {
    font-size: 0.9375rem;
    margin-bottom: 0.375rem;
  }
  
  .kpi-text {
    font-size: 0.8rem;
    line-height: 1.5;
  }
  
  /* Contact Form 7 Mobile Styles */
  .contact-form-wrapper .wpcf7-form input[type="text"],
  .contact-form-wrapper .wpcf7-form input[type="email"],
  .contact-form-wrapper .wpcf7-form input[type="tel"],
  .contact-form-wrapper .wpcf7-form textarea {
    font-size: 0.875rem;
    padding: 0.75rem;
  }
  
  .contact-form-wrapper .wpcf7-form textarea {
    min-height: 120px;
  }
  
  .contact-form-wrapper .wpcf7-submit {
    width: 100%;
    padding: 0.875rem;
    font-size: 0.875rem;
  }
}

/* Extra Small Mobile Styles */
@media (max-width: 575px) {
  .app-mobile-menu-toggle {
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.625rem;
    font-size: 1.125rem;
  }
  
  .app-content {
    padding: 0.5rem;
    margin-top: 2.5rem;
  }
  
  .gold-bar {
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
  }
  
  .gold-bar h1,
  .gold-bar h2,
  .gold-bar h3 {
    font-size: 1rem;
  }
  
  .card-elevated {
    padding: 0.875rem;
  }
  
  .contact-info-panel,
  .contact-form-panel {
    padding: 1rem;
  }
  
  .contact-panel-title {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
  }
  
  .contact-info {
    gap: 1.25rem;
  }
  
  .contact-icon-text {
    gap: 0.875rem;
  }
  
  .contact-icon-text i {
    font-size: 1.25rem;
    width: 22px;
  }
  
  .contact-icon-text strong {
    font-size: 0.8125rem;
    margin-bottom: 0.25rem;
  }
  
  .contact-text {
    font-size: 0.75rem;
  }
  
  .agent-card {
    padding: 0.875rem;
    gap: 1rem;
  }
  
  .agent-photo {
    width: 80px;
    height: 80px;
  }
  
  .agent-name {
    font-size: 1rem;
  }
  
  .agent-role {
    font-size: 0.75rem;
  }
  
  .agent-bio {
    font-size: 0.8rem;
  }
  
  .kpi {
    padding: 0.875rem;
  }
  
  .kpi i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }
  
  .kpi-title {
    font-size: 0.875rem;
  }
  
  .kpi-text {
    font-size: 0.75rem;
  }
  
  /* Career grid adjustments for extra small screens */
  .career-grid {
    gap: 0.875rem;
  }
  
  .career-item {
    padding: 1.25rem 1rem;
  }
  
  .career-item i {
    font-size: 2.25rem;
    margin-bottom: 0.625rem;
  }
  
  .career-item h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }
  
  .career-item p {
    font-size: 0.875rem;
    line-height: 1.4;
  }
  
  /* Grid adjustments for small screens */
  .row.g-3 > *,
  .row.g-4 > * {
    margin-bottom: 1rem;
  }
  
  /* Footer mobile */
  .footer {
    padding: 1.5rem 1rem;
  }
  
  .footer-content {
    font-size: 0.75rem;
  }
}

/* Landscape Mobile */
@media (max-width: 991px) and (orientation: landscape) {
  .app-mobile-menu {
    width: 320px;
  }
  
  .app-content {
    padding: 1.25rem;
  }
}

/* ============================================
   Hero Page Template with Video Background
   ============================================ */

.hero-page-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Video Background */
.hero-topbar,
.global-topbar {
  width: 100%;
  z-index: 5;
  background: linear-gradient(90deg, rgba(14, 19, 28, 0.9) 0%, rgba(27, 34, 47, 0.9) 50%, rgba(14, 19, 28, 0.9) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
}

.hero-topbar {
  position: absolute;
  top: 0;
  left: 0;
}

.global-topbar {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
}

.hero-topbar-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1rem 3.5rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 3rem;
  overflow: visible;
}

.global-topbar .hero-topbar-inner {
  padding: 1rem 3.5rem;
  justify-content: flex-start;
  align-items: center;
  gap: 3rem;
  overflow: visible;
}

/* Logo inside navbar on desktop */
.global-topbar-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.global-topbar-logo a {
  display: block;
  text-decoration: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.global-topbar-logo a:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.global-topbar-logo img {
  max-height: 90px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.navbar-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 2rem;
}

.navbar-logo img {
  max-height: 50px;
  width: auto;
  display: block;
}

.hero-topbar-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.hero-topbar-nav {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  flex-wrap: wrap;
  width: 100%;
}

.global-topbar-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.global-topbar-brand img {
  max-height: 60px;
  width: auto;
  display: block;
}

.hero-topbar-nav li a {
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 0.95rem;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.hero-topbar-nav li a:hover,
.hero-topbar-nav li.current-menu-item > a,
.hero-topbar-nav li.current_page_item > a {
  color: var(--gold-1);
}

.hero-topbar-logo {
  display: none !important;
}

.hero-topbar-logo img {
  max-width: 160px;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
}

.hero-video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.hero-video-background video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 2;
}

.hero-video-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  transition: opacity 0.5s ease;
}

.hero-video-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: hidden;
}

.hero-video-fallback img,
.hero-video-fallback picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-video-background img:not(.hero-video-poster) {
  display: none;
}

.hero-image-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: var(--bg);
  overflow: hidden;
}

.hero-image-background img,
.hero-image-background picture {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
  pointer-events: none;
}

/* Hero Content */
.hero-content {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Hero Logo */
.hero-logo {
  margin-bottom: 3rem;
  animation: fadeInDown 1s ease-out;
}

.hero-logo a {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hero-logo a:hover {
  transform: scale(1.05);
  opacity: 0.9;
}

.hero-logo img {
  max-width: 300px;
  width: 100%;
  height: auto;
  display: block;
}

/* Hero Text */
.hero-text {
  margin-bottom: 3rem;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 0.5rem 0;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 3.5rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

/* Hero CTA Button */
.hero-cta {
  animation: fadeInUp 0.2s ease-out 0.6s both;
}

.hero-button {
  display: inline-block;
  padding: 1.25rem 3rem;
  background: var(--surface-2);
  border: 2px solid var(--gold-1);
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border-radius: 0.25rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hero-button:hover {
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.hero-button.hero-offer-button {
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  border-color: transparent;
  color: #0d111b;
  text-shadow: none;
  padding: 0.9375rem 2.25rem; /* 25% smaller than base */
  font-size: 0.875rem;
}

.hero-button.hero-offer-button:hover {
  background: linear-gradient(135deg, #57c9ff 0%, #1aa4e0 100%);
  color: #05070c;
  box-shadow: 0 10px 20px rgba(17, 143, 209, 0.35);
}

.hero-button.hero-cta-button {
  background: transparent;
  border-color: #fff;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  padding: 0.625rem 1.5rem; /* 50% smaller than base */
  font-size: 0.75rem;
}

.hero-button.hero-cta-button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #2BB6F2;
  color: #2BB6F2;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Responsive Styles */
@media (max-width: 991px) {
  .hero-topbar-inner {
    padding: 0.75rem 1rem;
    gap: 1rem;
  }

  .global-topbar .hero-topbar-inner {
    padding: 0.75rem 1rem;
  }

  .hero-topbar-nav {
    gap: 1.25rem;
    font-size: 0.875rem;
  }

  .global-topbar-brand img {
    max-height: 56px;
  }

  .hero-title,
  .hero-subtitle {
    font-size: clamp(2rem, 4vw, 2.5rem);
  }
  
  .hero-logo img {
    max-width: clamp(200px, 25vw, 250px);
  }
  
  .hero-content {
    padding: clamp(1.5rem, 3vw, 2rem);
  }
  
  .hero-logo {
    margin-bottom: clamp(2rem, 4vw, 3rem);
  }
  
  .hero-text {
    margin-bottom: clamp(2rem, 4vw, 3rem);
  }
}

/* Tablet specific adjustments (768px - 991px) */
@media (min-width: 769px) and (max-width: 991px) {
  .hero-page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }
  
  .hero-page-wrapper .mobile-top-bar {
    position: sticky;
    top: 0;
    order: -1;
    flex-shrink: 0;
  }
  
  .hero-page-wrapper .hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 70px); /* Account for mobile-top-bar height on tablet */
    padding: 2rem 1.5rem;
    max-width: 800px;
    margin: 0 auto;
  }
  
  .hero-title,
  .hero-subtitle {
    font-size: clamp(2.25rem, 3.5vw, 2.75rem);
    line-height: 1.3;
  }
  
  .hero-logo {
    margin-bottom: clamp(2rem, 3vw, 2.5rem);
  }
  
  .hero-logo img {
    max-width: clamp(220px, 28vw, 280px);
  }
  
  .hero-text {
    margin-bottom: clamp(2rem, 3vw, 2.5rem);
  }
  
  .hero-button {
    padding: 1.125rem 2.25rem;
    font-size: 0.9375rem;
  }
  
  .hero-contact-corner {
    bottom: 2.5rem;
  }
  
  .hero-contact-now-btn {
    padding: 1rem 2rem;
    font-size: 0.9375rem;
  }
}

@media (max-width: 768px) {
  /* Ensure mobile menu is completely hidden on homepage by default */
  .hero-page-wrapper .hero-mobile-menu-overlay:not(.active) {
    display: none !important;
  }
  
  .hero-page-wrapper .hero-mobile-menu-overlay:not(.active) .hero-mobile-menu {
    left: -100% !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  
  /* Hide hero-topbar completely on mobile */
  .hero-topbar {
    display: none !important;
  }
  
  .global-topbar {
    position: relative;
  }

  .hero-topbar-inner {
    flex-direction: column;
    padding: 0.75rem 1rem 1rem;
    justify-content: center;
    gap: 0.75rem;
  }

  .global-topbar .hero-topbar-inner {
    padding: 0.75rem 1rem 1rem;
  }

  /* Hide menu on mobile for hero page */
  .hero-page-wrapper .hero-topbar-menu {
    display: none;
  }

  .hero-topbar-menu {
    width: 100%;
    justify-content: center;
    order: 2;
  }

  .hero-topbar-nav {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .global-topbar-brand {
    order: 1;
    margin-bottom: 0.5rem;
    justify-content: center;
  }
  
  /* Adjust hero page wrapper for mobile-top-bar */
  .hero-page-wrapper {
    padding-top: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
  }
  
  /* Position mobile-top-bar at the top */
  .hero-page-wrapper .mobile-top-bar {
    position: sticky;
    top: 0;
    order: -1;
    flex-shrink: 0;
  }
  
  /* Center hero content below mobile-top-bar */
  .hero-page-wrapper .hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 60px); /* Account for mobile-top-bar height */
    text-align: center;
    padding: 1.5rem 1rem;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  
  .hero-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 1.5rem;
  }
  
  .hero-logo img {
    max-width: clamp(180px, 30vw, 220px);
    width: auto;
    height: auto;
    margin: 0 auto;
  }
  
  .hero-text {
    text-align: center;
    width: 100%;
    margin-bottom: 1.5rem;
  }
  
  .hero-title,
  .hero-subtitle {
    font-size: clamp(1.75rem, 4.5vw, 2.25rem);
    letter-spacing: 1px;
    text-align: center;
    width: 100%;
    margin: 0 auto;
    line-height: 1.3;
  }
  
  .hero-cta {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .hero-button {
    margin: 0 auto;
    padding: clamp(0.875rem, 2vw, 1.125rem) clamp(1.75rem, 4vw, 2.25rem);
    font-size: clamp(0.8125rem, 1.8vw, 0.9375rem);
    display: inline-block;
  }
  
  .hero-contact-corner {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    bottom: calc(3rem + 50px) !important;
    width: 100% !important;
    padding: 0 1.25rem !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10 !important;
  }
  
  .hero-contact-now-btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.875rem;
    width: auto;
    max-width: 100%;
    box-shadow: 0 4px 12px rgba(43, 182, 242, 0.4);
  }
}

/* Small mobile adjustments (480px and below) */
@media (max-width: 480px) {
  .hero-title,
  .hero-subtitle {
    font-size: clamp(1.375rem, 6vw, 1.75rem);
    line-height: 1.25;
  }
  
  .hero-logo img {
    max-width: clamp(140px, 35vw, 180px);
  }
  
  .hero-button {
    padding: 0.875rem 1.5rem;
    font-size: 0.8125rem;
    width: 100%;
    max-width: 280px;
  }
  
  .hero-content {
    padding: 1.25rem 1rem;
  }
  
  .hero-logo {
    margin-bottom: 1.25rem;
  }
  
  .hero-text {
    margin-bottom: 1.25rem;
  }
  
  .hero-contact-corner {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    bottom: calc(3rem + 50px) !important;
    width: 100% !important;
    padding: 0 1rem !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    z-index: 10 !important;
  }
  
  .hero-contact-now-btn {
    width: auto;
    max-width: calc(100% - 2rem);
    padding: 0.75rem 1.25rem;
    font-size: 0.8125rem;
    box-shadow: 0 4px 12px rgba(43, 182, 242, 0.4);
  }
}

/* Hero Contact Corner (Bottom Center) - Button */
.hero-contact-corner {
  position: absolute;
  bottom: 3rem;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
  text-align: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.hero-contact-corner.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.hero-contact-corner.is-visible {
  opacity: 1;
  visibility: visible;
}

/* Hero contact button uses hero-button styles */

/* Hero Contact Modal - Same styling as property-contact-popup */
.hero-contact-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10003; /* Higher than hamburger menu (10002) */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.hero-contact-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.hero-contact-modal-content {
  position: relative;
  background: var(--surface);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.5rem;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
  z-index: 10004; /* Higher than modal overlay */
}

.hero-contact-modal.active .hero-contact-modal-content {
  transform: scale(1);
}

.hero-contact-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: color 0.3s ease;
  z-index: 10005; /* Higher than modal content */
}

.hero-contact-modal-close:hover {
  color: var(--gold-1);
}

.hero-contact-modal-title {
  color: var(--gold-1);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  margin-top: 0;
}

.hero-contact-modal-form {
  margin-top: 1.5rem;
}

.hero-contact-modal-form .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-contact-modal-form .wpcf7-form-control-wrap {
  display: block;
  width: 100%;
}

.hero-contact-modal-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.hero-contact-modal-form input[type="text"],
.hero-contact-modal-form input[type="email"],
.hero-contact-modal-form input[type="tel"],
.hero-contact-modal-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--surface-2);
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.25rem;
  color: var(--text);
  font-size: 0.875rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
  font-family: inherit;
}

.hero-contact-modal-form input[type="text"]:focus,
.hero-contact-modal-form input[type="email"]:focus,
.hero-contact-modal-form input[type="tel"]:focus,
.hero-contact-modal-form textarea:focus {
  outline: none;
  border-color: var(--gold-1);
  background-color: rgba(36, 38, 43, 0.8);
}

.hero-contact-modal-form textarea {
  min-height: 120px;
  resize: vertical;
}

.hero-contact-modal-form .wpcf7-submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  border: none;
  border-radius: 0.25rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
}

.hero-contact-modal-form .wpcf7-submit:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.hero-contact-modal-phone {
  margin-top: 1.5rem;
  padding: 1.25rem;
  text-align: center;
  background: rgba(14, 19, 28, 0.6);
  border: 1px solid rgba(43, 182, 242, 0.3);
  border-radius: 0.35rem;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.2);
}

.hero-contact-modal-phone-label {
  display: block;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.hero-contact-modal-phone-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold-1);
  text-decoration: none;
  transition: color 0.3s ease, transform 0.3s ease;
}

.hero-contact-modal-phone-link:hover {
  color: #2BB6F2;
  transform: translateY(-1px);
}

/* Mobile Logo in Center Top */
.page-mobile-logo-center {
  display: none;
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  text-align: center;
}

.page-mobile-logo-center a {
  display: block;
  text-decoration: none;
}

.page-mobile-logo-center img {
  max-height: 50px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

/* Mobile Top Bar - Sticky bar for logo and hamburger */
.mobile-top-bar {
  display: none; /* Hidden on desktop, shown in media query */
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10003;
  background: linear-gradient(90deg, rgba(14, 19, 28, 0.95) 0%, rgba(27, 34, 47, 0.95) 50%, rgba(14, 19, 28, 0.95) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  padding: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Lower z-index of mobile-top-bar when contact popup is active */
body.property-contact-popup-active .mobile-top-bar,
body:has(.property-contact-popup.active) .mobile-top-bar,
.property-contact-popup.active ~ * .mobile-top-bar,
.property-contact-popup.active ~ .mobile-top-bar {
  z-index: 1000 !important; /* Lower than modal */
  position: relative !important; /* Change from sticky to relative to prevent stacking issues */
}

.mobile-top-bar-logo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-top-bar-logo a {
  display: block;
  text-decoration: none;
}

.mobile-top-bar-logo img {
  max-height: 45px;
  width: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.mobile-top-bar-toggle {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid rgba(43, 182, 242, 0.35);
  border-radius: 0.25rem;
  padding: 0.625rem;
  color: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10004; /* Higher than mobile-top-bar to ensure clickability */
  pointer-events: auto !important; /* Ensure button is always clickable */
}

.mobile-top-bar-toggle * {
  pointer-events: none; /* Prevent child elements from blocking clicks */
}

.mobile-top-bar-toggle:hover {
  background: rgba(14, 19, 28, 0.95);
  border-color: var(--gold-1);
  transform: scale(1.05);
}

@media (max-width: 991px) {
  .global-topbar {
    position: sticky;
    top: 0;
  }
  
  /* Show mobile top bar */
  .mobile-top-bar {
    display: flex;
    padding: clamp(0.625rem, 1.5vw, 0.875rem) clamp(0.875rem, 2vw, 1.25rem);
  }
  
  .mobile-top-bar-logo img {
    max-height: clamp(40px, 5vw, 50px);
  }
  
  .mobile-top-bar-toggle {
    width: clamp(40px, 5vw, 48px);
    height: clamp(40px, 5vw, 48px);
    font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  }
  
  /* Hide fixed logo and toggle on mobile when top bar is present */
  .page-mobile-logo-center {
    display: none !important;
  }
  
  /* Hide logo in navbar on mobile */
  .global-topbar-logo {
    display: none;
  }
  
  /* Hide global topbar menu on mobile for subpages */
  .global-topbar .hero-topbar-menu {
    display: none;
  }
  
  .global-topbar .hero-topbar-inner {
    justify-content: center;
    padding: 0.75rem 1rem;
  }
  
  /* Hide hero topbar on mobile */
  .hero-topbar {
    display: none !important;
  }
}

/* Tablet specific mobile-top-bar adjustments */
@media (min-width: 769px) and (max-width: 991px) {
  .mobile-top-bar {
    padding: 0.875rem 1.5rem;
  }
  
  .mobile-top-bar-logo img {
    max-height: 50px;
  }
  
  .mobile-top-bar-toggle {
    width: 48px;
    height: 48px;
    font-size: 1.375rem;
  }
}

@media (max-width: 768px) {
  .hero-contact-corner {
    position: absolute !important;
    bottom: calc(3rem + 50px) !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 1.25rem !important;
    z-index: 10 !important;
  }

  .hero-contact-now-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    width: auto;
    max-width: 100%;
    box-shadow: 0 4px 12px rgba(43, 182, 242, 0.4);
  }
}

@media (max-width: 480px) {
  .hero-contact-corner {
    position: absolute !important;
    bottom: calc(3rem + 50px) !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0 1rem !important;
    z-index: 10 !important;
  }

  .hero-contact-now-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.8125rem;
    width: auto;
    max-width: calc(100% - 2rem);
    box-shadow: 0 4px 12px rgba(43, 182, 242, 0.4);
  }
}

/* Reviews Carousel */
.reviews-section {
  margin-top: 3rem;
}

.reviews-carousel .review-item {
  padding: 0 0.5rem;
}

.review-stars {
  color: #FFD700;
  font-size: 1.25rem;
}

.review-stars i {
  margin-right: 0.25rem;
}

.review-text {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  min-height: 80px;
}

.review-author {
  color: var(--gold-1);
  font-size: 0.95rem;
  margin-top: auto;
}

.reviews-carousel .owl-nav {
  text-align: center;
  margin-top: 2rem;
}

.reviews-carousel .owl-nav button {
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin: 0 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.reviews-carousel .owl-nav button:hover {
  opacity: 0.9;
  transform: scale(1.1);
}

.reviews-carousel .owl-dots {
  text-align: center;
  display: none;
  margin-top: 1.5rem;
}

.reviews-carousel .owl-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(43, 182, 242, 0.3);
  border: none;
  margin: 0 0.25rem;
  transition: all 0.3s ease;
  display: none;
}

.reviews-carousel .owl-dots button.active {
  background: linear-gradient(135deg, #2BB6F2 0%, #0A91D1 100%);
  transform: scale(1.2);
  display: block;
}

@media (max-width: 768px) {
  .review-text {
    min-height: auto;
    font-size: 0.9rem;
  }
  
  .reviews-carousel .owl-nav {
    margin-top: 1.5rem;
  }
  
  .reviews-carousel .owl-nav button {
    width: 35px;
    height: 35px;
    font-size: 0.875rem;
  }
}

/* Pagination Styles */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0;
}

.pagination-wrapper .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.pagination-wrapper .page-numbers:hover {
  background: var(--gold-1);
  color: #fff;
  border-color: var(--gold-1);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(43, 182, 242, 0.3);
}

.pagination-wrapper .page-numbers.current {
  background: var(--gold-1);
  color: #fff;
  border-color: var(--gold-1);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(43, 182, 242, 0.4);
}

.pagination-wrapper .page-numbers.dots {
  background: transparent;
  border: none;
  cursor: default;
  color: var(--muted);
}

.pagination-wrapper .page-numbers.dots:hover {
  background: transparent;
  transform: none;
  box-shadow: none;
}

.pagination-wrapper .page-numbers.prev,
.pagination-wrapper .page-numbers.next {
  font-weight: 600;
  min-width: auto;
  padding: 0.5rem 1.25rem;
}

/* Infinite Scroll Loader */
.infinite-scroll-loader {
  text-align: center;
  padding: 2rem;
  margin: 2rem 0;
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}

.infinite-scroll-loader.active {
  opacity: 1;
  visibility: visible;
  max-height: 200px;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 1rem;
  border: 4px solid var(--surface-2);
  border-top-color: var(--gold-1);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.infinite-scroll-loader p {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}

/* ============================================
   Property Detail Page Styles
   ============================================ */

/* Klasyczna galeria WordPress - estetyczny wygląd */
.property-detail-gallery {
  margin-bottom: 2rem;
}

.property-detail-gallery .gallery {
  display: grid;
  gap: 15px;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

/* Dynamiczne kolumny w zależności od liczby zdjęć */
.property-detail-gallery .gallery.gallery-columns-1 {
  grid-template-columns: 1fr;
}

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

.property-detail-gallery .gallery.gallery-columns-3 {
  grid-template-columns: repeat(3, 1fr);
}

.property-detail-gallery .gallery.gallery-columns-4,
.property-detail-gallery .gallery.gallery-columns-5,
.property-detail-gallery .gallery.gallery-columns-6,
.property-detail-gallery .gallery.gallery-columns-7,
.property-detail-gallery .gallery.gallery-columns-8,
.property-detail-gallery .gallery.gallery-columns-9 {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.property-detail-gallery .gallery-item {
  margin: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  background: var(--surface-2);
  aspect-ratio: 16/9; /* Zmienione z 1 na 16/9 dla lepszego wyświetlania zdjęć */
}

.property-detail-gallery .gallery-icon {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  overflow: hidden;
}

.property-detail-gallery .gallery-icon a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.property-detail-gallery .gallery-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease, opacity 0.3s ease;
  display: block;
}

.property-detail-gallery .gallery-icon:hover img {
  transform: scale(1.1);
  opacity: 0.9;
}

.property-detail-gallery .gallery-icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  pointer-events: none;
}

.property-detail-gallery .gallery-icon:hover::after {
  background: rgba(0, 0, 0, 0.2);
}

/* Dla większych ekranów - pierwsze zdjęcie większe (tylko gdy jest 4+ zdjęć) */
@media (min-width: 768px) {
  .property-detail-gallery .gallery.gallery-columns-4 .gallery-item:first-child,
  .property-detail-gallery .gallery.gallery-columns-5 .gallery-item:first-child,
  .property-detail-gallery .gallery.gallery-columns-6 .gallery-item:first-child,
  .property-detail-gallery .gallery.gallery-columns-7 .gallery-item:first-child,
  .property-detail-gallery .gallery.gallery-columns-8 .gallery-item:first-child,
  .property-detail-gallery .gallery.gallery-columns-9 .gallery-item:first-child {
    grid-column: span 2;
    grid-row: span 2;
  }
}

@media (max-width: 767px) {
  .property-detail-gallery .gallery {
    gap: 10px;
  }
  
  /* Na mobile - mniej zdjęć = większe zdjęcia */
  .property-detail-gallery .gallery.gallery-columns-1 {
    grid-template-columns: 1fr;
  }
  
  .property-detail-gallery .gallery.gallery-columns-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .property-detail-gallery .gallery.gallery-columns-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .property-detail-gallery .gallery.gallery-columns-4,
  .property-detail-gallery .gallery.gallery-columns-5,
  .property-detail-gallery .gallery.gallery-columns-6,
  .property-detail-gallery .gallery.gallery-columns-7,
  .property-detail-gallery .gallery.gallery-columns-8,
  .property-detail-gallery .gallery.gallery-columns-9 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .property-detail-gallery .gallery-item {
    aspect-ratio: 4/3; /* Na mobile lepszy proporcje */
  }
}

/* Zmiana kolejności elementów na mobile */
@media (max-width: 991px) {
  .property-detail-page .row {
    display: flex;
    flex-direction: column;
  }
  
  /* Kolejność elementów na mobile */
  .property-detail-page .gold-bar {
    order: 1 !important; /* Tytuł - pierwszy */
  }
  
  /* Cena na mobile - tuż pod tytułem, przed zdjęciami */
  .property-detail-page .col-lg-8 .price-tale {
    order: 2 !important; /* Cena - druga, przed zdjęciami */
  }
  
  .property-detail-page .col-lg-8 .property-detail-gallery {
    order: 3 !important; /* Zdjęcia - trzecie, po cenie */
  }
  
  .property-detail-page .col-lg-4 {
    order: 4 !important; /* Sidebar - czwarty */
  }
  
  /* Sekcja z lokalizacją - używamy klasy property-location-section */
  .property-detail-page .col-lg-8 .property-location-section {
    order: 999 !important; /* Lokalizacja - na końcu */
  }
  
  /* Opis i galeria ACF - przed lokalizacją */
  .property-detail-page .col-lg-8 .card-elevated:not(.property-location-section):not(.price-tale) {
    order: 5 !important;
  }
  
  /* Wszystkie elementy w col-lg-8 oprócz galerii, lokalizacji i ceny */
  .property-detail-page .col-lg-8 > *:not(.property-detail-gallery):not(.property-location-section):not(.price-tale) {
    order: 5 !important;
  }
  
  /* Upewnij się, że col-lg-8 jest flex containerem */
  .property-detail-page .col-lg-8 {
    display: flex !important;
    flex-direction: column !important;
  }
}

/* Lightbox - widoczne strzałki na mobile */
@media (max-width: 767px) {
  .lb-nav a.lb-prev,
  .lb-nav a.lb-next {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    width: 50px !important;
    height: 50px !important;
    background: rgba(43, 182, 242, 0.9) !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.5) !important;
    position: fixed !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
  }
  
  .lb-nav a.lb-prev {
    left: 15px !important;
  }
  
  .lb-nav a.lb-next {
    right: 15px !important;
  }
  
  .lb-nav a.lb-prev:hover,
  .lb-nav a.lb-next:hover {
    background: rgba(43, 182, 242, 1) !important;
    transform: translateY(-50%) scale(1.1) !important;
  }
  
  .lb-nav a.lb-prev::after,
  .lb-nav a.lb-next::after {
    content: '' !important;
    display: block !important;
    width: 0 !important;
    height: 0 !important;
    border: none !important;
  }
  
  .lb-nav a.lb-prev::before {
    content: '\f053' !important;
    font-family: "Font Awesome 6 Solid" !important;
    font-weight: 900 !important;
    color: #fff !important;
    font-size: 20px !important;
  }
  
  .lb-nav a.lb-next::before {
    content: '\f054' !important;
    font-family: "Font Awesome 6 Solid" !important;
    font-weight: 900 !important;
    color: #fff !important;
    font-size: 20px !important;
  }
  
  /* Ukryj domyślne tło strzałek */
  .lb-nav a.lb-prev,
  .lb-nav a.lb-next {
    background-image: none !important;
  }
}

/* Lightbox - lepsze widoczne strzałki na desktop */
@media (min-width: 768px) {
  .lb-nav a.lb-prev,
  .lb-nav a.lb-next {
    opacity: 0.8 !important;
    transition: opacity 0.3s ease !important;
  }
  
  .lb-container:hover .lb-nav a.lb-prev,
  .lb-container:hover .lb-nav a.lb-next {
    opacity: 1 !important;
  }
}

/* Responsive Pagination */
@media (max-width: 767px) {
  .pagination-wrapper .page-numbers {
    min-width: 36px;
    height: 36px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    margin: 0 0.15rem;
  }
  
  .pagination-wrapper .page-numbers.prev,
  .pagination-wrapper .page-numbers.next {
    padding: 0.4rem 1rem;
  }
}

