/* ==========================================
   OLIVO AMBIENTAL - Paleta Natural
   ========================================== */
:root {
  /* Verdes naturales */
  --forest-green: #2d5a27;
  --sage: #7d9b76;
  --mint: #a8d5ba;
  --fern: #4a7c59;
  --lime: #b5c99a;
  
  /* Tierras y neutros */
  --earth-brown: #5c4033;
  --sand: #e8dcc4;
  --cream: #f5f0e8;
  --ivory: #faf8f5;
  
  /* Acentos */
  --sky-blue: #7eb8da;
  --ocean-teal: #3d8b7d;
  
  /* Sombras suaves */
  --shadow-soft: 0 4px 30px rgba(45, 90, 39, 0.08);
  --shadow-hover: 0 20px 60px rgba(45, 90, 39, 0.15);
  
  /* Transiciones estilo Apple */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --transition-smooth: 0.6s var(--ease-out-expo);
  --transition-fast: 0.3s var(--ease-out-quart);
}

/* ==========================================
   Reset y Base
   ========================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--ivory);
  color: var(--earth-brown);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ==========================================
   Header - Banner Transparente con Logo Centrado
   ========================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: 1.25rem 3rem;
  background: transparent;
  transition: background var(--transition-fast), backdrop-filter var(--transition-fast);
}

.header.scrolled {
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(45, 90, 39, 0.06);
}

.nav {
  display: flex;
  gap: 2.5rem;
}

.nav-left {
  justify-content: flex-end;
}

.nav-right {
  justify-content: flex-start;
}

.nav-link {
  color: #000;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.nav-link:hover {
  color: #333;
  transform: translateY(-2px);
}

.header.scrolled .nav-link {
  color: #000;
}

.header.scrolled .nav-link:hover {
  color: #333;
}

.logo-container {
  display: flex;
  justify-content: center;
  min-width: 180px;
}

.logo {
  display: block;
  text-decoration: none;
  transition: transform var(--transition-smooth);
}

.logo:hover {
  transform: scale(1.05);
}

.logo-img {
  display: block;
  max-height: 85px;
  width: auto;
  object-fit: contain;
}

.logo-fallback {
  display: none;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: #000;
  white-space: nowrap;
}

/* Menú hamburguesa - solo visible en móvil */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 1002;
  transition: opacity var(--transition-fast);
}

.menu-toggle:hover {
  opacity: 0.8;
}

/* Header sobre overlay/menú para que el botón cerrar sea clickeable */
.header.menu-open {
  z-index: 10001;
}

.menu-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #000;
  border-radius: 1px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.header.menu-open .menu-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header.menu-open .menu-toggle-bar:nth-child(2) {
  opacity: 0;
}

.header.menu-open .menu-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Overlay del menú móvil - capa independiente, encima de todo */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9998;
  opacity: 0;
  transition: opacity var(--transition-fast);
  pointer-events: none;
}

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

/* Menú móvil - fondo sólido, independiente del scroll, sin bugs visuales */
.nav-mobile {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(280px, 85vw);
  padding: 5rem 1.5rem 2rem;
  background: #ffffff !important;
  background-color: #ffffff !important;
  box-shadow: 4px 0 40px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  flex-direction: column;
  gap: 0.5rem;
  transform: translateX(-100%);
  transition: transform var(--transition-smooth);
  isolation: isolate;
  -webkit-overflow-scrolling: touch;
}

.nav-mobile.active {
  transform: translateX(0);
}

.nav-link-mobile {
  display: block;
  padding: 1rem 1.25rem;
  color: #1a1a1a !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 12px;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.nav-link-mobile:hover,
.nav-link-mobile:focus {
  background: rgba(45, 90, 39, 0.08);
  color: var(--forest-green);
}

/* Mobile nav */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }
  
  .nav-left,
  .nav-right {
    display: none;
  }
  
  .header {
    padding: 1rem 1.25rem;
    grid-template-columns: 1fr auto 1fr;
  }
  
  .logo-container {
    grid-column: 2;
    justify-self: center;
    min-width: auto;
  }
  
  .logo-img {
    max-height: 64px;
  }
  
  .logo-fallback {
    font-size: 1.15rem;
  }
  
  .nav-overlay,
  .nav-mobile {
    display: flex;
  }
}

/* Responsive móvil - ajustes adicionales */
@media (max-width: 768px) {
  .section {
    padding: 4rem 1.25rem;
  }
  
  .section-header {
    margin-bottom: 2.5rem;
  }
  
  .section-title {
    font-size: clamp(1.75rem, 6vw, 2.5rem);
  }
  
  .section-tag {
    font-size: 0.8rem;
  }
  
  .hero-content {
    padding: 1.5rem 1rem;
  }
  
  .hero-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }
  
  .hero-subtitle {
    font-size: clamp(0.95rem, 3.5vw, 1.1rem);
    margin-bottom: 2rem;
  }
  
  .hero-cta {
    padding: 0.9rem 2rem;
    font-size: 0.95rem;
  }
  
  .scroll-indicator {
    bottom: 1.5rem;
  }
  
  .about-card,
  .service-card {
    padding: 1.75rem;
  }
  
  .about-card h3,
  .service-card h3 {
    font-size: 1.35rem;
  }
  
  .gallery-section {
    padding: 3rem 0;
  }
  
  .gallery {
    padding: 0 1rem;
    gap: 0.75rem;
  }
  
  .impact {
    padding: 4rem 1.25rem;
  }
  
  .impact-title {
    font-size: clamp(1.6rem, 6vw, 2.25rem);
  }
  
  .stats-grid {
    gap: 2rem;
  }
  
  .stat-number {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }
  
  .stat-suffix {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }
  
  .contact-grid {
    gap: 2.5rem;
  }
  
  .contact-info h2 {
    font-size: 1.75rem;
  }
  
  .footer {
    padding: 2.5rem 1.25rem;
  }
  
  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0.875rem 1rem;
  }
  
  .logo-img {
    max-height: 58px;
  }
  
  .menu-toggle {
    width: 40px;
    height: 40px;
  }
  
  .section {
    padding: 3rem 1rem;
  }
  
  .hero-content {
    padding: 1rem 0.75rem;
  }
  
  .hero-title {
    font-size: clamp(2rem, 11vw, 3rem);
  }
  
  .about-grid {
    gap: 1.25rem;
  }
  
  .about-card,
  .service-card {
    padding: 1.5rem;
  }
  
  .nav-mobile {
    width: min(260px, 90vw);
    padding: 4.5rem 1.25rem 1.5rem;
  }
}

/* ==========================================
   Hero - Paisaje Natural
   ========================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
}

.hero-image {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=1920&q=85');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.05);
  animation: kenburns 20s ease-out infinite alternate;
}

@keyframes kenburns {
  0% { transform: scale(1.05) translate(0, 0) rotate(0deg); }
  100% { transform: scale(1.15) translate(-2%, -2%) rotate(0.5deg); }
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(45, 90, 39, 0.2) 0%,
    rgba(61, 139, 125, 0.3) 40%,
    rgba(45, 90, 39, 0.7) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 800px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3rem, 10vw, 5.5rem);
  font-weight: 600;
  color: white;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.hero-title-line {
  display: block;
  opacity: 0;
  transform: translateY(100%);
  animation: revealUp 1s var(--ease-out-expo) forwards;
}

.hero-title-line:nth-child(1) { animation-delay: 0.3s; }
.hero-title-line:nth-child(2) { animation-delay: 0.5s; }

@keyframes revealUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 2.5rem;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s var(--ease-out-expo) 0.7s forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-cta {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: white;
  color: var(--forest-green);
  text-decoration: none;
  font-weight: 600;
  border-radius: 50px;
  transition: all var(--transition-smooth);
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s var(--ease-out-expo) 0.9s forwards;
}

.hero-cta:hover {
  background: var(--mint);
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-hover);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-arrow {
  display: block;
  width: 24px;
  height: 24px;
  border-right: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(45deg);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); }
  50% { transform: rotate(45deg) translate(4px, 4px); }
}

/* ==========================================
   Secciones Comunes
   ========================================== */
.section {
  padding: 6rem 2rem;
}

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

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--fern);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--forest-green);
}

/* Reveal animation base */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================
   Sobre Nosotros
   ========================================== */
.about {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--cream) 100%);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.about-card {
  background: white;
  padding: 2.5rem;
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  transition: all var(--transition-smooth);
}

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

.about-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.about-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--forest-green);
  margin-bottom: 0.75rem;
}

.about-card p {
  color: var(--earth-brown);
  opacity: 0.9;
}

/* ==========================================
   Galería de Paisajes
   ========================================== */
.gallery-section {
  padding: 4rem 0;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: 20px;
  overflow: hidden;
}

.gallery-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 1s var(--ease-out-expo);
}

.gallery-item:hover .gallery-image {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 50%,
    rgba(45, 90, 39, 0.8) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.gallery-overlay span {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: white;
  transform: translateY(20px);
  transition: transform var(--transition-smooth);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-item:hover .gallery-overlay span {
  transform: translateY(0);
}

@media (max-width: 768px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   Servicios
   ========================================== */
.services {
  background: var(--cream);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  padding: 2.5rem;
  background: white;
  border-radius: 24px;
  border: 1px solid rgba(125, 155, 118, 0.2);
  transition: all var(--transition-smooth);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--sage);
  box-shadow: var(--shadow-soft);
}

.service-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--mint);
  line-height: 1;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--forest-green);
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--earth-brown);
  opacity: 0.9;
}

/* ==========================================
   Impacto
   ========================================== */
.impact {
  position: relative;
  padding: 6rem 2rem;
}

.impact-bg {
  position: absolute;
  inset: 0;
  background-image: url('https://images.unsplash.com/photo-1542601906990-b4d3fb778b09?w=1920&q=80');
  background-size: cover;
  background-position: center;
}

.impact-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(45, 90, 39, 0.9) 0%,
    rgba(61, 139, 125, 0.85) 100%
  );
}

.impact-content {
  position: relative;
  z-index: 2;
}

.impact-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  color: white;
  text-align: center;
  margin-bottom: 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  max-width: 900px;
  margin: 0 auto;
}

.stat {
  text-align: center;
}

.stat-number {
  font-size: clamp(3rem, 8vw, 4.5rem);
  font-weight: 700;
  color: white;
  display: block;
  line-height: 1;
}

.stat-suffix {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--mint);
}

.stat-label {
  display: block;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 0.5rem;
}

/* ==========================================
   Contacto
   ========================================== */
.contact {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--cream) 100%);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--forest-green);
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--earth-brown);
  margin-bottom: 2rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-details a {
  color: var(--fern);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--transition-fast);
}

.contact-details a:hover {
  color: var(--forest-green);
}

.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid rgba(125, 155, 118, 0.3);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--earth-brown);
  background: white;
  transition: border-color var(--transition-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--fern);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: var(--sage);
}

.btn-submit {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--forest-green);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-smooth);
}

.btn-submit:hover {
  background: var(--fern);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   Footer
   ========================================== */
.footer {
  background: var(--forest-green);
  color: white;
  padding: 3rem 2rem;
}

.footer-content {
  text-align: center;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-tagline {
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--mint);
}

/* ==========================================
   WhatsApp Floating Button
   ========================================== */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background-color: #25d366;
  color: white;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform var(--transition-smooth), background-color var(--transition-fast);
}

.whatsapp-float:hover {
  transform: scale(1.1) translateY(-5px);
  background-color: #128c7e;
  color: white;
}

.whatsapp-icon {
  width: 35px;
  height: 35px;
}

.whatsapp-link {
  display: inline-block;
  margin-top: 0.5rem;
  color: #25d366 !important;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition-fast);
}

.whatsapp-link:hover {
  color: #128c7e !important;
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
  }
  
  .whatsapp-icon {
    width: 28px;
    height: 28px;
  }
}

/* ==========================================
   Form Status & Loader
   ========================================== */
.form-status {
  padding: 1rem;
  margin-top: 1rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
  display: none;
  animation: fadeIn 0.3s ease-out;
}

.form-status.success {
  display: block;
  background-color: rgba(45, 90, 39, 0.1);
  color: var(--forest-green);
  border: 1px solid var(--forest-green);
}

.form-status.error {
  display: block;
  background-color: rgba(211, 47, 47, 0.1);
  color: #d32f2f;
  border: 1px solid #d32f2f;
}

.btn-submit {
  position: relative;
  overflow: hidden;
}

.btn-submit.loading .btn-text {
  opacity: 0;
}

.btn-submit.loading .btn-loader {
  display: block;
}

.btn-loader {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
