/* ==========================================================================
   HSG XeNTiS Lipizzanerheimat – Theme-Stylesheet
   Primärfarbe: #00bfe8
   ========================================================================== */

:root {
  --hsg-primary:        #00bfe8;
  --hsg-primary-dark:   #009cbe;
  --hsg-primary-darker: #007a95;
  --hsg-primary-soft:   #e6f9fd;

  --hsg-ink:            #0c1c26;
  --hsg-ink-soft:       #13303f;
  --hsg-ink-line:       #1e4356;

  --hsg-text:           #1c2b33;
  --hsg-text-muted:     #5d707b;
  --hsg-border:         #dfe6ea;
  --hsg-surface:        #ffffff;
  --hsg-surface-alt:    #f4f8fa;

  --hsg-radius:         4px;
  --hsg-radius-lg:      8px;
  --hsg-shadow:         0 2px 8px rgba(12, 28, 38, .08);
  --hsg-shadow-lg:      0 12px 32px rgba(12, 28, 38, .16);

  --hsg-wrap:           1240px;
  --hsg-wrap-narrow:    820px;
  --hsg-header-h:       92px;
  --hsg-header-h-small: 64px;

  --hsg-font:           "Barlow", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --hsg-font-head:      "Barlow Condensed", "Barlow", Impact, sans-serif;
}

/* --------------------------------------------------------------------------
   Reset / Basis
   -------------------------------------------------------------------------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--hsg-font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--hsg-text);
  background: var(--hsg-surface);
  -webkit-font-smoothing: antialiased;

  /* Hält den Fußbereich auch bei kurzen Seiten am unteren Rand. */
  display: flex;
  flex-direction: column;
  min-height: 100vh;

  /* Das mobile Menü liegt geschlossen rechts außerhalb des Viewports.
     `clip` unterbindet das dadurch entstehende Querscrollen, ohne –
     anders als `hidden` – die klebende Kopfzeile auszuhebeln. */
  overflow-x: clip;
}

.hsg-main { flex: 1 0 auto; }

@supports not (overflow-x: clip) {
  .hsg-header__nav { right: 0; }
  body { overflow-x: hidden; }
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--hsg-primary-dark); text-decoration: none; }
a:hover, a:focus { color: var(--hsg-primary-darker); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--hsg-font-head);
  font-weight: 700;
  line-height: 1.1;
  color: var(--hsg-ink);
  margin: 0 0 .5em;
  letter-spacing: .01em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); text-transform: uppercase; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); text-transform: uppercase; }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
h4 { font-size: 1.2rem; }

p  { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: .35em; }

hr { border: 0; border-top: 1px solid var(--hsg-border); margin: 2.5rem 0; }

blockquote {
  margin: 1.8rem 0;
  padding: .4rem 0 .4rem 1.4rem;
  border-left: 4px solid var(--hsg-primary);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--hsg-ink-soft);
}

table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
th, td { padding: .7rem .9rem; border-bottom: 1px solid var(--hsg-border); text-align: left; }
th { background: var(--hsg-surface-alt); font-family: var(--hsg-font-head); text-transform: uppercase; letter-spacing: .04em; }

:focus-visible { outline: 3px solid var(--hsg-primary); outline-offset: 2px; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--hsg-primary); color: #fff;
  padding: .8rem 1.4rem; font-weight: 700;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* --------------------------------------------------------------------------
   Layout-Helfer
   -------------------------------------------------------------------------- */

.hsg-wrap { width: min(100% - 2.5rem, var(--hsg-wrap)); margin-inline: auto; }
.hsg-wrap--narrow { width: min(100% - 2.5rem, var(--hsg-wrap-narrow)); margin-inline: auto; }

.hsg-section { padding: clamp(3rem, 6vw, 5.5rem) 0; }
.hsg-section--tight { padding: clamp(2rem, 4vw, 3.5rem) 0; }
.hsg-section--alt { background: var(--hsg-surface-alt); }
.hsg-section--ink { background: var(--hsg-ink); color: #cfe4ee; }
.hsg-section--ink h2, .hsg-section--ink h3 { color: #fff; }

.hsg-section__head { margin-bottom: clamp(1.8rem, 3vw, 2.8rem); }
.hsg-section__head--center { text-align: center; }

.hsg-kicker {
  display: inline-block;
  font-family: var(--hsg-font-head);
  font-size: .95rem; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--hsg-primary-dark);
  margin-bottom: .5rem;
}
.hsg-section--ink .hsg-kicker { color: var(--hsg-primary); }

.hsg-section__title { margin: 0; }
.hsg-section__title::after {
  content: ""; display: block;
  width: 64px; height: 5px; margin-top: .7rem;
  background: var(--hsg-primary);
}
.hsg-section__head--center .hsg-section__title::after { margin-inline: auto; }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.hsg-btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .8rem 1.7rem;
  font-family: var(--hsg-font-head);
  font-size: 1.05rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  background: var(--hsg-primary); color: #04222c;
  border: 2px solid var(--hsg-primary); border-radius: var(--hsg-radius);
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.hsg-btn:hover, .hsg-btn:focus {
  background: var(--hsg-primary-dark); border-color: var(--hsg-primary-dark);
  color: #fff; text-decoration: none; transform: translateY(-1px);
}

.hsg-btn--ghost { background: transparent; color: var(--hsg-primary); }
.hsg-btn--ghost:hover, .hsg-btn--ghost:focus { background: var(--hsg-primary); color: #04222c; border-color: var(--hsg-primary); }

.hsg-btn--light { background: #fff; border-color: #fff; color: var(--hsg-ink); }
.hsg-btn--light:hover, .hsg-btn--light:focus { background: var(--hsg-ink); border-color: var(--hsg-ink); color: #fff; }

.hsg-btn--sm { padding: .5rem 1.1rem; font-size: .92rem; }

.hsg-link-arrow {
  font-family: var(--hsg-font-head); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
  color: var(--hsg-primary-dark);
}
.hsg-link-arrow::after { content: " →"; }

/* --------------------------------------------------------------------------
   Kopfbereich
   -------------------------------------------------------------------------- */

.hsg-topbar {
  background: var(--hsg-ink);
  color: #a9c6d4;
  font-size: .85rem;
}
.hsg-topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 38px;
}
.hsg-topbar__claim {
  font-family: var(--hsg-font-head); font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--hsg-primary);
}
.hsg-topbar__links { display: flex; align-items: center; gap: 1.2rem; }
.hsg-topbar__links a { color: #a9c6d4; }
.hsg-topbar__links a:hover { color: #fff; text-decoration: none; }

.hsg-header {
  position: sticky; top: 0; z-index: 200;
  background: #fff;
  border-bottom: 3px solid var(--hsg-primary);
  box-shadow: var(--hsg-shadow);
}
.hsg-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: var(--hsg-header-h);
  transition: min-height .2s ease;
}
.hsg-header.is-compact .hsg-header__inner { min-height: var(--hsg-header-h-small); }

.hsg-brand { display: flex; align-items: center; gap: .8rem; flex: 0 0 auto; }
.hsg-brand img, .hsg-brand .custom-logo {
  height: 58px; width: auto; max-width: 190px;
  object-fit: contain;
  transition: height .2s ease;
}
.hsg-header.is-compact .hsg-brand img { height: 42px; }
.hsg-brand__text {
  font-family: var(--hsg-font-head); font-weight: 700; line-height: 1.05;
  text-transform: uppercase; color: var(--hsg-ink);
}
.hsg-brand__text small { display: block; font-size: .68em; color: var(--hsg-primary-dark); letter-spacing: .1em; }
.hsg-brand:hover { text-decoration: none; }

.hsg-header__nav { margin-left: auto; }
.hsg-header__actions { display: flex; align-items: center; gap: .6rem; flex: 0 0 auto; }

/* Hauptnavigation */
.hsg-menu, .hsg-menu ul { list-style: none; margin: 0; padding: 0; }
.hsg-menu { display: flex; align-items: center; gap: .2rem; }
.hsg-menu li { margin: 0; position: relative; }

.hsg-menu > li > a {
  display: block;
  padding: .8rem .78rem;
  font-family: var(--hsg-font-head);
  font-size: 1.02rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--hsg-ink);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.hsg-menu > li > a:hover,
.hsg-menu > li > a:focus,
.hsg-menu > li.current-menu-item > a,
.hsg-menu > li.current-menu-ancestor > a,
.hsg-menu > li.current_page_item > a {
  color: var(--hsg-primary-dark);
  border-bottom-color: var(--hsg-primary);
  text-decoration: none;
}

/* Untermenüs */
.hsg-menu .sub-menu {
  position: absolute; top: 100%; left: 0; z-index: 220;
  min-width: 260px;
  background: #fff;
  border-top: 3px solid var(--hsg-primary);
  box-shadow: var(--hsg-shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.hsg-menu li:hover > .sub-menu,
.hsg-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }

.hsg-menu .sub-menu a {
  display: block; padding: .7rem 1.1rem;
  font-size: .95rem; font-weight: 600;
  color: var(--hsg-text);
  border-bottom: 1px solid var(--hsg-border);
}
.hsg-menu .sub-menu li:last-child > a { border-bottom: 0; }
.hsg-menu .sub-menu a:hover, .hsg-menu .sub-menu a:focus {
  background: var(--hsg-primary-soft); color: var(--hsg-primary-darker); text-decoration: none;
}
.hsg-menu .sub-menu .sub-menu { top: 0; left: 100%; }

/* Der Umschalter wird nur in der mobilen Ansicht gebraucht –
   am Desktop öffnen die Untermenüs per Hover bzw. Tastaturfokus. */
.hsg-submenu-toggle { display: none; }

.hsg-menu .menu-item-has-children > a::after {
  content: "▾"; font-size: .8em; margin-left: .35em; opacity: .7;
}
.hsg-menu .sub-menu .menu-item-has-children > a::after { content: "▸"; float: right; }

/* Mobile Umschalter */
.hsg-burger {
  display: none;
  width: 46px; height: 46px;
  padding: 0; margin-left: auto;
  background: var(--hsg-primary); border: 0; border-radius: var(--hsg-radius);
  cursor: pointer;
}
.hsg-burger span, .hsg-burger span::before, .hsg-burger span::after {
  display: block; width: 22px; height: 2.5px;
  background: #04222c; margin-inline: auto;
  transition: transform .2s ease, opacity .2s ease;
}
.hsg-burger span { position: relative; }
.hsg-burger span::before, .hsg-burger span::after { content: ""; position: absolute; left: 0; }
.hsg-burger span::before { top: -7px; }
.hsg-burger span::after  { top: 7px; }
.hsg-burger[aria-expanded="true"] span { background: transparent; }
.hsg-burger[aria-expanded="true"] span::before { transform: translateY(7px) rotate(45deg); }
.hsg-burger[aria-expanded="true"] span::after  { transform: translateY(-7px) rotate(-45deg); }

/* --------------------------------------------------------------------------
   Hero-Slider
   -------------------------------------------------------------------------- */

.hsg-hero { position: relative; background: var(--hsg-ink); overflow: hidden; }

.hsg-hero__track { position: relative; }

.hsg-hero__slide {
  position: absolute; inset: 0;
  opacity: 0; visibility: hidden;
  transition: opacity .6s ease, visibility .6s;
}
.hsg-hero__slide.is-active { position: relative; opacity: 1; visibility: visible; }

.hsg-hero__media {
  position: relative;
  aspect-ratio: 21 / 9;
  min-height: 340px;
  /* Trägt den Slider auch dann, wenn ein Beitrag kein Bild hat. */
  background: linear-gradient(135deg, var(--hsg-ink-soft) 0%, var(--hsg-ink) 55%, var(--hsg-primary-darker) 100%);
}
.hsg-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hsg-hero__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,18,25,.92) 0%, rgba(6,18,25,.55) 42%, rgba(6,18,25,.12) 75%);
}

.hsg-hero__body {
  position: absolute; inset-inline: 0; bottom: 0; z-index: 2;
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.hsg-hero__meta {
  display: inline-flex; align-items: center; gap: .8rem;
  margin-bottom: .8rem;
}
.hsg-hero__badge {
  background: var(--hsg-primary); color: #04222c;
  font-family: var(--hsg-font-head); font-weight: 700;
  font-size: .85rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .3rem .8rem;
}
.hsg-hero__date { color: #bcd8e4; font-size: .9rem; letter-spacing: .06em; }

.hsg-hero__title {
  max-width: 22ch;
  margin: 0 0 .8rem;
  color: #fff;
  font-size: clamp(1.9rem, 4.6vw, 3.9rem);
  text-transform: uppercase;
  text-shadow: 0 2px 18px rgba(0,0,0,.45);
}
.hsg-hero__title a { color: inherit; }
.hsg-hero__title a:hover { color: var(--hsg-primary); text-decoration: none; }

.hsg-hero__excerpt {
  max-width: 62ch; margin: 0 0 1.4rem;
  color: #d7e9f1; font-size: 1.05rem;
}

.hsg-hero__nav {
  position: absolute; right: 0; bottom: 0; z-index: 3;
  display: flex; gap: .4rem;
  padding: 0 max(1.25rem, calc((100vw - var(--hsg-wrap)) / 2)) clamp(2.5rem, 6vw, 4.5rem) 0;
}
.hsg-hero__dot {
  width: 40px; height: 5px; padding: 0;
  background: rgba(255,255,255,.35); border: 0; cursor: pointer;
  transition: background .2s ease;
}
.hsg-hero__dot.is-active, .hsg-hero__dot:hover { background: var(--hsg-primary); }

.hsg-hero__arrow {
  position: absolute; top: 50%; z-index: 3;
  transform: translateY(-50%);
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: rgba(6,18,25,.45); color: #fff;
  border: 0; cursor: pointer; font-size: 1.4rem; line-height: 1;
  transition: background .2s ease;
}
.hsg-hero__arrow:hover { background: var(--hsg-primary); color: #04222c; }
.hsg-hero__arrow--prev { left: .8rem; }
.hsg-hero__arrow--next { right: .8rem; }

/* --------------------------------------------------------------------------
   Quicklinks
   -------------------------------------------------------------------------- */

.hsg-quicklinks { background: var(--hsg-primary); }
.hsg-quicklinks__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.hsg-quicklink {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .5rem; padding: 1.9rem 1rem;
  color: #04222c; text-align: center;
  border-right: 1px solid rgba(4,34,44,.16);
  transition: background .18s ease, color .18s ease;
}
.hsg-quicklink:last-child { border-right: 0; }
.hsg-quicklink:hover, .hsg-quicklink:focus { background: var(--hsg-ink); color: #fff; text-decoration: none; }
.hsg-quicklink__icon { font-size: 1.9rem; line-height: 1; }
.hsg-quicklink__label {
  font-family: var(--hsg-font-head); font-weight: 700;
  font-size: 1.12rem; letter-spacing: .09em; text-transform: uppercase;
}
.hsg-quicklink__sub { font-size: .82rem; opacity: .8; }

/* --------------------------------------------------------------------------
   News
   -------------------------------------------------------------------------- */

.hsg-news-grid {
  display: grid; gap: 1.8rem;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}

.hsg-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--hsg-border);
  border-radius: var(--hsg-radius-lg);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.hsg-card:hover { transform: translateY(-4px); box-shadow: var(--hsg-shadow-lg); border-color: var(--hsg-primary); }

.hsg-card__media { position: relative; aspect-ratio: 16 / 10; background: var(--hsg-surface-alt); overflow: hidden; }
.hsg-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.hsg-card:hover .hsg-card__media img { transform: scale(1.04); }
.hsg-card__media--empty {
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--hsg-primary) 0%, var(--hsg-primary-darker) 100%);
}
.hsg-card__media--empty span {
  font-family: var(--hsg-font-head); font-size: 2rem;
  letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.75);
}

.hsg-card__date {
  position: absolute; left: 0; bottom: 0;
  background: var(--hsg-primary); color: #04222c;
  font-family: var(--hsg-font-head); font-weight: 700;
  font-size: .85rem; letter-spacing: .08em;
  padding: .3rem .8rem;
}

.hsg-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.3rem 1.4rem 1.5rem; }
.hsg-card__title { font-size: 1.28rem; margin-bottom: .55rem; }
.hsg-card__title a { color: var(--hsg-ink); }
.hsg-card__title a:hover { color: var(--hsg-primary-dark); text-decoration: none; }
.hsg-card__excerpt { color: var(--hsg-text-muted); font-size: .97rem; margin-bottom: 1.1rem; }
.hsg-card__more { margin-top: auto; }

/* Beitragsansicht */
.hsg-page-hero {
  position: relative;
  background: var(--hsg-ink);
  color: #fff;
  padding: clamp(2.6rem, 6vw, 4.5rem) 0;
  border-bottom: 4px solid var(--hsg-primary);
}
.hsg-page-hero--image { padding: clamp(4rem, 10vw, 7.5rem) 0 clamp(2.2rem, 5vw, 3.5rem); }
.hsg-page-hero__bg { position: absolute; inset: 0; overflow: hidden; }
.hsg-page-hero__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .42; }
.hsg-page-hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(6,18,25,.94), rgba(6,18,25,.55));
}
.hsg-page-hero > .hsg-wrap { position: relative; z-index: 2; }
.hsg-page-hero__title { color: #fff; margin: 0; }
.hsg-page-hero__meta { color: #a9c6d4; font-size: .95rem; letter-spacing: .06em; margin-top: .6rem; }

.hsg-breadcrumb { font-size: .85rem; color: #8fb4c6; margin-bottom: .7rem; letter-spacing: .05em; }
.hsg-breadcrumb a { color: var(--hsg-primary); }
.hsg-breadcrumb span + span::before { content: " / "; color: #4d7b91; }

.hsg-entry { font-size: 1.06rem; }
.hsg-entry > *:first-child { margin-top: 0; }
.hsg-entry h2 { margin-top: 2.2rem; }
.hsg-entry h3 { margin-top: 1.8rem; }
.hsg-entry img { border-radius: var(--hsg-radius-lg); margin-block: 1.6rem; }
.hsg-entry figure { margin: 1.8rem 0; }
.hsg-entry figcaption { font-size: .87rem; color: var(--hsg-text-muted); text-align: center; margin-top: .5rem; }
.hsg-entry .alignleft  { float: left;  margin: .4rem 1.6rem 1rem 0; }
.hsg-entry .alignright { float: right; margin: .4rem 0 1rem 1.6rem; }
.hsg-entry .aligncenter { margin-inline: auto; }
.hsg-entry .wp-caption { max-width: 100%; }

.hsg-entry-footer {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center;
  margin-top: 2.5rem; padding-top: 1.5rem;
  border-top: 1px solid var(--hsg-border);
}

.hsg-postnav { display: flex; gap: 1rem; justify-content: space-between; margin-top: 2rem; }
.hsg-postnav a { font-family: var(--hsg-font-head); text-transform: uppercase; letter-spacing: .05em; font-weight: 700; }

/* Pagination */
.hsg-pagination { margin-top: 2.5rem; }
.hsg-pagination .page-numbers {
  display: inline-grid; place-items: center;
  min-width: 42px; height: 42px; padding: 0 .6rem; margin: 0 .2rem;
  font-family: var(--hsg-font-head); font-weight: 700;
  border: 1px solid var(--hsg-border); border-radius: var(--hsg-radius);
  color: var(--hsg-ink);
}
.hsg-pagination .page-numbers:hover { border-color: var(--hsg-primary); color: var(--hsg-primary-dark); text-decoration: none; }
.hsg-pagination .page-numbers.current { background: var(--hsg-primary); border-color: var(--hsg-primary); color: #04222c; }

/* --------------------------------------------------------------------------
   Call-to-Action-Band
   -------------------------------------------------------------------------- */

.hsg-cta {
  position: relative;
  background: var(--hsg-ink);
  color: #d7e9f1;
  padding: clamp(3rem, 6vw, 5rem) 0;
  overflow: hidden;
}
.hsg-cta__bg { position: absolute; inset: 0; }
.hsg-cta__bg img { width: 100%; height: 100%; object-fit: cover; opacity: .28; }
.hsg-cta__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(6,18,25,.95) 30%, rgba(0,191,232,.35) 100%);
}
.hsg-cta > .hsg-wrap { position: relative; z-index: 2; }
.hsg-cta__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2rem;
}
.hsg-cta__title { color: #fff; margin-bottom: .4rem; }
.hsg-cta__text { max-width: 58ch; margin: 0; }
.hsg-cta__actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* --------------------------------------------------------------------------
   Partner
   -------------------------------------------------------------------------- */

.hsg-partner-group { margin-bottom: 3rem; }
.hsg-partner-group__title {
  display: flex; align-items: center; gap: 1rem;
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  text-transform: uppercase; margin-bottom: 1.6rem;
}
.hsg-partner-group__title::after {
  content: ""; flex: 1; height: 2px; background: var(--hsg-border);
}

.hsg-partner-grid { display: grid; gap: 1rem; }
.hsg-partner-grid--1 { grid-template-columns: minmax(0, 460px); justify-content: center; }
.hsg-partner-grid--2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.hsg-partner-grid--3 { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.hsg-partner-grid--4 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

.hsg-partner {
  display: grid; place-items: center;
  padding: 1.1rem;
  aspect-ratio: 2 / 1;
  background: #fff;
  border: 1px solid var(--hsg-border);
  border-radius: var(--hsg-radius);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.hsg-partner:hover { border-color: var(--hsg-primary); box-shadow: var(--hsg-shadow); transform: translateY(-2px); }
.hsg-partner img { max-height: 100%; width: auto; object-fit: contain; }

/* Partnerband auf der Startseite */
.hsg-partner-strip { background: #fff; }
.hsg-partner-strip .hsg-partner { border-color: transparent; }
.hsg-partner-strip .hsg-partner img { filter: grayscale(1); opacity: .62; transition: filter .25s ease, opacity .25s ease; }
.hsg-partner-strip .hsg-partner:hover img { filter: grayscale(0); opacity: 1; }

/* --------------------------------------------------------------------------
   Kader / Spieler
   -------------------------------------------------------------------------- */

.hsg-squad { display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.hsg-player {
  position: relative;
  background: var(--hsg-ink);
  border-radius: var(--hsg-radius-lg);
  overflow: hidden;
}
.hsg-player__media { aspect-ratio: 3 / 4; background: linear-gradient(160deg, var(--hsg-ink-soft), var(--hsg-ink)); }
.hsg-player__media img { width: 100%; height: 100%; object-fit: cover; }
.hsg-player__number {
  position: absolute; top: .6rem; right: .9rem;
  font-family: var(--hsg-font-head); font-size: 3rem; font-weight: 700; line-height: 1;
  color: rgba(0,191,232,.85);
}
.hsg-player__body {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 1.6rem 1.1rem .95rem;
  background: linear-gradient(to top, rgba(6,18,25,.96), transparent);
}
.hsg-player__name { color: #fff; font-size: 1.2rem; margin: 0; text-transform: uppercase; }
.hsg-player__position { color: var(--hsg-primary); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Termine / Spielplan
   -------------------------------------------------------------------------- */

.hsg-fixtures { display: grid; gap: .7rem; }

.hsg-fixture {
  display: grid;
  grid-template-columns: 118px 1fr auto;
  align-items: center; gap: 1.2rem;
  padding: 1rem 1.3rem;
  background: #fff;
  border: 1px solid var(--hsg-border);
  border-left: 5px solid var(--hsg-primary);
  border-radius: var(--hsg-radius);
}
.hsg-fixture--home { border-left-color: var(--hsg-primary); }
.hsg-fixture--away { border-left-color: var(--hsg-ink-line); }

.hsg-fixture__date { font-family: var(--hsg-font-head); font-weight: 700; line-height: 1.15; }
.hsg-fixture__date strong { display: block; font-size: 1.35rem; color: var(--hsg-ink); }
.hsg-fixture__date span { font-size: .85rem; color: var(--hsg-text-muted); }
.hsg-fixture__teams { font-family: var(--hsg-font-head); font-size: 1.15rem; text-transform: uppercase; }
.hsg-fixture__venue { font-size: .85rem; color: var(--hsg-text-muted); text-transform: none; font-family: var(--hsg-font); }
.hsg-fixture__result {
  font-family: var(--hsg-font-head); font-size: 1.5rem; font-weight: 700;
  color: var(--hsg-ink); white-space: nowrap;
}
.hsg-fixture__tag {
  display: inline-block; padding: .18rem .55rem; margin-left: .5rem;
  font-size: .72rem; letter-spacing: .1em; text-transform: uppercase;
  background: var(--hsg-primary-soft); color: var(--hsg-primary-darker);
  border-radius: 2px;
}

/* Eingebettete Tabellen/Spielpläne (HLA-Widget) */
.hsg-embed {
  position: relative;
  border: 1px solid var(--hsg-border);
  border-radius: var(--hsg-radius-lg);
  overflow: hidden;
  background: #fff;
}
.hsg-embed iframe { display: block; width: 100%; border: 0; min-height: 720px; }

/* --------------------------------------------------------------------------
   Kontakt
   -------------------------------------------------------------------------- */

.hsg-contact-grid {
  display: grid; gap: 1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.hsg-contact-card {
  padding: 1.6rem;
  background: #fff;
  border: 1px solid var(--hsg-border);
  border-top: 4px solid var(--hsg-primary);
  border-radius: var(--hsg-radius);
}
.hsg-contact-card h3 { font-size: 1.2rem; margin-bottom: .7rem; }
.hsg-contact-card p { margin-bottom: .3rem; }
.hsg-contact-card__role { color: var(--hsg-text-muted); font-size: .88rem; letter-spacing: .06em; text-transform: uppercase; }

/* --------------------------------------------------------------------------
   Fußbereich
   -------------------------------------------------------------------------- */

.hsg-sponsorbar { background: #fff; border-top: 1px solid var(--hsg-border); padding: 1.6rem 0; }
.hsg-sponsorbar__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.hsg-sponsorbar img { max-height: 52px; width: auto; }

.hsg-hashtag {
  background: var(--hsg-primary);
  padding: 1.6rem 0;
  text-align: center;
}
.hsg-hashtag span {
  font-family: var(--hsg-font-head); font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2.6rem);
  letter-spacing: .04em; text-transform: uppercase;
  color: #04222c;
}

.hsg-footer { background: var(--hsg-ink); color: #a9c6d4; padding: clamp(2.6rem, 5vw, 4rem) 0 0; }
.hsg-footer a { color: #cfe4ee; }
.hsg-footer a:hover { color: var(--hsg-primary); text-decoration: none; }

.hsg-footer__grid {
  display: grid; gap: 2.2rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  padding-bottom: 2.5rem;
}
.hsg-footer__title {
  font-family: var(--hsg-font-head); font-size: 1.1rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: #fff; margin-bottom: 1rem;
}
.hsg-footer__logo { max-width: 190px; margin-bottom: 1rem; }
.hsg-footer ul { list-style: none; margin: 0; padding: 0; }
.hsg-footer li { margin-bottom: .5rem; }

.hsg-social { display: flex; gap: .6rem; margin-top: 1rem; }
.hsg-social a {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  background: var(--hsg-ink-soft); border-radius: 50%;
  color: #cfe4ee;
}
.hsg-social a:hover { background: var(--hsg-primary); color: #04222c; }
.hsg-social svg { width: 19px; height: 19px; fill: currentColor; }

.hsg-footer__bottom {
  border-top: 1px solid var(--hsg-ink-line);
  padding: 1.2rem 0;
  display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between;
  font-size: .85rem;
}
.hsg-footer__bottom ul { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.hsg-footer__bottom li { margin: 0; }

/* --------------------------------------------------------------------------
   Sidebar / Widgets
   -------------------------------------------------------------------------- */

.hsg-layout { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
.hsg-layout--sidebar { grid-template-columns: minmax(0, 1fr) 320px; }

.hsg-widget {
  padding: 1.4rem;
  background: var(--hsg-surface-alt);
  border-radius: var(--hsg-radius-lg);
  margin-bottom: 1.5rem;
}
.hsg-widget__title {
  font-size: 1.1rem; letter-spacing: .08em; text-transform: uppercase;
  padding-bottom: .6rem; margin-bottom: .9rem;
  border-bottom: 3px solid var(--hsg-primary);
}
.hsg-widget ul { list-style: none; margin: 0; padding: 0; }
.hsg-widget li { margin-bottom: .55rem; padding-bottom: .55rem; border-bottom: 1px solid var(--hsg-border); }
.hsg-widget li:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }

/* --------------------------------------------------------------------------
   Formulare
   -------------------------------------------------------------------------- */

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="search"], input[type="url"], input[type="number"], select, textarea {
  width: 100%;
  padding: .7rem .9rem;
  font: inherit; color: var(--hsg-text);
  background: #fff;
  border: 1px solid var(--hsg-border);
  border-radius: var(--hsg-radius);
}
input:focus, select:focus, textarea:focus { border-color: var(--hsg-primary); outline: none; box-shadow: 0 0 0 3px rgba(0,191,232,.18); }
label { display: block; font-weight: 600; margin-bottom: .35rem; }
.hsg-field { margin-bottom: 1.1rem; }
.hsg-field--inline { display: flex; align-items: flex-start; gap: .6rem; }
.hsg-field--inline input { width: auto; margin-top: .35rem; }
.hsg-field--inline label { font-weight: 400; }
.hsg-form-grid { display: grid; gap: 0 1.2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.hsg-honeypot { position: absolute; left: -9999px; }

.hsg-notice { padding: 1rem 1.2rem; border-radius: var(--hsg-radius); margin-bottom: 1.5rem; }
.hsg-notice--ok    { background: #e7f7ec; border-left: 4px solid #2e9e5b; color: #1d6339; }
.hsg-notice--error { background: #fdeaea; border-left: 4px solid #d24545; color: #8f2626; }

/* --------------------------------------------------------------------------
   Gutenberg-Ausrichtungen
   -------------------------------------------------------------------------- */

.hsg-entry .alignwide {
  width: min(100vw - 2.5rem, 1240px);
  margin-inline: calc(50% - min(50vw - 1.25rem, 620px));
  max-width: none;
}
.hsg-entry .alignfull {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
  max-width: none;
}

.has-hsg-primary-color { color: var(--hsg-primary) !important; }
.has-hsg-primary-background-color { background-color: var(--hsg-primary) !important; }
.has-hsg-ink-color { color: var(--hsg-ink) !important; }
.has-hsg-ink-background-color { background-color: var(--hsg-ink) !important; }

/* --------------------------------------------------------------------------
   Responsiv
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .hsg-layout--sidebar { grid-template-columns: minmax(0, 1fr); }
  .hsg-menu > li > a { padding: .8rem .55rem; font-size: .95rem; }
}

@media (max-width: 980px) {
  .hsg-burger { display: block; }
  .hsg-header__actions .hsg-btn { display: none; }

  .hsg-header__nav {
    position: fixed; inset: calc(var(--hsg-header-h-small) + 38px) 0 0 auto;
    width: min(88vw, 380px);
    background: var(--hsg-ink);
    padding: 1.2rem 0 3rem;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .25s ease;
    box-shadow: var(--hsg-shadow-lg);
  }
  .hsg-header__nav.is-open { transform: translateX(0); }

  .hsg-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .hsg-menu > li > a,
  .hsg-menu .sub-menu a {
    color: #e3f1f7;
    border-bottom: 1px solid var(--hsg-ink-line);
    padding: .95rem 1.4rem;
  }
  .hsg-menu > li > a:hover,
  .hsg-menu > li.current-menu-item > a { background: var(--hsg-ink-soft); color: var(--hsg-primary); border-bottom-color: var(--hsg-ink-line); }

  .hsg-menu .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    min-width: 0; background: rgba(0,0,0,.22); border-top: 0; box-shadow: none;
    display: none;
  }
  .hsg-menu li.is-open > .sub-menu { display: block; }
  .hsg-menu .sub-menu a { padding-left: 2.4rem; font-size: .92rem; }
  .hsg-menu .sub-menu .sub-menu a { padding-left: 3.4rem; }

  .hsg-menu .menu-item-has-children > a { padding-right: 3.6rem; }
  .hsg-menu .menu-item-has-children > a::after { display: none; }

  .hsg-submenu-toggle {
    display: block;
    position: absolute; top: 0; right: 0;
    width: 3.4rem; height: 3.05rem;
    padding: 0;
    background: transparent; border: 0;
    color: #e3f1f7; cursor: pointer;
  }
  .hsg-submenu-toggle::after {
    content: "▾";
    display: block;
    font-size: 1rem; line-height: 1;
    transition: transform .18s ease;
  }
  .hsg-submenu-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
  .hsg-submenu-toggle:hover { color: var(--hsg-primary); }

  .hsg-menu .sub-menu .hsg-submenu-toggle { height: 2.7rem; }

  .hsg-hero__media { aspect-ratio: 4 / 3; }
  .hsg-hero__nav { padding-right: 1.25rem; }
  .hsg-fixture { grid-template-columns: 1fr; gap: .5rem; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hsg-topbar__links { display: none; }
  .hsg-brand__text { display: none; }
  .hsg-hero__media { min-height: 420px; }
  .hsg-hero__arrow { display: none; }
  .hsg-quicklink { padding: 1.3rem .8rem; }
  .hsg-cta__inner { flex-direction: column; align-items: flex-start; }
  .hsg-footer__bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .hsg-header, .hsg-topbar, .hsg-hero__nav, .hsg-quicklinks, .hsg-cta, .hsg-footer, .hsg-burger { display: none !important; }
  body { font-size: 12pt; color: #000; }
}
