/* =========================================
   4. STYLE BLOGA - ASYMETRYCZNY MASONRY LAYOUT
   ========================================= */

/* Kontener dla postów - CSS Grid Masonry Style */
.blog-posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px 30px;
    margin-bottom: 4rem;
}

/* Asymetria - co drugi post jest większy/inny */
.post-card:nth-child(3n + 1) {
    grid-column: span 1;
}

.post-card:nth-child(3n + 2) {
    grid-column: span 1;
    transform: translateY(30px); /* Przesunięcie w dół */
}

.post-card:nth-child(3n + 3) {
    grid-column: span 1;
    transform: translateY(15px); /* Lekkie przesunięcie */
}

/* Karta posta - z animacją */
.post-card {
    background: rgba(40, 35, 30, 0.75); /* Ciemny beż zamiast białego */
    backdrop-filter: blur(8px); /* Zmniejszone z 12px dla wydajności */
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid var(--col-accent);
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 8px 20px rgba(0,0,0,0.4), /* Zmniejszone z 10px/30px */
        inset 0 1px 0 rgba(255,255,255,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Uproszczone */
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

/* Warstwa "podłoża" pod kartą */
.post-card::after {
    content: "";
    position: absolute;
    top: 8px;
    left: 8px;
    right: -8px;
    bottom: -8px;
    background: linear-gradient(135deg,
        rgba(197, 160, 101, 0.15) 0%,
        rgba(197, 160, 101, 0.05) 100%
    );
    border-radius: 12px;
    z-index: -1;
    opacity: 0.6;
    filter: blur(6px); /* Zmniejszone z 8px */
}

/* Efekt hover - podniesienie + obróć */
.post-card:hover {
    transform: translateY(-8px); /* Zmniejszone z -10px */
    box-shadow:
        0 15px 35px rgba(0,0,0,0.5), /* Zmniejszone z 20px/50px */
        inset 0 1px 0 rgba(255,255,255,0.15);
}

.post-card:hover::after {
    opacity: 0.8;
    filter: blur(8px); /* Zmniejszone z 12px */
}

/* Co drugi post ma inny kierunek hover */
.post-card:nth-child(even):hover {
    transform: translateY(-8px);
}

/* Złoty akcent na górze karty */
.post-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--col-accent) 20%,
        var(--col-accent-light) 50%,
        var(--col-accent) 80%,
        transparent 100%
    );
    opacity: 1;
    z-index: 10;
}

/* Zdjęcie w karcie */
.post-card-img {
    height: 280px;
    object-fit: cover;
    width: 100%;
    border-bottom: 1px solid var(--col-border);
    opacity: 0.9;
    transition: all 0.5s ease;
    filter: grayscale(20%);
}

.post-card:hover .post-card-img {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.05);
}

/* Placeholder gdy brak zdjęcia */
.post-card-img-placeholder {
    background: linear-gradient(135deg, #2C3E30 0%, #1A241E 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--col-accent);
    font-size: 4rem;
}

.post-card:hover .post-card-img-placeholder {
    transform: scale(1) rotate(5deg);
}

/* Treść karty */
.post-card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background: transparent;
}

/* Data - złoty akcent */
.post-date {
    color: var(--col-accent-light);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    display: block;
    font-family: var(--font-body);
}

/* Tytuł posta */
.post-title {
    font-size: 1.7rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-family: var(--font-heading);
}

.post-title a {
    color: var(--col-heading); /* Jasny na ciemnym tle */
    transition: all 0.3s ease;
}

.post-title a:hover {
    color: var(--col-accent-light);
    text-shadow: 0 0 10px rgba(197, 160, 101, 0.3);
}

/* Zajawka tekstu */
.post-excerpt {
    color: var(--col-text-muted); /* Jasnoszary */
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
    font-family: var(--font-body);
}

/* Komunikat gdy brak postów */
.no-posts-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(40, 35, 30, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 2px dashed var(--col-accent);
    border-radius: 12px;
}

.no-posts-message h3 {
    color: var(--col-accent);
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.no-posts-message p {
    color: var(--col-text-muted);
    font-size: 1.1rem;
}
