/**
 * Professional Overrides CSS
 * MMTUK - Think-tank quality styling refinements
 *
 * This file layers professional polish on top of the existing Webflow foundation.
 * To disable these styles, comment out the <link> in BaseLayout.astro
 */

/* ==========================================================================
   Phase 1: CSS Custom Properties for Easing
   ========================================================================== */

:root {
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ==========================================================================
   Hero Section Alignment Fix
   ========================================================================== */

.header102_content {
  max-width: none;
}

/* ==========================================================================
   Phase 1: Button Refinements
   ========================================================================== */

.button,
.button-2 {
  box-shadow: 0 1px 2px rgba(10, 30, 63, 0.08),
              0 2px 4px rgba(10, 30, 63, 0.06);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.button:hover,
.button-2:hover {
  box-shadow: 0 4px 8px rgba(10, 30, 63, 0.12),
              0 2px 4px rgba(10, 30, 63, 0.08);
  transform: translateY(-1px);
}

.button:active,
.button-2:active {
  transform: translateY(0);
}

/* Link-style buttons shouldn't have shadows */
.button-2.is-link {
  box-shadow: none;
}

.button-2.is-link:hover {
  box-shadow: none;
  transform: none;
}

/* ==========================================================================
   Phase 1: Card Hover Effects
   ========================================================================== */

.layout132_item,
.layout522_card-small,
.layout522_card-large {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.layout132_item:hover {
  box-shadow: 0 8px 24px rgba(10, 30, 63, 0.08);
  transform: translateY(-4px);
}

.layout522_card-small:hover,
.layout522_card-large:hover {
  box-shadow: 0 8px 24px rgba(10, 30, 63, 0.08);
  transform: translateY(-4px);
}

/* Image zoom on card hover */
.layout132_image-wrapper {
  overflow: hidden;
  border-radius: 8px;
}

.layout132_image {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.layout132_item:hover .layout132_image {
  transform: scale(1.03);
}

/* Card padding and rounded edges */
.layout132_item {
  padding: 0.5rem;
  border-radius: 12px;
  background: transparent;
}

.portfolio11_item,
.portfolio11_item-link {
  padding: 0.5rem;
  border-radius: 12px;
}

.event7_item,
.event7_item-link {
  padding: 0.5rem;
  border-radius: 12px;
}

/* Local Group Cards */
.portfolio11_item {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.portfolio11_item:hover {
  box-shadow: 0 8px 24px rgba(10, 30, 63, 0.08);
  transform: translateY(-4px);
}

.portfolio11_image-wrapper {
  overflow: hidden;
  border-radius: 8px;
}

.portfolio11_image {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio11_item:hover .portfolio11_image {
  transform: scale(1.03);
}

/* Event Cards */
.event7_item {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.event7_item:hover {
  box-shadow: 0 8px 24px rgba(10, 30, 63, 0.08);
  transform: translateY(-4px);
}

.event7_image-wrapper {
  overflow: hidden;
  border-radius: 8px;
  position: relative;
}

.event7_image {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.event7_item:hover .event7_image {
  transform: scale(1.03);
}

/* Ensure date badge stays visible on hover */
.event7_date-wrapper {
  z-index: 2;
  display: flex;
}

/* ==========================================================================
   Phase 1: Link Styling - Animated Underline
   ========================================================================== */

/* Rich text and body links - animated underline reveal */
.text-rich-text a,
p a:not(.button):not(.button-2) {
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0% 100%;
  background-repeat: no-repeat;
  background-size: 0% 1px;
  transition: background-size 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-rich-text a:hover,
p a:not(.button):not(.button-2):hover {
  background-size: 100% 1px;
}

/* ==========================================================================
   Phase 2: Typography Refinements
   ========================================================================== */

/* Heading hierarchy - ensure h2 is clearly smaller than h1 */
.heading-style-h2 {
  font-size: 3rem !important; /* Reduced from 4rem to create clear hierarchy */
}

@media screen and (max-width: 991px) {
  .heading-style-h2 {
    font-size: 2.25rem !important;
  }
}

@media screen and (max-width: 767px) {
  .heading-style-h2 {
    font-size: 1.875rem !important;
  }
}

@media screen and (max-width: 479px) {
  .heading-style-h2 {
    font-size: 1.5rem !important;
  }
}

/* Body text readability */
body {
  font-size: 1.0625rem; /* 17px */
  line-height: 1.65;
}

.text-rich-text {
  max-width: 65ch; /* Optimal reading width */
}

/* ==========================================================================
   Phase 3: Accordion Improvements
   ========================================================================== */

.accordion1_bottom {
  transition: height 0.4s var(--ease-out-expo) !important;
}

.accordion1_icon {
  transition: transform 0.4s var(--ease-spring) !important;
}

.accordion1_top {
  transition: background-color 0.3s ease;
  border-radius: 8px;
}

.accordion1_top:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

/* Accordion content button alignment */
.accordion1_bottom .button-group {
  justify-content: flex-end;
  margin-top: 1rem;
}

/* Button padding and hover effects */
.button-2.is-link.is-icon,
.button.is-link.is-icon {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.button-2.is-link.is-icon:hover,
.button.is-link.is-icon:hover {
  background-color: rgba(0, 69, 55, 0.08);
  box-shadow: 0 2px 4px rgba(10, 30, 63, 0.1);
}

/* ==========================================================================
   Phase 3: Focus States for Accessibility
   ========================================================================== */

*:focus-visible {
  outline: 2px solid var(--_mmt-uk-theme---accent, #004537);
  outline-offset: 3px;
  border-radius: 4px;
}

.button:focus-visible,
.button-2:focus-visible {
  box-shadow: 0 0 0 4px rgba(0, 69, 55, 0.15);
}

/* ==========================================================================
   Phase 3: Scroll-Triggered Reveals
   ========================================================================== */

.reveal-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays for grid items */
.reveal-on-scroll:nth-child(2) {
  transition-delay: 0.1s;
}

.reveal-on-scroll:nth-child(3) {
  transition-delay: 0.2s;
}

.reveal-on-scroll:nth-child(4) {
  transition-delay: 0.3s;
}

/* ==========================================================================
   Phase 4: Visual Hierarchy - Section Differentiation
   ========================================================================== */

/* Subtle background variations for visual rhythm */
.section_layout_home_education,
.section_layout_home_community {
  background-color: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Phase 4: Divider Enhancement
   ========================================================================== */

/* Divider horizontal - using original Webflow styles */

/* ==========================================================================
   Phase 4: Footer Enhancement
   ========================================================================== */

.footer4_component {
  position: relative;
}

.footer4_component::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg,
    var(--_mmt-uk-theme---accent, #004537),
    var(--_primitives---colors--downriver, #0a1e3f));
}

/* ==========================================================================
   Phase 5: Modern Testimonial Grid (replaces carousel)
   ========================================================================== */

/* Modern testimonial card grid */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.testimonial-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.35s var(--ease-out-quart);
  display: flex;
  flex-direction: column;
}

.testimonial-card::before {
  content: '\201C'; /* Opening quote mark */
  font-size: 4rem;
  color: var(--_mmt-uk-theme---accent, #004537);
  opacity: 0.15;
  position: absolute;
  top: 0.5rem;
  left: 1.5rem;
  line-height: 1;
  font-family: Georgia, serif;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(10, 30, 63, 0.1);
}

.testimonial-quote {
  font-size: 1.125rem;
  line-height: 1.6;
  font-weight: 500;
  color: var(--_primitives---colors--downriver, #0a1e3f);
  margin: 0;
  padding-top: 1rem;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.testimonial-author-image {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-author-info {
  display: flex;
  flex-direction: column;
}

.testimonial-author-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--_primitives---colors--downriver, #0a1e3f);
}

.testimonial-author-title {
  font-size: 0.8125rem;
  color: var(--_primitives---colors--neutral, #666);
}

/* ==========================================================================
   Phase 5: Form Styling
   ========================================================================== */

.form_input,
input[type="text"],
input[type="email"],
textarea {
  background-color: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 0.875rem 1rem;
  transition: all 0.25s ease;
}

.form_input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
textarea:focus {
  border-color: var(--_mmt-uk-theme---accent, #004537);
  box-shadow: 0 0 0 3px rgba(0, 69, 55, 0.1);
  outline: none;
}

/* ==========================================================================
   Phase 5: Mobile Navigation Enhancement
   ========================================================================== */

/* Fix hamburger button positioning - override float with flexbox */
@media screen and (max-width: 991px) {
  .navbar5_container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .navbar5_menu-button {
    float: none !important;
    margin-left: auto;
    flex-shrink: 0;
  }
}

/* Mobile Navigation Menu - Show and position correctly when opened */
@media screen and (max-width: 991px) {
  .w-nav-menu.w--open {
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start !important; /* Override space-between */
    align-items: stretch !important;
    height: auto !important; /* Don't stretch to full height */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--_mmt-uk-theme---background, #fff);
    border-bottom: 1px solid var(--color-scheme-1--border, #e5e5e5);
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }

  /* Ensure the nav container has relative positioning for absolute child */
  .w-nav {
    position: relative;
  }

  /* Stack nav links vertically on mobile */
  .w-nav-menu.w--open .navbar5_menu-left {
    flex-direction: column;
    width: 100%;
  }

  .w-nav-menu.w--open .navbar5_link {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }

  .w-nav-menu.w--open .navbar5_menu-right {
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
    gap: 0.5rem;
  }

  .w-nav-menu.w--open .navbar5_menu-right .button {
    width: 100%;
    text-align: center;
  }
}

.menu-icon1_line-top,
.menu-icon1_line-middle,
.menu-icon1_line-bottom {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.w-nav-button.w--open .menu-icon1_line-top {
  transform: rotate(45deg) translate(5px, 5px);
}

.w-nav-button.w--open .menu-icon1_line-middle {
  opacity: 0;
}

.w-nav-button.w--open .menu-icon1_line-bottom {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================================================
   Slider Whitespace Fix - Flexbox approach
   Eliminates inline-block whitespace gaps between slides
   ========================================================================== */

.w-slider-mask {
  display: flex !important;
  flex-wrap: nowrap;
}

.w-slide {
  flex: 0 0 100%;
  display: block;
}

/* ==========================================================================
   Header Slider Enhancements
   ========================================================================== */

/* Contain slider images at all screen sizes */
.header102_slider {
  overflow: hidden;
}

.header102_slide-image {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  /* Anchor slide images from left to prevent text cutoff at narrow widths (992px-1400px) */
  object-position: left center;
}

.header102_slide:hover .header102_slide-image {
  transform: scale(1.02);
}

.header102_arrow {
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.header102_arrow:hover {
  transform: scale(1.1);
}

/* Smooth carousel slide transitions via margin-left */
.header102_slide:first-child {
  transition: margin-left 0.5s ease;
}

/* ==========================================================================
   Team Member Cards
   ========================================================================== */

.team8_item {
  padding: 1rem;
  border-radius: 16px;
  background: transparent;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.team8_item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(10, 30, 63, 0.08);
  background: rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   Article Cards Enhancement
   ========================================================================== */

.blog1_item {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog1_item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(10, 30, 63, 0.08);
}

.blog1_image-wrapper {
  overflow: hidden;
  border-radius: 8px;
}

.blog1_image {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog1_item:hover .blog1_image {
  transform: scale(1.03);
}

/* ==========================================================================
   Contact Section Enhancement
   ========================================================================== */

.contact15_item {
  transition: all 0.3s ease;
  padding: 1rem;
  border-radius: 8px;
}

.contact15_item:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

/* ==========================================================================
   Ecosystem Cards
   ========================================================================== */

.layout478_card {
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.layout478_card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(10, 30, 63, 0.08);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 767px) {
  /* Reduce hover effects on mobile for better touch experience */
  .layout132_item:hover,
  .team8_item:hover,
  .blog1_item:hover,
  .portfolio11_item:hover,
  .event7_item:hover {
    transform: none;
  }

  /* Stack testimonial grid on mobile */
  .testimonial-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Accordion content - stack text and button on mobile */
  .accordion1_bottom .margin-bottom.margin-small[style*="display: flex"] {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .accordion1_bottom .margin-bottom.margin-small[style*="display: flex"] .button.is-link {
    margin-top: 1rem;
    align-self: flex-end;
  }

  /* Bio photos - larger on mobile for visibility */
  .team8_image {
    width: 80px !important;
    height: 80px !important;
    min-width: 80px;
  }
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal-on-scroll {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   Join Page Hero - Use Webflow defaults with minimal adjustments
   ========================================================================== */

/* Bio photos - larger on tablet for visibility */
@media screen and (max-width: 991px) {
  .team8_image {
    width: 100px !important;
    height: 100px !important;
    min-width: 100px;
  }
}

/* ==========================================================================
   Anchor Link Offset for Sticky Navbar
   ========================================================================== */

/* Offset anchor scroll position to account for sticky navbar (~80px height) */
[id="Network"],
[id="Events"],
[id="discord"],
[id="LocalNews"],
[id="MMTUKNews"],
[id="MMTUKEvents"],
[id="SteeringGroup"],
[id="Job-guarantee"],
[id="ZIRP"],
[id="WhatIsMMT"],
[id="mmt-core-insights"],
[id="but-what-about"],
[id="AdvisoryServices"],
[id="our-approach"] {
  scroll-margin-top: 100px;
}

/* ==========================================================================
   News Article Image Containment
   ========================================================================== */

.publication_blog-post-header_image-wrapper {
  overflow: hidden;
  border-radius: 8px;
}

.publication_blog-post-header_image {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  object-position: center;
}

/* ==========================================================================
   Event Registration Box
   ========================================================================== */

.registration-box {
  margin-top: 1.25rem;
  margin-bottom: -1.5rem;
}

.registration-box__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: rgba(0, 69, 55, 0.06);
  border: 1px solid var(--_mmt-uk-theme---accent, #004537);
  border-radius: 8px;
}

.registration-box__inner .button {
  align-self: flex-start;
}

.registration-box__text {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.registration-box__text strong {
  font-size: 1rem;
  color: var(--_primitives---colors--downriver, #0a1e3f);
}

.registration-box__text span {
  font-size: 0.8125rem;
  color: var(--_primitives---colors--neutral, #666);
}

@media screen and (max-width: 479px) {
  .registration-box__inner {
    text-align: center;
  }

  .registration-box__inner .button {
    align-self: stretch;
  }
}

/* ==========================================================================
   Event Registration Progress Bar
   ========================================================================== */

.event-progress {
  width: 100%;
}

.event-progress__count {
  font-size: 0.875rem;
  color: var(--_primitives---colors--downriver, #0a1e3f);
  margin-bottom: 0.375rem;
}

.event-progress__track {
  width: 100%;
  height: 14px;
  background: #E8E8E8;
  border-radius: 7px;
  overflow: hidden;
}

.event-progress__fill {
  height: 100%;
  background: var(--_mmt-uk-theme---accent, #004537);
  border-radius: 7px;
  position: relative;
  overflow: hidden;
  animation: event-progress-shimmer 2.5s ease-in-out infinite;
}

.event-progress__urgency {
  font-size: 0.75rem;
  color: var(--_primitives---colors--neutral, #666);
  text-align: right;
  margin-top: 0.25rem;
}

@keyframes event-progress-shimmer {
  0% { opacity: 1; }
  50% { opacity: 0.85; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .event-progress__fill {
    animation: none;
  }
}

/* ==========================================================================
   News Article Heading Hierarchy
   ========================================================================== */

/* Make h2 subheadings in news articles smaller than the main title */
.content29_content-wrapper .text-rich-text h2 {
  font-size: 1.5rem !important;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

@media screen and (max-width: 767px) {
  .content29_content-wrapper .text-rich-text h2 {
    font-size: 1.25rem !important;
  }
}

/* ==========================================================================
   ActionNetwork Form Fixes
   ========================================================================== */

/* Ensure ActionNetwork form container has minimum dimensions */
#can-form-area-mmtuk-supporter-registration-form {
  min-height: 400px;
  width: 100% !important;
}

/* Ensure the w-embed container displays correctly */
.actionnetwork-form .w-embed {
  display: block;
  width: 100%;
}

/* Override any default ActionNetwork styling conflicts */
#can_embed_form {
  width: 100% !important;
}

/* Footer social media links */
.footer8_social-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer8_social-link {
  color: #e2cdaa;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.footer8_social-link:hover {
  color: #fff;
  text-decoration: none;
}

@media screen and (max-width: 767px) {
  .footer8_social-links {
    margin: 0.75rem 0;
  }
}

/* ==========================================================================
   Mega Navigation Menu - Desktop Panel
   ========================================================================== */

.meganav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 180ms var(--ease-out-expo), transform 180ms var(--ease-out-expo);
}

.meganav[hidden] {
  display: none !important;
}

.meganav[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.meganav__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: -1;
}

.meganav__container {
  background-color: var(--_mmt-uk-theme---background, #fef9f1);
  border-bottom: 2px solid var(--_mmt-uk-theme---sercondary, #e2cdaa);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.meganav__grid {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0 1.25rem;
  align-items: start;
}

.meganav__nav-cols {
  display: flex;
  gap: 1.5rem;
}

.meganav__col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.meganav__section {
  opacity: 1;
}

.meganav__heading {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--_mmt-uk-theme---accent, #004537);
  text-decoration: none;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid var(--_mmt-uk-theme---sercondary, #e2cdaa);
  margin-bottom: 0.25rem;
}

.meganav__heading:hover {
  color: var(--_mmt-uk-theme---accent, #004537);
}

.meganav__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.meganav__link {
  display: block;
  padding: 0.1875rem 0.5rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--_primitives---colors--neutral-darkest, #1a1a1a);
  text-decoration: none;
  border-radius: 6px;
  transition: background-color 200ms ease, color 200ms ease;
}

.meganav__link:hover {
  background-color: rgba(0, 69, 55, 0.06);
  color: var(--_mmt-uk-theme---accent, #004537);
}

/* --- Featured Event Card --- */

.meganav__featured {
  width: 250px;
  flex-shrink: 0;
  border-left: 1px solid var(--_mmt-uk-theme---sercondary, #e2cdaa);
  padding-left: 1.25rem;
}

.meganav__featured-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--_mmt-uk-theme---accent, #004537);
  margin-bottom: 0.5rem;
}

.meganav__featured-card {
  display: block;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: transform 200ms var(--ease-out-expo), box-shadow 200ms var(--ease-out-expo);
}

.meganav__featured-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.meganav__featured-image-wrapper {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--_mmt-uk-theme---sercondary, #e2cdaa);
}

.meganav__featured-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms var(--ease-out-expo);
}

.meganav__featured-card:hover .meganav__featured-image {
  transform: scale(1.04);
}

.meganav__featured-content {
  padding: 0.625rem 0.75rem;
}

.meganav__featured-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--_primitives---colors--downriver, #0a1e3f);
  line-height: 1.3;
}

.meganav__featured-subtitle {
  font-size: 0.75rem;
  color: var(--_primitives---colors--neutral, #666);
  margin-top: 0.125rem;
}

.meganav__featured-meta {
  font-size: 0.6875rem;
  color: var(--_primitives---colors--neutral, #666);
  margin-top: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.meganav__featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--_mmt-uk-theme---accent, #004537);
  margin-top: 0.375rem;
}

/* --- Active nav trigger state --- */

.meganav-trigger--active {
  color: var(--_mmt-uk-theme---accent, #004537) !important;
}

.meganav-trigger--active::after {
  width: 100% !important;
  background-color: var(--_mmt-uk-theme---accent, #004537) !important;
}

/* --- Mobile data source (always hidden) --- */

#meganav-mobile-data {
  display: none !important;
}

/* --- Mobile elements (hidden at desktop/tablet widths) --- */

.meganav-mobile__chevron {
  display: none;
}

.meganav-mobile__sublist {
  display: none;
}

.meganav-mobile__featured-banner {
  display: none;
}

/* ==========================================================================
   Mega Navigation Menu - Mobile Styles
   ========================================================================== */

@media screen and (max-width: 991px) {
  /* Hide the desktop panel on mobile */
  .meganav {
    display: none !important;
  }

  /* Show chevron on mobile */
  .meganav-mobile__chevron {
    display: inline-flex;
    align-items: center;
    margin-left: 0.25rem;
    transition: transform 200ms ease;
  }

  [data-meganav-trigger][aria-expanded="true"] .meganav-mobile__chevron {
    transform: rotate(180deg);
  }

  /* Mobile sub-link list */
  .meganav-mobile__sublist {
    display: none;
    flex-direction: column;
    padding-left: 1rem;
    overflow: hidden;
  }

  .meganav-mobile__sublist.is-open {
    display: flex;
  }

  .meganav-mobile__link {
    display: block;
    padding: 0.5rem 0;
    font-size: 0.9375rem;
    color: var(--_primitives---colors--neutral-darkest, #1a1a1a);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .meganav-mobile__link:hover {
    color: var(--_mmt-uk-theme---accent, #004537);
  }

  /* Mobile featured event banner */
  .meganav-mobile__featured {
    margin-bottom: 0.75rem;
    border: 1px solid var(--_mmt-uk-theme---sercondary, #e2cdaa);
    border-radius: 8px;
    background: rgba(0, 69, 55, 0.03);
    overflow: hidden;
  }

  .meganav-mobile__featured-link {
    display: block;
    padding: 0.75rem;
    text-decoration: none;
    color: inherit;
  }

  .meganav-mobile__featured-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--_mmt-uk-theme---accent, #004537);
    margin-bottom: 0.25rem;
  }

  .meganav-mobile__featured-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--_primitives---colors--downriver, #0a1e3f);
  }

  .meganav-mobile__featured-subtitle {
    font-size: 0.8125rem;
    color: var(--_primitives---colors--neutral, #666);
  }

  .meganav-mobile__featured-meta {
    font-size: 0.75rem;
    color: var(--_primitives---colors--neutral, #666);
    margin-top: 0.25rem;
  }
}

/* ==========================================================================
   Mega Navigation Menu - Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .meganav,
  .meganav__featured-card,
  .meganav__featured-image,
  .meganav__section,
  .meganav__link,
  .meganav-mobile__chevron,
  .meganav-mobile__sublist {
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   Milestone Progress Indicator
   ========================================================================== */

.milestone-progress {
  padding: 1.5rem 0 1rem;
  text-align: center;
}

.milestone-progress__heading {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--_primitives---colors--shuttle-gray, #5a6775);
  margin-bottom: 0.5rem;
}

.milestone-progress__track-container {
  position: relative;
  height: 60px;
  margin: 1rem 0;
}

.milestone-progress__track {
  position: absolute;
  top: 10px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--_primitives---colors--orange-peel-lightest, #fdf5e5);
  border-radius: 2px;
}

.milestone-progress__fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--_primitives---colors--orange-peel, #f0a202);
  border-radius: 2px;
  transition: width 0.6s ease;
}

.milestone-progress__marker-group {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.milestone-progress__marker {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid;
}

.milestone-progress__marker--passed {
  background: var(--_primitives---colors--orange-peel, #f0a202);
  border-color: var(--_primitives---colors--orange-peel, #f0a202);
}

.milestone-progress__marker--current {
  background: transparent;
  border-color: var(--_primitives---colors--orange-peel, #f0a202);
  animation: milestone-pulse 2s ease-in-out infinite;
}

.milestone-progress__marker--future {
  background: var(--_primitives---colors--shuttle-gray-lightest, #eeeff1);
  border-color: var(--_primitives---colors--shuttle-gray-lighter, #d5d8dc);
}

.milestone-progress__label {
  font-size: 0.75rem;
  margin-top: 0.25rem;
  color: var(--_primitives---colors--shuttle-gray, #5a6775);
}

.milestone-progress__motivational {
  font-size: 0.875rem;
  color: var(--_primitives---colors--shuttle-gray, #5a6775);
  text-align: center;
  margin-top: 0.5rem;
}

@keyframes milestone-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240, 162, 2, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(240, 162, 2, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .milestone-progress__marker--current {
    animation: none;
  }
}

@media screen and (max-width: 479px) {
  .milestone-progress__marker {
    width: 18px;
    height: 18px;
  }

  .milestone-progress__label {
    font-size: 0.625rem;
  }
}

/* ==========================================================================
   Event Badge Component
   ========================================================================== */

.event-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 10rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.event-badge--partner {
  background-color: #3A8FB7;
  color: #fff;
}

.event-badge--default {
  background-color: var(--_primitives---opacity--neutral-darkest-5);
  color: var(--_primitives---colors--neutral-darkest);
}
