/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== FUNDO ===== */
body {
    font-family: "Poppins", Arial, sans-serif;
    background: linear-gradient(90deg, #2ec3ff, #5edb9b, #ffe76a);
    color: #003b36;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    padding: 80px 20px 40px; /* Padding top para header fixo */
}

/* ===== HEADER E NAVEGAÇÃO - COMPLETO ===== */
.site-header {
    width: 100%;
    background: rgba(5, 5, 9, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 50px; /* MAIS ESPAÇO ENTRE LOGO E MENU */
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 600;
    font-size: 1.2rem;
    z-index: 1001;
    margin-right: 30px; /* AFASTA O LOGO DO MENU */
    flex-shrink: 0; /* IMPEDE QUE O LOGO FIQUE MUITO PEQUENO */
}

.logo-img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(110, 69, 226, 0.5));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.logo span {
    background: linear-gradient(90deg, #ffffff, #88d3ce);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    font-size: 1.3rem;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    padding: 8px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu {
    display: flex;
    flex: 1; /* OCUPA O ESPAÇO RESTANTE */
    justify-content: flex-end; /* ALINHA O MENU À DIREITA */
}

.menu {
    display: flex;
    list-style: none;
    gap: 25px;
}

.menu a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.menu a:hover {
    color: #6e45e2;
}

.menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6e45e2, #88d3ce);
    transition: width 0.3s ease;
}

.menu a:hover::after {
    width: 100%;
}

/* DROPDOWN DE PROJETOS */
.projetos-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(5, 5, 9, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(110, 69, 226, 0.3);
    border-radius: 10px;
    padding: 15px 0;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 20px;
    width: 10px;
    height: 10px;
    background: #6e45e2;
    transform: rotate(45deg);
}

.projetos-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    text-transform: none;
    letter-spacing: 0;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: rgba(110, 69, 226, 0.2);
    color: #88d3ce;
    padding-left: 25px;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.dropdown-menu a:hover .dropdown-icon {
    transform: scale(1.2);
}

/* ===== BANNER ===== */
.banner {
    width: 100%;
    max-width: 1100px;
    margin-top: 20px;
    margin-bottom: 40px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.banner img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

/* ===== CONTAINER PRINCIPAL ===== */
.container {
    max-width: 900px;
    background-color: #ffffffcc;
    backdrop-filter: blur(5px);
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    padding: 40px;
    text-align: center;
    width: 100%;
}

/* ===== TÍTULOS ===== */
h1 {
    font-size: 2rem;
    color: #ff6b00;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
    line-height: 1.2;
    word-wrap: break-word;
}

h2 {
    font-size: 1.5rem;
    color: #005c4b;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.3;
}

/* ===== TEXTO ===== */
.texto {
    text-align: justify;
    line-height: 1.7;
    font-size: 1.1rem;
    color: #052f2a;
    margin-bottom: 40px;
}

.citacao {
    font-style: italic;
    font-weight: 500;
    margin-top: 20px;
    color: #004a3d;
    text-align: right;
}

/* ===== SEÇÃO DOS QUIZZES ===== */
.kahoot-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.quiz-container {
    width: 100%;
    max-width: 800px;
    min-height: 635px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

iframe {
    width: 100%;
    height: 635px;
    border: none;
}

a {
    text-decoration: none;
    color: #004a3d;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}

/* ===== CARROSSEL MODERNO - 328 FOTOS ===== */
.carrossel-section {
    max-width: 1100px;
    width: 100%;
    margin: 40px auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 2px solid #88d3ce;
    position: relative;
    overflow: hidden;
}

.carrossel-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #2ec3ff, #5edb9b, #ffe76a);
    border-radius: 20px 20px 0 0;
}

.carrossel-section h2 {
    color: #005c4b;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    position: relative;
}

.carrossel-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b00, #ff8c42);
    border-radius: 2px;
}

.carrossel-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f7f6, #e0f2f1);
    border-radius: 15px;
    border: 1px solid #c8e6e9;
    box-shadow: 0 4px 12px rgba(136, 211, 206, 0.2);
}

.contador-carrossel {
    font-size: 1.6rem;
    font-weight: bold;
    color: #005c4b;
    background: white;
    padding: 12px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 92, 75, 0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid #88d3ce;
}

.contador-carrossel span:first-child {
    color: #ff6b00;
    font-size: 2rem;
    min-width: 40px;
    text-align: center;
}

.controles-carrossel {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.play-btn-carrossel {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #005c4b, #003b36);
    color: white;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 15px rgba(0, 92, 75, 0.3);
    position: relative;
    overflow: hidden;
}

.play-btn-carrossel::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.play-btn-carrossel:hover::before {
    left: 100%;
}

.play-btn-carrossel:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 92, 75, 0.4);
}

.play-btn-carrossel.playing {
    background: linear-gradient(135deg, #ff6b00, #ff8c42);
}

.nav-btn-carrossel {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: white;
    color: #005c4b;
    border: 2px solid #88d3ce;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(136, 211, 206, 0.3);
}

.nav-btn-carrossel:hover {
    background: #005c4b;
    color: white;
    transform: scale(1.1);
    border-color: #005c4b;
}

.velocidade-carrossel {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #005c4b;
    background: white;
    padding: 10px 20px;
    border-radius: 25px;
    border: 1px solid #d4f0ed;
}

.vel-btn {
    padding: 8px 18px;
    background: #e9f5f3;
    border: none;
    border-radius: 20px;
    color: #005c4b;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-weight: 600;
}

.vel-btn:hover {
    background: #88d3ce;
    color: white;
    transform: translateY(-2px);
}

.vel-btn.active {
    background: linear-gradient(90deg, #ff6b00, #ff8c42);
    color: white;
    box-shadow: 0 4px 8px rgba(255, 107, 0, 0.3);
}

/* Container do Carrossel */
.carrossel-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    border-radius: 15px;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    margin-bottom: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.carrossel-track {
    display: flex;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carrossel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.carrossel-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.5s ease;
}

.carrossel-slide img:hover {
    transform: scale(1.02);
}

/* Efeito de fade nas bordas */
.carrossel-fade-left,
.carrossel-fade-right {
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.carrossel-fade-left {
    left: 0;
    background: linear-gradient(90deg, rgba(26, 26, 26, 0.8), transparent);
}

.carrossel-fade-right {
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(26, 26, 26, 0.8));
}

/* Miniaturas */
.miniaturas-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 20px 10px;
    margin-bottom: 25px;
    scrollbar-width: thin;
    scrollbar-color: #88d3ce #f0f7f6;
    max-height: 100px;
    background: #f8fdfc;
    border-radius: 15px;
    border: 1px solid #d4f0ed;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.miniaturas-container::-webkit-scrollbar {
    height: 8px;
}

.miniaturas-container::-webkit-scrollbar-track {
    background: #f0f7f6;
    border-radius: 4px;
}

.miniaturas-container::-webkit-scrollbar-thumb {
    background: #88d3ce;
    border-radius: 4px;
}

.miniatura {
    width: 85px;
    height: 65px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    opacity: 0.7;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.miniatura::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 92, 75, 0);
    transition: background 0.3s ease;
    z-index: 1;
}

.miniatura:hover {
    opacity: 0.9;
    transform: translateY(-5px) scale(1.05);
}

.miniatura.active {
    border-color: #ff6b00;
    opacity: 1;
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 8px 20px rgba(255, 107, 0, 0.3);
}

.miniatura.active::before {
    background: rgba(0, 92, 75, 0.1);
}

.miniatura img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.miniatura:hover img {
    transform: scale(1.1);
}

/* Progresso */
.progresso-carrossel {
    position: relative;
    height: 12px;
    background: #e0f2f1;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progresso-bar {
    height: 100%;
    background: linear-gradient(90deg, #2ec3ff, #5edb9b, #ffe76a);
    width: 0%;
    transition: width 0.5s ease;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.progresso-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 50%, 
        transparent 100%);
    animation: progress-shimmer 2s infinite;
}

@keyframes progress-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.tempo-total {
    text-align: center;
    font-size: 1rem;
    color: #666;
    font-weight: 600;
    margin-top: 10px;
    background: #f0f7f6;
    padding: 8px 20px;
    border-radius: 20px;
    display: inline-block;
    border: 1px solid #d4f0ed;
}

/* Indicador de Carregamento */
.carregando-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    z-index: 100;
    border-radius: 15px;
}

.carregando-overlay.ativo {
    display: flex;
}

.loader {
    width: 70px;
    height: 70px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid #ff6b00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 25px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mensagem flutuante */
.carrossel-mensagem {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(90deg, #ff6b00, #ff8c42);
    color: white;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.3);
    z-index: 1000;
    animation: slideIn 0.5s ease;
    transition: all 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ===== OTIMIZAÇÕES DE PERFORMANCE ===== */
.carrossel-container {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.carrossel-track {
    transform: translateZ(0);
}

.carrossel-slide {
    transform: translateZ(0);
    will-change: transform;
}

/* Remove interferência com navegação */
.carrossel-section {
    pointer-events: auto;
}

.carrossel-container {
    pointer-events: none;
}

.carrossel-container * {
    pointer-events: auto;
}

/* Responsividade */
@media (max-width: 1024px) {
    .carrossel-container {
        height: 500px;
    }
    
    .carrossel-slide {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .carrossel-section {
        padding: 20px;
        margin: 20px auto;
    }
    
    .carrossel-container {
        height: 400px;
    }
    
    .carrossel-section h2 {
        font-size: 1.6rem;
    }
    
    .carrossel-info {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .contador-carrossel {
        font-size: 1.3rem;
        padding: 10px 20px;
    }
    
    .controles-carrossel {
        width: 100%;
        justify-content: center;
    }
    
    .velocidade-carrossel {
        width: 100%;
        justify-content: center;
    }
    
    .play-btn-carrossel {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .nav-btn-carrossel {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .miniatura {
        width: 70px;
        height: 55px;
    }
    
    .carrossel-fade-left,
    .carrossel-fade-right {
        width: 50px;
    }
}

@media (max-width: 480px) {
    .carrossel-container {
        height: 300px;
    }
    
    .carrossel-section h2 {
        font-size: 1.4rem;
    }
    
    .contador-carrossel {
        font-size: 1.1rem;
        padding: 8px 15px;
    }
    
    .vel-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .miniatura {
        width: 60px;
        height: 45px;
    }
    
    .carrossel-slide {
        padding: 15px;
    }
}

/* ===== CORREÇÕES CRÍTICAS ===== */

/* REMOVE COMPLETAMENTE qualquer roubo de foco */
.carrossel-section,
.carrossel-container,
.carrossel-track,
.carrossel-slide,
.carrossel-slide img {
    outline: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Permite seleção no resto do site */
body,
.container,
.texto,
h1, h2, h3, h4, h5, h6,
p, span, a {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* Garante que o carrossel NÃO interfira com cliques */
.carrossel-container {
    pointer-events: none !important;
}

/* Mas permite clicar nos controles */
.carrossel-info *,
.miniaturas-container,
.miniaturas-container *,
.carregando-overlay,
.carregando-overlay *,
.play-btn-carrossel,
.nav-btn-carrossel,
.vel-btn {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Remove qualquer highlight */
.carrossel-section::selection,
.carrossel-container::selection,
.carrossel-track::selection,
.carrossel-slide::selection,
.carrossel-slide img::selection {
    background: transparent !important;
    color: inherit !important;
}

/* Remove focus styles que podem roubar atenção */
.carrossel-section:focus,
.carrossel-container:focus,
.carrossel-track:focus {
    box-shadow: none !important;
    border-color: inherit !important;
}

/* Ajusta z-index para não sobrepor elementos importantes */
.carrossel-section {
    z-index: 1;
    position: relative;
}

.site-header {
    z-index: 1000 !important;
}

.container {
    z-index: 2;
}

/* Remove qualquer transição que possa causar lag */
@media (prefers-reduced-motion: reduce) {
    .carrossel-track,
    .carrossel-slide,
    .miniatura,
    .progresso-bar {
        transition: none !important;
        animation: none !important;
    }
}

/* Corrige overflow */
html, body {
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
}

/* Remove qualquer touch-action problemático */
.carrossel-section {
    touch-action: pan-y;
}

.carrossel-container {
    touch-action: pan-x;
}

.miniaturas-container {
    touch-action: pan-y pinch-zoom;
}

/* Melhora performance */
.carrossel-track {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
    will-change: transform;
}

.carrossel-slide {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Efeito de carregamento melhorado */
@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.carregando-overlay.ativo {
    animation: pulse 1.5s infinite;
}

/* Mensagens de erro/sucesso */
.carrossel-mensagem {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    background: linear-gradient(90deg, #ff6b00, #ff8c42) !important;
    color: white !important;
    padding: 12px 25px !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.3) !important;
    z-index: 10000 !important;
    animation: slideIn 0.5s ease !important;
    max-width: 400px !important;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsividade melhorada */
@media (max-width: 768px) {
    .carrossel-section {
        margin: 20px 10px !important;
        padding: 15px !important;
    }
    
    .carrossel-container {
        height: 350px !important;
    }
    
    .carrossel-info {
        padding: 10px !important;
    }
    
    .contador-carrossel {
        font-size: 1.2rem !important;
        padding: 8px 15px !important;
    }
    
    .carrossel-mensagem {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none !important;
        text-align: center !important;
    }
}