/* =============================================
   RAÍZ Y VARIABLES GLOBALES
   ============================================= */

:root {
  /* Paleta de colores */
  --primary-color: #2e7d32; /* Verde oscuro principal */
  --primary-color-light: #4caf50; /* Verde más claro */
  --primary-color-gradient: linear-gradient(
    45deg,
    var(--primary-color-light),
    #66bb6a
  );
  --secondary-color: #81c784; /* Verde muy claro para acentos */
  --text-color-light: #f8f9fa; /* Texto claro (casi blanco) */
  --text-color-dark: #333; /* Texto oscuro principal */
  --background-light: #f8f9fa; /* Fondo claro para secciones */
  --background-dark: #1b5e20; /* Fondo oscuro (footer) */

  /* Fuentes */
  --font-primary: "Arial", "Helvetica", sans-serif;
  --font-secondary: "Segoe UI", "Arial", sans-serif;

  /* Estilos de Sombra */
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.15);

  /* Transiciones */
  --transition-fast: all 0.2s ease-in-out;
  --transition-normal: all 0.3s ease;

  /* Bordes */
  --border-radius-sm: 10px;
  --border-radius-md: 15px;
  --border-radius-lg: 25px;
}

/* =============================================
   RESETEO BÁSICO Y ESTILOS DEL BODY
   ============================================= */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Previene solapamiento con la nav */
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--text-color-dark);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =============================================
   NAVEGACIÓN
   ============================================= */

.nav {
  background: var(--primary-color-gradient);
  padding: 1rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  transform: translateY(-100%);
  transition: transform var(--transition-normal);
  box-shadow: var(--shadow-md);
}

.nav.show {
  transform: translateY(0);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.nav-logo {
  width: 50px;
  height: 50px;
  transition: transform var(--transition-fast);
}

.nav-logo:hover {
  transform: scale(1.1);
}

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

/* Responsividad básica para móviles */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    flex-direction: column;
    gap: 1rem;
    padding-top: 1rem;
  }
}

/* =============================================
   ENLACES DE NAVEGACIÓN
   ============================================= */

.nav-links a {
  color: var(--text-color-light);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.5px;
  transition: color var(--transition-normal);
  position: relative;
  padding-bottom: 8px;
}

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

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background-color: var(--secondary-color);
  transition: width var(--transition-normal);
  border-radius: 2px;
}

.nav-links a:hover::after {
  width: 100%;
}

/* =============================================
   SECCIÓN HERO
   ============================================= */

.hero {
  height: 100vh;
  min-height: 700px;
  background: 
    linear-gradient(
      120deg, 
      rgba(46, 125, 50, 0.65) 60%, 
      rgba(129, 199, 132, 0.45) 100%
    ),
    url("imagenes/portada.jpg") no-repeat center center / cover;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-color-light);
  position: relative;
  box-shadow: 0 8px 40px rgba(46, 125, 50, 0.25);
  transition: background 1.2s cubic-bezier(.4, 1, .6, 1);
  animation: heroBgFade 1.5s ease-in forwards;
  overflow: hidden;
}

/* Sombra suave al fondo */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(27, 94, 32, 0.15);
  z-index: 1;
}

/* Contenido dentro del hero debe estar por encima */
.hero > * {
  position: relative;
  z-index: 2;
}

/* Animación de entrada suave */
@keyframes heroBgFade {
  0% {
    opacity: 0;
    transform: scale(1.02);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes heroBgFade {
  from {
    filter: brightness(0.7) blur(2px);
    opacity: 0.7;
  }
  to {
    filter: brightness(1) blur(0);
    opacity: 1;
  }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 60% 40%, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.hero-content {
  max-width: 850px;
  padding: 2.5rem 2rem;
  background-color: rgba(34, 49, 63, 0.25);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 32px rgba(46, 125, 50, 0.18);
  animation: fadeInUp 1s ease-out forwards;
  backdrop-filter: blur(3px);
  position: relative;
  z-index: 2;
}

.logo {
  width: 150px;
  margin: 0 auto 2.5rem;
  animation: logoFloat 2.5s ease-in-out infinite;
  filter: drop-shadow(0 4px 16px rgba(76, 175, 80, 0.45)) brightness(1.15) contrast(1.15);
  transition: transform 0.3s cubic-bezier(.4, 2, .6, 1), filter 0.3s;
  display: block;
}

.logo:hover {
  transform: scale(1.08) rotate(-3deg);
  filter: drop-shadow(0 8px 32px rgba(76, 175, 80, 0.6)) brightness(1.2) contrast(1.2);
}

.hero h1 {
  font-size: clamp(2.7rem, 6vw, 4rem);
  margin-bottom: 1.2rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: linear-gradient(90deg, #ffffff 60%, #a5d6a7 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 4px 24px rgba(46, 125, 50, 0.45),
    2px 2px 8px rgba(0, 0, 0, 0.7);
  position: relative;
  z-index: 2;
}
.hero p {
  font-size: clamp(1.25rem, 3vw, 1.7rem);
  margin-bottom: 2.2rem;
  color: #e8f5e9;
  opacity: 0.95;
  line-height: 1.6;
  text-shadow: 0 2px 8px rgba(46, 125, 50, 0.25);
  animation: fadeInUp 1.3s ease-out;
}

.tagline {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-style: italic;
  color: #ffffff;
  margin-bottom: 2.2rem;
  letter-spacing: 1px;
  text-shadow: 0 2px 12px rgba(76, 175, 80, 0.25);
  animation: fadeIn 2s ease-out;
}

/* =============================================
   ESTRUCTURA GENERAL DE SECCIONES
   ============================================= */

section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin-inline: auto;
  animation: fadeInUp 1s ease-out;
}

section:nth-of-type(even) {
  background-color: var(--background-light);
}

.section-title {
  font-size: clamp(2rem, 5vw, 2.5rem);
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 4rem;
  position: relative;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--primary-color-light);
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* =============================================
   SECCIÓN DE SERVICIOS
   ============================================= */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  animation: fadeIn 1.5s ease-out;
}

.service-card {
  background-color: #ffffff;
  padding: 2.5rem 2rem;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-md);
  border-top: 4px solid var(--primary-color-light);
  position: relative;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(76, 175, 80, 0.2);
}
.service-card:hover {
  transform: translateY(-12px) scale(1.025);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.service-icon {
  font-size: 3.2rem;
  color: var(--primary-color-light);
  margin-bottom: 1.8rem;
  transition: color 0.3s;
}

.service-card:hover .service-icon {
  color: var(--primary-color);
}

.service-card h3 {
  color: var(--primary-color);
  margin-bottom: 1.2rem;
  font-size: 1.6rem;
  font-weight: 700;
}

.service-card ul {
  list-style: none;
  padding: 0;
  margin-bottom: 2rem;
}

.service-card li {
  padding: 0.5rem 0;
  position: relative;
  padding-left: 2rem;
  color: #444;
  font-size: 1.05rem;
}

.service-card li::before {
  content: "🌱";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  opacity: 0.85;
}

/* ======================
   GALERÍA DE IMÁGENES
   ====================== */

.gallery {
  padding: 6rem 2rem;
  background: var(--background-light);
}

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

.gallery-item {
  height: 260px;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

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

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

.gallery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #555;
  font-size: 1.1rem;
  text-align: center;
  padding: 1rem;
  background-color: #f1f1f1;
  font-style: italic;
  border: 2px dashed #ccc;
}
/* =============================================
   SECCIÓN DE CONTACTO
   ============================================= */

.contact {
  background: var(--primary-color-gradient);
  color: var(--text-color-light);
  font-family: var(--font-secondary);
  letter-spacing: 0.6px;
  padding: 6rem 2rem;
}

.contact .section-title,
.contact .section-title::after {
  color: var(--text-color-light);
  background: var(--text-color-light);
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2.5rem;
  margin-top: 3rem;
}

.contact-item {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius-sm);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  color: var(--text-color-light);
  font-size: 1.1rem;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
/* =============================================
   SECCIÓN DE CONTACTO (mejoras adicionales)
   ============================================= */

.contact-item:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.contact-item h3 {
  margin-bottom: 1rem;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.7px;
  color: var(--text-color-light);
}

/* =============================================
   FOOTER (mejorado)
   ============================================= */

footer {
  background: var(--background-dark);
  color: var(--text-color-light);
  text-align: center;
  padding: 3rem 2rem;
  font-family: var(--font-secondary);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
}

.footer-content p {
  margin: 0;
  opacity: 0.85;
  font-size: 1rem;
  letter-spacing: 0.4px;
  transition: opacity 0.3s ease;
}

.footer-content p:hover {
  opacity: 1;
  color: var(--primary-color-light);
  cursor: default;
}
/* =============================================
   COMPONENTES (BOTONES) — MEJORADO
   ============================================= */

.btn {
  background: var(--primary-color-gradient);
  color: #fff;
  padding: 1rem 2.5rem;
  text-decoration: none;
  border-radius: var(--border-radius-lg);
  display: inline-block;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
  transition: all 0.35s ease;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.4s ease;
  z-index: 0;
}

.btn:hover::before {
  left: 0;
}

.btn:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(76, 175, 80, 0.45);
}

/* =============================================
   ANIMACIONES — MEJORADO
   ============================================= */

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(60px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes logoFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-15px);
  }
}
/* =============================================
   ANIMACIÓN FADE-IN — MEJORADO
   ============================================= */

.fade-in {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
  will-change: opacity, transform;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


/* =============================================
   DISEÑO RESPONSIVE — MEJORADO
   ============================================= */

@media (max-width: 768px) {
  .nav-container {
    padding: 0 1.2rem;
  }

  .nav-links {
    display: none; /* Sugerencia: agregar clase para mostrar el menú tipo hamburguesa */
  }

  section {
    padding: 3.5rem 1rem;
  }

  .service-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .logo {
    width: 90px;
  }
}

@media (max-width: 480px) {
  .btn {
    padding: 0.8rem 2rem;
    font-size: 0.95rem;
  }

  .logo {
    width: 80px;
  }

  section {
    padding: 3rem 0.8rem;
  }
}
/* ============================== */
/* 🌐 ESTILOS RESPONSIVE - MÓVILES MEJORADOS */
/* ============================== */

@media (max-width: 768px) {

  .contenido-flexible {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem; /* Espaciado entre elementos */
    padding: 1rem;
  }

  .service-card {
    padding: 1.5rem 1.2rem;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
  }

  .section-title {
    font-size: 1.75rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.5px;
  }

  .service-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
  }

  img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  }

  .btn {
    font-size: 1.05rem;
    padding: 0.75em 1.5em;
    border-radius: var(--border-radius-md);
    margin-top: 1.2rem;
  }

}
/* Estilo del botón flotante scroll-to-top */
#scroll-btn.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 12px 16px;
  background-color: #28a745; /* Verde */
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: none;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  z-index: 1000;
}

/* Mostrar el botón cuando se hace scroll */
#scroll-btn.show {
  display: block;
}

/* Efecto al pasar el mouse */
#scroll-btn:hover {
  background-color: #218838;
  transform: scale(1.1);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
}

.section img {
  width: 100%;
  max-width: 600px; /* Ajusta este valor según tu diseño */
}
/* ============================================
   ESTILOS PARA NAVBAR FIJA Y VISUAL
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  z-index: 999;
  padding: 0.5rem 0;
  transition: all 0.3s ease;
}

.navbar-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

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

.nav-links li a {
  color: #222;
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem;
  transition: color 0.3s ease;
}

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

.nav-logo {
  width: 60px;
  height: auto;
  border-radius: 8px;
}
