/* ============================================================
   NEWSLETTER — portal.opus.org.pl
   ============================================================ */

/* === FULL SECTION (home + dedicated page) === */
.newsletter-section {
    background: #fef5eb;
    color: #1f2937;
    padding: 72px 0;
    position: relative;
    overflow: hidden;
    border-top: 1px solid #f5dcbe;
    border-bottom: 1px solid #f5dcbe;
}
.newsletter-section::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 340px;
    height: 340px;
    background: rgba(240, 130, 27, 0.08);
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
}
.newsletter-section::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 260px;
    height: 260px;
    background: rgba(255, 237, 0, 0.12);
    border-radius: 50%;
    filter: blur(60px);
    pointer-events: none;
}
.newsletter-section > .container {
    position: relative;
    z-index: 1;
}
.newsletter-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 32px;
}
.newsletter-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: rgba(240, 130, 27, 0.12);
    color: #c96a15;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.newsletter-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #111827;
    letter-spacing: -0.01em;
}
.newsletter-header p {
    font-size: 0.98rem;
    color: #4b5563;
    line-height: 1.65;
    margin: 0;
}
.newsletter-form-wrap {
    max-width: 780px;
    margin: 0 auto;
    background: #fff;
    color: #111827;
    border-radius: 14px;
    padding: 28px 32px;
    border: 1px solid #f3e4d1;
    box-shadow: 0 12px 32px rgba(240, 130, 27, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
}
.newsletter-form-wrap h3 {
    font-size: 0.78rem;
    font-weight: 600;
    color: #9ca3af;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.newsletter-topics {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 8px;
    margin-bottom: 22px;
}
.newsletter-topic {
    position: relative;
    cursor: pointer;
    user-select: none;
    display: flex;
}
.newsletter-topic input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.newsletter-topic-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.18s ease;
    width: 100%;
    min-height: 72px;
}
.newsletter-topic-label:hover {
    border-color: #f4b07c;
    background: #fef9f2;
}
.newsletter-topic input:checked + .newsletter-topic-label {
    border-color: #F0821B;
    background: #fff7ed;
}
.newsletter-topic input:checked + .newsletter-topic-label .t-title::after {
    content: ' ✓';
    color: #F0821B;
    font-weight: 700;
}
.newsletter-topic-label .bi {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    opacity: 0.85;
}
.newsletter-topic-label > div {
    flex: 1;
    min-width: 0;
}
.newsletter-topic-label .t-title {
    font-weight: 600;
    font-size: 13.5px;
    color: #1f2937;
    margin-bottom: 2px;
    line-height: 1.3;
}
.newsletter-topic-label .t-desc {
    font-size: 11.5px;
    color: #6b7280;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}
.newsletter-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 12px;
}
.newsletter-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14.5px;
    transition: border-color 0.18s, box-shadow 0.18s;
    background: #fff;
    color: #111827;
}
.newsletter-input:focus {
    outline: none;
    border-color: #F0821B;
    box-shadow: 0 0 0 3px rgba(240, 130, 27, 0.12);
}
.newsletter-submit {
    padding: 12px 22px;
    background: #F0821B;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.18s, transform 0.1s;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(240, 130, 27, 0.25);
}
.newsletter-submit:active { transform: translateY(1px); }
.newsletter-submit:hover { background: #c96a15; }
.newsletter-submit:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}
.newsletter-rodo {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 12.5px;
    color: #6b7280;
    line-height: 1.5;
}
.newsletter-rodo input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}
.newsletter-rodo a { color: #F0821B; text-decoration: underline; }
.newsletter-status {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}
.newsletter-status.success { display: block; background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.newsletter-status.error { display: block; background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* === FOOTER MINI VERSION === */
.newsletter-footer {
    background: rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 16px;
    margin-top: 12px;
}
.newsletter-footer h5 {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.newsletter-footer .row-mini {
    display: flex;
    gap: 6px;
}
.newsletter-footer input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
}
.newsletter-footer input::placeholder { color: rgba(255, 255, 255, 0.6); }
.newsletter-footer input:focus { outline: none; border-color: #F0821B; background: rgba(255, 255, 255, 0.15); }
.newsletter-footer button {
    padding: 9px 14px;
    background: #F0821B;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 600;
}
.newsletter-footer button:hover { background: #c96a15; }
.newsletter-footer small {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    opacity: 0.7;
}
.newsletter-footer .newsletter-status {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 10px;
    font-size: 12px;
}
.newsletter-footer .newsletter-status.success { background: rgba(16, 185, 129, 0.25); border-color: rgba(110, 231, 183, 0.5); }
.newsletter-footer .newsletter-status.error { background: rgba(239, 68, 68, 0.25); border-color: rgba(252, 165, 165, 0.5); }

@media (max-width: 640px) {
    .newsletter-section { padding: 50px 0; }
    .newsletter-header h2 { font-size: 1.5rem; }
    .newsletter-form-wrap { padding: 24px; border-radius: 12px; }
    .newsletter-row { grid-template-columns: 1fr; }
    .newsletter-topics { grid-template-columns: 1fr; }
}
