/* --- Wrapper (Tylko dla ręcznej listy) --- */
.wa-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

/* --- Karta (Główny styl) --- */
.wa-card {
    background-color: var(--wp--preset--color--white);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%; /* Rozciągnij do wysokości kontenera (Query Loop) */
    position: relative;
    box-shadow: var(--wa-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-bottom: 3px solid transparent; /* Miejsce na niebieski pasek */
}

/* Specjalny fix dla Query Loop - karta zajmuje 100% szerokości kolumny */
.wa-card.is-loop-item {
    width: 100%;
    margin: 0;
}

/* Hover Efekt całej karty */
.wa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
    border-bottom-color: var(--wp--preset--color--primary);
}

/* --- Media (Zdjęcie) --- */
.wa-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9; /* Stałe proporcje zdjęć */
    background-color: var(--wp--preset--color--grey-200);
    overflow: hidden;
}

.wa-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.wa-card:hover .wa-card__img {
    transform: scale(1.05); /* Zoom zdjęcia */
}

/* --- Treść --- */
.wa-card__content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Wypycha stopkę na sam dół */
}

.wa-card__title {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
}

.wa-card__title a {
    text-decoration: none;
    color: var(--wp--preset--color--grey-500-text);
    transition: color 0.3s ease;
}

.wa-card:hover .wa-card__title a {
    color: var(--wp--preset--color--primary);
}

.wa-card__excerpt {
    font-size: 0.95rem;
    color: var(--wp--preset--color--grey-600-text);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1; /* Ważne dla wyrównania wysokości kart */
}

.wa-card__excerpt p {
    margin: 0;
}

/* --- Stopka (Data i przycisk) --- */
.wa-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 15px;
}

.wa-card__date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--wp--preset--color--grey-400);
}

/* --- Przycisk Czytaj Dalej --- */
.wa-card__readmore {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--wp--preset--color--primary);
    text-decoration: none;
    
    /* Ukryte domyślnie */
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

/* Pokaż przycisk na hover karty */
.wa-card:hover .wa-card__readmore {
    opacity: 1;
    transform: translateX(0);
}

/* Animacja strzałki na hover przycisku */
.wa-card__readmore:hover svg {
    transform: translateX(3px);
    transition: transform 0.2s ease;
}

/* Responsywność - na mobile pokazujemy przycisk zawsze */
@media (max-width: 768px) {
    .wa-card__readmore {
        opacity: 1;
        transform: translateX(0);
    }
}


/* --- NOWE STYLE: HERO (Standalone) --- */

.wa-hero-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 100%;
    /* To zapewnia, że blok domyślnie zajmuje 100% dostępnego kontenera */
    max-width: 100%; 
}

/* Opcjonalnie: Jeśli motyw nie obsługuje dobrze alignwide/alignfull automatycznie */
.wa-hero-wrapper.alignwide {
    max-width: var(--wp--style--global--wide-size);
    margin-left: auto;
    margin-right: auto;
}

.wa-hero-wrapper.alignfull {
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
}

.wa-hero {
    position: relative;
    width: 100%;
    /* Wysokość bannera - dostosuj wg uznania, np. 400px lub proporcje */
    aspect-ratio: 2.35/1; 
    min-height: 300px;
    border-radius: 12px;
    overflow: hidden;
    border-bottom: 4px solid transparent; /* Miejsce na niebieski pasek */
}

/* Responsywność wysokości na mobile */
@media (max-width: 768px) {
    .wa-hero {
        aspect-ratio: 16/9;
    }
}

.wa-hero__link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

.wa-hero__media {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}

.wa-hero:hover .wa-hero__media {
    transform: scale(1.03);
}

.wa-hero:hover {
    border-bottom-color: var(--wp--preset--color--primary);
}

.wa-hero__placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--wp--preset--color--grey-800);
}

/* Ciemny gradient na dole, żeby napisy były czytelne */
.wa-hero__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    pointer-events: none;
}

/* Kontener treści */
.wa-hero__content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

/* Data w białym "chipie" */
.wa-hero__date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--wp--preset--color--white);
    color: var(--wp--preset--color--grey-800);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Tytuł */
.wa-hero__title {
    margin: 0;
    color: var(--wp--preset--color--white);
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.2;
/*     text-shadow: 0 2px 4px rgba(0,0,0,0.3); */
}

/* Mobile font size */
@media (max-width: 768px) {
    .wa-hero__title {
        font-size: 1.4rem;
    }
    .wa-hero__content {
        padding: 20px;
    }
}