/* ============================================================
   COMPONENTS – Slider, Text-Rotator, Accordion, Latest-News,
   Team, Sidebar, Buttons
   Optik 1:1 aus style.css / colors.css / caroufredsel.css
   ============================================================ */

/* ================= SIDEBAR ================== */
.sidebar-box { position: relative; margin-bottom: 40px; }
.sidebar-box:last-child { margin-bottom: 0; }

/* ================= BUTTONS ================== */
.button {
    width: auto;
    cursor: pointer;
    display: inline-block;
    font-family: 'ralewaybold';
    font-size: 15px;
    line-height: 1;
    margin: 0;
    outline: none;
    padding: 15px 20px;
    text-align: center;
    color: #fff !important;
    background-color: var(--color-primary);
    transition: background-color 0.2s ease-in-out;
    word-spacing: 0.1em;
    letter-spacing: 0.01em;
}
.button:hover { color: #fff !important; background-color: var(--color-heading); }

/* ================= SLIDER (caroufredsel-Ersatz) ================== */
#carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #fff;
}
.slider {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
}
.slider-track {
    display: flex;
    width: 100%;
}
.slide {
    position: relative;
    min-width: 100%;
    flex: 0 0 100%;
}
.slide img {
    display: block;
    width: 100%;
    height: auto;
    vertical-align: bottom;
}
/* Slidetext: blau hinterlegt, unten rechts, faded ein (wie im Original) */
.slidetext {
    padding: 20px 40px;
    position: absolute;
    right: 0;
    bottom: 40px;
    min-width: 30%;
    max-width: 60%;
    overflow: hidden;
    margin: 0;
    font-family: 'ralewaybold';
    font-size: 36px;
    line-height: 1;
    color: #fff;
    background-color: var(--color-primary);
    opacity: 0;
    transition: right 0.5s ease-in-out, opacity 0.5s ease-in-out;
}
.slide.is-active .slidetext { opacity: 0.9; right: 0; }
.slidetext a { color: #fff; text-decoration: none; }

/* Slider Prev/Next Klickflaechen */
.slider .car-prev.block,
.slider .car-next.block {
    display: block;
    width: 50%;
    top: 0;
    position: absolute;
    height: 100%;
    z-index: 5;
    background-color: rgba(255, 255, 255, 0.7);
    opacity: 0;
    cursor: pointer;
}
.slider .car-prev.block { left: -600px; }
.slider .car-next.block { right: -600px; }

/* Untere Navigationsleiste mit rotierendem Text */
.nav-buttons {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    padding: 0 40px;
    background-color: var(--color-primary);
}
.nav-buttons span {
    float: left;
    line-height: 1.5;
    font-size: 17px;
    padding: 9px 0;
    color: #fff;
    font-family: 'ralewayregular';
}
.car-prev.nav-icon,
.car-next.nav-icon {
    width: 60px;
    height: 60px;
    display: block;
    float: right;
    cursor: pointer;
    background-position: center center;
    background-repeat: no-repeat;
    transition: opacity 0.2s ease-in-out;
    opacity: 0.5;
}
.car-prev.nav-icon:hover,
.car-next.nav-icon:hover { opacity: 1; }
.car-prev.nav-icon { background-image: url('../images/s-left.png'); }
.car-next.nav-icon { background-image: url('../images/s-right.png'); }

/* ================= TEXT ROTATOR ================== */
.rotator > span { display: none; }
.rotator > span.is-active { display: inline-block; }

/* ================= LATEST NEWS (owl-Ersatz) ================== */
.latest-news { position: relative; overflow: hidden; }
.latest-news h5 { margin-bottom: 10px; margin-top: 0; }
/* Box-Titel: h5-Optik (22px) bei korrekter Heading-Ebene (h2) */
.latest-news-title {
    font-family: 'ralewaybold';
    font-weight: normal;
    font-size: 22px;
    line-height: 1;
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--color-heading);
}
.latest-news > figcaption { width: 100%; height: 100%; margin: 0; }
.latest-news > figcaption div {
    padding: 25px;
    height: 100%;
    background-color: var(--color-bg-soft);
}
.latest-news p { margin-bottom: 25px; }
.latest-news h5 { color: var(--color-heading); }
.latest-news hr {
    margin: 20px -25px;
    background-color: #fff;
}

/* ================= ACCORDION (natives <details>) ================== */
#accordion-container {
    padding: 0;
    margin: 30px 0;
    width: 100%;
    position: relative;
    border-top: 1px solid var(--color-bg-soft);
}
#accordion-container details { width: 100%; }
.accordion-header {
    margin: 0;
    padding: 20px 20px 20px 0;
    cursor: pointer;
    transition: color 0.2s ease-in-out;
    font-family: 'ralewayregular';
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-bg-soft);
    list-style: none;
    background: url(../images/plus.png) no-repeat right 50%;
}
.accordion-header::-webkit-details-marker { display: none; }
.accordion-header::marker { content: ""; }
.accordion-header:hover { color: var(--color-primary); }
details[open] > .accordion-header {
    color: var(--color-primary);
    background: url(../images/minus.png) no-repeat right 50%;
}
.accordion-content {
    padding: 30px 0;
    width: 100%;
    border-bottom: 1px solid var(--color-bg-soft);
}

/* ================= FLEX IMAGE (Anfahrt) ================== */
.flex-img { margin-bottom: 30px; }
.flex-img img { width: 100%; height: auto; vertical-align: bottom; }

/* ================= TEAM ================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    align-items: start;
}
.team-member {
    margin: 0;
    text-align: center;
}
.team-member img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    object-position: top center;
    display: block;
    margin: 0 0 20px 0;
}
.team-name {
    font-size: 26px;
    margin: 0 0 10px 0;
}
.team-role {
    font-family: 'ralewaybold';
    font-size: 16px;
    line-height: 1.3;
    color: var(--color-primary);
    margin: 0 0 5px 0;
}
.team-role + .team-role { margin-top: 0; }
.team-member p {
    text-align: left;
    margin-top: 15px;
}
.team-member ul {
    text-align: left;
    margin: 15px 0;
    padding-left: 20px;
}

@media only screen and (max-width: 900px) {
    .team-grid { grid-template-columns: 1fr; gap: 30px; }
    .team-member img { height: auto; }
}
@media only screen and (min-width: 901px) and (max-width: 1100px) {
    .team-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ================= CONTENT-UEBERSCHRIFTEN (Original-Optik) =================
   Die Leistungsseiten nutzen h2/h3 fuer eine valide Struktur, sollen aber
   optisch der kleineren Original-Groesse entsprechen (h5 bzw. h4). */
.content-title {      /* Optik wie Original-h5 = 22px */
    font-size: 22px;
}
.content-subtitle {   /* Optik wie Original-h4 = 26px */
    font-size: 26px;
}
@media only screen and (max-width: 768px) {
    .content-title { font-size: 18px; }
    .content-subtitle { font-size: 22px; }
}
