/* Rätt & Vägled - Premium Design System */

/* Enhanced Color Palette with Gradients */
:root {
  --deep-green: #1E5A4D;
  --forest-green: #0F3F36;
  --warm-gold: #CDA561;
  --soft-mint: #E9F3F1;
  --off-white: #FAF9F6;
  --charcoal: #1E2328;
  
  /* Gradient Colors */
  --gradient-primary: linear-gradient(135deg, #1E5A4D 0%, #0F3F36 100%);
  --gradient-gold: linear-gradient(135deg, #CDA561 0%, #B8944F 100%);
  --gradient-mint: linear-gradient(135deg, #E9F3F1 0%, #D4E8E4 100%);
  --gradient-hero: linear-gradient(135deg, rgba(233, 243, 241, 0.3) 0%, rgba(205, 165, 97, 0.1) 100%);
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(15, 63, 54, 0.08);
  --shadow-md: 0 4px 12px rgba(15, 63, 54, 0.12);
  --shadow-lg: 0 8px 24px rgba(15, 63, 54, 0.16);
  --shadow-xl: 0 16px 48px rgba(15, 63, 54, 0.2);
  --shadow-glow: 0 0 20px rgba(205, 165, 97, 0.3);
  
  /* Transitions */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 17px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-width: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--charcoal);
  background: linear-gradient(180deg, #FAF9F6 0%, #F5F3ED 100%);
  background-attachment: fixed;
  min-width: 100%;
  width: 100%;
  overflow-x: hidden;
  position: relative;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Smooth fade-in animation for page load */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main > section {
  animation: fadeInUp 0.6s ease-out backwards;
}

main > section:nth-child(1) { animation-delay: 0.1s; }
main > section:nth-child(2) { animation-delay: 0.2s; }
main > section:nth-child(3) { animation-delay: 0.3s; }
main > section:nth-child(4) { animation-delay: 0.4s; }

/* RTL Support */
html[dir="rtl"] body {
  font-family: 'Noto Naskh Arabic', 'Vazirmatn', sans-serif;
}

html[lang="fa"] body {
  font-family: 'Vazirmatn', sans-serif;
}

html[dir="rtl"] .lang-switcher,
html[dir="rtl"] .nav-links {
  font-family: 'Noto Kufi Arabic', sans-serif;
}

html[lang="fa"] .lang-switcher,
html[lang="fa"] .nav-links {
  font-family: 'Vazirmatn', sans-serif;
}

/* RTL Text Visibility Fix - Ensure diacritics are fully visible */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] p,
html[dir="rtl"] .hero h1,
html[dir="rtl"] .hero p,
html[dir="rtl"] .card h3,
html[dir="rtl"] .card p,
html[dir="rtl"] .team-card h3,
html[dir="rtl"] .team-card p,
html[dir="rtl"] .cta-band p,
html[dir="rtl"] .privacy-blurb p,
html[dir="rtl"] .nav-links a,
html[dir="rtl"] .footer-section p,
html[dir="rtl"] .footer-section a,
html[dir="rtl"] .footer-bottom p,
html[dir="rtl"] .footer-bottom a,
html[dir="rtl"] li,
html[dir="rtl"] .contact-form p,
html[dir="rtl"] .contact-form h2 {
  line-height: 2 !important;
  padding-top: 0.25em;
  padding-bottom: 0.25em;
  overflow: visible !important;
  text-overflow: clip;
  white-space: normal;
  word-wrap: break-word;
  height: auto;
  min-height: auto;
  max-height: none;
}

html[dir="rtl"] h1 {
  line-height: 1.5 !important;
  padding-top: 0.4em;
  padding-bottom: 0.4em;
}

html[dir="rtl"] h2 {
  line-height: 1.6 !important;
  padding-top: 0.3em;
  padding-bottom: 0.3em;
}

html[dir="rtl"] h3 {
  line-height: 1.7 !important;
  padding-top: 0.25em;
  padding-bottom: 0.25em;
}

/* Ensure containers don't clip text */
html[dir="rtl"] .hero,
html[dir="rtl"] .card,
html[dir="rtl"] .team-card,
html[dir="rtl"] .cta-band,
html[dir="rtl"] .privacy-blurb,
html[dir="rtl"] section,
html[dir="rtl"] main,
html[dir="rtl"] .footer-section,
html[dir="rtl"] .footer-container,
html[dir="rtl"] .contact-form {
  overflow: visible !important;
}

/* Ensure list items have proper spacing for RTL */
html[dir="rtl"] ul li,
html[dir="rtl"] ol li {
  line-height: 2 !important;
  padding-top: 0.2em;
  padding-bottom: 0.2em;
  overflow: visible !important;
}

/* Rätt & Vägled brand name styling for RTL languages */
/* The browser automatically handles Latin text (Rätt & Vägled) within RTL text */
/* using Unicode Bidirectional Algorithm - no special styling needed */
/* The brand name will flow naturally within RTL text */

/* Enhanced Typography */
h1, h2, h3 {
  color: var(--forest-green);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h1 {
  font-size: clamp(2.25rem, 5.5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2rem;
}

h2 {
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  margin-bottom: 1.5rem;
}

h3 {
  font-size: clamp(1.375rem, 3.5vw, 2rem);
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1.25rem;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--charcoal);
}

a {
  color: var(--deep-green);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover, a:focus {
  color: var(--forest-green);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--warm-gold);
  outline-offset: 2px;
}

/* Skip to Content Link */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 0;
  background: var(--deep-green);
  color: white;
  padding: 12px 24px;
  z-index: 10000;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, top 0.3s ease;
}

.skip-link:focus {
  top: 0;
  opacity: 1;
  pointer-events: auto;
  outline: 3px solid var(--warm-gold);
  outline-offset: 2px;
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Enhanced Header with Glassmorphism */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(205, 165, 97, 0.2);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(15, 63, 54, 0.08);
  overflow: visible;
  transition: all var(--transition-base);
}

header:hover {
  box-shadow: 0 6px 30px rgba(15, 63, 54, 0.12);
}

@media (max-width: 768px) {
  header {
    overflow: visible;
  }
}

.header-container {
  max-width: 1140px;
  min-width: 320px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  position: relative;
  height: 85px;
}

/* Keep header container height fixed on larger screens */
@media (min-width: 1024px) {
  .header-container {
    height: 85px;
  }
}

@media (min-width: 1200px) {
  .header-container {
    height: 85px;
  }
}

@media (min-width: 1400px) {
  .header-container {
    height: 85px;
  }
}

.logo {
  height: 75px;
  width: auto;
  display: flex;
  align-items: center;
  position: absolute;
  left: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.logo img {
  height: 100%;
  width: auto;
  max-height: 75px;
  object-fit: contain;
  display: block;
}

.logo-slagen {
  display: none !important;
  position: absolute;
  visibility: hidden;
}

/* Logo responsive adjustments for larger screens - logo gets BIGGER */
@media (min-width: 1024px) {
  .logo {
    height: 80px;
  }
  
  .logo img {
    max-height: 80px;
  }
  
  .logo-slagen {
    display: none !important;
    visibility: hidden;
  }
  
  nav {
    display: flex !important;
  }
}

@media (min-width: 1200px) {
  .logo {
    height: 85px;
  }
  
  .logo img {
    max-height: 85px;
  }
}

@media (min-width: 1400px) {
  .logo {
    height: 90px;
  }
  
  .logo img {
    max-height: 90px;
  }
}

/* Navigation */
nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
  flex: 1;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}

.nav-links a {
  font-weight: 600;
  color: var(--charcoal);
  padding: 0.5rem 0;
  position: relative;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--deep-green);
  text-decoration: none;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--gradient-gold);
  border-radius: 2px;
  transition: width var(--transition-base);
  box-shadow: 0 2px 8px rgba(205, 165, 97, 0.4);
}

.nav-links a:hover::after,
.nav-links a:focus::after {
  width: 100%;
}

.nav-links a {
  transition: all var(--transition-fast);
}

.nav-links a:hover {
  transform: translateY(-2px);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  position: absolute;
  right: 1.5rem;
}

.lang-button {
  padding: 0.6rem 1.2rem;
  border: 2px solid var(--deep-green);
  border-radius: 12px;
  background: white;
  color: var(--charcoal);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: inherit;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.lang-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-mint);
  transition: left var(--transition-base);
  z-index: -1;
}

.lang-button:hover::before,
.lang-button:focus::before {
  left: 0;
}

.lang-button:hover,
.lang-button:focus {
  outline: none;
  border-color: var(--forest-green);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

/* Language Popup */
.lang-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lang-popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lang-popup {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-radius: 28px;
  padding: 3rem;
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.5);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9) translateY(20px) rotateX(5deg);
  transition: all var(--transition-base);
  position: relative;
  border: 1px solid rgba(205, 165, 97, 0.2);
}

.lang-popup-overlay.active .lang-popup {
  transform: scale(1) translateY(0) rotateX(0);
}

.lang-popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--soft-mint);
}

.lang-popup-header h3 {
  margin: 0;
  color: var(--forest-green);
  font-size: 1.5rem;
}

.lang-popup-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--charcoal);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.lang-popup-close:hover,
.lang-popup-close:focus {
  background: var(--soft-mint);
  color: var(--forest-green);
  outline: none;
}

.lang-popup-list {
  display: grid;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.lang-popup-item {
  margin: 0;
}

.lang-popup-link {
  display: block;
  padding: 1.125rem 1.5rem;
  background: var(--gradient-mint);
  color: var(--charcoal);
  text-decoration: none;
  border-radius: 16px;
  font-weight: 600;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.lang-popup-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-primary);
  transition: left var(--transition-base);
  z-index: -1;
}

.lang-popup-link:hover::before,
.lang-popup-link:focus::before {
  left: 0;
}

.lang-popup-link:hover,
.lang-popup-link:focus {
  color: white;
  transform: translateY(-3px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--warm-gold);
  text-decoration: none;
}

.lang-popup-link:active {
  transform: translateY(0);
}

/* Enhanced Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  transition: all var(--transition-base);
  position: relative;
  z-index: 300;
  gap: 6px;
  align-self: center;
}

.mobile-menu-toggle .hamburger-bar {
  width: 28px;
  height: 3px;
  background-color: var(--deep-green);
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transform-origin: center;
}

.mobile-menu-toggle:hover .hamburger-bar,
.mobile-menu-toggle:focus .hamburger-bar {
  background-color: var(--warm-gold);
}

.mobile-menu-toggle:focus {
  outline: 2px solid var(--warm-gold);
  outline-offset: 2px;
}

/* Hamburger animation when menu is open */
.mobile-menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Main Content */
main {
  flex: 1;
  max-width: 1140px;
  width: 100%;
  min-width: 320px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  position: relative;
  z-index: 1;
  line-height: 1.8;
}

/* Enhanced Hero Section */
.hero {
  text-align: center;
  padding: 5rem 0 6rem;
  margin-bottom: 5rem;
  position: relative;
  background: var(--gradient-hero);
  border-radius: 32px;
  margin-top: 2rem;
  overflow: hidden;
  z-index: 1;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(205, 165, 97, 0.1) 0%, transparent 70%);
  animation: pulse 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 0.8; }
}

/* Fix RTL hero background positioning - completely hide to prevent floating glitch */
html[dir="rtl"] .hero::before {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

.hero h1 {
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

/* Brand name styling in hero h1 */
.hero h1 .brand-name {
  display: inline-block;
}

/* Mobile: Break line and style brand name */
@media (max-width: 768px) {
  .hero h1 .brand-name {
    display: block;
    font-size: 1.4em;
    font-weight: 700;
    margin-top: 0.3rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.02em;
  }
}

.hero p {
  font-size: 1.1875rem;
  max-width: 850px;
  margin: 0 auto 2rem;
  color: var(--charcoal);
  position: relative;
  z-index: 1;
  line-height: 1.8;
}

/* Style the second paragraph (with Rätt & Vägled) - center, bigger, emphasized - all languages and all screens */
.hero p:nth-of-type(2) {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  max-width: 900px;
  margin: 0 auto 2rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.01em;
  line-height: 1.6;
}

/* Ensure centering works for RTL languages - must override general RTL rules */
html[dir="rtl"] .hero p:nth-of-type(2) {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
  width: 100% !important;
  max-width: 900px !important;
}

/* Mobile adjustments for emphasized paragraph */
@media (max-width: 768px) {
  .hero p:nth-of-type(2) {
    font-size: 1.5rem; /* Increased from 1.3rem for more emphasis */
    max-width: 100%;
    padding: 0 1rem;
    text-align: center !important;
    margin-top: -1rem !important; /* Reduce gap above - close to previous text */
    margin-bottom: 1.5rem !important; /* Add gap below - separate from next sentence */
  }
  
  /* Ensure RTL centering on mobile */
  html[dir="rtl"] .hero p:nth-of-type(2) {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

@media (max-width: 480px) {
  .hero p:nth-of-type(2) {
    font-size: 1.4rem; /* Increased from 1.2rem for more emphasis */
    padding: 0 0.5rem;
    text-align: center !important;
    margin-top: -1rem !important; /* Reduce gap above - close to previous text */
    margin-bottom: 1.5rem !important; /* Add gap below - separate from next sentence */
  }
  
  /* Ensure RTL centering on small mobile */
  html[dir="rtl"] .hero p:nth-of-type(2) {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Reduce spacing for paragraph directly before Lottie animation - only on desktop */
@media (min-width: 769px) {
  .hero p:nth-of-type(2) {
    margin-bottom: 0.25rem !important;
  }
}

/* Reduce spacing for paragraph directly after Lottie animation */
.hero .lottie-container + p {
  margin-top: 0.25rem !important;
  margin-bottom: 2rem;
}

/* Lottie Animation Container */
.lottie-container {
  width: 100%;
  max-width: 800px;
  height: 500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.lottie-container svg {
  width: 100% !important;
  height: 100% !important;
}

/* Mobile: Move team animation below heading using flexbox order */
@media (max-width: 768px) {
  .hero {
    display: flex;
    flex-direction: column;
  }
  
  .hero h1 {
    order: 1;
    margin-bottom: -1rem !important;
  }
  
  .hero .lottie-container {
    order: 2;
    margin: -1.5rem auto -1rem;
  }
  
  .hero p:nth-of-type(1) {
    order: 3;
  }
  
  .hero p:nth-of-type(2) {
    order: 4;
  }
  
  .hero p:nth-of-type(3) {
    order: 5;
  }
  
  .hero p:nth-of-type(4) {
    order: 6;
  }
  
  .hero p:nth-of-type(5) {
    order: 7;
  }
  
  /* Ensure proper spacing after animation on mobile */
  .hero .lottie-container + p {
    margin-top: -0.5rem !important;
  }
}

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

/* Responsive Lottie */
@media (max-width: 1024px) {
  .lottie-container {
    max-width: 100%;
    height: 450px;
    margin: 0 auto;
  }
}

@media (max-width: 768px) {
  .lottie-container {
    max-width: 100%;
    height: 400px;
    margin: 0 auto;
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .lottie-container {
    height: 350px;
    margin: 0 auto;
    padding: 0 0.5rem;
  }
}

@media (max-width: 360px) {
  .lottie-container {
    height: 300px;
    margin: 0 auto;
  }
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.card {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-base);
  border: 1px solid rgba(233, 243, 241, 0.5);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: rgba(205, 165, 97, 0.3);
}

.card-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1.5rem;
  color: var(--deep-green);
  transition: all var(--transition-base);
  filter: drop-shadow(0 4px 8px rgba(30, 90, 77, 0.2));
}

.card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
  color: var(--warm-gold);
  filter: drop-shadow(0 6px 12px rgba(205, 165, 97, 0.4));
}

.card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
}

.card p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* Enhanced CTA Band */
.cta-band {
  background: var(--gradient-mint);
  border-radius: 32px;
  padding: 4rem 2.5rem;
  text-align: center;
  margin: 5rem 0;
  border: 2px solid var(--warm-gold);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.cta-band p {
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
  color: var(--charcoal);
}

.cta-button {
  display: inline-block;
  background: var(--gradient-primary);
  color: white;
  padding: 1.125rem 3rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.125rem;
  transition: all var(--transition-base);
  text-decoration: none;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-gold);
  transition: left var(--transition-base);
  z-index: -1;
}

.cta-button:hover::before,
.cta-button:focus::before {
  left: 0;
}

.cta-button:hover,
.cta-button:focus {
  transform: translateY(-4px) scale(1.05);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
  text-decoration: none;
  color: white;
}

.cta-button:focus {
  outline: 3px solid var(--warm-gold);
  outline-offset: 2px;
}

/* Team Cards */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.team-card {
  background: white;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  border-top: 5px solid;
  border-image: var(--gradient-gold) 1;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.team-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-mint);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
  z-index: 0;
}

.team-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.team-card:hover::after {
  opacity: 0.05;
}

.team-card > * {
  position: relative;
  z-index: 1;
}

.team-card img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 20px;
  margin-bottom: 1.5rem;
  object-fit: cover;
  aspect-ratio: 2 / 3;
  display: block;
  margin-left: auto;
  margin-right: auto;
  border: 4px solid;
  border-image: var(--gradient-gold) 1;
  min-height: 280px;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.team-card:hover img {
  transform: scale(1.03);
  box-shadow: var(--shadow-lg);
  border-image: var(--gradient-primary) 1;
}

.team-card h3 {
  margin-bottom: 0.75rem;
  color: var(--forest-green);
  font-size: 1.5rem;
}

.team-card p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.team-card p strong {
  color: var(--deep-green);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.5rem;
}

/* Languages styling */
.team-card p:first-of-type {
  background: linear-gradient(135deg, var(--soft-mint) 0%, rgba(233, 243, 241, 0.5) 100%);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--warm-gold);
  margin-bottom: 0.5rem;
}

.team-card p:first-of-type strong::before {
  content: '🌐';
  width: auto;
  height: auto;
  background: none;
  font-size: 1rem;
}

/* Availability styling */
.team-card p:nth-of-type(2) {
  background: linear-gradient(135deg, rgba(205, 165, 97, 0.1) 0%, rgba(205, 165, 97, 0.05) 100%);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--warm-gold);
  margin-bottom: 0.5rem;
}

.team-card p:nth-of-type(2) strong::before {
  content: '✓';
  width: auto;
  height: auto;
  background: var(--warm-gold);
  color: white;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: bold;
}

/* Contact info - remove card styling, make it simple */
.team-card .contact-info {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.team-card .contact-info p {
  margin-bottom: 0.5rem;
}

.team-card .contact-info p strong {
  color: var(--deep-green);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 0.5rem;
}

.team-card .contact-info p strong::before {
  content: '🕐';
  width: auto;
  height: auto;
  background: none;
  font-size: 1rem;
}

.team-card a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  color: var(--deep-green);
  text-decoration: none;
  transition: all 0.2s ease;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.team-card a:hover,
.team-card a:focus {
  color: var(--forest-green);
  background: var(--soft-mint);
  text-decoration: none;
}

.team-card a[href^="tel:"]::before {
  content: '📞';
  font-size: 0.95rem;
  margin-right: 0.4rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  display: inline-block;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.team-card a[href^="mailto:"]::before {
  content: '📧';
  font-size: 0.95rem;
  margin-right: 0.4rem;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  display: inline-block;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.team-card .contact-info .contact-link {
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: linear-gradient(135deg, var(--soft-mint) 0%, rgba(233, 243, 241, 0.5) 100%);
  border-radius: 6px;
  border-left: 3px solid var(--warm-gold);
}

.team-card .contact-info .contact-link a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.team-card .contact-info .hours-section {
  background: linear-gradient(135deg, rgba(205, 165, 97, 0.1) 0%, rgba(205, 165, 97, 0.05) 100%);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border-left: 3px solid var(--warm-gold);
  margin-bottom: 0.5rem;
  line-height: 1.8;
}

.team-card .contact-info .hours-section strong::before {
  content: '🕐';
  width: auto;
  height: auto;
  background: none;
  font-size: 1rem;
  margin-right: 0.5rem;
}

/* Enhanced Footer */
footer {
  background: var(--gradient-primary);
  color: white;
  padding: 4rem 1.5rem 2.5rem;
  margin-top: 6rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-gold);
  opacity: 0.3;
}

.footer-container {
  max-width: 1140px;
  min-width: 320px;
  margin: 0 auto;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--warm-gold) !important;
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  /* Override gradient text effect for footer */
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: var(--warm-gold) !important;
  background-clip: unset !important;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.95);
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255,255,255,0.9);
  transition: all var(--transition-fast);
  display: inline-block;
  position: relative;
}

.footer-section a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--warm-gold);
  transition: width var(--transition-base);
}

.footer-section a:hover,
.footer-section a:focus {
  color: var(--warm-gold);
  text-decoration: none;
  transform: translateX(4px);
}

.footer-section a:hover::after,
.footer-section a:focus::after {
  width: 100%;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
  font-size: 0.9rem;
  color: rgba(255,255,255,0.95) !important;
}

.footer-bottom p {
  color: rgba(255,255,255,0.95) !important;
}

.footer-bottom a {
  color: var(--warm-gold) !important;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 600;
}

.footer-bottom a:hover,
.footer-bottom a:focus {
  color: #f3eed9 !important;
  text-decoration: underline;
}

.footer-bottom a:focus {
  outline: 2px solid var(--warm-gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* Ensure all footer text is properly colored - override any global styles */
footer,
footer * {
  color: inherit;
}

footer h3 {
  color: var(--warm-gold) !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: var(--warm-gold) !important;
  background-clip: unset !important;
}

/* Forms */
.contact-form {
  background: white;
  border-radius: 24px;
  padding: 3rem;
  margin: 3rem 0;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(233, 243, 241, 0.5);
  transition: all var(--transition-base);
}

.contact-form:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-2px);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--charcoal);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  border: 2px solid var(--deep-green);
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: all var(--transition-base);
  background: white;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--warm-gold);
  box-shadow: 0 0 0 4px rgba(205, 165, 97, 0.2), var(--shadow-md);
  transform: translateY(-2px);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.mailto-link {
  display: inline-block;
  margin: 0.5rem 0.5rem 0.5rem 0;
  padding: 1rem 2rem;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50px;
  font-weight: 600;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.mailto-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-gold);
  transition: left var(--transition-base);
  z-index: -1;
}

.mailto-link:hover::before,
.mailto-link:focus::before {
  left: 0;
}

.mailto-link:hover,
.mailto-link:focus {
  color: white;
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

/* Enhanced Privacy Blurb */
.privacy-blurb {
  background: var(--gradient-mint);
  padding: 2rem;
  border-radius: 20px;
  margin: 3rem 0;
  font-size: 1rem;
  border-left: 5px solid;
  border-image: var(--gradient-gold) 1;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.privacy-blurb:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

/* Lists */
ul.services-list {
  list-style: none;
  padding-left: 0;
}

ul.services-list li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.75rem;
}

ul.services-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--warm-gold);
  font-weight: bold;
  font-size: 1.25rem;
  background: var(--gradient-mint);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-fast);
}

ul.services-list li:hover::before {
  transform: scale(1.2) rotate(360deg);
  box-shadow: var(--shadow-md);
}

/* Responsive Design - Ensure nav is visible on larger screens */
@media (min-width: 769px) {
  nav {
    display: flex !important;
  }
  
  .logo-slagen {
    display: none !important;
    visibility: hidden;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  .header-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    overflow: visible;
    position: relative;
  }

  .logo {
    position: static;
    height: 83px;
    left: auto;
    transform: none;
    top: auto;
    margin-bottom: 0.5rem;
    margin-top: -0.4rem;
    align-self: flex-start;
  }
  
  .logo img {
    max-height: 83px;
  }
  
  .logo-slagen {
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    max-height: 170px;
    height: auto;
    width: auto;
    display: block !important;
    visibility: visible !important;
    z-index: 5;
    pointer-events: none;
  }
  
  /* Fix RTL logo-slagen positioning - prevent floating glitch */
  html[dir="rtl"] .logo-slagen {
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
    z-index: 5 !important;
    pointer-events: none !important;
  }
  
  .header-container {
    min-height: auto;
    align-items: center;
  }

  .mobile-menu-toggle {
    display: flex;
    order: 3;
    z-index: 300;
    position: relative;
    align-self: center;
    margin: 0;
  }

  nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    order: 4;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 2px solid var(--warm-gold);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 1rem;
    z-index: 200;
    margin-top: 0;
  }

  nav.active {
    display: flex !important;
    animation: slideDown 0.3s ease-out;
  }
  
  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 0;
    justify-content: flex-start;
  }

  .nav-links li {
    border-bottom: 1px solid var(--soft-mint);
  }

  .nav-links a {
    display: block;
    padding: 1rem;
  }

  .lang-switcher {
    position: static;
    order: 2;
  }

  .lang-button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .hero {
    padding: 2rem 0;
  }

  .cards-grid,
  .team-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin: 1rem 0;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }

  main {
    padding: 1.5rem 1rem;
  }

  .cta-band {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0.5rem 1rem;
  }

  .logo {
    height: 75px;
  }
  
  .logo img {
    max-height: 75px;
  }

  .lang-popup {
    padding: 2rem 1.5rem;
  }

  .lang-popup-header h3 {
    font-size: 1.25rem;
  }

  main {
    padding: 1rem 0.75rem;
  }

  .card,
  .team-card {
    padding: 1.5rem;
  }
}

/* RTL Specific Adjustments */
html[dir="rtl"] .nav-links li {
  text-align: right;
}

html[dir="rtl"] ul.services-list li {
  padding-left: 0;
  padding-right: 1.5rem;
}

html[dir="rtl"] ul.services-list li::before {
  left: auto;
  right: 0;
}

html[dir="rtl"] .privacy-blurb {
  border-left: none;
  border-right: 4px solid var(--warm-gold);
}

html[dir="rtl"] .skip-link {
  left: auto;
  right: 0;
}

html[dir="rtl"] .logo {
  left: auto;
  right: 1.5rem;
  transform: translateY(-50%);
}

html[dir="rtl"] .lang-switcher {
  right: auto;
  left: 1.5rem;
}

/* RTL Team Card Adjustments */
html[dir="rtl"] .team-card p:first-of-type {
  border-left: none;
  border-right: 3px solid var(--warm-gold);
}

html[dir="rtl"] .team-card p:nth-of-type(2) {
  border-left: none;
  border-right: 3px solid var(--warm-gold);
}

html[dir="rtl"] .team-card .contact-info p strong {
  margin-right: 0;
  margin-left: 0.5rem;
}

html[dir="rtl"] .team-card a[href^="tel:"]::before {
  margin-right: 0;
  margin-left: 0.4rem;
}

html[dir="rtl"] .team-card a[href^="mailto:"]::before {
  margin-right: 0;
  margin-left: 0.4rem;
}

html[dir="rtl"] .team-card .contact-info .contact-link {
  border-left: none;
  border-right: 3px solid var(--warm-gold);
}

html[dir="rtl"] .team-card .contact-info .hours-section {
  border-left: none;
  border-right: 3px solid var(--warm-gold);
}

html[dir="rtl"] .team-card .contact-info .hours-section strong::before {
  margin-right: 0;
  margin-left: 0.5rem;
}

@media (max-width: 768px) {
  html[dir="rtl"] .logo {
    right: auto;
    transform: none;
  }
  
  html[dir="rtl"] .lang-switcher {
    left: auto;
  }
}

/* Scroll Animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Enhanced Card Animations */
.cards-grid .card:nth-child(odd) {
  animation: slideInLeft 0.6s ease-out backwards;
}

.cards-grid .card:nth-child(even) {
  animation: slideInRight 0.6s ease-out backwards;
}

/* RTL: Reverse card animation directions */
html[dir="rtl"] .cards-grid .card:nth-child(odd) {
  animation: slideInRight 0.6s ease-out backwards;
}

html[dir="rtl"] .cards-grid .card:nth-child(even) {
  animation: slideInLeft 0.6s ease-out backwards;
}

.cards-grid .card:nth-child(1) { animation-delay: 0.1s; }
.cards-grid .card:nth-child(2) { animation-delay: 0.2s; }
.cards-grid .card:nth-child(3) { animation-delay: 0.3s; }
.cards-grid .card:nth-child(4) { animation-delay: 0.4s; }

/* Lottie Animation in Cards Grid */
.lottie-container-cards {
  grid-column: span 2;
  width: 100%;
  height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 0;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.5s forwards;
  background: white;
  border-radius: 24px;
  padding: 0;
  box-shadow: var(--shadow-md);
  margin-top: -2.5rem;
  margin-left: -0.5rem;
  margin-bottom: -2rem;
}

.lottie-container-cards svg {
  width: 100% !important;
  height: 100% !important;
}

/* Responsive Lottie in Cards */
@media (max-width: 768px) {
  .lottie-container-cards {
    grid-column: span 1;
    height: 550px;
    padding: 0;
    margin-top: -3.5rem;
    margin-left: 0;
    margin-bottom: -2rem;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .lottie-container-cards {
    height: 500px;
    padding: 0;
    margin-top: -3.5rem;
    margin-bottom: -2rem;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  .lottie-container-cards {
    height: 450px;
    margin-top: -3.5rem;
    margin-bottom: -2rem;
    padding: 0;
  }
}

/* RTL adjustments for Lottie animation in cards */
html[dir="rtl"] .lottie-container-cards {
  margin-left: 0;
  margin-right: -0.5rem;
}

@media (max-width: 768px) {
  html[dir="rtl"] .lottie-container-cards {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Lottie Animation Container for Get Involved Page */
.lottie-container-involved {
  width: 100%;
  max-width: 600px;
  height: 400px;
  margin: 0.5rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.3s forwards;
}

.lottie-container-involved svg {
  width: 100% !important;
  height: 100% !important;
}

/* Desktop: Position animation on the right side, paragraphs flow normally */
@media (min-width: 769px) {
  section {
    position: relative;
  }
  
  .lottie-container-involved {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    max-width: 40%;
    height: 400px;
    margin: 0;
    z-index: 1;
  }
  
  /* Ensure paragraphs stay close together */
  section p:nth-of-type(1) {
    margin-bottom: 0.5rem;
  }
  
  section p:nth-of-type(2) {
    margin-top: 0;
    margin-bottom: 2rem;
    max-width: 55%;
  }
  
  /* RTL: Position animation on the left side */
  html[dir="rtl"] .lottie-container-involved {
    right: auto;
    left: 0;
  }
  
  html[dir="rtl"] section p:nth-of-type(2) {
    margin-left: auto;
    margin-right: 0;
  }
}

/* Mobile: Animation stays above heading (default order) */
@media (max-width: 768px) {
  .lottie-container-involved {
    margin: 0 auto 1.5rem;
  }
  
  .lottie-container-involved + h1 {
    margin-top: 0.5rem !important;
  }
}

.lottie-container-involved + h2 {
  margin-top: 0.5rem !important;
}

/* Lottie Animation Container for About Page */
.lottie-container-about {
  width: 100%;
  max-width: 100%;
  height: 450px;
  margin: -6rem auto -1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out 0.3s forwards;
  padding: 0 1rem;
}

.lottie-container-about svg {
  width: 100% !important;
  height: 100% !important;
}

/* Remove top padding from main when animation is first in section */
main section:first-child .lottie-container-about:first-child {
  margin-top: -4rem !important;
}

/* Remove main top padding when first section has animation */
main section:first-child:has(.lottie-container-about) {
  margin-top: -2rem !important;
}

/* Fallback for browsers without :has() support */
main section:first-child .lottie-container-about:first-child {
  margin-top: -6rem !important;
}

/* Ensure proper spacing after animation */
.lottie-container-about + h1 {
  margin-top: -3rem !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
}

/* Large screens: Smaller animation with gap below */
@media (min-width: 769px) {
  .lottie-container-about {
    height: 400px;
    max-width: 800px;
    margin: -6rem auto 1.5rem;
    padding: 0 2rem;
  }
  
  .lottie-container-about + h1 {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
  }
}

@media (min-width: 1200px) {
  .lottie-container-about {
    height: 420px;
    max-width: 850px;
    margin: -6.5rem auto 2rem;
  }
}

@media (min-width: 1400px) {
  .lottie-container-about {
    height: 450px;
    max-width: 900px;
    margin: -7rem auto 2.5rem;
  }
}

/* Responsive Lottie for About Page */
@media (max-width: 768px) {
  .lottie-container-about {
    max-width: 100%;
    height: 450px;
    margin: -4rem auto -1rem;
    padding: 0 0.5rem;
  }
  
  .lottie-container-about + h1 {
    margin-top: -2rem !important;
  }
}

@media (max-width: 480px) {
  .lottie-container-about {
    height: 400px;
    margin: -3.5rem auto -0.75rem;
    padding: 0;
  }
  
  .lottie-container-about + h1 {
    margin-top: -1.5rem !important;
  }
}

/* Responsive Lottie for Get Involved */
@media (max-width: 768px) {
  .lottie-container-involved {
    max-width: 100%;
    height: 500px;
    margin: 0.5rem auto;
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .lottie-container-involved {
    height: 450px;
    margin: 0.5rem auto;
    padding: 0 0.5rem;
  }
}

@media (max-width: 360px) {
  .lottie-container-involved {
    height: 400px;
    margin: 0.5rem auto;
  }
}

.team-grid .team-card {
  animation: scaleIn 0.6s ease-out backwards;
}

.team-grid .team-card:nth-child(1) { animation-delay: 0.1s; }
.team-grid .team-card:nth-child(2) { animation-delay: 0.2s; }
.team-grid .team-card:nth-child(3) { animation-delay: 0.3s; }

/* Smooth Scroll Behavior Enhancement */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  
  * {
    scroll-margin-top: 2rem;
  }
}

/* Loading States */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Enhanced Focus States */
*:focus-visible {
  outline: 3px solid var(--warm-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Selection Styling */
::selection {
  background: var(--warm-gold);
  color: var(--forest-green);
}

::-moz-selection {
  background: var(--warm-gold);
  color: var(--forest-green);
}

/* Print Styles */
@media print {
  header,
  footer,
  .cta-band,
  .lang-switcher,
  .mobile-menu-toggle {
    display: none;
  }

  body {
    background: white;
  }

  main {
    max-width: 100%;
  }
  
  * {
    animation: none !important;
    transition: none !important;
  }
}

