/* --- CONFIGURAÇÃO DE CORES --- */
:root {
    --primary: #FF9F1C;
    --primary-hover: #FFB74D;
    --bg-black: #00000000;
    --bg-darker: #FF9F1C;;
    --bg-card: #ffffff;
    --text-white: #ffffff;
    --text-black: #000000;
    --text-muted: #A0A0A0;
    --border: rgba(0, 0, 0, 0.0);
    --font-main: 'Outfit', sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: black;
    color: var(--text-gray);
    overflow-x: hidden;
    line-height: 1.7;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-white);
    font-weight: 700;
    letter-spacing: -0.5px;
}

a {
    text-decoration: none;
}

.pointer {
    cursor: pointer;
}

/* --- UTILITÁRIOS --- */
.text-primary {
    color: var(--primary) !important;
}

.text-light-gray {
    color: var(--text-gray) !important;
}

.bg-darker {
    background-color: var(--bg-darker) !important;
}

.bg-black {
    background-color: var(--bg-black) !important;
}

.bg-dark-card {
    background-color: var(--bg-card) !important;
}

.text-xs {
    font-size: 0.75rem;
}

.ls-1 {
    letter-spacing: 1px;
}

.ls-2 {
    letter-spacing: 2px;
}

.py-section {
    padding: 100px 0;
}

.fw-extrabold {
    font-weight: 800;
}

/* --- NAVBAR --- */
.glass-nav {
    background: black;
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    transition: 0.3s;
}

.nav-link {
    color: white !important;
    font-size: 0.85rem;
    transition: 0.3s;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.lang-btn {
    opacity: 0.6;
    font-size: 0.85rem;
    font-weight: 700;
    transition: 0.3s;
}

.lang-btn.active,
.lang-btn:hover {
    opacity: 1;
    color: var(--primary);
}

/* --- BANDEIRAS (ALINHAMENTO PERFEITO) --- */
.lang-switch {
    height: 100%;
    /* Garante altura total para alinhar */
}

.flag-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    /* Essencial para alinhar a imagem dentro do botão */
    align-items: center;
    /* Centra verticalmente */
    justify-content: center;
    transition: all 0.3s ease;

    /* Estado Inativo: Preto e branco e transparente */
    opacity: 0.4;
    filter: grayscale(100%);
}

.flag-btn img {
    width: 26px;
    /* Tamanho ideal para navbar */
    height: auto;
    /* Mantém proporção */
    border-radius: 2px;
    /* Cantos suaves */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    /* Sombra subtil */
    display: block;
    /* Remove espaço fantasma por baixo da imagem */
}

/* Estado Hover (Passar o rato) */
.flag-btn:hover {
    opacity: 0.8;
    filter: grayscale(0%);
    /* Cor volta */
    transform: translateY(-1px);
    /* Pequeno movimento para cima */
}

/* Estado Ativo (Língua Selecionada) */
.flag-btn.active {
    opacity: 1;
    filter: grayscale(0%);
    /* Cor total */
    transform: scale(1.15);
    /* Ligeiramente maior */
    box-shadow: 0 0 10px rgba(255, 159, 28, 0.3);
    /* Brilho subtil laranja */
}

/* --- HERO SECTION --- */
.hero-wrapper {
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
}

.overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #050505 0%, rgba(5, 5, 5, 0.85) 25%, rgba(20, 20, 20, 0.4) 50%);
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 159, 28, 0.1);
    padding: 6px 18px;
    border-radius: 50px;
    border: 1px solid var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-white);
}

.text-outline {
    -webkit-text-stroke: 1px #fff;
    color: transparent;
}

/* Botões */
.btn-primary-glow {
    background: var(--primary);
    color: #000;
    border: none;
    font-weight: 700;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.btn-primary-glow:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(255, 159, 28, 0.4);
    color: #000;
}

.btn-outline-custom {
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: 600;
}

.btn-outline-custom:hover {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.scroll-mouse {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
}

.wheel {
    width: 4px;
    height: 8px;
    background: var(--primary);
    margin: 6px auto;
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(15px);
    }
}

/* --- SOBRE (ABOUT) --- */
.image-frame {
    position: relative;
    padding: 15px;
}

.grayscale-img {
    filter: grayscale(100%);
    transition: 0.5s;
    width: 100%;
    position: relative;
    z-index: 2;
}

.grayscale-img:hover {
    filter: grayscale(0%);
}

.accent-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    z-index: 1;
    transform: translate(-15px, -15px);
    border-radius: 1rem;
}

.btn-link-custom {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: 0.3s;
}

.btn-link-custom:hover {
    color: #fff;
    padding-left: 5px;
}

/* --- SERVIÇOS (CARDS) --- */
.tech-card {
    background: black;
    padding: 40px;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    height: 100%;
    transition: 0.4s;
}

.tech-card:hover {
    transform: translateY(-7px);
    background: black;
}

.icon-circle {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: black;
    margin-bottom: 25px;
    transition: 0.3s;
}

.tech-card:hover .icon-circle {
    background: var(--primary);
    color: #ffffff;
}

.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

/* --- GALERIA --- */
.gallery-filters {
    display: inline-flex;
    background: black;
    padding: 6px;
    border-radius: 50px;
}

.filter-btn {
    background: transparent;
    border: none;
    color: white;
    padding: 8px 24px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.3s;
    border-radius: 50px;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: #000;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.gallery-item {
    height: 280px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.6s;
    opacity: 0.8;
}

.gallery-item:hover img {
    transform: scale(1.1);
    opacity: 1;
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    transform: translateY(100%);
    transition: 0.3s;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* --- FORMULÁRIOS & CONTACTO --- */
.form-dark {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: #fff;
    padding: 12px 15px;
    font-size: 0.95rem;
    border-radius: 8px;
}

.form-dark:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: none;
    color: #fff;
}

.icon-box-small {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
}

.hover-primary:hover {
    color: var(--primary) !important;
}

/* MAPA COLORIDO */
.full-color-map {
    opacity: 1;
    filter: none;
}

/* --- FOOTER CENTRALIZADO --- */
.footer-minimal {
    background-color: #000000;
    padding: 20px 0 40px 0;
    border-top: 0px solid rgba(255, 255, 255, 0.05); /* Linha muito subtil no topo */
}

.footer-desc {
    color: white; /* Cinza suave para leitura */
    font-size: 1rem;
    line-height: 1.6;
    max-width: 500px; /* Limita a largura para o texto não ficar demasiado longo ao centro */
}

.social-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.1rem;
    transition: all 0.3s ease-in-out;
    text-decoration: none;
}

.social-icon:hover {
    background: var(--primary); /* Usa a tua cor laranja */
    color: #000000;
    border-color: var(--primary);
    transform: translateY(-5px); /* Pequeno salto ao passar o rato */
    box-shadow: white;
}

.footer-bottom-text {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    color: white;
}

.footer-bottom-text p {
    letter-spacing: 1px;
    opacity: 0.6;
}

.footer-legal a {
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.footer-legal a:hover {
    color: var(--text-white);
}

.backToTop {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 45px;
    height: 45px;
    background-color: var(--primary); /* Laranja CNC4A */
    color: #000;
    border: none;
    border-radius: 50px; /* Cantos levemente arredondados */
    cursor: pointer;
    z-index: 1000;
    display: none; /* Escondido por padrão (ativado via JS) */
    align-items: center;
    justify-content: center;
}

.backToTop:hover {
    transform: translateY(-2px);
    background-color: var(--primary-hover);
}

.backToTop.show {
    display: flex;
}

/* Mobile Adjustments */
@media (max-width: 991px) {
    .display-1 {
        font-size: 3rem;
    }

    .hero-wrapper {
        height: auto;
        padding: 150px 0 100px;
    }
}


/* --- SISTEMA DE ZOOM (LIGHTBOX) --- */
.custom-modal {
    display: none; /* Controlado pelo JS */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(8px);
    cursor: zoom-out;
    
    /* O segredo para centrar */
    align-items: center;
    justify-content: center;
}

/* Quando o modal abre, o JS mudará para flex */
.custom-modal[style*="display: flex"] {
    display: flex !important;
}

.modal-content {
    max-width: 90%;
    max-height: 85vh;
    border: 2px solid var(--primary);
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(255, 159, 28, 0.3);
    object-fit: contain;
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: default;
}

#modalVideo {
    width: 80%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 50px;
    font-weight: 200;
    cursor: pointer;
    line-height: 1;
    transition: 0.3s;
}

.close-modal:hover {
    color: var(--primary);
    transform: rotate(90deg);
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}