/* --- Reset e Variáveis Globais --- */
:root {
    --primary-orange: #FF6B00; /* Laranja vibrante */
    --secondary-orange: #FF8C42; /* Laranja mais suave */
    --dark-bg: #121212; /* Fundo principal quase preto */
    --darker-bg: #0a0a0a; /* Fundo secundário */
    --text-light: #f5f5f5; /* Texto claro */
    --text-gray: #a0a0a0; /* Texto secundário */
    --glass-bg: rgba(255, 255, 255, 0.05); /* Fundo do vidro */
    --glass-border: rgba(255, 255, 255, 0.1); /* Borda do vidro */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Roboto", sans-serif;
}

html {
    scroll-behavior: smooth;
   /* background-color: var(--dark-bg);*/
}

body {
    background-color: transparent;
    color: var(--text-light);
    overflow-x: hidden; /* Evita rolagem horizontal indesejada */
}

/* --- Tipografia --- */
h1, h2, h3 {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 1px;
}

h1 {
    /* Cor padrão para H1, será sobrescrita em seções específicas se necessário */
    color: var(--primary-orange);
    line-height: 1;
}

h5 {
    color: var(--text-light);
    line-height: 1.6; /* Melhor leitura */
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
}

a {
    text-decoration: none;
    color: var(--text-light);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-orange);
}

/* --- NOVO FUNDO ANIMADO (Blobs Laranja) --- */
.background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2; /* Fica atrás de tudo */
    overflow: hidden;
    background: var(--dark-bg);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px); /* O segredo do efeito suave */
    opacity: 0.20;
    animation: moveBlob infinite alternate ease-in-out;
}

/* Blob 1 - Laranja maior no topo esquerdo */
.blob-1 {
    top: -10%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: var(--primary-orange);
    animation-duration: 5s;
}

/* Blob 2 - Âmbar no meio direito */
.blob-2 {
    top: 40%;
    right: -5%;
    width: 400px;
    height: 450px;
    background: #FF4500; /* Laranja avermelhado */
    animation-duration: 8s;
    animation-delay: -5s;
}

/* Blob 3 - Laranja suave embaixo */
.blob-3 {
    bottom: -20%;
    left: 30%;
    width: 600px;
    height: 400px;
    background: #e67e22;
    animation-duration: 3s;
    animation-delay: -6s;
}

@keyframes moveBlob {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); }
    50% { transform: translate(50px, 80px) rotate(20deg) scale(1.1); }
    100% { transform: translate(-30px, -50px) rotate(-10deg) scale(0.9); }
}


/* --- Seção CIMA (Hero) --- */
.cima {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-evenly;
    align-items: center;
    min-height: 100vh;
    padding: 50px 20px;
    position: relative;
    z-index: 1;
}

.cima .tablet {
    width: 100%;
    max-width: 580px; /* Limitando largura máxima para telas grandes */
    height: auto;
    /* Sombra suave para destacar a imagem do fundo */
    filter: drop-shadow(0 5px 10px #f59a3180);
    transition: all 0.3s ease;
}


/* --- FORMULÁRIO GLASSMORPHISM --- */
.formulario {
    width: 100%;
    /* Reduzido de 500px para 440px */
    max-width: 440px; 
    /* Reduzido o espaçamento interno de 50px para 35px */
    padding: 35px; 
    border-radius: 25px; /* Curva um pouco mais suave */

    /* Mantendo o efeito de vidro */
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.formulario h1 {
    /* Reduzido de 3.5rem para 2.8rem */
    font-size: 2.8rem; 
    font-weight: 900;
    background: linear-gradient(to right, #ffffff, var(--secondary-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px; /* Menos margem */
}

.formulario h5 {
    /* Reduzido para ficar mais delicado */
    font-size: 0.95rem; 
    line-height: 1.4;
    font-weight: 300;
    opacity: 0.9;
}

/* --- Inputs Modernos do Formulário --- */
.form-area {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    /* Reduzido o espaço entre os inputs de 25px para 18px */
    gap: 18px; 
}

/* Grupo do input para o efeito de label flutuante */
.input-group {
    position: relative;
    width: 100%;
}

.input-field {
    width: 100%;
    /* Altura um pouco menor */
    padding: 10px 5px; 
    font-size: 0.95rem;
    color: var(--text-light);
    background-color: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    outline: none;
    transition: all 0.3s ease;
}

/* O rótulo (label) */
.input-label {
    position: absolute;
    /* Ajuste de posição */
    top: 10px; 
    left: 5px;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    transition: all 0.3s ease;
}

/* Efeito quando o input está focado ou tem texto (usando o truque do placeholder " ") */
.input-field:focus,
.input-field:not(:placeholder-shown) {
    border-bottom-color: var(--primary-orange);
}

.input-field:focus + .input-label,
.input-field:not(:placeholder-shown) + .input-label {
    top: -10px;
    font-size: 0.8rem;
    color: var(--primary-orange);
    font-weight: 500;
}

/* Botão de Submit Moderno */
.form-submit-button {
    background: linear-gradient(45deg, var(--primary-orange), #FF4500);
    color: white;
    border-radius: 50px;
    border: none;
    width: 100%;
    padding: 12px; /* Botão um pouco mais fino */
    /* Fonte reduzida de 1.8rem para 1.6rem */
    font-size: 1.6rem; 
    font-family: 'Bebas Neue', sans-serif;
    cursor: pointer;
    box-shadow: 0 10px 20px -10px rgba(255, 107, 0, 0.5);
    transition: all 0.3s ease;
    letter-spacing: 1px;
    margin-top: 10px; /* Pequeno ajuste de espaço acima do botão */
}

.form-submit-button:hover {
    transform: translateY(-3px); /* Levanta ligeiramente */
    box-shadow: 0 15px 25px -10px rgba(255, 107, 0, 0.7);
    background: linear-gradient(45deg, #FF4500, var(--primary-orange)); /* Inverte gradiente */
}

.logo {
    width: auto;
    height: 50px;
    opacity: 0.8;
}


/* --- SEÇÃO CORRETORES --- */
.corretores {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    /* Fundo sólido escuro para contraste com a primeira seção */
    background-color: var(--darker-bg);
    width: 100%;
    min-height: 70vh;
    padding: 80px 20px;
    gap: 50px; /* Espaço entre imagem e texto */
    position: relative;
    z-index: 1;
}

.corretores .img_corretores {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: 20px;
    /* Sombra sutil */
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.corretores .texto {
    color: var(--text-light);
    font-weight: 300;
    font-size: 2.5rem;
    max-width: 500px;
}

.corretores h1 {
    font-size: 5.5rem;
    font-weight: 900;
    /* Laranja vibrante */
    color: var(--primary-orange);
    margin: 10px 0;
    text-shadow: 2px 2px 10px rgba(255, 107, 0, 0.2);
}

/* --- SEÇÃO EBOOKS --- */
.ebooks {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--dark-bg);
    width: 100%;
    min-height: 100vh;
    padding: 100px 20px;
    position: relative;
    z-index: 1;
}

/* Grid para organizar os ebooks */
.ebook-grid {
    display: grid;
    /* Cria colunas automáticas. Ajustei o minmax para 160px para caber melhor */
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 30px; /* Espaço entre os livros */
    width: 100%;
    max-width: 1200px;
    justify-items: center; /* Centraliza horizontalmente */
}

/* O link que envolve a imagem */
.ebook-item {
    display: block;
    width: 100%;
    /* Removemos restrições de largura aqui para o grid controlar */
    transition: transform 0.3s ease;
}

.ebook-item img {
    width: 100%; 
    /* --- O SEGREDO ESTÁ AQUI --- */
    /* Força todas as imagens a terem a proporção de um livro (Retrato) */
    aspect-ratio: 2 / 3; 
    
    /* 'fill': Estica a imagem para caber no espaço (pode distorcer um pouco as quadradas, mas garante que apareça o título todo) */
    /* Se preferir que não distorça (mas corte as bordas), troque por 'cover' */
    object-fit: fill; 
    
    border-radius: 12px; /* Bordas arredondadas */
    box-shadow: 0 8px 20px rgba(0,0,0,0.4); /* Sombra para dar profundidade */
    transition: all 0.3s ease;
    display: block;
}

/* Efeito Hover (passar o mouse) */
.ebook-item:hover img {
    transform: translateY(-10px) scale(1.05); /* Levanta e aumenta um pouco */
    box-shadow: 0 20px 30px rgba(255, 107, 0, 0.3); /* Brilho laranja ao passar o mouse */
    border: 1px solid rgba(255, 255, 255, 0.2); /* Borda sutil */
}

/* Responsividade específica para Ebooks no celular */
@media only screen and (max-width: 600px) {
    .ebook-grid {
        /* No celular, colunas um pouco menores para caber 2 lado a lado se possível */
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 15px;
    }
}


/* --- FOOTER --- */
footer {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    background-color: #050505; /* Quase preto total */
    color: var(--text-gray);
    width: 100%;
    min-height: 25vh;
    padding: 40px 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    position: relative;
    z-index: 1;
}

footer h6 {
    font-weight: 300;
    font-size: 1rem;
    letter-spacing: 1px;
}
footer .redes {
    text-align: center;
}

/* --- MEDIA QUERIES (Responsividade) --- */

/* Tablets grandes e laptops pequenos */
@media only screen and (max-width: 1200px) {
    .cima {
        /* Centraliza o conteúdo verticalmente se a tela for menor */
        justify-content: center;
        gap: 50px;
    }
    
    .cima .tablet {
        width: 60%; /* Tablet fica menor e centralizado acima do form */
        max-width: 350px;
    }
}

/* Tablets e celulares grandes */
@media only screen and (max-width: 960px) {
    .cima {
        flex-direction: column;
        text-align: center;
        padding-top: 120px; /* Mais espaço no topo para não cortar a imagem */
    }

    .cima .tablet {
        /* Em telas menores, talvez seja melhor esconder o tablet para focar no form, 
           ou deixá-lo menor acima. Vou optar por esconder para simplificar, 
           conforme seu código original tentava fazer, mas de forma mais limpa. */
        display: none; 
    }
    
    .formulario {
        padding: 30px;
    }
    
    .corretores {
        flex-direction: column-reverse;
        text-align: center;
        padding: 60px 20px;
    }
    
    .corretores .texto {
        font-size: 2rem;
    }
    .corretores h1 {
        font-size: 4rem;
    }
}

/* Celulares */
@media only screen and (max-width: 600px) {
    .formulario h1 {
        font-size: 2.5rem;
    }

    .formulario h5 {
        font-size: 1rem;
    }

    .form-submit-button {
        font-size: 1.5rem;
    }

    .corretores h1 {
        font-size: 3rem;
    }
    
    .ebook-grid {
        /* No celular, duas colunas ou uma dependendo do tamanho */
         grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
         gap: 20px;
    }
}

