/* ============================================================================
   GardenPortal – Externe Links | Version 1.01
   Gestaltung nach dem Vorbild der Insektenbibliothek.
   Alle Einstellungen sind auf #gp-links begrenzt.
   ============================================================================ */

/* ============================================================================
   1. ZENTRALE EINSTELLUNGEN
   Farben, Größen, Card-Hintergrund, Logo-Fläche und Abstände.
   CSS-Hintergrundbilder werden relativ zum Speicherort gp_links.css aufgelöst.
   ============================================================================ */
#gp-links {
    --gpl-max-width: 1400px;
    --gpl-columns: 3;
    --gpl-gap: 22px;
    --gpl-green: #4E8F3B;
    --gpl-dark: #315C3C;
    --gpl-text: #333333;
    --gpl-muted: #666666;
    --gpl-border: #737070;
    --gpl-border-width: 4px;
    --gpl-radius: 15px;
    --gpl-shadow: 15px 15px 10px rgba(0, 0, 0, .3);

    /* Gesamte Card: Farbe, Verlauf ODER Bild möglich */
    --gpl-card-bg: linear-gradient(rgba(255,255,255,0.40)), url('../images/metallische_Oberflaeche gold_gelb_glossy.webp');

    /* Logo-Bereich: unabhängig vom übrigen Card-Hintergrund */
    --gpl-logo-bg: #FFFFFF;
    --gpl-logo-bg-image: linear-gradient(rgba(255,255,255,0.40)), url("../images/metallische_Oberflaeche gruen_glossy.webp");
    --gpl-logo-bg-size: cover;
    --gpl-logo-bg-position: center center;
    --gpl-logo-bg-repeat: no-repeat;
    --gpl-logo-height: 200px;
    --gpl-logo-padding: 5px;
    --gpl-logo-border-bottom: 3px solid #000000;
    --gpl-logo-image-max-width: 100%;
    --gpl-logo-image-max-height: 100%;

    /* Texte und Schaltflächen */
    --gpl-title-size: 21px;
    --gpl-body-size: 17px;
    --gpl-button-bg: linear-gradient(to top, #4E8F3B, #FFFFFF);
    --gpl-button-color: #000000;

    display: flow-root;
    width: 100%;
    max-width: var(--gpl-max-width);
    margin: 0 auto;
    color: var(--gpl-text);
    font: var(--gpl-body-size)/1.5 Arial, Helvetica, sans-serif;
}

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

/* ============================================================================
   2. SEITENÜBERSCHRIFT UND EINLEITUNG
   ============================================================================ */
#gp-links .gpl-heading {
    margin: 0 0 18px;
    color: var(--gpl-dark);
    font-size: clamp(28px, 4vw, 42px);
}

#gp-links .gpl-intro {
    margin: 0 0 20px;
}

/* ============================================================================
   3. SUCHLEISTE UND KATEGORIEFILTER
   ============================================================================ */
#gp-links .gpl-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    padding: 15px;
    border: 4px solid var(--gpl-border);
    border-radius: var(--gpl-radius);
    background: linear-gradient(rgba(255,255,255,0.40)), url("../images/metallische_Oberflaeche gruen_glossy.webp") !important;
}

#gp-links .gpl-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#gp-links .gpl-filter,
#gp-links .gpl-visit {
    padding: 10px 14px;
    border: 2px solid var(--gpl-dark);
    border-radius: 12px;
    background: var(--gpl-button-bg);
    color: var(--gpl-button-color);
    font: 700 15px/1.3 Arial, sans-serif;
    text-decoration: none;
    cursor: pointer;
}

#gp-links .gpl-filter:hover,
#gp-links .gpl-filter.is-active,
#gp-links .gpl-visit:hover {
    background: url('../images/Jahresbalken_hellgrau.webp');
}

#gp-links .gpl-search {
    min-width: min(100%, 270px);
    padding: 10px;
    border: 1px solid #AEB7AD;
    border-radius: 10px;
    font: inherit;
}

#gp-links .gpl-count {
    margin: 0 0 12px;
    color: var(--gpl-muted);
    font-size: 14px;
}

/* ============================================================================
   4. CARD-GRID: ANZAHL SPALTEN UND ABSTÄNDE
   ============================================================================ */
#gp-links .gpl-grid {
    display: grid;
    grid-template-columns: repeat(var(--gpl-columns), minmax(0, 1fr));
    gap: var(--gpl-gap);
    align-items: stretch;
}

/* ============================================================================
   5. CARD: RAHMEN, RUNDUNG, HINTERGRUND UND SCHATTEN
   ============================================================================ */
#gp-links .gpl-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: var(--gpl-border-width) solid var(--gpl-border);
    border-radius: var(--gpl-radius);
    background: var(--gpl-card-bg);
	background-size: cover;
    box-shadow: var(--gpl-shadow);
}

#gp-links .gpl-card[hidden] {
    display: none !important;
}

/* ============================================================================
   6. LOGO-BEREICH: HINTERGRUND, LOGOGRÖSSE UND TRENNLINIE
   Beispiel für Textur: --gpl-logo-bg-image: url('../images/textur.webp');
   Beispiel für Verlauf: --gpl-logo-bg-image: linear-gradient(#EEE, #FFF);
   ============================================================================ */
#gp-links .gpl-logo {
    display: flex;
    height: var(--gpl-logo-height);
    align-items: center;
    justify-content: center;
    padding: var(--gpl-logo-padding);
    border-bottom: var(--gpl-logo-border-bottom);
    background-color: var(--gpl-logo-bg);
    background-image: var(--gpl-logo-bg-image);
    background-size: var(--gpl-logo-bg-size);
    background-position: var(--gpl-logo-bg-position);
    background-repeat: var(--gpl-logo-bg-repeat);
}

#gp-links .gpl-logo img {
    display: block;
    width: auto;
    height: auto;
    max-width: var(--gpl-logo-image-max-width);
    max-height: var(--gpl-logo-image-max-height);
    object-fit: contain;
}

#gp-links .gpl-logo-placeholder {
    color: var(--gpl-dark);
    font-size: 16px;
    font-weight: 700;
    text-align: center;
}

/* ============================================================================
   7. CARD-TEXT: TITEL UND KURZBESCHREIBUNG
   ============================================================================ */
#gp-links .gpl-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

#gp-links .gpl-title {
    margin: 0 0 12px;
    color: var(--gpl-dark);
    font-size: var(--gpl-title-size);
	font-weight:700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

#gp-links .gpl-short {
    margin: 0 0 16px;
}

/* ============================================================================
   8. AUFKLAPPBARE WEITERFÜHRENDE INFORMATIONEN
   ============================================================================ */
#gp-links .gpl-details {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #000000;
	font-size: var(--gpl-title-size);
}

#gp-links .gpl-details summary {
    color: var(--gpl-dark);
    font-weight: 700;
    cursor: pointer;
}

#gp-links .gpl-details summary:hover {
	color: #B62920;
}

#gp-links .gpl-details p {
    margin: 12px 0 0;
    white-space: pre-line;
	font-size: 16px;
	font-weight: 500;
}

/* ============================================================================
   9. EXTERNER LINK-BUTTON
   Öffnung in neuem Register wird im JavaScript über target=_blank gesteuert.
   ============================================================================ */
#gp-links .gpl-visit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    gap: 8px;
    margin-top: 16px;
}

#gp-links .gpl-empty {
    padding: 20px;
    text-align: center;
}

/* ============================================================================
   10. WWB-INTEGRATION: DYNAMISCHE MODULHÖHE / FOOTER
   Keine Abhängigkeit von wechselnden IDs wie Html2 oder Html3.
   LG_Cont bei abweichendem LayoutGrid-Namen gegebenenfalls anpassen.
   ============================================================================ */
body div:has(> #gp-links) {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}

body #wb_LG_Cont:has(#gp-links),
body #LG_Cont:has(#gp-links),
body #LG_Cont:has(#gp-links) > .row,
body #LG_Cont:has(#gp-links) > .row > [class^="col-"] {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
}

/* ============================================================================
   11. RESPONSIVE DARSTELLUNG: TABLET / SMARTPHONE
   ============================================================================ */
@media (max-width: 1050px) {
    #gp-links .gpl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    #gp-links .gpl-grid {
        grid-template-columns: 1fr;
    }

    #gp-links .gpl-search {
        width: 100%;
    }

    #gp-links .gpl-content {
        padding: 15px;
    }
}
