/* ==========================================================================
   Age Friendly Europe - Design System
   Modern, Accessible, Senior-Friendly
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Colors - High Contrast, Warm & Trustworthy */
  --color-primary: #1e4d6b;
  /* Deep teal-blue (trust) */
  --color-primary-dark: #0f3347;
  --color-primary-light: #2d6a8a;
  --color-accent: #e07c3a;
  /* Warm orange (energy) */
  --color-accent-hover: #c56a2e;

  --color-bg: #fdfbf7;
  /* Warm off-white */
  --color-bg-alt: #f4f1eb;
  --color-surface: #ffffff;

  --color-text: #1a1a1a;
  /* Near-black for readability */
  --color-text-muted: #4a4a4a;
  --color-text-light: #6b6b6b;

  --color-success: #2e7d4a;
  --color-warning: #c67700;
  --color-error: #c73e3e;

  /* Typography - Large, Readable */
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-base: 1.125rem;
  /* 18px body text */
  --text-lg: 1.25rem;
  /* 20px */
  --text-xl: 1.5rem;
  /* 24px */
  --text-2xl: 1.875rem;
  /* 30px */
  --text-3xl: 2.25rem;
  /* 36px */
  --text-4xl: 3rem;
  /* 48px */

  --line-height: 1.7;
  --line-height-tight: 1.3;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Layout */
  --max-width: 1200px;
  --max-width-content: 800px;

  /* Borders & Shadows */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

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

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip Navigation (Accessibility) */
.skip-nav {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  background: var(--color-primary);
  color: white;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  z-index: 9999;
  text-decoration: none;
  font-weight: 600;
}

.skip-nav:focus {
  top: var(--space-md);
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: var(--line-height-tight);
  color: var(--color-primary-dark);
  margin-bottom: var(--space-md);
}

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

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

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

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

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

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

a:hover,
a:focus {
  color: var(--color-accent);
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Layout Components
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--max-width-content);
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-bg-alt);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.header__logo:hover {
  color: var(--color-primary-dark);
}

.header__logo-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.nav {
  display: flex;
  gap: var(--space-sm);
}

.nav__link {
  display: inline-block;
  padding: var(--space-sm) var(--space-md);
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav__link:hover,
.nav__link:focus {
  background: var(--color-bg-alt);
  color: var(--color-primary);
}

.nav__link--active {
  background: var(--color-primary);
  color: white;
}

.nav__link--active:hover,
.nav__link--active:focus {
  background: var(--color-primary-dark);
  color: white;
}

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: var(--color-primary);
  color: white;
  border: none;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-base);
  font-weight: 600;
  font-family: inherit;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-top: var(--space-md);
  }

  .nav.is-open {
    display: flex;
  }

  .nav__link {
    padding: var(--space-md);
    text-align: center;
    border: 1px solid var(--color-bg-alt);
  }
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero {
  background: linear-gradient(135deg, rgba(30, 77, 107, 0.9) 0%, rgba(15, 51, 71, 0.95) 100%),
    url('/images/hero-seniors.png') center center / cover no-repeat;
  color: white;
  padding: var(--space-3xl) 0;
  text-align: center;
}

.hero h1 {
  color: white;
  margin-bottom: var(--space-lg);
}

.hero__subtitle {
  font-size: var(--text-xl);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.btn--primary {
  background: var(--color-accent);
  color: white;
}

.btn--primary:hover,
.btn--primary:focus {
  background: var(--color-accent-hover);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

.btn--secondary:hover,
.btn--secondary:focus {
  background: var(--color-primary);
  color: white;
}

.btn--large {
  padding: var(--space-lg) var(--space-2xl);
  font-size: var(--text-lg);
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.card__title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

.card__text {
  color: var(--color-text-muted);
}

.card__image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
}

.card__label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-sm);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

/* --------------------------------------------------------------------------
   Main Content
   -------------------------------------------------------------------------- */
.main {
  padding: var(--space-3xl) 0;
  min-height: 60vh;
}

.section {
  margin-bottom: var(--space-3xl);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--color-primary-dark);
  color: white;
  padding: var(--space-2xl) 0;
  margin-top: var(--space-3xl);
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
}

.footer a:hover {
  color: white;
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xl);
}

.footer__section h4 {
  color: white;
  margin-bottom: var(--space-md);
}

.footer__bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  opacity: 0.8;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--color-text-muted);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

/* 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: 0;
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {

  .header,
  .footer,
  .nav-toggle {
    display: none;
  }

  body {
    font-size: 12pt;
    color: black;
    background: white;
  }
}