/* 
   Style for Freie Waldorfschule am Prenzlauer Berg Onboarding Guide
   Design System, Theme, and Fonts imported directly from the official school portal.
   Strict compliance with accessibility guidelines (WCAG 2.1 AA)
*/

/* 1. Typography Setup */
@font-face {
  font-family: 'Stickczyk Rund';
  src: url('../fonts/stickczykrund-a-webfont.woff2') format('woff2'),
       url('../fonts/StickczykRund-B.woff') format('woff');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Klavika';
  src: url('../fonts/Klavika-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Klavika';
  src: url('../fonts/Klavika-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Klavika';
  src: url('../fonts/Klavika-Italic.otf') format('opentype');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Colors from FWAPB Landing Page Theme */
  --bg-color: #E7E5E0; /* --page-bg */
  --bg-card: #F7F5EF; /* --surface */
  --bg-tip: #F2F0EA; /* --surface-soft */
  --bg-mockup: #F7F5EF; /* --surface */
  --border-color: #B8B5AD; /* --line */
  
  --text-main: #303234; /* --text */
  --text-muted: #5F6264; /* --text-muted */
  --text-accent: #639C93; /* --schulchat-accent */
  --text-accent-secondary: #758866; /* --dateien-accent */
  
  --color-focus: #639C93; /* --schulchat-accent */
  
  /* Fonts */
  --font-headings: 'Stickczyk Rund', sans-serif;
  --font-body: 'Klavika', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Metrics */
  --container-width: 960px;
  --border-radius: 0px; /* Rectangular theme */
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  padding: 0;
}

/* Header & Banner */
header.site-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 0.25rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-width);
  margin: 0 auto;
  gap: 2rem;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-main);
  white-space: nowrap;
}

.logo-img {
  height: 70px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  transition: height 0.2s ease;
}

.logo-title {
  display: none;
}

/* Navigation Menu */
nav.nav-menu {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: normal;
  font-size: 14px;
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius);
  border-bottom: 2px solid transparent;
  transition: color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-main);
  background-color: var(--bg-tip);
}

.nav-link.active {
  color: var(--text-main);
  border-bottom-color: var(--text-accent);
  font-weight: 500;
}

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

.lang-btn {
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.75rem;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-main);
}

.lang-btn:hover {
  background-color: var(--bg-tip);
  border-color: var(--text-accent);
}

.lang-btn.active {
  background-color: var(--text-accent);
  color: white;
  border-color: var(--text-accent);
}

/* Main Content Area */
main.main-container {
  max-width: var(--container-width);
  margin: 3rem auto;
  padding: 0 1.5rem;
}

.content-width {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

h1 {
  font-family: var(--font-headings);
  font-size: 2.25rem;
  color: var(--text-accent);
  margin-bottom: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

h2 {
  font-family: var(--font-body); /* Use Klavika */
  font-size: 26px; /* Visual difference */
  color: var(--text-accent);
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  font-weight: 500;
}

h3 {
  font-family: var(--font-body); /* Use Klavika */
  font-size: 20px; /* Visual difference */
  color: var(--text-accent-secondary);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
  font-weight: 500;
}

h4 {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text-main);
  max-width: 800px; /* Limit text lines */
}

ul, ol {
  margin-bottom: 1.25rem;
  margin-left: 2rem;
  max-width: 800px; /* Limit list line length */
}

li {
  margin-bottom: 0.5rem;
}

/* Custom Step Styling */
.steps-list {
  list-style: none;
  margin-left: 0;
  margin-top: 1.5rem;
  margin-bottom: 2rem;
}

.step-item {
  display: flex;
  gap: 1.5rem;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.step-badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--text-accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.step-details {
  flex: 1;
}

.step-details h3 {
  margin-top: 0;
  color: var(--text-accent);
  font-size: 20px;
}

.step-instruction {
  margin-bottom: 1rem;
  font-size: 17px;
}

/* Info and Alert boxes */
.info-box {
  background-color: #ECF7F5; /* soft mint */
  border-left: 4px solid var(--text-accent);
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
  font-size: 0.95rem;
  max-width: 800px;
}

.warning-box {
  background-color: #FDF6E8; /* soft sand */
  border-left: 4px solid #DAC280;
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
  font-size: 0.95rem;
  max-width: 800px;
}

.security-notice {
  background-color: #FDF6E8;
  border-left: 4px solid #DAC280;
  padding: 1rem 1.25rem;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
  font-size: 0.95rem;
  max-width: 800px;
}

.warning-box h4, .info-box h4, .security-notice h4 {
  font-family: var(--font-body);
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #D2AA33;
}

.info-box h4 {
  color: var(--text-accent);
}

.security-notice h4 {
  color: #D2AA33;
}

/* Screenshots and Mockups */
.screenshot-figure {
  margin: 1.5rem 0;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  background-color: var(--bg-mockup);
  max-width: 800px;
}

.screenshot-figure-small {
  max-width: 300px;
  margin-left: auto;
  margin-right: auto;
}

.screenshot-img {
  width: 100%;
  height: auto;
  display: block;
}

.screenshot-caption {
  padding: 0.75rem 1rem;
  font-size: 15px; /* Minimum 15px */
  color: var(--text-muted);
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  font-style: italic;
}

/* UI Mockup Form Simulator */
.ui-mockup {
  background-color: var(--bg-mockup);
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  margin-top: 1rem;
  max-width: 800px;
}

.ui-mockup-header {
  font-family: var(--font-body); /* Use Klavika */
  font-size: 1.15rem;
  color: var(--text-accent);
  margin-bottom: 1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.ui-mockup-group {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ui-mockup-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-main);
}

.ui-mockup-input {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.6rem 0.8rem;
  border-radius: 4px;
  font-size: 0.95rem;
  color: var(--text-main);
  outline: none;
  font-family: monospace;
}

.ui-mockup-input:focus {
  border-color: var(--color-focus);
}

.ui-mockup-btn {
  background-color: var(--text-accent);
  color: white;
  border: none;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: not-allowed;
  border-radius: 4px;
  align-self: flex-start;
  margin-top: 0.5rem;
}

/* Troubleshooting Cards */
.trouble-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.trouble-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.trouble-card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 20px;
  color: var(--text-accent-secondary);
}

/* Footer */
footer.site-footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color); /* reduced from 2px */
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 5rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1rem;
}

.footer-link {
  color: var(--text-accent);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
}

/* Quick Start Cards */
.intro-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

.intro-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color); /* reduced from 2px */
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text-main);
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.intro-card:hover {
  border-color: var(--text-accent);
  background-color: var(--bg-tip);
}

.intro-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--text-accent);
}

/* Chapter Navigation classes */
.chapter-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.chapter-link {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: bold;
  font-size: 15px;
  font-family: var(--font-body);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  color: var(--text-accent);
  transition: background-color 0.2s, border-color 0.2s;
  text-align: center;
}

.chapter-link-primary {
  background-color: var(--text-accent);
  color: #ffffff;
  border-color: var(--text-accent);
}

.chapter-link:hover {
  background-color: var(--bg-tip);
  color: var(--text-main);
}

.chapter-link-primary:hover {
  background-color: #53887e;
  border-color: #53887e;
  color: #ffffff;
}

/* Support Box classes */
.support-panel {
  background-color: var(--bg-tip);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  margin-top: 3rem;
  text-align: center;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.support-panel h3 {
  margin-top: 0;
}

.support-email {
  display: inline-block;
  margin-top: 0.5rem;
  text-decoration: none;
  font-size: 17px;
  color: var(--text-accent);
  transition: color 0.2s;
}

.support-email:hover {
  color: #4a756e;
  text-decoration: underline;
}

/* Language link switcher buttons */
.language-link {
  display: inline-block;
  width: 80px;
  text-align: center;
  padding: 0.35rem 0;
  border: 1px solid var(--border-color);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-main);
  background-color: #ffffff;
  transition: background-color 0.2s, border-color 0.2s;
}

.language-link.active {
  background-color: var(--text-accent);
  color: #ffffff;
  border-color: var(--text-accent);
}

.language-link:hover:not(.active) {
  background-color: var(--bg-tip);
  border-color: var(--text-accent);
}

/* Mobile Toggle classes */
.menu-toggle-btn {
  display: none;
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

.menu-toggle-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 2px;
  background-color: var(--text-main);
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background-color: var(--text-main);
}

.menu-toggle-icon::before {
  top: -6px;
}

.menu-toggle-icon::after {
  bottom: -6px;
}

/* Keyboard Accessibility - Focus Indicators */
a:focus, button:focus, input:focus, select:focus {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--text-accent);
  color: white;
  padding: 8px;
  z-index: 100;
}

.skip-link:focus {
  top: 0;
}

/* Hidden visual states */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Root Selection Card styling */
.root-body {
  background-color: #E7E5E0;
  color: #303234;
  font-family: var(--font-body);
}

.root-card {
  max-width: 600px;
  margin: 100px auto;
  padding: 3rem 2rem;
  text-align: center;
  background: #F7F5EF;
  border: 1px solid #B8B5AD;
  border-radius: 0px;
  box-shadow: 0 4px 14px rgba(48, 50, 52, 0.05);
}

.root-logo {
  height: 80px;
  width: auto;
  margin-bottom: 1.5rem;
  object-fit: contain;
}

.root-title {
  color: var(--text-accent);
  font-family: var(--font-headings);
  font-weight: normal;
  font-size: 2rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.root-subtitle {
  margin-bottom: 2rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-left: auto;
  margin-right: auto;
}

.root-btn-container {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.root-btn {
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  font-weight: 500;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: background-color 0.2s, color 0.2s;
  border-radius: 0px;
}

.root-btn-primary {
  background: var(--text-accent);
  color: #ffffff;
}

.root-btn-primary:hover {
  background: #53887e;
}

.root-btn-secondary {
  background: #ffffff;
  color: var(--text-accent);
  border: 1px solid var(--text-accent);
}

.root-btn-secondary:hover {
  background: var(--bg-tip);
}

.root-footer-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: auto;
  margin-right: auto;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .logo-img {
    height: 62px; /* Tablet: 60-64px */
  }

  .menu-toggle-btn {
    display: flex; /* Show menu toggle on mobile */
  }
  
  nav.nav-menu {
    display: none; /* Hide navigation menu by default on mobile */
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    gap: 0.75rem;
    z-index: 99;
  }
  
  nav.nav-menu.open {
    display: flex; /* Show menu toggle when open */
  }
  
  .header-container {
    position: relative;
  }
}

@media (max-width: 768px) {
  /* Keep header horizontal for consistent alignment */
  .logo-title {
    font-size: 0.95rem;
  }
  
  .intro-cards {
    grid-template-columns: 1fr;
  }
  
  main.main-container {
    margin: 1.5rem auto;
  }
  
  h1 {
    font-size: 1.85rem;
  }
  
  .step-item {
    flex-direction: column;
    gap: 1rem;
  }
  
  .step-badge {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }
}

@media (max-width: 600px) {
  .logo-img {
    height: 54px; /* Mobile: 52-56px */
  }

  .chapter-navigation {
    flex-direction: column;
  }
  
  .chapter-link {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .logo-title {
    font-size: 0.8rem;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
