/**
 * Main theme styles
 */

:root {
  --color-red: #D6362A;
  --color-yellow: #F6C84C;
  --color-green: #2E8B57;
  --color-white: #FFFFFF;
  --color-light-grey: #F5F5F7;
  --color-dark-grey: #6B6B6B;
  --color-black: #111111;
  --font-primary: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;
  --border-radius: 12px;
  --shadow-sm: 0 6px 18px rgba(17,17,17,0.06);
  --shadow-md: 0 12px 30px rgba(17,17,17,0.08);
  --container-width: 1200px;
  --header-height: 84px;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--color-dark-grey);
  background: var(--color-light-grey);
}

img {
  max-width: 100%;
  height: auto;
}

/* Layout */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* Header */
.site-header {
  background: linear-gradient(90deg, rgba(255,255,255,0.95), rgba(255,255,255,0.9));
  box-shadow: 0 8px 30px rgba(17,17,17,0.06);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.brand-link .logo-placeholder { font-weight:700; font-size:1.25rem; color:var(--color-black); }

.site-branding {
  display: flex;
  align-items: center;
}

.site-title a {
  color: var(--color-black);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
}

/* Navigation */
.main-navigation {
  display: flex;
  align-items: center;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
}

.primary-menu-container {
  display: flex;
  align-items: center;
}

.primary-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.primary-menu li {
  margin-left: var(--spacing-md);
}

.primary-menu a {
  color: var(--color-black);
  text-decoration: none;
  padding: var(--spacing-xs) var(--spacing-sm);
  transition: color 0.3s;
}

.primary-menu a:hover {
  color: var(--color-green);
}

/* Hero Section */
.hero {
  background: linear-gradient(180deg, rgba(22,22,22,0.24), rgba(22,22,22,0.10)), url('../images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-white);
  padding-top: calc(var(--header-height) + 20px);
  padding-bottom: 60px;
}

.hero-content {
  max-width: 800px;
  padding: var(--spacing-md);
}

.hero h1 {
  font-size: 2.4rem;
  margin-bottom: var(--spacing-md);
  color: var(--color-white);
  text-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-lg);
}

/* Property Grid */
.property-grid {
  display: grid;
  gap: 24px;
  padding: 28px 0;
}

.property-grid.three-col {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .property-grid.three-col { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .property-grid.three-col { grid-template-columns: 1fr; }
}

/* Property Card */
.property-card {
  background: linear-gradient(180deg, var(--color-white), #fbfbfb);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.property-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }

.card-inner { display:flex; flex-direction:column; }
.card-media { position:relative; display:block; overflow:hidden; border-radius:12px 12px 0 0; }
.card-media img { width:100%; height:200px; object-fit:cover; display:block; transition: transform .28s ease; }
.property-card:hover .card-media img { transform: scale(1.06); }

/* Ensure consistent image size for property cards so square images don't change card layout */
.property-card .property-gallery-slider,
.property-card .property-slider,
.property-card .card-media,
.property-card .property-gallery-slider .swiper-slide img,
.property-card .property-slider img,
.property-card .card-media img {
  width: 100%;
  height: 220px; /* fixed card image height */
  object-fit: cover;
  display: block;
}

@media (min-width: 768px) {
  .property-card .property-gallery-slider,
  .property-card .property-slider,
  .property-card .card-media,
  .property-card .property-gallery-slider .swiper-slide img,
  .property-card .property-slider img,
  .property-card .card-media img {
    height: 280px; /* slightly taller on medium+ screens */
  }
}

/* Watermark styling for property images */
.property-card .watermark,
.property-slider .watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.14);
  font-weight: 800;
  font-size: 3.25rem; /* fallback if Tailwind classes not present */
  letter-spacing: 0.36em;
  text-transform: uppercase;
  pointer-events: none;
  transform: rotate(-18deg);
  z-index: 2;
}

/* Ensure watermark sits behind interactive overlays but above image */
.property-card .overlay { z-index: 1; }

/* Icon size fallbacks for environments without Tailwind utility classes */
.property-card .fa-solid,
.property-card .fa-regular,
.property-card .fa-brands {
  font-size: 1.05rem;
}

.property-card .fa-solid.text-xl,
.property-card .fa-regular.text-xl,
.property-card .fa-brands.text-xl {
  font-size: 1.35rem;
}

.property-card .fa-solid.text-lg,
.property-card .fa-regular.text-lg,
.property-card .fa-brands.text-lg {
  font-size: 1.15rem;
}

.price-badge { position:absolute; left:12px; top:12px; background: #d10000; color:var(--color-white); padding:8px 12px; border-radius:8px; font-weight:700; }

/* Ensure price badge is above watermark/overlay */
.price-badge { z-index: 3; }

/* Make gallery/images stretch to the card height so slider matches card height */
.property-card > .flex { display:flex; flex-direction:column; }

@media (min-width: 768px) {
  /* top-level inner wrapper uses utility classes 'flex flex-col md:flex-row' — target that wrapper to stretch children */
  .property-card > .flex { flex-direction:row; align-items:stretch; }
  .property-card > .flex > div { flex: 1 1 50%; }

  /* make slider and images fill available height */
  .property-card .property-gallery-slider,
  .property-card .property-gallery-slider .swiper-wrapper,
  .property-card .property-gallery-slider .swiper-slide,
  .property-card .property-gallery-slider .swiper-slide img {
    height: 100% !important;
  }

  /* ensure overlay and watermark cover the full height */
  .property-card .overlay,
  .property-card .watermark { height:100%; }
}

.listing-badge {
  position: absolute;
  top: var(--spacing-md);
  right: var(--spacing-md);
  background: var(--color-green);
  color: var(--color-white);
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  font-weight: bold;
  text-transform: uppercase;
}

.card-body { padding:16px; }

.card-title { font-size:1.05rem; margin-bottom:6px; color:var(--color-black); }
.card-location { color:var(--color-dark-grey); font-size:0.9rem; margin-bottom:8px; }

.tag { display:inline-block; padding:6px 8px; border-radius:8px; font-size:12px; margin-right:6px; }
.type-tag { background: #fff7e6; color:var(--color-dark-grey); }
.listing-tag { background: #e8f8f0; color:var(--color-green); }

.card-footer { margin-top:12px; display:flex; justify-content:flex-end; }
.view-details { background:var(--color-red); color:#fff; padding:8px 12px; border-radius:8px; text-decoration:none; }

.property-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.area { color:var(--color-dark-grey); font-size:13px; }

.property-area {
  color: var(--color-dark-grey);
  font-size: 0.875rem;
}

.property-footer {
  border-top: 1px solid var(--color-grey);
  padding-top: var(--spacing-sm);
}

.view-details {
  display: inline-block;
  color: var(--color-green);
  text-decoration: none;
  font-weight: bold;
}


.property-header {
  background: var(--color-grey);
  padding: var(--spacing-lg) 0;
}

/* Premium single property styles */
.single-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(2,6,23,0.12);
}

.single-hero .property-gallery-slider {
  height: 520px; /* larger hero */
}

.single-hero .swiper-slide img,
.single-hero .property-gallery-slider .swiper-slide img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  display: block;
}

.single-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(2,6,23,0.08) 0%, rgba(2,6,23,0.12) 40%, rgba(2,6,23,0.28) 100%);
  z-index: 1;
}

.single-price-badge {
  position: absolute;
  right: 24px;
  bottom: 24px;
  background: linear-gradient(90deg, var(--color-red), #c4302b);
  color: var(--color-white);
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 12px 30px rgba(196, 20, 20, 0.18);
  z-index: 4;
}

.single-hero .hero-tags { position:absolute; left:24px; top:24px; z-index:4; display:flex; gap:10px; }
.single-hero .hero-tags .tag { padding:8px 12px; border-radius:10px; font-weight:700; font-size:0.85rem; }

.property-details-card {
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 12px 30px rgba(2,6,23,0.06);
  background: linear-gradient(180deg, var(--color-white), #fbfbfb);
}

.agent-card {
  border-radius: 14px;
  padding: 20px;
  background: var(--color-white);
  box-shadow: 0 12px 30px rgba(2,6,23,0.06);
  text-align: center;
}
.agent-card .agent-photo { width:86px; height:86px; border-radius:50%; object-fit:cover; margin:0 auto 12px; }
.agent-card .agent-name { font-weight:700; font-size:1.05rem; margin-bottom:6px; }
.agent-card .agent-role { color:var(--color-dark-grey); font-size:0.95rem; }

.cta-btn { display:inline-block; padding:12px 18px; border-radius:10px; font-weight:700; text-decoration:none; }
.cta-primary { background:var(--color-red); color:var(--color-white); }
.cta-secondary { border:1px solid rgba(17,17,17,0.06); color:var(--color-black); background:var(--color-white); }

/* Amenities / features grid */
.amenities-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap:14px; }
.amenity { background: #fff; padding:10px 12px; border-radius:10px; display:flex; gap:10px; align-items:center; box-shadow: 0 6px 20px rgba(2,6,23,0.04); }
.amenity i { font-size:1.3rem; color:var(--color-red); }

/* Responsive tweaks */
@media (max-width: 900px) {
  .single-hero .property-gallery-slider,
  .single-hero .property-gallery-slider .swiper-slide img { height: 320px; }
  .single-price-badge { right: 16px; bottom: 16px; padding:10px 14px; font-size:1rem; }
}

/* Ensure sidebar agent card doesn't stretch and stays sticky on larger screens */
@media (min-width: 900px) {
  .agent-card { align-self: flex-start; position: sticky; top: 96px; }
}

.property-title-area {
  max-width: 800px;
}

.property-gallery {
  margin-bottom: var(--spacing-lg);
}

.property-main-image {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
}

.property-badges {
  display: flex;
  gap: var(--spacing-sm);
  margin-top: var(--spacing-sm);
}

.badge {
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--border-radius);
  font-size: 0.875rem;
  font-weight: bold;
}

.property-type-badge {
  background: var(--color-yellow);
  color: var(--color-black);
}

.listing-type-badge {
  background: var(--color-green);
  color: var(--color-white);
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.detail-item {
  display: flex;
  flex-direction: column;
}

.detail-label {
  color: var(--color-dark-grey);
  font-size: 0.875rem;
}

.detail-value {
  font-weight: bold;
}

/* Footer */
.site-footer { background:var(--color-black); color:var(--color-white); padding:36px 0 20px; }

.footer-top { display:grid; grid-template-columns:1fr 1fr 1fr; gap:24px; padding-bottom:20px; }
.footer-top h4, .footer-top h3 { color:#fff; }

.footer-bottom { border-top:1px solid rgba(255,255,255,0.06); padding-top:16px; text-align:center; }

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--spacing-lg);
  text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
  .menu-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--color-black);
    padding: var(--spacing-sm);
    cursor: pointer;
  }

  .primary-menu-container {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-sm);
  }

  .primary-menu-container.is-active {
    display: block;
  }

  .primary-menu {
    flex-direction: column;
  }

  .primary-menu li {
    margin: 0;
  }

  .primary-menu a {
    display: block;
    padding: var(--spacing-sm);
  }

  .hero h1 {
    font-size: 2rem;
  }

  .property-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

/* ==========================
   Single Property — polish
   ========================== */
.single-property { color: var(--color-dark-grey); padding-bottom: 60px; }
.single-property .container { max-width: 1180px; }

.single-hero { border-radius: 18px; overflow: hidden; position: relative; background: #111; }
.single-hero .property-gallery-slider { height: 520px; }
.single-hero .swiper-slide img { width:100%; height:520px; object-fit:cover; display:block; transition: transform .45s ease; }
.single-hero .swiper-slide img:hover { transform: scale(1.02); }
.single-hero .hero-overlay { position:absolute; inset:0; background: linear-gradient(180deg, rgba(3,6,23,0.04), rgba(3,6,23,0.12)); z-index:1; }

.single-hero .hero-inner { position: absolute; left: 32px; bottom: 28px; z-index: 5; color: #fff; text-shadow: 0 6px 18px rgba(0,0,0,0.5); }
.single-hero .hero-inner .title { font-size: 1.35rem; font-weight:700; letter-spacing:0.2px; }
.single-hero .hero-inner .meta { margin-top:8px; font-size:0.95rem; opacity:0.95; }

.single-price-badge {
  right: 28px;
  bottom: 28px;
  background: linear-gradient(90deg,var(--color-red),#b82b2b);
  color: var(--color-white);
  padding: 12px 18px;
  border-radius: 12px;
  font-weight:800;
  font-size:1.15rem;
  box-shadow: 0 18px 40px rgba(184,43,43,0.18);
  z-index: 6;
}

.property-details-card { background: linear-gradient(180deg, #ffffff, #fbfbfb); border-radius: 12px; padding:22px; box-shadow: 0 10px 30px rgba(10,12,20,0.04); }
.property-details-card h2 { margin-bottom:14px; color:var(--color-black); }
.property-details-card .detail-row { display:flex; gap:12px; align-items:center; padding:10px 0; border-bottom:1px solid rgba(17,17,17,0.04); }
.property-details-card .detail-row:last-child { border-bottom: none; }

.property-title-area h1 { font-size: 2rem; line-height: 1.1; margin-bottom:6px; }
.property-title-area .address { color: var(--color-dark-grey); margin-bottom:12px; }

.amenities-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap:12px; margin-top:8px; }
.amenity { display:flex; gap:12px; align-items:center; background:#fff; padding:12px; border-radius:10px; box-shadow: 0 6px 18px rgba(2,6,23,0.04); }
.amenity i { color: var(--color-red); font-size:1.25rem; min-width:22px; }
.amenity div { font-weight:600; color:var(--color-dark-grey); }

.agent-card { padding:22px; border-radius:12px; box-shadow: 0 12px 30px rgba(2,6,23,0.06); background: linear-gradient(180deg,#fff,#fafafa); }
.agent-card .agent-photo { width:96px; height:96px; border-radius:50%; object-fit:cover; margin:0 auto 12px; box-shadow: 0 6px 18px rgba(2,6,23,0.06); }
.agent-card .agent-name { font-weight:800; font-size:1.05rem; margin-bottom:2px; }
.agent-card .agent-role { color:var(--color-dark-grey); font-size:0.95rem; margin-bottom:12px; }
.agent-card .cta-btn { width:100%; display:block; margin-bottom:8px; }

/* make left content scroll while right stays compact */
.single-property .grid { align-items:start; }

/* Responsiveness */
@media (max-width: 900px) {
  .single-hero .property-gallery-slider, .single-hero .swiper-slide img { height: 320px; }
  .single-price-badge { right: 16px; bottom: 16px; padding:8px 12px; font-size:1rem; }
  .property-details-card { padding:16px; }
  .agent-card { position: static; margin-top:20px; }
}

/* subtle link/button styles */
.cta-btn { text-decoration:none; display:inline-block; padding:10px 14px; border-radius:8px; font-weight:700; }
.cta-primary { background: var(--color-red); color:#fff; }
.cta-secondary { background:#fff; border:1px solid rgba(17,17,17,0.06); color:var(--color-black); }

/* small refinements */
.property-details-card ul { margin-left: 18px; }
.property-details-card .text-gray-700 { color: #334155; }

/* ==========================
  Single Property — advanced polish
  ========================== */

/* Typography */
.single-property { font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; color: #293241; }
.single-property h1, .single-property h2, .single-property h3 { color: #0f172a; }

/* Hero enhancements */
.single-hero { position: relative; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 70px rgba(2,6,23,0.12); }
.single-hero .swiper { position:relative; }
.single-hero .hero-overlay { background: linear-gradient(180deg, rgba(2,6,23,0.06) 0%, rgba(2,6,23,0.08) 40%, rgba(2,6,23,0.36) 100%); backdrop-filter: blur(2px); }

/* Left overlay card on hero with title and badges */
.single-hero .hero-left-card { position:absolute; left:28px; top:28px; z-index:7; background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03)); padding:12px 16px; border-radius:12px; display:flex; gap:12px; align-items:center; backdrop-filter: blur(4px); }
.single-hero .hero-left-card .logo { width:56px; height:56px; border-radius:8px; background:rgba(255,255,255,0.06); display:flex; align-items:center; justify-content:center; font-weight:800; color:#fff; }
.single-hero .hero-left-card .meta { color:#fff; }
.single-hero .hero-left-card .meta .title { font-weight:800; font-size:1rem; }
.single-hero .hero-left-card .meta .sub { font-size:0.85rem; opacity:0.9; }

/* Thumbnail strip under hero */
.gallery-thumbs { display:flex; gap:8px; margin-top:12px; }
.gallery-thumbs img { width:96px; height:64px; object-fit:cover; border-radius:8px; border:2px solid rgba(255,255,255,0.06); cursor:pointer; transition: transform .2s ease, box-shadow .2s ease; }
.gallery-thumbs img:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(2,6,23,0.12); }

/* Stats row under title */
.property-stats { display:flex; gap:18px; align-items:center; margin-top:8px; color: rgba(15,23,42,0.85); }
.property-stats .stat { display:flex; gap:8px; align-items:center; font-weight:700; }
.property-stats .stat i { color:var(--color-red); font-size:20px; }

/* Details card micro UI */
.property-details-card { transition: transform .28s cubic-bezier(.2,.9,.2,1); }
.property-details-card:hover { transform: translateY(-6px); }
.detail-label { color:#475569; font-weight:600; }
.detail-value { color:#0f172a; font-weight:800; }

/* Amenities: badges with subtle gradient */
.amenity { background: linear-gradient(180deg,#fff,#fbfbfb); border:1px solid rgba(2,6,23,0.04); }
.amenity i { color:var(--color-red); background: rgba(211,50,50,0.08); padding:6px; border-radius:6px; }

/* Agent card: add social icons and subtle separator */
.agent-card .agent-contact { margin-top:10px; display:flex; gap:8px; }
.agent-card .agent-contact a { flex:1; text-align:center; padding:10px; border-radius:8px; font-weight:700; text-decoration:none; }
.agent-card .agent-contact a.call { background: linear-gradient(90deg,#ff6b6b,#d6362a); color:#fff; }
.agent-card .agent-contact a.email { background:#fff; border:1px solid rgba(2,6,23,0.06); color:#0f172a; }

/* Floating contact button on mobile */
.sim-floating-contact { position:fixed; right:18px; bottom:18px; z-index:1200; display:none; }
.sim-floating-contact a { display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:999px; background: linear-gradient(90deg,#ff6b6b,#d6362a); color:#fff; box-shadow: 0 12px 30px rgba(214,54,42,0.18); text-decoration:none; font-weight:800; }
@media (max-width:900px) { .sim-floating-contact { display:block; } }

/* Related properties */
.related-properties { margin-top:28px; }
.related-properties .property-card { transition: transform .28s ease; }
.related-properties .property-card:hover { transform: translateY(-8px); }

/* subtle animations */
.fade-in { animation: fadeInUp .6s ease both; }
@keyframes fadeInUp { from { opacity:0; transform: translateY(8px);} to { opacity:1; transform: translateY(0);} }



/* Forms */
.property-filter-form {
  display: flex;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.property-filter-form select,
.property-filter-form button {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--color-grey);
  border-radius: var(--border-radius);
  background: var(--color-white);
}

.property-filter-form button {
  background: var(--color-green);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  font-weight: bold;
}

.property-filter-form button:hover {
  background: var(--color-black);
}

/* Frontend submit form styles */
.sim-property-submit label { display:block; margin-bottom:8px; }
.sim-property-submit input.regular-text, .sim-property-submit textarea.large-text { width:100%; max-width:720px; padding:8px; border:1px solid #e2e8f0; border-radius:6px; }
.sim-property-submit .sim-amenities { display:flex; flex-wrap:wrap; gap:8px; }
.sim-property-submit .sim-amenity { background:#fff; padding:6px 10px; border-radius:6px; border:1px solid #e6edf3; }
.sim-gallery-preview { margin-top:10px; display:flex; gap:8px; flex-wrap:wrap; }
.sim-gallery-preview .sim-thumb { width:80px; height:80px; object-fit:cover; border-radius:6px; border:1px solid #ddd; }
.sim-form-errors .error { color:#b91c1c; background:#fff5f5; padding:8px; border-radius:4px; margin-bottom:6px; }
