/* Base Styles */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.4286;
  background-color: #515151;
  text-align: center;
  font-weight: normal;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: normal;
  line-height: 1.1;
  color: #333;
}
h1 { font-size: 45px; line-height: 48px; }
h2 { font-size: 36px; line-height: 40px; }
h3 { font-size: 30px; line-height: 32px; }
h4 { font-size: 26px; line-height: 28px; }
h5 { font-size: 20px; line-height: 24px; }
h6 { font-size: 18px; line-height: 22px; }

/* Links */
a {
  color: black;
  text-decoration: none;
}
a:hover, a:focus {
  color: #3282e6;
  text-decoration: underline;
}

/* Navigation (same as homepage.css */
nav.site-nav {
  background-color: #333;
  font-size: 18px;
  position: relative;
  z-index: 1000;
}

/* Desktop nav */
nav.site-nav .nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

nav.site-nav .nav-list li a {
  display: block;
  color: white;
  padding: 14px 16px;
  transition: color 0.3s ease;
}

nav.site-nav .nav-list li a:hover {
  color: #3282e6;
}

/* Hamburger Menu Button (dark version) */
.menu-toggle {
  display: none; /* Hidden on desktop */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  position: absolute;
  top: 10px;
  right: 20px;
  cursor: pointer;
  z-index: 1100;
  background-color: rgba(255,255,255,0.75); /* subtle backdrop */
  border-radius: 6px;
  border: none;
}

.menu-toggle .bar {
  height: 3px;
  width: 25px;
  background-color: #515151;
  margin: 4px 0;
  transition: all 0.3s ease;
}

/* ========================================
   Mobile Navigation
======================================== */
@media (max-width: 768px) {
  /* Show hamburger */
  .menu-toggle {
    display: flex;
  }

  /* Hide nav by default */
  nav.site-nav .nav-list {
    display: none;
    flex-direction: column;
    align-items: center;
    background-color: #333;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
    text-align: center;
    z-index: 999;
  }

  /* Show nav when toggled */
  nav.site-nav .nav-list.showing {
    display: flex;
  }

  nav.site-nav .nav-list li {
    border-top: 1px solid #444;
    width: 100%;
  }

  nav.site-nav .nav-list li a {
    padding: 14px;
    display: block;
    width: 100%;
  }
}

/* Animate hamburger to "X" */
.menu-toggle.open .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.open .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Mobile View --- */
@media (max-width: 768px) {
  /* hide nav links by default */
  nav ul {
    display: none;
    flex-direction: column;
    background-color: #333;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
    text-align: center;
    z-index: 999;
  }

  /* when .showing is added via JS */
  nav ul.showing {
    display: flex;
  }

  /* show the hamburger */
  .menu-toggle {
    display: flex;
  }

  nav ul li {
    border-top: 1px solid #444;
  }

  nav ul li a {
    padding: 14px;
    display: block;
  }
}

/* animate hamburger to X */
.menu-toggle.open .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.open .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Containers */
.container {
  margin: 48px auto 0;
  max-width: 90%;
  padding: 0 10px;
}

/* Footer */
.footer {
  position: relative;
  height: 60px;
  clear: both;
  text-align: center;
  font-size: 14px;
  margin-top: 80px;
}

/* Reset images globally */
img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0;
  margin: 0;
  box-sizing: border-box;
}

/* Properties Grid */
.properties-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 40px;
  margin: 40px auto 60px;
  color: #515151;
  max-width: 1400px;
  padding: 0 10px;
  box-sizing: border-box;
}

.properties {
  width: 30%;
  background: #fff;
  border-radius: 8px;
  padding: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: auto;
  text-align: center;
  position: relative;
  box-sizing: border-box;
}

.properties .meta {
  margin-top: auto;
  width: 100%;
}

.properties h5 {
  margin-top: 5px;
  margin-bottom: 4px;
  line-height: .5;
}
.properties h6 {
  margin-top: 4px;
  margin-bottom: 4px;
  line-height: 1.1;
}
.properties p {
  margin-top: 4px;
}

/* Mini Property Carousel */
.property-carousel {
  margin: 0 auto;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  width: 100%;
  aspect-ratio: 1:1;
  border-radius: 10px;
}

.property-carousel .carousel-slide {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.property-carousel .carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

.property-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

/* Align text under carousel consistently */
.properties .meta {
  text-align: center;
  margin-top: 10px;
}

/* Carousel Buttons */
.property-carousel .carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  background-color: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 18px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.property-carousel .carousel-btn:hover {
  background-color: rgba(0,0,0,0.8);
}
.property-carousel .carousel-btn.prev { left: 8px; }
.property-carousel .carousel-btn.next { right: 8px; }

/* Round standalone property images */
.properties > img,
.property-carousel {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  object-fit: cover;
  margin-bottom: 20px; /* consistent gap under both */
}

/* Footer */
footer {
  background-color: #333;
  color: white;
  padding: 25px 10px;
  font-size: 14px;
  text-align: center;
  margin-top: 80px;
  border-top: 4px solid #3282e6;
  width: auto;
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
  .properties {
    width: 45%;
  }
  .property-carousel {
    max-width: 100%;
    aspect-ratio: 1 / 1;
  }
}

@media (max-width: 600px) {
  .properties {
    width: 90%;
  }
  .property-carousel {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1 / 1;
  }
  button, 
  .contact-button, 
  a.contact-button {
    width: calc(100% - 20px);
  }
  .property-carousel .carousel-btn {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
}

