/* ==========================================================================
   Geist Font
   ========================================================================== */

@font-face {
    font-family: 'Geist';
    src: url('../fonts/Geist/Geist-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist';
    src: url('../fonts/Geist/Geist-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist';
    src: url('../fonts/Geist/Geist-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ==========================================================================
   Custom Properties
   ========================================================================== */

:root {
    --color-navy:  #272567;
    --color-plum:  #572B41;
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-grey:  #f5f5f5;

    --font-base: 'Geist', system-ui, sans-serif;

    --container-max:     1600px;
    --container-padding: clamp(1.25rem, 5vw, 80px);

    /* Spacing */
    --space-xs:  0.5rem;
    --space-sm:  1rem;
    --space-md:  1.5rem;
    --space-lg:  2.5rem;
    --space-xl:  4rem;
    --space-2xl: 6rem;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

html {
    font-size: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-base);
    font-size: 0.875rem;   /* 14px – body_s-l_mobile */
    line-height: 1.4286;   /* ≈ 20px bei 14px */
    font-weight: 400;
    color: var(--color-black);
    background-color: var(--color-white);
    overflow-x: hidden;
    max-width: 1600px;
    margin-inline: auto;
}

body.nav-open {
    overflow: hidden;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    background: none;
    border: none;
    font: inherit;
    color: inherit;
}

.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;
}

.screen-reader-text:focus {
    background: var(--color-navy);
    color: var(--color-white);
    clip: auto;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    z-index: 9999;
    position: fixed;
    top: 1rem;
    left: 1rem;
}

/* ==========================================================================
   Typography – Mobile first (360px Referenz)
   ========================================================================== */

h1, .h1 { font-size: 2.125rem;  line-height: 2.5rem;   font-weight: 400; }  /* 34/40 */
h2, .h2 { font-size: 1.875rem;  line-height: 2.25rem;  font-weight: 400; }
h3, .h3 { font-size: 1.5rem;    line-height: 1.8125rem; font-weight: 400; } /* 24/29 */
h4, .h4 { font-size: 1.125rem;  line-height: 1.5rem;   font-weight: 400; }  /* 18/24 */

.body-l  { font-size: 1rem;     line-height: 1.5rem; }
.body-s  { font-size: 0.875rem; line-height: 1.25rem; }                     /* 14/20 */

p { margin-bottom: var(--space-sm); }
p:last-child { margin-bottom: 0; }

/* Tablet (768px) */
@media (min-width: 768px) {
    h1, .h1 { font-size: 3rem;    line-height: 3.625rem; }  /* 48/58 */
    h2, .h2 { font-size: 2.375rem; line-height: 2.875rem; } /* 38/46 */
    h3, .h3 { font-size: 1.875rem; line-height: 2.25rem; }  /* 30/36 */
    h4, .h4 { font-size: 1.375rem; line-height: 1.8125rem; }/* 22/29 */
}

/* Desktop (1024px+) */
@media (min-width: 1024px) {
    body { font-size: 1.125rem; line-height: 1.4375rem; }    /* 18/23 – body-l_desktop */
    h1, .h1 { font-size: 3.75rem;  line-height: 4.5rem; }   /* 60/72 */
    h2, .h2 { font-size: 2.8125rem; line-height: 3.375rem; }/* 45/54 */
    h3, .h3 { font-size: 2.1875rem; line-height: 2.625rem; }/* 35/42 */
    h4, .h4 { font-size: 1.625rem;  line-height: 2.125rem; }/* 26/34 */
    .body-l  { font-size: 1.125rem; line-height: 1.4375rem; }/* 18/23 */
    .body-s  { font-size: 1rem;     line-height: 1.25rem; }  /* 16/20 */
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--container-padding);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    position: relative;
    z-index: 100;
}

/* Mobile: Hintergrundfarbe auf dem äußeren Header */
.site-header--dark {
    background-color: var(--color-navy);
    color: var(--color-white);
}

/* Auf Seiten mit .page-intro: Header in Plum statt Navy */
body:has(.page-intro) .site-header--dark {
    background-color: var(--color-plum);
}

.site-header--light {
    background-color: var(--color-white);
    color: var(--color-black);
    border-bottom: 1px solid #eee;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

/* Desktop: Logo frei, nur <nav> bekommt Navy-Hintergrund + Abrundung */
@media (min-width: 1024px) {
    .site-header--dark,
    .site-header--light {
        background-color: transparent;
        border-bottom: none;
        padding: 1.25rem var(--container-padding);
    }

    /* Innerer Flex-Container: relativ, damit Nav absolut zentriert werden kann */
    .site-header__inner {
        background-color: transparent;
        border-radius: 0;
        padding: 0;
        height: 52px;
        position: relative;
    }

    /* Logo-Farbe: weiß auf Homepage (dunkler Hero-Hintergrund), dunkel auf Innen-Seiten */
    .site-header--dark .logo-text { color: var(--color-white); }
    .site-header--light .logo-text { color: var(--color-black); }

    /* Nav-Pill: absolut zentriert, Navy + Abrundung */
    .site-nav {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        background-color: var(--color-navy);
        border-radius: 100px;
        height: 52px;
        padding: 0 2rem;
        display: flex;
        align-items: center;
    }

    .site-nav__list li a {
        color: var(--color-white);
    }
}

/* Logo */
.logo-text {
    font-family: var(--font-base);
    font-size: 1.05rem;
    line-height: .625rem;
    display: block;
}

.logo-text strong {
    font-weight: 700;
    display: block;
}

.site-header--dark .logo-text,
.nav-overlay .logo-text {
    color: var(--color-white);
}

.site-header--light .logo-text {
    color: var(--color-black);
}

/* Desktop nav – hidden on mobile */
.site-nav {
    display: none;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.site-nav__list li a {
    font-size: 0.9375rem;
    color: var(--color-white);
    transition: opacity 0.2s;
}

.site-nav__list li a:hover {
    opacity: 0.7;
}

/* Hamburger – visible on mobile/tablet */
.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 10px;
    color: inherit;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    transition: background-color 0.2s;
}

.site-header--light .nav-toggle {
    background-color: var(--color-navy);
    color: var(--color-white);
}

.nav-toggle:hover {
    background-color: rgba(255, 255, 255, 0.25);
}

@media (min-width: 1024px) {
    .site-nav {
        display: flex;
        align-items: center;
    }
    .site-nav__list {
        height: 100%;
        align-items: center;
    }
    .nav-toggle { display: none; }
}

/* ==========================================================================
   Mobile Nav Overlay
   ========================================================================== */

.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 200;
    background-color: var(--color-plum);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    padding: 0 var(--container-padding);

    /* Hidden state */
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.nav-overlay.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.nav-overlay__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    flex-shrink: 0;
}

.nav-overlay__close {
    color: var(--color-white);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-overlay__list {
    margin-top: var(--space-xl);
}

.nav-overlay__list li {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-overlay__list li:last-child {
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-overlay__list li a {
    display: block;
    padding: var(--space-md) 0;
    font-size: 1.5rem;
    color: var(--color-white);
    transition: opacity 0.2s;
}

.nav-overlay__list li a:hover {
    opacity: 0.75;
}

/* ==========================================================================
   Header mit Hero-Hintergrundbild (Startseite)
   ========================================================================== */

.site-header--hero {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Mobile/Tablet: hero__content am unteren Rand */
.hero__content {
    margin-top: auto;
    padding: var(--space-md) var(--container-padding);
    color: var(--color-white);
    max-width: 100%;
}

.hero__title {
    color: var(--color-white);
}

@media (min-width: 768px) {
    .site-header--hero {
        min-height: 480px;
    }
}

@media (min-width: 1024px) {
    .site-header--hero {
        min-height: 600px;
        justify-content: space-between;
    }

    /* Desktop: hero__content füllt verbleibenden Raum, Titel vertikal zentriert */
    .hero__content {
        flex: 1;
        display: flex;
        align-items: center;
        padding: 0 var(--container-padding);
        max-width: 60%;
    }
}

/* ==========================================================================
   Search Bar
   ========================================================================== */

.search-bar-section {
    padding: var(--space-lg) var(--container-padding);
    background-color: var(--color-plum);
}

.search-bar-section .container {
    max-width: 780px;
}

.search-form {
    display: flex;
    align-items: center;
    background-color: var(--color-white);
    border: 1.5px solid transparent;
    border-radius: 100px;
    height: 4rem;
    padding: 0 var(--space-md);
    gap: var(--space-xs);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.search-form:focus-within {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.search-form__input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--font-base);
    font-size: 0.9375rem;
    color: var(--color-black);
    background: transparent;
    min-width: 0;
}

.search-form__input::placeholder {
    color: #888;
}

.search-form__submit {
    flex-shrink: 0;
    background-color: var(--color-navy);
    color: var(--color-white);
    border: none;
    border-radius: 100px;
    padding: 0.625rem 1.25rem;
    font-family: var(--font-base);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.search-form__submit:hover {
    background-color: #1e1c52;
}

/* ==========================================================================
   Content Sections
   ========================================================================== */

.content-section {
    padding: var(--space-xl) 0;
}

.content-section + .content-section {
    padding-top: 0;
}

/* ==========================================================================
   CTA Card
   ========================================================================== */

.cta-card {
    background-color: var(--color-plum);
    color: var(--color-white);
    border-radius: 8px;
    padding: var(--space-lg);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-lg);
}

.cta-card__icon {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-card__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    flex: 1;
}

.cta-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-white);
    margin: 0;
}

.cta-card__text {
    font-size: inherit;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.cta-card__button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--color-navy);
    color: var(--color-white);
    border-radius: 100px;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    align-self: flex-start;
    transition: background-color 0.2s;
}

.cta-card__button:hover {
    background-color: #1e1c52;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: var(--color-navy);
    color: var(--color-white);
    padding: var(--space-lg) 0;
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.logo-text--white {
    color: var(--color-white);
}

.site-footer__nav-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.site-footer__nav-list li a {
    font-size: 0.9375rem;
    color: var(--color-white);
    opacity: 0.8;
    transition: opacity 0.2s;
}

.site-footer__nav-list li a:hover {
    opacity: 1;
}

@media (min-width: 768px) {
    .site-footer__inner {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .site-footer__nav-list {
        flex-direction: column;
        gap: var(--space-xs);
        text-align: right;
    }
}

/* ==========================================================================
   Front Page – Homepage
   ========================================================================== */

.front-intro {
    padding: var(--space-xl) 0 var(--space-lg);
}

.front-intro .container {
    max-width: 900px;
}

.front-intro__text {
    margin-bottom: var(--space-lg);
    font-size: inherit;
    line-height: 1.7;
}

.front-intro__text ul {
    list-style: disc;
    padding-left: var(--space-md);
    margin-top: var(--space-sm);
}

.front-intro__text ul li {
    margin-bottom: 0.25rem;
}

.front-cta {
    padding: 0 0 var(--space-xl);
}

.front-cta .container {
    max-width: 900px;
}

/* ==========================================================================
   Standard Page – Detailseite
   ========================================================================== */

.page-intro {
    background-color: var(--color-plum);
    color: var(--color-white);
    padding: var(--space-xl) 0;
}

.page-intro__inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    align-items: flex-start;
}

.page-intro__image-wrap {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1);
}

.page-intro__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-intro__text h1 {
    color: var(--color-white);
    margin-bottom: var(--space-sm);
}

.page-intro__text p {
    color: rgba(255, 255, 255, 0.85);
    font-size: inherit;
    line-height: 1.7;
}

@media (min-width: 768px) {
    .page-intro__inner {
        flex-direction: row;
        align-items: center;
        gap: var(--space-xl);
    }

    .page-intro__image-wrap {
        width: 220px;
        height: 220px;
    }
}

@media (min-width: 1024px) {
    .page-intro__image-wrap {
        width: 261px;
        height: 261px;
    }
}

.page-content {
    padding: var(--space-xl) 0;
}

.page-content .container {
    max-width: 900px;
}

.page-content h2,
.page-content h3 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
}

.page-content h2:first-child,
.page-content h3:first-child {
    margin-top: 0;
}

.page-content p,
.page-content ul,
.page-content ol {
    font-size: inherit;
    line-height: 1.7;
    margin-bottom: var(--space-sm);
}

.page-content ul {
    list-style: disc;
    padding-left: var(--space-md);
}

.page-content ol {
    list-style: decimal;
    padding-left: var(--space-md);
}

/* ==========================================================================
   Profil Page Template
   ========================================================================== */

.profil-header {
    padding: var(--space-xl) 0 var(--space-lg);
}

.profil-header__inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.profil-header__photo-wrap {
    flex-shrink: 0;
    width: 210px;
    height: 210px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--color-grey);
}

.profil-header__photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profil-header__name {
    margin-bottom: var(--space-sm);
}

.profil-header__wirkungskreis {
    color: #555;
    margin-bottom: var(--space-sm);
}

.profil-header__tags-group {
    margin-bottom: var(--space-md);
}

.profil-header__tags-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.profil-header__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0;
}

.profil-contact {
    padding: 0 0 var(--space-xl);
}

.profil-wirkungskreis {
    margin-top: var(--space-md);
    color: #555;
}

.tag-pill {
    display: inline-block;
    background-color: transparent;
    color: var(--color-navy);
    border: 1px solid var(--color-navy);
    border-radius: 100px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.profil-header__bio {
    font-size: inherit;
    line-height: 1.7;
}

.profil-header__bio ul {
    list-style: disc;
    padding-left: var(--space-md);
    margin-bottom: var(--space-sm);
}

.profil-header__bio p {
    margin-bottom: var(--space-sm);
}

@media (min-width: 768px) {
    .profil-header__inner {
        flex-direction: row;
        align-items: flex-start;
        gap: var(--space-xl);
    }

    .profil-header__photo-wrap {
        width: 260px;
        height: 260px;
    }
}

@media (min-width: 1024px) {
    .profil-header__photo-wrap {
        width: 320px;
        height: 320px;
    }
}

/* Kontaktkarten */
.contact-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    padding: 0 0 var(--space-xl);
}

@media (min-width: 640px) {
    .contact-cards {
        grid-template-columns: 1fr 1fr;
    }
}

.contact-card {
    background-color: var(--color-plum);
    color: var(--color-white);
    border-radius: 8px;
    padding: var(--space-lg);
}

.contact-card__label {
    font-size: inherit;
    opacity: 0.75;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.contact-card__value {
    font-size: inherit;
    font-weight: 400;
    word-break: break-all;
}

.contact-card .contact-card__value a {
    color: var(--color-white);
    text-decoration: none;
}

/* Galerie */
.profil-gallery {
    padding: 0 0 var(--space-xl);
}

.profil-gallery__inner {
    position: relative;
    background-color: var(--color-grey);
    border-radius: 8px;
    overflow: hidden;
    min-height: 240px;
}

.profil-gallery .gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 4px;
}

.profil-gallery .gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* ==========================================================================
   Search Results
   ========================================================================== */

.search-results-header {
    padding: var(--space-xl) 0 var(--space-lg);
}

.search-results-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.search-results-header__title {
    flex: 1;
}

.search-results-header__form {
    flex-shrink: 0;
    width: min(100%, 400px);
}

.search-results-header__count {
    color: #555;
    margin-top: var(--space-sm);
}

.search-results-list {
    padding: 0 0 var(--space-2xl);
}

.search-results-list .container {
    max-width: 900px;
}

.search-result-item {
    border-top: 1px solid #eee;
    padding: var(--space-lg) 0;
}

.search-result-item:last-child {
    border-bottom: 1px solid #eee;
}

.search-result-item__title {
    margin-bottom: 0.5rem;
}

.search-result-item__title a {
    color: var(--color-black);
    transition: color 0.2s;
}

.search-result-item__title a:hover {
    color: var(--color-navy);
}

.search-result-item__excerpt {
    font-size: inherit;
    line-height: 1.6;
    color: #444;
}

.search-no-results {
    padding: 0 0 var(--space-xl);
    color: #555;
}

/* ==========================================================================
   404
   ========================================================================== */

.not-found {
    padding: var(--space-2xl) 0;
    text-align: center;
}

.not-found h1 {
    margin-bottom: var(--space-md);
}

.not-found p {
    margin-bottom: var(--space-lg);
    color: #555;
}

.btn {
    display: inline-block;
    background-color: var(--color-navy);
    color: var(--color-white);
    border-radius: 100px;
    padding: 0.75rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #1e1c52;
}

/* ==========================================================================
   WordPress Entry Content (Gutenberg / Classic Editor)
   ========================================================================== */

.entry-content > * + * {
    margin-top: var(--space-sm);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: var(--space-xl);
}

.entry-content ul,
.entry-content ol {
    padding-left: var(--space-md);
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }

.entry-content a {
    color: var(--color-navy);
    text-decoration: underline;
}

.entry-content img {
    border-radius: 8px;
}

/* ==========================================================================
   Utility
   ========================================================================== */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}
