/* ─── Newsletter Hero ─── */

.newsletter-hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #7117f2 0%, #1e1f63 100%);
    color: white;
    padding: 6rem 0 4rem;
    position: relative;
    overflow: hidden;
}

/* The hero is a flex row; without these the container flex item
   sizes to min-content and overflows narrow viewports. */
.newsletter-hero .container {
    width: 100%;
    min-width: 0;
}

.newsletter-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="0.5" fill="white" opacity="0.1"/></svg>');
    opacity: 0.3;
}

.newsletter-hero-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.newsletter-icon {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    animation: float 3s ease-in-out infinite;
}

.newsletter-icon svg {
    font-size: 3rem;
    color: white;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.newsletter-hero h1 {
    font-size: 2.75rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.newsletter-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    line-height: 1.7;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.newsletter-form-hero {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    max-width: 520px;
}

.newsletter-input-hero {
    flex: 1;
    min-width: 0;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    transition: all 0.3s ease;
}

.newsletter-input-hero::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

.newsletter-input-hero:focus {
    outline: none;
    border-color: white;
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.newsletter-form-hero .newsletter-hero-btn {
    padding: 1rem 2rem;
    cursor: pointer;
}

.newsletter-hero-readlink {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s ease, gap 0.2s ease;
    cursor: pointer;
}

.newsletter-hero-readlink:hover {
    color: #ffc857;
    gap: 0.75rem;
}

.newsletter-hero-readlink svg {
    font-size: 0.8rem;
}

.newsletter-hero-btn {
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.newsletter-hero-btn.btn-primary {
    background: white;
    color: #7117f2;
    border: 2px solid white;
}

.newsletter-hero-btn.btn-primary:hover {
    background: #ffc857;
    color: #1e1f63;
    border-color: #ffc857;
    transform: translateY(-2px);
}

.newsletter-hero-btn.btn-outline-light {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.newsletter-hero-btn.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: white;
    transform: translateY(-2px);
}

/* ─── Past Issues ─── */

.newsletter-issues {
    padding: 5rem 0;
    background: var(--bg-light, #f8fafc);
}

.section-header-centered {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header-centered h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-dark, #000);
    margin-bottom: 0.75rem;
}

.section-header-centered p {
    font-size: 1.1rem;
    color: var(--secondary-color, #64748b);
    max-width: 500px;
    margin: 0 auto;
}

.issues-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 360px));
    justify-content: center;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
}

.issue-card {
    text-decoration: none;
    color: inherit;
    display: block;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.issue-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.issue-card-inner {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.07);
}

.issue-card-thumb {
    position: relative;
    aspect-ratio: 1200/630;
    overflow: hidden;
    background: #eef1f6;
}

/* Hairline frame so light/white thumbnails stay defined against the white card */
.issue-card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
    pointer-events: none;
    z-index: 1;
}

.issue-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.4s ease;
}

.issue-card:hover .issue-card-thumb img {
    transform: scale(1.05);
}

.issue-card-body {
    padding: 1.75rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.issue-date {
    font-size: 0.85rem;
    color: var(--secondary-color, #64748b);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.issue-date svg {
    color: #7117f2;
    font-size: 0.8rem;
}

.issue-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark, #000);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.issue-card:hover .issue-title {
    color: #7117f2;
}

.issue-subtitle {
    font-size: 0.95rem;
    color: var(--secondary-color, #64748b);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 1rem;
}

.issue-read-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #7117f2;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto;
    transition: gap 0.2s ease;
}

.issue-card:hover .issue-read-link {
    gap: 0.75rem;
}

/* Featured (first) card */
.issue-card-featured {
    grid-column: 1 / -1;
}

.issue-card-featured .issue-card-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: stretch;
}

.issue-card-featured .issue-card-thumb {
    aspect-ratio: auto;
    display: grid;
    place-items: center;
    padding: 2rem;
    background: linear-gradient(155deg, #faf9ff 0%, #f1ecfd 100%);
    border-right: 1px solid rgba(15, 23, 42, 0.08);
}

.issue-card-featured .issue-card-thumb::after {
    display: none;
}

.issue-card-featured .issue-card-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 1200/630;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.issue-card-featured:hover .issue-card-thumb img {
    transform: scale(1.02);
}

.issue-card-featured .issue-card-body {
    justify-content: center;
    padding: 2.25rem;
}

.issue-card-featured .issue-subtitle {
    flex: 0 0 auto;
    font-size: 1rem;
}

.issue-card-featured .issue-read-link {
    margin-top: 0.5rem;
}

.issue-card-featured .issue-title {
    font-size: 1.5rem;
}

/* ─── Features Section ─── */

.newsletter-features {
    padding: 5rem 0;
    background: white;
}

.newsletter-features h2 {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-dark, #000);
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature-card {
    background: var(--bg-light, #f8fafc);
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #7117f2 0%, #1e1f63 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon svg {
    font-size: 1.75rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.35rem;
    color: var(--text-dark, #000);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.feature-card p {
    color: var(--secondary-color, #64748b);
    line-height: 1.65;
    font-size: 0.95rem;
}

/* ─── Subscribe Section ─── */

.newsletter-subscribe {
    padding: 5rem 0;
    background: var(--bg-light, #f8fafc);
}

.subscribe-card {
    background: linear-gradient(135deg, #7117f2 0%, #1e1f63 100%);
    border-radius: 24px;
    padding: 4rem 3rem;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.subscribe-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.subscribe-card::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
}

.subscribe-content {
    position: relative;
    z-index: 1;
}

.subscribe-content h2 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.subscribe-content > p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.newsletter-form-container {
    max-width: 500px;
    margin: 0 auto 1.5rem;
}

.newsletter-form-main {
    display: flex;
    gap: 0.75rem;
}

.newsletter-input-main {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #000;
    transition: all 0.3s ease;
}

.newsletter-input-main::placeholder {
    color: rgba(0, 0, 0, 0.45);
}

.newsletter-input-main:focus {
    outline: none;
    border-color: white;
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.newsletter-form-main .btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
    white-space: nowrap;
    background: white;
    color: #7117f2;
    font-weight: 600;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form-main .btn-large:hover {
    background: #ffc857;
    color: #1e1f63;
    transform: translateY(-2px);
}

.newsletter-message {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    padding: 0.5rem;
    border-radius: 8px;
    text-align: center;
}

.newsletter-message.success {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.newsletter-message.error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.newsletter-privacy {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-privacy a {
    color: #ffc857;
    text-decoration: underline;
}

.newsletter-privacy a:hover {
    color: white;
}

/* ─── Footer Newsletter (compact form) ─── */

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 0.9rem;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-input:focus {
    outline: none;
    border-color: #7117f2;
    background: rgba(255, 255, 255, 0.15);
}

.newsletter-btn {
    padding: 0.75rem 1.25rem;
    background: #7117f2;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-btn:hover {
    background: #5a12c4;
}

/* ─── Responsive ─── */

@media (max-width: 768px) {
    .newsletter-hero {
        min-height: auto;
        padding: 4rem 0 3rem;
    }

    .newsletter-hero h1 {
        font-size: 2rem;
    }

    .newsletter-subtitle {
        font-size: 1.05rem;
    }

    .newsletter-hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .issues-grid {
        grid-template-columns: 1fr;
    }

    .issue-card-featured .issue-card-inner {
        grid-template-columns: 1fr;
    }

    .issue-card-featured .issue-card-thumb {
        padding: 1.25rem;
        border-right: none;
        border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    }

    .issue-card-featured .issue-card-body {
        padding: 1.75rem;
    }

    .newsletter-form-main {
        flex-direction: column;
        gap: 0.75rem;
    }

    .newsletter-input-main,
    .newsletter-form-main .btn-large {
        width: 100%;
    }

    .subscribe-card {
        padding: 3rem 1.5rem;
    }

    .section-header-centered h2,
    .newsletter-features h2 {
        font-size: 1.75rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .subscribe-content h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .newsletter-hero h1 {
        font-size: 1.75rem;
    }

    .newsletter-icon {
        width: 80px;
        height: 80px;
    }

    .newsletter-icon svg {
        font-size: 2.5rem;
    }

    .newsletter-form-hero {
        flex-direction: column;
        gap: 0.75rem;
    }

    .newsletter-form-hero .newsletter-hero-btn {
        width: 100%;
    }
}

/* Inline SVG icons (replaced the legacy icon font). Size and color inherit
   from each icon's context; these are the shared defaults. */
.svg-icon {
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    vertical-align: -0.125em;
}
