/*
Theme Name: didaktia
Theme URI: https://www.didaktia.de
Description: Modernes WordPress-Theme fuer den didaktia - KI-gestuetzte Unterrichtsplanung fuer Grundschullehrkraefte.
Version: 1.0.0
Author: didaktia
Requires PHP: 8.0
Requires at least: 6.0
Text Domain: didaktia-theme
*/

/* ===== CSS VARIABLES ===== */
:root {
  --gsp-primary: #2B5797;
  --gsp-primary-dark: #1e3d6b;
  --gsp-primary-light: #3b6db5;
  --gsp-accent: #E8A838;
  --gsp-accent-dark: #d49630;
  --gsp-success: #5BA85B;
  --gsp-danger: #DC3545;
  --gsp-bg: #F8FAFC;
  --gsp-card: #FFFFFF;
  --gsp-border: #E2E8F0;
  --gsp-text: #1E293B;
  --gsp-text-light: #64748B;
  --gsp-text-lighter: #94A3B8;
  --gsp-radius: 8px;
  --gsp-shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --gsp-shadow-md: 0 4px 6px rgba(0,0,0,.05), 0 2px 4px rgba(0,0,0,.04);
  --gsp-shadow-lg: 0 10px 15px rgba(0,0,0,.06), 0 4px 6px rgba(0,0,0,.04);
  --gsp-font: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--gsp-font);
  color: var(--gsp-text);
  background: var(--gsp-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gsp-primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--gsp-primary-dark); }
img { max-width: 100%; height: auto; }

/* ===== HEADER ===== */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--gsp-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--gsp-primary);
}
.site-logo svg { flex-shrink: 0; }
.site-logo span { white-space: nowrap; }

.header-nav { display: flex; align-items: center; gap: 6px; }
.header-nav a {
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gsp-text);
  transition: background .15s, color .15s;
}
.header-nav a:hover { background: #f1f5f9; color: var(--gsp-primary); }
.header-nav .btn-login {
  background: var(--gsp-primary);
  color: #fff;
  border: none;
}
.header-nav .btn-login:hover { background: var(--gsp-primary-dark); color: #fff; }
.header-nav .btn-register {
  border: 1px solid var(--gsp-border);
  color: var(--gsp-text);
}
.header-nav .btn-register:hover { border-color: var(--gsp-primary); color: var(--gsp-primary); background: transparent; }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--gsp-text);
}
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .header-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--gsp-border);
    box-shadow: var(--gsp-shadow-md);
  }
  .header-nav.open { display: flex; }
  .header-nav a { width: 100%; }
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--gsp-text);
  color: #94a3b8;
  padding: 48px 0 24px;
  margin-top: 64px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand { font-size: 14px; line-height: 1.7; }
.footer-brand strong { color: #fff; font-size: 16px; display: block; margin-bottom: 8px; }
.footer-col h4 { color: #fff; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.footer-col a { display: block; color: #94a3b8; font-size: 14px; padding: 3px 0; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 20px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* ===== LANDING PAGE ===== */
.hero {
  background: linear-gradient(135deg, var(--gsp-primary) 0%, var(--gsp-primary-dark) 100%);
  color: #fff;
  padding: 80px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -48px;
  left: 0;
  right: 0;
  height: 96px;
  background: var(--gsp-bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.hero h1 {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -.5px;
}
.hero p.hero-desc {
  font-size: 18px;
  line-height: 1.6;
  opacity: .9;
  margin-bottom: 28px;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-cta .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
}
.btn-cta-primary { background: var(--gsp-accent); color: #fff; border-color: var(--gsp-accent); }
.btn-cta-primary:hover { background: var(--gsp-accent-dark); border-color: var(--gsp-accent-dark); color: #fff; }
.btn-cta-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-cta-outline:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.1); }

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.hero-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,.2);
  max-width: 380px;
  width: 100%;
  color: var(--gsp-text);
  transform: rotate(2deg);
}
.hero-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gsp-border);
}
.hero-card-dot { width: 8px; height: 8px; border-radius: 50%; }
.hero-card h3 { font-size: 14px; font-weight: 600; color: var(--gsp-primary); }
.hero-card-body { font-size: 13px; line-height: 1.6; color: var(--gsp-text-light); }
.hero-card-body strong { color: var(--gsp-text); }
.hero-card-tag {
  display: inline-block;
  background: rgba(43,87,151,.08);
  color: var(--gsp-primary);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  margin-top: 10px;
}

@media (max-width: 768px) {
  .hero { padding: 48px 0 72px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero h1 { font-size: 30px; }
  .hero-cta { justify-content: center; }
  .hero-visual { display: none; }
}

/* Section base */
.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px;
}
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 {
  font-size: 30px;
  font-weight: 700;
  color: var(--gsp-text);
  margin-bottom: 8px;
  letter-spacing: -.3px;
}
.section-header p { font-size: 16px; color: var(--gsp-text-light); max-width: 600px; margin: 0 auto; }
@media (max-width: 768px) {
  .section-header h2 { font-size: 24px; }
}

/* Features */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--gsp-card);
  border: 1px solid var(--gsp-border);
  border-radius: 12px;
  padding: 28px 24px;
  transition: box-shadow .2s, transform .2s;
}
.feature-card:hover {
  box-shadow: var(--gsp-shadow-lg);
  transform: translateY(-4px);
}
.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.feature-card p { font-size: 14px; color: var(--gsp-text-light); line-height: 1.6; }
@media (max-width: 768px) { .features-grid { grid-template-columns: 1fr; } }

/* USP Comparison */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--gsp-border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.comparison-table th,
.comparison-table td {
  padding: 14px 20px;
  text-align: left;
  font-size: 14px;
}
.comparison-table thead th {
  background: var(--gsp-primary);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}
.comparison-table thead th:first-child { text-align: left; }
.comparison-table tbody tr { border-bottom: 1px solid var(--gsp-border); }
.comparison-table tbody tr:last-child { border-bottom: none; }
.comparison-table tbody tr:nth-child(even) { background: #f8fafc; }
.comparison-table td:first-child { font-weight: 500; color: var(--gsp-text); }
.comparison-table .check { color: var(--gsp-success); font-weight: 700; }
.comparison-table .cross { color: #ccc; }
.comparison-table .highlight-col { background: rgba(43,87,151,.03); }
.comparison-table thead th.highlight-col { background: var(--gsp-primary-dark); color: #fff; }
@media (max-width: 640px) {
  .comparison-table th, .comparison-table td { padding: 10px 12px; font-size: 13px; }
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--gsp-card);
  border: 2px solid var(--gsp-border);
  border-radius: 16px;
  padding: 32px;
  position: relative;
  transition: box-shadow .2s;
}
.pricing-card:hover { box-shadow: var(--gsp-shadow-lg); }
.pricing-card.featured { border-color: var(--gsp-primary); }
.pricing-card.featured::before {
  content: 'Empfohlen';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gsp-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 14px;
  border-radius: 12px;
}
.pricing-name { font-size: 18px; font-weight: 600; color: var(--gsp-text); margin-bottom: 4px; }
.pricing-desc { font-size: 13px; color: var(--gsp-text-light); margin-bottom: 16px; }
.pricing-price { font-size: 36px; font-weight: 800; color: var(--gsp-primary); margin-bottom: 4px; }
.pricing-price span { font-size: 14px; font-weight: 400; color: var(--gsp-text-light); }
.pricing-note { font-size: 12px; color: var(--gsp-text-light); margin-bottom: 20px; }
.pricing-features { list-style: none; margin-bottom: 24px; }
.pricing-features li {
  padding: 6px 0;
  font-size: 14px;
  color: var(--gsp-text);
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.pricing-features li::before {
  content: '\2713';
  color: var(--gsp-success);
  font-weight: 700;
  flex-shrink: 0;
}
.pricing-btn {
  display: block;
  text-align: center;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
}
.pricing-btn-primary { background: var(--gsp-primary); color: #fff; }
.pricing-btn-primary:hover { background: var(--gsp-primary-dark); color: #fff; }
.pricing-btn-outline { border: 1px solid var(--gsp-border); color: var(--gsp-text); }
.pricing-btn-outline:hover { border-color: var(--gsp-primary); color: var(--gsp-primary); }
@media (max-width: 640px) { .pricing-grid { grid-template-columns: 1fr; } }

/* CTA section */
.cta-section {
  background: linear-gradient(135deg, var(--gsp-primary) 0%, var(--gsp-primary-dark) 100%);
  color: #fff;
  border-radius: 16px;
  padding: 56px 40px;
  text-align: center;
  margin: 0 24px;
  max-width: 1152px;
  margin-left: auto;
  margin-right: auto;
}
.cta-section h2 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.cta-section p { font-size: 16px; opacity: .9; margin-bottom: 24px; }

/* ===== APP LAYOUT (Logged-in pages) ===== */
.app-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  min-height: calc(100vh - 64px - 200px);
}
.app-sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
}
.app-sidebar nav {
  background: #fff;
  border: 1px solid var(--gsp-border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: var(--gsp-shadow);
}
.app-sidebar .sidebar-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--gsp-text-lighter);
  padding: 12px 12px 4px;
}
.app-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gsp-text);
  transition: background .15s, color .15s;
}
.app-sidebar a:hover { background: #f1f5f9; color: var(--gsp-primary); }
.app-sidebar a.active { background: rgba(43,87,151,.08); color: var(--gsp-primary); font-weight: 600; }
.app-sidebar a svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .7; }
.app-sidebar a:hover svg, .app-sidebar a.active svg { opacity: 1; }
.app-sidebar .sidebar-divider { height: 1px; background: var(--gsp-border); margin: 6px 4px; }
.app-main { min-width: 0; }

@media (max-width: 900px) {
  .app-layout { grid-template-columns: 1fr; }
  .app-sidebar { position: static; }
  .app-sidebar nav { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; }
  .app-sidebar .sidebar-label { display: none; }
  .app-sidebar .sidebar-divider { display: none; }
  .app-sidebar a { padding: 6px 10px; font-size: 13px; }
}

/* Hide admin bar spacing */
body.logged-in.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) {
  body.logged-in.admin-bar .site-header { top: 46px; }
}

/* Utility */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
