/* =============================================
   NEWSLETTER PAGE — Custom Styles
   Coached Design System: Poppins, #3B82F6, light bg
   ============================================= */

/* --- Hero --- */
.nw-hero {
    padding: 100px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.nw-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, rgba(59,130,246,0.07) 0%, transparent 70%);
    pointer-events: none;
}

.nw-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 100px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #3B82F6;
    margin-bottom: 24px;
    position: relative;
    z-index: 1;
}

.nw-hero-badge i {
    font-size: 15px;
}

.nw-hero h1 {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
    color: #111827;
    position: relative;
    z-index: 1;
}

.nw-hero h1 span {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nw-hero-subtitle {
    font-size: 18px;
    color: #4B5563;
    max-width: 560px;
    margin: 0 auto 36px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* Subscribe Form */
.nw-subscribe-form {
    display: flex;
    gap: 12px;
    max-width: 520px;
    margin: 0 auto 20px;
    position: relative;
    z-index: 1;
}

.nw-subscribe-form input {
    flex: 1;
    padding: 16px 22px;
    border: 1px solid #D1D5DB;
    border-radius: 14px;
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    color: #111827;
    background: #FFFFFF;
    transition: all 0.3s ease;
    outline: none;
}

.nw-subscribe-form input:focus {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.nw-subscribe-form input::placeholder {
    color: rgba(100,109,115,0.6);
}

.nw-subscribe-btn {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    border: none;
    border-radius: 14px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(59,130,246,0.25);
    white-space: nowrap;
}

.nw-subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(59,130,246,0.35);
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
}

.nw-subscribe-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.nw-subscribe-btn:hover i {
    transform: translateX(3px);
}

.nw-subscribe-note {
    font-size: 13px;
    color: #9CA3AF;
    position: relative;
    z-index: 1;
}

.nw-subscribe-note a {
    color: #6B7280;
    text-decoration: underline;
}

/* Reader logos strip */
.nw-reader-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.nw-reader-count {
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}

.nw-reader-avatars {
    display: flex;
    align-items: center;
}

.nw-reader-avatars img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    margin-left: -8px;
    object-fit: cover;
}

.nw-reader-avatars img:first-child {
    margin-left: 0;
}

/* --- Section Labels --- */
.nw-section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #3B82F6;
    margin-bottom: 12px;
}

.nw-section-label i {
    font-size: 16px;
}

/* --- Featured Article (Hero Card) --- */
.nw-featured-section {
    padding: 0 0 80px;
}

.nw-featured-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 48px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 32px rgba(0,0,0,0.05);
}

.nw-featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(59,130,246,0.1);
    border-color: rgba(59,130,246,0.2);
}

.nw-featured-img {
    position: relative;
    min-height: 380px;
    overflow: hidden;
}

.nw-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.nw-featured-card:hover .nw-featured-img img {
    transform: scale(1.04);
}

.nw-featured-content {
    padding: 48px 40px 48px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nw-featured-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 100px;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #3B82F6;
    margin-bottom: 16px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nw-featured-content h2 {
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

.nw-featured-content p {
    font-size: 16px;
    color: #6B7280;
    line-height: 1.7;
    margin-bottom: 24px;
}

.nw-featured-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #9CA3AF;
}

.nw-featured-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nw-featured-meta i {
    font-size: 14px;
}

.nw-read-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #3B82F6;
    transition: all 0.3s ease;
}

.nw-read-link i {
    font-size: 17px;
    transition: transform 0.3s ease;
}

.nw-read-link:hover {
    color: #2563EB;
}

.nw-read-link:hover i {
    transform: translateX(4px);
}

/* --- Articles Grid --- */
.nw-articles-section {
    padding: 80px 0;
    background: #F8FBFF;
}

.nw-articles-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
}

.nw-articles-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.5px;
    margin-bottom: 0;
}

.nw-articles-header h2 strong {
    color: #3B82F6;
}

.nw-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #3B82F6;
    transition: all 0.3s ease;
}

.nw-view-all:hover {
    color: #2563EB;
}

.nw-view-all i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.nw-view-all:hover i {
    transform: translateX(3px);
}

.nw-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.nw-article-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.35s ease;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
}

.nw-article-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(59,130,246,0.1);
    border-color: rgba(59,130,246,0.2);
}

.nw-article-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #F3F4F6;
}

.nw-article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    transition: transform 0.5s ease;
}

.nw-article-card:hover .nw-article-thumb img {
    transform: scale(1.06);
}

.nw-article-category {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(8px);
    border-radius: 100px;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    color: #3B82F6;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nw-article-body {
    padding: 22px 22px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.nw-article-body h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
    color: #111827;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.nw-article-body p {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.6;
    margin-bottom: 0;
    flex: 1;
}

.nw-article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 22px;
    border-top: 1px solid #F3F4F6;
}

.nw-article-date {
    font-size: 12px;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nw-article-date i {
    font-size: 13px;
}

.nw-article-read {
    font-size: 12px;
    color: #9CA3AF;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nw-article-read i {
    font-size: 13px;
}

/* --- Categories / Topics --- */
.nw-topics-section {
    padding: 80px 0;
}

.nw-topics-header {
    text-align: center;
    margin-bottom: 48px;
}

.nw-topics-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.5px;
}

.nw-topics-header h2 strong {
    color: #3B82F6;
}

.nw-topics-header p {
    font-size: 16px;
    color: #6B7280;
    margin-top: 8px;
}

.nw-topics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.nw-topic-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    padding: 28px 22px;
    text-align: center;
    transition: all 0.35s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.nw-topic-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #60A5FA);
    transform: scaleX(0);
    transition: transform 0.35s ease;
    transform-origin: left;
}

.nw-topic-card:hover::before {
    transform: scaleX(1);
}

.nw-topic-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59,130,246,0.2);
    box-shadow: 0 12px 36px rgba(59,130,246,0.08);
}

.nw-topic-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 22px;
    color: #3B82F6;
    transition: all 0.3s ease;
}

.nw-topic-card:hover .nw-topic-icon {
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: #fff;
}

.nw-topic-card h4 {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 6px;
}

.nw-topic-card p {
    font-size: 13px;
    color: #6B7280;
    line-height: 1.5;
}

/* --- Social Proof / Stats --- */
.nw-stats-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #F0F7FF 0%, #F8FBFF 100%);
}

.nw-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.nw-stat-card {
    text-align: center;
    padding: 32px 16px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 18px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    transition: all 0.35s ease;
}

.nw-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(59,130,246,0.08);
    border-color: rgba(59,130,246,0.2);
}

.nw-stat-card h3 {
    font-size: 40px;
    font-weight: 700;
    color: #3B82F6;
    margin-bottom: 6px;
    line-height: 1;
    letter-spacing: -1px;
}

.nw-stat-card p {
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}

/* --- CTA Banner --- */
.nw-cta-section {
    padding: 80px 0;
    text-align: center;
}

.nw-cta-box {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 50%, #1D4ED8 100%);
    border-radius: 24px;
    padding: 64px 48px;
    position: relative;
    overflow: hidden;
}

.nw-cta-box::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.12) 0%, transparent 50%),
                radial-gradient(circle at 70% 60%, rgba(255,255,255,0.08) 0%, transparent 40%);
    pointer-events: none;
}

.nw-cta-box h2 {
    font-size: 36px;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    position: relative;
}

.nw-cta-box h2 strong {
    color: #FFFFFF;
    -webkit-text-fill-color: #FFFFFF;
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.4);
    text-underline-offset: 4px;
}

.nw-cta-box p {
    font-size: 17px;
    color: rgba(255,255,255,0.85);
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.7;
    position: relative;
}

.nw-cta-box .nw-subscribe-form {
    max-width: 480px;
}

.nw-cta-box .nw-subscribe-form input {
    background: #FFFFFF;
    border-color: #FFFFFF;
    color: #111827;
}

.nw-cta-box .nw-subscribe-form input::placeholder {
    color: #9CA3AF;
}

.nw-cta-box .nw-subscribe-form input:focus {
    border-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
    background: #FFFFFF;
}

.nw-cta-box .nw-subscribe-btn {
    background: #FFFFFF;
    color: #2563EB;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.nw-cta-box .nw-subscribe-btn:hover {
    background: #F0F7FF;
    color: #1D4ED8;
    box-shadow: 0 8px 28px rgba(0,0,0,0.2);
}

.nw-cta-box .nw-subscribe-note {
    color: rgba(255,255,255,0.7);
    margin-top: 16px;
}

.nw-cta-box .nw-subscribe-note a {
    color: rgba(255,255,255,0.9);
}

/* --- "What You'll Get" Section --- */
.nw-benefits-section {
    padding: 80px 0;
}

.nw-benefits-header {
    text-align: center;
    margin-bottom: 48px;
}

.nw-benefits-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
}

.nw-benefits-header h2 strong {
    color: #3B82F6;
}

.nw-benefits-header p {
    font-size: 16px;
    color: #6B7280;
    margin-top: 8px;
}

.nw-benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.nw-benefit-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 18px;
    padding: 32px 24px;
    transition: all 0.35s ease;
    position: relative;
    overflow: hidden;
}

.nw-benefit-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3B82F6, #60A5FA);
    transform: scaleX(0);
    transition: transform 0.35s ease;
    transform-origin: center;
}

.nw-benefit-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59,130,246,0.2);
    box-shadow: 0 12px 36px rgba(59,130,246,0.08);
}

.nw-benefit-card:hover::after {
    transform: scaleX(1);
}

.nw-benefit-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 22px;
    color: #3B82F6;
}

.nw-benefit-card h4 {
    font-size: 17px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.nw-benefit-card p {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.65;
}

/* --- Animations --- */
.nw-fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.nw-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children animation */
.nw-stagger > .nw-fade-in:nth-child(1) { transition-delay: 0.05s; }
.nw-stagger > .nw-fade-in:nth-child(2) { transition-delay: 0.1s; }
.nw-stagger > .nw-fade-in:nth-child(3) { transition-delay: 0.15s; }
.nw-stagger > .nw-fade-in:nth-child(4) { transition-delay: 0.2s; }
.nw-stagger > .nw-fade-in:nth-child(5) { transition-delay: 0.25s; }
.nw-stagger > .nw-fade-in:nth-child(6) { transition-delay: 0.3s; }

/* Email success state */
.nw-subscribe-form.success input {
    border-color: #22C55E;
    background: #F0FDF4;
    color: #16A34A;
}

.nw-subscribe-form.success .nw-subscribe-btn {
    background: linear-gradient(135deg, #22C55E, #16A34A);
    box-shadow: 0 4px 20px rgba(34,197,94,0.3);
    pointer-events: none;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1024px) {
    .nw-topics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .nw-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .nw-hero {
        padding: 80px 0 56px;
    }
    .nw-hero h1 {
        font-size: 34px;
        letter-spacing: -0.5px;
    }
    .nw-hero-subtitle {
        font-size: 16px;
    }
    .nw-subscribe-form {
        flex-direction: column;
    }
    .nw-subscribe-btn {
        width: 100%;
        justify-content: center;
    }
    .nw-featured-card {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .nw-featured-img {
        min-height: 220px;
    }
    .nw-featured-content {
        padding: 28px 24px;
    }
    .nw-featured-content h2 {
        font-size: 24px;
    }
    .nw-articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .nw-articles-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .nw-topics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .nw-topic-card {
        padding: 22px 16px;
    }
    .nw-benefits-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .nw-cta-box {
        padding: 48px 24px;
    }
    .nw-cta-box h2 {
        font-size: 26px;
    }
    .nw-cta-box p {
        font-size: 15px;
    }
    .nw-stat-card h3 {
        font-size: 32px;
    }
    .nw-reader-strip {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .nw-hero h1 {
        font-size: 28px;
    }
    .nw-topics-grid {
        grid-template-columns: 1fr;
    }
    .nw-stats-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .nw-stat-card {
        padding: 20px 16px;
    }
}

/* ── JS-rendered grid — line-clamp + load more ───────────────────────────────── */

/* Tighter card body padding */
.nw-article-body {
    padding: 16px 18px 14px;
    min-height: 110px;
}

.nw-article-footer {
    padding: 10px 18px;
}

/* Title: max 2 lines */
.nw-article-body h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

/* Excerpt: max 1 line */
.nw-article-body p {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: none;
}

/* Show More */
.nw-load-more-wrap {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 8px;
}

.nw-load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 40px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3px;
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    border: none;
    border-radius: 14px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(59,130,246,0.25);
}

.nw-load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(59,130,246,0.35);
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
}

/* Loading indicator */
.nw-grid-loading {
    text-align: center;
    font-size: 13px;
    color: #9CA3AF;
    padding: 24px 0 8px;
    display: none;
}
