/* ===========================================================================
   Gesundheitspark Saarpfalz – eigenes CSS (kein Framework).
   Farben, Schriften und Maße aus DESIGN-SPEZIFIKATION.md.
   Die Klassen btn/btn-outline/btn-primary/btn-text, text-small, text-muted,
   h4-style usw. sind die Übersetzungen der alten uk-*-Klassen (UIkit 3).
   =========================================================================== */

:root {
    --accent: #fe7902;
    --text: #404040;
    --heading: #020d26;
    --page-bg: #eeeeee;
    --content-bg: #ffffff;
    --header-bg: #f7faff;
    --footer-bg: #171717;
    --footer-link: #d6d5d5;
    --radius: 5px;
    --container: 1200px;
}

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

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

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

body {
    margin: 0;
    font-family: 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--content-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
    color: var(--heading);
    line-height: 1.3;
    margin: 0 0 .8em;
}
h1 { font-weight: 700; font-size: 2.3rem; }
h2 { font-weight: 600; font-size: 1.9rem; }
h3 { font-weight: 500; font-size: 1.55rem; }
h4, .h4-style { font-weight: 400; font-size: 1.2rem; font-family: 'Poppins', sans-serif; color: var(--heading); }
h5, h6 { font-weight: 400; }

p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

img { max-width: 100%; height: auto; }
/* Kleine Altbestandsbilder (< 700 px) niemals über ihre native Breite
   hinaus vergrößern – width/height:auto hält die Originalgröße. */

ul, ol { margin: 0 0 1em; padding-left: 1.4em; }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 25px;
}
.container-narrow { max-width: 900px; }

/* Übersetzungen der uk-Klassen */
.text-small { font-size: .875rem; }
.text-muted { color: #7a7a7a; }
.no-margin { margin: 0; }

.btn {
    display: inline-block;
    padding: 8px 28px;
    font-family: 'Roboto', sans-serif;
    font-size: .875rem;
    line-height: 1.6;
    border-radius: 0;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }

.btn-outline {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}
.btn-outline:hover { background: var(--accent); color: #fff; }

.btn-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn-primary:hover { background: #e56d02; color: #fff; }

.btn-text {
    color: var(--accent);
    font-size: .95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-text:hover { text-decoration: underline; }

.icon-arrow::after { content: '\2192'; }

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

.site-header { background: var(--content-bg); }

.header-top {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.logo { flex: 0 0 auto; display: block; }
.logo img { display: block; width: 300px; height: auto; }

.header-contact {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 40px;
}
.header-contact-item h4 { margin: 0; }
.header-contact-item a { color: #7a7a7a; }
.header-contact-item a:hover { color: var(--accent); }
.header-btn { margin-left: 8px; }

.nav-toggle { display: none; }

/* Menüleiste */
.main-nav { background: var(--header-bg); }

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
}
.nav-item { position: relative; }
.nav-item > a,
.nav-item > .nav-heading {
    display: block;
    padding: 22px 18px;
    margin: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
    color: var(--heading);
    background: none;
    border: 0;
    appearance: none;
    cursor: pointer;
    text-decoration: none;
    text-align: left;
}
.nav-item > a:hover,
.nav-item > .nav-heading:hover,
.nav-item.active > a {
    color: var(--accent);
    text-decoration: none;
}

/* Dropdown */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .12);
    border-radius: var(--radius);
    list-style: none;
    margin: 0;
    padding: 12px 0;
    display: none;
    z-index: 50;
}
.nav-item:hover > .dropdown,
.nav-item:focus-within > .dropdown { display: block; }
.dropdown a {
    display: block;
    padding: 8px 22px;
    color: var(--heading);
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
}
.dropdown a:hover,
.dropdown li.active > a,
.dropdown a.active { color: var(--accent); }
.dropdown-sub { padding-left: 38px !important; font-size: 14px !important; }

/* ----- Abschnitte -------------------------------------------------------- */

.section {
    padding: var(--sp, 50px 0px 50px 0px);
    margin: var(--sm, 0);
    position: relative;
}
.section-bg {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: 50% 50%;
}
.section-bg-fixed { background-attachment: fixed; }

.section .container { position: relative; z-index: 2; }

/* Spaltenraster (12er-Grid der alten Seite) */
.row {
    display: grid;
    grid-template-columns: var(--cols, 1fr);
    gap: 30px;
    align-items: start;
}

/* ----- Blöcke ------------------------------------------------------------ */

.block { margin-bottom: 20px; }
.block:last-child { margin-bottom: 0; }

.block-raw h3, .block-text h3 { margin-bottom: .6em; }

/* Kacheln (Startseite) */
.cards {
    display: grid;
    grid-template-columns: repeat(var(--card-cols, 2), 1fr);
    gap: 30px;
}
.card {
    background: var(--content-bg);
    border-radius: var(--radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, .08);
    padding: 15px;
}
/* Kachelbilder in Originalgröße (535 px) – nicht hochskalieren. */
.card-media img { display: block; max-width: 100%; height: auto; }
.card-body { padding: 25px 25px 30px; }
.card-title { margin-bottom: .7em; }
.card-title a { color: var(--heading); }
.card-title a:hover { color: var(--accent); text-decoration: none; }

/* Akkordeon */
.block-accordion { text-align: left; }
.accordion-item { border-bottom: 0; margin-bottom: 18px; }
.accordion-title {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: none;
    border: 0;
    padding: 4px 0;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    font-weight: 400;
    color: var(--heading);
    text-align: left;
}
.accordion-small .accordion-title { font-size: 1rem; }
.accordion-item.open > .accordion-title { color: var(--accent); }
.accordion-title:hover { color: var(--accent); }
.accordion-icon { position: relative; width: 14px; height: 14px; flex: 0 0 auto; }
.accordion-icon::before,
.accordion-icon::after {
    content: '';
    position: absolute;
    background: currentColor;
    top: 50%; left: 0;
    width: 14px; height: 1.5px;
    transform: translateY(-50%);
}
.accordion-icon::after { transform: translateY(-50%) rotate(90deg); transition: transform .2s; }
.accordion-item.open .accordion-icon::after { transform: translateY(-50%) rotate(0deg); }
.accordion-content { padding: 14px 0 6px; }
.accordion-content img { margin: 10px 0; }

/* Galerie */
.block-gallery {
    display: grid;
    grid-template-columns: repeat(var(--gallery-cols, 3), 1fr);
    gap: 20px;
    align-items: start;
}
.block-gallery.masonry-built {
    display: grid;
    grid-template-columns: repeat(var(--gallery-cols, 3), 1fr);
    gap: 20px;
    align-items: start;
}
.masonry-col { display: flex; flex-direction: column; gap: 20px; }
.gallery-item { display: block; }
.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

/* Team – im Original ohne Kasten: Foto, Name, Text untereinander */
.team-avatar { display: block; margin-bottom: 18px; }
.team-name { margin-bottom: .9em; }

/* Call-to-Action-Band (dunkler Streifen mit Bild und Farbüberlagerung) */
.section-cta { background-color: #171717; }
.section-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(78, 60, 176, .82);
    mix-blend-mode: normal;
    z-index: 1;
}
.block-cta {
    display: flex;
    align-items: center;
    gap: 40px;
}
.cta-text { flex: 1 1 auto; }
.cta-title { color: #ffffff; font-weight: 600; font-size: 1.55rem; margin-bottom: .4em; }
.cta-content,
.cta-content p { color: #ffffff; font-size: .95rem; margin: 0; max-width: 900px; }
.cta-action { flex: 0 0 auto; }

/* Rechtstexte (Website-Check-Snippets) – Ersatz für deren Style-Block */
.block-legal { max-width: 900px; }
.block-legal h1 { font-size: 1.9rem; }
.block-legal h1, .block-legal h2, .block-legal h3,
.block-legal h4, .block-legal h5, .block-legal h6 { margin: 1.5em 0 .6em; }
.block-legal table {
    border: 1px solid #eeeeee;
    border-collapse: collapse;
    font-size: .9em;
    line-height: normal;
    margin-bottom: 1em;
    display: block;
    overflow-x: auto;
}
.block-legal table thead th {
    background: #efefef;
    padding: 10px;
    text-align: left;
    color: #000;
}
.block-legal table td { border: 1px solid #eeeeee; padding: 10px; }
.block-legal .cancellation-policy,
.block-legal .jmd-bordered { border: 1px solid; padding: 0 1em; }
.block-legal a { word-break: break-word; }

/* Artikel / Aktuelles */
.article-meta {
    color: #7a7a7a;
    font-size: .875rem;
    margin-bottom: 10px;
}
.article-meta-sep { margin: 0 10px; }
.article-headline { margin-bottom: .5em; }
.article-full .article-image { display: block; width: 100%; margin-bottom: 22px; }
.article-teaser { max-width: 900px; margin-bottom: 50px; }
.article-teaser:last-child { margin-bottom: 0; }
.article-teaser-image { display: block; width: 100%; margin-bottom: 18px; }
.article-title { margin-bottom: .4em; }
.article-title a { color: var(--heading); }
.article-title a:hover { color: var(--accent); text-decoration: none; }

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

.site-footer {
    background: var(--footer-bg);
    color: #ffffff;
    padding: 70px 0;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--footer-link); }
.site-footer a:hover { color: #ffffff; text-decoration: none; }

/* ----- Off-Canvas (Mobil) ------------------------------------------------ */

.offcanvas {
    position: fixed;
    inset: 0;
    z-index: 100;
    visibility: hidden;
    pointer-events: none;
}
.offcanvas::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    opacity: 0;
    transition: opacity .25s;
}
.offcanvas-panel {
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 290px;
    max-width: 85vw;
    background: #ffffff;
    padding: 24px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform .25s;
}
.offcanvas.open { visibility: visible; pointer-events: auto; }
.offcanvas.open::before { opacity: 1; }
.offcanvas.open .offcanvas-panel { transform: translateX(0); }
.offcanvas-close {
    background: none; border: 0; font-size: 28px; line-height: 1;
    cursor: pointer; color: var(--heading);
    position: absolute; top: 10px; right: 14px;
}
.offcanvas-menu { list-style: none; margin: 30px 0 0; padding: 0; }
.offcanvas-menu > li { margin-bottom: 4px; }
.offcanvas-menu a,
.offcanvas-heading {
    display: block;
    padding: 9px 6px;
    font-weight: 500;
    color: var(--heading);
    text-decoration: none;
}
.offcanvas-heading { color: #7a7a7a; text-transform: uppercase; font-size: .8rem; letter-spacing: .04em; }
.offcanvas-menu a:hover, .offcanvas-menu a.active { color: var(--accent); }
.offcanvas-sub { padding-left: 22px !important; font-weight: 400 !important; }
.offcanvas-sub2 { padding-left: 40px !important; font-size: .9rem; }

/* ----- Lightbox ---------------------------------------------------------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, .85);
    display: none;
    align-items: center;
    justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: 90vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: var(--radius);
}
.lightbox button {
    position: absolute;
    background: none;
    border: 0;
    color: #ffffff;
    font-size: 30px;
    cursor: pointer;
    padding: 14px;
    line-height: 1;
}
.lightbox-close { top: 12px; right: 18px; font-size: 38px; }
.lightbox-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 10px; top: 50%; transform: translateY(-50%); }

/* ----- Responsive -------------------------------------------------------- */

@media (max-width: 1279px) {
    .header-contact { gap: 22px; }
}

@media (max-width: 959px) {
    /* Mobiler Breakpoint der alten Seite: 960 px, Off-Canvas-Menü */
    .main-nav { display: none; }
    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: 0;
        padding: 8px;
        cursor: pointer;
    }
    .nav-toggle span {
        width: 24px; height: 2px;
        background: var(--heading);
        display: block;
    }
    .site-header { background: #ffffff; }
    .header-top { justify-content: center; position: relative; }
    .nav-toggle { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); }
    .header-contact { display: none; }
    .logo { margin: 0 auto; }
    .logo img { width: 150px; height: auto; }

    .row { grid-template-columns: 1fr !important; }
    .cards { grid-template-columns: 1fr; }
    .block-gallery { grid-template-columns: 1fr; }
    .section { --sp: 40px 0px 40px 0px !important; --sm: 0 !important; }
    .section-bg-fixed { background-attachment: scroll; }
    .block-cta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 639px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
}
