/* =========================================================
   VARIÁVEIS
========================================================= */
:root {
    --bg-dark: #050914;
    --bg-dark-2: #080e1c;
    --bg-card: #0c1424;
    --border: #1d2b45;
    --blue: #3b82f6;
    --blue-dark: #2458a8;
    --text: #f8fafc;
    --text-muted: #b5bfce;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    overflow-x: hidden;
}

/* =========================================================
   NAVBAR
========================================================= */
.navbar {
    width: 100%;
    height: 70px;
    background: #050a14;
    border-top: 2px solid #151d2d;
    border-bottom: 1px solid #111b2d;
    position: relative;
    z-index: 1000;
}

.navbar-container {
    width: 100%;
    max-width: 1300px;
    height: 100%;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo img {
    display: block;
    width: auto;
    height: 58px;
    max-width: 190px;
    object-fit: contain;
}

.navbar nav ul {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar nav a {
    color: #e4e8ef;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.4px;
    transition: color 0.25s ease;
}

.navbar nav a:hover {
    color: var(--blue);
}

.navbar nav li:first-child a {
    color: #467cc4;
}

/* =========================================================
   BANNER SLIDER ROTATIVO AUTOMÁTICO (FUNDO)
========================================================= */
.banner-slider {
    position: relative;
    width: 100%;
    height: 550px;
    background-color: #050a14;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 2px solid #151d2d;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 1;
}

.banner-slide.ativa {
    opacity: 1;
    z-index: 2;
}

/* Camada escura sutil por cima das imagens para destacar o texto */
.banner-slide::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 10, 20, 0.45);
    z-index: 3;
}

.banner-conteudo {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 750px;
    padding: 0 20px;
    text-align: center;
}

.banner-conteudo h1 {
    margin: 0 0 10px 0;
    color: #ffffff;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.95), 0 0 20px rgba(0, 0, 0, 0.9);
}

.banner-conteudo p {
    margin: 0 0 22px 0;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 400;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.95);
}

/* =========================================================
   BOTÃO AZUL
========================================================= */
.btn-primary {
    display: inline-block;
    padding: 9px 20px;
    background: #2864c5;
    color: #ffffff;
    border: none;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.btn-primary:hover {
    background: #3578e0;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

/* =========================================================
   PORTFÓLIO
========================================================= */
.categories-section {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto;
    padding: 55px 30px 70px 30px;
}

.section-header {
    text-align: center;
    margin-bottom: 28px;
}

.section-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: 2px;
}

.search-area {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

#search-input {
    width: 100%;
    max-width: 450px;
    height: 38px;
    padding: 0 18px;
    border: 1px solid #253a5e;
    border-radius: 20px;
    background: #0c1526;
    color: #ffffff;
    outline: none;
    font-family: inherit;
    font-size: 0.82rem;
    text-align: center;
    transition: 0.2s ease;
}

#search-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.18);
}

#search-input::placeholder {
    color: #8995a8;
}

/* =========================================================
   CARROSSEL DE CATEGORIAS SIMPLES E FUNCIONAL
========================================================= */
#category-filters-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 15px 15px 15px;
    margin: 0 auto 30px auto;
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
    scroll-behavior: smooth;
    /* Mantém a rolagem lateral limpa e oculta a barra padrão feia */
    scrollbar-width: none; 
    -ms-overflow-style: none;
}

#category-filters-container::-webkit-scrollbar {
    display: none;
}

#category-filters-container .filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
    background: #0c1526;
    border: 1px solid #253a5e;
    color: #dce3ed;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

#category-filters-container .filter-btn:hover {
    border-color: #3b82f6;
    color: #ffffff;
}

#category-filters-container .filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #ffffff;
}

.filter-btn {
    background: transparent;
    border: 1px solid #43516a;
    color: #dce3ed;
    padding: 7px 13px;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.4px;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: #4b80c5;
    color: #ffffff;
}

.filter-btn.active {
    background: #315e9d;
    border-color: #315e9d;
    color: #ffffff;
}
.portfolio-grid {
    display: grid;
    /* Ajusta automaticamente as colunas conforme o tamanho da tela, mantendo o tamanho mínimo de 260px por card */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* =========================================================
   SOBRE NÓS & CONTATO (RODAPÉ ORGANIZADO)
========================================================= */
.about-section {
    position: relative;
    width: 100%;
    background-color: #0a1425;
    background-image: linear-gradient(90deg,
        rgba(5, 12, 25, 0.97) 0%,
        rgba(8, 20, 39, 0.90) 42%,
        rgba(14, 42, 76, 0.65) 100%),
        url('/img/rodape.png');
    background-repeat: no-repeat;
    background-position: center center, right center;
    background-size: cover, cover;
    padding-bottom: 50px;
}

.about-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 25px 30px 20px 30px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    column-gap: 50px;
    align-items: start;
}

.about-content {
    width: 100%;
}

.about-content h2 {
    margin: 0 0 6px 0;
    font-size: 0.95rem;
    line-height: 1.2;
    color: #ffffff;
    font-weight: 600;
}

.about-content p {
    margin: 0;
    color: #cbd5e1;
    font-size: 0.68rem;
    line-height: 1.35;
}

.email-contato {
    margin-top: 10px !important;
    margin-bottom: 8px !important;
    font-size: 0.72rem !important;
}

.email-contato a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 600;
}

.email-contato a:hover {
    text-decoration: underline;
    color: #ffffff;
}

.btn-whatsapp-footer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #25d366;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-whatsapp-footer:hover {
    background-color: #20ba5a;
    transform: translateY(-1px);
}

/* Estilo base para os ícones sociais originais */
.icon-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.25s ease;
}

/* Cores específicas e originais ao passar o mouse ou manter a identidade */
.icon-social-btn.whatsapp:hover {
    background: #25d366;
    border-color: #25d366;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.icon-social-btn.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    border-color: #d6249f;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(214, 36, 159, 0.4);
}

.icon-social-btn.tiktok:hover {
    background: #000000;
    border-color: #ff0050;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 80, 0.4);
}

/* Grupo de ícones lado a lado */
.social-icons {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

/* Área do Formulário */
.contact-area {
    width: 100%;
    max-width: 330px;
    justify-self: end;
}

#form-contato {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#form-contato input,
#form-contato textarea {
    width: 100%;
    background: rgba(10, 18, 32, 0.65);
    border: 1px solid #334155;
    border-radius: 3px;
    outline: none;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.68rem;
    padding: 7px 10px;
    transition: border 0.2s ease, background 0.2s ease;
}

#form-contato input {
    height: 30px;
}

#form-contato textarea {
    height: 48px;
    resize: none;
}

#form-contato input::placeholder,
#form-contato textarea::placeholder {
    color: #94a3b8;
}

#form-contato input:focus,
#form-contato textarea:focus {
    border-color: #3b82f6;
    background: rgba(10, 20, 38, 0.85);
}

.contact-button {
    width: 100%;
    height: 32px;
    margin-top: 2px;
    background: #3b82f6;
    border: none;
    border-radius: 3px;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.contact-button:hover {
    background: #2563eb;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.6);
}

/* Logo Avulsa no Rodapé */
.about-logo {
    position: absolute;
    z-index: 3;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.about-logo-image {
    width: 35px;
    height: 35px;
    object-fit: contain;
    opacity: 0.95;
}

/* =========================================================
   ÁREA DO FORMULÁRIO DE CONTATO (CORRIGIDA)
========================================================= */
.contact-area {
    width: 100%;
    max-width: 330px;
    justify-self: end;
}

#form-contato {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#form-contato input,
#form-contato textarea {
    width: 100%;
    background: rgba(10, 18, 32, 0.55);
    border: 1px solid #334155;
    border-radius: 3px;
    outline: none;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.68rem;
    padding: 7px 10px;
    transition: border 0.2s ease, background 0.2s ease;
}

#form-contato input {
    height: 30px;
}

#form-contato textarea {
    height: 50px;
    resize: vertical;
}

#form-contato input::placeholder,
#form-contato textarea::placeholder {
    color: #94a3b8;
}

#form-contato input:focus,
#form-contato textarea:focus {
    border-color: #3b82f6;
    background: rgba(10, 20, 38, 0.75);
}

/* Botão de Contato com o Azul Padrão da Trace Labs e Letra Bem Visível */
.contact-button {
    width: 100%;
    height: 32px;
    margin-top: 4px;
    background: #3b82f6; /* Azul corporativo da Trace Labs */
    border: none;
    border-radius: 3px;
    color: #ffffff; /* Letra totalmente branca */
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.contact-button:hover {
    background: #2563eb;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.6);
}

/* Logo Avulsa no Rodapé perfeitamente alinhada */
.about-section {
    position: relative; /* Garante o posicionamento correto da logo */
    padding-bottom: 50px; /* Dá espaço para a logo não colar no rodapé final */
}

.about-logo {
    position: absolute;
    z-index: 3;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.about-logo-image {
    width: 40px;
    height: 40px;
    object-fit: contain;
    opacity: 0.95;
}

/* =========================================================
   FOOTER FINAL
========================================================= */
.footer-section {
    width: 100%;
    background: #050a13;
    border-top: 1px solid #111c2d;
}

.footer-bottom {
    width: 100%;
    text-align: center;
    padding: 8px 15px;
}

.footer-bottom p {
    margin: 0;
    color: #8b96a7;
    font-size: 0.60rem;
    letter-spacing: 0.2px;
}

/* =========================================================
   RESPONSIVIDADE
========================================================= */
@media (max-width: 900px) {
    .navbar-container { padding: 0 20px; }
    .navbar nav ul { gap: 16px; }
    .navbar nav a { font-size: 0.68rem; }
    .hero { height: 420px; }
    .about-container { max-width: 850px; column-gap: 30px; }
}

@media (max-width: 700px) {
    .navbar { height: auto; min-height: 70px; }
    .navbar-container { flex-direction: column; justify-content: center; gap: 8px; padding: 8px 15px; }
    .logo img { height: 48px; }
    .navbar nav ul { gap: 12px; flex-wrap: wrap; justify-content: center; }
    .navbar nav a { font-size: 0.62rem; letter-spacing: 0.2px; }
    .hero { height: 350px; }
    .hero-content { padding: 0 15px; }
    .hero-content h1 { font-size: 1.45rem; }
    .hero-content p { font-size: 0.78rem; }
    .about-container { grid-template-columns: 1fr; row-gap: 20px; padding: 25px 25px 50px; }
    .about-content { max-width: 100%; }
    .contact-area { max-width: 100%; justify-self: stretch; }
    .about-logo { display: none; }
    .categories-section { padding: 40px 18px 55px; }
    .grid-container { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

@media (max-width: 450px) {
    .navbar nav ul { gap: 9px; }
    .navbar nav a { font-size: 0.57rem; }
    .hero { height: 300px; }
    .hero-content h1 { font-size: 1.25rem; }
    .hero-content p { font-size: 0.70rem; }
    .btn-primary { padding: 8px 14px; font-size: 0.68rem; }
    .grid-container { grid-template-columns: 1fr; }
}

/* =========================================================
   CARDS DE PRODUTOS COMPACTOS COM FOTO MAIOR (ESTILO TECH)
========================================================= */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.card {
    background: #0d1527;
    border: 1px solid #3b82f6;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 8px; /* Reduzido para eliminar espaços vazios nas bordas */
}

/* Moldura e cortes tecnológicos nos cantos do card */
.card::before,
.card::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-color: #3b82f6;
    border-style: solid;
    z-index: 2;
}

.card::before {
    top: 3px;
    left: 3px;
    border-width: 2px 0 0 2px;
}

.card::after {
    bottom: 3px;
    right: 3px;
    border-width: 0 2px 2px 0;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.3);
}

/* Foto com altura aumentada para 250px */
.card-image {
    width: 100%;
    height: 250px; 
    background-color: #080e1c;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border-radius: 2px;
    border: 1px solid #1e293b;
}

.card-content {
    padding: 10px 6px 6px 6px;
}

.card-content h3 {
    margin: 0 0 4px 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.card-content p {
    margin: 0 0 8px 0;
    color: #94a3b8;
    font-size: 0.78rem;
    line-height: 1.3;
    min-height: 28px;
}

/* Tags de materiais estilizadas mais compactas */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.card-tags span {
    background: #09101d;
    border: 1px solid #1e3a8a;
    color: #93c5fd;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 0.65rem;
    font-weight: 600;
}

/* Botão de Orçamento via WhatsApp ajustado */
.whatsapp-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px;
    background: #1d4ed8;
    color: #ffffff;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    transition: background 0.25s ease;
    box-shadow: 0 0 10px rgba(29, 78, 216, 0.4);
}

.whatsapp-button:hover {
    background: #2563eb;
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.7);
}

/* Botão de WhatsApp no Rodapé */
.btn-whatsapp-footer {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #25d366;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-whatsapp-footer:hover {
    background-color: #20ba5a;
    transform: translateY(-2px);
    color: #ffffff;
}

/* Ajuste dos ícones de redes sociais para texto limpo */
.social-icons a {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.75rem;
    text-decoration: none;
    margin-right: 8px;
    transition: all 0.2s ease;
}

.social-icons a:hover {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}
.categories-filter {
    display: flex;
    gap: 10px;
    overflow-x: auto; /* Permite rolar para o lado se faltar espaço */
    white-space: nowrap;
    padding-bottom: 10px;
    margin-bottom: 20px;
    scrollbar-width: thin; /* Deixa a barra de rolagem discreta no Firefox */
}

/* Deixa a barra de rolagem bonita no Chrome/Edge */
.categories-filter::-webkit-scrollbar {
    height: 6px;
}

.categories-filter::-webkit-scrollbar-thumb {
    background: #3b82f6;
    border-radius: 4px;
}
/* Garante altura e espaço correto para a logo não subir */
.about-section {
    position: relative;
    width: 100%;
    background-color: #0a1425;
    background-image: linear-gradient(90deg,
        rgba(5, 12, 25, 0.97) 0%,
        rgba(8, 20, 39, 0.90) 42%,
        rgba(14, 42, 76, 0.65) 100%),
        url('/img/rodape.png');
    background-repeat: no-repeat;
    background-position: center center, right center;
    background-size: cover, cover;
    padding-bottom: 45px; /* Espaço limpo para a logo */
}

/* Logo Avulsa fixa e centralizada corretamente no rodapé */
.about-logo {
    position: absolute;
    z-index: 3;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.about-logo-image {
    width: 35px;
    height: 35px;
    object-fit: contain;
    opacity: 0.95;
}

/* Ajuste limpo do botão do WhatsApp */
.btn-whatsapp-footer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #25d366;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-whatsapp-footer:hover {
    background-color: #20ba5a;
}

/* Estilo da miniatura da foto na tabela */
        /* Miniatura corrigida e contida na tabela */
        .admin-thumb {
            width: 50px !important;
            height: 50px !important;
            max-width: 50px !important;
            max-height: 50px !important;
            object-fit: cover !important;
            border-radius: 4px;
            border: 1px solid #334155;
            background-color: #050b16;
            display: block;
        }

        /* Barra de busca interna do Admin */
        .admin-search-box {
            margin-bottom: 15px;
        }
        .admin-search-box input {
            max-width: 350px;
            height: 38px;
            font-size: 0.85rem;
        }
        .card-image {
    width: 100%;
    height: 250px !important; /* Força a altura para a imagem aparecer */
    background-color: #080e1c;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: cover !important; /* Garante que a foto preencha todo o espaço */
    border-radius: 2px;
    border: 1px solid #1e293b;
}