/* ============================================
   GREEN GUIDES - ESTILOS DE COMPONENTES
   ============================================
   Estilos custom que complementan tailwind.compiled.css.
   Aquí viven: variables globales, componentes con
   pseudo-elementos, animaciones, y overrides de diseño.
   ============================================ */

/* ── Variables globales ── */
:root {
  --primary-color:    #3d2606;
  --secondary-color:  #4c5e3d;
  --background-color: #eaeae2;
  --text-color:       #1a1a17;
  --text-light:       #4a4a42;
  --transition-smooth: 0.3s ease;
}

/* ── Base ── */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

/* ── Iconos Material Symbols ── */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ── Sombras de componentes ── */
.ambient-glow { box-shadow: 0 40px 60px -15px rgba(61, 38, 6, 0.08); }
.green-glow   { box-shadow: 0 24px 48px -22px rgba(76, 94, 61, 0.24); }

/* ── Hover lift (tarjetas) ── */
.hover-lift {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease,
              border-color 0.4s ease;
}
.hover-lift:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px -10px rgba(61, 38, 6, 0.15);
}

/* ── Hero — orbes de fondo ── */
#hero::before {
  content: '';
  position: absolute;
  top: 10%; left: -4%;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 168, 136, 0.35), transparent 65%);
  filter: blur(48px);
  pointer-events: none;
}
#hero::after {
  content: '';
  position: absolute;
  bottom: 8%; right: -4%;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 38, 6, 0.14), transparent 60%);
  filter: blur(56px);
  pointer-events: none;
}

/* ── Nav link — subrayado animado ── */
.nav-link { position: relative; }
.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background-color: #4c5e3d;
  transition: width 0.3s ease;
}
.nav-link:hover::after,
.nav-link.nav-active::after { width: 100%; }
.nav-link.nav-active { color: #4c5e3d; font-weight: 600; }

/* ── Hamburger ── */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.2s ease;
}
.hamburger:hover { background: rgba(76, 94, 61, 0.08); }
.hamburger span {
  display: block;
  height: 2px;
  background: #3d2606;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
  transform-origin: center;
}
.hamburger span:nth-child(2) { width: 75%; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Menú móvil ── */
#mobile-menu {
  position: fixed;
  top: 80px; left: 0; right: 0;
  z-index: 49;
  background: rgba(234, 234, 226, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(184, 184, 176, 0.4);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}
#mobile-menu.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-size: 16px;
  line-height: 24px;
  color: #4a4a42;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}
.mobile-nav-link:hover,
.mobile-nav-link.nav-active { background: rgba(76, 94, 61, 0.08); color: #4c5e3d; }
.mobile-nav-link.nav-active  { font-weight: 600; }
.mobile-nav-link .material-symbols-outlined { font-size: 18px; color: #4c5e3d; }

/* ── Animaciones de entrada ── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.2, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}
.fade-up.active { opacity: 1; transform: translateY(0); }

.fade-in-up {
  opacity: 0;
  transform: translateY(28px);
  animation: fadeInUp 0.9s ease-out forwards;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Pulso icono ── */
@keyframes iconPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}
.group:hover .material-symbols-outlined {
  animation: iconPulse 0.6s ease-in-out infinite;
}

/* ── CTA Pulse ── */
@keyframes subtlePulse {
  0%   { box-shadow: 0 0 0 0   rgba(61, 38, 6, 0.4); }
  70%  { box-shadow: 0 0 0 10px rgba(61, 38, 6, 0); }
  100% { box-shadow: 0 0 0 0   rgba(61, 38, 6, 0); }
}
.cta-pulse { animation: subtlePulse 2.5s infinite; }

/* ── Button glow ── */
.button-glow { position: relative; overflow: hidden; }
.button-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(92, 61, 32, 0.18), transparent 55%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
.button-glow:hover::before { opacity: 1; }

/* ── Stagger delays ── */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* ── Animated card (entrada) ── */
.animated-card {
  will-change: transform, opacity;
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  animation: cardUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes cardUp {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Floating blob ── */
.floating-blob {
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(92, 61, 32, 0.22), transparent 54%);
  filter: blur(52px);
  pointer-events: none;
  animation: drift 10s ease-in-out infinite;
}
.floating-blob.bottom {
  bottom: -80px; right: -40px;
  background: radial-gradient(circle at 50% 50%, rgba(61, 38, 6, 0.16), transparent 58%);
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  50%       { transform: translate(0, -12px); }
}

/* ── Tarjetas de servicios — scroll animation ── */
#servicios article {
  position: relative;
  overflow: hidden;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              opacity 0.45s ease,
              box-shadow 0.3s ease;
}
#servicios article::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(92, 61, 32, 0.08), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
#servicios article:hover::before { opacity: 1; }
#servicios article:hover          { transform: translateY(-6px) scale(1.01); }
#servicios article.from-left      { transform: translateX(-14px) translateY(24px); }
#servicios article.from-right     { transform: translateX(14px) translateY(24px); }
#servicios article.in-view {
  transform: translateX(0) translateY(0) scale(1.01);
  opacity: 1;
  box-shadow: 0 12px 30px rgba(6, 95, 82, 0.08);
}
#servicios article > * {
  opacity: 0;
  transform: translateY(10px) translateX(0);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
#servicios article.from-left  > * { transform: translateY(10px) translateX(-28px); }
#servicios article.from-right > * { transform: translateY(10px) translateX(28px); }
#servicios article > *.visible {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* ── Sección diferencial (parallax + overlay) ── */
#diferencial {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  background-image: url('../images/diferencia.jpeg');
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}
#diferencial::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(0, 30, 25, 0.72) 0%,
    rgba(0, 55, 47, 0.50) 50%,
    rgba(0, 20, 15, 0.65) 100%);
  pointer-events: none;
  z-index: 1;
}
#diferencial-content { position: relative; z-index: 2; }
#diferencial .bg-surface-container-highest { background-color: rgba(255, 255, 255, 0.92) !important; }
#diferencial .bg-white                     { background-color: rgba(255, 255, 255, 0.95) !important; }
#diferencial .bg-secondary-container       { background-color: rgba(208, 231, 225, 0.92) !important; }

.diferencial-text {
  display: inline-block;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: linear-gradient(180deg, rgba(61,38,6,0.62), rgba(45,28,4,0.36));
  color: #ffffff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.28);
}
.diferencial-text h2 { color: #ffffff; text-shadow: 0 8px 30px rgba(0,0,0,0.45); }
.diferencial-text p  { color: rgba(255,255,255,0.92); text-shadow: 0 6px 20px rgba(0,0,0,0.35); margin-top: 0.4rem; }

/* ── Modal de servicio ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(26, 26, 23, 0.72);
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.service-modal {
  max-width: 720px;
  width: 100%;
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.18);
  transform: translateY(22px) scale(0.98);
  opacity: 0;
  transition: transform 0.28s ease, opacity 0.28s ease;
}
.modal-overlay.active .service-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}
body.modal-open { overflow: hidden; }

/* ── Pulse border ── */
@keyframes pulseBorder {
  0%   { box-shadow: 0 0 0 0    rgba(92, 61, 32, 0.25); }
  70%  { box-shadow: 0 0 0 18px rgba(92, 61, 32, 0); }
  100% { box-shadow: 0 0 0 0    rgba(92, 61, 32, 0); }
}
.pulse-border { animation: pulseBorder 3.5s ease-in-out infinite; }

/* ── Float card ── */
@keyframes slowFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
.float-card { animation: slowFloat 8s ease-in-out infinite; }

/* ── Botón flotante CTA ── */
.fixed-cta {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: #4c5e3d;
  color: #ffffff;
  padding: 0.95rem 1.25rem;
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(76, 94, 61, 0.28);
  transition: background-color 0.25s ease, transform 0.25s ease,
              box-shadow 0.25s ease, gap 0.25s ease, padding 0.25s ease;
  border: 2px solid transparent;
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.05em;
  font-weight: 500;
}
.fixed-cta:hover {
  background: #3d4d38;
  transform: translateY(-3px);
  box-shadow: 0 26px 55px rgba(61, 77, 56, 0.36);
}
.fixed-cta .cta-label {
  display: inline-block;
  transition: opacity 0.25s ease, width 0.25s ease, margin 0.25s ease;
  white-space: nowrap;
}
.fixed-cta.collapsed {
  gap: 0;
  padding: 0.95rem;
  border-radius: 50%;
}
.fixed-cta.collapsed .cta-label {
  opacity: 0;
  width: 0;
  margin: 0;
  overflow: hidden;
}
.fixed-cta.collapsed .material-symbols-outlined { font-size: 1.5rem; }
.fixed-cta.collapsed:hover { transform: translateY(-3px) scale(1.08); }

@media (max-width: 640px) {
  .fixed-cta { bottom: 1rem; right: 1rem; padding: 0.8rem 1rem; }
}

/* ── Parallax hero (nosotros.html) ── */
#hero-bg {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}
