/* === Flip Cards – Aktualności (z poprawioną responsywnością) === */
.flip-cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    padding: 2rem 1rem;
}

.flip-card {
    width: 280px;
    aspect-ratio: 4 / 3; /* ← KLUCZOWE: zawsze 4:3 */
    perspective: 1000px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* Na tabletach i mobile */
@media (max-width: 768px) {
    .flip-cards-grid {
        gap: 1.25rem;
        padding: 1.5rem 0.75rem;
    }

    .flip-card {
        width: calc(50% - 0.625rem); /* 2 kolumny z odstępem */
        /* aspect-ratio nadal = 4/3 → wysokość automatyczna */
    }
}

@media (max-width: 480px) {
    .flip-card {
        width: 100%;
        /* wysokość = 100% * 3/4 = 75% szerokości */
    }
}

/* Reszta bez zmian... */
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background-size: cover;
    background-position: center;
}

/* Tył z tłem bg_home03.jpg */
.flip-card-back {
    transform: rotateY(180deg);
    background-image: url('https://domrozwoju.edu.pl/wp-content/uploads/2022/06/bg_home03.jpg');
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.25rem;
    text-align: center;
    color: white;
    position: relative;
}

.flip-card-back::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.flip-card-back > * {
    position: relative;
    z-index: 2;
}

.flip-card-back h3 {
    font-size: 1.2rem;
    line-height: 1.3;
    margin: 0 0 0.75rem;
	color:white;
}

.flip-card-back p {
    font-size: 1rem;
    font-weight: bold;
    margin: 0;
}

/* Hover i animacje */
.flip-card:hover {
    transform: translateY(-4px);
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}