/* =========================================
   VARIÁVEIS (DESIGN TOKENS)
   ========================================= */
:root {
    --color-bg: #0a0a0c;
    --color-surface: #141417;
    --color-primary: rgb(0,0,255);
    --color-primary-hover: rgb(0,0,200);
    --color-text: #ffffff;
    --color-text-muted: #a0a0a5;
    
    --font-main: 'Outfit', sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s ease;
}

/* =========================================
   RESET E BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

span {
    color: var(--color-primary);
}

/* =========================================
   BOTÕES
   ========================================= */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: var(--color-primary);
    color: #fff;
    border: 2px solid var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    box-shadow: 0 0 15px rgba(0, 0, 200, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #fff;
    transform: translateY(-2px);
}

/* =========================================
   NAVEGAÇÃO (NAVBAR)
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-medium);
}

.navbar.scrolled {
    background-color: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 80px;
    width: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links li a {
    font-weight: 600;
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.nav-links li a:not(.btn-primary):hover {
    color: var(--color-primary);
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: white;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    background-image: url('../assets/images/background.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10,10,12,0.3) 0%, rgba(10,10,12,1) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* =========================================
   SECTIONS GERAIS
   ========================================= */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.section-title p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
}

/* =========================================
   SOBRE NÓS (ABOUT)
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.glass-panel {
    background: rgba(20, 20, 23, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    transition: transform var(--transition-medium);
}

.glass-panel:hover {
    transform: translateY(-5px);
    border-color: rgba(0, 0, 200, 0.3);
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.about-text p {
    color: var(--color-text-muted);
    margin-bottom: 15px;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-box {
    text-align: center;
    padding: 20px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
}

.stat-box h4 {
    font-size: 2.5rem;
    color: var(--color-primary);
    font-weight: 800;
}

.stat-box p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   CARROSSEL (CARDS)
   ========================================= */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.sim-card {
    background-color: var(--color-surface);
    border-radius: 12px;
    overflow: hidden;
    transition: transform var(--transition-medium), box-shadow var(--transition-medium);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    width: 100%;
}
.sim-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.6);
    border-color: rgba(0, 0, 200, 0.2);
}

/* Garante que a imagem tenha altura e seja visível */
.card-image {
    height: 220px;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
}

/* Efeito de zoom na imagem ao passar o mouse no card */
.sim-card:hover .card-image {
    transform: scale(1.05);
}

.card-content {
    padding: 30px;
    position: relative;
    background: var(--color-surface); /* cobre o scale da imagem */
    z-index: 2;
    flex-grow: 1;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.card-content p {
    color: var(--color-text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 100%;
}

.carousel-container {
    overflow: hidden; /* Esconde o que passa das bordas */
    width: 100%;
    padding: 15px 5px;
}

.carousel-track {
    display: flex;
    gap: 30px;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); /* Transição suave */
    will-change: transform;
}

.carousel-item {
    /* Define que em telas grandes cada card ocupa metade do container (ajustado pelo gap) */
    flex: 0 0 calc(50% - 15px); 
    max-width: calc(50% - 15px);
    box-sizing: border-box;
}

/* Botões do carrossel */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(20, 20, 23, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    backdrop-filter: blur(5px);
}

.carousel-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(0, 0, 255, 0.5);
}

.prev-btn {
    left: -25px;
}

.next-btn {
    right: -25px;
}

/* Responsividade do Carrossel */
@media (max-width: 768px) {
    .carousel-item {
        /* Em telas mobile, cada card passa a ocupar 100% da largura */
        flex: 0 0 100%;
        max-width: 100%;
    }
    .prev-btn { left: -10px; }
    .next-btn { right: -10px; }
    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background-color: #050506;
    padding: 60px 0 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    color: var(--color-text-muted);
    margin-top: 15px;
    max-width: 300px;
}

.footer h4 {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer ul li a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.footer ul li a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

/* =========================================
   RESPONSIVIDADE (MOBILE)
   ========================================= */
@media (max-width: 992px) {
    .hero-title {
        font-size: 3.5rem;
    }
    .about-grid {
        grid-template-columns: 1fr;
    }
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        top: 100%;
        left: -100%;
        width: 100%;
        background-color: rgba(10, 10, 12, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 30px 0;
        transition: 0.3s ease-in-out;
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        left: 0;
    }

    .menu-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   SEÇÃO PILOTOS
   ========================================= */

#pilotos-grid {
    display: flex;
    flex-wrap: wrap;       /* Permite que eles quebrem de linha se não couberem */
    justify-content: center; /* Centraliza os cards caso tenha menos pilotos na linha */
    gap: 30px;
    width: 100%;
}

.piloto-card {
    /* Define que no computador eles ficam um do lado do outro dividindo o espaço */
    flex: 1 1 calc(33.333% - 30px); /* 3 cards por linha no desktop */
    min-width: 280px;               /* Largura mínima confortável para o card */
    max-width: 350px;               /* Largura máxima para não esticar demais */
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 40px;
    box-sizing: border-box;
}

.piloto-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin-bottom: -60px;
    position: relative;
    z-index: 3;
    border: 4px solid var(--color-surface);
    background-color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Garante que a foto quadrada seja cortada em círculo */
}

/* Nova classe adicionada para tratar a foto */
.piloto-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Faz a foto se adaptar sem distorcer as proporções do rosto */
    object-position: center;
}

.avatar-placeholder {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
}

.text-center {
    text-align: center;
    padding-top: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Responsividade: Garante o empilhamento total no celular */
@media (max-width: 768px) {
    #pilotos-grid {
        flex-direction: column; /* Força o empilhamento vertical */
        align-items: center;
    }

    .piloto-card {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%; /* Ocupa a largura total da tela do celular */
    }
}

/* =========================================
   SEÇÃO CONTATO
   ========================================= */
.contato-container {
    max-width: 600px;
    margin: 0 auto;
}

.contato-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 10px rgba(0, 0, 255, 0.2);
}

.btn-block {
    width: 100%;
    margin-top: 10px;
    font-size: 1rem;
    padding: 15px;
}

/* =========================================
   SEÇÃO HISTÓRIA (TIMELINE)
   ========================================= */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: rgba(255, 255, 255, 0.1);
    top: 0;
    bottom: 0;
    left: 20px; /* Alinhado à esquerda na versão móvel/padrão */
    margin-left: -1px;
}

.timeline-item {
    padding: 20px 0 20px 60px;
    position: relative;
    width: 100%;
}

.timeline-dot {
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: var(--color-primary);
    border-radius: 50%;
    left: 12px;
    top: 30px;
    z-index: 1;
    box-shadow: 0 0 10px var(--color-primary);
}

.timeline-content {
    padding: 30px;
}

.timeline-content h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.timeline-content p {
    color: var(--color-text-muted);
}

@media (min-width: 768px) {
    .timeline::after {
        left: 50%;
    }
    
    .timeline-item {
        width: 50%;
        padding: 20px 40px;
    }
    
    .timeline-item:nth-child(even) {
        left: 50%;
    }
    
    .timeline-item:nth-child(odd) {
        left: 0;
        text-align: right;
    }
    
    .timeline-dot {
        left: calc(100% - 8px);
    }
    
    .timeline-item:nth-child(even) .timeline-dot {
        left: -8px;
    }
}


/* =========================================
   SEÇÃO PATROCINADORES (TICKER INFINITO)
   ========================================= */
.sponsors-section {
    background-color: #0d0d11; /* Leve variação de fundo para quebrar as seções */
    padding: 80px 0;
}

.sponsors-ticker {
    overflow: hidden;
    width: 100%;
    position: relative;
    padding: 20px 0;
    margin-bottom: 40px;
}

/* Cria um efeito de sombreamento esmaecido nas laterais do carrossel */
.sponsors-ticker::before,
.sponsors-ticker::after {
    content: "";
    height: 100%;
    position: absolute;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}

.sponsors-ticker::before {
    left: 0;
    top: 0;
    background: linear-gradient(to right, #0d0d11 0%, transparent 100%);
}

.sponsors-ticker::after {
    right: 0;
    top: 0;
    background: linear-gradient(to left, #0d0d11 0%, transparent 100%);
}

/* Linha que se move */
.ticker-track {
    display: flex;
    width: calc(250px * 8); /* Ajustado para a largura combinada dos itens */
    animation: scrollTicker 25s linear infinite;
}

/* Pausa o movimento quando o usuário passa o mouse */
.ticker-track:hover {
    animation-play-state: paused;
}

.sponsor-logo {
    width: 250px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 30px;
}

.sponsor-logo img {
    max-width: 100%;
    max-height: 60px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.5); /* Estilo minimalista escuro */
    transition: filter var(--transition-fast), transform var(--transition-fast);
}

/* Quando passa o mouse na logo do patrocinador */
.sponsor-logo img:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

.sponsors-cta {
    margin-top: 30px;
}

.sponsors-cta p {
    color: var(--color-text-muted);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Animação CSS para o rolamento infinito lateral */
@keyframes scrollTicker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-250px * 4)); /* Move exatamente metade dos itens */
    }
}

/* Ajuste responsivo para mobile */
@media (max-width: 768px) {
    .sponsors-ticker::before,
    .sponsors-ticker::after {
        width: 50px; /* Sombreamento menor em celulares */
    }
}