/* --- CONFIGURAÇÕES GERAIS E VARIÁVEIS --- */
:root {
    --primary: #e2a23f;    /* Dourado Principal */
    --secondary: #fbc883;  /* Dourado Claro */
    --bg-black: #000000;
    --bg-dark: #1b1b1b;
    --text-light: #ffffff;
    --text-gray: #cccccc;
}

/* --- CORREÇÃO DO SCROLL HORIZONTAL (ANDROID/IPHONE) --- */
html, body {
    width: 100%;
    max-width: 100vw; /* Garante que não passa da tela */
    overflow-x: hidden !important; /* Proíbe rolagem lateral */
    position: relative;
    margin: 0;
    padding: 0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
}

/* REGRA PARA AS IMAGENS NÃO DISTORCEREM */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    background-color: var(--bg-black);
    color: var(--text-light);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* --- BOTÕES (CTA) --- */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--bg-black);
    font-weight: 700;
    border-radius: 5px;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(226, 162, 63, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    margin-left: 10px;
}

/* --- HEADER (CABEÇALHO) --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    padding: 0 5%;
    
    /* ALINHAMENTO FLEXBOX */
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    
    z-index: 1000;
    background-color: #ffffff; 
    border-bottom: 1px solid #222;
}

.logo {
    display: flex;
    align-items: center;
    z-index: 1001; 
}

.logo img {
    height: 55px;
    width: auto;
    border-radius: 4px; 
    background-color: #fff;
    padding: 4px;
}

/* --- MENU DESKTOP --- */
nav ul {
    display: flex;
    gap: 30px;
}

nav ul li a {
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 500;
    transition: 0.3s;
    color: #000000; /* Branco no PC */
}

nav ul li a:hover {
    color: var(--primary);
}

/* --- BOTÃO HAMBÚRGUER (MOBILE) --- */
.menu-toggle {
    display: none; 
    font-size: 2rem; 
    color: var(--primary);
    cursor: pointer;
    z-index: 1001;
    transition: 0.3s;
    padding: 5px;
}

.menu-toggle:hover {
    color: var(--secondary);
    transform: scale(1.1);
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    width: 100%;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('https://images.unsplash.com/photo-1541888946425-d81bb19240f5?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    /* Proteção extra contra overflow */
    overflow: hidden; 
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-content span {
    color: var(--primary);
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* --- SEÇÕES GERAIS --- */
section {
    padding: 80px 10%;
    /* ISSO AQUI EVITA QUE ANIMAÇÕES QUEBREM O SITE NO ANDROID */
    overflow: hidden; 
    width: 100%;
}

.title {
    text-align: center;
    margin-bottom: 60px;
}

.title h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.title h2 span {
    border-bottom: 3px solid var(--primary);
}

/* --- SOBRE --- */
.about {
    background-color: var(--bg-dark);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.about-img {
    flex: 1;
    min-width: 300px;
}

.about-img img {
    width: 100%;
    border-radius: 10px;
    border: 2px solid var(--primary);
    object-fit: cover;
}

.about-text {
    flex: 1;
    min-width: 300px;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.about-text p {
    margin-bottom: 20px;
    line-height: 1.6;
    color: var(--text-gray);
}

/* --- SERVIÇOS --- */
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-dark);
    padding: 40px 20px;
    border-radius: 10px;
    text-align: center;
    transition: 0.3s;
    border-bottom: 3px solid transparent;
}

.service-card:hover {
    border-bottom: 3px solid var(--primary);
    transform: translateY(-10px);
}

.service-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-card p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* --- PORTFÓLIO --- */
.portfolio {
    background-color: var(--bg-dark);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 250px;
    cursor: pointer;
}

.project-card img {
    width: 100%;
    height: 100%; 
    object-fit: cover;
    transition: 0.5s;
}

.project-card:hover img {
    transform: scale(1.1);
    opacity: 0.4;
}

.layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.1), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 0 20px;
    opacity: 0;
    transition: 0.5s;
}

.project-card:hover .layer {
    opacity: 1;
}

.layer h3 {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--bg-black);
}

/* --- CONTATO --- */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: var(--bg-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    margin-right: 15px;
    border: 1px solid var(--primary);
}

.contact-form {
    flex: 1;
    min-width: 300px;
    background: var(--bg-dark);
    padding: 30px;
    border-radius: 10px;
}

.contact-form input, 
.contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #ffffff !important;
    color: #1b1b1b !important;
    border: 2px solid #333;
    border-radius: 5px;
    outline: none;
    font-weight: 500;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    border-color: var(--primary);
}

/* --- FOOTER --- */
footer {
    background: #111;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid #333;
}

.social-icons {
    margin-bottom: 20px;
}

.social-icons a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    background: var(--bg-dark);
    color: var(--primary);
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 10px;
    transition: 0.3s;
}

.social-icons a:hover {
    background: var(--primary);
    color: var(--bg-black);
}

/* --- WHATSAPP FLUTUANTE --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    z-index: 2000;
    transition: 0.3s;
}

/* --- RESPONSIVIDADE (MOBILE) --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: block; 
    }

    /* Correção do Alinhamento do Botão */
    nav {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        overflow: hidden; /* Importante para não quebrar layout */
    }

    /* Estilo do menu aberto */
    nav ul {
        position: fixed;
        top: 90px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 90px);
        background-color: var(--bg-black);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 50px;
        transition: 0.4s;
        border-top: 1px solid #333;
        overflow-y: auto; /* Permite rolar o menu se for muito alto */
    }

    nav ul.active {
        left: 0;
    }
    
    nav ul li {
        margin: 20px 0;
        width: 100%;
        text-align: center;
    }

    /* LINKS NO MOBILE (AMARELOS) */
    nav ul li a {
        font-size: 1.4rem;
        color: var(--primary) !important;
        font-weight: 700;
        display: block;
        padding: 10px 0;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }

    /* Correção do fundo preto no celular */
    .hero {
        background-attachment: scroll !important;
        background-position: center center;
    }

    .btn-outline {
        margin-left: 0;
        margin-top: 15px;
        display: block;
        width: 100%;
    }

    section {
        padding: 50px 5%;
        overflow: hidden; /* SEGURANÇA MÁXIMA PARA ANDROID */
    }
    
    .contact-container {
        flex-direction: column;
    }

    /* Correção Logo Clicável */
    .logo {
        position: relative;
        z-index: 2000 !important; 
    }
    
    .logo img {
        pointer-events: none; 
    }
    
    .logo a {
        display: block;
        height: 100%;
        width: 100%;
        pointer-events: auto;
    }
}