/* =========================================
   Newsletter / CTA Section
   ========================================= */

.blog-over-newsletter-wrapper {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
    margin: 40px 0;
}

/* Inner container sits above the decorative elements */
.blog-over-newsletter-inner {
    position: relative;
    z-index: 2;
}

/* ── Decorative Background Circles ──────────────── */
.blog-over-newsletter-deco {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    opacity: 0.1;
}

.blog-over-newsletter-deco-1 {
    width: 500px;
    height: 500px;
    top: -200px;
    right: -100px;
    background: #fff;
}

.blog-over-newsletter-deco-2 {
    width: 350px;
    height: 350px;
    bottom: -150px;
    left: -80px;
    background: #fff;
}

/* ── Centered Layout ────────────────────────────── */
.blog-over-newsletter-centered {
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}

/* ── Text Color: Light ──────────────────────────── */
.blog-over-newsletter-text-light .blog-over-newsletter-pre-heading,
.blog-over-newsletter-text-light .blog-over-newsletter-heading,
.blog-over-newsletter-text-light .blog-over-newsletter-subtext,
.blog-over-newsletter-text-light .blog-over-newsletter-form-hint {
    color: rgba(255, 255, 255, 0.95);
}

/* ── Text Color: Dark ───────────────────────────── */
.blog-over-newsletter-text-dark .blog-over-newsletter-pre-heading,
.blog-over-newsletter-text-dark .blog-over-newsletter-heading,
.blog-over-newsletter-text-dark .blog-over-newsletter-subtext,
.blog-over-newsletter-text-dark .blog-over-newsletter-form-hint {
    color: #1e293b;
}

/* ── Pre-heading ────────────────────────────────── */
.blog-over-newsletter-pre-heading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    opacity: 0.85;
}

/* Dot before pre-heading */
.blog-over-newsletter-pre-heading::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: blog-over-nlpulse 2s ease infinite;
}

@keyframes blog-over-nlpulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(1.3); }
}

/* ── Main Heading ───────────────────────────────── */
.blog-over-newsletter-heading {
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 18px;
    letter-spacing: -0.02em;
}

/* ── Subtext ────────────────────────────────────── */
.blog-over-newsletter-subtext {
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 32px;
    opacity: 0.85;
    max-width: 540px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Form Wrapper ───────────────────────────────── */
.blog-over-newsletter-form {
    position: relative;
    z-index: 3;
}

/* Override typical plugin form styles for clean look */
.blog-over-newsletter-form form {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.blog-over-newsletter-form input[type="email"] {
    flex: 1;
    min-width: 240px;
    max-width: 380px;
    padding: 14px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    outline: none;
    transition: box-shadow 0.2s ease;
}

.blog-over-newsletter-form input[type="email"]:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}

.blog-over-newsletter-form input[type="submit"],
.blog-over-newsletter-form button[type="submit"] {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.6);
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
    white-space: nowrap;
}

.blog-over-newsletter-form input[type="submit"]:hover,
.blog-over-newsletter-form button[type="submit"]:hover {
    background: #fff;
    color: #1e40af;
    border-color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

/* For dark text mode buttons */
.blog-over-newsletter-text-dark .blog-over-newsletter-form input[type="submit"],
.blog-over-newsletter-text-dark .blog-over-newsletter-form button[type="submit"] {
    background: #1e40af;
    color: #fff;
    border-color: #1e40af;
}

.blog-over-newsletter-text-dark .blog-over-newsletter-form input[type="submit"]:hover,
.blog-over-newsletter-text-dark .blog-over-newsletter-form button[type="submit"]:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

/* ── Placeholder hint (when no shortcode) ───────── */
.blog-over-newsletter-form-placeholder {
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px dashed rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    backdrop-filter: blur(4px);
}

.blog-over-newsletter-form-placeholder .blog-over-newsletter-form-hint {
    margin: 0;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.blog-over-newsletter-text-dark .blog-over-newsletter-form-placeholder {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Dark text mode – form input fields */
.blog-over-newsletter-text-dark .blog-over-newsletter-form input[type="email"] {
    background: rgba(0, 0, 0, 0.06);
    color: #1e293b;
    border: 1.5px solid rgba(0, 0, 0, 0.15);
}

.blog-over-newsletter-text-dark .blog-over-newsletter-form input[type="email"]::placeholder {
    color: rgba(30, 41, 59, 0.5);
}

.blog-over-newsletter-text-dark .blog-over-newsletter-form input[type="email"]:focus {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
    border-color: rgba(0, 0, 0, 0.25);
}

/* Dark text mode – decorative circles adjust to dark */
.blog-over-newsletter-text-dark .blog-over-newsletter-deco {
    background: #1e293b;
    opacity: 0.05;
}

/* Dark text mode – all text elements inherit dark color */
.blog-over-newsletter-text-dark,
.blog-over-newsletter-text-dark p,
.blog-over-newsletter-text-dark label,
.blog-over-newsletter-text-dark span {
    color: #1e293b;
}

/* Light text mode – ensure all text elements are white */
.blog-over-newsletter-text-light,
.blog-over-newsletter-text-light p,
.blog-over-newsletter-text-light label,
.blog-over-newsletter-text-light span {
    color: rgba(255, 255, 255, 0.95);
}

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
    .blog-over-newsletter-wrapper {
        padding: 52px 0;
    }

    .blog-over-newsletter-heading {
        font-size: 1.65rem;
    }

    .blog-over-newsletter-subtext {
        font-size: 0.92rem;
    }

    .blog-over-newsletter-form form {
        flex-direction: column;
        align-items: center;
    }

    .blog-over-newsletter-form input[type="email"] {
        max-width: 100%;
        width: 100%;
    }

    .blog-over-newsletter-form input[type="submit"],
    .blog-over-newsletter-form button[type="submit"] {
        width: 100%;
        max-width: 380px;
    }
}

@media (max-width: 480px) {
    .blog-over-newsletter-wrapper {
        padding: 40px 0;
    }

    .blog-over-newsletter-heading {
        font-size: 1.4rem;
    }

    .blog-over-newsletter-deco-1,
    .blog-over-newsletter-deco-2 {
        display: none;
    }
}
