/**
 * FluvialTech Premium B2B Visual System
 * Sistema visual centralizado para todas las páginas del sitio
 * Navy/gradientes + overlay técnico + blur/difuminado
 */

/* ===== ANIMACIONES ON-SCROLL ===== */
.ft-reveal {
  opacity: 0;
  will-change: transform, opacity;
}

.ft-reveal.ft-from-left {
  transform: translateX(-40px);
}

.ft-reveal.ft-from-right {
  transform: translateX(40px);
}

.ft-reveal.ft-from-bottom {
  transform: translateY(40px);
}

.ft-reveal.ft-in {
  opacity: 1;
  transform: none;
  transition: opacity 800ms ease-out, transform 800ms ease-out;
}

/* ===== SECCIÓN NAVY CON GRADIENTE ANIMADO ===== */
.ft-section-navy {
  background: linear-gradient(
    135deg,
    #0f172a 0%,
    #1e293b 25%,
    #334155 50%,
    #1e293b 75%,
    #0f172a 100%
  );
  background-size: 400% 400%;
  animation: ft-gradient-shift 16s ease infinite;
  position: relative;
  overflow: hidden;
}

/* Clase de exclusión: permite hero con imagen sin fondo navy */
.ft-hero-image {
  background: transparent;
  animation: none;
}

/* Overlay oscuro con gradiente para legibilidad sobre imagen */
.ft-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.75) 0%,
    rgba(30, 41, 59, 0.65) 50%,
    rgba(15, 23, 42, 0.80) 100%
  );
  z-index: 1;
}

/* Panel glass sutil para contenido de texto sobre hero con imagen */
.ft-hero-panel {
  background: rgba(15, 23, 42, 0.40);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

@supports not (backdrop-filter: blur(12px)) {
  .ft-hero-panel {
    background: rgba(15, 23, 42, 0.85);
  }
}

@media (min-width: 768px) {
  .ft-hero-panel {
    padding: 2.5rem;
  }
}

@media (min-width: 1024px) {
  .ft-hero-panel {
    padding: 3rem;
  }
}

@keyframes ft-gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* ===== OVERLAY CON PATRÓN DE GRID TÉCNICO (SVG INLINE) ===== */
.ft-grid-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h60v60H0z' fill='none'/%3E%3Cpath d='M0 30h60M30 0v60' stroke='%2306b6d4' stroke-width='0.5' opacity='0.4'/%3E%3Ccircle cx='30' cy='30' r='2' fill='%2306b6d4' opacity='0.6'/%3E%3Cpath d='M15 15l30 30M45 15L15 45' stroke='%2306b6d4' stroke-width='0.3' opacity='0.2'/%3E%3C/svg%3E");
  background-size: 60px 60px;
  animation: ft-grid-move 20s linear infinite;
  z-index: 1;
}

@keyframes ft-grid-move {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 60px 60px;
  }
}

/* ===== OVERLAY DE NOISE/TEXTURA SUTIL ===== */
.ft-noise-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.5'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  z-index: 1;
}

/* ===== PANEL CON DIFUMINADO (GLASSMORPHISM) ===== */
.ft-glass {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 
              0 2px 4px -1px rgba(0, 0, 0, 0.06);
  position: relative;
  z-index: 2;
}

/* Fallback para navegadores sin soporte de backdrop-filter */
@supports not (backdrop-filter: blur(12px)) {
  .ft-glass {
    background: rgba(15, 23, 42, 0.92);
  }
}

/* Variante de glass más clara (para contenido sobre navy) */
.ft-glass-light {
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.15),
              0 4px 8px -2px rgba(0, 0, 0, 0.08);
  position: relative;
  z-index: 2;
}

@supports not (backdrop-filter: blur(14px)) {
  .ft-glass-light {
    background: rgba(255, 255, 255, 0.95);
  }
}

/* ===== SEPARADORES SVG PARA TRANSICIONES DE SECCIÓN ===== */
.ft-divider-top,
.ft-divider-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  line-height: 0;
  pointer-events: none;
  z-index: 5;
}

.ft-divider-top {
  top: 0;
}

.ft-divider-top svg {
  display: block;
  width: 100%;
  height: 40px;
}

.ft-divider-bottom {
  bottom: 0;
}

.ft-divider-bottom svg {
  display: block;
  width: 100%;
  height: 40px;
}

/* ===== GLOW/BLUR EN SEPARACIONES ===== */
.ft-glow-top,
.ft-glow-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 120px;
  background: radial-gradient(
    ellipse at center,
    rgba(6, 182, 212, 0.15) 0%,
    transparent 70%
  );
  filter: blur(40px);
  pointer-events: none;
  z-index: 1;
}

.ft-glow-top {
  top: -60px;
}

.ft-glow-bottom {
  bottom: -60px;
}

/* ===== CARD PREMIUM (HOVER EFFECTS) ===== */
.ft-card {
  position: relative;
  background: white;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 1rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 
              0 1px 2px 0 rgba(0, 0, 0, 0.06);
  transition: all 300ms ease;
}

.ft-card:hover {
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
              0 4px 6px -2px rgba(0, 0, 0, 0.05),
              0 0 0 3px rgba(6, 182, 212, 0.1);
  transform: translateY(-2px);
}

/* ===== CARD NAVY (SOBRE FONDO NAVY) ===== */
.ft-card-navy {
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 
              0 2px 4px -1px rgba(0, 0, 0, 0.12);
  transition: all 300ms ease;
  z-index: 2;
}

.ft-card-navy:hover {
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3),
              0 0 0 3px rgba(6, 182, 212, 0.15);
  transform: translateY(-2px);
}

@supports not (backdrop-filter: blur(10px)) {
  .ft-card-navy {
    background: rgba(30, 41, 59, 0.95);
  }
}

/* ===== DESACTIVAR ANIMACIONES CON PREFERS-REDUCED-MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .ft-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  
  .ft-section-navy {
    animation: none !important;
    background: #0f172a;
  }
  
  .ft-grid-overlay {
    animation: none !important;
  }
  
  .ft-card,
  .ft-card-navy {
    transition: none !important;
  }
  
  .ft-card:hover,
  .ft-card-navy:hover {
    transform: none !important;
  }
}

/* ===== UTILIDADES ADICIONALES ===== */

/* Texto premium sobre navy */
.ft-text-navy-heading {
  color: #f8fafc;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.ft-text-navy-body {
  color: #e2e8f0;
}

.ft-text-navy-muted {
  color: #cbd5e1;
}

/* Separador visual sutil */
.ft-separator {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(148, 163, 184, 0.3) 50%,
    transparent
  );
  margin: 2rem 0;
}

.ft-separator-navy {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.15) 50%,
    transparent
  );
  margin: 2rem 0;
}

/* Badge/Tag premium */
.ft-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.ft-badge-navy {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Contenedor con z-index relativo para contenido sobre overlays */
.ft-content {
  position: relative;
  z-index: 2;
}
