body {
  font-family: "Plus Jakarta Sans", sans-serif;
  padding-top: 0 !important;
  margin-top: 0 !important;
}
section[id] {
  scroll-margin-top: 90px;
}

/* --- Animated Headline Dots --- */
.dots-container span {
  display: inline-block;
  opacity: 0;
  animation: dot-sequence 1.8s infinite;
  width: 0.2em;
}
.dots-container span:nth-child(1) {
  animation-delay: 0s;
}
.dots-container span:nth-child(2) {
  animation-delay: 0.3s;
}
.dots-container span:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes dot-sequence {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  25% {
    opacity: 1;
    transform: translateY(-3px);
  }
  50%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* KPI Flip Card Logic (already present, but ensure border-radius and padding match) */
.flip-card {
  perspective: 1000px;
  height: 280px;
}
.flip-card-inner {
  transition: transform 0.6s;
  transform-style: preserve-3d;
  position: relative;
  width: 100%;
  height: 100%;
}
.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-front,
.flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}
.flip-back {
  transform: rotateY(180deg);
}

.nav-scrolled {
  background-color: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

.custom-ticker-pill {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 92%;
  max-width: 1100px;
  height: 52px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  overflow: hidden;
}
/* GLOBAL STYLES */
:root {
  --bs-primary: #1e3a8a;
  --bs-warning: #facc15;
  --bs-dark: #0f172a;
}

body {
  font-family: "Inter", sans-serif;
  color: #334155;
  padding-top: 70px; /* Offset for fixed navbar */
  scroll-behavior: smooth;
}

.page-section {
  padding: 100px 0;
}

.divider {
  width: 60px;
  height: 4px;
  border: none;
  opacity: 1;
}

/* NAVBAR - Semi-transparent logic */
#mainNav {
  padding: 15px 0;
  transition: all 0.3s ease;
  background-color: transparent; /* Top position */
}

#mainNav.navbar-scrolled {
  background-color: rgba(
    15,
    23,
    42,
    0.9
  ) !important; /* Semi-transparent black on scroll */
  backdrop-filter: blur(10px); /* Modern blur effect */
  padding: 10px 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* HERO SECTION */
.masthead {
  height: 100vh;
  min-height: 500px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  /* Dark Overlay */
  background-blend-mode: overlay;
  background-color: rgba(15, 23, 42, 0.7);
}

/* KPI FLIP CARDS */
.flip-card {
  background-color: transparent;
  height: 280px;
  perspective: 1000px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border-radius: 15px;
  padding: 20px;
}

.flip-card-back {
  transform: rotateY(180deg);
}

/* ADVISOR SECTION */
.advisor-image-container {
  position: relative;
  display: inline-block;
}

.advisor-img {
  border: 10px solid white;
  transition: transform 0.3s ease;
}

.advisor-experience-badge {
  position: absolute;
  bottom: 20px;
  right: -10px;
  padding: 10px 20px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* BUTTONS */
.btn-warning {
  color: #000;
  border-radius: 8px;
  transition: transform 0.2s;
}

.btn-warning:hover {
  transform: translateY(-3px);
  background-color: #eab308;
}

.dots-container span:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes dot-sequence {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  25% {
    opacity: 1;
    transform: translateY(-3px); /* Subtle hop up */
  }
  50%,
  100% {
    opacity: 1;
    transform: translateY(0); /* Return to base */
  }
  /* At 100% the loop restarts, causing them to disappear and re-appear */
}

/* --- CUSTOM TICKER PILL --- */
.custom-ticker-pill {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: 92%;
  max-width: 1100px;
  height: 52px;
  background: rgba(
    15,
    23,
    42,
    0.85
  ); /* Matches your --bs-dark with transparency */
  backdrop-filter: blur(20px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* CRITICAL: Fix for Infinite Scrolling */
#live-ticker {
  display: flex;
  width: max-content; /* Ensures content doesn't wrap, enabling the infinite loop */
}

/* --- HEADLINE DOTS ANIMATION (Cleaned Up) --- */
.dots-container span {
  display: inline-block;
  opacity: 0;
  animation: dot-sequence 1.8s infinite;
  width: 0.2em;
}

.dots-container span:nth-child(1) {
  animation-delay: 0s;
}
.dots-container span:nth-child(2) {
  animation-delay: 0.3s;
}
.dots-container span:nth-child(3) {
  animation-delay: 0.6s;
}

@keyframes dot-sequence {
  0% {
    opacity: 0;
    transform: translateY(0);
  }
  25% {
    opacity: 1;
    transform: translateY(-3px);
  }
  50%,
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}
