/* ========================================= */
/*  Galerie-Grid                             */
/* ========================================= */

.fang-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 22px;
    width: 100%;
    margin-top: 25px;
}


/* ========================================= */
/*  Einzelne Kachel (Card)                   */
/* ========================================= */

.fang-item {
    background: #fff;
    border: 1px solid rgba(11,79,46,0.12);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fang-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}


/* ========================================= */
/*  Bildbereich – Querformat & Hochformat    */
/* ========================================= */

/* Standard: Hochkant oder unbekannt → nicht beschneiden */
.fang-item img {
    width: 100%;
    height: auto;
    max-height: 260px;          /* Hochkant-Bilder begrenzen */
    object-fit: contain;        /* nicht beschneiden */
    display: block;
    border-radius: 12px 12px 0 0;
    background: #f8f8f8;        /* dezente Letterbox-Farbe */
}

/* Querformat (wenn per PHP Klasse gesetzt) */
.fang-item img.landscape {
    height: 220px;              /* Einheitliche Höhe */
    max-height: none;
    object-fit: cover;          /* Zuschneiden erlaubt */
    background: none;
}

/* Mobile: etwas kompakter */
@media (max-width: 600px) {
    .fang-item img {
        max-height: 220px;
    }
    .fang-item img.landscape {
        height: 180px;
    }
}


/* ========================================= */
/*  Textbereich                              */
/* ========================================= */

.fang-info {
    padding: 14px 14px 16px;
    font-size: 15px;
    line-height: 1.5;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.fang-info strong {
    color: var(--blue);
    font-weight: 600;
}

.fang-info p {
    margin: 0;
}


/* ========================================= */
/*  Sanfte Fade-In Animation                 */
/* ========================================= */

.fang-item {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.35s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
