/* ===================================
   Newsletter Page Styles
=================================== */

html, body {
    height: 100%;
}

body {
    color: #2c2c25;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

main {
    flex: 1;
}

/* Newsletter Cards Section */
.nl-cards-section {
    padding: 40px 16px;
    background: #ffffff;
}

.nl-cards {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    max-width: 900px;
    margin: 0 auto;
    gap: 0;
}

.nl-divider {
    flex: 0 0 60px;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nl-divider::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    background: linear-gradient(to bottom,
        rgba(212, 175, 55, 0.3),
        rgba(0, 164, 153, 0.3));
}

.nl-divider__svg {
    position: relative;
    z-index: 1;
}

.nl-card {
    flex: 1;
    padding: 32px 24px;
    text-align: center;
    background: #ffffff;
    border-radius: 16px;
    border: 2px solid transparent;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.4s ease;
}

/* Neuro card — gold */
.nl-card--neuro {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.08);
}
.nl-card--neuro:hover {
    transform: translateY(-8px);
    border-color: #d4af37;
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.18);
}

/* NeuroChild card — teal */
.nl-card--neurochild {
    border-color: rgba(0, 164, 153, 0.4);
    box-shadow: 0 4px 20px rgba(0, 164, 153, 0.08);
}
.nl-card--neurochild:hover {
    transform: translateY(-8px);
    border-color: #00A499;
    box-shadow: 0 12px 35px rgba(0, 164, 153, 0.18);
}

.nl-card__logo {
    height: 90px;
    width: auto;
    object-fit: contain;
    margin: 0 auto 28px;
    display: block;
}

.nl-card__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.nl-card__desc {
    color: #555;
    line-height: 1.75;
    font-size: 1.02rem;
    margin: 0;
}

/* nl-cards stacks vertically on mobile (base), side-by-side at 700px+ */
.nl-divider {
    flex: 0 0 44px;
    align-self: auto;
}

.nl-divider::before {
    top: 50%;
    bottom: auto;
    left: 0; right: 0;
    width: auto; height: 1px;
    transform: translateY(-50%);
    background: linear-gradient(to right,
        rgba(212, 175, 55, 0.3),
        rgba(0, 164, 153, 0.3));
}

.nl-divider__svg { transform: rotate(90deg); }

@media (min-width: 700px) {
    .nl-cards-section { padding: 56px 32px; }

    .nl-cards {
        flex-direction: row;
        gap: 0;
    }

    .nl-divider {
        flex: 0 0 60px;
        align-self: stretch;
    }

    .nl-divider::before {
        top: 0; bottom: 0;
        left: 50%; right: auto;
        width: 1px; height: auto;
        transform: translateX(-50%);
        background: linear-gradient(to bottom,
            rgba(212, 175, 55, 0.3),
            rgba(0, 164, 153, 0.3));
    }

    .nl-divider__svg { transform: none; }
    .nl-card { padding: 45px 35px; }
}

@media (min-width: 1024px) {
    .nl-cards-section { padding: 80px 40px; }
}

/* Forms Section */
.newsletter-forms-section {
    padding: 40px 16px;
    background: #fafafa;
}

.nl-forms-row {
    display: flex;
    flex-direction: column;
    gap: 48px;
    max-width: 1040px;
    margin: 0 auto;
    align-items: center;
}

.nl-form-col {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.nl-form-col h2 {
    font-size: 1.6rem;
    margin-bottom: 24px;
    font-weight: 700;
    color: #2c2c25;
}

@media (min-width: 820px) {
    .newsletter-forms-section { padding: 56px 32px; }
    .nl-forms-row { flex-direction: row; gap: 0; align-items: flex-start; }
}

@media (min-width: 1024px) {
    .newsletter-forms-section { padding: 60px 32px; }
}

/* Widen the MailerLite wrapper for the richer form */
#mlb2-21969186.ml-form-embedContainer {
    max-width: 620px;
}

/* Form group sections */
.nl-form-group {
    margin: 24px 0;
    text-align: left;
}

.nl-form-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #2c2c25;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.nl-required {
    color: #d4af37;
}

/* Field spacing — gap between name and email */
.ml-form-fieldRow:not(.ml-last-item) {
    margin-bottom: 12px;
}

/* Radio buttons — newsletter choice */
.nl-radio-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.nl-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: #fff;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c2c25;
}

.nl-radio:has(input:checked) {
    border-color: #d4af37;
    background: rgba(212, 175, 55, 0.06);
    color: #1a1a1a;
}

/* Custom radio — consistent size checked vs unchecked */
.nl-radio input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 2px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nl-radio input[type="radio"]:checked {
    background: #d4af37;
    border-color: #d4af37;
    box-shadow: inset 0 0 0 3px #fff;
}

/* Checkboxes — simple stacked list */
.nl-checkbox-grid {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.nl-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.92rem;
    color: #2c2c25;
    line-height: 1.4;
}

.nl-checkbox--all {
    font-weight: 600;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 2px;
}

.nl-checkbox input[type="checkbox"] {
    accent-color: #d4af37;
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    cursor: pointer;
}

/* ml-error states for custom elements */
.ml-error .nl-checkbox-grid {
    border: 1px solid red;
    border-radius: 8px;
    padding: 8px;
}

.ml-field-group.ml-error #nl-topics-select + .ts-wrapper .ts-control,
.ml-field-group.ml-error #nc-topics-select + .ts-wrapper .ts-control {
    border-color: red !important;
}

/* Override ML's label display:inline-block so nl-checkbox labels stay flex.
   Must use the same full chain as ML's rule to win on equal !important cascade. */
#mlb2-37824987.ml-form-embedContainer .ml-form-embedWrapper .ml-block-form .ml-field-group label.nl-checkbox,
#mlb2-37821782.ml-form-embedContainer .ml-form-embedWrapper .ml-block-form .ml-field-group label.nl-checkbox {
    display: flex !important;
    align-items: center;
    font-weight: normal;
    margin-bottom: 0;
    font-size: 0.92rem;
    width: 100%;
}

/* ML's .ml-form-fieldRow input { width: 100% !important } hits checkbox inputs too.
   Override to restore their natural 15px size. */
#mlb2-37824987.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow .nl-checkbox input[type="checkbox"],
#mlb2-37821782.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow .nl-checkbox input[type="checkbox"] {
    width: 15px !important;
    height: 15px !important;
    max-width: 15px !important;
    min-width: 0 !important;
    padding: 0 !important;
    box-sizing: content-box !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Override ML's input width:100% for Tom Select's internal search input.
   Selector specificity must match or exceed ML's (1,4,1) + !important chain. */
#mlb2-37824987.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow .ts-control > input,
#mlb2-37821782.ml-form-embedContainer .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow .ts-control > input {
    width: auto !important;
    max-width: 100% !important;
    padding: 2px 4px !important;
    background: transparent !important;
    border: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-width: 60px;
    line-height: 1.4 !important;
    font-size: 0.95rem !important;
    height: auto !important;
}

/* Tom Select — topics multi-select theme (shared by both forms) */
#nl-topics-select + .ts-wrapper .ts-control,
#nc-topics-select + .ts-wrapper .ts-control {
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 8px;
    background: #fff;
    min-height: 44px;
    padding: 6px 8px;
    font-size: 0.95rem;
    color: #2c2c25;
    box-shadow: none;
}

#nl-topics-select + .ts-wrapper.focus .ts-control,
#nc-topics-select + .ts-wrapper.focus .ts-control {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

#nl-topics-select + .ts-wrapper .ts-control .item,
#nc-topics-select + .ts-wrapper .ts-control .item {
    background: #d4af37;
    color: #fff;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.85rem;
    border: none;
}

#nl-topics-select + .ts-wrapper .ts-control .item .remove,
#nc-topics-select + .ts-wrapper .ts-control .item .remove {
    color: rgba(255, 255, 255, 0.8);
    border-left: 1px solid rgba(255, 255, 255, 0.4);
    margin-left: 4px;
    padding-left: 5px;
}

#nl-topics-select + .ts-wrapper .ts-dropdown,
#nc-topics-select + .ts-wrapper .ts-dropdown {
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

#nl-topics-select + .ts-wrapper .ts-dropdown .option:hover,
#nl-topics-select + .ts-wrapper .ts-dropdown .option.active,
#nc-topics-select + .ts-wrapper .ts-dropdown .option:hover,
#nc-topics-select + .ts-wrapper .ts-dropdown .option.active {
    background: rgba(212, 175, 55, 0.1);
    color: #1a1a1a;
}

#nl-topics-select + .ts-wrapper .ts-dropdown .option.selected,
#nc-topics-select + .ts-wrapper .ts-dropdown .option.selected {
    background: rgba(212, 175, 55, 0.08);
    color: #d4af37;
    font-weight: 600;
}

/* Footer Text */
.newsletter-footer-text {
    text-align: center;
    padding: 40px 16px 80px;
    max-width: 760px;
    margin: 0 auto;
}

.newsletter-footer-text h2 {
    font-size: 1.8rem;
    margin-bottom: 16px;
    font-weight: 700;
    color: #2c2c25;
}

.newsletter-footer-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
}

/* ===================================
   MailerLite Form Styles
=================================== */

/* Container */
#mlb2-21969186.ml-form-embedContainer {
    max-width: 460px;
    margin: 0 auto;
}

/* Neuro form card — gold */
#mlb2-37824987.ml-form-embedContainer .ml-form-embedWrapper {
    background: #ffffff !important;
    border-width: 2px !important;
    border-style: solid !important;
    border-color: rgba(212, 175, 55, 0.5) !important;
    border-radius: 12px !important;
    padding: 30px 28px;
    box-shadow: 0 8px 28px rgba(212, 175, 55, 0.1);
}

/* NeuroChild form card — teal */
#mlb2-37821782.ml-form-embedContainer .ml-form-embedWrapper {
    background: #ffffff !important;
    border-width: 2px !important;
    border-style: solid !important;
    border-color: rgba(0, 164, 153, 0.5) !important;
    border-radius: 12px !important;
    padding: 30px 28px;
    box-shadow: 0 8px 28px rgba(0, 164, 153, 0.1);
}

/* Email Input */
.ml-form-fieldRow input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 8px;
    font-size: 16px;
    color: #2c2c25;
    background: #fff;
    transition: all 0.2s ease;
}

.ml-form-fieldRow input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

.ml-form-fieldRow input::placeholder {
    color: #999;
}

/* Privacy Policy */
.ml-form-embedPermissions {
    margin: 20px 0;
    text-align: left;
}

.ml-form-embedPermissions p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #555;
    margin: 8px 0;
}

.ml-form-embedPermissions a {
    color: #d4af37;
    text-decoration: none;
    font-weight: 600;
}

.ml-form-embedPermissions a:hover {
    color: #b8942d;
}

/* Interest Groups */
.ml-form-interestGroupsRow {
    margin: 20px 0;
    text-align: left;
}

.ml-form-interestGroupsRowCheckbox {
    margin: 10px 0;
}

.ml-form-interestGroupsRowCheckbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: #2c2c25;
}

.ml-form-interestGroupsRowCheckbox input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #d4af37;
}

/* reCAPTCHA */
.ml-form-recaptcha {
    margin: 20px 0;
}

.g-recaptcha {
    display: inline-block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Submit Button */
.ml-form-embedSubmit {
    margin-top: 20px;
}

.ml-form-embedSubmit button {
    width: 100%;
    padding: 14px;
    background: #d4af37;
    color: white;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
}

.ml-form-embedSubmit button:hover {
    background: #b8942d;
    transform: translateY(-1px);
}

.ml-form-embedSubmit button.loading {
    display: none;
}

/* Loading Animation */
.ml-form-embedSubmitLoad {
    display: inline-block;
    width: 20px;
    height: 20px;
}

.ml-form-embedSubmitLoad:after {
    content: " ";
    display: block;
    width: 11px;
    height: 11px;
    margin: 1px;
    border-radius: 50%;
    border: 4px solid #fff;
    border-color: #ffffff #ffffff #ffffff transparent;
    animation: ml-form-embedSubmitLoad 1.2s linear infinite;
}

@keyframes ml-form-embedSubmitLoad {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Message */
.ml-form-successBody {
    text-align: center;
}

.ml-form-successContent h4 {
    font-size: 1.9rem;
    color: #2c2c25;
    margin-bottom: 12px;
}

.ml-form-successContent p {
    font-size: 1rem;
    color: #555;
}

/* Error States */
.ml-error input,
.ml-error textarea {
    border-color: #dc3545 !important;
}

/* Responsive */
@media (min-width: 768px) {
    .newsletter-footer-text { padding: 56px 24px 96px; }
}

@media (min-width: 1024px) {
    .newsletter-footer-text { padding: 60px 32px 120px; }
}

/* ===================================
   NeuroChild teal brand overrides
=================================== */

/* Submit button */
#mlb2-37821782 .ml-form-embedSubmit button {
    background: #00A499;
}
#mlb2-37821782 .ml-form-embedSubmit button:hover {
    background: #008c82;
}

/* Input focus */
#mlb2-37821782 .ml-form-fieldRow input:focus {
    border-color: #00A499;
    box-shadow: 0 0 0 3px rgba(0, 164, 153, 0.2);
}

/* Tom Select — control border */
#nc-topics-select + .ts-wrapper .ts-control {
    border: 1px solid rgba(0, 164, 153, 0.35);
}

/* Tom Select — focused control */
#nc-topics-select + .ts-wrapper.focus .ts-control {
    border-color: #00A499;
    box-shadow: 0 0 0 3px rgba(0, 164, 153, 0.2);
}

/* Tom Select — selected item tags */
#nc-topics-select + .ts-wrapper .ts-control .item {
    background: #00A499;
}

/* Tom Select — dropdown border */
#nc-topics-select + .ts-wrapper .ts-dropdown {
    border: 1px solid rgba(0, 164, 153, 0.35);
}

/* Tom Select — option hover/active */
#nc-topics-select + .ts-wrapper .ts-dropdown .option:hover,
#nc-topics-select + .ts-wrapper .ts-dropdown .option.active {
    background: rgba(0, 164, 153, 0.1);
    color: #1a1a1a;
}

/* Tom Select — already-selected option */
#nc-topics-select + .ts-wrapper .ts-dropdown .option.selected {
    background: rgba(0, 164, 153, 0.08);
    color: #00A499;
    font-weight: 600;
}