/* Base styles for the entire site */
:root {
  /* Animation */
  --animate-duration: 0.3s;
  --animate-delay: 0.1s;
  
  /* Accessibility */
  --focus-outline: 3px solid #2563eb;
  --focus-outline-offset: 2px;
  /* Color system */
  --primary: #1e3a8a;     /* Deep blue - knowledge and trust */
  --primary-light: #2563eb;
  --primary-dark: #1e40af;
  --secondary: #10b981;   /* Emerald green - growth and success */
  --secondary-light: #34d399;
  --secondary-dark: #059669;
  --accent: #f59e0b;      /* Amber - warmth and optimism */
  --success: #2e7d32;
  --warning: #ed6c02;
  --error: #d32f2f;
  --white: #ffffff;
  --black: #000000;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;

  /* Typography */
  --font-family-heading: 'Montserrat', sans-serif;
  --font-family-body: 'Open Sans', sans-serif;
  --font-size-base: 1rem;
  --font-size-sm: 0.875rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;
  --font-size-5xl: 3rem;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-loose: 1.8;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Spacing system (based on 8px) */
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.5rem;   /* 24px */
  --space-6: 2rem;     /* 32px */
  --space-8: 3rem;     /* 48px */
  --space-10: 4rem;    /* 64px */
  --space-12: 5rem;    /* 80px */
  --space-16: 8rem;    /* 128px */

  /* Border radius */
  --radius-sm: 0.125rem;
  --radius: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --transition-fast: 150ms;
  --transition: 250ms;
  --transition-slow: 350ms;
  
  /* Container max widths */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  color: var(--gray-800);
  font-weight: var(--font-weight-normal);
  background-color: var(--white);
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%231e3a8a' fill-opacity='0.02' fill-rule='evenodd'/%3E%3C/svg%3E");
}

body.menu-open {
  overflow: hidden;
}

/* Page Loader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--white);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(30, 58, 138, 0.1);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
[tabindex]:focus {
  outline: var(--focus-outline);
  outline-offset: var(--focus-outline-offset);
}

/* Skip to content link */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  z-index: 100;
  transition: top 0.3s;
}

.skip-to-content:focus {
  top: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-4);
  color: var(--gray-900);
}

h1 {
  font-size: var(--font-size-4xl);
}

h2 {
  font-size: var(--font-size-3xl);
}

h3 {
  font-size: var(--font-size-2xl);
}

h4 {
  font-size: var(--font-size-xl);
}

h5 {
  font-size: var(--font-size-lg);
}

h6 {
  font-size: var(--font-size-base);
}

p {
  margin-bottom: var(--space-4);
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-light);
}

ul, ol {
  margin-bottom: var(--space-4);
  padding-left: var(--space-5);
}

li {
  margin-bottom: var(--space-2);
}

/* Container */
.container {
  width: 100%;
  max-width: var(--container-xl);
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--space-4);
  padding-left: var(--space-4);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

.logo-img {
  height: 50px;
  width: auto;
}

.logo h1 {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

/* Buttons */
.btn {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  padding: var(--space-3) var(--space-5);
  font-size: var(--font-size-base);
  line-height: 1.5;
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
}

.btn.primary {
  background-color: var(--primary);
  color: var(--white);
  border: 1px solid var(--primary);
}

.btn.primary:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
}

.btn.secondary {
  background-color: var(--white);
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn.secondary:hover {
  background-color: var(--gray-100);
}

.btn.accent {
  background-color: var(--accent);
  color: var(--white);
  border: 1px solid var(--accent);
}

.btn.accent:hover {
  background-color: #e08e00;
  border-color: #e08e00;
}

.btn.text {
  background-color: transparent;
  color: var(--primary);
  border: none;
  padding: var(--space-1) var(--space-2);
}

.btn.text:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: all var(--transition);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin: 0 var(--space-2);
}

nav ul li a {
  font-weight: 600;
  color: var(--gray-700);
  padding: var(--space-2);
  transition: color var(--transition);
}

nav ul li a:hover, nav ul li a.active {
  color: var(--accent);
}

nav ul li a.active {
  border-bottom: 2px solid var(--accent);
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
}

.mobile-menu-btn span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--accent);
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

/* Sections */
section {
  padding: var(--space-10) 0;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-8);
}

.section-header h2 {
  color: var(--primary);
  margin-bottom: var(--space-2);
  position: relative;
  display: inline-block;
  padding-bottom: var(--space-2);
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--accent);
  border-radius: var(--radius-full);
}

.section-header p {
  font-size: var(--font-size-lg);
  color: var(--gray-600);
}

/* Page header */
.page-header {
  position: relative;
  padding: var(--space-16) 0 var(--space-8);
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  margin-bottom: var(--space-6);
}

.page-header .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.page-header .container {
  position: relative;
  z-index: 2;
}

.page-header h1 {
  color: var(--white);
  margin-bottom: var(--space-2);
}

.page-header p {
  font-size: var(--font-size-xl);
  margin-bottom: 0;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  text-align: center;
  padding: var(--space-12) 0;
}

.cta-content h2 {
  color: var(--white);
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-4);
}

.cta-content p {
  font-size: var(--font-size-xl);
  max-width: 700px;
  margin: 0 auto var(--space-6);
}

.cta-content .btn.primary {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--white);
  font-size: var(--font-size-lg);
  padding: var(--space-3) var(--space-6);
}

.cta-content .btn.primary:hover {
  background-color: #e08e00;
  border-color: #e08e00;
}

/* Footer */
footer {
  background-color: var(--gray-900);
  color: var(--gray-300);
  padding: var(--space-8) 0 var(--space-4);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.footer-section {
  flex: 1;
  min-width: 250px;
  margin-bottom: var(--space-6);
  padding-right: var(--space-4);
}

.footer-section h3 {
  color: var(--white);
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--gray-700);
  padding-bottom: var(--space-2);
}

.footer-section p {
  margin-bottom: var(--space-2);
}

.footer-section p span {
  color: var(--secondary);
  font-weight: 600;
}

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

.footer-section.links ul li {
  margin-bottom: var(--space-2);
}

.footer-section.links ul li a {
  color: var(--gray-300);
  transition: color var(--transition);
}

.footer-section.links ul li a:hover {
  color: var(--white);
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--gray-800);
  color: var(--white);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.social-icons a:hover {
  background-color: var(--accent);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--gray-700);
}

.footer-bottom p {
  margin-bottom: 0;
  font-size: var(--font-size-sm);
}

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

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

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

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

.animate-fade-in {
  animation: fadeIn var(--animate-duration) ease forwards;
}

.animate-slide-up {
  animation: slideInUp var(--animate-duration) ease forwards;
}

.animate-slide-right {
  animation: slideInRight var(--animate-duration) ease forwards;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.delay-1 { animation-delay: calc(var(--animate-delay) * 1); }
.delay-2 { animation-delay: calc(var(--animate-delay) * 2); }
.delay-3 { animation-delay: calc(var(--animate-delay) * 3); }
.delay-4 { animation-delay: calc(var(--animate-delay) * 4); }
.delay-5 { animation-delay: calc(var(--animate-delay) * 5); }

/* Cookie Consent */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--gray-900);
  color: var(--white);
  padding: var(--space-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 98;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-consent.show {
  transform: translateY(0);
}

.cookie-text {
  flex: 1;
  padding-right: var(--space-4);
}

.cookie-text p {
  margin-bottom: 0;
}

.cookie-buttons {
  display: flex;
  gap: var(--space-2);
}

.cookie-buttons .btn {
  white-space: nowrap;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background-color: var(--accent);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: var(--primary);
  transform: translateY(-3px);
}

.back-to-top::after {
  content: "↑";
  font-size: 20px;
  font-weight: bold;
}

/* Responsive Styles */
@media (max-width: 991px) {
  h1 {
    font-size: var(--font-size-3xl);
  }
  
  h2 {
    font-size: var(--font-size-2xl);
  }
  
  h3 {
    font-size: var(--font-size-xl);
  }
  
  .container {
    max-width: 100%;
  }
}

@media (max-width: 767px) {
  nav {
    display: none;
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding: var(--space-10) var(--space-4) var(--space-4);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
  }
  
  nav.active {
    display: block;
    right: 0;
  }
  
  nav ul {
    flex-direction: column;
  }
  
  nav ul li {
    margin: var(--space-3) 0;
  }
  
  nav ul li a {
    font-size: var(--font-size-lg);
    padding: var(--space-3) var(--space-2);
    display: block;
    border-left: 3px solid transparent;
  }
  
  nav ul li a:hover, nav ul li a.active {
    border-left: 3px solid var(--accent);
    border-bottom: none;
    background-color: rgba(245, 158, 11, 0.05);
    padding-left: var(--space-4);
  }
  
  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
  }
  
  .mobile-menu-btn {
    display: flex;
    z-index: 1001;
  }
  
  .mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .section-header {
    margin-bottom: var(--space-6);
  }
  
  .footer-section {
    flex: 0 0 100%;
  }
}

@media (max-width: 576px) {
  html {
    font-size: 14px;
  }
  
  section {
    padding: var(--space-6) 0;
  }
}