/* =================================================================
   1. VARIÁVEIS
   ================================================================= */
:root {
    --color-bg: #F8F9FA;
    --color-text: #111111;
    --color-text-secondary: #6c757d;
    --color-accent: #00BFFF;
    --color-border: #dee2e6;
    --color-blob: #00BFFF;
    --font-main: 'Sora', sans-serif;
}

/* =================================================================
   2. RESET E GLOBAIS
   ================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-weight: 400;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* =================================================================
   3. TIPOGRAFIA
   ================================================================= */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.services-section h2, .process-section h2, .portfolio-section h2 {
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 60px;
}

p {
    font-size: 1rem;
    color: var(--color-text-secondary);
}

/* =================================================================
   4. CABEÇALHO E NAVEGAÇÃO
   ================================================================= */
.main-header {
    padding: 25px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
}

.main-header.scrolled {
    background-color: rgba(248, 249, 250, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: 15px 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo, .main-nav a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 700;
}

.main-nav {
    display: flex;
    gap: 40px;
}

.main-nav a {
    font-weight: 500;
    font-size: 1rem;
    position: relative;
    padding-bottom: 5px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--color-accent);
    transition: width 0.4s ease;
}

.main-nav a:hover::after {
    width: 100%;
}

/* =================================================================
   5. SEÇÃO HERO
   ================================================================= */
.hero-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    /* Ajustes para garantir que o canvas ocupe 100% da largura e altura do hero */
    width: 100%; 
    height: 100%; /* Garante que o hero ocupe a viewport height */
}

#hero-bg-animation {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Certifica-se de que o canvas não afete o scroll */
    display: block; 
}

.hero-section .container {
    position: relative;
    z-index: 3;
}

.hero-section h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    max-width: 1000px;
    line-height: 1.2;
    margin: 0 auto 40px auto;
    letter-spacing: -0.03em;
}

#blob {
    background-image: linear-gradient(180deg, var(--color-blob), #87CEEB);
    height: 300px;
    width: 300px;
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
    border-radius: 50%;
    opacity: 0.2;
    filter: blur(80px); /* Reduzindo o blur para menos peso */
    transition: transform 0.15s ease-out;
    will-change: transform; /* Adicionado para otimização */
}

.cta-button {
    font-family: var(--font-main);
    font-weight: 500;
    font-size: 1rem;
    color: var(--color-text);
    background-color: transparent;
    border: 2px solid var(--color-border);
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-button:hover {
    background-color: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(0,0,0,0.2);
}

.scroll-down-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.mouse {
    width: 25px;
    height: 45px;
    border: 2px solid var(--color-text-secondary);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 5px;
    height: 5px;
    background-color: var(--color-text-secondary);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50%;
    opacity: 1;
    animation: scroll-wheel 2s infinite;
}

@keyframes scroll-wheel {
    to {
        opacity: 0;
        top: 25px;
    }
}

/* =================================================================
   6. SEÇÃO DE SERVIÇOS
   ================================================================= */
.services-section {
    padding: 120px 0;
    background-color: #fff;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.service-item {
    padding: 35px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background-color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
}

.service-item h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
}

/* =================================================================
   7. SEÇÃO DE PROCESSO
   ================================================================= */
.process-section {
    padding: 120px 0;
    background-color: var(--color-bg);
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.process-step {
    padding: 30px;
}

.process-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 20px;
}

.process-step h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

/* =================================================================
   8. SEÇÃO DE PROJETOS (ATUALIZADA PARA O CARROSSEL)
   ================================================================= */
.portfolio-section {
    padding: 120px 0;
    background-color: #fff;
    position: relative;
}

.project-swiper {
    width: 100%;
    padding-top: 20px;
    padding-bottom: 60px;
    /* Ajustes para o tamanho do card no carrossel */
    --swiper-navigation-size: 32px; /* Ajusta o tamanho das setas de navegação, se necessário */
    overflow: hidden; /* Garante que o conteúdo que extrapola o carrossel seja escondido */
}

.swiper-slide {
    width: 350px; /* Largura padrão para um card. Ajuste este valor conforme necessário. */
}

.project-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.project-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
}

.project-card-image {
    width: 100%;
    padding-top: 65%;
    position: relative;
    overflow: hidden;
}

.project-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.project-category {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-bottom: 5px;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.project-tags {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.project-tags span {
    font-size: 0.8rem;
    background-color: var(--color-border);
    padding: 4px 12px;
    border-radius: 20px;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--color-text);
    top: auto;
    bottom: 5px;
    height: 44px;
}

.swiper-button-prev {
    left: calc(50% - 60px);
}

.swiper-button-next {
    right: calc(50% - 60px);
}

/* =================================================================
   9. SEÇÃO DE CONTATO (ATUALIZADA COM FORMULÁRIO)
   ================================================================= */
.contact-section {
    padding: 120px 0;
    background-color: var(--color-bg);
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 80px;
    align-items: center;
}

.contact-text {
    flex: 1;
    min-width: 300px;
}

.contact-text h2 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 20px;
}

.contact-text p {
    font-size: 1.1rem;
    max-width: 45ch;
}

.contact-text a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 700;
}

.contact-form-wrapper {
    flex: 1.2;
    min-width: 300px;
}

.contact-form {
    background-color: #fff;
    padding: 40px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group label {
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(0, 191, 255, 0.2);
}

.submit-button {
    font-family: var(--font-main);
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    background-color: var(--color-text);
    border: none;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-button:hover {
    background-color: #333;
    transform: translateY(-2px);
}

/* =================================================================
   10. ANIMAÇÕES E RESPONSIVIDADE (COM AJUSTES GERAIS)
   ================================================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    transition-delay: var(--delay, 0s);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 992px) {
    .contact-container {
        gap: 60px;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .services-section,
    .process-section,
    .portfolio-section,
    .contact-section {
        padding: 80px 0;
    }

    .hero-section h1 {
        font-size: 2.2rem;
    }

    .contact-container {
        flex-direction: column;
        gap: 40px;
    }

    .contact-text {
        text-align: center;
    }

    .contact-text h2 {
        font-size: 2rem;
    }

    .contact-text p {
        margin: 0 auto;
    }

    /* Ajustes para o carrossel em telas menores */
    .swiper-slide {
        width: 85%; /* Em telas menores, o slide ocupa 85% da largura da tela */
    }
}

@media (max-width: 480px) {
    .swiper-slide {
        width: 95%; /* Em telas muito pequenas, o slide pode ocupar quase toda a largura */
    }
}