/* Kontener główny - perspektywa 3D */
.aflo-flip-container {
    background-color: transparent;
    perspective: 1000px;
    width: 100%;
    position: relative;
    cursor: pointer;
}

/* Wewnętrzny obracający się element */
.aflo-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transform-style: preserve-3d;
}

/* Wspólne cechy dla przodu i tyłu */
.aflo-flip-front, 
.aflo-flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px; /* Opcjonalne zaokrąglenie, pasuje do nowoczesnego designu */
    overflow: hidden;
}

/* --- STRONA 1 (PRZÓD) --- */
.aflo-flip-front {
    display: flex;
    align-items: flex-end; /* Wyrównanie do dołu */
    justify-content: center;
}

/* Gradient pod tytułem */
.aflo-flip-front::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    z-index: 1;
    pointer-events: none;
}

/* Tytuł z przodu */
.aflo-front-content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
}

/* Ikona Plusa */
.aflo-plus-icon {
    position: absolute;
    top: 15px;
    right: 20px;
    z-index: 2;
    line-height: 1;
    font-weight: 300;
}

/* --- STRONA 2 (TYŁ) --- */
.aflo-flip-back {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Blenda nakładana na zdjęcie */
.aflo-flip-back::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Kontent z tyłu */
.aflo-back-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    color: #fff;
}

/* Przycisk animowany (Podkreślenie) */
.aflo-back-btn-wrapper {
    margin-top: 20px;
}

.aflo-btn-animated {
    color: #fff;
    text-decoration: none;
    position: relative;
    display: inline-block;
    padding-bottom: 2px;
    font-weight: 600;
}

/* Delikatna animacja podkreślenia w stylu awwwards */
.aflo-btn-animated::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.aflo-btn-animated:hover {
    color: #fff; /* Zapobiega nadpisywaniu przez domyślne style motywu */
}

.aflo-btn-animated:hover::after {
    width: 100%;
}