/* ===== ESTILOS BASE ===== */

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Estilos para seções com IDs */
#home, #sobre, #projetos, #servicos, #contato {
    scroll-margin-top: 120px;
    position: relative;
    z-index: 1;
}

/* Garante que a seção de projetos seja encontrada corretamente */
#projetos {
    position: relative;
    z-index: 1;
    padding-top: 20px; /* Adiciona espaço extra para evitar sobreposição */
}

/* Fix para sobreposição do header */
header {
    z-index: 999;
}

/* Fix específico para páginas de políticas */
header.fixed {
    z-index: 9999 !important;
}

/* Garantir que o conteúdo não sobreponha o header */
body {
    padding-top: 0;
}

/* Ajuste para seções principais em páginas de políticas */
section.min-h-screen {
    padding-top: 10rem !important;
}

/* ===== ESTILOS PARA O FORMULÁRIO ===== */
/* Dropdown de tipo de projeto */
#project-type-dropdown {
    z-index: 9999 !important;
    position: absolute !important;
}

/* Garantir que o dropdown não seja sobreposto */
#project-type-dropdown.show {
    display: block !important;
}

/* Espaçamento entre campos do formulário */
.form-group {
    margin-bottom: 2rem;
}

/* Z-index para elementos do formulário */
.glass-effect {
    position: relative;
    z-index: 1;
}

/* ===== CORREÇÃO DE HOVER PARA BOTÕES E LINKS ===== */
/* Garantir que botões CTA tenham hover branco */
.bg-gradient-to-r.from-primary.to-secondary:hover {
    color: white !important;
}

/* Garantir que links do menu tenham hover roxo */
header nav a:hover,
.mobile-menu a:hover {
    color: #D8277C !important;
}

/* Garantir que links do footer tenham hover branco */
footer a:hover {
    color: white !important;
}

/* Garantir que links de serviços tenham hover branco */
.service-card a:hover,
.project-card a:hover {
    color: white !important;
}

/* Garantir que botões específicos tenham hover branco */
.hover-scale:hover {
    color: white !important;
}

/* Garantir que botões com fundo branco translúcido tenham hover branco */
.bg-white\/20:hover {
    color: white !important;
}

/* Garantir que as seções tenham espaçamento adequado */
section {
    position: relative;
    z-index: 1;
}

/* ===== ESTILOS SIMPLES PARA OS ÍCONES DE BANDEIRA ===== */
.flag-btn {
    border: none;
    background: transparent;
    padding: 4px;
    cursor: pointer;
    border-radius: 4px;
}

.flag-btn:focus {
    outline: none;
}

.flag-btn.active {
    opacity: 1;
}

.flag-btn:not(.active) {
    opacity: 0.7;
}

.flag-btn:hover {
    opacity: 1;
}

/* Efeitos para os ícones sociais fixos */
@keyframes subtle-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    }
}

.social-icon-pulse {
    animation: subtle-pulse 3s ease-in-out infinite;
    overflow: hidden;
}

.social-icon-pulse:hover {
    animation: none;
    transform: scale(1.05);
}

/* Container dos ícones sociais */
#social-container {
    z-index: 1000;
}

#social-container a,
#social-container button {
    border: none;
    outline: none;
    box-sizing: border-box;
}

/* Reset e configurações básicas */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Configuração do body */
body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 25%, #1a1a1a 50%, #2a2a2a 75%, #3a3a3a 100%);
    color: #e2e8f0;
    overflow-x: hidden;
    position: relative;
}

/* Configuração dos ícones Remix */
:where([class^="ri-"])::before {
    content: "\f3c2";
}

/* ===== BACKGROUND ESCURO COM LINHAS DE ESBOÇO ===== */
.dark-sketch-bg {
    background: linear-gradient(180deg, #000000 0%, #000000 15%, #0a0a0a 30%, #0a0a0a 45%, #000000 60%, #000000 75%, #0a0a0a 90%, #000000 100%);
    position: relative;
    overflow: hidden;
}

.dark-sketch-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
}

.dark-sketch-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(255,255,255,0.015) 1px, transparent 1px),
        radial-gradient(circle at 85% 75%, rgba(255,255,255,0.015) 1px, transparent 1px),
        radial-gradient(circle at 35% 85%, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 300px 300px, 250px 250px, 200px 200px;
    pointer-events: none;
}

/* ===== CONTAINER PRINCIPAL PARA BACKGROUND CONTÍNUO ===== */
.dark-sections-container {
    background: linear-gradient(180deg, #000000 0%, #000000 15%, #0a0a0a 30%, #0a0a0a 45%, #000000 60%, #000000 75%, #0a0a0a 90%, #000000 100%);
    position: relative;
    overflow: hidden;
    z-index: 0;
}

.dark-sections-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
}

.dark-sections-container::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 15% 25%, rgba(255,255,255,0.015) 1px, transparent 1px),
        radial-gradient(circle at 85% 75%, rgba(255,255,255,0.015) 1px, transparent 1px),
        radial-gradient(circle at 35% 85%, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 300px 300px, 250px 250px, 200px 200px;
    pointer-events: none;
}

/* ===== EFEITOS DE VIDRO ===== */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

/* ===== HEADER FIXO COM EFEITO DE VIDRO ===== */
header,
#main-header {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 999998 !important;
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37) !important;
    min-height: 80px !important;
}

/* Garantir que o nav dentro do header seja visível */
header nav {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 999998 !important;
}

/* Garantir que nenhum elemento sobreponha o header */
#main-header * {
    z-index: 999998 !important;
}

/* Efeitos de hover para os links do header */
header nav a {
    position: relative;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
}

/* Removido o hover roxo forçado para permitir hover branco */

/* Garantir que os links do menu desktop fiquem lado a lado */
header nav .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

header nav .flex {
    display: flex !important;
    align-items: center !important;
}

header nav .space-x-8 {
    display: flex !important;
    gap: 32px !important;
}

/* Estrutura correta do header: logo na esquerda, menu e bandeiras na direita */
header nav .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}

header nav .flex {
    display: flex !important;
    align-items: center !important;
}

header nav .space-x-8 {
    display: flex !important;
    gap: 32px !important;
}

/* Garantir que o segundo flex (menu + bandeiras) fique na direita */
header nav .flex:nth-child(2) {
    margin-left: auto !important;
}

/* Forçar estrutura correta */
header nav .justify-between {
    justify-content: space-between !important;
}

/* Garantir que logo fique na esquerda */
header nav .flex:first-child {
    flex-shrink: 0 !important;
}

/* Garantir que menu e bandeiras fiquem na direita */
header nav .flex:last-child {
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

/* Sobrescrever qualquer estilo do Tailwind que possa interferir */
header nav > div.flex.items-center.justify-between {
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
}

header nav > div.flex.items-center.justify-between > div:first-child {
    flex-shrink: 0 !important;
}

header nav > div.flex.items-center.justify-between > div:last-child {
    margin-left: auto !important;
    flex-shrink: 0 !important;
}

/* Estilos para as bandeiras de idioma */
.language-flags {
    display: flex;
    align-items: center;
}

.flag-btn {
    width: 40px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    overflow: hidden;
    position: relative;
}

.flag-btn:hover {
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.flag-btn.active {
    opacity: 1;
    border-color: #a855f7;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3);
}



/* Efeito de hover para o logo */
header img {
    transition: transform 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

header img:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

/* Menu mobile com efeito de vidro */
#mobile-menu {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37) !important;
}

/* Animação do menu mobile */
#mobile-menu:not(.hidden) {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsividade dos menus */
@media (max-width: 767px) {
    /* Mobile: mostrar hambúrguer, esconder menu desktop */
    header nav .hidden.md\:flex {
        display: none !important;
    }
    
    header nav button.md\:hidden {
        display: flex !important;
    }
}

@media (min-width: 768px) {
    /* Desktop: esconder hambúrguer, mostrar menu desktop */
    header nav .hidden.md\:flex {
        display: flex !important;
        gap: 32px !important;
    }
    
    header nav button.md\:hidden {
        display: none !important;
    }
}

/* ===== LIGHTBOX ===== */
#lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 999999 !important;
}

#close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s ease;
}

#close-lightbox:hover {
    color: #D8277C;
}

#lightbox-img {
    max-width: 90%;
    max-height: 80%;
    margin: auto;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.8);
}

/* Forçar z-index baixo para todas as seções */
section, .container, .glass-effect, .project-card {
    z-index: auto !important;
}

/* Garantir que NADA possa esconder o header */
* {
    z-index: auto !important;
}

header, header * {
    z-index: 999998 !important;
}



/* Garantir que o lightbox esteja acima de TUDO */
#lightbox {
    z-index: 999999 !important;
    position: fixed !important;
}

/* ===== EFEITOS NEON ===== */
.neon-glow {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2), 0 0 40px rgba(99, 102, 241, 0.1);
    transition: box-shadow 0.3s ease;
}

.neon-glow:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.4), 0 0 60px rgba(99, 102, 241, 0.2);
}

.neon-text {
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.5), 0 0 20px rgba(99, 102, 241, 0.25);
}

/* ===== EFEITO DE REFLEXO ===== */
.reflection-effect {
    position: relative;
    overflow: hidden;
}

.reflection-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 30%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: reflection 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes reflection {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

/* ===== PARTÍCULAS DE FUNDO ===== */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    opacity: 0.4;
}

/* ===== UTILITÁRIOS ===== */
.hover-scale {
    transition: all 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
    color: white !important;
}

/* ===== ESTATÍSTICAS ===== */
.stats-card {
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.stats-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 1rem;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.stats-card:hover::before {
    opacity: 1;
}

.stats-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--tw-gradient-from), var(--tw-gradient-to));
    border-radius: 1rem;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.stats-card:hover::after {
    opacity: 0.3;
}

@keyframes stats-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(99, 102, 241, 0.4), 0 0 40px rgba(139, 92, 246, 0.2);
    }
}

.stats-card:hover {
    animation: stats-glow 2s ease-in-out infinite;
}

/* ===== SLIDER PERSONALIZADO ===== */
.slider {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

.slider::-webkit-slider-track {
    background: #1a1a1a;
    height: 8px;
    border-radius: 4px;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    cursor: pointer;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

.slider::-moz-range-track {
    background: #1a1a1a;
    height: 8px;
    border-radius: 4px;
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    cursor: pointer;
    border: none;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .particle {
        width: 3px;
        height: 3px;
    }
    
    /* Ajustes para imagens do portfolio no mobile */
    .project-card img {
        height: 60vh !important;
        object-fit: cover;
        object-position: center;
    }
    
    /* Grid responsivo para mobile */
    #projects-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    /* Cards menores no mobile */
    .project-card {
        margin-bottom: 1rem;
    }
}

/* Ajustes para tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    #projects-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
    }
    .project-card img {
        height: 70vh;
    }
}

/* Responsividade para estatísticas */
@media (max-width: 768px) {
    .stats-card {
        padding: 1rem !important;
    }
    
    .stats-card .text-4xl {
        font-size: 1.75rem !important;
    }
    
    .stats-card .text-sm {
        font-size: 0.75rem !important;
    }
}

/* ===== ESTADOS DE FOCUS ===== */
input:focus,
textarea:focus,
button:focus {
    outline: none;
    box-shadow: 0 0 0 2px #6366f1, 0 0 0 4px rgba(99, 102, 241, 0.4);
}

/* ===== ESTADOS DE HOVER PARA LINKS ===== */
/* Removido o hover roxo forçado para permitir hover branco nos menus */

/* ===== ESTADOS DE HOVER PARA BOTÕES ===== */
button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

/* ===== ESTADOS DE HOVER PARA CARDS ===== */
.project-card:hover,
.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.15), 0 0 20px rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}

/* ===== CARDS CLICÁVEIS ===== */
.project-card {
    cursor: pointer;
    user-select: none;
}

.project-card img {
    pointer-events: none;
} 

/* ===== EFEITO MODERNO PARA BOTÕES DE FILTRO ===== */
.filter-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(0);
}

.filter-btn::before {
    content: '';
    position: absolute;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(216, 39, 124, 0.8), rgba(139, 92, 246, 0.6));
    transition: bottom 0.5s ease;
    z-index: 1;
}

.filter-btn.active::before {
    bottom: 0;
}

.filter-btn.active {
    border: 1px solid rgba(216, 39, 124, 0.4);
    box-shadow: 0 0 25px rgba(216, 39, 124, 0.3);
    transform: translateY(-1px);
}

.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #D8277C, #8b5cf6);
    z-index: 2;
}

.filter-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-btn span {
    position: relative;
    z-index: 3;
}

/* ===== MOTION 3D ELABORADO ===== */
.motion-3d-art {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 60px;
    perspective: 1200px;
}

.motion-container {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    animation: container-rotate 8s linear infinite;
}

.motion-element {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 2px solid transparent;
    border-radius: 50%;
    animation: element-rotate 6s linear infinite;
}

.motion-1 {
    width: 50px;
    height: 50px;
    border-top-color: #D8277C;
    border-right-color: #8b5cf6;
    animation-duration: 4s;
    animation-direction: reverse;
}

.motion-2 {
    width: 40px;
    height: 40px;
    border-bottom-color: #8b5cf6;
    border-left-color: #D8277C;
    animation-duration: 6s;
}

.motion-3 {
    width: 30px;
    height: 30px;
    border-top-color: #D8277C;
    border-left-color: #8b5cf6;
    animation-duration: 8s;
    animation-direction: reverse;
}

.motion-core {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    transform: translate(-50%, -50%);
    animation: core-pulse 3s ease-in-out infinite;
}

.core-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #D8277C, #8b5cf6);
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(216, 39, 124, 0.8);
    animation: core-rotate 2s linear infinite;
}

@keyframes container-rotate {
    0% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
    }
    25% {
        transform: rotateX(15deg) rotateY(-15deg) rotateZ(90deg);
    }
    50% {
        transform: rotateX(-10deg) rotateY(10deg) rotateZ(180deg);
    }
    75% {
        transform: rotateX(5deg) rotateY(-5deg) rotateZ(270deg);
    }
    100% {
        transform: rotateX(0deg) rotateY(0deg) rotateZ(360deg);
    }
}

@keyframes element-rotate {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes core-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.8;
    }
}

@keyframes core-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsividade para o motion 3D */
@media (max-width: 768px) {
    .motion-3d-art {
        width: 40px;
        height: 40px;
    }
    
    .motion-1 {
        width: 35px;
        height: 35px;
    }
    
    .motion-2 {
        width: 28px;
        height: 28px;
    }
    
    .motion-3 {
        width: 20px;
        height: 20px;
    }
    
    .motion-core {
        width: 15px;
        height: 15px;
    }
}



