/* =========================================
   VARIÁVEIS DE CORES ESPECÍFICAS DA MARCA
========================================== */
:root {
    --ubi-dark: #0A192F;
    /* Um azul só. O layout base repete este valor; se mudar aqui, mude lá. */
    --ubi-blue: #0093e1;
    --ubi-primary: #0093e1;
}

/* Padrão */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth; 
}

/* Classes customizadas baseadas na marca para estender o Bootstrap */
.text-ubi-dark { color: var(--ubi-dark) !important; }
.text-ubi { color: var(--ubi-primary) !important; }
.text-ubi-blue { color: var(--ubi-blue) !important; }
.bg-ubi-dark { background-color: var(--ubi-dark) !important; }
.bg-ubi-blue { background-color: var(--ubi-blue) !important; }
.bg-ubi-light { background-color: rgba(0, 147, 225, 0.1) !important; }
.text-secondary-light { color: #94A3B8 !important; }

/* Botões Customizados integrados com Bootstrap */
.btn-ubi-primary {
    background-color: var(--ubi-blue);
    color: white;
    border: none;
}
.btn-ubi-primary:hover,
.btn-ubi-primary:focus-visible {
    background-color: #007cbf;
    color: white;
}
.btn-ubi-primary:active,
.btn-ubi-primary.active {
    background-color: #006ba8 !important;
    color: white !important;
}
.btn-ubi-primary:disabled,
.btn-ubi-primary.disabled {
    background-color: var(--ubi-blue);
    color: white;
    opacity: .65;
}
.btn-outline-ubi-dark {
    color: var(--ubi-dark);
    border: 2px solid var(--ubi-dark);
    background-color: transparent;
}
.btn-outline-ubi-dark:hover {
    background-color: var(--ubi-dark);
    color: white;
}
.btn-outline-ubi-blue {
    color: var(--ubi-blue);
    border: 2px solid var(--ubi-blue);
    background-color: transparent;
}
.btn-outline-ubi-blue:hover,
.btn-outline-ubi-blue:focus-visible {
    background-color: var(--ubi-blue);
    color: #fff;
}
/* O seletor duplo vence a regra do tema escuro que recolore todo `.border`. */
.border-ubi-blue,
[data-bs-theme="dark"] .border.border-ubi-blue { border-color: var(--ubi-blue) !important; }

/* Utils gerais */
.link-hover:hover { color: white !important; }

/* =========================================
   EFEITOS ESPECÍFICOS (Cards e Hero)
========================================== */
/* Borda azul de topo nos cards de features */
.feature-card {
    border-top: 4px solid var(--ubi-blue) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important;
}

/* Hero Background Gradient */
.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #F1F5F9 100%);
}

/* Visual Mockup (Efeito Glassmorphism mantido) */
.hero-visual {
    height: 450px;
    background: radial-gradient(circle at center, rgba(0, 147, 225, 0.1) 0%, transparent 70%);
}
.glass-panel {
    width: 100%;
    max-width: 400px;
    height: 300px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    box-shadow: 0 25px 40px -10px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}
.mockup-header {
    background: rgba(255, 255, 255, 0.8);
    padding: 12px 16px;
    display: flex;
    gap: 6px;
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

/* Elementos da Rota do Mockup */
.mockup-body {
    position: relative;
    height: calc(100% - 35px);
    background: url('data:image/svg+xml;utf8,<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg"><circle cx="2" cy="2" r="1" fill="%23cbd5e1"/></svg>') repeat;
}
.route-line {
    position: absolute;
    top: 50%; left: 20%; width: 60%; height: 3px;
    background: var(--ubi-blue);
    transform: rotate(-15deg);
    border-radius: 3px;
}
.pin {
    width: 14px; height: 14px; border-radius: 50%; position: absolute;
    border: 3px solid #fff; box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.pin.start { top: 60%; left: 18%; background: var(--ubi-dark); }
.pin.end { top: 38%; right: 18%; background: var(--ubi-blue); }

/* Título que acompanha o tema. Não reaproveitar `.text-ubi-dark`: ela também
   é usada sobre selos e botões brancos, que continuam brancos no escuro. */
:root { --ubi-heading: var(--ubi-dark); }
[data-bs-theme="dark"] { --ubi-heading: #e6edf3; }
.text-ubi-heading { color: var(--ubi-heading) !important; }

/* Aro da cor do fundo (círculos do "Como funciona", fotos da equipe): no claro
   era `border-white`, que no escuro vira um anel branco. Nos passos ele também
   "corta" a linha que passa por trás. */
.aro-do-fundo,
[data-bs-theme="dark"] .border.aro-do-fundo { border-color: var(--bs-body-bg) !important; }

/* ================= LANDING NO TEMA ESCURO ================= */
[data-bs-theme="dark"] .hero-section {
    background: linear-gradient(135deg, var(--bs-body-bg) 0%, #16202c 100%);
}
[data-bs-theme="dark"] .glass-panel {
    background: rgba(30, 41, 55, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 40px -10px rgba(0, 0, 0, 0.5);
}
[data-bs-theme="dark"] .mockup-header { background: rgba(15, 20, 27, 0.8); }
[data-bs-theme="dark"] .pin { border-color: var(--bs-body-bg); }
[data-bs-theme="dark"] .pin.start { background: #e6edf3; }
[data-bs-theme="dark"] .btn-outline-ubi-dark {
    color: var(--ubi-heading);
    border-color: var(--ubi-heading);
}
[data-bs-theme="dark"] .btn-outline-ubi-dark:hover {
    background-color: var(--ubi-heading);
    color: var(--bs-body-bg);
}

/* Efeito suave nos links brancos do header azul */
#header .nav-link.text-white {
    transition: opacity 0.3s ease;
}
#header .nav-link.text-white:hover {
    opacity: 0.8;
}

/* Botão de Login */
.login-btn {
    background-color: #ffffff;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.login-btn:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    color: var(--ubi-blue);
}

/* =========================================
   FOOTER
========================================== */
.footer-modern {
    background-color: var(--ubi-dark);
}

/* Links do Footer com animação de seta invisível e deslocamento */
.footer-link {
    color: #94A3B8;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}
.footer-link::before {
    content: "→";
    opacity: 0;
    margin-right: -15px;
    color: var(--ubi-blue);
    transition: all 0.3s ease;
}
.footer-link:hover {
    color: #ffffff !important;
    transform: translateX(5px);
}
.footer-link:hover::before {
    opacity: 1;
    margin-right: 8px;
}

/* Ícones de Redes Sociais */
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #94A3B8;
    border-radius: 50%;
    transition: all 0.3s ease;
}
.social-icon:hover {
    background-color: var(--ubi-blue);
    color: #ffffff;
    transform: translateY(-3px);
}

/* Links Legais Pequenos */
.footer-link-small {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    transition: color 0.3s ease;
}
.footer-link-small:hover {
    color: #ffffff;
}

/* =========================================
   PÁGINA DE SOLUÇÕES / PROJETOS
========================================== */
.tracking-wider {
    letter-spacing: 2px;
}

/* Wrapper da Imagem com cantos arredondados e hidden para o zoom não vazar */
.project-img-wrapper {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    display: block;
}

/* A imagem em si, configurada para animar */
.project-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Efeito de zoom suave ao passar o rato na imagem */
.project-img-wrapper:hover .project-img {
    transform: scale(1.05);
}

/* Links dos Títulos dos Projetos */
.project-title-link {
    text-decoration: none;
    color: var(--ubi-heading);
    display: inline-block;
}

/* Transição de cor do Título */
.project-title-link h2 {
    transition: color 0.3s ease;
}

/* Fica azul quando passa o rato no título */
.project-title-link:hover h2 {
    color: var(--ubi-blue);
}

/* Botões dos projetos */
.project-btn {
    transition: all 0.3s ease;
}
.project-btn:hover {
    background-color: var(--ubi-blue);
    color: #fff !important;
    transform: translateX(5px);
}

/* =========================================
   PÁGINA DE CONTATO
========================================== */

/* Botão direto do WhatsApp */
.contact-wa-btn {
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.contact-wa-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    background-color: #f8f9fa !important;
}

/* Estilização suave para os inputs do formulário */
.custom-input {
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    box-shadow: none !important;
    transition: all 0.3s ease;
}

.custom-input:focus {
    background-color: var(--bs-body-bg);
    border-color: var(--ubi-blue);
    box-shadow: 0 0 0 4px rgba(0, 147, 225, 0.1) !important;
}

/* Ajuste da cor da label no Form Floating */
.form-floating label {
    color: #64748b;
}
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--ubi-blue);
    font-weight: 600;
}

/* Estilos aplicados APENAS quando o menu hambúrguer está ativo (Mobile/Tablet) */
@media (max-width: 991.98px) {
    
    /* Linha fina entre os itens no mobile */
    .custom-mobile-menu .nav-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

    .custom-mobile-menu .nav-item:first-child {
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        margin-top: 1rem;
    }

    .custom-mobile-menu .nav-link {
        padding-top: 0.85rem !important;
        padding-bottom: 0.85rem !important;
    }

    /* Espaçamento superior do botão de login no mobile */
    .menu-action-wrapper {
        margin-top: 1rem;
        padding-bottom: 0.5rem;
    }
}


/* =========================================
   PÁGINA: MINHA CONTA
========================================== */

/* Foto de perfil: círculo que leva a Editar Perfil */
.profile-img-wrapper {
    position: relative;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    overflow: hidden; /* a faixa "Editar" não vaza do círculo */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}
.profile-img-wrapper:hover { transform: scale(1.02); }
.profile-img { width: 100%; height: 100%; object-fit: cover; }

/* Sem foto: a inicial do nome sobre o azul da marca */
.avatar-inicial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: var(--ubi-blue);
    color: #fff;
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1;
}

/* Faixa "Editar" que sobe ao passar o mouse ou focar pelo teclado */
.profile-img-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 25%;
    background-color: rgba(10, 25, 47, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.profile-img-wrapper:hover .profile-img-overlay,
.profile-img-wrapper:focus-visible .profile-img-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Efeitos nos itens da lista (Menu Direito) */
.account-menu-item {
    transition: all 0.2s ease;
    border-left: 4px solid transparent; /* Preparação para a borda no hover */
}

.account-menu-item:hover {
    background-color: var(--bs-tertiary-bg);
    border-left: 4px solid var(--ubi-blue); /* Borda azul aparece à esquerda */
}

/* Efeito sútil na seta (>) do menu */
.account-menu-item .arrow-icon {
    transition: transform 0.2s ease;
}

.account-menu-item:hover .arrow-icon {
    transform: translateX(5px);
    color: var(--ubi-blue) !important;
}

/* Opções de Avatares dentro do Modal */
.avatar-option {
    width: 70px;
    height: 70px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    padding: 2px;
}

.avatar-option:hover,
.avatar-option:active,
.avatar-option:focus {
    border-color: var(--ubi-blue);
    transform: scale(1.1);
}

/* Badge / Selo Estilo Google Local Guide */
.bg-ubi-light {
    background-color: rgba(0, 102, 255, 0.08) !important;
}

/* =========================================
   COMPORTAMENTO DO HEADER (Smart Header)
========================================== */
/* Adiciona transição suave para esconder/mostrar o menu */
#header {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease;
}

/* Oculta o header empurrando-o para fora da tela (para cima) */
#header.header-hidden {
    transform: translateY(-100%);
}

/* Adiciona uma sombra suave quando a tela não está mais no topo para destacar o menu do conteúdo */
#header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}

/* =========================================
   BOTÃO DE VOLTAR (ENCORPADO)
========================================== */
.btn-voltar-ubi {
    color: #64748b; /* Cor neutra equivalente ao antigo text-muted */
    font-weight: 600; /* Deixa o texto mais encorpado */
    padding: 0.5rem 1rem; /* Dá volume ao elemento transformando-o num botão */
    border-radius: 8px; /* Acompanha o padrão arredondado do layout */
    background-color: transparent;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-voltar-ubi:hover {
    color: var(--ubi-blue) !important; /* Muda a cor do texto para azul-ubi */
    background-color: rgba(0, 102, 255, 0.08); /* Fundo azul bem clarinho no hover */
    border-color: rgba(0, 102, 255, 0.15); /* Borda sutil azul */
}
