/* 
  🏔️ TREKKING CON FEDE — DESIGN SYSTEM
  Sierras de Córdoba Palette
*/

:root {
  /* Paleta de colores */
  --color-tierra: #8B5E3C;       /* Tierra cordobesa */
  --color-sierra: #4A7C59;       /* Verde bosque serrano */
  --color-cielo: #87CEEB;        /* Cielo Córdoba */
  --color-roca: #6B7280;         /* Gris piedra */
  --color-crema: #F5F0E8;        /* Fondo cálido */
  --color-blanco-sierra: #FAFAF7; /* Blanco natural */
  --color-acento: #D97706;        /* Naranja atardecer serrano */
  --color-texto: #1F2937;         /* Texto oscuro principal */
  --color-texto-suave: #6B7280;   /* Texto secundario */
  
  /* Fuentes */
  --font-titles: 'Playfair Display', serif;
  --font-body: 'Nunito', sans-serif;
  
  /* Escala fluida */
  --font-size-base: 16px;
  --spacing-unit: clamp(1rem, 2vw, 2.5rem);
}

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

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-texto);
  background-color: var(--color-crema);
  background-image: 
    radial-gradient(circle at 2px 2px, rgba(139, 94, 60, 0.05) 1px, transparent 0);
  background-size: 40px 40px;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-titles);
  color: var(--color-tierra);
  line-height: 1.2;
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  z-index: 1000;
  transition: all 0.3s ease-in-out;
  background: transparent;
}

.navbar.scrolled {
  background: rgba(250, 250, 247, 0.85); /* Blanco sierra con transparencia */
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
  font-family: var(--font-titles);
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--color-tierra);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-texto);
  font-weight: 600;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--color-acento);
}

.btn-acento {
  background-color: var(--color-acento);
  color: white !important;
  padding: 0.5rem 1.25rem;
  border-radius: 50px;
  transition: transform 0.3s, background-color 0.3s;
}

.btn-acento:hover {
  transform: translateY(-2px);
  background-color: #b45309;
}

/* Mobile Menu */
.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--color-tierra);
  border-radius: 3px;
  transition: 0.3s;
}

/* WhatsApp Float */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 30px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
  z-index: 1000;
  text-decoration: none;
  transition: transform 0.3s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

/* Hero Section */
.hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  overflow: hidden;
  background: url('../img/hero.jpg') no-repeat center center/cover;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 5%;
}

.hero h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  color: white;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  margin-bottom: 2rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-ctas {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-primary, .cta-secondary {
  padding: 0.8rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  transition: 0.3s;
}

.cta-primary {
  background-color: var(--color-acento);
  color: white;
}

.cta-secondary {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.4);
}

.cta-primary:hover {
  background-color: #b45309;
  transform: translateY(-3px);
}

.cta-secondary:hover {
  background-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
}

/* Sections */
.section-padding {
  padding: 5rem 5%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: var(--color-sierra);
  margin: 10px auto 0;
  border-radius: 2px;
}

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

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  background: white;
  border-radius: 15px;
  border: 2px dashed var(--color-roca);
  color: var(--color-texto-suave);
}

/* Steps */
.steps-bg {
  background-color: var(--color-blanco-sierra);
  border-radius: 50px;
}

.steps-container {
  display: flex;
  justify-content: space-around;
  gap: 2rem;
  flex-wrap: wrap;
}

.step-card {
  flex: 1;
  min-width: 250px;
  text-align: center;
  padding: 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.step-card:hover {
  transform: translateY(-10px);
}

.step-icon {
  font-size: 3rem;
  margin-bottom: 1.5rem;
}

/* About */
.about-section {
  text-align: center;
}

.about-content {
  max-width: 800px;
  margin: 0 auto;
}

.about-content p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* Footer */
.footer {
  background-color: var(--color-tierra);
  color: white;
  padding: 4rem 5%;
  text-align: center;
  position: relative;
  overflow: hidden;
}

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

.footer-links a {
  color: white;
  text-decoration: none;
  opacity: 0.8;
  transition: 0.3s;
}

.footer-links a:hover {
  opacity: 1;
}

/* Fauna Animations */
.condor-wrap {
  position: absolute;
  top: 20%;
  right: -150px;
  width: 150px;
  z-index: 10;
  pointer-events: none;
}

.condor-svg {
  width: 100%;
}

@keyframes flyAcross {
  0% { transform: translateX(0) translateY(0); }
  25% { transform: translateX(-30vw) translateY(50px); }
  50% { transform: translateX(-60vw) translateY(-20px); }
  75% { transform: translateX(-90vw) translateY(30px); }
  100% { transform: translateX(-120vw) translateY(0); }
}

.zorro-wrap {
  position: absolute;
  bottom: 0;
  left: -100px;
  width: 80px;
  pointer-events: none;
}

@keyframes zorroWalk {
  0% { left: -100px; }
  100% { left: 110%; }
}

.pajarito {
  position: absolute;
  width: 20px;
  height: 20px;
  fill: var(--color-cielo);
  animation: flutter 3s infinite alternate ease-in-out;
}

@keyframes flutter {
  0% { transform: translate(0, 0) rotate(0); }
  100% { transform: translate(50px, -30px) rotate(10deg); }
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  grid-auto-rows: 200px;
  grid-auto-flow: dense;
  gap: 15px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Falsy masonry logic with spans */
.gallery-item.wide { grid-column: span 2; }
.gallery-item.tall { grid-row: span 2; }

/* Lightbox Refined */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0,0,0,0.92);
  z-index: 4000;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.lightbox.active {
  display: flex;
}

.lightbox-content-wrap {
  position: relative;
  width: 95vw;
  height: 90vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

#lightbox-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.8);
  transition: opacity 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: 25px;
  right: 25px;
  color: #fff;
  font-size: 3rem;
  font-weight: bold;
  cursor: pointer;
  z-index: 4010;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  transition: transform 0.3s;
}

.lightbox-close:hover {
  transform: scale(1.2);
  color: var(--color-acento);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 40px;
  pointer-events: none;
  z-index: 4005;
}

.nav-btn {
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  cursor: pointer;
  pointer-events: auto;
  border-radius: 50%;
  transition: all 0.3s;
}

.nav-btn:hover {
  background: var(--color-acento);
  transform: scale(1.1);
}

/* Calendar Styling */
.calendar-container {
  background: white;
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.05);
}

.fc .fc-toolbar-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  color: var(--color-tierra);
}

.fc .fc-button-primary {
  background-color: var(--color-sierra);
  border-color: var(--color-sierra);
  border-radius: 50px;
  padding: 0.5rem 1.2rem;
}

.fc .fc-button-primary:hover {
  background-color: var(--color-acento);
  border-color: var(--color-acento);
}

.fc .fc-button-primary:disabled {
  background-color: var(--color-roca);
  border-color: var(--color-roca);
}

.fc-list-event {
  cursor: pointer;
}

.fc-list-event:hover td {
  background-color: var(--color-blanco-sierra) !important;
}

/* Form Styles */
.form-card {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: 3rem;
  border-radius: 25px;
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
  border: 1px solid rgba(0,0,0,0.05);
}

.trekking-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.form-group label {
  font-weight: 700;
  color: var(--color-tierra);
  font-size: 0.95rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
  padding: 1rem;
  border: 2px solid var(--color-roca);
  border-radius: 12px;
  font-family: inherit;
  font-size: 1rem;
  transition: 0.3s;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-sierra);
  box-shadow: 0 0 0 4px rgba(74, 124, 89, 0.1);
}

.cta-submit {
  background-color: var(--color-acento);
  color: white;
  border: none;
  padding: 1.2rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
  transition: 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1rem;
}

.cta-submit:hover {
  background-color: #b45309;
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(180, 83, 9, 0.3);
}

.cta-submit:disabled {
  background-color: var(--color-roca);
  cursor: not-allowed;
  transform: none;
}

/* Loader */
.loader {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

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

.form-feedback {
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  display: none;
}

.form-feedback.success {
  display: block;
  background-color: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.form-feedback.error {
  display: block;
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Page Headers */
.page-header {
  padding: 8rem 5% 4rem;
  text-align: center;
  background: linear-gradient(rgba(139, 94, 60, 0.05), rgba(74, 124, 89, 0.05));
}




/* Responsive Adjustments */
@media (max-width: 768px) {
  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    background: var(--color-blanco-sierra);
    padding: 6rem 2rem;
    gap: 2rem;
    transition: 0.4s ease-in-out;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1000;
  }

  .calendar-container {
    padding: 1rem;
    border-radius: 10px;
  }
  
  .fc .fc-toolbar-title {
    font-size: 1.2rem;
  }

  .fc .fc-button {
    padding: 0.3rem 0.6rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .section-padding {
    padding: 3rem 5%;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
}

/* Fauna & Animations Upgrade */
.condor-flying {
  position: absolute;
  top: 15%;
  left: -150px;
  width: 150px;
  height: 75px;
  background: url('https://img.icons8.com/ios-filled/100/3e2723/eagle.png') no-repeat center/contain;
  opacity: 0.5;
  filter: sepia(100%) hue-rotate(-20deg) saturate(300%);
  pointer-events: none;
  z-index: 5;
}

.bird-feather {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--color-acento);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  opacity: 0.6;
  pointer-events: none;
}

#zorro-container {
  position: absolute;
  bottom: 0px;
  left: -100px;
  width: 80px;
  height: 50px;
  background: url('https://img.icons8.com/color/96/fox.png') no-repeat center/contain;
  pointer-events: none;
  z-index: 100;
}

.sapo {
  position: absolute;
  width: 30px;
  height: 30px;
  background: url('https://img.icons8.com/color/48/frog.png') no-repeat center/contain;
  pointer-events: none;
  z-index: 10;
  display: none; /* Inyectado via JS */
}

.hiker {
  position: absolute;
  width: 40px;
  height: 40px;
  background: url('https://img.icons8.com/ios-filled/50/3e2723/trekking.png') no-repeat center/contain;
  opacity: 0.4;
  pointer-events: none;
  z-index: 5;
}

/* Animations Trigger Classes */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

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

/* refers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}
