/* ==================================================
 * RESET BÁSICO E CONFIGURAÇÕES GLOBAIS
 * ================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #121212;
    color: #f0f0f0;
    line-height: 1.6;
}

a {
    color: #00aaff;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

img {
    display: block;
    max-width: 100%;
}

/* ==================================================
 * VÍDEO DE FUNDO (PÁGINA INICIAL)
 * ================================================== */
.video-background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
    overflow: hidden;
}

#bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    z-index: -1;
}

.main-content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==================================================
 * CABEÇALHO (SITE PÚBLICO)
 * ================================================== */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%; /* Reduzi um pouco o padding vertical para ganhar espaço */
    background: transparent;
    width: 100%;
    margin-bottom: 1rem;
    position: relative;
    z-index: 100;
}

.sticky-header {
    background-color: #1a1a1a;
    border-bottom: 1px solid #333;
    margin-bottom: 0;
}

/* Logo */
.logo-img {
    height: 55px; 
    width: auto;
    display: block;
}

/* Navegação Desktop */
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.nav-links li {
    margin-left: 1.5rem; /* Reduzi de 2rem para 1.5rem para evitar cortar itens no desktop */
}

.nav-links a {
    color: #f0f0f0;
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 10px; /* Aumenta a área clicável sem afetar o layout */
}

.nav-links a:hover {
    color: #00aaff;
}

/* Botão Hambúrguer (Escondido no Desktop) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    padding: 0;
    z-index: 101; /* Acima do menu mobile */
}
.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -7px); }


/* ==================================================
 * GRID DE THUMBNAILS (MENOR E CENTRALIZADO)
 * ================================================== */
.thumbnail-grid-container {
    width: 100%;
    max-width: 700px; 
    margin: 0 auto;
    padding: 0 2rem;
    flex-grow: 1;
    padding-top: 2rem; 
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 1.5rem; 
}

.thumbnail-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background-color: #111;
    border: 1px solid #333; /* Borda sutil para definição */
}

.thumbnail-card:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 170, 255, 0.2); /* Brilho azul sutil no hover */
    border-color: #00aaff;
    z-index: 2;
}

.thumbnail-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.thumbnail-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 5px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
}

.thumbnail-card:hover .thumbnail-overlay {
    opacity: 1;
}

.thumbnail-overlay h3 {
    color: #fff;
    font-size: 0.75rem;
    margin: 0;
    font-weight: normal;
}


/* ==================================================
 * PÁGINAS INTERNAS (VIDEO E IMAGENS)
 * ================================================== */
.video-page-body, .image-gallery-body {
    background-color: #121212;
}
.video-page-container, .image-gallery-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 5%;
}
.video-player-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background: #000;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.video-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.image-card {
    border-radius: 12px;
    overflow: hidden;
}
.video-content h1 { color: #fff; }
.video-description { color: #ccc; }


/* ==================================================
 * RODAPÉ
 * ================================================== */
.main-footer {
    text-align: center;
    padding: 2rem 5%;
    margin-top: auto;
}

.social-icons-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 1.5rem;
}

.social-icon {
    display: block;
    width: 40px;
    height: 40px;
    background-color: transparent; 
    border-radius: 8px;
    transition: transform 0.2s ease;
    display: flex; 
    align-items: center;
    justify-content: center;
}

.social-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
}

.social-icon:hover {
    transform: translateY(-3px);
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.4));
}

.footer-text {
    font-size: 0.8rem;
    color: #666;
}


/* ==================================================
 * TELA DE LOGIN (MODERNA E BONITA)
 * ================================================== */
.admin-login-page {
    background-color: #121212; /* Fundo escuro igual ao site */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: radial-gradient(circle at center, #1f1f1f 0%, #121212 100%);
}

.login-container {
    background-color: #1e1e1e; /* Cartão um pouco mais claro */
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 400px;
    border: 1px solid #333;
    text-align: center;
}

.login-container h2 {
    margin-bottom: 2rem;
    color: #fff;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Inputs Modernos */
.login-container .form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.login-container label {
    display: block;
    color: #888;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.login-container input[type="text"],
.login-container input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    background-color: #2a2a2a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.login-container input:focus {
    border-color: #00aaff;
    outline: none;
    background-color: #333;
    box-shadow: 0 0 0 2px rgba(0, 170, 255, 0.2);
}

.login-container .admin-button {
    background: linear-gradient(135deg, #00aaff, #0077cc);
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-container .admin-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 170, 255, 0.4);
}

.login-erro {
    background-color: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}


/* ==================================================
 * ÁREA ADMIN (RESTAURADO O CLÁSSICO)
 * ================================================== */
.admin-page {
    background-color: #f4f4f4; /* Fundo claro clássico */
    color: #333;
}

.admin-header {
    background-color: #fff;
    border-bottom: 1px solid #ddd;
    padding: 1rem 5%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.admin-header .logo {
    color: #333;
    font-weight: bold;
    font-size: 1.2rem;
}

.admin-nav ul {
    display: flex;
    list-style: none;
}

.admin-nav li {
    margin-left: 20px;
}

.admin-nav a {
    color: #555; /* Cinza escuro para contraste */
    font-weight: 600;
    font-size: 0.95rem;
}

.admin-nav a:hover {
    color: #007bff;
}

.admin-nav a[href="logout.php"] {
    color: #d9534f;
}

.admin-container {
    background-color: #fff;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.admin-container h2 {
    border-bottom: 2px solid #f4f4f4;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
    color: #333;
}

/* Inputs do Admin (Claros) */
.admin-page input, .admin-page textarea {
    background-color: #fff;
    border: 1px solid #ccc;
    color: #333;
    padding: 10px;
    border-radius: 4px;
}

.admin-page label {
    color: #555;
}

/* Botões e Tabelas do Admin */
.admin-button {
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.admin-table-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
.admin-table-container th {
    background-color: #f8f9fa;
    color: #333;
    font-weight: bold;
    padding: 12px;
    border: 1px solid #dee2e6;
    text-align: left;
}
.admin-table-container td {
    padding: 12px;
    border: 1px solid #dee2e6;
    color: #333;
}
.admin-table-thumbnail {
    border-radius: 4px;
    width: 80px;
    height: auto;
}
.admin-button-delete {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}


/* ==================================================
 * RESPONSIVIDADE E MENU MOBILE
 * ================================================== */
@media (max-width: 850px) {
    .thumbnail-grid { grid-template-columns: repeat(3, 1fr); }
    .thumbnail-grid-container { max-width: 600px; }
}

@media (max-width: 600px) {
    /* 1. Thumbnails em 2 Colunas */
    .thumbnail-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    .thumbnail-grid-container {
        padding: 0 1.5rem;
        max-width: 100%;
    }
    
    /* 2. Botão Hambúrguer Visível */
    .menu-toggle { display: flex; }
    
    /* 3. Menu Mobile (Ajustado para Alinhamento Topo + Espaçamento Equilibrado) */
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%; /* Largura confortável */
        height: 100vh;
        background-color: #0e0e0e; /* Fundo quase preto */
        flex-direction: column;
        justify-content: flex-start; /* Alinha itens ao topo */
        align-items: center;
        transform: translateX(100%); /* Escondido por padrão */
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 99;
        padding-top: 6rem; /* Espaço para não ficar colado no topo da tela */
        border-left: 1px solid #333;
    }
    
    .nav-links.active {
        transform: translateX(0); /* Mostra o menu */
        box-shadow: -5px 0 20px rgba(0,0,0,0.5);
    }
    
    /* Itens do Menu Mobile */
    .nav-links li {
        margin-left: 0; /* Remove margem lateral do desktop */
        margin-bottom: 2.5rem; /* Espaçamento equilibrado (nem muito, nem pouco) */
        width: 100%;
        text-align: center;
    }
    
    .nav-links a {
        font-size: 1.3rem; /* Tamanho legível e moderno */
        display: inline-block;
        padding: 10px 20px;
        border-radius: 8px;
    }
    
    .nav-links a:hover {
        background-color: #1a1a1a;
        color: #00aaff;
    }
}