/* =========================================================
   MedTech Knowledge Hub – Shared Styles
   Max-Breite: 1288px  |  CI: var(--widget-color)
   ========================================================= */

/* ---------------------------------------------------------
   MedTech-Archiv: Divi Secondary Header ausblenden
   --------------------------------------------------------- */
.ti-medtech-archive .main_secondary_header {
    display: none !important;
}

/* ---------------------------------------------------------
   Hero
   --------------------------------------------------------- */
.ti-hero {
    height: var(--ti-hero-height, 320px);
    padding-top: var(--ti-header-height, 80px);
    background-color: #d0d0d0;
    background-size: cover;
    background-position: center;
    position: relative;
    box-sizing: border-box;
}

.ti-hero__overlay {
    position: absolute;
    inset: 0;
}

/* Dunkles Overlay nur wenn Bild gesetzt */
.ti-hero--image .ti-hero__overlay {
    background: rgba(0, 0, 0, 0.40);
}

/* ---------------------------------------------------------
   Kategorien-Navigation (zwischen Hero und Breadcrumb)
   --------------------------------------------------------- */
.ti-tax-catnav {
    background: #F8F8F8;
    padding: 24px 24px;
    box-sizing: border-box;
}

.ti-tax-catnav__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 1288px;
    margin: 0 auto;
}

.ti-tax-catnav__item {
    padding: 0 16px;
    text-align: center;
    color: #333;
    font-weight: 700;
    font-size: 20px;
    text-decoration: none !important;
    border-left: 2px solid var(--widget-color, #007bff);
    border-right: 2px solid var(--widget-color, #007bff);
    margin-right: -2px;
    transition: color .15s;
    line-height: 1;
}

.ti-tax-catnav__item--active {
    color: #AACCA8;
}

@media (max-width: 768px) {
    .ti-tax-catnav__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ti-tax-catnav__grid {
        grid-template-columns: 1fr;
    }
}

/* ---------------------------------------------------------
   Breadcrumb
   --------------------------------------------------------- */
.ti-breadcrumb {
    padding: 14px 0;
    background: #fff;
}

.ti-breadcrumb__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
}

.ti-breadcrumb__item,
.ti-breadcrumb__item a {
    font-size: 14px;
    text-decoration: none !important;
}

.ti-breadcrumb__item a {
    color: inherit;
}

.ti-breadcrumb__item a:hover {
    opacity: .75;
}

.ti-breadcrumb__item--sep {
    color: #aaa;
}

.ti-breadcrumb__item--current {
    color: var(--widget-color, #007bff);
}

/* ---------------------------------------------------------
   Inhaltsbreite
   --------------------------------------------------------- */
.ti-hub__wrap {
    max-width: 1288px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* ---------------------------------------------------------
   Card – Beiträge & Kategorien
   --------------------------------------------------------- */
.ti-card {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
    display: flex;
    flex-direction: column;
    transition: box-shadow .2s;
}

.ti-card.rounded {
    border-radius: 15px;
}

.ti-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, .14);
}

.ti-card__image-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #eee;
}

.ti-card__image-wrap.small {
    aspect-ratio: 21 / 9;
}

.ti-card__image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Tags – oben links über dem Bild */
.ti-card__tags {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ti-card__tag {
    background: rgba(255, 255, 255, 1);
    color: var(--widget-color, #007bff);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 0;
    line-height: 1.4;
}

/* CI-Farblinie zwischen Bild und Content */
.ti-card__accent {
    height: 3px;
    background: var(--widget-color, #007bff);
    flex-shrink: 0;
}

.ti-card__body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ti-card__title {
    color: var(--widget-color, #007bff);
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
    padding: 0;
    line-height: 1.2;
}

.ti-card__title a {
    color: inherit;
    text-decoration: none;
}

.ti-card__title a:hover {
    text-decoration: underline;
}

.ti-card__desc {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    flex: 1;
    margin: 0 0 16px;
}

.ti-card__btn {
    display: inline-block;
    padding: 16px 24px;
    background: var(--widget-color, #007bff);
    color: #fff !important;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    align-self: flex-start;
    transition: opacity .2s;
}

.ti-card__btn:hover {
    opacity: .85;
}

/* ---------------------------------------------------------
   Hub – Section Layouts
   --------------------------------------------------------- */
.ti-hub__section {
    padding: 60px 0;
}

.ti-hub__section--gray {
    background: #F8F8F8;
}

/* Kategorien-Sektion mit optionalem Hintergrundbild */
.ti-hub__section--categories {
    position: relative;
    background-color: #F8F8F8;
    background-size: cover;
    background-position: center;
}

/* Dunkles Overlay + weiße Headline wenn Hintergrundbild gesetzt */
.ti-hub__section--categories[style]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    pointer-events: none;
}

.ti-hub__section--categories[style] .ti-hub__wrap {
    position: relative;
    z-index: 1;
}

.ti-hub__section--categories[style] .ti-hub__section-title {
    color: #fff;
}

.ti-hub__section--categories[style] .ti-hub__section-title::before,
.ti-hub__section--categories[style] .ti-hub__section-title::after {
    background: var(--widget-color, #007bff);
}

/* ---------------------------------------------------------
   Section-Titel: zentriert, Fließtextfarbe, CI-Striche
   --------------------------------------------------------- */
.ti-hub__section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: inherit;
    font-size: 36px;
    font-weight: 700;
    margin: 0 0 40px;
    line-height: 1.2;
    text-align: center;
}

.ti-hub__section-title::before,
.ti-hub__section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 1px;
    background: var(--widget-color, #007bff);
    flex-shrink: 0;
}

/* ---------------------------------------------------------
   3-Spalten Grid
   --------------------------------------------------------- */
.ti-hub__grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(3, 1fr);
}

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 960px) {
    .ti-hub__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ti-hub__section-title {
        font-size: 28px;
    }
}

@media (max-width: 600px) {
    .ti-hub__grid {
        grid-template-columns: 1fr;
    }

    .ti-hub__section {
        padding: 40px 0;
    }

    .ti-hub__section-title {
        font-size: 24px;
        gap: 12px;
    }

    .ti-hub__section-title::before,
    .ti-hub__section-title::after {
        width: 36px;
    }
}

/* =========================================================
   Taxonomie-Seite – Kategorie
   ========================================================= */

/* ---------------------------------------------------------
   Tax Hero (schmaler als Archiv-Hero)
   --------------------------------------------------------- */
.ti-tax-hero {
    min-height: var(--ti-tax-hero-height, 180px);
    padding-top: calc(var(--ti-header-height, 80px) + 40px);
    padding-bottom: 40px;
    background-color: #d0d0d0;
    background-size: cover;
    background-position: center;
    position: relative;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ti-tax-hero__overlay {
    position: absolute;
    inset: 0;
}

.ti-tax-hero--image .ti-tax-hero__overlay {
    background: rgba(0, 0, 0, 0.60);
}

.ti-tax-hero__content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 24px;
    max-width: 860px;
    width: 100%;
}

.ti-tax-hero__title {
    font-size: 60px;
    font-weight: 700;
    margin: 0 0 6px;
    padding: 0;
    line-height: 1.1;
    color: #333;
}

.ti-tax-hero--image .ti-tax-hero__title {
    color: #fff;
}

.ti-tax-hero__desc {
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    color: #555;
}

.ti-tax-hero--image .ti-tax-hero__desc {
    color: rgba(255, 255, 255, 0.88);
}

/* ---------------------------------------------------------
   Info-Sektion
   --------------------------------------------------------- */
.ti-tax-info {
    padding: 96px 0 64px 0;
    background: #fff;
}

.ti-tax-info__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 48px;
}

.ti-tax-info__mascot {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ti-tax-info__mascot svg {
    display: block;
    width: 100%;
    height: auto;
    max-width: 220px;
}

.ti-tax-info__text {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ti-tax-info__sub {
    color: var(--widget-color, #007bff);
    font-size: 36px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    border-left: 3px solid var(--widget-color, #007bff);
    padding-left: 16px;
}

.ti-tax-info__content {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.ti-tax-info__content p:first-child {
    margin-top: 0;
}

.ti-tax-info__content p:last-child {
    margin-bottom: 0;
}

/* ---------------------------------------------------------
   Tag-Filter
   --------------------------------------------------------- */
.ti-tax-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 32px;
}

.ti-tax-filter__btn {
    padding: 4px 14px;
    border: none;
    border-radius: 0;
    background: #fff;
    color: var(--widget-color, #007bff);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .10);
    transition: background .15s, color .15s;
    line-height: 1.4;
}

.ti-tax-filter__btn:hover,
.ti-tax-filter__btn--active {
    background: var(--widget-color, #007bff);
    color: #fff;
}

/* ---------------------------------------------------------
   Mehr laden
   --------------------------------------------------------- */
.ti-tax-loadmore {
    text-align: center;
    margin-top: 40px;
}

.ti-tax-loadmore__btn {
    display: inline-block;
    padding: 14px 40px;
    background: #fff;
    color: var(--widget-color, #007bff);
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
    cursor: pointer;
    transition: box-shadow .2s, opacity .2s;
}

.ti-tax-loadmore__btn:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, .18);
}

.ti-tax-loadmore__btn:disabled {
    opacity: .5;
    cursor: default;
}

/* ---------------------------------------------------------
   Responsive Tax
   --------------------------------------------------------- */
@media (max-width: 768px) {
    .ti-tax-hero__title {
        font-size: 42px;
    }

    .ti-tax-info__inner {
        grid-template-columns: 1fr;
    }

    .ti-tax-info__mascot {
        display: none;
    }

    .ti-tax-info__sub {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .ti-tax-hero__title {
        font-size: 32px;
    }
}
