/* Newsletter Page Stylesheet */
.newsletter-section {
    background-color: #EDF5FF;
    padding: 72px 0 96px;
    min-height: calc(100vh - 220px);
}

.newsletter-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

.newsletter-header {
    max-width: 620px;
    margin: 0 auto 56px;
    text-align: center;
}

.newsletter-header h1 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    color: #282C33;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.newsletter-header p {
    font-size: 1.1875rem;
    line-height: 1.6;
    color: #282C33;
    font-weight: 400;
    margin: 0;
}

.newsletter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 48px;
    align-items: center;
}

@media (min-width: 900px) {
    .newsletter-grid {
        grid-template-columns: minmax(0, 1fr) minmax(420px, 540px);
        gap: 64px;
    }
}

/* Left Column Visual */
.newsletter-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

@media (max-width: 767px) {
    .newsletter-visual {
        display: none;
    }
}

.newsletter-illustration {
    width: 100%;
    max-width: 440px;
    height: auto;
    display: block;
}

/* Right Column Form (unboxed on #EDF5FF) */
.newsletter-form-col {
    width: 100%;
    max-width: 540px;
    margin: 0 auto;
}

.newsletter-required-note {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: #334155;
    margin-bottom: 18px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
}

.newsletter-field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-block-end: 20px;
}

.newsletter-field label {
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.4;
    color: #282C33;
    cursor: pointer;
}

.newsletter-field .required-mark {
    color: #0066cc;
    font-weight: 700;
}

.newsletter-field input[type="text"],
.newsletter-field input[type="email"] {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    background-color: #ffffff;
    border: 1px solid #4c535d;
    border-radius: 0;
    font: inherit;
    font-size: max(1rem, 1em);
    line-height: 1.4;
    color: #1e293b;
    box-sizing: border-box;
    transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-field input::placeholder {
    color: #64748b;
}

.newsletter-field input:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 2px;
    border-color: #0066cc;
}

.newsletter-field input:is(:user-invalid, .user-invalid-fallback, .server-invalid) {
    border-color: #d93025;
    background-color: #fff5f5;
}

.newsletter-field input:is(:user-valid, .user-valid-fallback) {
    border-color: #188038;
}

.field-error {
    display: none;
    color: #b91c1c;
    font-size: 0.875rem;
    line-height: 1.4;
    font-weight: 500;
    margin-top: 2px;
}

.newsletter-field input:is(:user-invalid, .user-invalid-fallback, .server-invalid) + .field-error {
    display: block;
}

.newsletter-consent {
    font-size: 0.8125rem;
    line-height: 1.55;
    color: #282C33;
    margin: 4px 0 22px;
}

.newsletter-consent a {
    color: #282C33;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.newsletter-consent a:hover,
.newsletter-consent a:focus-visible {
    color: #0066cc;
}

.newsletter-submit-btn {
    width: 100%;
    min-height: 52px;
    padding: 14px 32px;
    background-color: #282C33;
    color: #ffffff;
    border: none;
    border-radius: 0;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.newsletter-submit-btn:hover:not(:disabled) {
    background-color: #0066cc;
}

.newsletter-submit-btn:focus-visible {
    outline: 3px solid #0066cc;
    outline-offset: 3px;
}

.newsletter-submit-btn:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.newsletter-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: newsletter-spin 0.75s linear infinite;
}

@keyframes newsletter-spin {
    to {
        transform: rotate(360deg);
    }
}

.newsletter-alert {
    margin-top: 18px;
    padding: 14px 16px;
    border-left: 4px solid transparent;
    font-size: 0.9375rem;
    line-height: 1.5;
    display: none;
    align-items: flex-start;
    gap: 10px;
}

.newsletter-alert.is-visible {
    display: flex;
}

.newsletter-alert.is-success {
    background-color: #ecfdf5;
    border-left-color: #15803d;
    color: #14532d;
}

.newsletter-alert.is-error {
    background-color: #fef2f2;
    border-left-color: #b91c1c;
    color: #7f1d1d;
}

.newsletter-alert i {
    margin-top: 3px;
    flex-shrink: 0;
}

.newsletter-support-note {
    margin-top: 28px;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #282C33;
}

.newsletter-support-note a {
    color: #0066cc;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.newsletter-support-note a:hover,
.newsletter-support-note a:focus-visible {
    color: #004080;
}

/* Accessible hidden utility (kept in accessibility tree unless aria-hidden) */
.visually-hidden:where(:not(:focus-within, :active)) {
    position: absolute !important;
    clip-path: inset(50%) !important;
    overflow: hidden !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    border: 0 !important;
    white-space: nowrap !important;
}
