/* ============================================
   mediamanual.at — Educational design system
   Clean, text-heavy, institutional aesthetic
   ============================================ */

:root {
  --color-primary: #1a3a5c;
  --color-primary-light: #2a5a8c;
  --color-accent: #c2402a;
  --color-bg: #fafaf8;
  --color-surface: #ffffff;
  --color-text: #2c2c2c;
  --color-text-muted: #666666;
  --color-border: #e0ddd8;
  --color-border-light: #f0ede8;
  --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --max-width: 1120px;
  --content-width: 740px;
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header --- */
.site-header {
  background: var(--color-primary);
  color: #fff;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.site-logo {
  text-decoration: none;
  color: #fff;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-text {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.logo-text strong { font-weight: 700; }

.logo-sub {
  font-size: 0.7rem;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 0.25rem;
}

.site-nav a {
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.site-nav a:hover,
.site-nav a.active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
  transition: 0.2s;
}

/* --- Hero --- */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: #fff;
  padding: 4rem 0 3.5rem;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.hero-lead {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--color-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
  border-color: var(--color-primary-light);
  box-shadow: 0 2px 12px rgba(26,58,92,0.1);
}

.card h2, .card h3 {
  font-family: var(--font-serif);
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.card-featured {
  border-left: 3px solid var(--color-accent);
}

/* --- Page content --- */
.page-single, .page-list {
  padding: 2.5rem 0 4rem;
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.page-header h1 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  color: var(--color-primary);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.page-lead {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  max-width: var(--content-width);
  line-height: 1.6;
}

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

.page-content h2 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  color: var(--color-primary);
  margin: 2.5rem 0 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-light);
  letter-spacing: -0.01em;
}

.page-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2rem 0 0.5rem;
  color: var(--color-primary);
}

.page-content h4 {
  font-size: 1rem;
  font-weight: 700;
  margin: 1.5rem 0 0.4rem;
}

.page-content p {
  margin-bottom: 1.1rem;
}

.page-content ul, .page-content ol {
  margin: 0.75rem 0 1.25rem 1.5rem;
}

.page-content li { margin-bottom: 0.3rem; }

.page-content blockquote {
  border-left: 3px solid var(--color-accent);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--color-border-light);
  font-style: italic;
  color: var(--color-text-muted);
}

.page-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.page-content th, .page-content td {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--color-border);
  text-align: left;
}

.page-content th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
}

.page-content tr:nth-child(even) { background: var(--color-border-light); }

.page-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0;
}

/* --- Breadcrumb --- */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
}

.breadcrumb a {
  color: var(--color-primary-light);
  text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

.breadcrumb .sep { margin: 0 0.35rem; opacity: 0.4; }

/* --- Table of Contents --- */
.toc {
  background: var(--color-border-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  max-width: var(--content-width);
}

.toc h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.5rem; }
.toc nav ul { list-style: none; margin: 0; padding: 0; }
.toc nav li { margin: 0.25rem 0; }
.toc nav a { color: var(--color-primary-light); text-decoration: none; font-size: 0.9rem; }
.toc nav a:hover { text-decoration: underline; }
.toc nav ul ul { padding-left: 1rem; }

/* --- Related --- */
.related-pages {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.related-pages h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.related-pages ul { list-style: none; }
.related-pages li { margin: 0.3rem 0; }
.related-pages a { color: var(--color-primary-light); text-decoration: none; }
.related-pages a:hover { text-decoration: underline; }

/* --- Footer --- */
.site-footer {
  background: var(--color-primary);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-logo {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

.footer-logo strong { font-weight: 700; }

.site-footer h4 {
  color: #fff;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.site-footer ul { list-style: none; }
.site-footer li { margin: 0.3rem 0; }
.site-footer a { color: rgba(255,255,255,0.7); text-decoration: none; }
.site-footer a:hover { color: #fff; }

.footer-bottom {
  padding-top: 1.25rem;
  text-align: center;
  opacity: 0.5;
  font-size: 0.8rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  html { font-size: 16px; }
  .hero h1 { font-size: 1.8rem; }
  .page-header h1 { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .card-grid { grid-template-columns: 1fr; }

  .site-nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-primary);
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  }

  .site-nav.open ul { display: flex; }
  .site-nav a { padding: 0.75rem 1rem; }
  .nav-toggle { display: block; }
}
