/* Informações: Estilos vibrantes para NextLynx Tech - Cores elétricas, gradientes e animações leves */
body { font-family: 'Arial', sans-serif; background-color: #f8f9fa; }

/* Header: Gradiente azul elétrico vibrante */
.bg-gradient-primary { background: linear-gradient(135deg, #00BFFF, #1E90FF); } /* Azul vibrante */
header img.logo-animate { height: 40px; animation: pulse 2s infinite; } /* Animação: pulse suave */

/* Cards Hover: Elevação com cor */
.card { transition: transform 0.3s, box-shadow 0.3s; border: none; }
.card:hover { transform: translateY(-10px); box-shadow: 0 10px 20px rgba(0,191,255,0.3); } /* Sombra azul vibrante */

/* Gradientes Vibrantes para Cards de Serviços */
.bg-gradient-orange { background: linear-gradient(135deg, #FF6B35, #F7931E); } /* Laranja energético */
.bg-gradient-green { background: linear-gradient(135deg, #32CD32, #228B22); } /* Verde fresco */
.bg-gradient-blue { background: linear-gradient(135deg, #00BFFF, #4169E1); } /* Azul elétrico */

/* Animações: Keyframes e Classes */
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-10px); } 60% { transform: translateY(-5px); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.btn-pulse { animation: pulse 2s infinite; }
.btn-bounce { animation: bounce 1s infinite; }
.animate-fade-in { animation: fade-in 1s ease-in; }
.animate-slide-up { animation: slide-up 0.8s ease-out; }

/* Promoções: Gradiente Multicolor Vibrante */
.promocoes { background: linear-gradient(135deg, #FF6B35, #00BFFF, #32CD32); color: white; padding: 20px; margin: 20px 0; border-radius: 15px; animation: fade-in 1.5s; }

/* Portfolio Grid: Responsivo com Gap */
.portfolio-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

/* WhatsApp Flutuante: Bounce Vibrante */
.btn-whatsapp { position: fixed; bottom: 20px; right: 20px; z-index: 1000; background: #25D366; color: white; border-radius: 50%; width: 60px; height: 60px; animation: bounce 2s infinite; transition: transform 0.3s; }
.btn-whatsapp:hover { transform: scale(1.1); background: #128C7E; }

/* Scroll Animações: Intersection Observer via JS, mas CSS base */
.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity 0.6s, transform 0.6s; }

/* Responsivo: Para Mobile */
@media (max-width: 768px) { .nav { flex-direction: column; } .btn-whatsapp { width: 50px; height: 50px; } }


/* ====================== HEADER COMPACTO E RESPONSIVO ====================== */
.header-container {
    background: var(--header-bg); /* #8B0000 */
    color: var(--header-text);
    padding: 0.5rem 0;            /* bem fino verticalmente */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.header-container .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
}


.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-animate {
    height: 55px;                 /* menor que antes */
    transition: transform 0.3s ease;
}

.logo-animate:hover {
    transform: scale(1.08);
}

.logo-text {
    font-size: 1.6rem;            /* menor */
    font-weight: 900;
    letter-spacing: 1.2px;
    margin: 0;
    white-space: nowrap;
}




/* Menu horizontal (desktop) */
nav ul {
    gap: 1.2rem !important;       /* Bootstrap gap-4 é grande demais → override */
}

.nav-link {
    font-size: 0.98rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem !important;
    transition: color 0.25s;
}

.nav-link:hover {
    color: #00f2fe;
}

/* Botão Orçamento */
.btn-orcamento {
    padding: 0.5rem 1.2rem;
    font-size: 0.95rem;
}

/* Hamburger oficial Bootstrap (mobile) */
.navbar-toggler {
    border: none;
    padding: 0.4rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler-icon {
    /* Torna branco no fundo vermelho escuro */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.95)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 1.7em;
    height: 1.7em;
}

/* 3 pontinhos (ellipsis vertical) */
.dropdown button {
    font-size: 1.8rem;            /* ⋮ maior e clicável */
    line-height: 1;
}

/* Offcanvas ajustes */
.offcanvas {
    width: 80% !important;        /* mais largo em mobile para melhor legibilidade */
    max-width: 320px;
}

.offcanvas-body .nav-link {
    font-size: 1.3rem;
    padding: 1rem 0;
}


/* ================================================ */
/* LOGO DO FOOTER – TAMANHO GRANDE E CONSISTENTE  */
/* ================================================ */

.footer-logo {
    height: 200px !important;          /* tamanho grande como nas outras páginas */
    width: auto !important;
    max-width: 100%;                    /* evita overflow em telas pequenas */
    margin: 0 auto 2rem auto !important;
    display: block !important;
    transition: transform 0.4s ease;
    filter: none !important;
    -webkit-filter: none !important;
}

.footer-logo:hover {
    transform: scale(1.05) rotate(3deg);
}

/* No telemóvel: mantém grande (ou ligeiramente reduzido se necessário) */
@media (max-width: 768px) {
    .footer-logo {
        height: 190px !important;       /* ligeira redução para caber melhor, mas ainda grande */
        margin-bottom: 1.8rem !important;
    }
}

@media (max-width: 576px) {
    .footer-logo {
        height: 180px !important;       /* valor seguro para ecrãs muito pequenos */
    }
}

/* ======================================================== */
/* ESPAÇO NORMAL E CONSISTENTE ENTRE HEADER E CONTEÚDO     */
/* ======================================================== */

body > header + main,
body > header + .container,
body > header + section {
    margin-top: 0 !important;           /* elimina qualquer margem extra em cima */
    padding-top: 1.5rem !important;     /* espaço normal e confortável (≈24px) */
}

/* Ajuste fino para páginas com .form-section ou .hero-section */
.form-section,
.hero-section,
.container.my-5 {
    margin-top: 0 !important;
    padding-top: 1.5rem !important;     /* valor equilibrado */
}

/* Em mobile: reduz ainda mais para não parecer vazio */
@media (max-width: 991.98px) {
    body > header + main,
    .form-section,
    .container.my-5 {
        padding-top: 1rem !important;   /* ≈16px – fica colado mas respirado */
    }
    
    main.container.my-5 {
        margin-top: 0 !important;
    }
}

@media (max-width: 576px) {
    body > header + main,
    .form-section {
        padding-top: 0.75rem !important; /* muito pouco espaço em mobile pequeno */
    }
}


/* ================================================ */
/* ANIMAÇÃO AUTOMÁTICA NOS TÍTULOS DE TODAS AS PÁGINAS */
/* ================================================ */

.form-title,
.hero-title,
.section-title,
.promo-title,
.hero-section h1,
.blog-section h2,
.form-section h2 {
    opacity: 0;                           /* começa invisível */
    animation: fadeInUp 1.2s ease-out forwards;
    animation-delay: 0.3s;                /* pequeno delay para não ser instantâneo */
}

/* Se quiseres delay maior para subtítulos ou promoções */
.hero-subtitle,
.hero-section p,
.promo-section h3 {
    opacity: 0;
    animation: fadeInUp 1.3s ease-out forwards;
    animation-delay: 0.7s;                /* entra um pouco depois do título principal */
}

/* Garante que a animação só rode uma vez ao carregar */
@keyframes fadeInUp {
    from {
        transform: translateY(60px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Opcional: animação mais suave em mobile */
@media (max-width: 768px) {
    .form-title,
    .hero-title,
    .section-title {
        animation-duration: 1s;           /* mais rápida em telemóvel */
        animation-delay: 0.2s;
    }
}

/* ===================================================== */
/* ESTUDANTES – TÍTULO POR CIMA + IMAGENS CENTRADAS    */
/* ===================================================== */

.students-section {
    padding-top: 2rem !important;     /* reduz espaço em cima da secção */
    padding-bottom: 4rem !important;
}

.students-section .section-title {
    margin-top: 0 !important;
    margin-bottom: 2rem !important;   /* espaço normal abaixo do título */
    text-align: center !important;
}

.student-img-container {
    height: 180px;                    /* altura fixa para uniformidade */
    overflow: hidden;
    display: flex;
    align-items: center;              /* centraliza verticalmente */
    justify-content: center;          /* centraliza horizontalmente */
    background: #f0f0f5;              /* fundo neutro se imagem não preencher */
}

.student-img {
    width: 100%;
    height: 100%;
    object-fit: cover;                /* preenche sem distorcer */
    object-position: center center;   /* garante centro perfeito */
    transition: transform 0.5s ease;
}

.student-card:hover .student-img {
    transform: scale(1.1);
}

/* Centraliza cards em mobile e desktop */
.student-card {
    max-width: 320px;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Em mobile pequeno: ocupa toda largura */
@media (max-width: 576px) {
    .student-card {
        max-width: 100%;
    }
    
    .students-section {
        padding-top: 1.5rem !important;
    }
}





/* CORREÇÃO DO DROPDOWN DOS TRÊS PONTINHOS */
.dropdown-menu {
    background-color: #8B0000 !important; /* mantém o vermelho escuro */
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.dropdown-item {
    color: white !important; /* força texto branco */
    transition: all 0.3s ease;
    padding: 0.75rem 1.5rem;
}

.dropdown-item:hover {
    background-color: rgba(255,255,255,0.15) !important; /* fundo branco semi-transparente no hover */
    color: white !important; /* mantém texto branco */
    transform: translateX(8px); /* leve deslocamento para a direita */
}

.dropdown-divider {
    border-top-color: rgba(255,255,255,0.2) !important; /* divisor mais claro */
}

.offcanvas-top {
    height: auto !important;
    max-height: 75vh;
    border-radius: 0 0 20px 20px;
}

/* 🔥 MUDANÇA PRINCIPAL: transforma lista em horizontal */
.offcanvas-body .nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* Remove comportamento vertical */
.offcanvas-body .nav-item {
    width: auto !important;
}

/* Estilo dos links como “botões compactos” */
.offcanvas-body .nav-link {
    font-size: 15px !important;
    padding: 10px 14px;
    border-radius: 12px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Botão final */
.offcanvas .btn-warning {
    font-size: 15px;
    padding: 10px 16px;
    border-radius: 12px;
    width: auto !important;
    margin-top: 15px;
}



/* Menu abre só no topo e NÃO ocupa a tela toda */
.compact-menu {
    height: auto !important;
    max-height: 45vh; /* 👈 importante: não vai até em baixo */
    border-radius: 0 0 18px 18px;
    padding: 10px 0;
}

/* tira layout vertical */
.compact-menu .offcanvas-body {
    padding: 10px;
}

/* 🔥 transforma menu em horizontal */
.compact-menu .nav {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

/* itens pequenos e organizados */
.compact-menu .nav-item {
    width: auto;
}

/* estilo compacto tipo “chips” */
.compact-menu .nav-link {
    font-size: 14px !important;
    padding: 8px 12px;
    border-radius: 20px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* botão final também compacto */
.compact-menu .btn-warning {
    font-size: 14px;
    padding: 8px 14px;
    border-radius: 20px;
    width: auto !important;
    margin-top: 10px;
}


.compact-menu {
    height: auto !important;
    max-height: 35vh; /* 🔥 reduz ainda mais a altura */
    overflow-y: auto;  /* permite scroll se passar do limite */
    border-radius: 0 0 18px 18px;
}


.compact-menu .offcanvas-body {
    max-height: 30vh;
    overflow-y: auto;
}


/* força altura controlada sem quebrar Bootstrap */
#mainMenu.offcanvas-top {
    height: auto !important;
    max-height: 35vh !important;
    min-height: 0 !important;
    transform: none !important;
    overflow: hidden;
    border-radius: 0 0 18px 18px;
}

/* corpo interno controlado */
#mainMenu .offcanvas-body {
    max-height: 30vh !important;
    overflow-y: auto !important;
    padding: 12px;
}

/* impede “explosão” de layout */
#mainMenu .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

#mainMenu.offcanvas-top {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0 0 18px 18px;
}


#mainMenu .offcanvas-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
}




@media (max-width: 768px){

    #mainMenu.offcanvas-top{
        max-height: 160px !important;
        height: auto !important;
        overflow: hidden !important;
        border-radius: 0 0 20px 20px;
    }

    #mainMenu .offcanvas-header{
        padding: 8px 14px !important;
    }

    #mainMenu .offcanvas-title{
        font-size: 16px !important;
    }

    #mainMenu .offcanvas-body{
        padding: 4px 8px 10px !important;
    }

    #mainMenu .nav{
        gap: 6px !important;
        row-gap: 4px !important;
    }

    #mainMenu .nav-link{
        font-size: 13px !important;
        padding: 4px 8px !important;
    }

    #mainMenu .menu-btn{
        font-size: 11px !important;
    padding: 5px 8px !important;
    white-space: nowrap;
    }
}






/* --- CONFIGURAÇÃO GLOBAL DO LOGO (Todas as páginas) --- */
.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    margin-bottom: 0 !important;
    white-space: nowrap;
    font-size: 1.6rem !important; /* Tamanho no Computador */
    transition: all 0.3s ease;
}

/* --- REGRAS EXCLUSIVAS PARA TELEMÓVEL (Abaixo de 992px) --- */
@media (max-width: 991.98px) {
    /* Força o título a ter exatamente o mesmo tamanho em todo o lado */
    .logo-text {
        font-size: 1.25rem !important; 
    }

    /* Garante que o cabeçalho distribua o Logo na esquerda e os Botões na direita */
    .header-container .d-flex.justify-content-between {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }

    /* Força o bloco de botões da direita a ficar junto e alinhado no canto direito */
    .header-container .d-flex.align-items-center.gap-3 {
        margin-left: auto !important; /* Empurra o grupo de botões todo para a direita */
    }
}



/* --- REGRAS EXCLUSIVAS PARA TELEMÓVEL (Abaixo de 992px) --- */
@media (max-width: 991.98px) {
    
    /* 1. Mantém a referência de centralização no cabeçalho */
    .header-container .d-flex.justify-content-between {
        position: relative !important;
    }

    /* 2. Título isolado, centralizado e com tamanho maior */
    .logo-text {
        font-family: 'Montserrat', sans-serif !important;
        font-weight: 700 !important;
        margin: 0 !important;
        white-space: nowrap;
        
        /* Aumentado de 1.2rem para 1.4rem para dar mais destaque */
        font-size: 1.4rem !important; 
        
        /* Centralização absoluta intacta */
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 1;
    }
}



/* ==========================================================================
   FORÇAR FUNDO PRETO ABSOLUTO EM TODO O SISTEMA (IGNOU GRADIENTES ANTERIORES)
   ========================================================================== */

/* ==========================================================================
   FORÇAR APENAS O FUNDO PRETO NO CORPO DO SISTEMA
   ========================================================================== */

/* Usamos o seletor combinado para ter mais peso que o estilo interno de cada página */
html body, 
html, 
body {
    background-color: #000000 !important;
    background-image: none !important; /* Desliga o --gradient-bg antigo das páginas */
    background: #000000 !important;       /* Garante o preto absoluto no fundo */
}