/**
 * NGO Angebote - Frontend Styles
 * 
 * Styles für die Anzeige der Angebote auf der Website
 */

/* ==========================================================================
   Variablen
   ========================================================================== */
:root {
    --ngo-primary: #1a6bb5;
    --ngo-secondary: #4a9a3e;
    --ngo-text: #4a4a4a;
    --ngo-light: #f8f9fa;
    --ngo-border: #e9ecef;
    --ngo-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --ngo-radius: 12px;
    --ngo-transition: all 0.3s ease;
}

/* ==========================================================================
   Grid Layout
   ========================================================================== */
.ngo-angebote-grid {
    display: grid;
    gap: 24px;
    width: 100%;
}

/* Einzelnes Angebot: nicht links kleben, sondern mittig platzieren.
   (Weitere Angebote füllen das Raster dann normal von links.) */
.ngo-angebote-grid > .ngo-angebot-card:only-child {
    grid-column: 1 / -1;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

.ngo-angebote-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.ngo-angebote-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ngo-angebote-grid.columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* Responsive */
@media (max-width: 1200px) {
    .ngo-angebote-grid.columns-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .ngo-angebote-grid.columns-4,
    .ngo-angebote-grid.columns-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ngo-angebote-grid.columns-4,
    .ngo-angebote-grid.columns-3,
    .ngo-angebote-grid.columns-2 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Angebot Card
   ========================================================================== */
.ngo-angebot-card {
    background: #fff;
    border-radius: var(--ngo-radius);
    box-shadow: var(--ngo-shadow);
    overflow: hidden;
    transition: var(--ngo-transition);
    display: flex;
    flex-direction: column;
}

.ngo-angebot-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Image Container – Hochkant (3:4), formatfüllend zugeschnitten */
.ngo-angebot-image {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: var(--ngo-light);
}

.ngo-angebot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ngo-angebot-card:hover .ngo-angebot-image img {
    transform: scale(1.05);
}

/* Badges */
.ngo-angebot-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--ngo-primary);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ngo-angebot-online {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--ngo-secondary);
    color: #fff;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ngo-angebot-online::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Content */
.ngo-angebot-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Datum */
.ngo-angebot-datum {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ngo-primary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.ngo-angebot-datum svg {
    flex-shrink: 0;
    opacity: 0.8;
}

/* Titel */
.ngo-angebot-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Excerpt */
.ngo-angebot-excerpt {
    color: var(--ngo-text);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ort */
.ngo-angebot-ort {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #666;
    font-size: 13px;
    margin-bottom: 15px;
}

.ngo-angebot-ort svg {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Footer */
.ngo-angebot-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--ngo-border);
    margin-top: auto;
}

/* Mitglied */
.ngo-angebot-mitglied {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.ngo-mitglied-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

/* Preis */
.ngo-angebot-preis {
    font-size: 16px;
    font-weight: 700;
    color: var(--ngo-secondary);
}

/* Actions */
.ngo-angebot-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Buttons */
.ngo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--ngo-transition);
    cursor: pointer;
    border: none;
    flex: 1;
    text-align: center;
}

.ngo-btn-primary {
    background: linear-gradient(135deg, var(--ngo-primary) 0%, #2d8cb8 100%);
    color: #fff;
}

.ngo-btn-primary:hover {
    background: linear-gradient(135deg, #15568f 0%, var(--ngo-primary) 100%);
    color: #fff;
    transform: translateY(-2px);
}

.ngo-btn-secondary {
    background: var(--ngo-light);
    color: var(--ngo-primary);
    border: 1px solid var(--ngo-border);
}

.ngo-btn-secondary:hover {
    background: var(--ngo-primary);
    color: #fff;
    border-color: var(--ngo-primary);
}

/* ==========================================================================
   No Angebote Message
   ========================================================================== */
.ngo-no-angebote {
    text-align: center;
    padding: 60px 20px;
    background: var(--ngo-light);
    border-radius: var(--ngo-radius);
    color: #666;
    font-size: 16px;
}

/* ==========================================================================
   Single Angebot Page
   ========================================================================== */
.single-ngo_angebot .ngo-angebot-single {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.single-ngo_angebot .ngo-angebot-header {
    text-align: center;
    margin-bottom: 40px;
}

.single-ngo_angebot .ngo-angebot-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.single-ngo_angebot .ngo-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.single-ngo_angebot .ngo-angebot-content {
    font-size: 16px;
    line-height: 1.8;
}

.single-ngo_angebot .ngo-angebot-sidebar {
    background: var(--ngo-light);
    padding: 30px;
    border-radius: var(--ngo-radius);
    margin-top: 40px;
}

/* ==========================================================================
   Instagram-Style Feed
   ========================================================================== */
.ngo-angebote-feed {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ngo-feed-item {
    background: #fff;
    border-radius: var(--ngo-radius);
    box-shadow: var(--ngo-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: row;
}

.ngo-feed-item .ngo-feed-image {
    width: 200px;
    flex-shrink: 0;
}

.ngo-feed-item .ngo-feed-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ngo-feed-item .ngo-feed-content {
    padding: 20px;
    flex: 1;
}

@media (max-width: 600px) {
    .ngo-feed-item {
        flex-direction: column;
    }
    
    .ngo-feed-item .ngo-feed-image {
        width: 100%;
        aspect-ratio: 16 / 9;
    }
}

/* ==========================================================================
   Animation
   ========================================================================== */
.ngo-angebot-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.ngo-angebot-card:nth-child(1) { animation-delay: 0.1s; }
.ngo-angebot-card:nth-child(2) { animation-delay: 0.2s; }
.ngo-angebot-card:nth-child(3) { animation-delay: 0.3s; }
.ngo-angebot-card:nth-child(4) { animation-delay: 0.4s; }
.ngo-angebot-card:nth-child(5) { animation-delay: 0.5s; }
.ngo-angebot-card:nth-child(6) { animation-delay: 0.6s; }
.ngo-angebot-card:nth-child(7) { animation-delay: 0.7s; }
.ngo-angebot-card:nth-child(8) { animation-delay: 0.8s; }

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