/* ==========================================================================
   ARQUIVO DE ESTILO MU WESTEROS - V2 (ORGANIZADO)
   ========================================================================== */

/* --- 1. RESET E GLOBAIS --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}
body {
    font-family: Arial, sans-serif;
    color: #cdd6e0;
    background-color: #0a141d;
    background-image: url('../img/bg_body.jpg');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}
a { 
    transition: all 0.3s ease; 
    text-decoration: none; 
    color: #80d4ff; 
}
a:hover { 
    color: #ffffff; 
}

/* --- 2. CABEÇALHO E MENU --- */
.site-header {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}
.main-logo {
    width: 100%;
    max-width: 350px; 
    height: auto; 
}
.top-bar {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(17, 26, 40, 0.8);
    border-bottom: 2px solid #18556e;
    z-index: 1000;
}
.main-menu-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
}
.main-menu {
    width: 100%;
}
.main-menu ul { 
    list-style: none;
    padding: 0; 
    margin: 0;
    text-align: center;
}
.main-menu li { 
    display: inline-block;
}
.main-menu a {
    display: block; 
    padding: 20px 25px; 
    color: #80d4ff; 
    font-size: 16px; 
    font-weight: bold; 
    text-transform: uppercase;
}
.main-menu a:hover {
    color: #ffffff; 
    background-color: #00b8ff;
}
.menu-toggle { 
    display: none; /* Escondido por padrão */
} 

/* --- 3. ESTRUTURA DO CONTEÚDO (3 COLUNAS) --- */
.site-content {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
}
.main-container {
    display: flex;
    gap: 20px; /* Espaçamento entre as colunas */
}
.left-sidebar, .right-sidebar {
    width: 25%;
    flex-shrink: 0;
}
.main-content {
    width: 50%;
    min-height: 500px;
    /* background-color: rgba(0, 255, 0, 0.2); /* COR DE DEBUG */
}

/* --- 4. ESTILO DOS BLOCOS/WIDGETS DA SIDEBAR --- */
.sidebar-block {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #1a3c5a;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    overflow: hidden; /* Garante que os filhos não "vazem" */
}

.sidebar-title {
    background-color: #0f3c4d; /* Cor mais escura para o fundo do título */
    color: #f1c40f; /* Cor amarelada para o texto */
    padding: 12px 15px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
}

.sidebar-block .content {
    padding: 15px;
}

/* --- 5. ELEMENTOS ESPECÍFICOS DA SIDEBAR --- */

/* a) Botão de Registro */
/* a) Botão de Registro */
.btn-register {
    display: flex; /* Usamos flex para centralizar o texto facilmente */
    align-items: center;
    justify-content: center;
    height: 90px; /* Altura fixa para o botão */
    width: 100%;
    
    background-image: url('../img/register-button.jpg'); /* Caminho para a sua imagem */
    background-size: cover; /* Garante que a imagem cubra todo o botão */
    background-position: center; /* Centraliza a imagem */
    background-repeat: no-repeat;

    color: #ffffff;
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
    text-decoration: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Sombra no texto para melhor leitura */

    transition: filter 0.3s ease; /* Transição suave para o efeito de brilho */
    border-radius: 5px; /* Mantém as bordas arredondadas do bloco */
}
.btn-register:hover {
    color: #ffffff; /* Garante que a cor do texto não mude */
    filter: brightness(1.15); /* Efeito de brilho ao passar o mouse */
}

/* b) Painel de Login */
.login-panel form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.login-panel .login-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #1a3c5a;
    background-color: #0d1f2d;
    color: #fff;
    border-radius: 3px;
    font-size: 14px;
}
.login-panel .login-input:focus {
    outline: none;
    border-color: #00b8ff;
}
.login-panel .btn-login {
    padding: 12px;
    background-color: #2980b9;
    color: #fff;
    border: none;
    border-radius: 3px;
    font-size: 16px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
}
.login-panel .btn-login:hover {
    background-color: #3498db;
}
.login-panel .login-links {
    text-align: center;
    margin-top: 10px;
}
.login-panel .login-links a {
    color: #bdc3c7;
    font-size: 12px;
}

/* c) Widget de Rankings */
.rankings-widget .ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.rankings-widget .ranking-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 5px; /* Reduzi um pouco o padding vertical */
    border-bottom: 1px solid rgba(26, 60, 90, 0.5);
    color: #ecf0f1;
}
.rankings-widget .ranking-list li:last-child {
    border-bottom: none;
}
.rankings-widget .rank-position {
    font-weight: bold;
    color: #f1c40f;
    width: 30px;
    text-align: center;
}
.rankings-widget .rank-name {
    flex-grow: 1;
    padding-left: 10px;
}
.rankings-widget .rank-value {
    font-size: 12px;
    color: #bdc3c7;
}
/* =================================================================== */
/* --- 5. CONTEÚDO CENTRAL (SLIDER E NOTÍCIAS) --- */
/* =================================================================== */

/* a) Slider */
.main-slider {
    margin-bottom: 20px;
}
.main-slider img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

/* b) Container Principal de Notícias */
.news-container {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #1a3c5a;
    border-radius: 5px;
    padding: 20px;
}
.news-main-title {
    color: #f1c40f;
    text-transform: uppercase;
    font-size: 20px;
    text-align: center;
    border-bottom: 1px solid #1a3c5a;
    padding-bottom: 15px;
    margin-bottom: 15px;
}
.no-news {
    text-align: center;
    padding: 20px;
}

/* c) Bloco de cada Notícia */
.news-article-block {
    display: flex; /* <<<<<<<<<<< ESTA É A LINHA MAIS IMPORTANTE */
    align-items: center;
    background-color: #0d1f2d;
    border-radius: 5px;
    margin-bottom: 10px;
    padding: 15px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}
.news-article-block:hover {
    background-color: #1a3c5a;
    transform: translateY(-2px);
}
.news-article-block:last-child {
    margin-bottom: 0;
}

/* d) Tag de Categoria */
.news-category {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    margin-right: 15px;
    flex-shrink: 0;
}
.category-eventos { background-color: #e67e22; } /* Laranja */
.category-promocao { background-color: #d35400; } /* Laranja Escuro */
.category-avisos { background-color: #c0392b; } /* Vermelho */
.category-default { background-color: #2980b9; } /* Azul */

/* e) Conteúdo da Notícia (Título e Subtítulo) */
.news-content {
    flex-grow: 1; /* Ocupa o espaço restante */
}
.news-title {
    font-size: 16px;
    font-weight: bold;
    color: #ecf0f1;
    margin: 0 0 5px 0;
}
.news-subtitle {
    font-size: 13px;
    color: #7f8c8d;
    margin: 0;
}

/* f) Ícone "Ler Mais" */
.news-read-more {
    margin-left: 15px;
}
.news-read-more img {
    width: 24px;
    height: 24px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}
.news-article-block:hover .news-read-more img {
    opacity: 1;
}

/* g) Widget do Castle Siege */
.castle-siege-widget-container {
    margin-top: 20px; /* Espaço entre as notícias e o widget */
}

/* Sobrescrevendo o estilo padrão do WebEngine para se adaptar ao nosso tema */
.panel.castle-owner-widget {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #1a3c5a;
    border-radius: 5px;
    color: #cdd6e0;
    margin-bottom: 0; /* Remove a margem padrão se houver */
}

.panel.castle-owner-widget .panel-heading {
    background-color: #0f3c4d;
    border-bottom: 1px solid #1a3c5a;
    border-radius: 0;
}

.panel.castle-owner-widget .panel-title {
    color: #f1c40f;
    text-transform: uppercase;
    font-size: 18px;
    text-align: center;
}

.panel.castle-owner-widget .panel-body {
    padding: 20px;
}

.panel.castle-owner-widget .castle-guild-logo-container {
    text-align: center;
    margin-bottom: 15px;
}

.panel.castle-owner-widget .castle-guild-logo {
    border: 2px solid #f1c40f; /* Borda amarela no logo */
}

.panel.castle-owner-widget .info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(26, 60, 90, 0.5);
}

.panel.castle-owner-widget .info-row:last-child {
    border-bottom: none;
}

.panel.castle-owner-widget .info-label {
    font-weight: bold;
}

.panel.castle-owner-widget .info-value {
    color: #ecf0f1;
}

.panel.castle-owner-widget .btn-cs-details {
    display: block;
    width: 50%;
    margin: 20px auto 0 auto;
    padding: 10px;
    background-color: #2980b9;
    color: #fff !important;
    text-align: center;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.panel.castle-owner-widget .btn-cs-details:hover {
    background-color: #3498db;
}

/* --- 6. RESPONSIVIDADE --- */
@media (max-width: 768px) {
    /* Estrutura */
    .main-container {
        flex-direction: column;
    }
    .left-sidebar, .right-sidebar, .main-content {
        width: 100%;
    }

    /* Menu */
    .main-menu ul {
        display: none;
    }
    .main-menu ul.active {
        display: block;
        position: absolute;
        width: 100%;
        left: 0;
        top: 100%;
        background-color: rgba(17, 26, 40, 0.95);
        z-index: 999;
    }
    .main-menu li {
        display: block;
        text-align: center;
    }
    .main-menu a {
        border-bottom: 1px solid #18556e;
    }
    .menu-toggle {
        display: block;
        padding: 15px 20px;
        background-color: transparent;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
        position: absolute;
        left: 10px; /* Alinhado à esquerda para não sobrepor o logo (se houver) */
    }
    .main-menu-container {
        justify-content: center;
        position: relative;
    }
}