/* Blog “Nieuws” listing page — hero, toolbar, grid, CTA (CMS elements) */

.hp-blog-page-hero {
    --hp-blog-hero-cream: #f9f3ed;
    /* ~half viewport on laptop; scales down on smaller screens */
    --hp-blog-listing-hero-height: clamp(280px, min(36vw, 50vh), 520px);
    /* Match Shopware .container content inset (1400px max-width + gutter) */
    --hp-blog-content-max: 1400px;
    --hp-blog-content-gutter: var(--bs-gutter-x, 1.5rem);
    --hp-blog-content-inset: max(
        var(--hp-blog-content-gutter),
        calc((100vw - min(100vw, var(--hp-blog-content-max))) / 2 + var(--hp-blog-content-gutter))
    );

    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    box-sizing: border-box;
}

.hp-blog-page-hero--viewport .page-hero-main {
    min-height: var(--hp-blog-listing-hero-height);
    max-height: var(--hp-blog-listing-hero-height);
    overflow: hidden;
}

.hp-blog-page-hero .page-hero-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
}

/* Title: vertically centred in the left column, aligned to the left (centre-left) */
.hp-blog-page-hero__left {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.hp-blog-page-hero .page-hero-left-inner {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    padding: 2rem var(--hp-blog-content-gutter) 2rem var(--hp-blog-content-inset);
    box-sizing: border-box;
}

.hp-blog-page-hero .page-hero-header {
    text-align: left;
    width: 100%;
}

.hp-blog-page-hero__title {
    font-size: 65px;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: #2a2a2a;
    margin: 0;
}

.hp-blog-page-hero__right {
    min-width: 0;
    min-height: 0;
    height: 100%;
    position: relative;
    display: flex;
    align-items: stretch;
    background: #e8e8e8;
}

.hp-blog-page-hero__img {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: var(--hp-blog-listing-hero-height, 520px);
    object-fit: cover;
    object-position: center;
    display: block;
}

.hp-blog-page-hero__placeholder {
    width: 100%;
    height: 100%;
    min-height: 280px;
    background: #ddd;
}

/* Space between hero (title + image) and search */
.hp-blog-news-toolbar {
    width: 100%;
    box-sizing: border-box;
    margin-top: clamp(1.75rem, 4vw, 3rem);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Search field: fixed half of the content width */
.hp-blog-news-toolbar__form {
    /* Funksioni i kërkimit mbetet, vetëm fshihet pamja (kërkesë e klientit) */
    display: none;
    width: 50%;
    max-width: 50%;
    box-sizing: border-box;
}

.hp-blog-news-toolbar__search {
    display: block;
    width: 100%;
    max-width: none;
    padding: 0.65rem 1.25rem;
    border: 1px solid #ccc;
    border-radius: 999px;
    font-size: 1rem;
    background: #fff;
    box-sizing: border-box;
}

.hp-blog-news-toolbar__search:focus {
    outline: 2px solid #a2c61e;
    outline-offset: 2px;
    border-color: #a2c61e;
}

.hp-blog-news-toolbar__heading {
    font-size: 40px;
    font-weight: 700;
    margin: 1.25rem 0 0;
    color: #111;
    text-align: left;
    width: 100%;
}

/* News grid */
.hp-blog-news-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem 2.5rem;
}

.hp-blog-news-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
}

.hp-blog-news-card:hover .hp-blog-news-card__title {
    text-decoration: underline;
}

.hp-blog-news-card__thumb {
    flex: 0 0 120px;
    width: 120px;
    height: 120px;
    overflow: hidden;
    background: #f0f0f0;
}

.hp-blog-news-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hp-blog-news-card__thumb-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e5e5e5 0%, #f8f8f8 100%);
}

.hp-blog-news-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.hp-blog-news-card__title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #111;
}

.hp-blog-news-card__date {
    font-size: 0.875rem;
    color: #888;
}

.hp-blog-news-empty {
    text-align: center;
    color: #666;
    padding: 3rem 1rem;
}

/* Pagination */
.hp-blog-news-pagination {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}

.hp-blog-news-pagination__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
}

.hp-blog-news-pagination__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.25rem 0.35rem;
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    text-decoration: none;
    border: none;
    background: none;
    cursor: pointer;
}

.hp-blog-news-pagination__link:hover:not(.is-active):not(.is-disabled) {
    color: #a2c61e;
}

.hp-blog-news-pagination__link.is-active {
    color: #a2c61e;
}

.hp-blog-news-pagination__link.is-disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

/* CTA banner */
.hp-blog-news-cta {
    margin-top: 3.5rem;
    padding: 3rem 2rem;
    background-color: #4a5a3a;
    background-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)), var(--hp-blog-cta-bg, none);
    background-size: cover;
    background-position: center;
    color: #fff;
}

.hp-blog-news-cta__inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.hp-blog-news-cta__headline {
    font-size: 2.25rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: #fff;
}

.hp-blog-news-cta__text {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.95);
}

.hp-blog-news-cta__btn {
    display: inline-block;
    padding: 0.65rem 1.75rem;
    border-radius: 999px;
    background: #a2c61e;
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
    border: none;
}

.hp-blog-news-cta__btn:hover {
    filter: brightness(1.08);
    color: #fff !important;
}

@media (max-width: 991.98px) {
    .hp-blog-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-blog-news-cta__inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .hp-blog-news-cta__headline {
        font-size: 1.5rem;
    }

    .hp-blog-page-hero .page-hero-main {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
    }

    .hp-blog-page-hero--viewport .page-hero-main {
        min-height: 0;
        max-height: none;
    }

    .hp-blog-page-hero__title {
        font-size: 2rem;
    }

    .hp-blog-page-hero__right {
        height: clamp(200px, 52vw, min(360px, 45vh));
        min-height: 200px;
    }

    .hp-blog-page-hero__img {
        min-height: 0;
        height: 100%;
        max-height: none;
    }

    .hp-blog-news-grid {
        grid-template-columns: 1fr;
    }

    .hp-blog-news-card__thumb {
        flex-basis: 96px;
        width: 96px;
        height: 96px;
    }

    .hp-blog-news-toolbar__form {
        width: 100%;
        max-width: 100%;
    }
}
