/**
 * Single newsletter post (view_newsletter.php) — layout, content, related grid, form rail.
 */

/* Beat theme style.css `.single .site-inner { max-width:1140px !important }` */
body.ep-newsletter-single .site-inner,
body.ep-newsletter-single .content-sidebar-wrap,
body.single-post.ep-newsletter-single .site-inner {
	max-width: none !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

html {
	scrollbar-gutter: stable;
}

.newsletter-single-container {
    width: 100%;
    max-width: 1290px;
    margin: 16px auto 0 !important;
    font-family: sans-serif;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "main"
        "form";
    align-items: start;
    box-sizing: border-box;
    row-gap: clamp(1.5rem, 1.2rem + 1vw, 2rem);
    column-gap: clamp(2rem, 1.5rem + 2vw, 3.5rem);
}
body.epsh-has-top-bar .newsletter-single-container {
    margin-top: 72px !important;
}

.newsletter-main-wrap {
    grid-area: main;
    min-width: 0;
    width: 100%;
}

.newsletter-form-sidebar {
    grid-area: form;
}


.newsletter-single-header {
    text-align: left;
    border-bottom: 2px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 0;
    padding-bottom: clamp(0.875rem, 0.8rem + 0.3vw, 1.25rem);
}

.newsletter-single-header .ep-breadcrumbs {
    margin: 0 0 8px;
    padding: 0 0 8px;
    border-bottom: 1px solid #e8eef5;
    font-size: 0.8125rem;
    line-height: 1.5;
    word-break: break-word;
}

.newsletter-single-title {
    font-weight: 600;
    color: #1472ba;
    margin: 0 0 clamp(0.75rem, 0.68rem + 0.25vw, 1rem);
    line-height: 1.4;
    letter-spacing: -0.3px;
}

.newsletter-single-meta {
    font-size: 14px;
    color: #777;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    min-height: 50px;
}

.newsletter-single-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.newsletter-single-featured-image {
    margin: 0 0 24px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.newsletter-single-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.newsletter-single-content {
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
    color: #333;
    font-weight: 400;
}

.newsletter-single-content h2 {
    font-weight: 600;
    color: #1472ba;
    line-height: 1.4;
    letter-spacing: -0.2px;
}

.newsletter-single-content h3 {
    font-weight: 600;
    color: #1472ba;
    line-height: 1.4;
    letter-spacing: -0.2px;
}

.newsletter-single-content h4 {
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.newsletter-single-content h5 {
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.newsletter-single-content h6 {
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.newsletter-single-content p {
    line-height: 1.8;
    color: #333;
}

.newsletter-single-content ul {
    list-style-type: disc !important;
    list-style-position: outside;
    padding-left: 30px !important;
}

.newsletter-single-content ol {
    list-style-type: decimal !important;
    list-style-position: outside;
    padding-left: 30px !important;
}

.newsletter-single-content li {
    list-style-position: outside;
    display: list-item;
}

/* Ensure ordered lists show numbers */
.newsletter-single-content ol li {
    list-style-type: decimal !important;
    display: list-item;
}

/* Color ordered list numbers (markers only) */
.newsletter-single-content ol li::marker {
    color: #1472ba !important;
    font-weight: 600;
}

/* Keep text color as is, only numbers will be colored */
.newsletter-single-content ol li {
    color: inherit;
}

/* Ensure unordered lists show bullets */
.newsletter-single-content ul li {
    list-style-type: disc !important;
    display: list-item;
}

.newsletter-single-content blockquote {
    border-left: 4px solid #1472ba;
    font-style: italic;
    color: #555;
}

/* Default content images — cap width; banner/link-cards override below */
.newsletter-single-content img {
    max-width: min(100%, 640px);
    width: auto;
    height: auto !important;
    border-radius: 8px;
}

/* WordPress media library sizes */
.newsletter-single-content img.size-thumbnail,
.newsletter-single-content img.avatar,
.newsletter-single-content img[class*="avatar"] {
    max-width: 120px;
    width: auto;
    height: auto !important;
}

.newsletter-single-content img.size-medium {
    max-width: min(100%, 320px);
    width: auto;
    height: auto !important;
}

.newsletter-single-content img.size-large {
    max-width: min(100%, 720px);
    width: auto;
    height: auto !important;
}

/* Editor size utilities (match AMP single-newsletter) */
.newsletter-single-content img.img-100,
.newsletter-single-content img.size-small {
    max-width: 100px !important;
    width: auto;
    height: auto !important;
}

.newsletter-single-content img.img-120 {
    max-width: 120px !important;
    width: auto;
    height: auto !important;
}

.newsletter-single-content img.img-small {
    max-width: min(50%, 360px) !important;
    width: auto;
    height: auto !important;
}

.newsletter-single-content img.img-medium {
    max-width: min(70%, 520px) !important;
    width: auto;
    height: auto !important;
}

/* Float / align on the image itself (class is on img, not only parent) */
.newsletter-single-content img.alignleft,
.newsletter-single-content img[style*="float: left"],
.newsletter-single-content img[style*="float:left"] {
    float: left;
    margin: 0 20px 16px 0;
    width: auto;
    max-width: min(48%, 320px);
    height: auto !important;
}

.newsletter-single-content .alignleft img,
.newsletter-single-content figure.alignleft,
.newsletter-single-content .wp-block-image.alignleft {
    float: left;
    max-width: min(48%, 320px);
    margin-right: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
    height: auto !important;
}

.newsletter-single-content img.alignright,
.newsletter-single-content img[style*="float: right"],
.newsletter-single-content img[style*="float:right"] {
    float: right;
    margin: 0 0 16px 20px;
    width: auto;
    max-width: min(48%, 320px);
    height: auto !important;
}

.newsletter-single-content .alignright img,
.newsletter-single-content figure.alignright,
.newsletter-single-content .wp-block-image.alignright {
    float: right;
    max-width: min(48%, 320px);
    margin-left: 20px;
    margin-top: 10px;
    margin-bottom: 10px;
    height: auto !important;
}

.newsletter-single-content img.alignleft.img-120,
.newsletter-single-content img.alignright.img-120 {
    max-width: 120px !important;
}

.newsletter-single-content img.alignleft.img-100,
.newsletter-single-content img.alignright.img-100,
.newsletter-single-content img.alignleft.size-small,
.newsletter-single-content img.alignright.size-small {
    max-width: 100px !important;
}

/* Block editor figures — do not treat every figure as full-width centered */
.newsletter-single-content figure.wp-block-image:not(.alignleft):not(.alignright) {
    max-width: min(100%, 640px);
    margin-left: auto;
    margin-right: auto;
}

.newsletter-single-content figure.wp-block-image img {
    max-width: 100%;
    width: auto;
    height: auto !important;
}

/* Center aligned images only */
.newsletter-single-content img[style*="margin-left: auto"],
.newsletter-single-content img[style*="margin-right: auto"],
.newsletter-single-content .aligncenter,
.newsletter-single-content .aligncenter img,
.newsletter-single-content figure.aligncenter,
.newsletter-single-content .wp-block-image.aligncenter {
    display: block;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center;
    height: auto !important;
    max-width: min(100%, 640px);
}

/* WordPress block editor center alignment */
.newsletter-single-content figure.aligncenter,
.newsletter-single-content .wp-block-image.aligncenter {
    text-align: center;
}

.newsletter-single-content figure.aligncenter img,
.newsletter-single-content .wp-block-image.aligncenter img {
    display: block;
    margin: 0 auto;
    height: auto !important;
}

/* Banner only — full text-column width (beats aligncenter/640px caps; padding beats margin:0 !important) */
.newsletter-single-content > p:first-of-type:has(img),
.newsletter-single-content > figure:first-of-type:has(img),
.newsletter-single-content > figure.wp-block-image:first-of-type:not(.alignleft):not(.alignright) {
    padding-top: 40px;
    width: 100%;
    max-width: 100% !important;
    margin-top: 0 !important;
    margin-bottom: var(--ep-article-media-space, 1.25rem);
}

.newsletter-single-content > p:first-of-type > a:first-child:has(> img) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

.newsletter-single-content > p:first-of-type > img:first-child:not(.img-100):not(.img-120):not(.img-small):not(.img-medium):not(.size-small):not(.alignleft):not(.alignright),
.newsletter-single-content > p:first-of-type > a:first-child > img:not(.img-100):not(.img-120):not(.img-small):not(.img-medium):not(.size-small):not(.alignleft):not(.alignright),
.newsletter-single-content > figure:first-of-type:not(.alignleft):not(.alignright) > img:not(.img-100):not(.img-120):not(.img-small):not(.img-medium):not(.size-small),
.newsletter-single-content > figure.wp-block-image:first-of-type:not(.alignleft):not(.alignright) img:not(.img-100):not(.img-120):not(.img-small):not(.img-medium):not(.size-small) {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
    object-fit: initial;
}

/* Videos - normal styling */
.newsletter-single-content video,
.newsletter-single-content iframe[src*="youtube"],
.newsletter-single-content iframe[src*="vimeo"],
.newsletter-single-content iframe {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.newsletter-single-content a {
    color: #1472ba;
    text-decoration: none;
    transition: color 0.3s;
}

.newsletter-single-content a:hover {
    color: #0f5a94;
    text-decoration: underline;
}

/* Social Sharing Section */
.newsletter-entry-footer {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e8e8e8;
}

.custom-share-section {
    margin-bottom: 30px;
}

.custom-share-text {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
}

.a2a_kit {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.a2a_kit a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.a2a_kit a:hover {
    transform: translateY(-2px);
}

.a2a_svg {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.a2a_label {
    margin-left: 8px;
    font-size: 14px;
    color: #333;
}

/* Entry Meta Styles */
.newsletter-entry-footer .entry-meta {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
    font-size: 14px;
    line-height: 1.8;
}

.newsletter-entry-footer .entry-meta strong {
    color: #333;
    font-weight: 600;
}

.disclaimer-desc {
    color: #666;
    font-style: italic;
}

.newsletter-entry-footer .entry-categories,
.newsletter-entry-footer .entry-tags {
    display: block;
    margin-top: 15px;
    color: #666;
}

.newsletter-entry-footer .entry-categories a,
.newsletter-entry-footer .entry-tags a {
    color: #1472ba;
    text-decoration: none;
    transition: color 0.3s;
}

.newsletter-entry-footer .entry-categories a:hover,
.newsletter-entry-footer .entry-tags a:hover {
    color: #0f5a94;
    text-decoration: underline;
}

.newsletter-single-footer {
    margin-top: 50px;
    padding-top: 30px;
    padding-bottom: 48px;
    border-top: 2px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.newsletter-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #f8f9fa;
    color: #1472ba;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid #e0e0e0;
}

.newsletter-back-link:hover {
    background: #1472ba;
    color: #fff;
    border-color: #1472ba;
}

.newsletter-taxonomy {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 8px 0 28px;
    padding: 18px 0 0;
    border-top: 1px solid #e8eef5;
    font-size: 14px;
}

.newsletter-taxonomy-row {
    display: flex;
    align-items: flex-start;
    gap: 12px 16px;
    flex-wrap: wrap;
}

.newsletter-taxonomy-label {
    flex: 0 0 auto;
    min-width: 88px;
    margin-top: 4px;
    color: #334155;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.newsletter-taxonomy-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    flex: 1 1 220px;
}

.newsletter-taxonomy-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid #d7e6f5;
    background: #f3f8fd;
    color: #0f5a94;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.newsletter-taxonomy-pill:hover,
.newsletter-taxonomy-pill:focus {
    background: #1472ba;
    border-color: #1472ba;
    color: #fff;
    text-decoration: none;
}

.newsletter-taxonomy strong {
    color: #334155;
    font-weight: 700;
}

.newsletter-taxonomy a {
    color: #0f5a94;
    text-decoration: none;
}

.newsletter-read-time {
    font-size: 14px;
    color: #fff;
    background-color: #1472ba;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.newsletter-subscribe-btn {
    margin: 0;
    display: inline-flex;
    align-items: center;
}

.newsletter-subscribe-btn a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ea3e24 0%, #f68c1e 50%, #fdb813 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(234, 62, 36, 0.4);
    white-space: nowrap;
}

.newsletter-subscribe-btn a:hover {
    background: linear-gradient(135deg, #fdb813 0%, #f68c1e 50%, #ea3e24 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 62, 36, 0.5);
}

.newsletter-subscribe-btn a:active {
    transform: translateY(0);
}

/* Comment Form Styling */
#respond {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e8e8e8;
}

#reply-title {
    font-size: 24px;
    font-weight: 600;
    color: #1472ba;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8e8e8;
}

#reply-title small {
    font-size: 14px;
    font-weight: normal;
    float: right;
}

#cancel-comment-reply-link {
    color: #666;
    text-decoration: none;
    font-weight: normal;
}

#cancel-comment-reply-link:hover {
    color: #1472ba;
    text-decoration: underline;
}

.comment-form {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.comment-form p {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.comment-form .required {
    color: #e74c3c;
    font-weight: bold;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fff;
    color: #333;
    box-sizing: border-box;
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
    line-height: 1.6;
}

.comment-form textarea:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus {
    outline: none;
    border-color: #1472ba;
    box-shadow: 0 0 0 3px rgba(20, 114, 186, 0.1);
}

.comment-form .form-submit {
    margin-top: 25px;
    margin-bottom: 0;
}

.comment-form .submit {
    background: linear-gradient(135deg, #1472ba 0%, #0f5a94 100%);
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comment-form .submit:hover {
    background: linear-gradient(135deg, #0f5a94 0%, #1472ba 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(20, 114, 186, 0.3);
}

.comment-form .logged-in-as {
    background: #e8f4f8;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #555;
    border-left: 4px solid #1472ba;
}

.comment-form .logged-in-as a {
    color: #1472ba;
    text-decoration: none;
    font-weight: 600;
}

.comment-form .logged-in-as a:hover {
    text-decoration: underline;
}

.comment-form .required-field-message {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Comments List Styling */
.comments-area {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #e8e8e8;
}

.comments-title {
    font-size: 24px;
    font-weight: 600;
    color: #1472ba;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8e8e8;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.comment-author {
    font-weight: 600;
    color: #1472ba;
    margin-bottom: 5px;
}

.comment-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.comment-content {
    color: #333;
    line-height: 1.6;
    margin-bottom: 10px;
}

.comment-reply-link {
    color: #1472ba;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: color 0.3s;
}

.comment-reply-link:hover {
    color: #0f5a94;
    text-decoration: underline;
}

/* Responsive Comment Form */
@media(max-width: 768px) {
    .comment-form {
        padding: 20px;
    }
    
    #reply-title {
        font-size: 20px;
    }
    
    .comment-form .submit {
        width: 100%;
        padding: 14px;
    }
}

/* Related newsletters — bottom grid (blog single pattern) */
.newsletter-related-bottom {
    margin: 28px 0 8px;
    padding-top: 8px;
}

.newsletter-related {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.newsletter-related h3 {
    font-size: 22px;
    font-weight: 700;
    color: #0f2a47;
    margin: 0 0 18px;
    text-align: left;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8eef5;
}

@media (min-width: 992px) {
    .newsletter-related .nl-grid .nl-card:nth-child(4) {
        display: none;
    }
}

/* Archive-matching cards on single newsletter */
.newsletter-related .nl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

@media (max-width: 991px) {
    .newsletter-related .nl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

@media (max-width: 640px) {
    .newsletter-related .nl-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-related .nl-card-footer {
        gap: 8px;
    }

    .newsletter-related .nl-readtime {
        padding: 5px 10px;
        font-size: 11px;
    }
}

.newsletter-related .nl-card {
    background: #fff;
    border: 1px solid #e3edf7;
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-width: 0;
    box-shadow: 0 4px 12px rgba(13, 42, 71, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.newsletter-related .nl-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(13, 42, 71, 0.14);
    border-color: #d8e7f5;
}

.newsletter-related .nl-thumb {
    position: relative;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background: #f8f8f8;
    margin-bottom: 10px;
    height: 145px;
    flex-shrink: 0;
}

.newsletter-related .newsletter-thumb-wrap {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
}

.newsletter-related .newsletter-thumb-wrap img,
.newsletter-related .nl-thumb img {
    width: 100%;
    height: 100%;
    max-height: none;
    display: block;
    object-fit: cover;
    object-position: center;
    background: #f8f8f8;
}

.newsletter-related .nl-meta,
.newsletter-related .newsletter-meta,
.newsletter-related .nl-title,
.newsletter-related .newsletter-title,
.newsletter-related .nl-desc,
.newsletter-related .newsletter-excerpt,
.newsletter-related .nl-card-footer {
    padding-left: 14px;
    padding-right: 14px;
}

.newsletter-related .nl-thumb-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #aab4be;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.newsletter-related .nl-meta,
.newsletter-related .newsletter-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    color: #777;
    font-size: 13px;
    margin-bottom: 8px;
    min-height: 20px;
}

.newsletter-related .nl-title,
.newsletter-related .newsletter-title {
    margin: 0 0 10px;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.3;
}

.newsletter-related .nl-title a,
.newsletter-related .newsletter-title a {
    color: #0f2a47;
    text-decoration: none;
    transition: color 0.2s ease;
}

.newsletter-related .nl-card:hover .nl-title a {
    color: #1472ba;
}

.newsletter-related .nl-desc,
.newsletter-related .newsletter-excerpt {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #77899c;
    min-height: 52px;
}

.newsletter-related .nl-readtime {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.01em;
    background: #1472ba;
    color: #fff;
    padding: 5px 12px;
    border-radius: 6px;
    line-height: 1.2;
    white-space: nowrap;
}

.newsletter-related .nl-readmore,
.newsletter-related .read-more {
    margin: 0 0 14px;
    display: inline-block;
    font-size: 14px;
    font-weight: 600;
    color: #1472ba;
    text-decoration: none;
    white-space: nowrap;
}

.newsletter-related .nl-card-footer {
    margin-top: auto;
    margin-bottom: 0;
    padding-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: 0;
}

.newsletter-related .nl-card-footer .nl-readtime {
    flex: 0 0 auto;
}

.newsletter-related .nl-card-footer .nl-readmore,
.newsletter-related .nl-card-footer .read-more {
    flex: 1 1 auto;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
}

.newsletter-related .nl-readmore::after {
    content: " \2192";
}

.newsletter-view-more-wrap {
    margin-top: 16px;
    text-align: center;
}

.newsletter-view-more-btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #1472ba 0%, #0f5a8f 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    box-shadow: 0 2px 8px rgba(20, 114, 186, 0.3);
}

.newsletter-view-more-btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    color: #fff;
    text-decoration: none;
}

/* Form side card — sticky via CSS on wide screens */
.newsletter-form-sidebar {
    position: static;
    width: 100%;
    z-index: 100;
    background: #fff;
    border: 1px solid #e4ebf2;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(15, 42, 71, 0.07);
    padding: 24px 20px;
    align-self: start;
    max-height: none;
    overflow: visible;
    box-sizing: border-box;
}

.newsletter-form-sidebar .newsletter-form-sidebar-inner {
    width: 100%;
}

.newsletter-form-sidebar #sidebar-form.blog-form,
.newsletter-form-sidebar form.blog-form {
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100%;
    background: transparent;
}

.newsletter-form-sidebar #sidebar-form h4,
.newsletter-form-sidebar .blog-form h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f2a47;
    line-height: 1.35;
    margin: 0 0 14px;
    text-align: center;
    letter-spacing: -0.02em;
}

.newsletter-form-sidebar #sidebar-form .col-sm-12,
.newsletter-form-sidebar #sidebar-form .col-12,
.newsletter-form-sidebar .blog-form .col-sm-12,
.newsletter-form-sidebar .blog-form .col-12 {
    width: 100%;
    max-width: 100%;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.newsletter-form-sidebar #sidebar-form .form-control,
.newsletter-form-sidebar .blog-form .form-control {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d5e0ea;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.4;
    color: #243447;
    background: #f8fafc;
    box-shadow: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.newsletter-form-sidebar #sidebar-form .form-control:focus,
.newsletter-form-sidebar .blog-form .form-control:focus {
    outline: none;
    border-color: #1472ba;
    background: #fff;
}

.newsletter-form-sidebar #sidebar-form textarea.form-control,
.newsletter-form-sidebar .blog-form textarea.form-control {
    min-height: 88px;
    resize: vertical;
}

.newsletter-form-sidebar #sidebar-form .form-check-label,
.newsletter-form-sidebar .blog-form .form-check-label {
    display: block;
    flex: 1 1 0;
    min-width: 0;
    font-size: 13px;
    line-height: 1.35;
    color: #000;
    margin-left: 0;
}

.newsletter-form-sidebar #sidebar-form .checkbox,
.newsletter-form-sidebar .blog-form .checkbox {
    width: 16px;
    height: 16px;
    margin: 1px 0 0;
    flex-shrink: 0;
}

.newsletter-form-sidebar #sidebar-form .blog-form-checks,
.newsletter-form-sidebar .blog-form .blog-form-checks {
    margin-bottom: 6px !important;
}

.newsletter-form-sidebar #sidebar-form .blog-form-check-row,
.newsletter-form-sidebar .blog-form .blog-form-check-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 2px;
}

.newsletter-form-sidebar #sidebar-form .btnSubmit,
.newsletter-form-sidebar .blog-form .btnSubmit {
    width: 100% !important;
    display: block !important;
    margin-top: 14px;
    padding: 12px 18px !important;
    border-radius: 10px !important;
    border: none !important;
    background: linear-gradient(135deg, #1472ba 0%, #0f5a8f 100%) !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em !important;
    box-shadow: 0 4px 14px rgba(20, 114, 186, 0.28);
}

.newsletter-form-sidebar #sidebar-form .btnSubmit:hover,
.newsletter-form-sidebar .blog-form .btnSubmit:hover {
    opacity: 0.95;
}

.newsletter-form-sidebar #sidebar-form .error,
.newsletter-form-sidebar .blog-form .error {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
}

.newsletter-form-sidebar #sidebar-form .erp-sidebar-message,
.newsletter-form-sidebar .blog-form .erp-sidebar-message {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
}

.newsletter-form-sidebar #sidebar-form .erp-recaptcha-wrap,
.newsletter-form-sidebar .blog-form .erp-recaptcha-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0 0 4px;
    overflow: visible;
}

.newsletter-form-sidebar #sidebar-form .erp-recaptcha-v3-notice,
.newsletter-form-sidebar .blog-form .erp-recaptcha-v3-notice {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.35;
}

@media (min-width: 1200px) {
    .newsletter-single-container {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
        grid-template-areas: "main form";
        align-items: start;
    }

    /* Stretch rail full article height so sticky can track while scrolling */
    .newsletter-form-sidebar {
        position: relative;
        height: 0;
        min-height: 100%;
        align-self: stretch;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        max-height: none;
        overflow: visible;
    }

    /* Sticky viewport rail — keeps the form card in the vertical middle of the screen */
    .newsletter-form-sidebar .newsletter-form-sidebar-inner {
        position: sticky;
        top: calc(var(--epsh-desktop-header-offset, 96px) + 1rem);
        height: calc(100vh - var(--epsh-desktop-header-offset, 96px) - 2rem);
        display: flex;
        flex-direction: column;
        justify-content: center;
        box-sizing: border-box;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
        overflow: visible;
    }

    .newsletter-form-sidebar .newsletter-form-sidebar-inner > #sidebar-form,
    .newsletter-form-sidebar .newsletter-form-sidebar-inner > form.blog-form {
        width: 100%;
        max-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        box-sizing: border-box;
        background: #fff !important;
        border: 1px solid #e4ebf2 !important;
        border-radius: 14px;
        box-shadow: 0 8px 28px rgba(15, 42, 71, 0.07);
        padding: 24px 20px !important;
        margin: 0 !important;
    }

    body.epsh-header-is-hidden .newsletter-form-sidebar .newsletter-form-sidebar-inner {
        top: 1rem;
        height: calc(100vh - 2rem);
    }

    body.admin-bar.epsh-header-is-hidden .newsletter-form-sidebar .newsletter-form-sidebar-inner {
        top: calc(32px + 1rem);
        height: calc(100vh - 32px - 2rem);
    }
}

@media (max-width: 1199px) {
    .newsletter-single-container {
        max-width: 100%;
    }

    .newsletter-form-sidebar {
        position: static;
        width: 100%;
        max-height: none;
        overflow: visible;
        padding: 24px 20px;
    }

    .newsletter-related .nl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .newsletter-taxonomy-row {
        flex-direction: column;
        gap: 8px;
    }

    .newsletter-taxonomy-label {
        min-width: 0;
        margin-top: 0;
    }
}

@media(max-width: 600px) {
    .newsletter-related-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-single-content img:not(.img-100):not(.img-120):not(.avatar):not(.size-thumbnail):not(.size-small):not(.ns-author-img),
    .newsletter-single-content img.size-medium:not(.img-100):not(.img-120),
    .newsletter-single-content img.size-large:not(.img-100):not(.img-120),
    .newsletter-single-content img.img-small,
    .newsletter-single-content img.img-medium,
    .newsletter-single-content img.alignleft:not(.img-100):not(.img-120):not(.avatar):not(.size-thumbnail):not(.size-small),
    .newsletter-single-content img.alignright:not(.img-100):not(.img-120):not(.avatar):not(.size-thumbnail):not(.size-small),
    .newsletter-single-content img.aligncenter:not(.img-100):not(.img-120) {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 16px 0 !important;
    }

    .newsletter-single-content img.img-100,
    .newsletter-single-content img.img-120,
    .newsletter-single-content img.avatar,
    .newsletter-single-content img.size-thumbnail,
    .newsletter-single-content img.size-small,
    .newsletter-single-content img.ns-author-img,
    .newsletter-single-content img.alignleft.img-100,
    .newsletter-single-content img.alignleft.img-120 {
        display: inline-block !important;
        float: left !important;
        width: 100px !important;
        max-width: 100px !important;
        min-width: 100px !important;
        height: 100px !important;
        min-height: 100px !important;
        object-fit: cover !important;
        margin: 4px 14px 12px 0 !important;
        visibility: visible !important;
    }
}

@media (min-width: 601px) and (max-width: 1024px) {
    .newsletter-single-content img:not(.img-100):not(.img-120):not(.avatar):not(.size-thumbnail):not(.size-small):not(.ns-author-img) {
        display: block !important;
        visibility: visible !important;
        float: left !important;
        width: 100% !important;
        max-width: min(42%, 280px) !important;
        height: auto !important;
        margin: 4px 18px 14px 0 !important;
    }

    .newsletter-single-content img.alignright:not(.img-100):not(.img-120):not(.avatar):not(.size-thumbnail):not(.size-small) {
        float: right !important;
        margin: 4px 0 14px 18px !important;
    }

    .newsletter-single-content img.aligncenter:not(.img-100):not(.img-120) {
        float: none !important;
        max-width: min(100%, 360px) !important;
        margin: 18px auto !important;
    }

    .newsletter-single-content img.img-100,
    .newsletter-single-content img.img-120,
    .newsletter-single-content img.avatar,
    .newsletter-single-content img.size-thumbnail,
    .newsletter-single-content img.size-small,
    .newsletter-single-content img.ns-author-img {
        display: inline-block !important;
        float: left !important;
        width: 100px !important;
        max-width: 100px !important;
        height: 100px !important;
        margin: 4px 14px 12px 0 !important;
    }
}

/* Responsive Design */
@media(max-width: 768px) {
    .newsletter-single-title {
        letter-spacing: -0.2px;
    }
    
    .newsletter-single-footer {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .newsletter-taxonomy {
        flex-direction: column;
        gap: 10px;
    }
}

@media(max-width: 600px) {
    .newsletter-single-title {
        letter-spacing: -0.1px;
    }
    
    .newsletter-single-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .newsletter-subscribe-btn {
        width: 100%;
        justify-content: center;
    }
    
    .newsletter-subscribe-btn a {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
    }
}

/* In-content editor link cards — must load after body image/link rules above */
.newsletter-single-content .ep-link-cards,
.newsletter-single-content > div:has(> div > div > p a img),
.newsletter-single-content .wp-block-html > div:has(> div > div > p a img) {
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-single-content .ep-link-cards__grid,
.newsletter-single-content > div:has(> div > div > p a img) > div:first-child,
.newsletter-single-content .wp-block-html > div:has(> div > div > p a img) > div:first-child {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.newsletter-single-content .ep-link-cards img,
.newsletter-single-content > div:has(> div > div > p a img) img,
.newsletter-single-content .wp-block-html > div:has(> div > div > p a img) img {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
}

.newsletter-single-content .ep-link-cards a:hover,
.newsletter-single-content > div:has(> div > div > p a img) a:hover,
.newsletter-single-content .wp-block-html > div:has(> div > div > p a img) a:hover {
    text-decoration: none;
}

.newsletter-single-content .ep-link-cards__btn:hover,
.newsletter-single-content > div:has(> div > div > p a img) > div:last-child:not(:only-child) a[style*="background"]:hover,
.newsletter-single-content .wp-block-html > div:has(> div > div > p a img) > div:last-child:not(:only-child) a[style*="background"]:hover {
    color: #fff !important;
    text-decoration: none;
    opacity: 0.92;
}