/*
   InjertPlant - CSS Compartido
   Tailwind se carga via CDN. Este archivo contiene solo estilos custom globales.
*/

/* ===== Tipografía y legibilidad global ===== */
html { -webkit-text-size-adjust: 100%; }
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* Títulos sin líneas huérfanas y con buen interletrado */
h1, h2, h3, h4 { text-wrap: balance; }
/* Párrafos con mejor reparto de líneas */
p { text-wrap: pretty; }

/* Justificado elegante de párrafos de cuerpo (solo en pantallas con ancho suficiente) */
@media (min-width: 768px) {
  .text-justify { text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
}

/* ===== Mejoras móvil ===== */
@media (max-width: 640px) {
  /* Evita desbordes horizontales por elementos anchos */
  body { overflow-x: hidden; }
  /* Botones y enlaces táctiles cómodos */
  button, a { -webkit-tap-highlight-color: rgba(163,230,53,0.2); }
}

/* Respeta usuarios con movimiento reducido */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Ocultar barra de scroll para elementos específicos pero permitir scroll */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* ═══════════ Barra de navegación inferior (móvil) ═══════════ */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  background: rgba(6, 78, 59, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(163, 230, 53, 0.2);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.18);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 9px 2px 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.15s ease;
}
.bottom-nav-item i {
  font-size: 1.15rem;
  line-height: 1;
}
.bottom-nav-item:active { transform: scale(0.92); }
.bottom-nav-item:hover { color: #a3e635; }
.bottom-nav-wa { color: #4ade80; }
.bottom-nav-wa:hover { color: #25D366; }

/* Espacio para que la barra no tape el contenido final en móvil */
@media (max-width: 767px) {
  body { padding-bottom: 64px; }
  /* Sube los botones flotantes para que no choquen con la barra */
  .fab-container { bottom: 80px !important; }
  .whatsapp-float { bottom: 84px !important; }
}
