/* ===================================================
   DeutscheLernen.com — German Flag Theme
   Colors: #000000 (black), #DD0000 (red), #FFCE00 (gold)
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fredoka+One&family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  --black:       #1a1a1a;
  --red:         #DD0000;
  --red-dark:    #aa0000;
  --red-light:   #fff0f0;
  --gold:        #FFCE00;
  --gold-dark:   #d4a900;
  --gold-light:  #fffbe6;
  --white:       #ffffff;
  --text:        #1a1a2e;
  --muted:       #546e7a;
  --bg:          #f8f9fb;
  --border:      #e2e6ea;
  --shadow:      0 4px 20px rgba(0,0,0,0.08);
  --radius:      14px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
  font-size: 16px;
}
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ── GERMAN FLAG STRIPE BAR ── */
.flag-stripe {
  display: flex;
  height: 6px;
  width: 100%;
}
.flag-stripe .s1 { flex: 1; background: #1a1a1a; }
.flag-stripe .s2 { flex: 1; background: var(--red); }
.flag-stripe .s3 { flex: 1; background: var(--gold); }

/* ── HEADER ── */
header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  font-family: 'Fredoka One', cursive;
  font-size: 1.45rem;
  color: var(--black) !important;
  text-decoration: none !important;
  white-space: nowrap;
}
.logo span { color: var(--red); }

#main-nav {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-left: auto;
  flex-wrap: wrap;
}
#main-nav a {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
}
#main-nav a:hover { background: var(--gold-light); color: var(--red-dark); }

.nav-test {
  background: var(--red) !important;
  color: var(--white) !important;
  border-radius: 20px !important;
  padding: 7px 16px !important;
  font-size: 0.85rem !important;
}
.nav-test:hover { background: var(--red-dark) !important; color: var(--white) !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.2s;
}

/* ── BREADCRUMB ── */
.breadcrumb {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 20px;
  font-size: 0.82rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span { color: #bbb; }

/* ── ARTICLE HERO ── */
.article-hero {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d0000 50%, #5a4200 100%);
  color: var(--white);
  text-align: center;
  padding: 48px 20px 40px;
}
.emoji-big { font-size: 3.2rem; display: block; margin-bottom: 12px; }
.article-hero h1 {
  font-family: 'Fredoka One', cursive;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: 8px;
  line-height: 1.2;
}
.article-hero .subtitle {
  font-size: 1rem;
  opacity: 0.85;
  margin-bottom: 8px;
  background: rgba(255,255,255,0.1);
  display: inline-block;
  padding: 3px 14px;
  border-radius: 20px;
}
.article-meta {
  font-size: 0.82rem;
  opacity: 0.7;
  margin-top: 8px;
}

/* ── LAYOUT ── */
.article-layout {
  max-width: 1100px;
  margin: 36px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}
.article-content {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 36px;
  box-shadow: var(--shadow);
}
.article-content h2 {
  font-size: 1.25rem;
  color: var(--red-dark);
  margin: 32px 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--gold);
}
.article-content h3 {
  font-size: 1.05rem;
  color: var(--text);
  margin: 22px 0 10px;
}
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol {
  margin: 0 0 18px 22px;
}
.article-content li { margin-bottom: 6px; }
.article-content strong { color: var(--red-dark); }

/* ── VOCAB TABLE ── */
.vocab-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.93rem;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.vocab-table thead tr { background: var(--red); color: var(--white); }
.vocab-table th {
  padding: 11px 14px;
  text-align: left;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.vocab-table tbody tr { border-bottom: 1px solid var(--border); }
.vocab-table tbody tr:last-child { border-bottom: none; }
.vocab-table tbody tr:nth-child(even) { background: #fff8e1; }
.vocab-table tbody tr:hover { background: var(--gold-light); }
.vocab-table td { padding: 9px 14px; }
.vocab-table .german { font-weight: 700; color: var(--red-dark); }
.vocab-table .english { color: var(--text); }
.vocab-table .example { color: var(--muted); font-size: 0.85em; font-style: italic; }
.vocab-table .emoji { font-size: 1.2em; text-align: center; }

/* ── TIP BOX ── */
.tip-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--gold-light);
  border-left: 4px solid var(--gold-dark);
  border-radius: 10px;
  padding: 14px 18px;
  margin: 20px 0;
}
.tip-icon { font-size: 1.4rem; flex-shrink: 0; }
.tip-content { font-size: 0.93rem; }
.tip-content strong { color: var(--red-dark); display: block; margin-bottom: 4px; }

/* ── NOTE / INFO BOX ── */
.note, p.note {
  background: #f0f4ff;
  border-left: 4px solid var(--red);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 0.92rem;
  color: var(--text);
}

/* ── MINI DIALOG ── */
.mini-dialog {
  background: var(--gold-light);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 18px 0;
  border-left: 3px solid var(--gold-dark);
  font-size: 0.94rem;
}
.mini-dialog p { margin-bottom: 6px; }
.mini-dialog p:last-child { margin-bottom: 0; }

/* ── QUIZ / MQ ── */
.mq {
  background: var(--gold-light);
  border: 1px solid var(--gold);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 28px 0;
}
.mq h3 { color: var(--red-dark); margin-bottom: 18px; font-size: 1.05rem; }
.mq-q { margin-bottom: 20px; }
.mq-q .q { font-weight: 700; margin-bottom: 8px; font-size: 0.95rem; }
.mq-q label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.92rem;
  cursor: pointer;
}
.mq-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.mq-primary {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 9px 22px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
}
.mq-primary:hover { background: var(--red-dark); }
.mq-q button[data-mq="reset"],
.mq-actions button:not(.mq-primary) {
  background: var(--white);
  border: 2px solid var(--border);
  padding: 9px 18px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
}
.mq-result { margin-top: 14px; font-weight: 700; font-size: 0.95rem; }

/* ── TEST CTA ── */
.test-cta {
  background: linear-gradient(135deg, #1a1a1a, #6b0000);
  color: var(--white);
  border-radius: var(--radius);
  padding: 28px 28px 24px;
  text-align: center;
  margin: 28px 0;
}
.test-cta h3 { font-size: 1.15rem; margin-bottom: 8px; }
.test-cta p { font-size: 0.9rem; opacity: 0.85; margin-bottom: 16px; }

/* ── BUTTONS ── */
.btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none !important;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--gold);
  color: var(--black) !important;
}
.btn-primary:hover { background: var(--gold-dark); }
.btn-outline {
  background: transparent;
  border: 2px solid var(--red);
  color: var(--red) !important;
}
.btn-outline:hover { background: var(--red); color: var(--white) !important; }

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.sidebar-card h4 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--red-dark);
  border-bottom: 2px solid var(--gold);
  padding-bottom: 6px;
}
.related-list { list-style: none; padding: 0; margin: 0; }
.related-list li { padding: 4px 0; border-bottom: 1px solid var(--border); }
.related-list li:last-child { border-bottom: none; }
.related-list a { font-size: 0.88rem; color: var(--text); text-decoration: none; }
.related-list a:hover { color: var(--red); }

/* Social sidebar */
.social-sidebar a {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.87rem;
  font-weight: 600;
  margin-bottom: 6px;
  text-decoration: none;
  transition: 0.18s;
}
.s-web { background: #e8f0fe; color: #1a73e8 !important; }
.s-fb  { background: #e8f0fe; color: #1877f2 !important; }
.s-ig  { background: #fce4ec; color: #c62828 !important; }
.s-tt  { background: #f3e5f5; color: #7b1fa2 !important; }

/* ── SOCIAL BANNER ── */
.social-banner {
  background: linear-gradient(135deg, #1a1a1a 0%, #6b0000 100%);
  color: var(--white);
  text-align: center;
  padding: 48px 20px;
  margin-top: 40px;
}
.social-banner h2 { font-size: 1.4rem; margin-bottom: 10px; }
.social-banner p { opacity: 0.85; margin-bottom: 22px; font-size: 0.95rem; }
.social-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.social-btn {
  background: rgba(255,255,255,0.15);
  color: var(--white) !important;
  padding: 9px 20px;
  border-radius: 24px;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.3);
  transition: background 0.2s;
}
.social-btn:hover { background: rgba(255,255,255,0.28); }

/* ── FOOTER ── */
footer {
  background: #111;
  color: #ccc;
  padding: 48px 20px 24px;
}
.footer-grid {
  max-width: 1100px;
  margin: 0 auto 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-brand .logo { color: var(--white) !important; font-size: 1.25rem; display: block; margin-bottom: 12px; }
.footer-brand p { font-size: 0.85rem; color: #999; line-height: 1.6; }
footer h4 { color: var(--gold); font-size: 0.9rem; margin-bottom: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
footer ul { list-style: none; }
footer li { padding: 4px 0; }
footer a { color: #bbb; font-size: 0.85rem; text-decoration: none; }
footer a:hover { color: var(--gold); }
.footer-bottom {
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 20px;
  border-top: 1px solid #333;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
  color: #666;
}

/* ── AD CONTAINER ── */
.ad-container { margin: 24px 0; text-align: center; }

/* ── ARTICLES GRID (index) ── */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin: 28px 0;
}
.article-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
}
.article-card:hover { transform: translateY(-4px); box-shadow: 0 8px 30px rgba(0,0,0,0.12); }
.card-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
  display: inline-block;
}
.tag-grammar { background: #fce4ec; color: #c62828; }
.tag-vocab   { background: #fff8e1; color: #f57f17; }
.card-body { padding: 16px 18px; flex: 1; }
.card-body h3 { font-size: 0.98rem; margin-bottom: 6px; }
.card-body p  { font-size: 0.83rem; color: var(--muted); }
.card-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── CATEGORY TABS ── */
.cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.cat-tab {
  padding: 7px 18px;
  border-radius: 20px;
  border: 2px solid var(--border);
  background: var(--white);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text);
  transition: 0.18s;
  font-family: inherit;
}
.cat-tab.active, .cat-tab:hover { background: var(--red); color: var(--white); border-color: var(--red); }

/* ── PAIR / COLUMNS ── */
.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 18px 0;
}

/* ── CHIP ── */
.chip {
  display: inline-block;
  background: var(--gold-light);
  border: 1px solid var(--gold);
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  margin: 3px;
}

/* ── TOC ── */
.toc {
  background: var(--gold-light);
  border: 1px solid var(--gold);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0;
}
.toc-title { font-weight: 700; margin-bottom: 10px; color: var(--red-dark); }
.toc a { display: block; padding: 3px 0; font-size: 0.9rem; }

/* ── FAQ SECTION ── */
.faq-section {
  margin: 40px 0;
  padding: 32px;
  background: var(--gold-light);
  border-radius: var(--radius);
}
.faq-section h2 { color: var(--red-dark); margin-bottom: 20px; }
.faq-item { margin-bottom: 16px; }
.faq-item h3 { color: var(--red); font-size: 1rem; margin-bottom: 6px; }

/* ── VOCAB DE/EN CHIPS ── */
.vocab-de { color: var(--red-dark); font-weight: 700; }
.vocab-en { color: var(--muted); }
.swatch-de { background: var(--gold-light); padding: 2px 8px; border-radius: 5px; }

/* ── CONTAINER ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .header-inner { gap: 0; }
  #main-nav {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    gap: 4px;
    z-index: 99;
  }
  #main-nav.open { display: flex; }
  #main-nav a { width: 100%; padding: 10px 14px; }
  .hamburger { display: flex; }
  .article-content { padding: 20px 18px; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .pair { grid-template-columns: 1fr; }
}
