/*
Theme Name: KTV Sportverein
Theme URI: https://ktv.b1rchler.ch
Author: Custom Build
Author URI: https://ktv-einsiedeln.ch
Description: Flexible, beginner-friendly WordPress theme for Swiss sports clubs. Multi-site ready with per-page color overrides, custom Gutenberg blocks, and a custom news/events post type. Translation-ready and child-theme friendly.
Version: 2.3.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ktv-sportverein
Tags: sports, club, responsive, custom-colors, block-styles, translation-ready
*/

/* ==========================================================================
   1. CSS CUSTOM PROPERTIES (THEME VARIABLES)
   These defaults are overridden dynamically by the Customizer and per-page
   metabox output (see inc/customizer.php and inc/metaboxes.php).
   ========================================================================== */
:root {
  --color-primary: #01d857;       /* Vereinsgrün */
  --color-primary-dark: #00a843;  /* dunklere Variante für Text/Links auf Weiss */
  --color-secondary: #e30613;
  --color-accent: #ffcc00;

  /* Component-level vars — fall back to the globals above. Per-page
     overrides re-declare these in an inline <style> block in the header.
     Header/Nav use the darker green so weisser Text gut lesbar bleibt. */
  --header-bg: var(--color-primary-dark);
  --nav-bg: var(--color-primary-dark);
  --hero-bg: var(--color-primary);
  --button-bg: var(--color-primary-dark);
  --button-text: #ffffff;

  --color-text: #1a1a1a;
  --color-muted: #6b7280;
  --color-bg: #ffffff;
  --color-surface: #f5f6f8;
  --color-border: #e2e5ea;

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: var(--font-base);

  --container-width: 1200px;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --transition: 0.25s ease;
}

/* ==========================================================================
   2. RESET / BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Sticky footer: push the footer to the bottom even on short pages.
     Use min-height:100dvh (dynamic viewport) so the logged-in admin bar
     doesn't add extra empty space below the footer. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  /* Without these, a wide flex child (slider, Elementor section) can stretch
     the column past the viewport, shifting all content to the right. */
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
/* Direct children must each take the full width and align to the start,
   otherwise flex centers narrower blocks and they look pushed right. */
.site-header,
.site-main,
.site-footer {
  width: 100%;
  align-self: stretch;
}
.site-main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; margin-top: auto; }
/* The WordPress admin bar reduces available height by its own size; account
   for it so the footer doesn't get pushed past the bottom of the screen. */
body.admin-bar { min-height: calc(100dvh - 32px); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary-dark); text-decoration: none; transition: color var(--transition); }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.4rem; }
p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px; height: 1px; overflow: hidden;
}
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 9999;
  background: #fff; padding: .75rem 1rem;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   3. BUTTONS
   ========================================================================== */
.btn,
.wp-block-button__link {
  display: inline-block;
  background: var(--button-bg);
  color: var(--button-text);
  padding: .8rem 1.6rem;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform var(--transition), opacity var(--transition);
}
.btn:hover,
.wp-block-button__link:hover { transform: translateY(-2px); opacity: .92; text-decoration: none; color: var(--button-text); }
.btn--outline {
  background: transparent;
  border: 2px solid var(--button-bg);
  color: var(--button-bg);
}
/* Keep the label visible on hover by filling the button instead of
   inheriting a white text colour that could vanish on a white card. */
.btn--outline:hover {
  background: var(--button-bg);
  color: #fff;
}

/* ==========================================================================
   4. HEADER & NAVIGATION (STICKY)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--header-bg);
  color: #fff;
  box-shadow: var(--shadow);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 72px;
}
.site-logo img { max-height: 52px; width: auto; }
.site-logo .site-title-text { color: #fff; font-weight: 700; font-size: 1.3rem; }
.site-logo a:hover { text-decoration: none; }

/* Primary nav */
.main-navigation { background: var(--nav-bg); }
.main-navigation ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.main-navigation a {
  color: #fff;
  display: block;
  padding: .75rem 1rem;
  font-weight: 500;
  border-radius: 6px;
}
.main-navigation a:hover { background: rgba(255,255,255,.15); text-decoration: none; }
.main-navigation .current-menu-item > a { background: rgba(0,0,0,.18); }

/* Mega / dropdown menu */
.main-navigation li { position: relative; }
.main-navigation ul ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  flex-direction: column;
  gap: 2px;
  /* Slightly darker than the bar so the flyout reads as a separate layer. */
  background: var(--color-primary-dark);
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
  border-radius: 0 0 var(--radius) var(--radius);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  padding: .5rem;
}
.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.main-navigation ul ul a {
  white-space: nowrap;
  padding: .6rem .9rem;
  border-radius: 8px;
  font-weight: 400;
  opacity: .92;
}
.main-navigation ul ul a:hover {
  background: rgba(255,255,255,.18);
  opacity: 1;
}
/* Active sub-item: solid light pill, dark readable text (matches Bild 2 fix). */
.main-navigation ul ul .current-menu-item > a {
  background: rgba(255,255,255,.92);
  color: var(--color-primary-dark);
  font-weight: 600;
}
/* Third level: indent + thin divider so nesting stays legible. */
.main-navigation ul ul ul {
  top: 0;
  left: 100%;
  border-radius: var(--radius);
  margin-left: 2px;
}

/* Mega menu: when a top-level item has class .mega-menu it spans wide */
.main-navigation .mega-menu > ul {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .25rem 2rem;
  min-width: 600px;
  padding: 1rem;
}

/* Hamburger */
.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: .5rem;
  width: 44px; height: 44px;
}
.menu-toggle span {
  display: block;
  width: 26px; height: 3px;
  background: #fff;
  margin: 5px auto;
  transition: transform var(--transition), opacity var(--transition);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 900px) {
  .menu-toggle { display: block; }
  .main-navigation {
    position: fixed;
    inset: 72px 0 auto 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }
  .main-navigation.is-open { max-height: 80vh; overflow-y: auto; }
  .main-navigation ul { flex-direction: column; gap: 0; padding: .5rem; }
  .main-navigation ul ul {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; min-width: 0; padding-left: 1rem;
  }
  .main-navigation .mega-menu > ul { grid-template-columns: 1fr; min-width: 0; }
}

/* ==========================================================================
   5. HERO BLOCK
   ========================================================================== */
.hero {
  position: relative;
  background: var(--hero-bg);
  color: #fff;
  padding: clamp(3rem, 10vw, 7rem) 0;
  text-align: center;
  overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img, .hero__media video { width: 100%; height: 100%; object-fit: cover; }
.hero__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.4); z-index: 1; }
.hero__content { position: relative; z-index: 2; max-width: 760px; margin-inline: auto; }
.hero__title { color: #fff; }
.hero__subtitle { font-size: 1.25rem; opacity: .95; }

/* ==========================================================================
   6. SECTION HELPERS
   ========================================================================== */
.section { padding: clamp(2.5rem, 6vw, 5rem) 0; }
.section--surface { background: var(--color-surface); }
.section__title { text-align: center; margin-bottom: 2.5rem; }

/* ==========================================================================
   7. CARDS (NEWS / TEAM / EVENT)
   ========================================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
}
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__media img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.card__body { padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.card__meta { font-size: .85rem; color: var(--color-muted); display: flex; flex-wrap: wrap; gap: .75rem; }
.card__cat {
  display: inline-block;
  background: var(--color-accent);
  color: #1a1a1a;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .2rem .6rem;
  border-radius: 999px;
}
.card__title { font-size: 1.25rem; margin: 0; }
.card__excerpt { color: var(--color-muted); font-size: .95rem; }
.card__footer { margin-top: auto; padding-top: .75rem; }

/* Team card variant */
.team-card { text-align: center; }
.team-card__photo {
  width: 130px; height: 130px; border-radius: 50%;
  object-fit: cover; margin: 1.25rem auto .75rem;
}
.team-card__role { color: var(--color-muted); font-size: .9rem; }

/* ==========================================================================
   8. SPONSOR ROW
   ========================================================================== */
.sponsor-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}
.sponsor-row img {
  max-height: 70px;
  width: auto;
  filter: grayscale(1);
  opacity: .7;
  transition: filter var(--transition), opacity var(--transition);
}
.sponsor-row img:hover { filter: grayscale(0); opacity: 1; }

/* ==========================================================================
   9. INFO COLUMNS
   ========================================================================== */
.info-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.info-col { text-align: center; padding: 1.5rem; }
.info-col__icon { font-size: 2.5rem; margin-bottom: .75rem; color: var(--color-primary); }

/* ==========================================================================
   10. ARCHIVE FILTER / SORT BAR
   ========================================================================== */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 1rem 1.25rem;
  background: var(--color-surface);
  border-radius: var(--radius);
}
.filter-bar__group { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.filter-chip {
  border: 1px solid var(--color-border);
  background: #fff;
  padding: .4rem .9rem;
  border-radius: 999px;
  font-size: .85rem;
  cursor: pointer;
  text-decoration: none;
  color: var(--color-text);
}
.filter-chip.is-active { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.filter-bar select { padding: .45rem .7rem; border-radius: 6px; border: 1px solid var(--color-border); }

/* ==========================================================================
   11. SINGLE POST
   ========================================================================== */
/* Single post: one centered reading column for header, image and text. */
/* Single post: one centered reading column for header, image and text.
   Uses the body.single context for higher specificity so plugin/Elementor
   rules can't pull it back to the left edge. */
body.single .single-post {
  max-width: 820px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  float: none !important;
  width: auto !important;
}
.single-post__header { margin-bottom: 2rem; }
.single-post__title { margin-top: .5rem; }
.single-post__meta { color: var(--color-muted); font-size: .95rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.single-post__featured { margin: 0 0 2rem; }
.single-post__featured img { border-radius: var(--radius); width: 100%; }
.single-post .entry-content { max-width: none; margin: 0; }
.entry-content { max-width: 760px; margin-inline: auto; }
.entry-content > * { margin-bottom: 1.25rem; }

/* ==========================================================================
   12. GALLERY + LIGHTBOX
   ========================================================================== */
.ktv-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
}
.ktv-gallery__item { cursor: pointer; overflow: hidden; border-radius: var(--radius); }
.ktv-gallery__item img { aspect-ratio: 1; object-fit: cover; transition: transform var(--transition); }
.ktv-gallery__item:hover img { transform: scale(1.06); }
.ktv-gallery__title { margin-bottom: .5rem; }
.ktv-gallery__desc { color: var(--color-muted); margin-bottom: 1.25rem; }

.lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center; justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 6px; }
.lightbox__close, .lightbox__nav {
  position: absolute; background: rgba(255,255,255,.15);
  color: #fff; border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%;
  font-size: 1.5rem; display: grid; place-items: center;
}
.lightbox__close { top: 1.5rem; right: 1.5rem; }
.lightbox__nav--prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 1.5rem; top: 50%; transform: translateY(-50%); }

/* ==========================================================================
   13. FOOTER
   ========================================================================== */
.site-footer {
  background: var(--color-primary-dark);
  color: #fff;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}
.site-footer a { color: #fff; }
.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-bottom: 2rem;
  align-items: flex-start;
  justify-content: space-between;
}
/* Each column takes an equal share and grows evenly across the row.
   Content is centered within each column for a symmetric footer. */
.site-footer__grid > .footer-col {
  flex: 1 1 200px;
  min-width: 180px;
  text-align: center;
}
/* Center the social icon row too (it's a flex row, so center it). */
.site-footer .social-links { justify-content: center; }

/* Footer columns: consistent heading + clean link list (no stray bullets,
   even alignment for every item including the first). Uses !important and
   broad selectors so Gutenberg/Elementor list styles can't reintroduce
   bullets or indentation. */
.site-footer .footer-col h4 {
  margin: 0 0 1rem !important;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.site-footer .footer-col ul,
.site-footer .footer-col ol,
.site-footer .footer-col .menu {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.site-footer .footer-col li {
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.site-footer .footer-col li + li { margin-top: .15rem !important; }
.site-footer .footer-col a {
  display: inline-block;
  padding: .35rem 0;
  line-height: 1.4;
}

.social-links { display: flex; gap: 1.1rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding: 0;
  transition: color var(--transition), transform var(--transition);
}
.social-links a:hover {
  color: var(--color-primary);
  transform: translateY(-2px);
  text-decoration: none;
}
.social-icon { width: 26px; height: 26px; display: block; }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.2);
  padding-top: 1.5rem;
  text-align: center;
  font-size: .9rem;
  opacity: .9;
}

/* ==========================================================================
   14. PAGINATION
   ========================================================================== */
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 3rem; flex-wrap: wrap; }
.pagination .page-numbers {
  padding: .5rem .9rem; border-radius: 6px;
  border: 1px solid var(--color-border); color: var(--color-text);
}
.pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ==========================================================================
   15. UTILITIES
   ========================================================================== */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.is-hidden { display: none !important; }

/* ==========================================================================
   16. KSG-STYLE COMPONENTS (Slider, Tabs, dark footer, events table)
   Added in v1.2 — inspired by the KSG-NW layout, kept in the green palette.
   ========================================================================== */

/* ---- 16a. Hero slider ---- */
.ktv-slider {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.ktv-slider__track {
  display: flex;
  transition: transform .5s ease;
}
.ktv-slider__slide {
  position: relative;
  min-width: 100%;
  aspect-ratio: 21 / 9;
}
.ktv-slider__slide img {
  width: 100%; height: 100%; object-fit: cover;
}
.ktv-slider__caption {
  position: absolute;
  left: 0; bottom: 0; right: 0;
  padding: 2.5rem 2rem 2rem;
  background: linear-gradient(to top, rgba(0,0,0,.7), transparent);
  color: #fff;
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 700;
}
.ktv-slider__dots {
  position: absolute;
  bottom: 1rem; right: 1.5rem;
  display: flex; gap: .4rem;
}
.ktv-slider__dot {
  width: 28px; height: 5px; border-radius: 3px;
  background: rgba(255,255,255,.5);
  border: 0; cursor: pointer; padding: 0;
}
.ktv-slider__dot.is-active { background: #fff; }
.ktv-slider__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,.4); color: #fff; border: 0;
  cursor: pointer; font-size: 1.4rem; display: grid; place-items: center;
}
.ktv-slider__arrow--prev { left: 1rem; }
.ktv-slider__arrow--next { right: 1rem; }
@media (max-width: 600px) {
  .ktv-slider__slide { aspect-ratio: 4 / 3; }
  .ktv-slider__arrow { display: none; }
}

/* ---- 16b. News tabs ---- */
.ktv-tabs__nav {
  display: inline-flex;
  gap: .25rem;
  background: var(--color-surface);
  padding: .35rem;
  border-radius: 999px;
  margin-bottom: 2rem;
}
.ktv-tabs__btn {
  border: 0; background: transparent; cursor: pointer;
  padding: .55rem 1.3rem; border-radius: 999px;
  font-weight: 700; font-size: .8rem; letter-spacing: .03em;
  text-transform: uppercase; color: var(--color-muted);
}
.ktv-tabs__btn.is-active {
  background: var(--color-primary);
  color: #fff;
}
.ktv-tabs__panel { display: none; }
.ktv-tabs__panel.is-active { display: block; }

/* ---- 16c. News card with colored gradient (KSG style) ---- */
.card--gradient {
  border: 0;
  color: #fff;
  background: linear-gradient(150deg, var(--color-primary), var(--color-primary-dark));
  min-height: 320px;
}
.card--gradient .card__title a,
.card--gradient .card__excerpt,
.card--gradient .card__meta { color: #fff; }
.card--gradient .card__cat {
  background: rgba(255,255,255,.2);
  color: #fff;
}
.card--gradient .card__readmore {
  color: #fff; font-weight: 700; text-transform: uppercase;
  font-size: .8rem; letter-spacing: .03em; text-decoration: none;
}
.card--gradient .card__readmore:hover { text-decoration: underline; }

/* ---- 16d. Dark footer variant ---- */
.site-footer--dark {
  background: #161616;
  border-top: 4px solid var(--color-primary);
}
.site-footer--dark a { color: #d6d6d6; }
.site-footer--dark a:hover { color: #fff; }
.site-footer--dark .footer-col h4 {
  text-transform: uppercase; letter-spacing: .05em;
  font-size: .85rem; color: #fff; margin-bottom: 1rem;
}
.site-footer--dark .site-footer__bottom {
  border-top-color: rgba(255,255,255,.12);
  color: #9a9a9a;
}

/* ---- 16e. Events / Termine table ---- */
.ktv-events {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.ktv-events thead th {
  text-align: left;
  background: var(--color-surface);
  padding: 1rem 1.25rem;
  font-size: .75rem; letter-spacing: .05em; text-transform: uppercase;
  color: var(--color-muted);
}
.ktv-events td {
  padding: 1.1rem 1.25rem;
  border-top: 1px solid var(--color-border);
  vertical-align: middle;
}
.ktv-events__date { font-weight: 700; white-space: nowrap; }
.ktv-events__event a { color: var(--color-primary-dark); font-weight: 500; }
.ktv-events__tag {
  display: inline-block;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: .25rem .75rem;
  font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em;
  color: var(--color-primary-dark);
}
.ktv-events__filter {
  display: flex; align-items: center; gap: .75rem;
  background: var(--color-surface);
  padding: 1rem 1.25rem; border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.ktv-events__filter select {
  padding: .5rem .8rem; border-radius: 8px; border: 1px solid var(--color-border);
}
@media (max-width: 680px) {
  .ktv-events thead { display: none; }
  .ktv-events, .ktv-events tbody, .ktv-events tr, .ktv-events td { display: block; width: 100%; }
  .ktv-events tr { border-top: 1px solid var(--color-border); padding: .5rem 0; }
  .ktv-events td { border: 0; padding: .3rem 1.25rem; }
}

/* ---- 16f. Pill navigation (highlighted nav item) ---- */
.main-navigation .nav-pill > a {
  background: var(--color-secondary);
  border-radius: 999px;
  padding-inline: 1.25rem;
}

/* ---- 17. Elementor full-width + footer fixes ---- */
.elementor-fullwidth { width: 100%; }

/* Remove the narrow reading column on Elementor / full-width pages so
   sections and hero images can span the entire page width. */
.entry-content--full {
  max-width: none;
  margin: 0;
  width: 100%;
}
.elementor-fullwidth > .entry-content,
.elementor-fullwidth .elementor { max-width: none; margin: 0; }

/* When Elementor controls a page, let its sections span edge to edge
   and strip the theme's section padding that squeezes the content. */
body.elementor-page .site-main { padding: 0; }
body.elementor-page .entry-content { max-width: none; margin: 0; }

/* Sticky footer applies on ALL pages (including Elementor). The body is a
   flex column with min-height:100vh, .site-main grows to fill, so the footer
   always sits at the bottom even when a page has little content. */

/* ---- 18. KSG-style "Weiterlesen →" link (text + arrow, not a box) ---- */
.card__more {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
}
.card__more:hover { gap: .6rem; text-decoration: none; }

/* ---- 19. Card tags row (category + free tags as pills, KSG style) ---- */
.card__tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .25rem; }
.card__tag {
  display: inline-block;
  background: var(--color-surface);
  color: var(--color-primary-dark);
  border: 1px solid var(--color-border);
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .18rem .55rem;
  border-radius: 999px;
}
