/* Nesta Cabins - Design System & Styles */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* --- CSS Custom Variables --- */
:root {
  --color-bg-primary: #FDFBF7;     /* Clean warm cream/off-white */
  --color-bg-secondary: #F3ECE0;   /* Sand clay warm beige */
  --color-pine: #233D33;           /* Deep luxury forest green */
  --color-pine-hover: #192D25;     /* Darker forest pine */
  --color-gold: #D4A373;           /* Warm earthy gold */
  --color-gold-hover: #C59262;     /* Darker gold */
  --color-text-main: #1E2522;      /* Off-black deep charcoal */
  --color-text-muted: #5C6762;     /* Warm muted olive-grey */
  --color-white: #FFFFFF;
  --color-success: #477664;
  --color-error: #BA5A5A;
  
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
  
  --shadow-subtle: 0 4px 30px rgba(35, 61, 51, 0.03);
  --shadow-premium: 0 20px 50px rgba(35, 61, 51, 0.08);
  --border-radius: 12px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-primary);
  color: var(--color-text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  color: var(--color-pine);
}

h2 {
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  color: var(--color-pine);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.5rem;
  color: var(--color-pine);
}

p {
  color: var(--color-text-muted);
  font-size: clamp(0.95rem, 1.1vw, 1.1rem);
  font-weight: 400;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--border-radius);
}

/* --- Shared Components --- */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px auto;
}

.section-tag {
  display: inline-block;
  background-color: rgba(212, 163, 115, 0.15);
  color: var(--color-gold-hover);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background-color: var(--color-pine);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(35, 61, 51, 0.15);
}

.btn-primary:hover {
  background-color: var(--color-pine-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(35, 61, 51, 0.25);
}

.btn-accent {
  background-color: var(--color-gold);
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(212, 163, 115, 0.2);
}

.btn-accent:hover {
  background-color: var(--color-gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(212, 163, 115, 0.35);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-pine);
  border: 1px solid var(--color-pine);
}

.btn-outline:hover {
  background-color: rgba(35, 61, 51, 0.04);
  transform: translateY(-2px);
}

.btn-whatsapp {
  background-color: #25D366;
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp:hover {
  background-color: #20BA5A;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.35);
}

/* --- Navigation --- */
header {
  padding: 24px 0;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 10;
}

header .header-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-pine);
}

.logo span {
  color: var(--color-gold);
}

.nav-phone {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-pine);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- Hero Section --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-color: var(--color-bg-secondary);
  position: relative;
  overflow: hidden;
  padding-top: 120px;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(to right, rgba(243, 236, 224, 0.96) 35%, rgba(243, 236, 224, 0.8) 70%, rgba(243, 236, 224, 0.2) 100%), url('assets/hero.jpg');
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.hero-container {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 60px;
  align-items: center;
}

.hero-text {
  max-width: 600px;
}

.hero-text h1 {
  margin-bottom: 24px;
}

.hero-text p {
  font-size: 1.2rem;
  margin-bottom: 40px;
  font-weight: 300;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Float Form Card */
.hero-form-wrapper {
  z-index: 5;
}

.form-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: var(--shadow-premium);
  position: relative;
  border: 1px solid rgba(35, 61, 51, 0.04);
}

.form-card h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.form-card p {
  font-size: 0.9rem;
  margin-bottom: 30px;
}

/* --- Features Section --- */
.features-section {
  background-color: var(--color-bg-primary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 30px;
}

.feature-card {
  background-color: var(--color-white);
  padding: 40px 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-subtle);
  transition: var(--transition-smooth);
  border: 1px solid rgba(35, 61, 51, 0.02);
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-premium);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(35, 61, 51, 0.05);
  color: var(--color-pine);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px auto;
  transition: var(--transition-smooth);
}

.feature-card:hover .feature-icon {
  background-color: var(--color-pine);
  color: var(--color-white);
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 0.95rem;
}

/* --- Cabins Catalog Section --- */
.catalog-section {
  background-color: var(--color-bg-secondary);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.catalog-card {
  background-color: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  transition: var(--transition-smooth);
  border: 1px solid rgba(35, 61, 51, 0.02);
  display: flex;
  flex-direction: column;
}

.catalog-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-premium);
}

.catalog-img {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.catalog-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.catalog-card:hover .catalog-img img {
  transform: scale(1.08);
}

.catalog-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: var(--color-gold);
  color: var(--color-white);
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.catalog-content {
  padding: 30px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.catalog-rating {
  color: var(--color-gold);
  font-size: 0.85rem;
  display: flex;
  gap: 2px;
  margin-bottom: 10px;
}

.catalog-content h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.catalog-content p {
  font-size: 0.95rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.catalog-features {
  display: flex;
  gap: 15px;
  margin-bottom: 24px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(35, 61, 51, 0.08);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.catalog-features span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.catalog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.catalog-price {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--color-pine);
  font-weight: 700;
}

.catalog-price span {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

/* --- Estimator Widget Section --- */
.estimator-section {
  background-color: var(--color-bg-primary);
}

.estimator-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 50px;
  align-items: start;
}

.estimator-box {
  background-color: var(--color-white);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(35, 61, 51, 0.02);
}

.estimator-form-group {
  margin-bottom: 24px;
}

.estimator-form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: var(--color-pine);
}

.estimator-select, .estimator-range {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.estimator-select:focus {
  border-color: var(--color-pine);
}

/* Range slider styling */
.estimator-range-val {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 5px;
}

/* Checkboxes */
.estimator-checkboxes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.95rem;
}

.checkbox-label input {
  width: 18px;
  height: 18px;
  accent-color: var(--color-pine);
}

/* Estimate Summary Card */
.estimator-summary {
  background-color: var(--color-pine);
  color: var(--color-white);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-premium);
  position: sticky;
  top: 100px;
}

.estimator-summary h3 {
  color: var(--color-white);
  margin-bottom: 24px;
  font-size: 1.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 15px;
}

.summary-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.7);
}

.summary-item.total {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 15px;
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--color-gold);
  font-weight: 700;
}

/* --- FAQ Accordion Section --- */
.faq-section {
  background-color: var(--color-bg-secondary);
}

.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq-item {
  background-color: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(35, 61, 51, 0.02);
}

.faq-trigger {
  width: 100%;
  padding: 24px;
  background: none;
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  cursor: pointer;
  outline: none;
}

.faq-trigger h4 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-pine);
}

.faq-arrow {
  color: var(--color-gold);
  font-size: 1.2rem;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-arrow {
  transform: rotate(45deg); /* Forms a multiplication sign or just rotates */
}

.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.faq-content {
  padding: 0 24px 24px 24px;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  border-top: 1px solid rgba(35, 61, 51, 0.03);
}

/* --- Testimonials Section --- */
.testimonials-section {
  background-color: var(--color-bg-primary);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.testimonial-card {
  background-color: var(--color-white);
  padding: 40px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-subtle);
  border: 1px solid rgba(35, 61, 51, 0.02);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.testimonial-text {
  font-style: italic;
  color: var(--color-text-muted);
  margin-bottom: 24px;
  font-size: 1rem;
}

.testimonial-user {
  display: flex;
  align-items: center;
  gap: 15px;
}

.testimonial-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--color-bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-pine);
}

.testimonial-meta h4 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
}

.testimonial-meta span {
  font-size: 0.8rem;
  color: var(--color-gold);
}

/* --- Form Field Controls --- */
.form-group {
  position: relative;
  margin-bottom: 24px;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  background-color: #F8FAF8;
  border: 1px solid #E2EAF2;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-main);
  outline: none;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--color-pine);
  background-color: var(--color-white);
  box-shadow: 0 0 0 3px rgba(35, 61, 51, 0.08);
}

.form-label {
  position: absolute;
  top: 14px;
  left: 16px;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: var(--transition-fast);
}

/* Float labels */
.form-control:focus ~ .form-label,
.form-control:not(:placeholder-shown) ~ .form-label {
  top: -10px;
  left: 10px;
  font-size: 0.75rem;
  color: var(--color-pine);
  background-color: var(--color-white);
  padding: 0 6px;
  font-weight: 600;
}

.form-control.error {
  border-color: var(--color-error);
}

.form-control.success {
  border-color: var(--color-success);
}

.error-message {
  color: var(--color-error);
  font-size: 0.75rem;
  position: absolute;
  bottom: -18px;
  left: 4px;
  opacity: 0;
  transition: var(--transition-fast);
}

.form-control.error ~ .error-message {
  opacity: 1;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Success Overlay (Lead Capture) */
.success-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-white);
  border-radius: var(--border-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
  z-index: 10;
}

.success-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.success-icon {
  width: 70px;
  height: 70px;
  background-color: rgba(71, 118, 100, 0.1);
  color: var(--color-success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 20px;
}

.success-overlay h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

/* --- Footer --- */
footer {
  background-color: var(--color-pine);
  color: var(--color-white);
  padding: 40px 0;
  text-align: center;
  font-size: 0.9rem;
}

footer p {
  color: rgba(255, 255, 255, 0.5);
  margin-top: 5px;
}

/* --- Floating WhatsApp CTA --- */
.whatsapp-float {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background-color: #25D366;
  color: var(--color-white);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.3);
  z-index: 999;
  font-size: 1.8rem;
  transition: var(--transition-smooth);
}

.whatsapp-float:hover {
  transform: scale(1.1) rotate(5deg);
  background-color: #20BA5A;
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.55);
}

.whatsapp-float::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid #25D366;
  animation: pulse-ring 2s infinite;
  pointer-events: none;
  opacity: 0.7;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 60px;
    text-align: center;
  }
  
  .hero-ctas {
    justify-content: center;
  }
  
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .estimator-grid {
    grid-template-columns: 1fr;
  }
  
  .estimator-summary {
    position: static;
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
  
  .estimator-checkboxes {
    grid-template-columns: 1fr;
  }
  
  .faq-trigger {
    padding: 20px;
  }
  
  .form-card {
    padding: 30px 20px;
  }
}
