/* ============================================
   finanz-junkie.de — Andy Warhol × Windows 8
   Pop Art meets Metro UI for Finance
   ============================================ */

/* --- Theme Variables --- */
:root {
  --hotpink: #FF1493;
  --cyan: #00CED1;
  --gold: #FFD700;
  --orange: #FF4500;
  --lime: #32CD32;
  --purple: #9370DB;
  --coral: #FF6B6B;
  --bg: #f5f0eb;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 16px;
  --shadow: 0 4px 24px rgba(0,0,0,.08);
  --font: 'Inter','Segoe UI',system-ui,-apple-system,sans-serif;
}

.dark {
  --bg: #0d1117;
  --bg-card: #161b22;
  --text: #f0f6fc;
  --text-muted: #8b949e;
  --border: #30363d;
  --shadow: 0 4px 24px rgba(0,0,0,.3);
}

/* --- Reset & Base --- */
* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background .3s, color .3s;
  min-height: 100vh;
}

/* Halftone dot background (Warhol signature) */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image:
    radial-gradient(circle, rgba(0,0,0,.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  z-index: -1;
}
.dark body::before {
  background-image:
    radial-gradient(circle, rgba(255,255,255,.03) 1px, transparent 1px);
}

a { color: inherit; text-decoration: none; }

/* ============================================
   MEGA-NAV (Windows 8 Style)
   ============================================ */
.mega-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-card);
  border-bottom: 3px solid var(--border);
  backdrop-filter: blur(16px);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  height: 64px;
  gap: 4px;
}
.nav-logo {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
  margin-right: 24px;
  white-space: nowrap;
}
.nav-logo span { color: var(--hotpink); }
.dark .nav-logo span { color: var(--cyan); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.nav-link {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .2s;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--text);
  background: rgba(255,20,147,.08);
}
.dark .nav-link:hover {
  background: rgba(0,206,209,.1);
}

/* Mega-Menu Dropdown */
.nav-dropdown {
  position: relative;
}
.nav-dropdown:hover .dropdown-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  gap: 32px;
  min-width: 360px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .25s ease;
  box-shadow: var(--shadow);
  z-index: 1001;
}
.dropdown-panel.wide {
  min-width: 520px;
}
.dropdown-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 140px;
}
.dropdown-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--hotpink);
  margin-bottom: 4px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--hotpink);
}
.dark .dropdown-label { color: var(--cyan); border-bottom-color: var(--cyan); }
.dropdown-col a {
  padding: 6px 8px;
  border-radius: 6px;
  font-size: .85rem;
  color: var(--text-muted);
  transition: all .15s;
}
.dropdown-col a:hover {
  background: rgba(255,20,147,.06);
  color: var(--text);
}
.dark .dropdown-col a:hover {
  background: rgba(0,206,209,.08);
}
.dropdown-viewall {
  position: absolute;
  bottom: 12px;
  right: 20px;
}
.dropdown-viewall a {
  font-size: .8rem;
  font-weight: 600;
  color: var(--hotpink);
  transition: color .2s;
}
.dark .dropdown-viewall a { color: var(--cyan); }
.dropdown-viewall a:hover { opacity: .7; }

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
}
.theme-toggle {
  background: none;
  border: 2px solid var(--border);
  color: var(--text);
  cursor: pointer;
  padding: 6px 14px;
  border-radius: 10px;
  font-size: 1.1rem;
  transition: all .2s;
}
.theme-toggle:hover {
  border-color: var(--hotpink);
  background: rgba(255,20,147,.06);
}
.dark .theme-toggle:hover {
  border-color: var(--cyan);
  background: rgba(0,206,209,.08);
}
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  margin-left: auto;
}

/* ============================================
   HERO (Pop Art)
   ============================================ */
.hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: #fff;
  padding: 80px 24px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
/* Warhol-style color blocks */
.hero::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,20,147,.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -30%; left: -10%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(0,206,209,.12) 0%, transparent 70%);
  border-radius: 50%;
}
.dark .hero {
  background: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #1c2d1f 100%);
}
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}
.hero h1 span { color: var(--gold); }
.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,.7);
  max-width: 600px;
  margin: 0 auto 24px;
  position: relative;
}

/* Tile-style category badges */
.hero-tiles {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 20px;
  position: relative;
}
.hero-tile {
  padding: 8px 20px;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
  border: 2px solid rgba(255,255,255,.2);
  transition: transform .2s, border-color .2s;
}
.hero-tile:hover { transform: scale(1.05); }

.hero-stats {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
  position: relative;
}
.hero-stat {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  padding: 12px 24px;
  border-radius: 12px;
  text-align: center;
  min-width: 100px;
}
.hero-stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--gold);
}
.hero-stat span {
  font-size: .75rem;
  color: rgba(255,255,255,.6);
}

/* ============================================
   CONTAINER & SECTIONS
   ============================================ */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 48px 0; }
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.section-header .emoji-badge {
  font-size: 1.6rem;
  width: 48px; height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: var(--bg-card);
  border: 2px solid var(--border);
}
.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.section-sub {
  color: var(--text-muted);
  margin-bottom: 32px;
  font-size: .95rem;
}

/* ============================================
   ARTICLE GRID — Windows 8 TILES
   ============================================ */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* Tile card — each article is a colorful Metro tile */
.tile-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
}
/* Warhol-style top color stripe */
.tile-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  transition: height .25s;
}
.tile-card:hover::before { height: 6px; }
.tile-card:hover {
  border-color: inherit;
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.tile-cat {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.tile-card h2 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.35;
}
.tile-card h2 a { color: var(--text); }
.tile-card h2 a:hover { opacity: .7; }
.tile-card p {
  color: var(--text-muted);
  font-size: .88rem;
  flex: 1;
  line-height: 1.6;
}
.tile-meta {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78rem;
  color: var(--text-muted);
}

/* ============================================
   ARTICLE PAGE
   ============================================ */
.article-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px;
}
.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 3px solid var(--border);
}
.article-header .cat-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 20px;
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.article-header h1 {
  font-size: 2.2rem;
  line-height: 1.25;
  font-weight: 800;
}
.article-meta {
  color: var(--text-muted);
  font-size: .9rem;
  margin-top: 12px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.article-content {
  font-size: 1.05rem;
  line-height: 1.85;
}
.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.article-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 28px 0 12px;
}
.article-content p { margin-bottom: 18px; }
.article-content ul, .article-content ol { margin: 12px 0 18px; padding-left: 24px; }
.article-content li { margin-bottom: 8px; }
.article-content blockquote {
  border-left: 4px solid var(--hotpink);
  padding: 16px 24px;
  margin: 24px 0;
  background: rgba(255,20,147,.04);
  border-radius: 0 10px 10px 0;
  font-style: italic;
}
.dark .article-content blockquote {
  background: rgba(0,206,209,.06);
  border-left-color: var(--cyan);
}
.article-content strong { font-weight: 700; }

/* FAQ */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 12px 0;
}
.faq-item h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--hotpink);
}
.dark .faq-item h3 { color: var(--cyan); }
.faq-item p { margin: 0; font-size: .95rem; }

/* ============================================
   CATEGORY PAGE
   ============================================ */
.page-header {
  text-align: center;
  padding: 48px 24px 32px;
}
.page-header h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.page-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 3px solid var(--border);
  padding: 48px 24px 24px;
  margin-top: 48px;
  background: var(--bg-card);
}
.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
}
.footer-logo {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.footer-logo span { color: var(--hotpink); }
.dark .footer-logo span { color: var(--cyan); }
.footer-brand p { color: var(--text-muted); font-size: .88rem; }
.footer-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--hotpink);
  margin-bottom: 10px;
}
.dark .footer-label { color: var(--cyan); }
.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a {
  color: var(--text-muted);
  font-size: .88rem;
  transition: color .2s;
}
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  max-width: 1280px;
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--text-muted);
}

/* ============================================
   IMPRESSUM / STATIC PAGES
   ============================================ */
.static-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px;
}
.static-page h1 {
  font-size: 2rem;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--border);
}
.static-page h2 {
  font-size: 1.3rem;
  margin: 28px 0 12px;
}
.static-page h3 {
  font-size: 1.1rem;
  margin: 20px 0 10px;
}
.static-page p {
  margin-bottom: 14px;
  line-height: 1.7;
}
.static-page ul { margin: 10px 0 16px; padding-left: 20px; }
.static-page li { margin-bottom: 6px; }

/* ============================================
   404
   ============================================ */
.error-page {
  text-align: center;
  padding: 80px 24px;
}
.error-page h1 {
  font-size: 5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--hotpink), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 12px;
}
.dark .error-page h1 {
  background: linear-gradient(135deg, var(--cyan), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.error-page p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 24px;
}
.error-page a {
  display: inline-block;
  padding: 12px 32px;
  background: var(--hotpink);
  color: #fff;
  border-radius: 10px;
  font-weight: 600;
  transition: transform .2s;
}
.dark .error-page a { background: var(--cyan); color: #000; }
.error-page a:hover { transform: scale(1.05); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .nav-hamburger { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
    flex-direction: column;
    padding: 12px 24px;
    gap: 4px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links > a, .nav-dropdown { width: 100%; }
  .dropdown-panel {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    min-width: auto;
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
    margin: 4px 0;
    border: 1px solid var(--border);
    box-shadow: none;
    display: none;
  }
  .nav-dropdown:hover .dropdown-panel,
  .nav-dropdown.open .dropdown-panel { display: flex; }
  .dropdown-panel.wide { min-width: auto; }
  .dropdown-viewall { position: static; margin-top: 8px; }
  .nav-right { margin-left: 0; width: 100%; margin-top: 8px; }
  
  .hero h1 { font-size: 2rem; }
  .tile-grid { grid-template-columns: 1fr; }
  .article-header h1 { font-size: 1.6rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
}

/* Utility — category color stripes (set inline via JS) */
.cat-aktien { border-top-color: #FF1493; }
.cat-etf { border-top-color: #00CED1; }
.cat-depot { border-top-color: #FF4500; }
.cat-finanzbildung { border-top-color: #FFD700; }
.cat-markt { border-top-color: #32CD32; }
.cat-buchhaltung { border-top-color: #9370DB; }
.cat-allgemein { border-top-color: #FF6B6B; }

/* ===== Tags: Chips (article header) ===== */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 500;
  background: color-mix(in srgb, var(--tc) 18%, transparent);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--tc) 40%, transparent);
  text-decoration: none;
  transition: all .2s;
}
.tag-chip:hover {
  background: color-mix(in srgb, var(--tc) 30%, transparent);
  border-color: var(--tc);
  transform: translateY(-1px);
}

/* ===== Tags: Pills (tile cards) ===== */
.tile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.tag-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: .68rem;
  font-weight: 500;
  background: color-mix(in srgb, var(--tp) 15%, transparent);
  color: var(--text-muted);
  border: 1px solid color-mix(in srgb, var(--tp) 25%, transparent);
  text-decoration: none;
  transition: all .15s;
}
.tag-pill:hover {
  color: var(--text);
  border-color: var(--tp);
}

/* ===== Tag Cloud (overview page) ===== */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 32px 0;
}
.tag-cloud-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 24px;
  background: color-mix(in srgb, var(--tc) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc) 30%, transparent);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: all .2s;
}
.tag-cloud-item:hover {
  background: color-mix(in srgb, var(--tc) 25%, transparent);
  border-color: var(--tc);
  transform: scale(1.05);
}
.tag-count {
  font-size: .78em;
  color: var(--text-muted);
  background: rgba(0,0,0,.08);
  padding: 1px 8px;
  border-radius: 10px;
}
.dark .tag-count {
  background: rgba(255,255,255,.1);
}
