/* ========================================================
   ESV Ochtrup - CLEAN LIGHT THEME (READABILITY FIRST)
   ======================================================== */
:root {
  --bg: #f8f9fc;
  --bg-card: #ffffff;
  --bg-alt: #ffffff;
  --primary: #2563eb;
  --accent: #3b82f6;
  --text: #1e293b;
  --text-muted: #475569;
  --border: #e2e8f0;
  --gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}

/* --- FORCE LIGHT BACKGROUND GLOBALLY --- */
html, body, .site, #page, .site-content, .content-area, .site-main, .inside-article, .entry-content, .separate-containers .inside-article, .one-container .site-content {
  background-color: var(--bg) !important;
  background: var(--bg) !important;
}

/* --- FORCE TEXT COLORS GLOBALLY --- */
body, p, div, span, li, a, td, th {
  color: var(--text);
  font-family: 'Outfit', sans-serif;
}
h1, h2, h3, h4, h5, h6, .entry-title, .site-title {
  color: var(--text) !important;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
}
p {
  color: var(--text-muted) !important;
}
.highlight {
  color: var(--primary) !important;
}

/* --- REMOVE WIDGETS & SIDEBARS --- */
.widget-area, #right-sidebar, #left-sidebar, .sidebar, .page-header, .entry-header {
  display: none !important;
}
.site-main, .content-area {
  width: 100% !important;
  max-width: 100% !important;
  float: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* --- HEADER --- */
.site-header {
  position: fixed; top: 0; left: 0; width: 100%; height: 80px;
  background: #ffffff !important;
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex; align-items: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.header-inner {
  max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 2rem;
  display: flex; justify-content: space-between; align-items: center;
}
.logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none !important; }
.logo-icon { font-size: 1.8rem; }
.logo-text { font-family: 'Rajdhani', sans-serif; font-size: 1.4rem; font-weight: bold; color: var(--text) !important; }

/* Navigation */
.main-nav { display: flex; align-items: center; gap: 2rem; }
.nav-list { display: flex; list-style: none; gap: 1.5rem; margin: 0; padding: 0; }
.nav-list a { color: var(--text-muted) !important; font-weight: 600; font-size: 0.95rem; text-transform: uppercase; text-decoration: none !important; }
.nav-list a:hover { color: var(--primary) !important; }
.nav-cta {
  background: var(--primary); color: #fff !important;
  padding: 0.5rem 1.2rem; border-radius: 6px; font-weight: bold; font-size: 0.9rem; text-decoration: none !important;
}
.nav-cta:hover { background: #1d4ed8; }

body { padding-top: 80px !important; }

/* --- SECTIONS & CONTAINERS --- */
.section { 
  padding: 5rem 0; 
  background: var(--bg) !important; 
  width: 100%; 
  display: block; 
  clear: both;
}
.section-alt { 
  background-color: var(--bg-alt) !important; 
  border-top: 1px solid var(--border); 
  border-bottom: 1px solid var(--border); 
}
.esv-container { 
  max-width: 1200px; 
  margin: 0 auto; 
  padding: 0 2rem; 
  width: 100%; 
  display: block;
}

/* --- HERO SECTION --- */
.hero-section { padding: 6rem 0; text-align: center; background: var(--bg) !important; }
.hero-badge {
  display: inline-block; padding: 0.4rem 1rem; background: #eff6ff;
  border: 1px solid #bfdbfe; color: var(--primary) !important; border-radius: 50px;
  font-size: 0.8rem; font-weight: bold; text-transform: uppercase; margin-bottom: 1.5rem;
}
.hero-title { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; margin-bottom: 1.5rem; color: var(--text) !important; }
.hero-subtitle { font-size: 1.2rem; max-width: 600px; margin: 0 auto 2rem; color: var(--text-muted) !important; }
.hero-buttons { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* Buttons */
.btn {
  padding: 0.8rem 1.8rem; border-radius: 8px; font-weight: bold; font-size: 1rem; cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.5rem; text-decoration: none !important;
}
.btn-primary { background: var(--primary) !important; color: #fff !important; border: none; }
.btn-primary:hover { background: #1d4ed8 !important; }
.btn-outline { background: #ffffff !important; border: 1px solid var(--border) !important; color: var(--text) !important; }
.btn-outline:hover { background: #f1f5f9 !important; border-color: #cbd5e1 !important; }

/* --- SECTION HEADERS --- */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header .tag { color: var(--primary) !important; font-weight: bold; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; display: block; margin-bottom: 0.5rem; }
.section-header h2 { font-size: 2.5rem; margin-bottom: 0; color: var(--text) !important; }

/* --- GRIDS & CARDS --- */
.grid { 
  display: grid; 
  gap: 1.5rem; 
  width: 100%;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-card) !important; 
  border: 1px solid var(--border) !important; 
  border-radius: 12px;
  padding: 2rem; 
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  display: flex; /* Ensures equal height content alignment */
  flex-direction: column;
  height: 100%; /* Stretches card to fill grid row */
}
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); border-color: #cbd5e1 !important; }
.card-icon-top { font-size: 2rem; margin-bottom: 1rem; }
.card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; color: var(--text) !important; }
.card p { font-size: 0.95rem; margin-bottom: 0; color: var(--text-muted) !important; flex-grow: 1; /* pushes content down naturally */ }

/* --- CTA BOX --- */
.cta-box {
  background: var(--bg-card) !important; border: 1px solid var(--border) !important; border-radius: 16px;
  padding: 4rem 2rem; text-align: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* --- FOOTER --- */
.esv-footer {
  background: #1e293b !important; color: #ffffff !important; padding: 4rem 2rem 2rem; margin-top: 4rem;
  width: 100%; clear: both;
}
.esv-footer-grid {
  max-width: 1200px; margin: 0 auto 3rem; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; padding: 0 2rem;
}
.esv-footer h3 { font-size: 1.5rem; margin-bottom: 1rem; color: #ffffff !important; }
.esv-footer h4 { font-size: 1rem; text-transform: uppercase; color: #e2e8f0 !important; margin-bottom: 1rem; }
.esv-footer ul { list-style: none; padding: 0; }
.esv-footer ul li { margin-bottom: 0.5rem; }
.esv-footer a { color: #94a3b8 !important; font-size: 0.9rem; text-decoration: none !important; }
.esv-footer a:hover { color: #ffffff !important; }
.esv-footer-bottom {
  max-width: 1200px; margin: 0 auto; border-top: 1px solid #334155; padding-top: 1.5rem;
  display: flex; justify-content: space-between; font-size: 0.85rem; color: #94a3b8 !important;
  padding: 0 2rem;
}

/* --- RESPONSIVE FIXES --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .esv-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .main-nav .nav-list { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .esv-footer-grid { grid-template-columns: 1fr; }
  .hero-section { padding: 3rem 0; }
  .cta-box { padding: 3rem 1.5rem; }
  .esv-container { padding: 0 1.5rem; }
}

/* =========================================
   CRITICAL FIX: PREVENT FLEX-ROW ON SITE-CONTENT
   ========================================= */
html, body, .site, #page, .site-content, .site-main, .inside-article, .entry-content {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  clear: both !important;
  float: none !important;
}

.section, .hero-section {
  display: block !important;
  width: 100% !important;
  clear: both !important;
}

.esv-container {
  display: block !important;
  width: 100% !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  clear: both !important;
}

/* ========================================================
   DARK THEME VARIABLES
   ======================================================== */
[data-theme="dark"] {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-alt: #1e293b;
  --text: #f8fafc;
  --text-muted: #cbd5e1;
  --border: #334155;
}

[data-theme="dark"] .site-header { background: #1e293b !important; border-bottom: 1px solid #334155; }
[data-theme="dark"] .logo-text { color: #f8fafc !important; }
[data-theme="dark"] .nav-list a { color: #cbd5e1 !important; }
[data-theme="dark"] .nav-list a:hover { color: var(--primary) !important; }
[data-theme="dark"] .btn-outline { background: #1e293b !important; color: #f8fafc !important; }
[data-theme="dark"] .btn-outline:hover { background: #334155 !important; border-color: #475569 !important; }
[data-theme="dark"] .esv-form input { background: #0f172a; color: #f8fafc; }
[data-theme="dark"] #minderjaehrig-section { background: #1e293b !important; color: #f8fafc !important; border-left-color: var(--primary) !important; }
[data-theme="dark"] #minderjaehrig-section h4 { color: #f8fafc !important; }
[data-theme="dark"] #minderjaehrig-section p { color: #94a3b8 !important; }
[data-theme="dark"] #minderjaehrig-section label { color: #cbd5e1 !important; }

/* ========================================================
   THEME SNACKBAR
   ======================================================== */
.theme-snackbar {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%) translateX(-100%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 12px 12px 0;
  padding: 1rem;
  box-shadow: 4px 4px 15px rgba(0,0,0,0.1);
  z-index: 9999;
  display: flex;
  align-items: center;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.theme-snackbar::after {
  content: '🌓';
  position: absolute;
  right: -48px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 8px 8px 0;
  width: 48px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 4px 0 10px rgba(0,0,0,0.05);
  transition: all 0.2s;
  color: var(--text);
}
.theme-snackbar:hover {
  transform: translateY(-50%) translateX(0);
}
.theme-snackbar:hover::after {
  opacity: 0;
}
.theme-snackbar-options { 
  display: flex; 
  flex-direction: column; 
  gap: 0.5rem; 
}
.theme-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}
.theme-btn:hover { 
  background: var(--primary); 
  color: #fff; 
  border-color: var(--primary); 
}

/* ========================================================
   RETRO THEME (90s / Windows 95)
   ======================================================== */
[data-theme="retro"] {
  --bg: #c0c0c0;
  --bg-card: #c0c0c0;
  --bg-alt: #008080;
  --primary: #000080;
  --text: #000000;
  --text-muted: #000000;
  --border: #000000;
}

[data-theme="retro"] body, 
[data-theme="retro"] .site, 
[data-theme="retro"] .site-content, 
[data-theme="retro"] .section, 
[data-theme="retro"] .hero-section {
  background-color: #c0c0c0 !important;
}

[data-theme="retro"] * {
  font-family: "Times New Roman", Times, serif !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

[data-theme="retro"] h1, 
[data-theme="retro"] h2, 
[data-theme="retro"] h3, 
[data-theme="retro"] h4 {
  font-weight: bold !important;
  color: #000080 !important;
  text-decoration: none;
}

[data-theme="retro"] p, 
[data-theme="retro"] li, 
[data-theme="retro"] span, 
[data-theme="retro"] div {
  color: #000000 !important;
}

/* Links */
[data-theme="retro"] a {
  color: #0000ee !important;
  text-decoration: underline !important;
}
[data-theme="retro"] a:visited {
  color: #551a8b !important;
}

/* Cards & Buttons with 3D effect */
[data-theme="retro"] .card, 
[data-theme="retro"] .cta-box, 
[data-theme="retro"] .esv-form,
[data-theme="retro"] #minderjaehrig-section {
  border-style: outset !important;
  border-width: 3px !important;
  border-color: #ffffff #404040 #404040 #ffffff !important;
  background-color: #c0c0c0 !important;
}

[data-theme="retro"] .btn,
[data-theme="retro"] button {
  background-color: #c0c0c0 !important;
  color: #000000 !important;
  border-style: outset !important;
  border-width: 3px !important;
  border-color: #ffffff #404040 #404040 #ffffff !important;
  font-weight: bold;
  text-decoration: none !important;
  padding: 5px 15px !important;
  display: inline-block;
}
[data-theme="retro"] .btn:active,
[data-theme="retro"] button:active {
  border-style: inset !important;
}

/* Header */
[data-theme="retro"] .site-header {
  background: #008080 !important; /* Teal background for header */
  border-bottom: 3px solid #000000 !important;
}
[data-theme="retro"] .logo-text { color: #ffffff !important; }
[data-theme="retro"] .nav-list a { color: #ffffff !important; text-decoration: none !important; font-weight: bold !important; }
[data-theme="retro"] .nav-cta { background: #c0c0c0 !important; color: #000 !important; border-style: outset !important; border-width: 2px !important; border-color: #fff #404040 #404040 #fff !important; }

/* Footer */
[data-theme="retro"] .esv-footer {
  background: #000080 !important;
  color: #ffffff !important;
  border-top: 3px solid #ffffff !important;
}
[data-theme="retro"] .esv-footer h3,
[data-theme="retro"] .esv-footer h4,
[data-theme="retro"] .esv-footer p,
[data-theme="retro"] .esv-footer span {
  color: #ffffff !important;
}
[data-theme="retro"] .esv-footer a {
  color: #00ffff !important; /* Cyan links in footer */
}

/* Specific elements */
[data-theme="retro"] .tag { background: transparent !important; color: #ff0000 !important; border: 1px dashed #ff0000; padding: 2px 5px; }
[data-theme="retro"] .highlight { color: #ff0000 !important; }
[data-theme="retro"] .section-alt { background-color: #008080 !important; }
[data-theme="retro"] .section-alt h2, [data-theme="retro"] .section-alt h3, [data-theme="retro"] .section-alt p { color: #ffffff !important; }
[data-theme="retro"] .section-alt .card { background-color: #c0c0c0 !important; }
[data-theme="retro"] .section-alt .card h3, [data-theme="retro"] .section-alt .card p { color: #000 !important; }

/* Form inputs */
[data-theme="retro"] input {
  background: #ffffff !important;
  color: #000000 !important;
  border-style: inset !important;
  border-width: 2px !important;
  border-color: #404040 #ffffff #ffffff #404040 !important;
}

/* USK Logos */
.usk-badge {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  font-size: 24px;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px #000000, 0 2px 4px rgba(0,0,0,0.3);
  border-radius: 4px;
  margin-left: auto;
  line-height: 1;
}

.usk-0 {
  background-color: #ffffff;
  color: #000000;
}

.usk-12 {
  background-color: #3bb54a; /* USK Green */
  color: #000000;
}

.usk-18 {
  background-color: #ed1c24; /* USK Red */
  color: #ffffff;
}

/* Fix for retro mode */
[data-theme="retro"] .usk-badge {
  border-style: outset !important;
  border-width: 3px !important;
  border-color: #ffffff #404040 #404040 #ffffff !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
