/* ==========================================================================
   Apex National Model School - Educational Video Portal (ehelper.lk)
   Modern Human-Type UI Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Playfair+Display:ital,wght@0,600;0,700;1,600&family=Noto+Sans+Sinhala:wght@400;500;700&family=Noto+Sans+Tamil:wght@400;500;700&display=swap');

:root {
  --font-primary: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sinhala: 'Noto Sans Sinhala', 'Plus Jakarta Sans', sans-serif;
  --font-tamil: 'Noto Sans Tamil', 'Plus Jakarta Sans', sans-serif;

  --color-brand-primary: #0f172a;
  --color-brand-accent: #2563eb;
  --color-brand-amber: #ea580c;
  --color-brand-emerald: #059669;
  --color-bg-light: #FAF9F6;
  --color-card-bg: #ffffff;
  --color-text-main: #0f172a;
  --color-text-muted: #64748b;
  --color-border: #f1f5f9;
  --color-border-subtle: #e2e8f0;
  
  --shadow-subtle: 0 4px 20px -2px rgba(15, 23, 42, 0.03), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  --shadow-card: 0 10px 25px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.02);
  --shadow-hover: 0 20px 30px -4px rgba(15, 23, 42, 0.08), 0 8px 10px -3px rgba(15, 23, 42, 0.03);
  --shadow-player: 0 25px 50px -12px rgba(15, 23, 42, 0.22);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* Base Resets & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-primary);
  color: var(--color-text-main);
  background-color: var(--color-bg-light);
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  background-color: #FAF9F6;
}

/* Anti-Scraping / Image Drag Protection */
body.protected-view img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  user-select: none;
}

/* Container */
.app-container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary {
  background-color: #0f172a;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.btn-accent {
  background-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.btn-accent:hover {
  background-color: #1d4ed8;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.btn-outline {
  background-color: #ffffff;
  color: #334155;
  border-color: #e2e8f0;
}

.btn-outline:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}

.btn-pill {
  border-radius: var(--radius-full);
}

/* Cards & Clean Minimalism Containers */
.app-card {
  background: var(--color-card-bg);
  border: 1px solid #f1f5f9;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  overflow: hidden;
}

.app-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #e2e8f0;
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-subtle);
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid #f1f5f9;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.nav-link {
  font-weight: 500;
  font-size: 0.9375rem;
  color: #334155;
  text-decoration: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--color-brand-accent);
  background-color: #eff6ff;
}

/* Hero Background Animation & Dynamic Mesh Floating Elements */
.hero-animated-bg {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #f0f7ff 0%, #faf5ff 25%, #ecfeff 50%, #f0fdf4 75%, #eff6ff 100%);
  background-size: 300% 300%;
  animation: heroGradientShift 12s ease-in-out infinite alternate;
  border-bottom: 1px solid #dbeafe;
}

@keyframes heroGradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

#hero-animation-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  will-change: transform, opacity;
  opacity: 0.75;
}

.hero-orb-1 {
  width: 500px;
  height: 500px;
  top: -100px;
  left: -80px;
  background: radial-gradient(circle, rgba(54, 100, 239, 0.55) 0%, rgba(96, 165, 250, 0.35) 45%, transparent 70%);
  animation: hero-orb-float-1 8s ease-in-out infinite alternate;
}

.hero-orb-2 {
  width: 520px;
  height: 520px;
  bottom: -120px;
  right: -60px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.45) 0%, rgba(251, 146, 60, 0.3) 45%, transparent 70%);
  animation: hero-orb-float-2 10s ease-in-out infinite alternate;
}

.hero-orb-3 {
  width: 440px;
  height: 440px;
  top: 15%;
  left: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.5) 0%, rgba(168, 85, 247, 0.35) 45%, transparent 70%);
  animation: hero-orb-float-3 9s ease-in-out infinite alternate;
}

.hero-orb-4 {
  width: 380px;
  height: 380px;
  bottom: 5%;
  left: 15%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.45) 0%, rgba(59, 130, 246, 0.3) 45%, transparent 70%);
  animation: hero-orb-float-1 11s ease-in-out infinite alternate-reverse;
}

@keyframes hero-orb-float-1 {
  0% { transform: translate(0px, 0px) scale(1) rotate(0deg); }
  50% { transform: translate(60px, -45px) scale(1.18) rotate(90deg); }
  100% { transform: translate(-45px, 40px) scale(0.9) rotate(180deg); }
}

@keyframes hero-orb-float-2 {
  0% { transform: translate(0px, 0px) scale(1) rotate(0deg); }
  50% { transform: translate(-70px, -50px) scale(1.2) rotate(-90deg); }
  100% { transform: translate(50px, 45px) scale(0.85) rotate(-180deg); }
}

@keyframes hero-orb-float-3 {
  0% { transform: translate(0px, 0px) scale(0.9); opacity: 0.65; }
  50% { transform: translate(-50px, 45px) scale(1.25); opacity: 0.95; }
  100% { transform: translate(45px, -40px) scale(1.05); opacity: 0.75; }
}

/* Floating Badges Keyframes */
.hero-floating-badge {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  transition: all 0.3s ease;
}

.float-elem-1 {
  top: 14%;
  right: 10%;
  animation: floatSlow 6s ease-in-out infinite alternate;
}

.float-elem-2 {
  bottom: 18%;
  left: 4%;
  animation: floatMedium 5s ease-in-out 1s infinite alternate;
}

.float-elem-3 {
  top: calc(65% + 25px);
  right: 5%;
  z-index: 20;
  animation: floatSlow 7s ease-in-out 0.5s infinite alternate;
}

@keyframes floatSlow {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-16px) rotate(3deg); }
  100% { transform: translateY(8px) rotate(-2deg); }
}

@keyframes floatMedium {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-22px) rotate(-4deg); }
  100% { transform: translateY(10px) rotate(2deg); }
}

@keyframes floatFast {
  0% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(-18px) scale(1.06); }
  100% { transform: translateY(6px) scale(0.96); }
}

/* Subtle Animated Grid Pattern */
.hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(circle, rgba(148, 163, 184, 0.4) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}

/* Hero Feature Cards */
.hero-curriculum-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08) !important;
  color: #0f172a !important;
}

.hero-video-card {
  background: linear-gradient(135deg, #3664ef 0%, #1e40af 100%) !important;
  background-color: #3664ef !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 14px 35px -5px rgba(54, 100, 239, 0.35) !important;
}

.hero-video-card h3 {
  color: #ffffff !important;
  font-weight: 800 !important;
}

.hero-video-card p {
  color: rgba(255, 255, 255, 0.95) !important;
}

.hero-video-card svg {
  color: #ffffff !important;
}

/* Enhanced Lesson, Teacher & Event Cards */
.lesson-card {
  background: #ffffff;
  border-radius: 1.5rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 6px 24px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.02);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.lesson-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 38px -6px rgba(54, 100, 239, 0.14), 0 10px 20px -4px rgba(15, 23, 42, 0.04);
  border-color: #bfdbfe;
}

.lesson-card .play-btn-overlay {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.lesson-card:hover .play-btn-overlay {
  opacity: 1;
  transform: scale(1);
}

.teacher-card {
  background: #ffffff;
  border-radius: 1.5rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.04);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.teacher-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 35px -6px rgba(15, 23, 42, 0.08);
  border-color: #e2e8f0;
}

.event-card {
  background: #ffffff;
  border-radius: 1.5rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 10px 25px -4px rgba(15, 23, 42, 0.04);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 22px 35px -6px rgba(15, 23, 42, 0.08);
  border-color: #e2e8f0;
}

/* Custom Footer with #3664ef */
.site-footer-custom {
  background-color: #3664ef;
  color: #ffffff;
}

/* ==========================================================================
   Custom Video Player (Player by ehelper.lk)
   ========================================================================== */
.custom-player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #090d16;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-player);
  user-select: none;
}

.custom-player-iframe-container {
  width: 100%;
  height: 100%;
  pointer-events: none; /* Let custom overlay handle interactions */
}

.custom-player-iframe-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.custom-player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, transparent 20%, transparent 70%, rgba(0,0,0,0.85) 100%);
  opacity: 1;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.custom-player-wrapper:hover .custom-player-overlay,
.custom-player-wrapper.is-paused .custom-player-overlay {
  opacity: 1;
}

.custom-player-wrapper.is-playing:not(:hover) .custom-player-overlay {
  opacity: 0;
  cursor: none;
}

.player-big-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.9);
  backdrop-filter: blur(8px);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.5);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.player-big-play:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: #1d4ed8;
}

.player-bottom-bar {
  padding: 12px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.player-progress-container {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  cursor: pointer;
  transition: height 0.15s ease;
}

.player-progress-container:hover {
  height: 9px;
}

.player-progress-buffer {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 3px;
  width: 0%;
}

.player-progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #3b82f6;
  border-radius: 3px;
  width: 0%;
  transition: width 0.1s linear;
}

.player-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.player-controls-left {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.player-btn {
  background: none;
  border: none;
  color: #f8fafc;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

.player-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #60a5fa;
}

.player-time-display {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 0.05em;
  font-variant-numeric: tabular-nums;
  margin-left: 4px;
}

.player-badge-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #93c5fd;
  letter-spacing: 0.03em;
  backdrop-filter: blur(6px);
}

.player-badge-right svg {
  width: 14px;
  height: 14px;
  color: #60a5fa;
}

/* Floating Language Switcher - Left Side Vertically Centered */
.floating-lang-switcher-left {
  position: fixed;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 12px 28px -4px rgba(15, 23, 42, 0.15), 0 4px 10px -2px rgba(15, 23, 42, 0.06);
  border-radius: 9999px;
  padding: 6px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-lang-switcher-left:hover {
  box-shadow: 0 16px 36px -4px rgba(54, 100, 239, 0.22);
  border-color: #cbd5e1;
  transform: translateY(-50%) scale(1.04);
}

.lang-btn-left {
  background: transparent;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 800;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.lang-btn-left:hover {
  color: #3664ef;
  background: #f1f5f9;
}

.lang-btn-left.active {
  background: #3664ef !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px -1px rgba(54, 100, 239, 0.45);
}

/* Floating Back to Top (Bottom Right) */
.btn-back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 998;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--color-border);
  color: var(--color-brand-primary);
  box-shadow: var(--shadow-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
}

.btn-back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.btn-back-to-top:hover {
  background: var(--color-brand-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Toast Notifications */
.portal-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-hover);
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.portal-toast.show {
  transform: translateX(-50%) translateY(0);
}

/* Form Styles */
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.375rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background-color: #ffffff;
  color: var(--color-text-main);
  font-size: 0.9375rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--color-brand-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Admin Dashboard Layout */
body.admin-body {
  min-height: 100vh;
  width: 100%;
  background-color: #f1f5f9;
  display: flex !important;
  flex-direction: column !important;
  overflow-x: hidden;
}

@media (min-width: 768px) {
  body.admin-body {
    flex-direction: row !important;
  }
}

.admin-sidebar {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  background: #0f172a;
  color: #f8fafc;
  min-height: 100vh;
  height: 100vh;
  position: sticky;
  top: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 40;
  overflow-y: auto;
}

/* Admin Mobile Navigation Drawer & Backdrop */
.admin-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background-color: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid #1e293b;
  flex-shrink: 0;
}

#admin-mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 280px;
  max-width: 85vw;
  background-color: #0f172a;
  color: #f8fafc;
  z-index: 9999;
  transform: translateX(-100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  border-right: 1px solid #1e293b;
  padding: 1.25rem;
}

#admin-mobile-drawer.is-open {
  transform: translateX(0) !important;
}

#admin-mobile-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#admin-mobile-backdrop.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

@media (min-width: 768px) {
  .admin-mobile-header,
  #admin-mobile-drawer,
  #admin-mobile-backdrop {
    display: none !important;
  }
}

.admin-main-content {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  background-color: #f1f5f9;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: #94a3b8;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9375rem;
  border-radius: var(--radius-md);
  transition: all 0.15s ease;
  margin-bottom: 4px;
}

.admin-nav-item:hover, .admin-nav-item.active {
  background: #1e293b;
  color: #38bdf8;
}

.admin-nav-item.active {
  background: #2563eb;
  color: #ffffff;
}

/* Responsive Utilities */
@media (max-width: 768px) {
  .player-time-display {
    font-size: 0.75rem;
  }
  .player-badge-right {
    font-size: 0.6875rem;
    padding: 3px 8px;
  }
}

/* ==========================================================================
   Footer Background & Floating Bubbles Animation
   ========================================================================== */
.footer-animated-wrapper {
  position: relative;
  overflow: hidden;
  background-color: #3664ef;
}

/* Translucent Glassy Bubbles over Primary Brand Color */
.footer-bubble {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.15) 45%, rgba(255, 255, 255, 0.03) 75%, rgba(255, 255, 255, 0.25) 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.5), 0 0 10px rgba(255, 255, 255, 0.18);
  pointer-events: none;
  bottom: -60px;
}

/* Specular bubble highlight */
.footer-bubble::after {
  content: '';
  position: absolute;
  top: 18%;
  left: 22%;
  width: 28%;
  height: 24%;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  transform: rotate(-35deg);
  filter: blur(0.5px);
}

.footer-bubble-1  { width: 22px; height: 22px; left: 3%;  animation: footerBubbleRise 11s infinite linear; animation-delay: 0s; }
.footer-bubble-2  { width: 38px; height: 38px; left: 10%; animation: footerBubbleRise 14s infinite linear; animation-delay: 2.5s; }
.footer-bubble-3  { width: 16px; height: 16px; left: 18%; animation: footerBubbleRise 9s  infinite linear; animation-delay: 1.2s; }
.footer-bubble-4  { width: 52px; height: 52px; left: 24%; animation: footerBubbleRise 16s infinite linear; animation-delay: 4s; }
.footer-bubble-5  { width: 28px; height: 28px; left: 32%; animation: footerBubbleRise 12s infinite linear; animation-delay: 0.7s; }
.footer-bubble-6  { width: 18px; height: 18px; left: 40%; animation: footerBubbleRise 10s infinite linear; animation-delay: 3.1s; }
.footer-bubble-7  { width: 44px; height: 44px; left: 48%; animation: footerBubbleRise 15s infinite linear; animation-delay: 5.5s; }
.footer-bubble-8  { width: 20px; height: 20px; left: 56%; animation: footerBubbleRise 11s infinite linear; animation-delay: 2s; }
.footer-bubble-9  { width: 60px; height: 60px; left: 63%; animation: footerBubbleRise 18s infinite linear; animation-delay: 3.8s; }
.footer-bubble-10 { width: 26px; height: 26px; left: 72%; animation: footerBubbleRise 13s infinite linear; animation-delay: 1.5s; }
.footer-bubble-11 { width: 16px; height: 16px; left: 80%; animation: footerBubbleRise 9.5s infinite linear; animation-delay: 4.5s; }
.footer-bubble-12 { width: 42px; height: 42px; left: 88%; animation: footerBubbleRise 14.5s infinite linear; animation-delay: 0.4s; }
.footer-bubble-13 { width: 24px; height: 24px; left: 94%; animation: footerBubbleRise 11.5s infinite linear; animation-delay: 2.8s; }
.footer-bubble-14 { width: 32px; height: 32px; left: 14%; animation: footerBubbleRise 13.5s infinite linear; animation-delay: 6s; }
.footer-bubble-15 { width: 48px; height: 48px; left: 76%; animation: footerBubbleRise 17s infinite linear; animation-delay: 7s; }
.footer-bubble-16 { width: 20px; height: 20px; left: 52%; animation: footerBubbleRise 10.5s infinite linear; animation-delay: 6.5s; }

@keyframes footerBubbleRise {
  0% {
    bottom: -60px;
    transform: translateX(0) scale(0.85);
    opacity: 0;
  }
  15% {
    opacity: 0.75;
  }
  50% {
    transform: translateX(24px) scale(1.08);
    opacity: 0.9;
  }
  75% {
    transform: translateX(-16px) scale(1.02);
    opacity: 0.75;
  }
  100% {
    bottom: 115%;
    transform: translateX(18px) scale(1.15);
    opacity: 0;
  }
}
