/* Container & Grid-Steuerung */
.bg-pgp-container {
    width: 100%;
    margin: 20px 0;
}

/* Filter & Suche - Desktop Standard */
.bg-pgp-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    align-items: center;
}

.bg-pgp-controls input, 
.bg-pgp-controls select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: #fff;
    box-sizing: border-box; /* Wichtig für korrekte Breitenberechnung */
}

/* Suchfeld nimmt auf Desktop den restlichen Platz ein, Select hat feste Breite */
#bg-pgp-search {
    flex-grow: 1;
}

#bg-pgp-filter {
    min-width: 250px;
}

/* Grid-System 3x3 */
.bg-pgp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    background-color: #ffffff;
}

/* Partner Feld 4:3 & Hover Effekt */
.bg-pgp-item {
    cursor: pointer;
    background: #ffffff;
    transition: all 0.3s ease;
    border: 1px solid #eeeeee;
}

.bg-pgp-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-color: #cccccc;
}

.bg-pgp-logo-wrapper {
    position: relative;
    width: 100%;
    padding-top: 75%; /* 4:3 Ratio */
    background: #ffffff;
    overflow: hidden;
}

.bg-pgp-logo-wrapper img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

/* Modal Styling */
.bg-pgp-modal {
    display: none;
    position: fixed;
    z-index: 999999 !important;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

.bg-pgp-modal-content {
    background: #ffffff;
    padding: 40px;
    width: 90%;
    max-width: 650px;
    border-radius: 4px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.bg-pgp-modal-header h2 {
    font-size: 32px !important;
    margin-top: 5% !important;
    line-height: 1.2;
    color: #333;
    text-align: left;
}

.bg-pgp-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 35px;
    cursor: pointer;
}

.bg-pgp-meta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

body.bg-modal-open {
    overflow: hidden;
}

/* ==========================================================================
   Media Queries für Mobile Ansicht
   ========================================================================== */

@media (max-width: 900px) {
    .bg-pgp-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    /* Suche und Filter übereinander und volle Breite */
    .bg-pgp-controls {
        flex-direction: column;
        align-items: stretch; /* Dehnt Kinder auf volle Breite */
        gap: 10px;
    }

    .bg-pgp-controls input, 
    .bg-pgp-controls select {
        width: 100%;
        margin: 0;
    }

    .bg-pgp-grid {
        grid-template-columns: 1fr;
    }

    .bg-pgp-modal-content {
        padding: 25px;
        width: 95%;
    }

    .bg-pgp-modal-header h2 {
        font-size: 26px !important;
    }
}