/*
Theme Name: Friesisches Forum
Theme URI: https://frya-fresena.org
Author: Brandbeschleuniger
Description: Theme für das Friesische Forum e.V.
Version: 1.0.5
Requires CP: 2.0
*/

:root {
  --primary-bg: #ffffff;
  --secondary-bg: #f8f9fa;
  --text-color: #212529;
  --accent-color: #ff0000;
  --nav-bg: rgba(255, 255, 255, 0.95);
  --card-bg: #ffffff;
  --footer-bg: #212529;
  --footer-text: #ffffff;
}

[data-theme="dark"] {
  --primary-bg: #1a1a1a;
  --secondary-bg: #2d2d2d;
  --text-color: #888888;
  --accent-color: #ff4d4d;
  --nav-bg: rgba(26, 26, 26, 0.95);
  --card-bg: #2d2d2d;
  --footer-bg: #000000;
  --footer-text: #ffffff;
}

[data-theme="light"] {
  --primary-bg: #ffffff;
  --secondary-bg: #f8f9fa;
  --text-color: #212529;
  --accent-color: #ff0000;
  --nav-bg: rgba(255, 255, 255, 0.95);
  --card-bg: #ffffff;
  --footer-bg: #212529;
  --footer-text: #ffffff;
}

body {
  font-family: 'Roboto Slab', serif;
  background-color: var(--primary-bg);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
}

a { color: var(--accent-color); text-decoration: none; }
a:hover { color: var(--accent-color); opacity: 0.8; text-decoration: none; }

/* Navbar */
.navbar {
  background-color: var(--nav-bg);
  padding: 1rem 0;
  transition: all 0.3s ease;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1030;
}

.navbar-brand img { height: 50px; }

.navbar-toggler { border: 2px solid #fff; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

[data-theme="light"] .navbar-toggler { border: 2px solid #000; }
[data-theme="light"] .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
}

.nav-link {
  color: var(--text-color) !important;
  font-weight: 600;
  margin: 0 1rem;
  transition: color 0.3s ease;
}

.nav-link:hover { color: var(--accent-color) !important; }

@media (min-width: 992px) {
  .navbar-collapse { display: flex !important; flex-basis: auto; }
  .navbar-toggler { display: none; }
  .navbar-nav { flex-direction: row; }
}

/* Masthead */
.masthead {
  position: relative;
  padding-top: 10.5rem;
  padding-bottom: 6rem;
  text-align: center;
  color: #ffffff;
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), var(--masthead-bg, url('assets/header.png'));
  background-repeat: no-repeat;
  background-attachment: scroll;
  background-position: center center;
  background-size: cover;
  margin-top: 76px;
}

.masthead-heading {
  font-size: 3.25rem;
  font-weight: 700;
  line-height: 3.25rem;
  margin-bottom: 2rem;
}

.masthead-heading h1 {
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  margin: 0;
  color: #fff;
}

.masthead-subheading {
  font-size: 1.5rem;
  line-height: 1.5rem;
  margin-bottom: 25px;
}

/* Sections */
.section { padding: 6rem 0; }

.section-heading {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--text-color);
}

.section-subheading {
  font-size: 1.2rem;
  margin-bottom: 4rem;
  color: var(--text-color);
  opacity: 0.8;
}

/* Cards */
.card {
  background-color: var(--card-bg);
  border: none;
  border-radius: 10px;
  margin-bottom: 2rem;
}

.card-body { padding: 2rem; }

/* Dark mode toggle */
.theme-toggle {
  position: relative;
  width: 60px;
  height: 30px;
  margin: 0 1rem;
}

.theme-toggle input { opacity: 0; width: 0; height: 0; }

.theme-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 30px;
}

.theme-toggle-slider:before {
  position: absolute;
  content: "";
  height: 22px; width: 22px;
  left: 4px; bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .theme-toggle-slider { background-color: var(--accent-color); }
input:checked + .theme-toggle-slider:before { transform: translateX(30px); }

/* Footer */
.footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 4rem 0;
}

.footer-heading {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer-link {
  color: var(--footer-text);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover { color: var(--accent-color); }

/* Page content */
.page-content {
  padding: 4rem 0;
}

.page-content p { margin-bottom: 1.2rem; line-height: 1.8; }

/* Article detail */
.article-meta {
  color: var(--text-color);
  opacity: 0.7;
  margin-bottom: 2rem;
}

.article-content { line-height: 1.9; }
.article-content h2, .article-content h3 { margin-top: 2rem; margin-bottom: 1rem; }

/* Beitraege grid */
.beitraege-grid .card { height: 100%; }

/* Sprachfilter Reden */
.lang-switcher {
  font-size: 0.95rem;
}
.lang-switch {
  cursor: pointer;
  text-decoration: underline;
  white-space: nowrap;
}
.lang-switch.active {
  font-weight: 700;
  text-decoration: none;
}
.lang-switch .flag {
  display: inline-block;
  height: 1em;
  width: 1.5em;
  vertical-align: -0.15em;
  margin-left: 0.3em;
  border: 1px solid rgba(0,0,0,0.4);
  border-radius: 1px;
  object-fit: fill;
}

/* Pagination (paginate_links type=list) */
.beitraege-grid ul.page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.beitraege-grid ul.page-numbers li { margin: 0; }
.beitraege-grid .page-numbers {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  text-decoration: none;
  min-width: 2.25rem;
  text-align: center;
}
.beitraege-grid .page-numbers.current {
  background: var(--accent-color);
  color: #fff;
}

#vorstand a[href^="mailto"] { color: #0d6efd; }
#vorstand a[href^="mailto"]:hover { color: #0a58ca; opacity: 1; }

/* Responsive */
@media (max-width: 991px) {
  .navbar-nav { margin: 1rem 0; }
  .theme-toggle { margin: 1rem auto; }
}

@media (max-width: 768px) {
  .masthead-heading { font-size: 2rem; line-height: 2rem; }
  .masthead-subheading { font-size: 1.2rem; line-height: 1.2rem; }
  .section { padding: 4rem 0; }
  .section-heading { font-size: 2rem; }
}
