/*
Theme Name: Bollaroid
Theme URI: https://bollaroid.ch
Author: Marco Boll
Description: Warmes minimalistisches Theme mit funktionierendem Dark Mode.
Version: 1.9
*/

/* ==============================
   BASISSTIL
   ============================== */
html, body {
  margin: 0;
  padding: 0;
  background: #fbf7ec;
  color: #222;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  transition: background 0.4s ease, color 0.4s ease;
}

/* Links */
a {
  color: #333;
  text-decoration: none;
  transition: color 0.3s ease;
}
a:hover {
  color: #555;
  text-decoration: underline;
}

/* ==============================
   FOOTER
   ============================== */
footer {
  background: transparent;
  color: #777;
  font-size: 13px;
  text-align: center;
  padding: 40px 0 20px;
  transition: background 0.4s ease, color 0.4s ease;
}
footer a { color: #777; }
footer a:hover { color: #444; }

/* ==============================
   HEADER & LOGO
   ============================== */
.b-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 40px;
}
.b-header-sub {
  justify-content: flex-start;
  padding: 20px 40px;
}
.b-logo-img {
  max-width: 240px;
  height: auto;
  transition: all 0.4s ease;
}
body.home .b-logo-img {
  max-width: 360px;
  margin: 40px auto 60px;
}
body:not(.home) .b-logo-img {
  max-width: 160px;
}

/* ==============================
   DARK-MODE-BUTTON
   ============================== */
#theme-toggle {
  position: fixed;
  top: 18px;
  right: 24px;
  background: rgba(255,255,255,0.25);
  color: #444;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  width: 28px;
  height: 28px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
  transition: all 0.4s ease;
  backdrop-filter: blur(4px);
  z-index: 9999;
}
#theme-toggle:hover {
  opacity: 0.9;
  background: rgba(255,255,255,0.4);
  border-color: rgba(0,0,0,0.15);
}

/* Darkmode-Version */
html.dark #theme-toggle {
  background: rgba(255,255,255,0.08);
  color: #ddd;
  border-color: rgba(255,255,255,0.15);
}
html.dark #theme-toggle:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ==============================
   LOGIN / LOGOUT LINK
   ============================== */
.b-login-link {
  position: fixed;
  top: 18px;
  right: 64px;
  font-size: 14px;
  color: #444;
  text-decoration: none;
  background: rgba(255,255,255,0.25);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.1);
  opacity: 0.55;
  backdrop-filter: blur(4px);
  transition: all 0.3s ease;
  z-index: 9998;
}
.b-login-link:hover {
  opacity: 0.9;
  background: rgba(255,255,255,0.4);
  border-color: rgba(0,0,0,0.15);
  color: #222;
}

/* Darkmode */
html.dark .b-login-link {
  background: rgba(255,255,255,0.08);
  color: #ddd;
  border-color: rgba(255,255,255,0.15);
}
html.dark .b-login-link:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

/* ==============================
   KENNZAHLEN-FORMULARE & TABELLEN
   ============================== */
.kennzahlen-form {
  max-width: 400px;
  margin: 20px auto;
  background: rgba(255,255,255,0.6);
  padding: 20px 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.kennzahlen-form label { display:block; margin-top:8px; }
.kennzahlen-form input[type="number"],
.kennzahlen-form textarea {
  width:100%;
  margin-top:4px;
  border:1px solid #ccc;
  border-radius:4px;
  padding:6px;
}
.kennzahlen-form button {
  margin-top:10px;
  background:#333;
  color:#fff;
  border:0;
  padding:8px 16px;
  border-radius:4px;
  cursor:pointer;
}
.kennzahlen-form button:hover { background:#555; }

.kennzahlen-tabelle {
  width:100%;
  max-width:700px;
  margin:30px auto;
  border-collapse:collapse;
}
.kennzahlen-tabelle th, .kennzahlen-tabelle td {
  padding: 6px 8px;
  text-align: center;
}
.kennzahlen-tabelle a {
  text-decoration: none;
  font-size: 16px;
}
.kennzahlen-tabelle a:hover {
  opacity: 0.8;
}
.kennzahlen-admin th, .kennzahlen-admin td {
  padding: 6px 8px;
  border-bottom: 1px solid #ddd;
}
.kennzahlen-admin textarea {
  font-size: 12px;
  width: 160px;
}
.kennzahlen-admin h3 {
  margin-top: 24px;
  color: #333;
}
.kennzahlen-admin tr:nth-child(even) {
  background: #fafafa;
}
/* ==============================
   HOME – POLAROID GRID
   ============================== */
.b-home { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.b-grid { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.b-polaroid {
  background:#fff; border-radius:6px; padding:12px 12px 34px;
  box-shadow:0 6px 16px rgba(0,0,0,.18);
  transition:transform .15s ease, box-shadow .15s ease;
  cursor:pointer; text-align:center; text-decoration:none; color:#111;
  position:relative; flex:1 1 260px; max-width: 320px;
}
.b-polaroid:hover { transform: translateY(-3px) rotate(-0.5deg); box-shadow:0 10px 22px rgba(0,0,0,.25); }
.b-polaroid img { width:100%; height:auto; border-radius:6px; display:block; }
.b-polaroid-caption { display:block; margin-top:10px; font-family:'Patrick Hand', cursive; color:#333; }
html.dark .b-polaroid { background:#fafafa; }
html.dark .b-polaroid-caption { color:#eee; }
/* ==== DARK MODE BASE ==== */
html.dark, html.dark body {
  background: #111 !important;
  color: #eee !important;
}
html.dark a { color: #ddd; }
html.dark a:hover { color: #fff; }
html.dark footer { color: #aaa; }
html.dark footer a { color: #aaa; }
html.dark footer a:hover { color: #fff; }


/* ==== DARK MODE BASE (angepasst) ==== */
html.dark, html.dark body {
  background: rgb(26, 28, 27) !important; /* #1A1C1B */
  color: #eee !important;
}

/* ==== FIX: Polaroid captions behalten gleiche Farbe ==== */
html.dark .b-polaroid-caption,
html.dark .b-gallery figcaption {
  color: #333 !important;
}
