.block-section-newsletter {
    padding: 4rem 0;
    overflow: hidden;
}

.section-newsletter__layout {
    display: flex;
    align-items: stretch;
    max-width: var(--container-wide);
    margin-inline: auto;
    padding-inline: var(--container-pad);
}

/* ── Dark box ──────────────────────────────────────────────────── */
.section-newsletter__box {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    background-color: var(--color-dark-navy);
    border-radius: 16px;
    overflow: hidden;
}

/* Decorative wave shapes */
.section-newsletter__box::before,
.section-newsletter__box::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.section-newsletter__box::before {
    width: 560px;
    height: 560px;
    background-color: rgba(0, 25, 45, 0.7);
    right: -80px;
    bottom: -200px;
}

.section-newsletter__box::after {
    width: 380px;
    height: 380px;
    background-color: rgba(0, 20, 38, 0.6);
    right: 60px;
    top: -160px;
}

.section-newsletter__box-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    padding: 3rem;
    min-height: 400px;
}

/* ── Top row: title + discover link ───────────────────────────── */
.section-newsletter__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
}

.section-newsletter__title {
    color: var(--color-white);
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 400;
    line-height: 1.1;
    max-width: 22ch;
}

.section-newsletter__discover {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-white);
    font-size: var(--font-size-small);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
    transition: opacity var(--transition-base);
}

.section-newsletter__discover:hover {
    opacity: 0.75;
}

/* ── Category tags ────────────────────────────────────────────── */
.section-newsletter__cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.newsletter-cat {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    background-color: #ccdae3;
    color: var(--color-primary);
    font-family: var(--font-family-base);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: background-color var(--transition-base), color var(--transition-base);
    white-space: nowrap;
}

.newsletter-cat img {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.newsletter-cat:hover {
    background-color: #b8ccda;
}

.newsletter-cat--active {
    background-color: var(--color-white);
    color: var(--color-primary);
    font-weight: 600;
}

.newsletter-cat--active:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

/* ── Form ─────────────────────────────────────────────────────── */
.section-newsletter__form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-newsletter__input-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-newsletter__input-row input[type="email"] {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    font-family: var(--font-family-base);
    font-size: var(--font-size-small);
    outline: none;
    transition: border-color var(--transition-base);
}

.section-newsletter__input-row input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.section-newsletter__input-row input[type="email"]:focus {
    border-color: rgba(255, 255, 255, 0.6);
}

/* Submit: inverted pill (white bg, dark text + dark circle icon) */
.section-newsletter__submit {
    display: inline-flex;
    align-items: center;
    gap: 0;
    padding: 0;
    background-color: var(--color-white);
    border: none;
    border-radius: 100px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    transition: background-color var(--transition-base);
}

.section-newsletter__submit:hover {
    background-color: rgba(255, 255, 255, 0.88);
}

.section-newsletter__submit-label {
    padding: 0.5rem 1rem 0.5rem 1.25rem;
    font-family: var(--font-family-base);
    font-size: var(--font-size-small);
    font-weight: 400;
    color: var(--color-dark-navy);
    white-space: nowrap;
    line-height: 1;
}

.section-newsletter__submit-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background-color: var(--color-dark-navy);
    color: var(--color-white);
    border-radius: 50%;
    margin: 3px;
    flex-shrink: 0;
}

/* Privacy checkbox */
.section-newsletter__privacy {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    cursor: pointer;
    font-size: var(--font-size-small);
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.45;
}

.section-newsletter__privacy input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--color-white);
    width: 14px;
    height: 14px;
    cursor: pointer;
}

.section-newsletter__privacy a {
    color: var(--color-white);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── Illustration ─────────────────────────────────────────────── */
.section-newsletter__illus {
    flex: 0 0 auto;
    width: clamp(200px, 28%, 400px);
    margin-left: -60px;
    background-image: url('../../../assets/newslettr-img.png');
    background-repeat: no-repeat;
    background-position: bottom center;
    background-size: contain;
}

/* ── Accessibility ────────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 900px) {
    .section-newsletter__layout {
        flex-direction: column;
    }

    .section-newsletter__illus {
        margin-left: 0;
        width: 100%;
        max-width: 280px;
        align-self: center;
    }
}

@media (max-width: 640px) {
    .section-newsletter__box-inner {
        padding: 2rem 1.5rem;
        gap: 1.25rem;
    }

    .section-newsletter__top {
        flex-direction: column;
        gap: 0.75rem;
    }

    .section-newsletter__input-row {
        flex-direction: column;
        align-items: stretch;
    }

    .section-newsletter__submit {
        align-self: flex-start;
    }
}
