.eca-card-archive-wrapper{
    width:100%;
    position:relative;
    padding-bottom:24px; /* odstęp od kolejnych sekcji */
}

.eca-card-grid{
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items:stretch;
}

.eca-card{
    perspective:1200px;
    cursor:pointer;
    position:relative;
    outline:none;
    width:100%;
    max-width:100%;
}

.eca-card-inner{
    position:relative;
    width:100%;
    /* Auto (domyślnie): stabilne proporcje 3:4 + fallback */
    height:0;
    padding-bottom:133.3333%;
    aspect-ratio: 3 / 4;
    transition:transform .6s ease;
    transform-style:preserve-3d;
}

.eca-card-flipped .eca-card-inner{ transform:rotateY(180deg); }

.eca-card-front,
.eca-card-back{
    position:absolute;
    inset:0;
    backface-visibility:hidden;
    -webkit-backface-visibility:hidden;
    overflow:hidden;
}

.eca-card-front{
    display:flex;
    align-items:center;
    justify-content:center;
}

.eca-card-image-wrapper{ width:100%; height:100%; }

.eca-card-image{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.eca-card-image-placeholder{
    width:100%;
    height:100%;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f3f3f3;
    padding:10px;
    text-align:center;
    font-size:14px;
}

.eca-card-back{
    transform:rotateY(180deg);
    display:flex;
    align-items:center;
    justify-content:center;
}

.eca-card-back-content{
    padding:16px;
    text-align:left;
    display:flex;
    flex-direction:column;
    gap:12px;
    height:100%;
    box-sizing:border-box;
}

.eca-card-title{ margin:0; font-size:16px; font-weight:600; }
.eca-card-excerpt{ font-size:14px; line-height:1.4; flex-grow:1; }

.eca-card-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:10px 18px;
    text-decoration:none;
    font-size:14px;
    font-weight:600;
    background:#000;
    color:#fff;
    border-radius:999px;
    transition:transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.eca-card-button:hover{
    transform:translateY(-1px);
    box-shadow:0 4px 10px rgba(0,0,0,.15);
    opacity:.95;
}

.eca-card-archive-no-posts{
    font-size:14px;
    color:#666;
    text-align:center;
    padding:20px 0;
}

/* Paginacja */
.eca-pagination-wrapper{ margin-top:24px; text-align:center; }
.eca-pagination-wrapper ul.page-numbers{
    list-style:none;
    margin:0;
    padding:0;
    display:inline-flex;
    flex-wrap:wrap;
    gap:8px;
}
.eca-pagination-wrapper .page-numbers{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:32px;
    height:32px;
    padding:0 8px;
    font-size:14px;
    text-decoration:none;
    border:1px solid rgba(0,0,0,.1);
    background-color:#fff;
    color:#333;
    cursor:pointer;
    transition:background-color .15s ease, color .15s ease, border-color .15s ease, transform .1s ease;
}
.eca-pagination-wrapper .page-numbers:hover{ transform:translateY(-1px); border-color:rgba(0,0,0,.25); }
.eca-pagination-wrapper .page-numbers.current{ font-weight:600; background-color:#000; color:#fff; }

/* Fallback mobile: 1 kolumna jeśli coś nie podmieni kolumn */
@media (max-width: 767px){
    .eca-card-grid{ grid-template-columns: 1fr; }
}
