/* ============================================================
   hauptstyle.css
   Zentrales Designsystem für psychonomie.de
   Responsive | Komponentenbasiert | Barrierearm
   ============================================================ */

/* ------------------------------------------------------------
   1. DESIGNVARIABLEN
   ------------------------------------------------------------ */

:root {
  /* Grundfarben */
  --white: #ffffff;
  --off-white: #f4f6f9;
  --gray-100: #eef2f7;
  --gray-200: #dce3ec;
  --gray-300: #b8c5d4;
  --gray-500: #555555;
  --gray-600: #666666;
  --gray-700: #444444;
  --gray-900: #333333;

  /* Markenfarben */
  --accent: #1a3a5c;
  --accent-light: #e8eef5;
  --accent-mid: #2e5f94;

  /* Bestehende Farbvariablen */
  --col-bg: #F7F5F2;
  --col-surface: #FFFFFF;
  --col-deep: #1C2B2D;
  --col-mid: #3D5A5E;
  --col-accent: #7A9E9F;
  --col-warm: #C8A882;
  --col-muted: #8A9BA0;
  --col-border: #DDD8D0;
  --col-cta: #2E6B6F;
  --col-cta-hover: #1C4C4F;
  --col-orange: #e67e22;
  --col-orange-dk: #d35400;

  /* Verläufe */
  --gradient-hero: linear-gradient(160deg, #ffffff 0%, #eef2f7 55%, #dce3ec 100%);
  --gradient-alt: linear-gradient(180deg, #f4f6f9 0%, #eef2f7 100%);

  /* Schriften */
  --serif: 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, 'Times New Roman', serif;
  --sans: 'Source Sans 3', 'Segoe UI', Arial, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: var(--sans);

  /* Layout */
  --radius: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --max-w: 1100px;
  --max-w-narrow: 920px;
  --gap: 2rem;

  /* Schatten */
  --shadow-sm: 0 1px 4px rgba(28, 43, 45, 0.08);
  --shadow-md: 0 4px 20px rgba(28, 43, 45, 0.10);
  --shadow-lg: 0 12px 40px rgba(28, 43, 45, 0.12);

  /* Animation */
  --t: 0.3s ease;

  /* Kompatibilität */
  --color-text: var(--gray-700);
  --color-heading: var(--gray-900);
  --color-link: var(--accent);
  --color-link-hover: var(--accent-mid);
}

/* ------------------------------------------------------------
   2. LOKALE SCHRIFTEN
   ------------------------------------------------------------ */

@font-face {
  font-family: 'Playfair Display';
  src: url('fonts/PlayfairDisplay-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair Display';
  src: url('fonts/PlayfairDisplay-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/SourceSans3-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/SourceSans3-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/SourceSans3-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/SourceSans3-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ------------------------------------------------------------
   3. RESET UND GRUNDLAYOUT
   ------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  color: var(--gray-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

img {
  display: block;
}

iframe {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
[type="button"],
[type="submit"],
[type="reset"] {
  cursor: pointer;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t);
}

a:hover {
  color: var(--accent-mid);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent-mid);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

/* ------------------------------------------------------------
   4. TYPOGRAFIE
   ------------------------------------------------------------ */

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.75rem;
  color: var(--gray-900);
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.3;
  text-wrap: balance;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.5rem);
}

h4 {
  font-size: 1.1rem;
}

p {
  margin: 0 0 1.1rem;
}

p:last-child {
  margin-bottom: 0;
}

strong, b {
  font-weight: 600;
}

small {
  font-size: 0.875em;
}

ul, ol {
  padding-left: 1.5rem;
  margin: 0 0 1rem;
}

li {
  margin-bottom: 0.4rem;
}

blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 3px solid var(--accent);
  background: var(--off-white);
}

.subtitle {
  max-width: 760px;
  margin-bottom: 2.5rem;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.6;
  color: var(--gray-500);
}

.text-white { color: var(--white); }
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }

/* ------------------------------------------------------------
   5. CONTAINER UND SEKTIONEN
   ------------------------------------------------------------ */

.container,
.container--narrow {
  width: min(92%, var(--max-w));
  margin-inline: auto;
  box-sizing: border-box;
}

.container--narrow {
  max-width: var(--max-w-narrow);
}

.content-wrapper {
  width: min(92%, var(--max-w));
  margin: 2.5rem auto;
  box-sizing: border-box;
}

.section {
  padding: 4rem 0;
}

.section--alt {
  background: var(--off-white);
}

.section--dark {
  color: #e8e0d8;
  background: var(--col-deep);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: #f0ebe4;
}

.section--dark p {
  color: #b8c5c6;
}

.bg-light { background: var(--off-white); }
.bg-dark {
  color: var(--white);
  background: var(--col-deep);
}
.bg-dark h2, .bg-dark h3, .bg-dark h4 { color: var(--white); }

.text-block { margin-bottom: 2.5rem; }

/* ------------------------------------------------------------
   6. RASTER UND SPALTEN
   ------------------------------------------------------------ */

.grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2.5rem;
}

.grid > div {
  flex: 1 1 280px;
  min-width: 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

.two-columns {
  display: flex;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}

.column-left,
.column-right {
  flex: 1;
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--gray-200);
}

.box {
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

/* ------------------------------------------------------------
   7. SEITENTITELBEREICH & HERO
   ------------------------------------------------------------ */

.header-banner {
  display: block;
  margin-top: 0;
  padding: clamp(2.5rem, 6vw, 4rem) 0;
  color: var(--white);
  text-align: center;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-mid) 100%);
}

.header-banner h1 {
  margin: 0;
  color: var(--white);
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
}

.header-banner p {
  max-width: 700px;
  margin: 0.75rem auto 0;
  padding-inline: 1rem;
  color: var(--white);
  opacity: 0.95;
  font-size: 1.05rem;
}

.page-header {
  position: relative;
  overflow: hidden;
  padding: 3rem 0 2.25rem;
  background: var(--col-deep);
}

.page-header::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: radial-gradient(ellipse at 80% 50%, rgba(122, 158, 159, 0.15) 0%, transparent 60%);
}

.page-header h1 {
  position: relative;
  color: #f0ebe4;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
}

.page-header p {
  position: relative;
  max-width: 600px;
  margin-top: 0.6rem;
  color: #b8c5c6;
}

.page-header__eyebrow,
.hero__eyebrow {
  display: block;
  margin-bottom: 0.75rem;
  color: var(--col-warm);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.5rem;
  background: var(--col-deep);
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: radial-gradient(ellipse at 70% 50%, rgba(122, 158, 159, 0.18) 0%, transparent 65%);
}

.hero h1 {
  position: relative;
  max-width: 700px;
  color: #f0ebe4;
}

.hero__lead {
  position: relative;
  max-width: 650px;
  margin: 1.25rem 0 2rem;
  color: #b8c5c6;
  font-size: 1.1rem;
}

.hero__actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.hero__note {
  margin-top: 1.25rem;
  color: #a8babb;
  font-size: 0.85rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  align-items: start;
  gap: 3rem;
}

/* ------------------------------------------------------------
   8. BUTTONS UND CALLS TO ACTION
   ------------------------------------------------------------ */

.btn,
.btn-action,
.cta-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  max-width: 100%;
  padding: 0.8rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: color var(--t), background-color var(--t), border-color var(--t), box-shadow var(--t), transform var(--t);
  box-sizing: border-box;
}

.btn:hover,
.btn-action:hover,
.cta-button:hover {
  text-decoration: none;
}

.btn--primary {
  color: var(--col-deep);
  background: var(--col-warm);
}

.btn--primary:hover {
  color: var(--col-deep);
  background: #b8916a;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn--outline {
  color: #e0d8d0;
  background: transparent;
  border-color: rgba(200, 184, 166, 0.6);
}

.btn--outline:hover {
  color: var(--white);
  border-color: var(--col-warm);
}

.btn--cta,
.btn-action {
  color: var(--white);
  background: var(--accent);
}

.btn--cta {
  width: 100%;
  padding: 0.9rem;
  border-radius: var(--radius-md);
}

.btn--cta:hover,
.btn-action:hover {
  color: var(--white);
  background: var(--accent-mid);
}

.cta-button {
  color: var(--white);
  background: var(--col-orange);
  box-shadow: var(--shadow-sm);
}

.cta-button:hover {
  color: var(--white);
  background: var(--col-orange-dk);
  transform: translateY(-2px);
}

.btn:disabled,
.btn-action:disabled,
button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cta-box {
  max-width: 850px;
  margin: 3rem auto;
  padding: 2.5rem 2rem;
  text-align: center;
  background: var(--accent-light);
  border-radius: var(--radius);
  box-sizing: border-box;
}

.cta-box h3 {
  margin-bottom: 1rem;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.6rem;
}

/* ------------------------------------------------------------
   9. THEMEN-GRID UND ACT-KARTEN (RESPONSIV ERWEITERT)
   ------------------------------------------------------------ */

.theme-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin: 2.5rem 0;
}

/* Automatischer Wechsel auf 1 Spalte untereinander auf Handys/mobilen Geräten */
@media (max-width: 900px) {
  .theme-grid {
    grid-template-columns: 1fr !important;
  }
}

.theme-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t);
  box-sizing: border-box;
}

.theme-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.act-card-figure {
    margin: 0;
    width: 100%;
    background: var(--gray-100, #eef2f7);
    overflow: hidden;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.act-card-figure img,
.img-placeholder {
    width: 100% !important;
    height: auto !important;
    object-fit: initial !important;
    display: block;
}

.theme-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.25rem 1.4rem 1.5rem;
  min-width: 0;
}

.theme-card__body h3 {
  margin-bottom: 0.6rem;
  color: var(--accent);
  font-size: 1.2rem;
}

.theme-card__body p {
  flex: 1;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.theme-card__link {
  align-self: flex-start;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid currentColor;
}

.theme-card__link:hover {
  color: var(--accent-mid);
}

/* ------------------------------------------------------------
   10. PORTRÄT UND BILD-TEXT-BEREICHE
   ------------------------------------------------------------ */

.portrait-box {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  margin-top: -1.875rem;
  padding: 1.875rem;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  box-sizing: border-box;
}

.portrait-img {
  flex: 0 0 220px;
  width: 220px;
  max-width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.intro-content {
  flex: 1;
  min-width: 0;
}

.section-row {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin: 3.75rem 0;
}

.section-row.reverse {
  flex-direction: row-reverse;
}

.section-image {
  flex: 0 1 400px;
  min-width: 0;
}

.section-image img {
  width: 100%;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.section-text {
  flex: 1;
  min-width: 0;
}

.section-text h2 {
  margin-bottom: 1rem;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1.7rem;
}

/* ------------------------------------------------------------
   11. FORMULARE
   ------------------------------------------------------------ */

.form-row,
.form-row-full {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.form-row input,
.form-row-full input {
  flex-shrink: 0;
  margin-top: 0.35rem;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.7rem 0.8rem;
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  box-sizing: border-box;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
}

/* ------------------------------------------------------------
   12. COOKIE-BANNER
   ------------------------------------------------------------ */

#cookie-banner {
  position: fixed;
  inset: auto 0 0;
  z-index: 99999;
  padding: 1rem;
  background: var(--col-deep);
  border-top: 1px solid rgba(122, 158, 159, 0.3);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.25);
  font-family: var(--font-body);
  transform: translateY(110%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#cookie-banner.cookie--visible {
  transform: translateY(0);
}

.cookie__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  width: min(100%, var(--max-w));
  margin: 0 auto;
  padding: 0.25rem 0;
  box-sizing: border-box;
}

.cookie__text {
  flex: 1 1 300px;
  min-width: 0;
  margin: 0;
  color: #c8d2d2;
  font-size: 0.88rem;
  line-height: 1.65;
}

.cookie__text strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
}

.cookie__text a {
  color: #a8c9ca;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie__text a:hover {
  color: var(--col-warm);
}

.cookie__actions {
  display: flex;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.cookie__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.65rem 1rem;
  color: var(--white);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: normal;
  transition: color var(--t), background-color var(--t), border-color var(--t);
  box-sizing: border-box;
}

/* Vollbildansicht */
#bildLightbox {
    display: none;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

#bildLightbox img {
    display: block !important;
    position: static !important;
    inset: auto !important;
    width: auto !important;
    height: auto !important;
    max-width: 95vw !important;
    max-height: 95vh !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
    object-fit: contain;
    cursor: zoom-out;
}

.cookie__btn--accept {
  color: var(--col-deep);
  background: var(--col-warm);
  border-color: var(--col-warm);
}
.cookie__btn--accept:hover {
  background: #b8916a;
  border-color: #b8916a;
}
.cookie__btn--necessary {
  color: var(--white);
  background: transparent;
  border-color: rgba(200, 184, 166, 0.6);
}
.cookie__btn--necessary:hover {
  border-color: var(--col-warm);
}
.cookie__btn--decline {
  color: #c8d2d2;
  background: transparent;
  border-color: rgba(200, 210, 210, 0.35);
}
.cookie__btn--decline:hover {
  color: var(--white);
  border-color: rgba(200, 210, 210, 0.7);
}