/* =========================================================
   Newsletter Boost — UNITY Foundation
   Floating bar + footer signup + inline sections
   v1.0
   ========================================================= */

/* ── Floating Bottom Bar ─────────────────────────────────── */
#unity-newsletter-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    background: linear-gradient(135deg, #1F3A2E 0%, #2D5A3D 100%);
    border-top: 3px solid #C5A55A;
    padding: 14px 20px;
    transform: translateY(100%);
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.35);
}

#unity-newsletter-bar.nb-visible {
    transform: translateY(0);
}

.nb-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.nb-text {
    flex: 1;
    min-width: 200px;
}

.nb-text strong {
    display: block;
    color: #C5A55A;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 15px;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

.nb-text span {
    color: rgba(245, 241, 232, 0.85);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.nb-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    flex: 2;
    min-width: 260px;
    position: relative;
}

.nb-form input[type="email"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    border: 2px solid rgba(197, 165, 90, 0.5);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: #F5F1E8;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.nb-form input[type="email"]::placeholder {
    color: rgba(245, 241, 232, 0.5);
}

.nb-form input[type="email"]:focus {
    border-color: #C5A55A;
    background: rgba(255, 255, 255, 0.12);
}

/* Honeypot */
.nb-honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.nb-submit {
    padding: 10px 22px;
    background: #C5A55A;
    color: #1F3A2E;
    border: none;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.3px;
}

.nb-submit:hover:not(:disabled) {
    background: #D4B896;
    transform: translateY(-1px);
}

.nb-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.nb-close {
    background: none;
    border: none;
    color: rgba(245, 241, 232, 0.5);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    transition: color 0.2s;
    flex-shrink: 0;
}

.nb-close:hover {
    color: #F5F1E8;
}

.nb-msg {
    width: 100%;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    padding: 8px 12px;
    border-radius: 4px;
    display: none;
    margin-top: 6px;
}

.nb-msg.success {
    display: block;
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    color: #A5D6A7;
}

.nb-msg.error {
    display: block;
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid #f44336;
    color: #FFCDD2;
}

/* ── Footer Newsletter Section ───────────────────────────── */
.footer-newsletter-section {
    background: linear-gradient(135deg, #2D5A3D 0%, #1F3A2E 100%);
    border-top: 2px solid rgba(197, 165, 90, 0.4);
    border-bottom: 2px solid rgba(197, 165, 90, 0.4);
    padding: 48px 24px;
    text-align: center;
}

.footer-newsletter-section .fn-inner {
    max-width: 580px;
    margin: 0 auto;
}

.footer-newsletter-section .fn-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
}

.footer-newsletter-section h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 22px;
    color: #C5A55A;
    margin: 0 0 8px;
}

.footer-newsletter-section p {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: rgba(245, 241, 232, 0.85);
    margin: 0 0 24px;
    line-height: 1.5;
}

.footer-newsletter-section .fn-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
}

.footer-newsletter-section .fn-form input[type="email"] {
    flex: 1;
    min-width: 220px;
    max-width: 340px;
    padding: 13px 18px;
    border: 2px solid rgba(197, 165, 90, 0.5);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: #F5F1E8;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.footer-newsletter-section .fn-form input[type="email"]::placeholder {
    color: rgba(245, 241, 232, 0.45);
}

.footer-newsletter-section .fn-form input[type="email"]:focus {
    border-color: #C5A55A;
    background: rgba(255, 255, 255, 0.12);
}

.footer-newsletter-section .fn-submit {
    padding: 13px 28px;
    background: #C5A55A;
    color: #1F3A2E;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    letter-spacing: 0.3px;
}

.footer-newsletter-section .fn-submit:hover:not(:disabled) {
    background: #D4B896;
    transform: translateY(-2px);
}

.footer-newsletter-section .fn-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.footer-newsletter-section .fn-msg {
    width: 100%;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    padding: 10px 16px;
    border-radius: 6px;
    display: none;
    margin-top: 10px;
    text-align: center;
}

.footer-newsletter-section .fn-msg.success {
    display: block;
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid #4CAF50;
    color: #A5D6A7;
}

.footer-newsletter-section .fn-msg.error {
    display: block;
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid #f44336;
    color: #FFCDD2;
}

.footer-newsletter-section .fn-privacy {
    margin-top: 12px;
    font-size: 11px;
    color: rgba(245, 241, 232, 0.4);
    font-family: 'Inter', sans-serif;
}

/* ── Inline Newsletter Section (for pages without one) ───── */
.unity-nl-section {
    padding: 72px 24px;
    background: var(--olive-green, #6B8E23);
    text-align: center;
}

.unity-nl-section .nl-inner {
    max-width: 600px;
    margin: 0 auto;
}

.unity-nl-section .nl-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.unity-nl-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(22px, 4vw, 30px);
    color: #FFFFFF;
    margin: 0 0 12px;
    line-height: 1.2;
}

.unity-nl-section p {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 32px;
    line-height: 1.55;
}

.unity-nl-section .nl-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 520px;
    margin: 0 auto;
    position: relative;
}

.unity-nl-section .nl-form input[type="email"] {
    flex: 1;
    min-width: 220px;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, background 0.2s;
}

.unity-nl-section .nl-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.unity-nl-section .nl-form input[type="email"]:focus {
    border-color: #C5A55A;
    background: rgba(255, 255, 255, 0.18);
}

.unity-nl-section .nl-submit {
    padding: 15px 32px;
    background: #1F3A2E;
    color: #C5A55A;
    border: 2px solid #C5A55A;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    white-space: nowrap;
}

.unity-nl-section .nl-submit:hover:not(:disabled) {
    background: #C5A55A;
    color: #1F3A2E;
    transform: translateY(-2px);
}

.unity-nl-section .nl-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.unity-nl-section .nl-msg {
    width: 100%;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    padding: 12px 16px;
    border-radius: 6px;
    display: none;
    margin-top: 12px;
}

.unity-nl-section .nl-msg.success {
    display: block;
    background: rgba(76, 175, 80, 0.25);
    border: 1px solid rgba(76, 175, 80, 0.7);
    color: #E8F5E9;
}

.unity-nl-section .nl-msg.error {
    display: block;
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid rgba(244, 67, 54, 0.6);
    color: #FFEBEE;
}

.unity-nl-section .nl-perks {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}

.unity-nl-section .nl-perk {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 5px;
}

.unity-nl-section .nl-perk::before {
    content: '✓';
    color: #C5A55A;
    font-weight: 700;
}

/* Responsive */
@media (max-width: 640px) {
    #unity-newsletter-bar {
        padding: 12px 16px;
    }
    .nb-inner {
        gap: 10px;
    }
    .nb-text strong {
        font-size: 13px;
    }
    .nb-text span {
        font-size: 11px;
    }
    .nb-form {
        flex-direction: column;
    }
    .nb-form input[type="email"] {
        width: 100%;
    }
    .footer-newsletter-section {
        padding: 36px 16px;
    }
    .unity-nl-section {
        padding: 52px 16px;
    }
    .unity-nl-section .nl-form {
        flex-direction: column;
        align-items: stretch;
    }
}
