/* =========================
   BASE
   ========================= */

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #f5f7fa;
    margin: 0;
    color: #1f1f1f;
    line-height: 1.5;
}

main {
    padding: 40px 20px;
}

h1 {
    margin-bottom: 25px;
}

/* =========================
   LAYOUT
   ========================= */

.app {
    max-width: 1100px;
    margin: 0 auto;
}

/* =========================
   HEADER
   ========================= */

header {
    background: white;
    padding: 20px;
}

/* =========================
   HUB SEARCH + FILTERS
   ========================= */

.hub-search {
    margin-bottom: 20px;
}

.hub-search input {
    width: 100%;
    padding: 12px 14px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
}

.hub-search input:focus {
    border-color: #2f7d4d;
    outline: none;
}

.hub-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
    z-index: 100;
}

.filter-group {
    background: white;
    border: 1px solid #ddd;
    border-radius: 10px;
    min-width: 220px;
    overflow: visible;
    position: relative;
}

.filter-group summary {
    padding: 12px 15px;
    cursor: pointer;
    font-weight: bold;
    user-select: none;
}

.filter-group summary::-webkit-details-marker {
    display: none;
}

.filter-group[open] {
    z-index: 100;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.filter-group[open] summary {
    border-bottom: 1px solid #eee;
}

.filter-group[open] {
    position: relative;
}

.filter-options {
    display: none;
}


.filter-group[open] .filter-options {

    display: block;

    position: absolute;

    top: calc(100% + 1px);
    left: 0;

    min-width: 100%;
    width: max-content;
    max-width: 350px;

    max-height: 400px;
    overflow-y: auto;

    background: white;

    border: 1px solid #ddd;
    border-radius: 0 0 10px 10px;

    padding: 10px 0;

    box-shadow: 0 8px 20px rgba(0,0,0,0.15);

    z-index: 200;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    font-size: 14px;
}

.filter-group label:hover {
    background: #f7f7f7;
}

.reset-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: silver;
    text-decoration: none;
    color: inherit;
}

.reset-button:hover {
    background: #f3f3f3;
}

/* =========================
   HUB GRID
   ========================= */

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    position: relative;
    z-index: 1;
}

/* =========================
   CARD
   ========================= */

.card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease;
}

.card:hover {
    transform: translateY(-3px);
}

.card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.card-body {
    padding: 20px;
}

.card-body h3 {
    margin: 0;
}

/* =========================
   CARD TYPE BADGE
   ========================= */

.card-type {
    display: inline-block;
    margin-bottom: 12px;
    padding: 3px 9px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 999px;
    opacity: 0.9;
}

/* =========================
   artefakt (RESTORED ORIGINAL FEEL)
   ========================= */

.artefakt {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* =========================
   artefakt IMAGE / CONTENT (WICHTIG RESTORE)
   ========================= */

.artefakt-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 20px;
    display: block;
}

.artefakt-content {
    font-size: 16px;
    line-height: 1.7;
}

.artefakt-content img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

/* =========================
   TALENTPUZZLE (ORIGINAL RESTORED)
   ========================= */

.talentpuzzle-selector {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0;
    margin-bottom: 25px;
    overflow: visible;
}

.talentpuzzle-item {
    position: relative;
    display: inline-block;
    padding: 6px 10px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
    white-space: nowrap;
    opacity: 0.45;
    z-index: 1;
}

.talentpuzzle-item.active {
    opacity: 1;
    z-index: 5;
}

/* TAB-EFFEKT (WICHTIG ORIGINAL) */
.talentpuzzle-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: -8px;
    background: inherit;
    z-index: -1;
}

/* =========================
   artefakt HEADER (NEU – SAFE INTEGRATION)
   ========================= */

.artefakt-title{

    grid-area:title;

    font-size:28px;

    font-weight:bold;

    line-height:1.2;

    margin:0;

    min-width:0;

    overflow-wrap:anywhere;

}

.artefakt-meta{

    grid-area:meta;

    display:flex;

    flex-direction:column;

    gap:4px;

    font-size:14px;

}

/* =========================
   CONTENT BLOCKS (ORIGINAL RESTORED)
   ========================= */

.content-block {
    padding: 40px;
    background: var(--block-color);
    color: var(--text-color);
    overflow: hidden;
}

.content-block-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
    background: transparent;
}

.content-block-label {
    font-size: 24px;
    font-weight: bold;
}

.content-block-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

.content-block-icon svg {
    width: 100%;
    height: 100%;
}

/* FIX: TEXT ABSTÄNDE (WICHTIG!) */
.content-block-body {
    color: inherit;
    line-height: 1.8;
}

.content-block-body > *:first-child {
    margin-top: 0;
}

.content-block-body > *:last-child {
    margin-bottom: 0;
}

.content-block-body img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;          /* FIX: kein Cropping mehr */
    border-radius: 12px;
    margin: 25px 0;
}

.content-block-body figure {
    margin: 25px 0;
}

/* =========================
   BACKLINK
   ========================= */

.backlink {
    margin-top: 30px;
}

.backlink a {
    color: #2f7d4d;
    text-decoration: none;
    font-weight: 500;
}

.backlink a:hover {
    text-decoration: underline;
}

/* =========================
   GALLERY (FIXED)
   ========================= */

.artefakt-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 30px;
}

.artefakt-gallery img {
    width: 100%;
    height: auto; /* FIX */
    object-fit: cover;
    border-radius: 8px;
}

/* =========================
   PDF
   ========================= */

.pdf-download {
    margin-top: 25px;
}

/* =========================
   RELATED ARTEFACTS
   ========================= */

.related-artefacts{
    background: var(--block-color);
    color: var(--text-color);
    padding:40px;
}

.related-artefacts h2{
    margin-bottom:20px;
    font-size:28px;
    text-align: center;
}

.related-artefacts .hub-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
}

@media (max-width:900px){

    .related-artefacts .hub-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }

}

@media (max-width:600px){

    .related-artefacts .hub-grid{
        grid-template-columns:1fr;
    }

}

/* =========================
   SITE HEADER
   ========================= */

.site-header {
    background: white;
    border-bottom: 1px solid #ddd;
    padding: 20px;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.site-logo img {
    max-height: 70px;
    width: auto;
    display: block;
}

.site-nav {
    display: flex;
    gap: 12px;
}

.site-nav a {
    display: inline-flex;
    padding: 10px 18px;
    border-radius: 20px;
    background: #2f7d4d;
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.site-nav a:hover {
    opacity: 0.85;
}


/* =========================
   FOOTER
   ========================= */

.site-footer {
    margin-top: 60px;
    background: white;
    border-top: 1px solid #ddd;
    padding: 25px 20px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.site-footer nav {
    display: flex;
    gap: 20px;
}

.site-footer a {
    color: #2f7d4d;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}


/* MOBILE */

@media(max-width:700px){

    .header-inner,
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        flex-wrap: wrap;
    }

}

/* =========================
   artefakt HEADER
   ========================= */

.artefakt-header {

    display: grid;
    grid-template-columns: 1fr 120px;
    grid-template-areas:
        "title corner"
        "meta  corner";

    gap: 12px;

    padding: 20px 30px;

    color: #fff;

    align-items: start;
}

.artefakt-title {

    grid-area: title;

    margin: 0;

    font-size: 28px;
    font-weight: bold;
    line-height: 1.2;

    min-width: 0;

    overflow-wrap: anywhere;
    hyphens: auto;
}

.artefakt-meta {

    grid-area: meta;

    display: flex;
    flex-direction: column;
    gap: 4px;

    font-size: 14px;
}

/* =========================
   HEADER IMAGE
   ========================= */

.artefakt-corner {

    grid-area: corner;

    width: 120px;
    height: 90px;

    justify-self: end;

    overflow: hidden;

    clip-path: polygon(
        0 0,
        100% 0,
        100% 65%,
        20% 100%
    );

    border-bottom-left-radius: 20px;

    position: relative;
}

.artefakt-corner img {

    width: 100%;
    height: 100%;

    object-fit: cover;

    opacity: .55;
}

.artefakt-corner span {

    position: absolute;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    width: 90%;

    text-align: center;

    font-size: clamp(11px, 2vw, 20px);

    font-weight: 800;

    letter-spacing: 1px;

    text-transform: uppercase;

    text-shadow: 1px 1px 2px rgba(0,0,0,.4);

    white-space: nowrap;
}

/* =========================
   DESKTOP
   ========================= */

@media (min-width: 768px) {

    .artefakt-header {

        grid-template-columns: 1fr 220px;
    }

    .artefakt-corner {

        width: 220px;
        height: 150px;

        border-bottom-left-radius: 25px;
    }

    .artefakt-title {

        font-size: 36px;
    }

    .artefakt-meta {

        font-size: 15px;
    }

}