/* ============================================================
   VARIÁVEIS GLOBAIS DE COR E TEMA
   Altere aqui para mudar as cores em todo o site de uma vez.
   --primary: cor de destaque (botões, links, ícones)
   --dark:    fundo escuro principal (navbar, hero)
   --light:   fundo claro (seções alternadas)
   --text:    cor do texto padrão em fundos claros
   --white:   branco puro
   ============================================================ */
:root {
    --primary: #00b4d8;
    --dark:    #0a0f1e;
    --light:   #f8f9fa;
    --text:    #333333;
    --white:   #ffffff;
}


/* ============================================================
   BASE
   Zera margens/paddings do navegador e define
   a fonte padrão e o comportamento de overflow.
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden; /* Impede scroll horizontal indesejado */
}


/* ============================================================
   BOTÕES
   .btn-primary  → botão sólido com cor de destaque
   .btn-outline  → botão vazado com borda branca (usado no hero)
   ============================================================ */
.btn-primary {
    background: var(--primary);
    padding: 15px 30px;
    color: var(--white) !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 700;
    display: inline-block;
    transition: background 0.3s, transform 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: #0096b4; /* Tom mais escuro do --primary */
    transform: translateY(-3px);
}

/* Garante que o botão dentro da seção escura de serviços
   também use a cor correta, sem herdar estilos do fundo */
.section-servicos-detalhe .btn-primary {
    background: var(--primary);
    color: var(--white) !important;
}

.btn-outline {
    border: 2px solid var(--white);
    padding: 15px 30px;
    color: var(--white) !important;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 700;
    display: inline-block;
    transition: background 0.3s, color 0.3s;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--dark) !important;
}


/* ============================================================
   NAVBAR / CABEÇALHO
   Fixo no topo da página. No topo é transparente.
   Ao rolar, o JS adiciona a classe .scrolled que
   aplica fundo escuro semitransparente com blur visual.
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: transparent; /* Começa transparente sobre o hero */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

/* Estado ao rolar: fundo escuro sólido com destaque na borda inferior */
.navbar.scrolled {
    background: rgba(10, 15, 30, 0.97);
    border-bottom: 1px solid rgba(0, 180, 216, 0.25);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* Container interno do navbar: limita largura e centraliza */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    height: 70px;
}

/* Logo do cliente na navbar */
.logo {
    height: 54px; !important;     
    width: auto;
    object-fit: contain;
    display: block;
    mix-blend-mode: lighten;
    filter: drop-shadow(0 0 8px rgba(0, 180, 216, 0.3));
}

/* Área do logo: ícone quadrado + nome da marca lado a lado */
.logo-area {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

/* Ícone quadrado com as iniciais da marca */
.logo-icon {
    width: 34px;
    height: 34px;
    background: var(--primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 13px;
    color: var(--white);
    letter-spacing: -1px;
    flex-shrink: 0;
}

/* Nome da marca ao lado do ícone */
.logo-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Segunda parte do nome em cor de destaque (ex: Sintra<span>Tech</span>) */
.logo-name span {
    color: var(--primary);
}

/* Lista de links de navegação */
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 28px;
}

/* Links padrão: brancos semitransparentes */
.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--white);
}

/* Botão de CTA no nav (ex: "Falar no WhatsApp") */
.nav-links .nav-cta {
    background: var(--primary);
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13px;
    transition: background 0.2s, transform 0.2s;
}

.nav-links .nav-cta:hover {
    background: #0096b4;
    transform: translateY(-1px);
}


/* ============================================================
   MENU HAMBÚRGUER (MOBILE)
   Botão visível apenas em telas pequenas.
   As 3 barras animam para um X quando o menu é aberto.
   ============================================================ */
.menu-toggle {
    display: none; /* Oculto no desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100;
}

/* Cada barra do ícone hambúrguer */
.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--white);
    border-radius: 2px;
    transition: all 0.35s ease;
    transform-origin: center;
}

/* Animação: barra 1 rotaciona para formar o X */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

/* Animação: barra do meio some */
.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

/* Animação: barra 3 rotaciona para fechar o X */
.menu-toggle.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}


/* ============================================================
   HERO (BANNER PRINCIPAL)
   Ocupa 100% da altura da tela.
   A imagem de fundo é definida via JS (inline style).
   background-attachment: fixed cria o efeito parallax no desktop.
   ============================================================ */
.hero {
    height: 100vh;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Efeito parallax no desktop */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

/* Subtítulo acima do título principal no hero */
.hero-subtitle {
    font-size: clamp(0.85rem, 2vw, 1.1rem); /* Tamanho fluido entre mobile e desktop */
    letter-spacing: 3px;
    line-height: 1.5;
    margin-bottom: 15px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--white);
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* Título principal do hero */
.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 8vw, 5rem); /* Escala suavemente entre telas */
    line-height: 1.1;
    margin-bottom: 30px;
    font-weight: 700;
}

/* Wrapper dos botões do hero */
.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}


/* ============================================================
   SEÇÃO SOBRE
   Grid de 2 colunas: foto à esquerda, texto à direita.
   ============================================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 80px 0;
    width: 100%;
}

/* Foto da seção Sobre */
.about-img {
    height: 550px;
    width: 100%;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Tag decorativa acima do título (ex: "QUEM SOMOS") */
.section-tag {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 12px;
    display: block;
    text-transform: uppercase;
}

/* Título da seção Sobre */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

/* Parágrafo descritivo da seção Sobre */
.about-description {
    font-size: 1rem;
    color: #555;
    line-height: 1.8;
}


/* ============================================================
   SEÇÃO DE SERVIÇOS
   Fundo preto. Grid de 2 colunas: texto à esquerda, slider à direita.
   ============================================================ */
.section-servicos-detalhe {
    padding: 100px 0;
    background-color: #000000;
    color: var(--white);
}

/* Cabeçalho centralizado com título e linhas decorativas */
.services-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 0 20px;
}

/* Título com linhas horizontais nas laterais via pseudo-elementos */
.services-main-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-transform: uppercase;
}

.services-main-title::before,
.services-main-title::after {
    content: "";
    height: 1px;
    background: rgba(255, 255, 255, 0.3);
    flex: 1;
    max-width: 100px;
}

/* Grid principal da seção: texto + slider */
.services-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    width: 100%;
    padding: 40px 0;
}

/* Texto descritivo dos serviços */
.services-description p {
    margin-bottom: 12px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.85);
}

/* Espaço acima do botão de contato na seção serviços */
.services-action {
    margin-top: 30px;
}


/* ============================================================
   SLIDER DE IMAGENS
   Imagens empilhadas com opacity 0. A .active fica com opacity 1.
   As setas ficam posicionadas sobre o slider.
   ============================================================ */
.slider-container {
    position: relative;
    width: 100%;
    height: 550px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 5;
}

/* Cada imagem do slider: absolutas e invisíveis por padrão */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 1;
}

/* Imagem ativa: visível e à frente das outras */
.slide.active {
    opacity: 1;
    z-index: 2;
}

/* Botões de navegação do slider (setas) */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 100 !important;
    transition: background 0.3s, color 0.3s;
}

.slider-btn:hover {
    background: var(--primary);
    color: var(--white);
    opacity: 1;
}

.prev { left: 10px;  border-radius: 5px; }
.next { right: 10px; border-radius: 5px; }


/* ============================================================
   BOTÃO FLUTUANTE DO WHATSAPP
   Fixo no canto inferior direito da tela.
   Começa invisível (opacity 0) e o JS adiciona .visible
   após carregar o número do PocketBase.
   ============================================================ */
#whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    pointer-events: none; /* Não clicável enquanto invisível */
}

/* Visível após JS injetar o número */
#whatsapp-float.visible {
    opacity: 1;
    pointer-events: all;
    animation: pulse-wpp 2.5s infinite;
}

#whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* Ícone dentro do botão */
#whatsapp-float img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Torna o ícone branco */
}

/* Animação de pulso do botão WhatsApp */
@keyframes pulse-wpp {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70%  { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}


/* ============================================================
   RODAPÉ
   Fundo quase preto. Grid de 2 colunas: redes sociais e contatos.
   ============================================================ */
.footer {
    background-color: #0a0a0a;
    color: var(--white);
    padding: 80px 0 40px 0;
}

/* Container interno do rodapé */
.footer-container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Grid de colunas do rodapé */
.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

/* Cada coluna do rodapé */
.footer-column {
    text-align: center;
}

/* Títulos das colunas do rodapé */
.footer-column h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--primary);
    margin: 8px 0 5px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Lista de redes sociais: coluna centralizada */
.social-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Card individual de rede social (WhatsApp, Instagram, Facebook) */
.social-item {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    transition: background 0.3s, transform 0.3s;
    text-align: left;
}

.social-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

/* Círculo com ícone da rede social */
.social-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.social-icon img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Item de contato: endereço, telefone, e-mail */
.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

/* Ícone emoji à esquerda do dado de contato */
.footer-icon {
    font-size: 1.2rem;
}

/* Links de contato no rodapé */
.contact-item a {
    color: var(--primary);
    text-decoration: none;
}

.contact-item a:hover {
    text-decoration: underline;
}

/* Barra de copyright no final do rodapé */
.copyright {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}


/* ============================================================
   RESPONSIVIDADE — TABLET (até 1024px)
   Desativa o parallax do hero que quebra no iOS.
   ============================================================ */
@media (max-width: 1024px) {
    .hero {
        background-attachment: scroll !important; /* Parallax causa bug no iOS */
        height: 80vh;
    }
}


/* ============================================================
   RESPONSIVIDADE — MOBILE (até 768px)
   Empilha grids, ajusta tamanhos de fonte,
   ativa o menu hambúrguer e adapta botões.
   ============================================================ */
@media (max-width: 768px) {

    /* Mostra o botão hambúrguer */
    .menu-toggle {
        display: flex;
    }

    /* Menu de navegação vira tela cheia ao abrir */
    #main-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--dark);
        z-index: 999;
        justify-content: center;
        align-items: center;
    }

    #main-nav.open {
        display: flex;
    }

    /* Links no menu mobile: grandes e verticais */
    .nav-links {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }

    .nav-links a {
        font-size: 1.4rem;
        font-weight: 700;
        color: rgba(255, 255, 255, 0.85);
    }

    /* CTA do nav no mobile: mesmo estilo, só maior */
    .nav-links .nav-cta {
        font-size: 1rem;
        padding: 12px 28px;
    }

    /* Botões do hero: empilhados e centralizados */
    .hero-btns {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }

    .btn-primary,
    .btn-outline {
        width: 100%;
        max-width: 280px;
        padding: 12px 20px;
        font-size: 0.9rem;
        text-align: center;
    }

    /* Espaçamento interno do hero no mobile */
    .hero-content {
        padding: 0 15px;
    }

    /* Grids de 2 colunas viram 1 coluna no mobile */
    .about-grid,
    .services-container,
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 40px;
        text-align: center;
    }

    /* Foto da seção Sobre: menor no mobile */
    .about-img {
        height: 300px;
    }

    /* Seção serviços: menos espaçamento vertical */
    .section-servicos-detalhe {
        padding: 60px 0;
    }

    /* Título dos serviços: menor no mobile, sem linhas laterais */
    .services-main-title {
        font-size: 1.5rem;
    }

    .services-main-title::before,
    .services-main-title::after {
        display: none;
    }

    /* Slider menor no mobile */
    .slider-container {
        height: 300px;
    }

    /* Cards de redes sociais: ocupam largura total */
    .social-item {
        max-width: 100%;
    }

    /* Itens de contato: empilhados verticalmente */
    .contact-item {
        flex-direction: column;
        gap: 5px;
    }

    /* Botão WhatsApp flutuante: menor no mobile */
    #whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 52px;
        height: 52px;
    }
}