/* Core variables */
:root {
  --brand: #c62828; /* primary brand color (red) */
  --brand-light: #e53935; /* lighter brand tone */
  --accent: #37474f; /* dark grey for headings */
  --text: #424242; /* body text */
  --bg: #fafafa; /* background */
  --card-bg: #ffffff; /* card background */
  --border-radius: 8px;
  --transition: 0.3s ease;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
}

section {
  padding: 60px 5%;
}

h1, h2, h3 {
  color: var(--accent);
  margin-bottom: 20px;
}

/* Buttons */
.btn {
  display: inline-block;
  background-color: var(--brand);
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: var(--border-radius);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  font-size: 16px;
}

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

.btn:hover {
  opacity: 0.9;
}

/* Hero */
.hero {
  /* Updated hero image to use a real photo from the Kings of Ecoville folder */
  background-image: url('assets/kings7.png');
  background-size: cover;
  background-position: center;
  color: #fff;
  text-align: center;
  padding: 140px 10% 120px;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}
.hero-buttons .btn {
  margin: 10px;
}

/* Destaques */
.destaques .cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}
.destaques .card {
  background-color: var(--card-bg);
  padding: 20px;
  border-radius: var(--border-radius);
  flex: 1 1 200px;
  max-width: 220px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: var(--transition);
}
.destaques .card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

/* Unidades */
.unidades .unit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.unit-card {
  background-color: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: var(--transition);
}
.unit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}
.unit-card h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}
.unit-card .price {
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 10px;
  font-size: 1.1rem;
}
.unit-card ul {
  list-style: none;
  font-size: 0.9rem;
}
.unit-card li {
  margin-bottom: 5px;
}

/* Localização */
.localizacao .btn-copy {
  margin-top: 10px;
  margin-bottom: 20px;
  background-color: var(--accent);
  color: #fff;
}
.map-wrapper {
  overflow: hidden;
  border-radius: var(--border-radius);
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.proximidades {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  list-style: none;
  font-size: 0.9rem;
}
.proximidades li {
  background-color: var(--card-bg);
  padding: 8px 12px;
  border-radius: var(--border-radius);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* Galeria */
.galeria .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 15px;
}
.galeria img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: var(--transition);
}
.galeria img:hover {
  transform: scale(1.03);
}

/* Carousel styles */
.carousel {
  position: relative;
  max-width: 100%;
  margin: 20px auto;
  overflow: hidden;
}
.carousel .slides {
  display: flex;
  transition: transform 0.5s ease-in-out;
}
.carousel .slide {
  min-width: 100%;
  box-sizing: border-box;
  flex-shrink: 0;
}
.carousel .slide img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  cursor: pointer;
}
.carousel .prev, .carousel .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1;
}
.carousel .prev {
  left: 15px;
}
.carousel .next {
  right: 15px;
}
.carousel .dots {
  text-align: center;
  margin-top: 10px;
}
.carousel .dot {
  height: 12px;
  width: 12px;
  margin: 0 4px;
  display: inline-block;
  border-radius: 50%;
  background-color: #ccc;
  cursor: pointer;
  transition: background-color var(--transition);
}
.carousel .dot.active {
  background-color: var(--brand);
}

/* Modal styles for enlarged images */
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

/* Floor plan modal overrides */
.floor-plan-modal .floor-plan-content {
  margin: 5% auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}
.floor-plan-modal .floor-plan-content img {
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.modal-content {
  margin: 5% auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.close {
  position: fixed;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  z-index: 11;
}

/* Contato */
.contato {
  text-align: center;
}
.contact-buttons {
  margin-top: 20px;
}
.contact-buttons .btn {
  margin: 10px;
}
.link-ficha a {
  display: inline-block;
  margin-top: 15px;
  color: var(--brand);
  text-decoration: underline;
}

/* Footer */
.footer {
  background-color: var(--accent);
  color: #fff;
  text-align: center;
  padding: 20px 10%;
  font-size: 0.8rem;
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .galeria img {
    height: 160px;
  }
}