/* --- Newsletter Block Container --- */
.newsletter-block {
    background-color: var(--theme-color-primary);
    padding: 40px 0px;
}

#mc_embed_signup {
    background: transparent !important;
    width: 100%;
    overflow: visible !important;
}

#mc_embed_signup form {
    margin: 0px !important;
}

/* --- Layout: Flex Row Setup --- */
#mc_embed_signup_scroll {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* --- Headers & Global Text --- */
#mc_embed_signup h2 {
    color: #FFFFFF;
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
    order: -2; 
}

#mc_embed_signup .indicates-required {
    width: 100%;
    text-align: center !important; 
    color: #FFFFFF !important;
    font-size: 11px;
    margin-bottom: 10px;
    order: -1; 
}

#mc_embed_signup .asterisk {
    color: #FFFFFF !important;
}

/* --- Field Groups (Stay Inline) --- */
#mc_embed_signup .mc-field-group {
    padding: 0 !important;
    margin: 0 !important;
    flex: 1;
    min-width: 200px; /* Prevents fields from getting too narrow */
    max-width: 350px;
}

#mc_embed_signup .mc-field-group label {
    color: #FFFFFF !important;
    display: block;
    margin-bottom: 5px !important;
    font-weight: bold;
    font-size: 0.9rem;
}

/* --- Inputs --- */
#mc_embed_signup input.email, 
#mc_embed_signup input.text {
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 6px 10px !important;
    width: 100% !important;
    height: 42px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* --- Submit Button Container (Forces New Line) --- */
#mc_embed_signup .clear {
    display: flex !important; /* Use flex to center the button inside */
    justify-content: center;
    width: 100% !important; /* CRITICAL: Forces the button to sit below the inputs */
    margin-top: 20px !important; 
    padding: 0 !important;
    clear: both !important;
}

/* --- Button Styling --- */
#mc_embed_signup .button {
    background-color: var(--theme-color-secondary) !important;
    color: #FFFFFF !important;
    border-radius: var(--theme-border-radius) !important;
    text-transform: uppercase;
    height: 46px !important; 
    padding: 0 50px;
    font-weight: bold !important;
    display: inline-flex;
    align-items: center; 
    line-height: 1;
    border: none;
    cursor: pointer;
    transition: filter 0.3s ease;
}

#mc_embed_signup .button:hover {
    filter: brightness(1.2);
}

/* --- Response Messaging --- */
#mc_embed_signup #mce-responses {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
}

/* --- Mobile Responsiveness --- */
@media only screen and (max-width: 767px) {
    #mc_embed_signup_scroll {
        flex-direction: column;
        align-items: stretch;
    }

    #mc_embed_signup .mc-field-group,
    #mc_embed_signup .clear,
    #mc_embed_signup .button {
        width: 100% !important;
        max-width: 100%;
    }
}