/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Inter:wght@300;400;600&display=swap');

:root {
  --primary-color: #000000;
  --secondary-color: #ffffff;
  --accent-color: #D4AF37;
  /* Metallic Gold */
  --text-color: #333333;
  --light-gray: #f4f4f4;
  --dark-gray: #1a1a1a;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --transition-speed: 0.3s;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--text-color);
  line-height: 1.6;
  background-color: var(--secondary-color);
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  color: var(--primary-color);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-speed);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Header & Navigation */
header {
  background-color: var(--primary-color);
  color: var(--accent-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo img {
  height: 80px;
  /* Adjust based on actual logo ratio */
  margin-bottom: 1rem;
}

nav ul {
  display: flex;
  gap: 2rem;
}

nav a {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--secondary-color);
  position: relative;
}

nav a:hover,
nav a.active {
  color: var(--accent-color);
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--accent-color);
  transition: width var(--transition-speed);
}

nav a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  position: relative;
  height: 80vh;
  background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../assets/images/sunset.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--secondary-color);
}

.hero-content {
  max-width: 800px;
  animation: fadeIn 1.5s ease-out;
}

.hero h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: 2px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Sections General */
.section {
  padding: 5rem 0;
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.section-text {
  padding: 2rem;
}

.section-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.section-text h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 3px;
  background-color: var(--accent-color);
  margin-top: 10px;
}

.section-text p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #555;
  text-align: justify;
}

.section-image img {
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.5s;
}

.section-image img:hover {
  transform: scale(1.02);
}

/* Alternate order for variety */
.section-alt .section-grid {
  direction: rtl;
  /* Quick hack to swap columns for alternating layout */
}

.section-alt .section-grid>* {
  direction: ltr;
  /* Reset direction for content */
}

/* Amenities List */
.amenities-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.amenity-item {
  background: var(--light-gray);
  padding: 1rem;
  text-align: center;
  border-radius: 4px;
  font-weight: 600;
}

/* Testimonials */
.testimonials {
  background-color: var(--dark-gray);
  color: var(--secondary-color);
  text-align: center;
}

.testimonials h2 {
  color: var(--accent-color);
  margin-bottom: 3rem;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-color);
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #ccc;
  /* Placeholder if no face image */
  margin: 0 auto 1rem;
  object-fit: cover;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.author {
  color: var(--accent-color);
  font-weight: bold;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--secondary-color);
  padding: 3rem 0;
  text-align: center;
}

.footer-info p {
  margin-bottom: 0.5rem;
}

.social-links {
  margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  .section-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section-alt .section-grid {
    direction: ltr;
  }

  nav ul {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .header-top {
    margin-bottom: 1rem;
  }

  .language-switcher {
    position: static;
    margin-top: 1rem;
  }

  .header-top {
    flex-direction: column;
  }

  .logo {
    position: static;
    transform: none;
  }
}

/* Language Switcher */
.header-top {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: relative;
  margin-bottom: 1rem;
}

.language-switcher {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

#language-selector {
  padding: 0.5rem 1rem;
  border: 1px solid var(--accent-color);
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--accent-color);
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
  outline: none;
  transition: all 0.3s;
}

#language-selector:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

#language-selector option {
  background-color: var(--primary-color);
  color: var(--accent-color);
}

/* Page Title */
.page-title {
  background-color: var(--dark-gray);
  padding: 3rem 0;
  text-align: center;
}

.page-title h1 {
  color: var(--accent-color);
  font-size: 3rem;
  margin: 0;
}

/* Form Styles */
.form-container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: flex;
  gap: 1.5rem;
}

.form-row .form-group {
  flex: 1;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
input[type="tel"],
select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 1rem;
  background-color: white;
}

/* Phone Input Group */
.phone-input-group {
  display: flex;
  gap: 0.5rem;
}

.phone-input-group select {
  width: 180px;
  flex-shrink: 0;
}

.phone-input-group input[type="tel"] {
  flex: 1;
}

input.input-error {
  border-color: red;
  background-color: #fff8f8;
}

.error-message {
  color: red;
  font-size: 0.85rem;
  margin-top: 5px;
  display: block;
}

.btn {
  display: block;
  width: 100%;
  padding: 1rem;
  background-color: var(--primary-color);
  color: var(--accent-color);
  border: none;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s;
  text-transform: uppercase;
  margin-top: 1rem;
}

.btn:hover {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

/* Calculation Results */
.calculation-results {
  background-color: var(--light-gray);
  padding: 1.5rem;
  border-radius: 4px;
  margin-top: 1.5rem;
  border-left: 4px solid var(--accent-color);
}

.result-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.result-item.total-soles {
  margin-top: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

.result-item.total-usd {
  margin-top: 0.5rem;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--accent-color);
  /* Highlight USD */
}

/* Form Message */
.form-message {
  display: none;
  padding: 1rem;
  background-color: #e8f5e9;
  border: 1px solid #c8e6c9;
  color: #2e7d32;
  border-radius: 4px;
  text-align: center;
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), 0 2px 6px rgba(37, 211, 102, 0.4);
  z-index: 9999;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
  text-decoration: none;
  animation: whatsapp-pulse 2.5s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  background-color: #20ba5a;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 4px 10px rgba(37, 211, 102, 0.5);
  color: #ffffff;
  animation: none;
}

.whatsapp-float svg {
  width: 34px;
  height: 34px;
  fill: #ffffff;
}

.whatsapp-tooltip {
  position: absolute;
  right: 72px;
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
  font-family: var(--font-body, 'Inter', sans-serif);
}

.whatsapp-tooltip::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -6px;
  transform: translateY(-50%);
  border-width: 6px 0 6px 6px;
  border-style: solid;
  border-color: transparent transparent transparent #1a1a1a;
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
  }

  70% {
    box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 54px;
    height: 54px;
  }

  .whatsapp-float svg {
    width: 30px;
    height: 30px;
  }

  .whatsapp-tooltip {
    display: none;
  }
}