/* =========================================================
   HAEGL INTERNSHIP ANNOUNCEMENT RIBBON BANNER
   Mobile: Displays ABOVE the navbar
   Desktop: Displays BELOW the navbar
   Refreshes: Always reappears on page reload
   ========================================================= */

/* ---------------------------------------------------------
   Announcement Ribbon Styles
   --------------------------------------------------------- */
:root {
  --intern-banner-height-dt: 38px;
  --intern-banner-height-mb: 36px;
}

.haegl-intern-banner {
  position: fixed;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg, #100206 0%, #20040e 25%, #80071c 50%, #20040e 75%, #100206 100%);
  background-size: 200% 100%;
  animation: internBannerGradient 12s ease infinite;
  color: #ffffff;
  font-family: var(--font-display, "Space Grotesk", system-ui, sans-serif);
  text-decoration: none;
  overflow: hidden;
  box-sizing: border-box;
  z-index: 995;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.25s ease,
              top 0.25s ease,
              height 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
}

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

/* Subtle Premium Ambient Shimmer */
.haegl-intern-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform: skewX(-25deg);
  animation: internBannerRay 5.5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  pointer-events: none;
}

@keyframes internBannerRay {
  0%, 45% { left: -100%; }
  100% { left: 200%; }
}

/* Inner Layout */
.intern-banner__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-width: 1400px;
  padding: 0 16px;
  height: 100%;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

/* Primary Text */
.intern-banner__title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ffffff;
  text-transform: uppercase;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.intern-banner__subtitle {
  font-size: 0.76rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.intern-banner__dot-sep {
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
}

.intern-banner__badge-stream {
  background: rgba(212, 0, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  color: #ffffff;
}

/* Register Now CTA Chip */
.intern-banner__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  color: #b90022 !important;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 12px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  flex-shrink: 0;
}

.intern-banner__cta svg {
  transition: transform 0.2s ease;
}

.haegl-intern-banner:hover .intern-banner__cta {
  background: #ffffff;
  color: #d4002a !important;
  transform: translateX(2px) scale(1.04);
  box-shadow: 0 4px 14px rgba(212, 0, 42, 0.55);
}

.haegl-intern-banner:hover .intern-banner__cta svg {
  transform: translateX(3px);
}

/* Dismiss Close Button */
.intern-banner__dismiss {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
  z-index: 2;
}

.intern-banner__dismiss:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

/* ---------------------------------------------------------
   DESKTOP VIEW: Placed BELOW the Navbar
   --------------------------------------------------------- */
@media (min-width: 992px) {
  .haegl-intern-banner {
    top: var(--header-height, 80px);
    height: var(--intern-banner-height-dt);
    border-bottom: 1px solid rgba(212, 0, 42, 0.45);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    z-index: 995 !important;
  }

  /* Ensure navbar and all dropdown menus appear OVER the banner */
  body.has-intern-banner .navbar {
    z-index: 1020 !important;
  }

  body.has-intern-banner .navbar .navbar__dropdown {
    z-index: 1030 !important;
  }

  body.has-intern-banner .navbar__item {
    z-index: 1025;
  }

  /* Scrolled Navbar Adjustment */
  body.has-intern-banner .navbar.navbar--scrolled ~ .haegl-intern-banner {
    top: 70px;
  }

  /* Offset the Hero Section gracefully on Desktop */
  body.has-intern-banner .haegl-hero {
    padding-top: calc(var(--header-height, 80px) + var(--intern-banner-height-dt) + 2.5vh + 5mm) !important;
    padding-bottom: calc(4vh + 12mm) !important;
  }
}

/* ---------------------------------------------------------
   MOBILE VIEW: Placed ABOVE the Navbar
   --------------------------------------------------------- */
@media (max-width: 991px) {
  .haegl-intern-banner {
    top: 0;
    height: var(--intern-banner-height-mb);
    border-bottom: 1px solid rgba(212, 0, 42, 0.6);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1002; /* Above mobile navbar z-index 1000 */
    padding-right: 32px; /* Space for close button */
  }

  /* Push mobile navbar DOWN by banner height */
  body.has-intern-banner .navbar {
    top: var(--intern-banner-height-mb) !important;
  }

  /* Push mobile menu drawer DOWN by banner height */
  body.has-intern-banner .navbar__mobile {
    top: calc(var(--header-height, 80px) + var(--intern-banner-height-mb)) !important;
  }

  /* Adjust Hero top padding on mobile */
  body.has-intern-banner .haegl-hero {
    padding-top: calc(var(--header-height, 70px) + var(--intern-banner-height-mb, 36px) + 14px) !important;
  }

  /* Mobile Content Simplification for small screens */
  .intern-banner__subtitle {
    display: none !important;
  }

  .intern-banner__title {
    font-size: 0.74rem;
  }

  .intern-banner__cta {
    font-size: 0.68rem;
    padding: 2px 8px;
  }
}

/* Extra small mobile screens (< 380px) */
@media (max-width: 380px) {
  .intern-banner__title {
    font-size: 0.68rem;
  }
  .intern-banner__cta {
    font-size: 0.64rem;
    padding: 2px 6px;
  }
}
