/* Ethos Institute Custom Styles */

/* Import Inter font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Custom animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Button hover effects */
.btn-primary {
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

/* Sticky CTA Button Color Variations for A/B Testing */

/* Variant A: Gold (Default - Current Brand Color) */
.cta-button-gold {
  background: linear-gradient(135deg, #D4AF37 0%, #C19B2B 100%);
  color: white;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}
.cta-button-gold:hover {
  background: linear-gradient(135deg, #E5C047 0%, #D4AF37 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

/* Variant B: Red (High Urgency - Matches Risk Assessment) */
.cta-button-red {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}
.cta-button-red:hover {
  background: linear-gradient(135deg, #F87171 0%, #EF4444 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Variant C: Navy (Authority - Matches Brand) */
.cta-button-navy {
  background: linear-gradient(135deg, #0A1F44 0%, #1A2F54 100%);
  color: white;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}
.cta-button-navy:hover {
  background: linear-gradient(135deg, #1A2F54 0%, #2A3F64 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(10, 31, 68, 0.4);
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Stat number animation */
.stat-number {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* Navigation sticky shadow */
.nav-shadow {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Section spacing - Reduced for less white space */
.section-spacing {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (max-width: 768px) {
  .section-spacing {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #0A1F44 0%, #1A2F54 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #D4AF37;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #C19B2B;
}

/* Expandable section */
.expandable-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.expandable-content.active {
  max-height: 2000px;
}

/* Link underline effect */
.link-underline {
  position: relative;
}

.link-underline::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #D4AF37;
  transition: width 0.3s ease;
}

.link-underline:hover::after {
  width: 100%;
}

/* Grid responsive adjustments */
@media (max-width: 640px) {
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
}

/* Interactive Pillar Cards - Grid View */
.interactive-pillar-card {
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-pillar-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Pillar Modal Animations */
.pillar-modal {
  animation: fadeIn 0.3s ease-out;
  backdrop-filter: blur(4px);
}

.pillar-modal .modal-content {
  animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Modal scrollbar styling */
.pillar-modal .modal-content {
  scrollbar-width: thin;
  scrollbar-color: #D4AF37 #f1f1f1;
}

.pillar-modal .modal-content::-webkit-scrollbar {
  width: 8px;
}

.pillar-modal .modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.pillar-modal .modal-content::-webkit-scrollbar-thumb {
  background: #D4AF37;
  border-radius: 10px;
}

.pillar-modal .modal-content::-webkit-scrollbar-thumb:hover {
  background: #C19B2B;
}

/* Responsive grid for pillars */
@media (max-width: 1024px) {
  .interactive-pillar-card:hover {
    transform: translateY(-4px) scale(1.01);
  }
}

@media (max-width: 768px) {
  .pillar-modal .modal-content {
    max-height: 85vh;
  }
  
  .interactive-pillar-card:hover {
    transform: translateY(-2px);
  }
}

/* Navigation Focus States - WCAG 2.1 AA Accessibility */
nav button:focus,
nav a:focus {
  outline: 2px solid #D4AF37; /* Gold color matching brand */
  outline-offset: 2px;
  border-radius: 4px;
}

/* Focus-visible: only show outline for keyboard navigation, not mouse clicks */
nav button:focus-visible,
nav a:focus-visible {
  outline: 2px solid #D4AF37;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Remove default focus for mouse users */
nav button:focus:not(:focus-visible),
nav a:focus:not(:focus-visible) {
  outline: none;
}

/* Skip to content link for screen readers - appears on Tab key focus */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: #D4AF37;
  color: #0A1F44;
  padding: 8px 16px;
  text-decoration: none;
  font-weight: 600;
  z-index: 100;
  border-radius: 4px;
  transition: top 0.2s ease-out;
}

.skip-to-content:focus {
  top: 8px;
  outline: 2px solid #0A1F44;
  outline-offset: 2px;
}

/* Mobile Menu Enhancements - Smooth Animations */
.mobile-menu-hidden {
  max-height: 0;
  opacity: 0;
}

.mobile-menu-visible {
  max-height: 100vh;
  opacity: 1;
}

.mobile-menu-content {
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile menu button active state */
#mobile-menu-button[aria-expanded="true"] {
  background-color: rgba(212, 175, 55, 0.1);
}

/* Smooth icon transition */
#mobile-menu-icon {
  transition: transform 0.3s ease;
}

#mobile-menu-button[aria-expanded="true"] #mobile-menu-icon {
  transform: rotate(90deg);
}

/* Search Modal Styles */
#search-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 20vh 1rem 1rem;
  transition: opacity 0.2s ease-out, visibility 0.2s ease-out;
}

.search-modal-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.search-modal-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.search-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease-out;
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.search-header {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.search-icon {
  color: #9ca3af;
  font-size: 1.25rem;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1.125rem;
  color: #1f2937;
  background: transparent;
}

.search-input::placeholder {
  color: #9ca3af;
}

.search-close {
  padding: 0.5rem;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.2s;
}

.search-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.search-hint {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-hint kbd,
.search-footer-hint kbd {
  padding: 0.125rem 0.375rem;
  background: #f3f4f6;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  color: #4b5563;
}

.search-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-empty {
  padding: 3rem 2rem;
  text-align: center;
  color: #9ca3af;
}

.search-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.search-empty p {
  font-size: 0.875rem;
  margin: 0;
}

.search-result-item {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 0.25rem;
}

.search-result-item:hover,
.search-result-item.active {
  background: #f9fafb;
}

.search-result-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.search-result-title {
  font-weight: 600;
  color: #0A1F44;
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-result-category {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  background: #D4AF37;
  color: white;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.search-result-snippet {
  font-size: 0.875rem;
  color: #6b7280;
  line-height: 1.5;
}

.search-result-snippet mark {
  background: #fef3c7;
  color: #92400e;
  padding: 0.125rem 0.25rem;
  border-radius: 2px;
  font-weight: 500;
}

/* Recent search items */
.recent-search-item {
  cursor: pointer;
  border-left: 3px solid transparent;
}

.recent-search-item:hover {
  border-left-color: #D4AF37;
}

.recent-search-item.active {
  border-left-color: #D4AF37;
  background: #f9fafb;
}

.search-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.search-footer-hint {
  font-size: 0.75rem;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Responsive search modal */
@media (max-width: 640px) {
  #search-modal {
    padding: 5vh 0.5rem 0.5rem;
  }
  
  .search-container {
    max-width: 100%;
  }
  
  .search-results {
    max-height: 50vh;
  }
}

/* Hover Delay for Dropdowns - Prevents Accidental Opens */
nav .group:hover > div[role="menu"] {
  transition-delay: 300ms;
}

/* Remove delay when closing (for faster response) */
nav .group > div[role="menu"] {
  transition-delay: 0ms;
}

/* Active Page Indicators - DISABLED (No gold underlines or special styling) */
/* All active page indicators removed per user request */
nav a[aria-current="page"],
nav button[aria-current="page"] {
  /* No special styling for active pages */
}

nav a[aria-current="page"]::after,
nav button[aria-current="page"]::after {
  /* No gold bars anywhere */
  display: none !important;
}

/* Active dropdown button state - No special styling */
nav .group button[aria-current="page"] {
  /* No gold color for active state */
}

/* Responsive Logo Sizing - Optimized for Visual Hierarchy */
.responsive-logo {
  height: 64px; /* Mobile default */
  transition: height 0.3s ease;
}

/* Tablet (768px - 1023px) - Slightly smaller for space efficiency */
@media (min-width: 768px) and (max-width: 1023px) {
  .responsive-logo {
    height: 60px;
  }
}

/* Desktop (1024px - 1439px) - Standard desktop size */
@media (min-width: 1024px) and (max-width: 1439px) {
  .responsive-logo {
    height: 68px;
  }
}

/* Large Desktop (1440px+) - Larger for high-res displays */
@media (min-width: 1440px) {
  .responsive-logo {
    height: 72px;
  }
}

/* ==========================================================================
   Mega Menu Styles
   ========================================================================== */

/* Mega Menu Container */
.mega-menu-container {
  animation: megaMenuFadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top center;
}

@keyframes megaMenuFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Featured Tool Banner */
.mega-menu-featured {
  position: relative;
  overflow: hidden;
}

.mega-menu-featured::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.mega-menu-featured:hover::before {
  opacity: 1;
}

/* Featured Icon */
.mega-menu-icon-featured {
  transition: all 0.3s ease;
}

.mega-menu-featured:hover .mega-menu-icon-featured {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* Tool Cards */
.mega-menu-card {
  position: relative;
  overflow: hidden;
}

.mega-menu-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.5s ease;
}

.mega-menu-card:hover::before {
  left: 100%;
}

/* Card Icons */
.mega-menu-icon {
  transition: all 0.3s ease;
}

.mega-menu-card:hover .mega-menu-icon {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Category Headers */
.mega-menu-container h3 {
  letter-spacing: 0.05em;
  position: relative;
  padding-left: 8px;
}

.mega-menu-container h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 14px;
  background: linear-gradient(to bottom, #D4AF37, #B8941F);
  border-radius: 2px;
}

/* Arrow Transitions */
.mega-menu-card .fa-arrow-right {
  transition: all 0.3s ease;
}

.mega-menu-card:hover .fa-arrow-right {
  transform: translateX(4px);
}

/* Time & Difficulty Badges */
.mega-menu-card .fa-clock,
.mega-menu-card .fa-signal {
  transition: color 0.2s ease;
}

.mega-menu-card:hover .fa-clock,
.mega-menu-card:hover .fa-signal {
  color: #D4AF37;
}

/* NEW Badge Pulse Animation */
@keyframes pulseBadge {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0);
  }
}

.mega-menu-card span.bg-green-500 {
  animation: pulseBadge 2s infinite;
}

/* Most Popular Badge Shimmer */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.mega-menu-featured span.bg-purple-100 {
  background: linear-gradient(
    90deg,
    #f3e8ff 0%,
    #e9d5ff 25%,
    #f3e8ff 50%,
    #e9d5ff 75%,
    #f3e8ff 100%
  );
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

/* Responsive Adjustments */
@media (max-width: 1023px) {
  /* Hide mega menu on tablet and below, use simplified dropdown */
  .mega-menu-container {
    width: 100% !important;
    max-width: 400px;
  }
  
  .mega-menu-container > div:first-child {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 767px) {
  /* On mobile, mega menu should collapse to simple list */
  .mega-menu-featured {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
  }
  
  .mega-menu-icon,
  .mega-menu-icon-featured {
    width: 40px !important;
    height: 40px !important;
  }
}

/* Accessibility: Focus States */
.mega-menu-card:focus-visible,
.mega-menu-featured a:focus-visible {
  outline: 3px solid #D4AF37;
  outline-offset: 2px;
  border-radius: 8px;
}

/* Smooth transitions for all interactive elements */
.mega-menu-card *,
.mega-menu-featured * {
  transition: all 0.2s ease;
}

/* Grid Gap Animation */
.mega-menu-container > div > div {
  animation: slideInGrid 0.4s ease-out backwards;
}

.mega-menu-container > div > div:nth-child(1) {
  animation-delay: 0.1s;
}

.mega-menu-container > div > div:nth-child(2) {
  animation-delay: 0.2s;
}

@keyframes slideInGrid {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Category Carousel Styles */
.scrollbar-hide {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;  /* Chrome, Safari and Opera */
}

#category-carousel {
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.category-pill {
  scroll-snap-align: start;
  position: relative;
}

/* Tooltip smooth transition */
#category-tooltip {
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

/* Responsive carousel adjustments */
@media (max-width: 768px) {
  .category-pill {
    width: 112px;
    height: 112px;
  }
}

/* ===================================
   Phase 3: Search Category Filters
   =================================== */

/* Search filters container */
.search-filters {
  display: none; /* Hidden by default, shown when search has results */
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  background-color: #f9fafb;
}

/* Individual filter button */
.search-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: white;
  border: 2px solid #e5e7eb;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.search-filter-btn i {
  font-size: 0.875rem;
}

.search-filter-btn:hover:not(.disabled) {
  background-color: #f3f4f6;
  border-color: #d1d5db;
  color: #374151;
}

/* Active filter button */
.search-filter-btn.active {
  background-color: #3b82f6;
  border-color: #3b82f6;
  color: white;
}

.search-filter-btn.active:hover {
  background-color: #2563eb;
  border-color: #2563eb;
}

/* Disabled filter (no results) */
.search-filter-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Filter badge (result count) */
.filter-badge {
  display: none; /* Hidden by default, shown when count > 0 */
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 0.375rem;
  background-color: #e5e7eb;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  align-items: center;
  justify-content: center;
}

.search-filter-btn.active .filter-badge {
  background-color: rgba(255, 255, 255, 0.3);
  color: white;
}

/* Responsive: Stack filters on mobile */
@media (max-width: 640px) {
  .search-filters {
    gap: 0.375rem;
  }
  
  .search-filter-btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
  }
  
  .search-filter-btn span:nth-child(2) {
    /* Hide text label on mobile, keep icon only */
    display: none;
  }
  
  .search-filter-btn i {
    margin-right: 0;
  }
}


/* ===================================
   Phase 4: Visual & UX Polish
   =================================== */

/* Subtle pulsing glow on Get Started button */
@keyframes subtleGlow {
  0%, 100% {
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.3), 0 0 10px rgba(212, 175, 55, 0.2);
  }
  50% {
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5), 0 0 20px rgba(212, 175, 55, 0.3);
  }
}

.get-started-glow {
  animation: subtleGlow 3s ease-in-out infinite;
}

.get-started-glow:hover {
  animation: none;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.6), 0 0 30px rgba(212, 175, 55, 0.4) !important;
}

/* Smooth icon rotation on mega menu hover */
.group:hover .fa-chevron-down {
  transform: rotate(180deg);
}

/* Enhanced mega menu card hover effects */
.mega-menu-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mega-menu-card:hover {
  transform: translateY(-2px) scale(1.01);
}

.mega-menu-featured a:hover {
  transform: translateY(-3px) scale(1.02);
}

/* Icon animations on hover */
.mega-menu-icon {
  transition: all 0.3s ease;
}

.mega-menu-card:hover .mega-menu-icon {
  transform: rotate(5deg) scale(1.1);
}

.mega-menu-icon-featured {
  transition: all 0.3s ease;
}

.mega-menu-featured a:hover .mega-menu-icon-featured {
  transform: rotate(-5deg) scale(1.15);
}

/* Arrow icon slide effect */
.mega-menu-card .fa-arrow-right,
.mega-menu-featured .fa-arrow-right {
  transition: all 0.3s ease;
  transform: translateX(0);
}

.mega-menu-card:hover .fa-arrow-right,
.mega-menu-featured a:hover .fa-arrow-right {
  transform: translateX(4px);
}

/* Smooth transitions for all interactive elements */
button, a {
  transition: all 0.2s ease;
}

/* Loading state for navigation clicks (optional) */
.nav-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.nav-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid #0A1F44;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Filter button hover enhancement */
.search-filter-btn:hover:not(.disabled):not(.active) {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-filter-btn.active {
  transform: scale(1.05);
}

/* Visited indicator pulse on first appearance */
@keyframes checkmarkAppear {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.visited-indicator {
  animation: checkmarkAppear 0.4s ease-out;
}

/* Related content link hover effects */
.search-filters + * a,
[class*="related-content"] a {
  transition: all 0.2s ease;
}

.search-filters + * a:hover,
[class*="related-content"] a:hover {
  transform: translateY(-1px);
}

/* Navigation dropdown smooth appearance */
[role="menu"] {
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  transform-origin: top;
}

.group:hover > [role="menu"] {
  transform: translateY(0);
}

/* Badge pulse animation */
@keyframes badgePulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.filter-badge {
  transition: all 0.3s ease;
}

.search-filter-btn:hover .filter-badge {
  animation: badgePulse 0.6s ease-in-out;
}


/* ========================================
   Phase 7: Intersection Observer Animations
   ======================================== */

/* Pending animation state (before entering viewport) */
.animate-pending {
  opacity: 0;
}

/* Base animation class (when in viewport) */
.animate-in {
  animation-duration: 0.8s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  animation-fill-mode: both;
}

/* Fade In */
@keyframes animate-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.animate-fade-in {
  animation-name: animate-fade-in;
}

/* Slide Up */
@keyframes animate-slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-up {
  animation-name: animate-slide-up;
}

/* Slide Down */
@keyframes animate-slide-down {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-slide-down {
  animation-name: animate-slide-down;
}

/* Slide Left */
@keyframes animate-slide-left {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-slide-left {
  animation-name: animate-slide-left;
}

/* Slide Right */
@keyframes animate-slide-right {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-slide-right {
  animation-name: animate-slide-right;
}

/* Scale Up */
@keyframes animate-scale-up {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-scale-up {
  animation-name: animate-scale-up;
}

/* Zoom In */
@keyframes animate-zoom-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.animate-zoom-in {
  animation-name: animate-zoom-in;
}

/* Lazy loaded images - fade in smoothly */
.lazy-loaded {
  animation: animate-fade-in 0.4s ease-in;
}

/* ========================================
   End Phase 7 Styles
   ======================================== */
