/*
style.css for Villa Panorama del Mar landing page
Luxury real estate / boutique hospitality look
Responsive, elegant, modern, cinematic
Neutral palette: white, sand, charcoal, blue-grey accents
Comments included for easy customization
*/

:root {
  --white: #ffffff;
  --sand: #f7f3ee;
  --charcoal: #2d2d2d;
  --bluegrey: #a3b1c6;
  --accent: #e0d7c3;
  --primary: #2d2d2d;
  --secondary: #a3b1c6;
  --font-main: 'Montserrat', sans-serif;
  --font-title: 'Playfair Display', serif;
}

html {
  scroll-behavior: smooth;
}

/* Language toggle styles */
[data-lang="en"],
[data-lang="es"] {
  display: none;
}
body.lang-en [data-lang="en"] {
  display: inline;
}
body.lang-es [data-lang="es"] {
  display: inline;
}

/* Language toggle for block elements */
.brevo-form-wrapper[data-lang="en"],
.brevo-form-wrapper[data-lang="es"] {
  display: none;
}
body.lang-en .brevo-form-wrapper[data-lang="en"] {
  display: block;
}
body.lang-es .brevo-form-wrapper[data-lang="es"] {
  display: block;
}

body {
  font-family: var(--font-main);
  background: var(--sand);
  color: var(--primary);
  margin: 0;
  padding: 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  z-index: 100;
  transition: background 0.3s;
}
.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.logo {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.04em;
}
/* Navigation removed */

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.lang-btn {
  background: var(--white);
  color: var(--primary);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 0.3rem 0.8rem;
  font-size: 1rem;
  font-family: var(--font-main);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.lang-btn.active, .lang-btn:hover {
  background: var(--secondary);
  color: var(--white);
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #f7f3ee;
}
.hero__content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: var(--charcoal);
  padding: 4rem 0;
}
.hero__content h1 {
  font-family: var(--font-title);
  font-size: 3rem;
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
  color: var(--white);
}
.hero__content h2 {
  font-size: 1.4rem;
  font-weight: 400;
  margin-bottom: 2rem;
  color: var(--white);
}
.hero__cta {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-block;
  padding: 1rem 2rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 30px;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  cursor: pointer;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--secondary);
  color: var(--primary);
}
.btn-secondary {
  background: var(--accent);
  color: var(--primary);
}
.btn-secondary:hover {
  background: var(--secondary);
  color: var(--white);
}
.btn-header {
  padding: 0.6rem 1.4rem !important;
  font-size: 0.95rem !important;
  border-radius: 6px !important;
}

/* Section Headings */
h3 {
  font-family: var(--font-title);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

/* About Section */
.about p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--charcoal);
}

/* Features Section */
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}
.feature-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(163,177,198,0.08);
  padding: 2rem 1rem;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.feature-card:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: 0 6px 24px rgba(163,177,198,0.16);
}
.feature-card img {
  width: 160px;
  height: 100px;
  object-fit: cover;
  border-radius: 0%;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(163,177,198,0.12);
}
.feature-card h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.feature-card span {
  font-size: 0.95rem;
  color: var(--secondary);
}

/* Gallery Section */
/* Hero Background Slider */
.hero-bg-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}
.bg-slider-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.bg-slider-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  z-index: 1;
}
.bg-slider-img.active {
  opacity: 1;
  z-index: 2;
}
.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

/* Gallery Section */
.gallery {
  padding: 4rem 0;
}
.gallery h3 {
  text-align: left;
  margin-bottom: 3rem;
}

/* Gallery Slider */
.hero-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 3/2;
  background: #f7f3ee;
  overflow: hidden;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  max-height: 700px;
}
.slider-track {
  position: relative;
  width: 100%;
  height: 100%;
}
.slider-img {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 80%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  transition: opacity 0.5s, filter 0.3s;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}
.slider-img.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.7);
  border: none;
  color: var(--primary);
  font-size: 2.2rem;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  transition: background 0.2s;
}
.slider-btn:hover {
  background: var(--secondary);
  color: var(--white);
}
.slider-btn-prev {
  left: 18px;
}
.slider-btn-next {
  right: 18px;
}
@media (max-width: 900px) {
  .hero-slider, .slider-img {
    height: 32vh;
    min-height: 180px;
    max-height: 320px;
  }
}
@media (max-width: 600px) {
  .hero-slider, .slider-img {
    height: 22vh;
    min-height: 120px;
    max-height: 200px;
  }
  .slider-btn {
    width: 34px;
    height: 34px;
    font-size: 1.4rem;
  }
}

/* Accordion Sections */
.accordion-header {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 2px solid var(--accent);
  padding: 1.5rem 0;
  font-size: 1.2rem;
  font-family: var(--font-main);
  font-weight: 700;
  color: var(--charcoal);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}
.accordion-header:hover {
  color: var(--secondary);
}
.accordion-icon {
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.3s ease;
  display: inline-block;
}
.accordion-header.active .accordion-icon {
  transform: rotate(45deg);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0;
}
.accordion-content.show {
  max-height: 1000px;
  padding: 1.5rem 0;
}

/* Logistics, Rules, Location Sections */
ul {
  list-style: none;
  padding: 0;
}
ul li {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--charcoal);
}
ul li span {
  display: block;
  font-size: 0.95rem;
  color: var(--charcoal);
}
.location__distances {
  margin-top: 1rem;
}

/* Contact Section */
.brevo-form-wrapper {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  width: 100%;
  padding: 5rem 0;
}
.brevo-form-wrapper iframe {
  border-radius: 8px;
  min-height: 400px;
  width: 100%;
  max-width: 600px;
  border: none;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
  max-width: 500px;
}
.contact__form label {
  font-weight: 600;
  color: var(--primary);
}
.contact__form input,
.contact__form textarea {
  padding: 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--accent);
  font-size: 1rem;
  font-family: var(--font-main);
  background: var(--white);
  color: var(--primary);
}
.contact__form button {
  margin-top: 1rem;
}
.contact__info {
  margin-top: 2rem;
  font-size: 1rem;
  color: var(--secondary);
}

/* Footer */
.footer {
  background: var(--white);
  color: var(--primary);
  text-align: center;
  padding: 2rem 0 1rem 0;
  font-size: 1rem;
  border-top: 1px solid var(--accent);
}
.footer span {
  color: var(--secondary);
  font-size: 0.95rem;
}

/* Responsive Styles */
@media (max-width: 900px) {
  .container {
    padding: 0 1rem;
  }
  .header__container {
    height: 60px;
  }
  .hero__content h1 {
    font-size: 2.2rem;
  }
  h3 {
    font-size: 1.5rem;
  }
}
@media (max-width: 700px) {
  .nav ul {
    display: none;
    flex-direction: column;
    gap: 1rem;
    background: var(--white);
    position: absolute;
    top: 60px;
    right: 0;
    width: 220px;
    box-shadow: 0 2px 12px rgba(163,177,198,0.12);
    border-radius: 0 0 12px 12px;
    padding: 1rem 0;
    z-index: 99;
  }
  .nav.open ul {
    display: flex;
  }
  .nav-toggle {
    display: flex;
  }
  .header__container {
    flex-direction: row;
  }
  .hero__content {
    padding: 2rem 0;
  }
  .features__grid,
  .gallery__grid {
    grid-template-columns: 1fr;
  }
  .feature-card,
  .gallery-img {
    margin-bottom: 1rem;
  }
}
@media (max-width: 500px) {
  .hero__content h1 {
    font-size: 1.3rem;
  }
  .btn {
    padding: 0.7rem 1.2rem;
    font-size: 0.95rem;
  }
  .container {
    padding: 0 0.5rem;
  }
}

/* Subtle fade-in animation for sections */
section {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInSection 1s forwards;
  animation-delay: 0.2s;
}
section.visible {
  opacity: 1;
  transform: translateY(0);
}
@keyframes fadeInSection {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
