/* ============================================
   AKTEUR-KARTEN & DETAILANSICHT
   Template: Helix Ultimate (JoomShaper)
   Plugin:   SIGE – Simple Image Gallery
   Kategorie: Akteure & Programmpunkte

   Ablageort:
   Inhalt einfuegen in:
   Backend → Erweiterungen → Templates → Helix Ultimate
           → Custom Code Tab → CSS-Bereich
   ODER als Datei:
   /templates/shaper_helixultimate/css/custom.css
   ============================================ */


/* ============================================
   TEIL 1: KATEGORIE-BLOG (Kachel-Uebersicht)
   ============================================ */

/* Grid-Container: Helix-Spalten neutralisieren,
   alle Karten in ein einheitliches CSS-Grid */
.blog-items {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

/* Helix-Row-Wrapper transparent machen,
   damit Karten direkt ins Grid fliessen */
.blog-items .items-row {
    display: contents !important;
}

/* Bootstrap-Spalten zuruecksetzen */
.blog-items [class*="col-"] {
    max-width: 100% !important;
    flex: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
}


/* ---- Einzelne Karte ---- */

.akteur-card {
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.akteur-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
}

/* Gesamte Karte klickbar */
.akteur-card__link-wrapper {
    text-decoration: none !important;
    color: inherit !important;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.akteur-card__link-wrapper:hover,
.akteur-card__link-wrapper:focus {
    text-decoration: none !important;
    color: inherit !important;
}


/* ---- Bild: Feste 16:10 Aspect-Ratio ---- */
/* Egal welche Bildgroesse SIGE liefert,
   object-fit: cover normalisiert alles */

.akteur-card__image {
    position: relative;
    width: 100%;
    padding-top: 62.5%;          /* 16:10 Ratio */
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}

.akteur-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;           /* Bild fuellt Container */
    object-position: center;     /* Zentriert zuschneiden */
}

/* Platzhalter wenn kein Bild vorhanden */
.akteur-card__placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    font-size: 3rem;
}


/* ---- Content-Bereich ---- */

.akteur-card__content {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.akteur-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #1a1a2e;
    line-height: 1.3;
}

.akteur-card__desc {
    font-size: 0.88rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
    flex: 1;
}

.akteur-card__more {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
    margin-top: auto;
    transition: color 0.2s ease;
}

.akteur-card:hover .akteur-card__more {
    color: #1d4ed8;
}


/* ============================================
   TEIL 2: ARTIKEL-EINZELANSICHT (Detailseite)
   ============================================ */

/* Navigation */
.akteur-detail__nav {
    margin-bottom: 1.5rem;
}

.akteur-detail__back {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.akteur-detail__back:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Hero-Bild */
.akteur-detail__hero {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.akteur-detail__hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Titel */
.akteur-detail__header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
}

/* Artikeltext */
.akteur-detail__body {
    font-size: 1rem;
    line-height: 1.7;
    color: #374151;
    margin-bottom: 2rem;
}


/* ---- SIGE-Galerie (.sigFreeImg) ---- */

/* Parent-Container: Alle .sigFreeImg in ein Grid */
.akteur-detail__body > div:has(.sigFreeImg),
.akteur-detail__body > p:has(.sigFreeImg) {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Einzelne Bild-Wrapper */
.akteur-detail__body .sigFreeImg {
    display: block;
    margin: 0;
    padding: 0;
}

/* Bilder einheitlich darstellen */
.akteur-detail__body .sigFreeImg img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.2s ease;
    cursor: pointer;
    display: block;
}

.akteur-detail__body .sigFreeImg img:hover {
    transform: scale(1.03);
}

/* Links innerhalb SIGE: kein Unterstrich */
.akteur-detail__body .sigFreeImg a {
    text-decoration: none;
    display: block;
}

/* Fallback fuer aeltere Browser ohne :has() */
@supports not (selector(:has(*))) {
    .akteur-detail__body .sigFreeImg {
        display: inline-block;
        width: calc(33.33% - 0.75rem);
        margin: 0.25rem;
        vertical-align: top;
    }
}


/* Footer / Zurueck-Button */
.akteur-detail__footer {
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    margin-top: 2rem;
}

.akteur-detail__back-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}

.akteur-detail__back-btn:hover {
    background: #1d4ed8;
}


/* ============================================
   TEIL 3: RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 991px) {
    .blog-items {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)) !important;
        gap: 1rem;
    }
}

/* Mobil */
@media (max-width: 575px) {
    .blog-items {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.75rem;
    }

    .akteur-card__content {
        padding: 0.85rem;
    }

    .akteur-card__title {
        font-size: 0.95rem;
    }

    .akteur-card__desc {
        display: none;
    }

    .akteur-card__more {
        display: none;
    }

    .akteur-detail__header h1 {
        font-size: 1.5rem;
    }

    .akteur-detail__hero {
        max-height: 250px;
        border-radius: 6px;
    }

    .akteur-detail__body > div:has(.sigFreeImg),
    .akteur-detail__body > p:has(.sigFreeImg) {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .akteur-detail__body .sigFreeImg img {
        height: 120px;
    }

    @supports not (selector(:has(*))) {
        .akteur-detail__body .sigFreeImg {
            width: calc(50% - 0.5rem);
        }
    }
}

/* Sehr kleine Displays */
@media (max-width: 380px) {
    .blog-items {
        grid-template-columns: 1fr !important;
    }
}
/* Abstand */
#sp-main-body {
    padding-top: 20px !important;
}