/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Playfair Display', serif;
  line-height: 1.6;
}

header {
  position: relative;
}

.top-nav {
  background-color: rgb(26, 22, 107);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
}

.logo {
  font-weight: bold;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
  justify-content: center;
  flex: 2;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
}

.nav-container{
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav ul{
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a{
  position: relative;
  text-decoration: none;
  color: white;
  font-weight: bold;
}

nav a::after{
  content: "";
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 8px;
  height: 8px;
  background-color: currentColor;
  transform: translateX(-50%) rotate(45deg) scale(0);
  transition: transform 0.3s ease;
}

nav a:hover::after{
  transform: translateX(-50%) rotate(45deg) scale(1);
}

nav a.active::after{
  transform: translateX(-50%) rotate(45deg) scale(1) !important;
}

.hamburger {
  top: 1rem;
  right: 1rem;
  z-index: 9999;
  background: rgb(26, 22, 107);
  color: white;
  border: none;
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 2rem;
}

.side-menu {
  position: absolute;
  top: 0;
  right: -250px;
  width: 200px;
  height: 100vh;
  background-color: #ccc;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: right 0.3s ease-in-out;
  z-index: 9999;
}

.side-menu a{
  text-decoration: none;
  color: black;
}

.side-menu.show {
  right: 0;
}

.close-btn {
  font-size: 1.5rem;
  font-weight: bold;
  color: black;
  cursor: pointer;
  align-self: flex-end;
}

.close-btn:hover {
  color: rgb(26, 22, 107);
}

.side-menu.show a {
  position: relative;
  display: inline-block;
  padding: 0.5rem 1rem;
  color: black;
  text-decoration: none;
}

/* diamond hover effect */
.side-menu.show a::after {
  content: "";
  position: absolute;
  left: 28%;
  bottom: -10px;
  width: 8px;
  height: 8px;
  background: currentColor;
  transform: translateX(-50%) rotate(45deg) scale(0.6);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.side-menu.show a:hover::after {
  opacity: 1;
  transform: translateX(-50%) rotate(45deg) scale(1);
  color: black;
}


/* Hero Section */
.hero {
  position: relative;
  height: 75vh;
  overflow: hidden;
}

.hero-slides {
  position: relative;
  height: 100%;
}

.hero-slides .slide {
  position: absolute;   /* stack on top of each other */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;           /* hidden by default */
  transition: opacity 2s ease-in-out; /* smooth fade */
}

.hero-slides .slide.active {
  opacity: 0.5;           /* only active one is visible */
}

.hero h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: black;
  font-size: clamp(1.5rem, 5vw, 3rem);
  z-index: 2;
  padding: 0 10px;
  text-align: center;
  white-space: nowrap;
}


.hero img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 1rem;
  }

/* Toggle styling */

.listing-search {
  margin-bottom: 3rem; /* adds space below the whole section */
} 

.listing-search .listing-toggle {
  margin: 1rem 0;
  text-align: center;
  font-size: 1.2rem;
}

.listing-search .listing-toggle span {
  margin: 0 1.5rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  transition: color 0.3s, border-bottom 0.3s;
}

.listing-search .listing-toggle .active {
  color: black;
  font-weight: bold;
}

/* Search bar styling */
.listing-search .search-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap; /* ✅ prevents overflow on small screens */
}

.search-bar input {
  padding: 0.75rem 1rem;
  width: 250px;
  max-width: 100%;
  border: 1px solid #ccc;
  border-radius: 8px;
  outline: none;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.search-bar input:focus {
  border-color: #0077cc;
}

.search-bar button {
  padding: 0.75rem 1.5rem;
  background-color: #0077cc;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

.search-bar button:hover {
  background-color: #005fa3;
}


/* Footer */
footer {
  background-color: rgb(26, 22, 107);
  color: white;
  padding: 2rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
}

.contact-info {
  font-size: 0.9rem;
}

.socials a {
  margin: 0 0.5rem;
  font-size: 2rem;
  color: white;
  text-decoration: none;
  position: center;
}

.back-to-top {
  background: white;
  color: black;
  padding: 0.5rem 1rem;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* about section */
.about {
  padding: 4rem 2rem;
  background: #f9f9f9;
}

.about-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.about-logo img {
  max-width: 450px;
  height: auto;
}

.about-text {
  flex: 1;
}

.about-text h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Listings Page */
.listings-page {
  padding: 2rem;
  text-align: center;
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.listing-card {
  border: 1px solid #ccc;
  padding: 1rem;
  background: white;
}
.listing-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  margin-bottom: 0.5rem;
}
.listing-card p {
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Agents Page */
.agents-page {
  padding: 2rem;
  text-align: center;
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}
.agent-card {
  border: 1px solid #ccc;
  padding: 1rem;
  background: white;
}
.agent-card img {
  width: 100%;
  height: 500px;
  object-fit: cover;
  margin-bottom: 0.5rem;
}
.agent-card p {
  font-size: 0.9rem;
  line-height: 1.4;
}


/* Contact Section */
.contact {
  text-align: center;
  padding: 60px 20px;
}

.contact h1 {
  font-size: 36px;
  margin-bottom: 40px;
}

.contact-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.contact-form input,
.contact-form textarea {
  flex: 1;
  padding: 12px;
  border: none;
  background: #ddd;
  font-size: 16px;
}

.contact-form textarea {
  width: 100%;
  resize: none;
}

.contact-form button {
  display: block;
  margin: 20px auto;
  padding: 12px 40px;
  border: none;
  background: black;
  color: white;
  font-size: 18px;
  border-radius: 20px;
  cursor: pointer;
}

.contact-form button:hover {
  background: #444;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: block;
  }
}

@media (max-width: 768px) {
  .about-container {
    flex-direction: column;
    text-align: center;
  }

  .about-logo img {
    margin-bottom: 1rem;
  }
}
