/* Reset design conditions */
html {
    box-sizing: border-box;
}

*, *::after, *::before {
    box-sizing: inherit;
}

/* Custom properties */
:root {
    --Red: hsl(4, 100%, 67%);
    --LightRed: hsl(4, 100%, 90%);
    --Blue800: hsl(234, 29%, 20%);
    --Blue700: hsl(235, 18%, 26%);
    --Grey: hsl(0, 0%,58%);
    --White: hsl(0, 0%, 100%);
}

/* Design properties */
body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--Blue700);
    color: var(--Blue800);
    padding: 0;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.main-container {
    background-color: var(--White);
    display: flex;
    width: 880px;
    height: fit-content;
    padding: 20px;
    border-radius: 28px;
}

.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-container img {
    height: auto;
    width: auto;
}

.info-container {
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
}

.newsletter-title {
    font-size: 3.5em;
    margin-bottom: 20px;
}

.newsletter-p {
    margin-bottom: 24px;
    margin-top: 0;
}

.newsletter-features-list {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 40px;
    margin-top: 0;
}

.list-item {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.form-label {
    font-size: 0.8em;
    font-weight: 700;
}

.error-message {
    font-size: 0.8em;
    font-weight: 700;
    color: var(--Red);
}

#email-input {
    display: block;
    height: 3.5em;
    border: 1px solid var(--Grey);
    border-radius: 6px;
    font-size: 16px;
    padding-left: 20px;
    margin-bottom: 28px;
}

#email-input::placeholder {
    color: var(--Grey); 
    opacity: 1; 
}

/* Estilos cuando el input tiene un error */
#email-input.error {
    border: 1px solid var(--Red);
    background-color: var(--LightRed);
    color: var(--Red); /* Cambia el color del texto que se ingresa a rojo */
}

.submit-button {
    display: block;
    height: 3.5em;
    background-color: var(--Blue800);
    color: var(--White);
    border: 1px solid var(--Blue800);
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-image 0.3s ease, background-color 0.3s ease;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.submit-button:hover {
    background-image: linear-gradient(to right, hsl(351, 100%, 75%), hsl(15, 100%, 61%));
    background-color: transparent;
    border-color: transparent;
    box-shadow: 0px 8px 12px rgb(255, 63, 63);
    transform: translateY(-4px);
}

.submit-button:active {
    background-image: linear-gradient(to right, hsl(351, 100%, 65%), hsl(15, 100%, 51%));
    transform: translateY(0);
    box-shadow: 0px 2px 4px rgb(255, 63, 63);
}

.hidden {
    display: none;
}

/* Mobile design */
@media (max-width: 680px) {
    .main-container {
        flex-direction: column;
        padding: 0;
        border-radius: 0;
        width: 375px;
    }

    .image-container {
        order: -1;
        width: 100%;
        height: auto;
        object-fit: cover;
    }

    .image-container img {
        width: 100%;
        height: auto;
    }

    .info-container {
        order: 1;
        padding: 28px;
        padding-top: 0;
    }

    .newsletter-title {
        font-size: 2.5em;
    }
}