/* Native web rendering for newsletter content.
   Most block styling comes from inline `style=` attributes set by the renderer
   (colors, padding, font sizes mirror the email). This stylesheet handles
   layout, responsive behavior, and a few resets that would be awkward inline. */

.newsletter {
    margin: 0 auto;
    box-sizing: border-box;
}

.newsletter * {
    box-sizing: border-box;
}

.newsletter-content > .nl-block:first-child > * {
    margin-top: 0;
}

/* Text block content */
.newsletter .nl-text p,
.newsletter .nl-text h1,
.newsletter .nl-text h2,
.newsletter .nl-text h3,
.newsletter .nl-text h4,
.newsletter .nl-text ul,
.newsletter .nl-text ol {
    margin: 0 0 12px 0;
}

.newsletter .nl-text p:last-child,
.newsletter .nl-text ul:last-child,
.newsletter .nl-text ol:last-child {
    margin-bottom: 0;
}

.newsletter .nl-text a {
    color: inherit;
    text-decoration: underline;
}

/* Images */
.newsletter .nl-image {
    line-height: 0;
}

/* Columns: stack on narrow viewports. */
.newsletter .nl-columns {
    align-items: flex-start;
}

@media (max-width: 600px) {
    .newsletter .nl-columns {
        flex-direction: column;
        gap: 0 !important;
    }
    .newsletter .nl-column {
        flex: 1 1 100% !important;
        width: 100%;
    }
}

/* Buttons: ensure tappable target on mobile */
.newsletter .nl-button a {
    line-height: 1.2;
}

/* Social links */
.newsletter .nl-social a {
    line-height: 0;
}

/* Alignment helpers (rarely needed since text-align is inline) */
.newsletter .nl-align-center { text-align: center; }
.newsletter .nl-align-left   { text-align: left; }
.newsletter .nl-align-right  { text-align: right; }

/* Header */
.newsletter .nl-header img {
    line-height: 0;
}

/* Link card */
.newsletter .nl-link-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.newsletter .nl-link-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.newsletter .nl-link-card-horizontal .nl-link-card-image {
    width: 160px;
    min-height: 100%;
}

.newsletter .nl-link-card-vertical {
    flex-direction: column;
}

.newsletter .nl-link-card-vertical .nl-link-card-image {
    width: 100%;
    aspect-ratio: 1.91 / 1;
}

@media (max-width: 500px) {
    .newsletter .nl-link-card-horizontal {
        flex-direction: column;
    }
    .newsletter .nl-link-card-horizontal .nl-link-card-image {
        width: 100%;
        aspect-ratio: 1.91 / 1;
    }
}
