/*armazena variáveis globais (cores, bordas, etc.) */
:root {
    --main-color: #18500e;
    /* cor principal (dourado/bege) */
    --black: #13131a;
    --bg: #010103;
    --border: 0.1rem solid rgba(39, 75, 5, 0.616);
    font-size: 10px;
}

* {
    margin: 0;
    padding: 0;
    outline: none;
    border: none;
    transition: 0.2s linear;
    /* tempo das animações */
}

body {
    background: #ecfde6;
}

/*largura máxima e centraliza*/
section {
    margin: 0 auto;
    max-width: 1200px;
}

/* títulos */
.infor,
.infor2 {
    color: #ecfde6;
}

/*barra de navegação fixa*/
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 99;
    border-bottom: var(--border);
    background-color: #ecfde6;
}


/*Elementos da barra de navegação*/
.header section {
    display: flex;
    /* organiza em linha*/
    align-items: center;
    justify-content: space-between;
    /* espaço entre logo e barra */
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/*links da barra*/
.barra a {
    color: #000000;
    text-decoration: none;
    /* remove sublinhado */
    margin-left: 1.5rem;
    /* espaço entre os links */
    font-size: 2rem;
    padding: 20px;
}

/* Efeito quando o mouse passa por cima do link */
.barra a:hover {
    color: var(--main-color);
    /* muda cor para dourado */
    border-bottom: 0.1rem solid var(--main-color);
    /* linha embaixo */
    padding-bottom: 0.5rem;
    /* espaço entre o texto e a linha */
}

/* Container principal */
.containerPai {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 80px;
}

/* Card principal (fundo claro com sombra) */
.card {
    width: 80%;
    height: 80vh;
    background-color: #ffffff;
    border-radius: 32px;
    padding: 32px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 25px rgba(24, 80, 14, 0.3);
}

/* Lados (Login / Cadastro) */
.esquerda,
.direita {
    width: 50%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

/* Formulários e botões */
form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

input {
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 16px;
    width: 400px;
    background-color: #f4f8f2;
    color: #000000;
    border: 1px solid rgba(24, 80, 14, 0.2);
    outline: none;
    transition: all 0.3s ease;
}

input::placeholder {
    color: rgba(0, 0, 0, 0.842);
}

input:focus {
    background-color: #ecfde6;
    border: 1px solid #9ebb86;
}

/* Botões */
button {
    padding: 12px 20px;
    border-radius: 12px;
    border: none;
    outline: none;
    font-size: 16px;
    margin-top: 8px;
    width: 400px;
    font-weight: 700;
    cursor: pointer;

    transition: all 0.5s ease;
}

.infor2,
.infor3 {
    color: #ecfde6;
}

.loginButton,
.cadastroButton {
    background-color: #fff;
    color: #041d03;
}

.botaoEsquerda1,
.botaoEsquerda2 {
    background-color: #0e2904;
    color: #f4f8f2;
}

button:hover {
    transform: scale(1.03);
    background: #859280;
}

/* Títulos */
h2 {
    margin-bottom: 32px;
    font-size: 5rem;
    text-align: center;
    font-weight: 700;
    color: #102b02;
}

/* Textos sobrepostos */
.facaLogin,
.facaCadastro {
    position: absolute;
    transition: all 0.8s ease-in-out;
    text-align: center;
}

/* Fundo verde deslizante */
.card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(#0c2b06, #18500e);
    z-index: 0;
    transition: transform 0.9s cubic-bezier(0.77, 0, 0.175, 1);
}

/* LOGIN ATIVO */
.card.loginActive::after {
    transform: translateX(50%);
}

.card.loginActive .formLogin {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    transition: all 0.8s ease-in-out 0.4s;
}

.card.loginActive .formCadastro {
    opacity: 0;
    transform: translateX(60px);
    pointer-events: none;
    transition: all 0.4s ease-in-out;
}

.card.loginActive .facaLogin {
    opacity: 0;
    transform: translateX(-60px);
    pointer-events: none;
    transition: all 0.4s ease-in-out;
}

.card.loginActive .facaCadastro {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.8s ease-in-out 0.4s;
}

/* CADASTRO ATIVO */
.card.cadastroActive::after {
    transform: translateX(-50%);
}

.card.cadastroActive .formCadastro {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
    transition: all 0.8s ease-in-out 0.4s;
}

.card.cadastroActive .formLogin {
    opacity: 0;
    transform: translateX(-60px);
    pointer-events: none;
    transition: all 0.4s ease-in-out;
}

.card.cadastroActive .facaCadastro {
    opacity: 0;
    transform: translateX(60px);
    pointer-events: none;
    transition: all 0.4s ease-in-out;
}

.card.cadastroActive .facaLogin {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.8s ease-in-out 0.4s;
}

/* Transições gerais */
.formLogin,
.formCadastro,
.facaLogin,
.facaCadastro {
    transition: all 0.8s ease-in-out;
}

/* Tablets - até 1000px */
@media (max-width: 1000px) {
    .card {
        flex-direction: column; /* Layout em coluna */
        height: auto; /* Ajusta altura automática */
        padding: 20px; /* Ajusta padding */
    }

    .esquerda,
    .direita {
        width: 100%; /* Ocupa toda a largura */
        margin-bottom: 20px; /* Espaçamento entre os blocos */
        transform: translateX(0) !important; /* Remove deslocamento do efeito de transição */
    }

    .formLogin,
    .formCadastro,
    .facaLogin,
    .facaCadastro {
        transform: translateX(0) !important;
    }

    input,
    button {
        width: 90%; /* Ajusta largura dos inputs e botões */
    }

    h2 {
        font-size: 4rem; /* Ajusta tamanho de títulos */
        text-align: center;
    }
}

/* Celulares - até 600px */
@media (max-width: 600px) {
    .card {
        padding: 15px; /* Menor padding */
    }

    .esquerda,
    .direita {
        margin-bottom: 15px;
    }

    input,
    button {
        width: 95%; /* Inputs e botões quase toda a tela */
        font-size: 1.4rem;
        padding: 10px 15px;
    }

    h2 {
        font-size: 3rem; /* Títulos menores */
    }

    .facaLogin,
    .facaCadastro {
        font-size: 1.4rem; /* Textos sobrepostos menores */
    }
}