/* Paleta de Cores:
   Fundo: #121212 (Quase Preto)
   Texto Principal: #EAEAEA (Branco Suave)
   Destaque (Títulos, Bordas): #D4AF37 (Dourado Metálico)
   Ação (Botões): #B22222 (Vermelho Tijolo)
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #121212;
    color: #EAEAEA;
    line-height: 1.6;
}

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

/* --- Header --- */
header {
    background: rgba(18, 18, 18, 0.85);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 2px solid #D4AF37;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Permite quebra controlada do logo e nav */
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #D4AF37;
    white-space: nowrap; /* Evita quebra de linha no logo */
}

.logo img {
    height: 40px;
}

nav {
    display: flex;
    gap: 15px; /* Reduz o espaçamento para caber mais itens */
    align-items: center;
    flex-wrap: wrap; /* Permite quebra controlada */
    justify-content: flex-end; /* Alinha os itens à direita */
}

nav a {
    color: #EAEAEA;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: #D4AF37;
}

.btn-login {
    background: #B22222;
    color: #fff;
    padding: 8px 18px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-login:hover {
    background: #991d1d;
    transform: translateY(-2px);
}

/* --- Hero Section --- */
.hero {
    padding: 100px 20px;
    text-align: center;
    background-image: linear-gradient(rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.8)), url('images/bjj_tournament_1.jpg');
    background-size: cover;
    background-position: center;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hero h1 {
    font-size: 52px;
    margin-bottom: 15px;
    color: #D4AF37; /* Mantendo o dourado para o título principal */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.hero p {
    font-size: 18px;
    color: #EAEAEA;
    margin-bottom: 30px;
    max-width: 600px;
}

.btn-cta {
    background: #B22222;
    color: #fff;
    padding: 12px 35px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-cta:hover {
    background: #991d1d;
    transform: translateY(-2px);
}

/* --- Seções Gerais --- */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 36px;
    margin-bottom: 50px;
    text-align: center;
    color: #B22222; /* Usando o vermelho para títulos de seção */
    border-bottom: 2px solid #D4AF37; /* Usando o dourado como linha de destaque */
    display: inline-block;
    padding-bottom: 10px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

/* --- Cards (Troféus, Competição) --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: #1E1E1E;
    border: 1px solid #333;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.1);
    border-color: #D4AF37;
}

.card-image {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-image .overlay {
    background: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.card h3 {
    color: #D4AF37;
    margin-bottom: 10px;
}

.card p {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 20px;
}

/* --- Competição --- */
.competition-card-single {
    max-width: 600px;
    margin: 0 auto;
}

.competition-card h3 {
    font-size: 24px;
}

.competition-card .info {
    margin: 15px 0;
    padding: 10px 0;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    color: #D4AF37;
    font-weight: 600;
}

.competition-card .actions {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap; /* Permite quebra dos botões no mobile */
}

.btn-register, .btn-view-brackets {
    flex-grow: 1;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s;
    min-width: 150px; /* Garante que os botões não fiquem muito pequenos */
}

.btn-register {
    background: #D4AF37;
    color: #121212;
    border: 1px solid #D4AF37;
}

.btn-register:hover {
    background: #b89b30;
}

.btn-view-brackets {
    background: transparent;
    color: #B22222;
    border: 1px solid #B22222;
}

.btn-view-brackets:hover {
    background: #B22222;
    color: #fff;
}

/* --- Footer --- */
footer {
    background: #1E1E1E;
    border-top: 1px solid #333;
    padding: 30px 20px;
    text-align: center;
    color: #aaa;
    margin-top: 60px;
}

footer a {
    color: #D4AF37;
    text-decoration: none;
}

.contact-info {
    margin-top: 15px;
    font-size: 14px;
    color: #ccc;
}

.contact-info a {
    color: #D4AF37;
    text-decoration: none;
    margin: 0 5px;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* --- Responsividade --- */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }

    .logo {
        width: 100%;
        justify-content: center;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px; /* Reduz ainda mais o espaçamento no mobile */
        width: 100%; /* Garante que ocupe a largura total */
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 14px;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 28px;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
    }

    .competition-card .actions {
        flex-direction: column; /* Empilha os botões no mobile */
        gap: 10px;
    }
    
    .btn-register, .btn-view-brackets {
        width: 100%; /* Garante que os botões ocupem toda a largura no mobile */
        min-width: auto; /* Remove a largura mínima no mobile */
    }
}
