/* Variáveis para cores */
:root {
    --bg-dark: #121212; /* Fundo principal escuro */
    --bg-light-section: #1e1e1e; /* Fundo para seções com contraste sutil */
    --text-light: #e0e0e0; /* Cor de texto principal clara */
    --text-lighter: #f0f0f0; /* Cor de texto mais clara */
    --accent-blue: #007bff; /* Azul de destaque */
    --accent-blue-dark: #0056b3; /* Azul de destaque mais escuro */
    --border-dark: #333; /* Cor de borda para elementos escuros */
    --header-height: 80px; /* Altura do cabeçalho fixo */
}

/* Reset básico e tipografia */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden; /* Evita rolagem horizontal indesejada */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Cabeçalho (Navbar) */
.navbar {
    background-color: var(--bg-dark);
    color: var(--text-lighter);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-lighter);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--accent-blue);
}

.nav-menu ul {
    list-style: none;
    display: flex;
}

.nav-menu ul li {
    margin-left: 30px;
}

.nav-menu ul li a {
    color: var(--text-lighter);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-menu ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 3px;
    background-color: var(--accent-blue);
    transition: width 0.3s ease;
}

.nav-menu ul li a:hover::after {
    width: 100%;
}

.nav-menu ul li a:hover {
    color: var(--accent-blue);
}

/* Menu Hamburguer (Mobile) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-lighter);
    margin: 4px 0;
    transition: 0.4s;
}

/* Seções Principais */
main {
    padding-top: var(--header-height); /* Espaço para o cabeçalho fixo */
}

section {
    padding: 80px 0;
    text-align: center;
    background-color: var(--bg-light-section);
    margin-bottom: 20px; /* Espaço entre as seções */
    border-bottom: 1px solid var(--border-dark);
}

section:last-of-type {
    margin-bottom: 0;
    border-bottom: none;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-lighter);
    margin-bottom: 20px;
}

h2 {
    font-size: 2.8rem;
    font-weight: 700;
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--accent-blue);
    border-radius: 2px;
}

p {
    line-height: 1.8;
    color: var(--text-light);
}

.section-description {
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 50px auto;
    color: var(--text-light);
}

/* Botões */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-blue);
    color: var(--text-lighter);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.4);
}

.btn-primary:hover {
    background-color: var(--accent-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 123, 255, 0.6);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-blue);
    border: 2px solid var(--accent-blue);
}

.btn-secondary:hover {
    background-color: var(--accent-blue);
    color: var(--text-lighter);
    transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://via.placeholder.com/1920x800?text=GuaruBalan%C3%A7as+Hero+Image') no-repeat center center/cover;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
    box-shadow: none;
    margin-bottom: 0;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 25px;
    font-weight: 700;
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 30px auto;
}

/* Products Section */
.products-section {
    background-color: var(--bg-dark); /* Fundo da seção de produtos mais escuro */
    padding-top: 80px;
}

.product-category {
    margin-bottom: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-dark);
}

.product-category:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.product-category h3 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    color: var(--accent-blue);
}

.product-category p {
    max-width: 900px;
    margin: 0 auto 40px auto;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-card {
    background-color: var(--bg-light-section);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.product-card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card h4 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-lighter);
}

.product-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    flex-grow: 1;
    margin-bottom: 20px; /* Espaço antes do botão */
}

.product-card .btn {
    align-self: flex-start; /* Alinha o botão à esquerda dentro do card */
}


/* About Section */
.about-section {
    background-color: var(--bg-light-section);
    padding: 80px 0;
}

.about-section p {
    max-width: 900px;
    margin: 0 auto 20px auto;
    font-size: 1.1rem;
    text-align: justify;
}

/* Contact Section */
.contact-section {
    background-color: var(--bg-dark);
    padding: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    margin-top: 50px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info, .contact-form {
    text-align: left;
    background-color: var(--bg-light-section);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.contact-info h3, .contact-form h3 {
    color: var(--accent-blue);
    margin-bottom: 25px;
    font-size: 1.8rem;
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
}

.contact-info i {
    color: var(--accent-blue);
    font-size: 1.2rem;
}

.social-links {
    margin-top: 25px;
}

.social-links a {
    color: var(--text-lighter);
    font-size: 1.8rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-blue);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-lighter);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-dark);
    border-radius: 5px;
    background-color: #2a2a2a; /* Input background */
    color: var(--text-lighter);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-blue);
    outline: none;
}

textarea {
    resize: vertical;
}

.contact-form .btn-primary {
    width: auto;
    padding: 12px 30px;
    margin-top: 10px;
}


/* Footer */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-light);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border-dark);
}

.footer p {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Responsividade */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: row; /* Mantém logo e menu-toggle na mesma linha */
        justify-content: space-between;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: var(--header-height); /* Abaixo do cabeçalho */
        left: 0;
        background-color: var(--bg-dark);
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.6);
        padding: 20px 0;
        transition: all 0.3s ease-in-out;
        transform: translateY(-100%); /* Escondido por padrão */
    }

    .nav-menu.active {
        display: flex;
        transform: translateY(0); /* Visível quando ativo */
    }

    .nav-menu ul {
        flex-direction: column;
        width: 100%;
    }

    .nav-menu ul li {
        margin: 10px 0;
        text-align: center;
    }

    .nav-menu ul li a {
        display: block;
        padding: 10px 0;
        font-size: 1.1rem;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section p {
        font-size: 1.1rem;
    }

    h2 {
        font-size: 2.2rem;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section p {
        font-size: 1rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .product-category h3 {
        font-size: 1.8rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .contact-info, .contact-form {
        padding: 20px;
    }

    .contact-info h3, .contact-form h3 {
        font-size: 1.5rem;
    }
}