@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* ==========================================
   1. VARIÁVEIS E CONFIGURAÇÕES GLOBAIS
========================================== */
:root {
    --primary-red: #e63e2e;
    --primary-orange: #ff5722;
    --dark: #212121;
    --light: #f5f5f5;
    --gray: #757575;
}

/* ==========================================
   2. RESET E CONFIGURAÇÕES BASE
========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', 'Open Sans', 'Roboto', 'Segoe UI', sans-serif;
}

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

.logo-text {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}
/* ==========================================
   3. CLASSES UTILITÁRIAS
========================================== */
/* Apenas as classes que são efetivamente usadas no HTML */
.mb-4 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1rem; }

/* ==========================================
   4. ELEMENTOS COMUNS E COMPONENTES REUTILIZÁVEIS
========================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary-red), var(--primary-orange));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-orange));
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(230, 62, 46, 0.3);
}

/* Padronização dos títulos de seções */
.section-title {
    text-align: center;
    margin-bottom: 40px;
}

.section-title h2,
.about-text h2,
.contact .section-title h2 {
    font-size: 36px;
    margin-bottom: 15px;
    font-weight: 700;
}

/* Garantir que todos os títulos de seção tenham o mesmo estilo */
#services h2,
#about h2,
#contact h2,
.about-text h2 {
    font-size: 36px;
    font-weight: 700;
}

.section-title p {
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   5. LAYOUT DE SEÇÕES - DESKTOP (> 768px)
========================================== */
/* Configuração comum para todas as seções de altura total */
.hero,
.services,
.about,
.contact {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: start;
    scroll-margin-top: 80px;
}

.hero {
    padding-top: 80px;
    padding-bottom: 40px;
}

.services,
.about,
.contact {
    padding-top: 80px;
    padding-bottom: 50px;
}

/* Exibir o footer quando estiver na seção de contato (para desktop) */
#contact:target ~ footer {
    display: block;
}

/* ==========================================
   6. HEADER E NAVEGAÇÃO - DESKTOP (> 768px)
========================================== */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
    height: 80px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    height: 100%;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    order: 1;
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

/* Navegação */
nav {
    order: 2;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

/* Links do menu - estilo base */
nav ul li a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
}

/* Efeito hover para links do menu */
nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-orange));
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-red);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Menu mobile */
.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: var(--dark);
    margin-left: auto;
    transition: transform 0.3s ease, color 0.3s ease;
    order: 3;
}

.mobile-menu-toggle:hover {
    color: var(--primary-red);
    transform: scale(1.1);
}

/* ==========================================
   7. HERO SECTION - DESKTOP (> 768px)
========================================== */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/tech-background.jpg') center/cover;
    padding-top: 80px;
    color: white;
}

.hero-content {
    max-width: 800px;
    padding: 60px 30px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
}

/* ==========================================
   8. SEÇÃO SERVIÇOS - DESKTOP (> 768px)
========================================== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.service-card {
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    display: flex;
    flex-direction: row;
    height: 200px;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-img {
    width: 30%;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-orange));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 48px;
    flex-shrink: 0;
}

.service-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-content h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.service-content p {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 0;
    line-height: 1.4;
}

/* ==========================================
   9. SEÇÃO SOBRE - DESKTOP (> 768px)
========================================== */
.about {
    background-color: var(--dark);
    color: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.about-text h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.about-text p {
    margin-bottom: 20px;
}

.about-text p:first-of-type {
    margin-top: 15px;
}

.about-expertise {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.about-expertise h3 {
    color: var(--primary-orange);
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.expertise-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.expertise-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-orange));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.expertise-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(230, 62, 46, 0.3);
}

.expertise-icon i {
    font-size: 30px;
    color: white;
}

.expertise-item p {
    color: white;
    font-weight: 500;
    font-size: 14px;
}

/* ==========================================
   10. SEÇÃO CONTATO - DESKTOP (> 768px)
========================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.contact-text p {
    color: var(--dark);
    font-size: 16px;
    line-height: 1.6;
}

.contact-text p:first-of-type {
    margin-top: 15px;
}

.contact-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.contact-details div {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contact-details i {
    margin-right: 15px;
    color: var(--primary-red);
    font-size: 24px;
    width: 24px;
}

.contact-details p,
.contact-details a {
    margin: 0;
    font-size: 16px;
}

/* ==========================================
   11. FOOTER
========================================== */
footer {
    background-color: var(--dark);
    color: white;
    padding: 30px 0;
    text-align: center;
    width: 100%;
    /* Garantir que o footer seja visível quando necessário */
    transition: opacity 0.3s ease;
}

footer p {
    margin: 10px 0;
}

/* ==========================================
   12. MEDIA QUERIES - TABLETS (992px e abaixo)
========================================== */
@media (max-width: 992px) {
    /* Ajustes para seções */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .contact-text {
        text-align: center;
    }
}

/* ==========================================
   13. MEDIA QUERIES - MOBILE (768px e abaixo)
========================================== */
@media (max-width: 768px) {
    /* Ajustes para header e navegação */
    header {
        height: 60px; /* Reduzir altura do header em mobile */
    }

    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        height: 60px;
        padding: 10px 15px;
    }

    /* Ajuste para scroll */
    html {
        scroll-padding-top: 60px;
    }

    /* Menu mobile */
    .mobile-menu-toggle {
        display: block;
    }

    /* Estilo do menu mobile atualizado */
    nav ul {
        display: none;
        position: absolute;
        top: 60px; /* Alinhado com o topo do header */
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: white;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        padding: 0; /* Remover padding para alinhar ao topo */
        margin: 0; /* Remover margens */
        z-index: 1000;
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        margin: 0; /* Remover margens */
        text-align: center;
        width: 100%;
        padding: 15px 20px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav ul li a {
        display: block;
        width: 100%;
    }

    nav ul li a::after {
        display: none;
    }

    /* Padronização dos títulos em mobile */
    .section-title h2,
    .about-text h2,
    .contact .section-title h2,
    #services h2,
    #about h2,
    #contact h2 {
        font-size: 28px; /* Tamanho uniforme em mobile */
        font-weight: 700;
        margin-bottom: 15px;
    }

    /* Ajuste para seções em mobile - Tela cheia para cada seção */
    .hero,
    .services,
    .about,
    .contact {
        min-height: calc(100vh - 0px); /* Altura da viewport menos o header */
        scroll-margin-top: 60px;
        padding-bottom: 30px;
        position: relative;
    }

    /* Ajustes específicos para cada seção em mobile */
    .hero {
        padding-top: 60px; /* Espaçamento superior adequado para o hero */
    }

    .services,
    .about,
    .contact {
        padding-top: 60px; /* Espaçamento superior uniforme para todas as seções */
    }

    /* Ajuste para conteúdo das seções */
    .hero-content {
        padding: 30px 15px;
    }

    .hero h1 {
        font-size: 28px;
        margin-bottom: 15px;
    }

    .hero p {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .section-title {
        margin-bottom: 20px;
    }

    .section-title h2 {
        font-size: 28px;
    }

    /* Ajustes específicos para cards de serviço */
    .service-card {
        height: auto;
        flex-direction: column;
        margin-bottom: 20px;
    }

    .service-img {
        width: 100%;
        height: 80px;
    }

    /* Footer ajustado para mobile */
    footer {
        position: relative;
        display: block;
        margin-top: 0; /* Remover margem para ficar junto à seção de contato */
    }

    /* Ajustar a seção de contato para garantir continuidade com o footer */
    .contact {
        padding-bottom: 0; /* Remover padding inferior para conectar com o footer */
    }
}

/* ==========================================
   14. MEDIA QUERIES - MOBILE PEQUENO (576px e abaixo)
========================================== */
@media (max-width: 576px) {
    /* Redução adicional para espaçamentos */
    .hero h1 {
        font-size: 24px;
    }

    .section-title h2 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    /* Áreas de expertise */
    .expertise-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .expertise-icon {
        width: 60px;
        height: 60px;
    }

    .expertise-icon i {
        font-size: 24px;
    }

    .expertise-item p {
        font-size: 12px;
    }

    /* Redução adicional de margens e paddings */
    .services,
    .about,
    .contact {
        padding-top: 15px;
        padding-bottom: 20px;
    }

    .contact-card {
        padding: 20px;
    }

    .contact-details i {
        font-size: 20px;
    }

    .contact-details p,
    .contact-details a {
        font-size: 14px;
    }
}