/* Design Tokens & Variables */
:root {
  /* Emerald color palette */
  --emerald-50: #ecfdf5;
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-700: #047857;
  --emerald-900: #064e3b;

  /* Grayscale */
  --gray-50: #f9fafb;
  --gray-600: #4b5563;
  --gray-900: #111827;

  /* Semantic colors */
  --text-primary: var(--gray-900);
  --text-secondary: var(--gray-600);
  --bg-primary: #ffffff;

  /* Spacing scale (8px grid) */
  --space-0: 0rem;     /* 0px */
  --space-1: 0.5rem;   /* 8px */
  --space-2: 1rem;     /* 16px */
  --space-3: 1.5rem;   /* 24px */
  --space-4: 2rem;     /* 32px */
  --space-6: 3rem;     /* 48px */
  --space-8: 4rem;     /* 64px */
  --space-12: 6rem;    /* 96px */

  /* Logo topm spacing */
  --logo-space: var(--space-8);

  /* Animation tokens */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 250ms var(--ease-out-expo);
  --transition-slow: 400ms var(--ease-out-expo);

  /* Shadows with emerald tint */
  --shadow-sm: 0 1px 2px rgba(16, 185, 129, 0.05);
  --shadow-md: 0 4px 6px rgba(16, 185, 129, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 24px rgba(16, 185, 129, 0.08), 0 4px 8px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 20px 40px rgba(16, 185, 129, 0.1), 0 8px 16px rgba(0, 0, 0, 0.08);

  /* Border radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
}

/* Typography */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
  font-size: 16px;
  color: var(--text-primary);
  background-color: var(--bg-primary);
}

/* Fluid typography with clamp() */
h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: var(--space-4);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}

p:last-child {
  margin-bottom: 0;
}

/* Links */
a {
  color: var(--emerald-700);
  transition: color var(--transition-base);
}

a:hover {
  color: var(--emerald-600);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  z-index: 100;
  padding: var(--space-2) var(--space-4);
}

.header-container {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 40px;
  width: auto;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

/* Navigation */
.site-nav {
  position: relative;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-1);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
}

.nav-menu {
  display: flex;
  gap: var(--space-4);
  align-items: center;
}

.nav-link {
  font-weight: 500;
  color: var(--text-primary);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-base);
}

.nav-link:hover {
  background-color: var(--emerald-50);
  color: var(--emerald-700);
}

/* Language Switcher */
.language-switcher {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.9rem;
  font-weight: 500;
}

.lang-current {
  color: var(--emerald-600);
}

.lang-separator {
  color: var(--gray-600);
}

.lang-link {
  color: var(--gray-600);
  transition: color var(--transition-base);
}

.lang-link:hover {
  color: var(--emerald-600);
}

/* Logo Section */
.logo-section {
  position: relative;
  background: linear-gradient(135deg, var(--emerald-500) 0%, var(--emerald-600) 100%);
  width: 100%;
  padding: var(--space-8) var(--space-4);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.logo-section .hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: none;
}

.logo-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: center;
}

.hero .logo-container {
  margin-bottom: var(--space-6);
}

.main-logo {
  max-width: min(70%, 400px);
  height: auto;
  display: block;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Logo position: change 'center' to 'flex-start' to push logo to top */
  justify-content: flex-start;
  background: linear-gradient(135deg, var(--emerald-500) 0%, var(--emerald-600) 100%);
  /* Adjust top spacing: use --space-0 through --space-12 to control logo height */
  padding: var(--logo-space) var(--space-4) var(--space-12);
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  width: 100%;
  max-width: 1200px;
  color: white;
}

.hero-logo {
  width: 100%;
  max-width: 800px;
  height: auto;
  margin: 0 auto var(--space-4);
}

.hero h1 {
  color: white;
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: var(--space-2);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hero-subtitle {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  color: rgba(255, 255, 255, 0.95);
  font-weight: 400;
  margin-bottom: 0;
}

/* Content Sections */
.content-sections {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.content-section {
  padding: var(--space-12) var(--space-4);
  text-align: center;
}

.content-section h2 {
  color: var(--emerald-700);
  margin-bottom: var(--space-4);
}

.content-section a {
  color: var(--emerald-600);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.content-section a:hover {
  color: var(--emerald-500);
  text-decoration-thickness: 2px;
}

/* Pictograms/Icons */
.pictogram {
  width: 80px;
  height: 80px;
  margin: 0 auto var(--space-3);
  color: var(--emerald-500);
}

.pictogram svg {
  width: 100%;
  height: 100%;
  transition: transform var(--transition-slow);
}

.pictogram.visible svg {
  animation: iconAppear 0.6s var(--ease-out-expo) forwards;
}

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

.content-section:hover .pictogram svg {
  transform: scale(1.1) rotate(2deg);
}

/* Footer */
.site-footer {
  background-color: var(--emerald-700);
  color: white;
  padding: var(--space-6) var(--space-4);
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-2);
}

.footer-nav {
  display: flex;
  justify-content: center;
  gap: var(--space-4);
}

.footer-nav a {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition-base);
}

.footer-nav a:hover {
  color: white;
}

/* Legal/Mentions Page */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-12) var(--space-4);
}

.legal-content h1 {
  color: var(--emerald-700);
  margin-bottom: var(--space-6);
}

.legal-content h2 {
  color: var(--emerald-700);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

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

/* 404 Error Page */
.error-page {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8) var(--space-4);
}

.error-page h1 {
  font-size: clamp(4rem, 15vw, 10rem);
  color: var(--emerald-500);
  margin-bottom: var(--space-4);
  line-height: 1;
}

.error-page p {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.error-page .cta-button {
  display: inline-block;
  padding: var(--space-2) var(--space-6);
  background-color: var(--emerald-500);
  color: white;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-md);
}

.error-page .cta-button:hover {
  background-color: var(--emerald-600);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
