.blog-page {
    min-height: 540px;
    padding: 1px 0 80px;
    background: #f8f9fc;
}

.blog-page-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-right: 16px;
    padding-left: 16px;
    box-sizing: border-box;
}

.blog-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin: 30px 0;
}

.view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--main-color, #280396);
    border-radius: 7px;
    background: #fff;
    color: var(--main-color, #280396);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.view-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.view-btn:hover,
.view-btn:focus-visible,
.view-btn.active {
    background: var(--main-color, #280396);
    color: #fff;
    transform: translateY(-1px);
}

.blog-list {
    display: flex;
    gap: 30px;
    width: 100%;
}

.blog-list.grid-view {
    flex-flow: row wrap;
}

.blog-list.list-view {
    flex-direction: column;
}

.blog-item {
    display: flex;
    gap: 25px;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(31, 22, 68, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 38px rgba(31, 22, 68, 0.12);
}

.blog-item img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    object-fit: cover;
}

.blog-image-link {
    display: block;
    width: 320px;
    height: auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    align-self: flex-start;
    flex-shrink: 0;
}

.blog-image-link img {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.blog-date {
    display: block;
    margin-bottom: 9px;
    color: #8b8797;
    font-size: 13px;
}

.blog-content {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 25px 25px 25px 0;
}

.blog-content h3 {
    margin: 0 0 12px;
    color: var(--main-color, #280396);
    font-size: 22px;
    text-transform: uppercase;
}

.blog-excerpt {
    margin: 0;
    color: #666;
    line-height: 1.65;
}

.btn-read {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    padding: 10px 18px;
    border-radius: 7px;
    background: var(--main-color, #280396);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-read:hover,
.btn-read:focus-visible {
    background: var(--main-color-hover, #210470);
    color: #fff;
    transform: translateY(-1px);
}

.blog-list.grid-view .blog-item {
    flex-direction: column;
    width: calc(33.333% - 20px);
    gap: 0;
    align-self: stretch;
}

.blog-list.grid-view .blog-image-link {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    align-self: stretch;
}

.blog-list.grid-view .blog-content {
    flex: 1;
    justify-content: flex-start;
    padding: 22px;
}

.blog-list.grid-view .blog-content h3 {
    min-height: 59px;
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.blog-list.grid-view .blog-excerpt {
    min-height: 106px;
    margin-bottom: 15px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
}

.blog-list.grid-view .btn-read {
    margin-top: auto;
}

/* List view: image fills the card from top to bottom. */
.blog-list.list-view .blog-item {
    height: 236px;
    min-height: 236px;
    gap: 0;
    align-items: stretch;
}

.blog-list.list-view .blog-image-link {
    width: 420px;
    height: 100%;
    aspect-ratio: auto;
    align-self: stretch;
    background: #f1f1f4;
}

.blog-list.list-view .blog-image-link img {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto;
    object-fit: contain;
}

.blog-list.list-view .blog-content {
    min-width: 0;
    padding: 18px 24px;
    flex: 1;
    justify-content: center;
}

.blog-list.list-view .blog-date {
    margin-bottom: 7px;
}

.blog-list.list-view .blog-content h3 {
    margin-bottom: 8px;
    display: -webkit-box;
    overflow: hidden;
    font-size: 21px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.blog-list.list-view .blog-excerpt {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.blog-list.list-view .btn-read {
    margin-top: 12px;
    padding: 9px 16px;
}

.blog-empty-state {
    width: 100%;
    padding: 70px 24px;
    border: 1px dashed rgba(40, 3, 150, 0.24);
    border-radius: 14px;
    background: #fff;
    text-align: center;
}

.blog-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin-bottom: 20px;
    border-radius: 50%;
    background: rgba(40, 3, 150, 0.08);
    color: var(--main-color, #280396);
}

.blog-empty-icon svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.blog-empty-state h2 {
    margin: 0 0 10px;
    color: var(--main-color, #280396);
    font-size: 25px;
    font-weight: 700;
}

.blog-empty-state p {
    max-width: 520px;
    margin: 0 auto;
    color: #6b6b72;
    line-height: 1.6;
}

/* Newsletter banner below the blog posts. */
.blog-newsletter-banner {
    padding: 0 16px 88px;
    background: #f8f9fc;
}

.blog-newsletter-inner {
    position: relative;
    width: 100%;
    max-width: 1168px;
    min-height: 210px;
    margin: 0 auto;
    padding: 42px 48px;
    display: flex;
    align-items: center;
    gap: 28px;
    overflow: hidden;
    box-sizing: border-box;
    color: #ffffff;
    background:
        radial-gradient(circle at 92% 15%, rgba(255, 255, 255, 0.18), transparent 25%),
        linear-gradient(135deg, var(--main-color, #280396), #1b025d);
    border-radius: 22px;
    box-shadow: 0 20px 50px rgba(40, 3, 150, 0.2);
}

.blog-newsletter-inner::before {
    position: absolute;
    right: -70px;
    bottom: -120px;
    width: 290px;
    height: 290px;
    content: "";
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
}

.blog-newsletter-icon {
    position: relative;
    z-index: 1;
    width: 76px;
    height: 76px;
    display: flex;
    flex: 0 0 76px;
    align-items: center;
    justify-content: center;
    color: var(--main-color, #280396);
    font-size: 30px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 30px rgba(8, 2, 31, 0.22);
}

.blog-newsletter-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
    flex: 1;
}

.blog-newsletter-copy > span {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.blog-newsletter-copy h2 {
    margin: 0 0 10px;
    color: #ffffff !important;
    font-size: clamp(27px, 3vw, 38px);
    font-weight: 700;
    line-height: 1.15;
}

.blog-newsletter-copy p {
    max-width: 690px;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 16px;
    line-height: 1.6;
}

.blog-newsletter-button {
    position: relative;
    z-index: 1;
    min-width: 238px;
    height: 58px;
    padding: 0 24px;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 11px;
    box-sizing: border-box;
    color: var(--main-color, #280396);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    background: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 11px;
    box-shadow: 0 12px 28px rgba(8, 2, 31, 0.22);
    cursor: pointer;
    transition: color 0.25s ease, background-color 0.25s ease,
                box-shadow 0.25s ease, transform 0.25s ease;
}

.blog-newsletter-button:hover,
.blog-newsletter-button:focus-visible {
    color: #ffffff;
    background: transparent;
    box-shadow: 0 16px 34px rgba(8, 2, 31, 0.3);
    transform: translateY(-2px);
}

body.blog-subscribe-open {
    overflow: hidden;
}

.blog-subscribe-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s ease, opacity 0.3s ease;
}

.blog-subscribe-modal.is-open {
    visibility: visible;
    opacity: 1;
}

.blog-subscribe-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 10, 48, 0.74);
    backdrop-filter: blur(7px);
}

.blog-subscribe-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 550px;
    max-height: calc(100vh - 48px);
    padding: 48px 46px 38px;
    overflow-y: auto;
    box-sizing: border-box;
    text-align: center;
    background:
        radial-gradient(circle at 100% 0, rgba(40, 3, 150, 0.12), transparent 34%),
        #ffffff;
    border: 1px solid rgba(40, 3, 150, 0.1);
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(20, 10, 48, 0.36);
    transform: translateY(22px) scale(0.97);
    transition: transform 0.3s ease;
}

.blog-subscribe-modal.is-open .blog-subscribe-dialog {
    transform: translateY(0) scale(1);
}

.blog-subscribe-close {
    position: absolute;
    top: 15px;
    right: 17px;
    width: 42px;
    height: 42px;
    padding: 0;
    color: #5d5968;
    font-family: inherit;
    font-size: 32px;
    font-weight: 300;
    line-height: 1;
    background: #f2effa;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.blog-subscribe-close:hover,
.blog-subscribe-close:focus-visible {
    color: #ffffff;
    background: var(--main-color, #280396);
}

.blog-subscribe-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 29px;
    background: var(--main-color, #280396);
    border-radius: 20px;
    box-shadow: 0 14px 30px rgba(40, 3, 150, 0.27);
}

.blog-subscribe-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--main-color, #280396);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.blog-subscribe-dialog h2 {
    margin: 0 0 14px;
    color: #2f3038 !important;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
}

.blog-subscribe-intro {
    margin: 0 0 25px;
    color: #6b6973;
    font-size: 16px;
    line-height: 1.6;
}

.blog-subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.blog-subscribe-form label > span {
    display: block;
    margin-bottom: 7px;
    color: #35343b;
    font-size: 14px;
    font-weight: 600;
}

.blog-subscribe-form input {
    width: 100%;
    height: 54px;
    padding: 0 16px;
    box-sizing: border-box;
    color: #2f3038;
    font: inherit;
    background: #f8f7fb;
    border: 1px solid #ded9eb;
    border-radius: 10px;
    outline: none;
}

.blog-subscribe-form input:focus {
    border-color: var(--main-color, #280396);
    box-shadow: 0 0 0 4px rgba(40, 3, 150, 0.1);
}

.blog-subscribe-form > button {
    width: 100%;
    height: 56px;
    margin-top: 5px;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    background: var(--main-color, #280396);
    border: 2px solid var(--main-color, #280396);
    border-radius: 10px;
    cursor: pointer;
}

.blog-subscribe-form > button:hover,
.blog-subscribe-form > button:focus-visible {
    background: var(--main-color-hover, #210470);
    border-color: var(--main-color-hover, #210470);
}

.blog-subscribe-status {
    min-height: 20px;
    margin: 0;
    color: var(--main-color, #280396);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    text-align: center;
}

.blog-subscribe-privacy {
    margin: 4px 0 0;
    color: #8a8790;
    font-size: 12px;
    line-height: 1.5;
}

.blog-article-page {
    padding-top: 140px;
}

.blog-article {
    max-width: 900px;
    padding: 42px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 35px rgba(31, 22, 68, 0.08);
}

.blog-back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: var(--main-color, #280396);
    font-weight: 600;
    text-decoration: none;
}

.blog-article h1 {
    margin: 0 0 24px;
    color: var(--main-color, #280396);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
}

.blog-article-image {
    width: 100%;
    max-height: 520px;
    margin-bottom: 32px;
    border-radius: 12px;
    object-fit: cover;
}

.blog-article-content {
    color: #3f3d47;
    font-size: 17px;
    line-height: 1.8;
}

.blog-article-content img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 991px) {
    .blog-list.grid-view .blog-item {
        width: calc(50% - 15px);
    }

    .blog-item {
        flex-direction: column;
    }

    .blog-image-link,
    .blog-list.list-view .blog-image-link {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .blog-list.list-view .blog-item {
        height: auto;
        min-height: 0;
    }

    .blog-list.list-view .blog-image-link img {
        aspect-ratio: 16 / 9;
    }

    .blog-content,
    .blog-list.list-view .blog-content {
        padding: 22px;
    }

    .blog-newsletter-inner {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .blog-newsletter-button {
        margin-left: 104px;
    }
}

@media (max-width: 768px) {
    .blog-page {
        padding-bottom: 55px;
    }

    .blog-page-container {
        padding-right: 12px;
        padding-left: 12px;
    }

    .blog-toolbar {
        display: none;
    }

    .blog-list,
    .blog-list.grid-view,
    .blog-list.list-view {
        flex-direction: column;
        padding-top: 24px;
    }

    .blog-list.grid-view .blog-item,
    .blog-list.list-view .blog-item {
        width: 100%;
    }

    .blog-image-link,
    .blog-list.grid-view .blog-image-link {
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .blog-content h3 {
        font-size: 18px;
    }

    .blog-list.grid-view .blog-content h3,
    .blog-list.grid-view .blog-excerpt {
        min-height: 0;
    }

    .blog-excerpt {
        font-size: 14px;
    }

    .blog-empty-state {
        padding: 52px 20px;
    }

    .blog-empty-state h2 {
        font-size: 22px;
    }

    .blog-newsletter-banner {
        padding: 0 12px 62px;
    }

    .blog-newsletter-inner {
        padding: 34px 24px;
        align-items: center;
        flex-direction: column;
        gap: 20px;
        text-align: center;
        border-radius: 18px;
    }

    .blog-newsletter-icon {
        width: 66px;
        height: 66px;
        flex-basis: 66px;
        font-size: 27px;
        border-radius: 17px;
    }

    .blog-newsletter-copy h2 {
        font-size: 28px;
    }

    .blog-newsletter-button {
        width: 100%;
        margin-left: 0;
    }

    .blog-subscribe-modal {
        padding: 14px;
    }

    .blog-subscribe-dialog {
        max-height: calc(100vh - 28px);
        padding: 44px 22px 28px;
        border-radius: 18px;
    }

    .blog-subscribe-dialog h2 {
        font-size: 26px;
    }

    .blog-article-page {
        padding-top: 95px;
    }

    .blog-article {
        padding: 25px 18px;
    }
}
