/*
Theme Name: Glückskinder
Theme URI: https://www.xn--zwickauer-glckskinder-kic.de/
Author: Zwickauer Glückskinder
Description: Responsives Theme für die Chronik der Zwickauer Glückskinder. Logo, Kinderzeichnung und Jahresaktionen bleiben im Vordergrund.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: glueckskinder
*/

:root {
  --gk-green: #5eb946;
  --gk-link: #00aa08;
  --gk-text: #222;
  --gk-muted: #555;
  --gk-border: #ddd;
  --gk-rule: #bbb;
  --gk-card: #fff;
  --gk-sidebar: #eee;
  --gk-widget: #e4e4e4;
  --gk-year-bg: #f3faf2;
  --gk-max: 1000px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--gk-green);
  color: var(--gk-text);
  font-family: Verdana, Arial, Tahoma, sans-serif;
  font-size: 14px;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
  vertical-align: middle;
}

a {
  color: var(--gk-link);
}

a:hover,
a:focus {
  text-decoration: none;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Top contact bar */
.gk-topbar {
  background: #3d8f32;
  color: #fff;
  font-size: 14px;
}

.gk-topbar-inner {
  width: var(--gk-max);
  max-width: 100%;
  margin: 0 auto;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gk-topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gk-topbar-icon {
  display: inline-flex;
  line-height: 0;
  border-radius: 6px;
  overflow: hidden;
}

.gk-topbar-icon svg {
  display: block;
  width: 28px;
  height: 28px;
}

.gk-topbar-phone {
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.gk-topbar-phone:hover,
.gk-topbar-phone:focus {
  text-decoration: underline;
  color: #fff;
}

/* Mobile menu (hidden on desktop) */
.gk-mobile-bar {
  display: none;
  margin: 8px 0 0;
}

.gk-nav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #cfe6c8;
  background: #f3faf2;
  color: #1f5a18;
  font: inherit;
  font-weight: bold;
  padding: 10px 14px;
  border-radius: 4px;
  cursor: pointer;
  width: 100%;
  justify-content: center;
}

.gk-nav-toggle-bars {
  width: 20px;
  height: 14px;
  position: relative;
  display: inline-block;
}

.gk-nav-toggle-bars::before,
.gk-nav-toggle-bars::after,
.gk-nav-toggle-bars {
  background: #1f5a18;
}

.gk-nav-toggle-bars::before,
.gk-nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #1f5a18;
}

.gk-nav-toggle-bars::before {
  top: 0;
}

.gk-nav-toggle-bars::after {
  bottom: 0;
}

.gk-nav-toggle-bars {
  background: linear-gradient(#1f5a18, #1f5a18) center / 100% 2px no-repeat;
}

.gk-mobile-nav {
  display: none;
  margin: 10px 0 0;
  padding: 8px;
  background: var(--gk-sidebar);
  border: 1px solid var(--gk-border);
}

.gk-mobile-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site {
  padding: 16px 16px 40px;
}

.site-card {
  width: var(--gk-max);
  max-width: 100%;
  margin: 0 auto;
  background: var(--gk-card);
  border: 5px solid var(--gk-border);
  border-radius: 5px;
  padding: 14px 40px 8px;
}

.site-branding {
  margin: 0;
}

.site-logo,
.custom-logo-link {
  display: inline-block;
  line-height: 0;
}

.site-logo img,
.custom-logo-link img,
.custom-logo {
  width: 429px;
  max-width: 100%;
  height: auto;
  display: block;
}

.site-rule {
  border: 0;
  border-bottom: 2px solid var(--gk-rule);
  margin: 10px 0 14px;
}

.site-zeichnung {
  width: 100%;
  height: auto;
  display: block;
}

.site-aktuell {
  margin: 12px 0 0;
  padding: 8px 0 2px;
  font-size: 0.95em;
  color: #444;
  border-bottom: 1px solid #e5e5e5;
}

.site-aktuell a {
  color: var(--gk-link);
  text-decoration: none;
  font-weight: bold;
}

.site-aktuell a:hover,
.site-aktuell a:focus {
  text-decoration: underline;
}

/* Spenden / Bankverbindung klarer hervorheben */
.entry .gk-spende,
.gk-spende {
  margin: 18px 0 22px;
  padding: 14px 16px;
  background: #f3faf2;
  border-top: 1px solid #cfe6c8;
  border-bottom: 1px solid #cfe6c8;
}

.gk-spende p {
  margin: 0 0 8px;
}

.gk-spende p:last-child {
  margin-bottom: 0;
}

.gk-spende strong {
  font-size: 1.05em;
}

.gk-help-links {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.gk-help-links li {
  margin: 0 0 8px;
}

.gk-help-links a {
  font-weight: bold;
}

.site-columns {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  margin-top: 22px;
}

.site-content {
  flex: 1 1 auto;
  min-width: 0;
}

.site-sidebar {
  width: 280px;
  flex: none;
  background: var(--gk-sidebar);
  padding: 10px;
  border-top: 1px solid var(--gk-border);
}

.post {
  margin: 0 0 40px;
}

.post-date {
  float: left;
  margin: 8px 14px 8px 0;
  padding: 2px 6px 4px;
  border-top: 1px solid var(--gk-border);
  border-bottom: 2px solid #ccc;
  text-align: center;
  font-family: Arial, sans-serif;
  line-height: 1.15;
}

.post-day {
  display: block;
  font-size: 26px;
  font-weight: bold;
  color: #444;
}

.post-month {
  display: block;
  font-size: 11px;
  color: #666;
}

.post-meta {
  color: #444;
  font-size: 12px;
  font-weight: bold;
  padding-top: 8px;
  margin: 0;
}

.post-meta a {
  color: #444;
  text-decoration: none;
}

.post-meta a:hover,
.post-meta a:focus {
  text-decoration: underline;
}

.post-title {
  margin: 0 0 14px;
  padding-top: 4px;
  font-size: 1.7em;
  font-weight: normal;
  line-height: 1.25;
  clear: none;
}

.post-title a {
  color: var(--gk-link);
  text-decoration: none;
}

.post-title a:hover,
.post-title a:focus {
  text-decoration: underline;
}

.entry {
  clear: both;
}

.entry > *:first-child {
  margin-top: 0;
}

.entry p {
  margin: 0 0 18px;
}

.entry img,
.entry .wp-block-image,
.entry figure {
  margin: 8px 0 26px;
}

.entry ul,
.entry ol {
  margin: 0 0 18px;
  padding-left: 1.4em;
}

.entry li {
  margin-bottom: 0.35em;
}

.post-footer {
  clear: both;
  margin-top: 12px;
  padding: 8px 0 0;
  border-top: 1px solid var(--gk-border);
  font-size: 0.9em;
  color: #333;
}

.navigation {
  margin: 0 0 28px;
  clear: both;
}

.navigation a {
  font-weight: bold;
}

.widget {
  margin: 0 0 16px;
}

.widget-title {
  margin: 0 0 8px;
  padding: 5px 6px;
  color: var(--gk-muted);
  font-size: 14px;
  font-weight: bold;
  border-top: 1px solid var(--gk-border);
  border-bottom: 1px solid var(--gk-border);
  background: var(--gk-widget);
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 6px 0;
  background: #fff;
}

.widget ul li {
  margin: 0;
}

.widget ul a {
  display: block;
  padding: 2px 10px;
  color: var(--gk-link);
  text-decoration: underline;
  font-size: 13px;
  line-height: 1.35;
}

.widget ul a::before {
  content: "› ";
  text-decoration: none;
  display: inline-block;
}

.widget ul .sub-menu {
  list-style: none;
  margin: 0 0 4px;
  padding: 2px 0 4px;
  background: #fafafa;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  display: none;
}

.widget ul .menu-item-has-children.is-open > .sub-menu,
.widget ul .menu-item-has-children.current-menu-ancestor > .sub-menu,
.widget ul .menu-item-has-children.current-menu-parent > .sub-menu {
  display: block;
}

.widget ul .sub-menu a {
  padding-left: 22px;
  font-size: 12px;
}

.widget ul .menu-item-has-children > a {
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}

.widget ul .menu-item-has-children > a::before {
  content: "▸ ";
}

.widget ul .menu-item-has-children.is-open > a::before,
.widget ul .menu-item-has-children.current-menu-ancestor > a::before,
.widget ul .menu-item-has-children.current-menu-parent > a::before {
  content: "▾ ";
}

.widget .current-menu-item > a,
.widget .current-menu-ancestor > a,
.widget .current-cat > a,
.widget a.is-current {
  font-weight: bold;
  text-decoration: none;
  background: var(--gk-year-bg);
}

.widget .sub-menu .current-menu-item > a {
  background: var(--gk-year-bg);
}

.widget_tag_cloud .tag-link-count,
.widget_tag_cloud a .count,
.widget_tag_cloud .tagcloud a .screen-reader-text {
  display: none !important;
}

.widget_tag_cloud,
.widget_tag_cloud .tagcloud {
  background: #fff;
  padding: 6px 10px 8px;
  line-height: 1.6;
}

.widget_tag_cloud .widget-title {
  font-weight: normal;
  color: #777;
  font-size: 12px;
}

.widget_tag_cloud a {
  margin-right: 6px;
  font-size: 11px !important;
  color: #5f7d58 !important;
  text-decoration: none;
}

.widget_tag_cloud .tag-link-count {
  display: none;
}

.navigation.pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
}

.navigation.pagination .page-numbers {
  color: var(--gk-link);
  text-decoration: none;
  font-weight: bold;
}

.navigation.pagination .page-numbers.current {
  color: #444;
}

.widget_media_image,
.widget_custom_html .textwidget,
.bild-des-monats {
  background: #fff;
  text-align: center;
  padding: 8px;
}

.bild-des-monats img {
  width: 100%;
  height: auto;
  display: block;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 2px 2px;
  align-items: center;
}

.social-links a {
  display: inline-flex;
  line-height: 0;
  border-radius: 6px;
  overflow: hidden;
}

.social-links img,
.social-links svg {
  width: 32px;
  height: 32px;
  display: block;
}

.site-footer {
  clear: both;
  margin-top: 8px;
  padding: 12px 2px 16px;
  border-top: 2px solid #ccc;
  color: #444;
  font-size: 12px;
}

.site-footer a {
  color: #444;
}

.page-title,
.archive-title {
  margin: 0 0 22px;
  font-size: 1.9em;
  font-weight: normal;
  color: var(--gk-link);
}

.comment-respond,
.comments-area {
  margin-top: 28px;
}

@media (max-width: 800px) {
  body {
    font-size: 16px;
    line-height: 1.7;
    -webkit-text-size-adjust: 100%;
  }

  .gk-topbar-inner {
    padding: 8px 10px;
  }

  .gk-topbar-phone {
    font-size: 15px;
  }

  .gk-mobile-bar {
    display: block;
  }

  .gk-mobile-nav:not([hidden]) {
    display: block;
  }

  body.gk-nav-open .gk-mobile-nav {
    display: block;
  }

  .site {
    padding: 8px 6px 18px;
  }

  .site-card {
    padding: 12px 12px 6px;
    border-width: 3px;
  }

  .site-columns {
    display: block;
    margin-top: 16px;
    gap: 0;
  }

  .site-sidebar {
    width: auto;
    margin-top: 18px;
  }

  .gk-mobile-nav .menu a {
    display: block;
    padding: 10px 12px;
    font-size: 16px;
    color: var(--gk-link);
    text-decoration: underline;
  }

  .gk-mobile-nav .menu-item-has-children > a {
    font-weight: bold;
    text-decoration: none;
  }

  .gk-mobile-nav .sub-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0 0 6px;
    background: #fafafa;
  }

  .gk-mobile-nav .menu-item-has-children.is-open > .sub-menu,
  .gk-mobile-nav .menu-item-has-children.current-menu-ancestor > .sub-menu {
    display: block;
  }

  .gk-mobile-nav .sub-menu a {
    padding-left: 22px;
    font-size: 15px;
  }

  .site-aktuell {
    font-size: 1em;
    padding: 10px 0 6px;
  }

  .post-date {
    float: none;
    display: inline-block;
    margin: 0 12px 8px 0;
    vertical-align: top;
  }

  .post-meta {
    display: inline-block;
    padding-top: 10px;
  }

  .post-title {
    clear: both;
    font-size: 1.35em;
    line-height: 1.3;
    margin: 4px 0 14px;
  }

  .entry p {
    margin: 0 0 16px;
  }

  .entry img,
  .entry .wp-block-image,
  .entry figure {
    margin: 6px 0 20px;
  }

  .widget ul a {
    padding: 7px 10px;
    font-size: 15px;
    line-height: 1.4;
  }

  .gk-form input[type=text],
  .gk-form input[type=email],
  .gk-form textarea,
  .gk-form button {
    font-size: 16px;
  }

  .gk-form button {
    padding: 10px 18px;
  }

  .page-title,
  .archive-title {
    font-size: 1.55em;
  }
}

/* Bild des Monats Archiv */
.gk-polaroid-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 1.25rem;
	margin: 1.5rem 0 2rem;
}
.gk-polaroid {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	text-decoration: none;
	color: inherit;
	background: #fff;
	padding: 0.65rem 0.65rem 0.85rem;
	box-shadow: 0 1px 4px rgba(0,0,0,.08);
	transition: transform .2s ease, box-shadow .2s ease;
}
.gk-polaroid:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,.12);
}
.gk-polaroid img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
}
.gk-polaroid span {
	font-size: 0.8rem;
	line-height: 1.3;
	text-align: center;
}
