/* Design tokens, reset, typography and the generic page layout */

:root {
  --color-dark-navy: #0B132B;
  --color-navy: #1C2541;
  --color-gold: #eccf47;
  --color-gold-hover: #f5da57;
  /* Gold is too light for text on white; use this darker shade instead */
  --color-gold-text: #8a6a00;
  --color-red: #ce1719;
  --color-red-hover: #a61214;
  --color-white: #FFFFFF;
  --color-text-dark: #2c3e50;
  --color-text-muted: #5f6b7a;
  --color-bg-light: #faf8f5;
  --color-border: rgba(11, 19, 43, 0.08);

  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --shadow-sm: 0 4px 12px rgba(11, 19, 43, 0.05);
  --shadow: 0 12px 32px rgba(11, 19, 43, 0.06);
  --shadow-lg: 0 20px 50px rgba(11, 19, 43, 0.1);

  --nav-height: 84px;
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

/* Keep anchor targets (#vakanzen, #contact_form, ...) clear of the fixed navbar */
[id] {
  scroll-margin-top: calc(var(--nav-height) + 1.5rem);
}

:focus-visible {
  outline: 3px solid var(--color-gold);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--color-gold);
  color: var(--color-dark-navy);
}

/* Subpage template */
.page-content {
  padding: calc(var(--nav-height) + 3rem) 5% 5rem;
  max-width: calc(1200px + 10%);
  margin: 0 auto;
  min-height: calc(100vh - 100px);
}

.page-content h1 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  font-size: clamp(2.1rem, 5vw, 3rem);
  line-height: 1.15;
  margin-bottom: 2.5rem;
  text-wrap: balance;
}

.page-content h1::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  margin-top: 1rem;
  border-radius: 2px;
  background: var(--color-red);
}

/* :where() keeps these at class-level specificity so component styles win */
.page-content :where(h2, h3) {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.25;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.page-content :where(p) {
  color: var(--color-text-dark);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* Rich text content */
.content-body::after {
  content: "";
  display: table;
  clear: both;
}

.content-body > :first-child {
  margin-top: 0;
}

.content-body > p:first-of-type {
  font-size: 1.2rem;
  color: var(--color-navy);
  font-weight: 500;
  line-height: 1.7;
}

.content-body p a,
.content-body li a {
  color: var(--color-red);
  font-weight: 600;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(206, 23, 25, 0.4);
  transition: text-decoration-color 0.2s ease;
}

.content-body p a:hover,
.content-body li a:hover {
  text-decoration-color: var(--color-red);
}

.content-body > ul,
.content-body > ol {
  margin: 0 0 1.5rem 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

.content-body figure.wp-block-image {
  margin: 0 0 2rem 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 4px solid var(--color-white);
}

/* Edge-to-edge images stay plain */
.content-body figure.wp-block-image.alignfull {
  border-radius: 0;
  box-shadow: none;
  border: none;
}

.content-body img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

.content-body figure:hover img {
  transform: scale(1.03);
}

/* Columns of highlighted paragraphs (e.g. board members on Kontakt) */
.wp-block-column p.has-background {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* Dirigent page: portrait next to the first paragraph */
@media screen and (min-width: 768px) {
  .page-dirigent .content-body:has(> .wp-block-image:first-child) {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0 2.5rem;
    align-items: center;
  }

  .page-dirigent .content-body:has(> .wp-block-image:first-child) > .wp-block-image {
    grid-column: 1;
    grid-row: 1;
    margin: 0 0 2rem;
  }

  .page-dirigent .content-body:has(> .wp-block-image:first-child) > :nth-child(2) {
    grid-column: 2;
    grid-row: 1;
    margin: 0 0 2rem;
  }

  .page-dirigent .content-body:has(> .wp-block-image:first-child) > :nth-child(n+3) {
    grid-column: 1 / -1;
  }
}

.no-members,
.no-shows {
  text-align: center;
  font-style: italic;
  color: var(--color-text-muted);
  margin: 3rem 0;
}

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