/* ==========================================================================
   CONTEXTUAL FOOTER COMPONENT - CSS STYLES & DYNAMIC THEMES
   Centro de Soluciones Biológicas del Putumayo
   ========================================================================== */

:root {
  /* Default Contextual Footer Theme Variables (Jungle fallback) */
  --cf-bg-main: #030F08;
  --cf-bg-surface: rgba(10, 38, 24, 0.75);
  --cf-bg-surface-alt: rgba(14, 45, 33, 0.85);
  --cf-border: rgba(16, 185, 129, 0.2);
  --cf-border-hover: rgba(244, 180, 26, 0.5);
  --cf-accent: #10B981;
  --cf-accent-secondary: #F4B41A;
  --cf-accent-glow: rgba(16, 185, 129, 0.3);
  --cf-text-heading: #F5F9F6;
  --cf-text-body: #D1E7DD;
  --cf-text-muted: #85A898;
  --cf-divider-fill: #030F08;
  --cf-divider-secondary: rgba(13, 89, 42, 0.6);
  --cf-transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   Contextual Footer Root Element & 1-Second Entrance Transition
   ========================================================================== */
.contextual-footer {
  position: relative;
  width: 100%;
  min-height: 480px;
  background-color: var(--cf-bg-main);
  background-image: radial-gradient(ellipse at 50% 0%, rgba(10, 48, 28, 0.4) 0%, transparent 70%);
  color: var(--cf-text-body);
  font-family: var(--font-family, 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif);
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1s cubic-bezier(0.16, 1, 0.3, 1), 
              background-color 0.6s ease, 
              color 0.4s ease, 
              border-color 0.4s ease;
  z-index: 1;
}

.contextual-footer.cf-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Base Container */
.contextual-footer .cf-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}

/* Top SVG Divider Wave */
.cf-top-divider {
  position: relative;
  width: 100%;
  overflow: hidden;
  line-height: 0;
  pointer-events: none;
  z-index: 6;
  margin-top: -1px;
}

.cf-top-divider:empty {
  display: none;
  height: 0;
}

.cf-top-divider:not(:empty) {
  height: 130px;
}

.cf-top-divider svg {
  display: block;
  width: 100%;
  height: 100%;
  transition: var(--cf-transition);
}

/* Background & Watermark Layers */
.cf-watermark {
  position: absolute;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: clamp(2.2rem, 6.5vw, 5.8rem);
  font-weight: 900;
  letter-spacing: 0.15em;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.02);
  pointer-events: none;
  user-select: none;
  z-index: 2;
  transition: color 0.5s ease;
}

/* ==========================================================================
   1. JUNGLE THEME — 3-LAYER IMMERSIVE RAINFOREST
   ========================================================================== */

.contextual-footer[data-theme="jungle"] .cf-container {
  padding-top: 3.5rem;
  padding-bottom: 2rem;
}

.jungle-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* CAPA 1: FONDO (Siluetas de árboles altos, niebla verde y degradado) */
.jungle-layer-background {
  z-index: 2;
  background: linear-gradient(180deg, rgba(2, 10, 5, 0.35) 0%, rgba(3, 16, 9, 0.75) 55%, rgba(2, 8, 4, 0.98) 100%);
  overflow: hidden;
}

/* Sutil imagen del Oso de Anteojos integrada en la selva con alta transparencia */
.jungle-bear-backdrop {
  position: absolute;
  inset: 0;
  background-image: url('SOLUCIONES BIOLOGICAS/oso_anteojos_habitat.jpg');
  background-size: cover;
  background-position: right 25% center;
  background-repeat: no-repeat;
  opacity: 0.10;
  filter: saturate(1.15) contrast(1.1) brightness(0.85);
  mix-blend-mode: luminosity;
  pointer-events: none;
  z-index: 1;
  mask-image: radial-gradient(ellipse 80% 70% at 72% 45%, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 85%),
              linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.85) 15%, rgba(0, 0, 0, 0.9) 80%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 72% 45%, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 85%),
                      linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.85) 15%, rgba(0, 0, 0, 0.9) 80%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  transition: opacity 0.8s ease, transform 1.2s ease-out;
  transform: scale(1.02);
}

.contextual-footer[data-theme="jungle"]:hover .jungle-bear-backdrop {
  opacity: 0.14;
  transform: scale(1.04);
}

.jungle-bear-glow {
  position: absolute;
  top: 25%;
  right: 15%;
  width: 520px;
  height: 420px;
  background: radial-gradient(ellipse, rgba(16, 185, 129, 0.16) 0%, rgba(244, 180, 26, 0.08) 42%, transparent 70%);
  filter: blur(45px);
  pointer-events: none;
  z-index: 1;
}

/* Fusión Orgánica con la Selva en la Base del Footer */
.jungle-bottom-blend {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 140px;
  pointer-events: none;
  z-index: 4;
  background: linear-gradient(to top, #020A05 0%, rgba(2, 10, 5, 0.85) 45%, transparent 100%);
}

.jungle-bottom-canopy-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 70px;
  opacity: 0.85;
}

.jungle-mist-stream {
  position: absolute;
  width: 200%;
  height: 140px;
  background: radial-gradient(ellipse at center, rgba(16, 185, 129, 0.12) 0%, rgba(6, 78, 44, 0.06) 45%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  animation: mistFloat 24s ease-in-out infinite alternate;
}

.jungle-mist-stream.mist-1 {
  top: 15%;
  left: -30%;
  opacity: 0.8;
}

.jungle-mist-stream.mist-2 {
  top: 45%;
  left: -50%;
  animation-duration: 32s;
  animation-delay: -8s;
  opacity: 0.6;
}

@keyframes mistFloat {
  0% { transform: translateX(0) translateY(0) scale(1); }
  50% { transform: translateX(12%) translateY(-15px) scale(1.08); }
  100% { transform: translateX(25%) translateY(10px) scale(0.96); }
}

.jungle-bg-trees-svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 220px;
  opacity: 0.6;
}

/* CAPA 2: PLANO INTERMEDIO (Troncos, ramas, hojas grandes y parallax al scroll) */
.jungle-layer-midground {
  z-index: 3;
  transform: translateY(var(--jungle-mid-y, 0px));
  transition: transform 0.15s ease-out;
}

.jungle-mid-branches {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* CAPA 3: PRIMER PLANO (Hojas tropicales en esquinas, lianas, luciérnagas y cursor parallax) */
.jungle-layer-foreground {
  z-index: 5;
  transform: translate(var(--jungle-mouse-x, 0px), var(--jungle-mouse-y, 0px));
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Hanging Lianas & Vines */
.jungle-vine {
  position: absolute;
  top: -10px;
  width: 160px;
  height: 280px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
  animation: vineSway 9s ease-in-out infinite alternate;
  transform-origin: top center;
}

.jungle-vine-left {
  left: 10px;
  animation-duration: 8.5s;
}

.jungle-vine-right {
  right: 10px;
  animation-duration: 10.5s;
  animation-delay: -3s;
}

@keyframes vineSway {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(2.8deg); }
  100% { transform: rotate(-2deg); }
}

/* Corner Tropical Foliage (Monstera & Fan Palms) */
.jungle-corner-leaf {
  position: absolute;
  bottom: -15px;
  width: 220px;
  height: 220px;
  filter: drop-shadow(0 -5px 15px rgba(0, 0, 0, 0.5));
  animation: jungleLeafBreathe 7s ease-in-out infinite alternate;
}

.jungle-corner-leaf.corner-left {
  left: -20px;
  transform-origin: bottom left;
}

.jungle-corner-leaf.corner-right {
  right: -20px;
  transform-origin: bottom right;
  animation-duration: 8.5s;
  animation-delay: -2.5s;
}

@keyframes jungleLeafBreathe {
  0% { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.03) rotate(2deg); }
}

/* Bioluminescent Firefly Particles */
.jungle-particles-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.firefly {
  position: absolute;
  width: 6px;
  height: 6px;
  background: var(--cf-accent-secondary, #F4B41A);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--cf-accent-secondary), 0 0 20px var(--cf-accent);
  opacity: 0;
  animation: fireflyGlow 6.5s infinite ease-in-out;
}

.firefly-1 { top: 22%; left: 14%; animation-delay: 0s; }
.firefly-2 { top: 58%; left: 32%; animation-delay: 1.6s; width: 4.5px; height: 4.5px; }
.firefly-3 { top: 36%; left: 78%; animation-delay: 3.2s; }
.firefly-4 { top: 72%; left: 86%; animation-delay: 2.1s; width: 5px; height: 5px; }
.firefly-5 { top: 16%; left: 52%; animation-delay: 4.4s; }
.firefly-6 { top: 82%; left: 24%; animation-delay: 3.8s; width: 4px; height: 4px; }

@keyframes fireflyGlow {
  0%, 100% { transform: translateY(0) scale(0.5); opacity: 0; }
  25% { transform: translateY(-12px) scale(1.25); opacity: 0.9; }
  50% { transform: translateY(-26px) scale(0.8); opacity: 0.35; }
  75% { transform: translateY(-8px) scale(1.4); opacity: 0.95; }
}

/* Clean Functional Readability Zone for Jungle Theme */
.contextual-footer[data-theme="jungle"] .cf-main-grid {
  background: rgba(3, 14, 8, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 24px;
  padding: 2.5rem 2.2rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(16, 185, 129, 0.12);
}

.contextual-footer[data-theme="jungle"] .cf-bottom-bar {
  margin-top: 1rem;
}

/* 2. TECHNOLOGY PARTICLES & GRID */
.tech-grid-overlay {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(0, 242, 254, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 242, 254, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 2;
}

.tech-particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.tech-hud-elements {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

.hud-corner {
  position: absolute;
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--cf-accent);
}

.hud-corner.top-left { top: 20px; left: 20px; border-right: none; border-bottom: none; }
.hud-corner.top-right { top: 20px; right: 20px; border-left: none; border-bottom: none; }

.hud-data-tag {
  position: absolute;
  top: 24px;
  right: 60px;
  font-family: monospace;
  font-size: 0.72rem;
  color: var(--cf-accent);
  letter-spacing: 0.1em;
  opacity: 0.65;
}

/* 3. CONSTRUCTION BLUEPRINT DECORATIONS */
.construction-blueprint-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background-image: radial-gradient(rgba(255, 107, 0, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

.blueprint-diag {
  position: absolute;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 0, 0.25), transparent);
  transform: rotate(-18deg);
}

.blueprint-diag.diag-1 { top: 25%; left: -50%; }
.blueprint-diag.diag-2 { top: 65%; left: -50%; }

.blueprint-ruler {
  position: absolute;
  top: 15px;
  right: 30px;
  display: flex;
  gap: 0.75rem;
}

.dim-badge, .scale-badge {
  font-family: monospace;
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  background: rgba(255, 107, 0, 0.12);
  border: 1px solid rgba(255, 107, 0, 0.3);
  color: #FF6B00;
  border-radius: 4px;
  text-transform: uppercase;
}

/* 4. OCEAN WAVES & BUBBLES */
.ocean-wave {
  animation: waveMove 12s cubic-bezier(0.36, 0.45, 0.63, 0.53) infinite alternate;
}

.wave-back { animation-duration: 16s; }
.wave-mid { animation-duration: 11s; animation-delay: -2s; }
.wave-front { animation-duration: 8s; animation-delay: -4s; }

@keyframes waveMove {
  0% { transform: translateX(0) scaleY(1); }
  100% { transform: translateX(-40px) scaleY(1.08); }
}

.ocean-bubbles-wrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.bubble {
  position: absolute;
  bottom: -20px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(6, 182, 212, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.3);
  animation: bubbleRise 10s infinite linear;
}

.b1 { width: 14px; height: 14px; left: 12%; animation-duration: 9s; animation-delay: 0s; }
.b2 { width: 8px; height: 8px; left: 28%; animation-duration: 12s; animation-delay: 2s; }
.b3 { width: 18px; height: 18px; left: 48%; animation-duration: 14s; animation-delay: 1s; }
.b4 { width: 10px; height: 10px; left: 65%; animation-duration: 8s; animation-delay: 3s; }
.b5 { width: 16px; height: 16px; left: 82%; animation-duration: 11s; animation-delay: 1.5s; }
.b6 { width: 7px; height: 7px; left: 92%; animation-duration: 13s; animation-delay: 4s; }

@keyframes bubbleRise {
  0% { transform: translateY(0) translateX(0); opacity: 0; }
  15% { opacity: 0.7; }
  85% { opacity: 0.7; }
  100% { transform: translateY(-500px) translateX(25px); opacity: 0; }
}

.ocean-light-ray {
  position: absolute;
  top: 0;
  left: 20%;
  width: 180px;
  height: 100%;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.08) 0%, transparent 70%);
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: 2;
}

/* 5. MINIMAL RADIAL GLOW */
.minimal-radial-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 200px;
  background: radial-gradient(ellipse at top, rgba(255, 255, 255, 0.04), transparent 70%);
  pointer-events: none;
  z-index: 2;
}

/* ==========================================================================
   Context Biocard (Hero Context Card in Footer)
   ========================================================================== */
.cf-biocard {
  background: var(--cf-bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--cf-border);
  border-radius: 20px;
  padding: 2.2rem 2.5rem;
  margin-bottom: 3.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2.5rem;
  box-shadow: 0 15px 35px -10px rgba(0, 0, 0, 0.5), 0 0 25px var(--cf-accent-glow);
  position: relative;
  overflow: hidden;
  transition: var(--cf-transition);
}

.cf-biocard::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, var(--cf-accent), var(--cf-accent-secondary));
  transition: var(--cf-transition);
}

.cf-biocard:hover {
  border-color: var(--cf-border-hover);
  transform: translateY(-2px);
}

.cf-biocard-thumb-wrap {
  position: relative;
  flex-shrink: 0;
  width: 105px;
  height: 105px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--cf-border);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.6), 0 0 20px var(--cf-accent-glow);
  transition: var(--cf-transition);
}

.cf-biocard:hover .cf-biocard-thumb-wrap {
  border-color: var(--cf-border-hover);
  transform: scale(1.04);
}

.cf-biocard-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cf-biocard:hover .cf-biocard-thumb {
  transform: scale(1.08);
}

.cf-thumb-badge {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(2, 10, 5, 0.88);
  backdrop-filter: blur(4px);
  color: var(--cf-accent);
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
  padding: 0.25rem 0.2rem;
  border-top: 1px solid rgba(16, 185, 129, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.cf-biocard-info {
  flex: 1;
}

.cf-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--cf-border);
  padding: 0.35rem 0.95rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cf-accent);
  margin-bottom: 0.9rem;
  letter-spacing: 0.03em;
  transition: var(--cf-transition);
}

.cf-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--cf-accent);
  box-shadow: 0 0 10px var(--cf-accent);
  animation: cfPulse 2s infinite ease-in-out;
}

@keyframes cfPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}

.cf-biocard h3 {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  font-weight: 700;
  color: var(--cf-text-heading);
  line-height: 1.3;
  margin-bottom: 0.6rem;
  transition: color 0.4s ease;
}

.cf-biocard p {
  color: var(--cf-text-body);
  font-size: 0.96rem;
  line-height: 1.55;
  max-width: 680px;
  opacity: 0.9;
  transition: color 0.4s ease;
}

.cf-biocard-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-shrink: 0;
}

/* Dynamic Action Buttons */
.cf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1.6rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.94rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}

.cf-btn:focus-visible {
  outline: 2px solid var(--cf-accent);
  outline-offset: 3px;
}

.btn-theme-primary {
  background: linear-gradient(135deg, #10B981, #059669);
  color: #FFFFFF;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}
.btn-theme-primary:hover {
  background: linear-gradient(135deg, #34D399, #10B981);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
  color: #FFFFFF;
}

.btn-theme-tech {
  background: linear-gradient(135deg, #0070F3, #00F2FE);
  color: #050B14;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 242, 254, 0.35);
}
.btn-theme-tech:hover {
  background: linear-gradient(135deg, #00F2FE, #7928CA);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 242, 254, 0.55);
}

.btn-theme-construction {
  background: linear-gradient(135deg, #FF6B00, #F59E0B);
  color: #0F1318;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(255, 107, 0, 0.35);
}
.btn-theme-construction:hover {
  background: linear-gradient(135deg, #F59E0B, #FF6B00);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 0, 0.55);
}

.btn-theme-ocean {
  background: linear-gradient(135deg, #0284C7, #06B6D4);
  color: #FFFFFF;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
}
.btn-theme-ocean:hover {
  background: linear-gradient(135deg, #06B6D4, #38BDF8);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.55);
}

.btn-theme-minimal {
  background: #F1F5F9;
  color: #0B0D11;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}
.btn-theme-minimal:hover {
  background: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.btn-theme-secondary {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--cf-border);
  color: var(--cf-text-heading);
}
.btn-theme-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--cf-border-hover);
  color: var(--cf-accent);
  transform: translateY(-2px);
}

/* ==========================================================================
   Main Footer Grid Layout
   ========================================================================== */
.cf-main-grid {
  display: grid;
  grid-template-columns: 2.2fr 1.2fr 1.3fr 1.8fr;
  gap: 3rem;
  padding: 2.8rem 2.4rem;
  background: var(--cf-bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--cf-border);
  border-radius: 24px;
  position: relative;
  z-index: 10;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 25px var(--cf-accent-glow);
  transition: border-color 0.4s ease, background 0.4s ease, box-shadow 0.4s ease;
}

/* Column 1: Brand & Contact Information */
.cf-brand-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cf-brand-logo-wrap {
  display: inline-block;
  max-width: 210px;
}

.cf-brand-logo-wrap img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
  transition: transform 0.3s ease;
}

.cf-brand-logo-wrap:hover img {
  transform: scale(1.02);
}

.cf-brand-desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--cf-text-muted);
  transition: color 0.4s ease;
}

.cf-contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.cf-contact-item {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.25rem 0;
  font-size: 0.88rem;
  color: var(--cf-text-body);
  text-decoration: none;
  touch-action: manipulation;
  transition: color 0.2s ease, transform 0.2s ease;
}

.cf-contact-item i {
  color: var(--cf-accent);
  font-size: 0.95rem;
  width: 18px;
  text-align: center;
  transition: color 0.4s ease;
}

.cf-contact-item:hover {
  color: var(--cf-text-heading);
  transform: translateX(3px);
}

.cf-contact-item:focus-visible {
  outline: 2px solid var(--cf-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Social Icons Row */
.cf-social-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.cf-social-link {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--cf-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--cf-text-body);
  font-size: 1.1rem;
  text-decoration: none;
  touch-action: manipulation;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cf-social-link:hover {
  background: var(--cf-accent);
  color: var(--cf-bg-main);
  border-color: var(--cf-accent);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px var(--cf-accent-glow);
}

.cf-social-link:focus-visible {
  outline: 2px solid var(--cf-accent);
  outline-offset: 2px;
}

/* Columns 2 & 3: Navigation & Services Links */
.cf-col-title {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cf-text-heading);
  margin-bottom: 1.3rem;
  position: relative;
  display: inline-block;
  transition: color 0.4s ease;
}

.cf-col-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 28px;
  height: 2px;
  background: var(--cf-accent);
  border-radius: 2px;
  transition: var(--cf-transition);
}

.cf-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.cf-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.94rem;
  color: var(--cf-text-muted);
  text-decoration: none;
  min-height: 44px;
  padding: 0.35rem 0;
  touch-action: manipulation;
  transition: all 0.25s ease;
}

.cf-nav-link i {
  font-size: 0.8rem;
  color: var(--cf-accent);
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.cf-nav-link:hover {
  color: var(--cf-text-heading);
  transform: translateX(4px);
}

.cf-nav-link:hover i {
  opacity: 1;
  transform: translateX(2px);
}

.cf-nav-link:focus-visible {
  outline: 2px solid var(--cf-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Column 4: Newsletter & Engagement */
.cf-newsletter-box {
  background: var(--cf-bg-surface);
  border: 1px solid var(--cf-border);
  padding: 1.6rem;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  transition: var(--cf-transition);
}

.cf-newsletter-box h4 {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--cf-text-heading);
  margin: 0;
}

.cf-newsletter-box p {
  font-size: 0.88rem;
  color: var(--cf-text-muted);
  line-height: 1.55;
  margin: 0;
}

.cf-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
}

.cf-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.cf-input-wrap i {
  position: absolute;
  left: 1.1rem;
  color: var(--cf-text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.cf-newsletter-input {
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--cf-border);
  border-radius: 12px;
  color: var(--cf-text-heading);
  font-size: 16px; /* Prevents auto-zoom on iOS Safari */
  font-family: inherit;
  transition: all 0.3s ease;
}

.cf-newsletter-input::placeholder {
  color: var(--cf-text-muted);
  opacity: 0.85;
}

.cf-newsletter-input:focus {
  outline: none;
  border-color: var(--cf-accent);
  background: rgba(0, 0, 0, 0.65);
  box-shadow: 0 0 15px var(--cf-accent-glow);
}

.cf-newsletter-submit {
  width: 100%;
  min-height: 48px;
  padding: 0.85rem 1.4rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: var(--cf-accent);
  color: var(--cf-bg-main);
  touch-action: manipulation;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cf-newsletter-submit:hover {
  filter: brightness(1.12);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--cf-accent-glow);
}

.cf-newsletter-submit:focus-visible {
  outline: 2px solid var(--cf-accent-secondary);
  outline-offset: 2px;
}

.cf-newsletter-status {
  display: none;
  font-size: 0.82rem;
  padding: 0.5rem;
  border-radius: 8px;
  text-align: center;
  margin-top: 0.25rem;
}

.cf-newsletter-status.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #10B981;
}

.cf-newsletter-status.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #EF4444;
}

/* ==========================================================================
   Footer Bottom Bar & Legal
   ========================================================================== */
.cf-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.75rem 0 2.2rem;
  font-size: 0.85rem;
  color: var(--cf-text-muted);
  gap: 1.5rem;
  position: relative;
  z-index: 10;
}

.cf-bottom-legal {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.cf-legal-link {
  color: var(--cf-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
  cursor: pointer;
  background: none;
  border: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.35rem 0.5rem;
  font: inherit;
  font-size: 0.85rem;
  touch-action: manipulation;
}

.cf-legal-link:hover {
  color: var(--cf-accent);
  text-decoration: underline;
}

.cf-legal-link:focus-visible {
  outline: 2px solid var(--cf-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.cf-back-to-top {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 12px;
  background: var(--cf-bg-surface);
  border: 1px solid var(--cf-border);
  color: var(--cf-text-heading);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}

.cf-back-to-top:hover {
  background: var(--cf-accent);
  color: var(--cf-bg-main);
  border-color: var(--cf-accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px var(--cf-accent-glow);
}

.cf-back-to-top:focus-visible {
  outline: 2px solid var(--cf-accent);
  outline-offset: 2px;
}

/* ==========================================================================
   Accessible Modal for Privacy & Terms
   ========================================================================== */
.cf-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.cf-modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.cf-modal-card {
  background: #0D1612;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 20px;
  width: 100%;
  max-width: 650px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(16, 185, 129, 0.2);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.cf-modal-backdrop.active .cf-modal-card {
  transform: scale(1);
}

.cf-modal-header {
  padding: 1.35rem 1.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cf-modal-header h3 {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 1.25rem;
  color: #FFFFFF;
  margin: 0;
}

.cf-modal-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #FFFFFF;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  touch-action: manipulation;
  transition: background 0.2s ease;
}

.cf-modal-close:hover {
  background: rgba(239, 68, 68, 0.8);
}

.cf-modal-body {
  padding: 1.6rem;
  overflow-y: auto;
  color: #CBD5E1;
  font-size: 0.92rem;
  line-height: 1.65;
}

.cf-modal-body h4 {
  color: #10B981;
  font-size: 1.05rem;
  margin: 1.2rem 0 0.4rem;
}

.cf-modal-body p {
  margin-bottom: 0.9rem;
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization (UI/UX Pro Max)
   ========================================================================== */
@media (max-width: 1080px) {
  .cf-main-grid {
    grid-template-columns: 1.8fr 1fr 1fr;
    gap: 2.5rem;
    padding: 2.2rem 1.8rem;
  }
  
  .cf-newsletter-box {
    grid-column: span 3;
  }
}

@media (max-width: 860px) {
  .contextual-footer[data-theme="jungle"] .cf-container {
    padding-top: 2.5rem;
    padding-bottom: 1.5rem;
  }

  .cf-main-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem 1.5rem;
  }

  .cf-brand-col {
    grid-column: span 2;
  }

  .cf-newsletter-box {
    grid-column: span 2;
  }

  .cf-bottom-bar {
    flex-direction: column-reverse;
    text-align: center;
    gap: 1.2rem;
    padding: 1.5rem 0;
  }

  .cf-bottom-legal {
    justify-content: center;
  }

  .jungle-bear-backdrop {
    background-position: center 25%;
    opacity: 0.08;
  }
}

@media (max-width: 768px) {
  .jungle-corner-leaf {
    width: 120px;
    height: 120px;
    opacity: 0.4;
  }

  .jungle-vine {
    width: 90px;
    height: 160px;
    opacity: 0.5;
  }

  .jungle-layer-foreground {
    transform: none !important;
  }
}

@media (max-width: 640px) {
  .contextual-footer .cf-container {
    padding: 0 1.25rem;
  }

  .cf-main-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
    padding: 1.75rem 1.35rem;
    border-radius: 20px;
  }

  .cf-brand-col, .cf-newsletter-box {
    grid-column: span 1;
  }

  .cf-brand-logo-wrap {
    max-width: 190px;
  }

  .cf-social-row {
    justify-content: flex-start;
  }

  .jungle-corner-leaf {
    display: none;
  }
}

@media (max-width: 420px) {
  .contextual-footer .cf-container {
    padding: 0 1rem;
  }

  .cf-main-grid {
    padding: 1.4rem 1.1rem;
    border-radius: 18px;
    gap: 1.8rem;
  }

  .cf-social-row {
    gap: 0.5rem;
  }

  .cf-social-link {
    width: 42px;
    height: 42px;
  }

  .cf-bottom-legal {
    gap: 0.35rem 0.75rem;
  }
}

/* ==========================================================================
   Prefers-Reduced-Motion Accessibility Guard
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .contextual-footer {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .contextual-footer,
  .cf-biocard,
  .cf-btn,
  .cf-social-link,
  .cf-nav-link,
  .cf-status-dot,
  .firefly,
  .jungle-mist-stream,
  .jungle-vine,
  .jungle-corner-leaf,
  .jungle-layer-midground,
  .jungle-layer-foreground,
  .ocean-wave,
  .bubble {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
