@charset "UTF-8";

/* Cores da paleta original do Frontend Mentor */
:root {
    --vermelho: hsl(0, 100%, 74%); /* Para erros e background */
    --verde: hsl(154, 59%, 51%); /* Para o botão principal */
    --azul-escuro: hsl(249, 10%, 26%); /* Para o texto principal */
    --azul-cinzento: hsl(246, 25%, 77%); /* Para o texto do banner */
    --roxo-banner: #5D54A3; /* Uma cor roxa para o banner de preço */
}

* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: var(--vermelho);
    background-image: url('../images/bg-intro-mobile.png');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-flow: column wrap;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    color: white;
}

.container {
    background-color: transparent;
    border-radius: 8px;
    overflow: hidden;
    max-width: 375px;
    /*Telas pequenas*/
    width: 100%;
}

.hero {
    background-color: transparent;
    color: white;
    text-align: center;
    padding: 30px;
}

.hero h1 {
    font-size: 1.75rem;
    line-height: 1.2;
    padding-bottom: 15px;
}

.hero p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.form-area {
    padding: 20px;
}

.banner {
    background-color: var(--roxo-banner);
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 0.9rem;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.banner .preco {
    font-weight: bold;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.inputs {
    position: relative;
}

.inputs input {
    width: 100%;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    font-size: 1rem;
    font-weight: bold;
    color: var(--azul-escuro);
}

.inputs input::placeholder {
    color: #bbb;
    font-weight: bold;
}

.inputs .error-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23C25E3B"%3E%3Cpath d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: center;
    width: 20px;
    height: 20px;
    display: none;
    /* Oculto por padrão */
}

.inputs.error .error-icon {
    display: block;
}

.inputs .error-msg {
    color: var(--vermelho);
    font-size: 0.7rem;
    text-align: right;
    font-style: italic;
    margin-top: 5px;
    display: none;
}

.inputs.error .error-msg {
    display: block;
}

.btn {
    background-color: var(--verde);
    color: white;
    padding: 15px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 4px 0 0 rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #77e2b3;
}

.terms {
    font-size: 0.75rem;
    color: var(--azul-cinzento);
    text-align: center;
    line-height: 1.4;
    margin-top: 15px;
}

.terms a {
    color: var(--vermelho);
    text-decoration: none;
}

/* Estilos para telas maiores (desktop) */
@media (min-width: 768px) {
    body{
        background-image: url('../images/bg-intro-desktop.png');
        flex-direction: row;
        gap: 70px;
    }
    .container {
        display: flex; /* O container principal se torna flexbox */
        max-width: 1100px;
        background-color: transparent; /* Fundo transparente */
    }

    .hero {
        width: 50%;
        text-align: left;
        padding: 0; /* Removi o padding, pois o gap do body já controla o espaçamento */
    }

    .hero h1 {
        font-size: 3rem;
        line-height: 1.1;
    }

    .form-area {
        width: 50%;
        padding: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .banner {
        margin-bottom: 25px;
        padding: 15px 40px;
    }

    .form {
        padding: 40px;
    }
}