:root {
    --primary-color: #2a3a7d; /* Um azul escuro */
    --secondary-color: #5c6ca0; /* Um azul mais claro */
    --background-color: #f4f4f9; /* Cinza muito claro */
    --surface-color: #ffffff;
    --text-color: #333333;
    --border-color: #d1d1d1;
    --header-footer-bg: #e8e8f0;
    --font-body: 'Verdana', sans-serif;
    --font-title: 'MedievalSharp', cursive;
}


.header-actions {
    display: flex;
    align-items: center;
}

.header-actions i::before {
    font-size: 24px;
    line-height: 32px;
    width: 32px;
    height: 32px;
 
}

.header-actions button {
    background: none;
    border: none;
    
}


/* Search Bar */
.search-result-item a {
    display: block; /* Faz o link ocupar toda a linha */
    color: inherit; /* Mantém a cor do texto consistente */
    text-decoration: none; /* Remove sublinhado se desejar */
}

.search-category {
    font-weight: bold;
    font-size: 14px;
    color: #555;
    margin: 8px 0 4px;
    padding: 6px 10px;
    border-bottom: 1px solid #ddd;
}

.search-result-item {
   padding: 10px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background-color: #f0f0f0;
}


#search-bar-container {
    background-color: var(--surface-color);
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    border-bottom: 1px solid transparent;
}

#search-bar-container.expanded {
    max-height: 70vh; /* Allow space for input and results */
    padding: 1.5rem 2rem;
    border-bottom-color: var(--border-color);
}

.search-content-wrapper {
    max-width: 1200px; /* Adjust as needed */
    margin: 0 auto;
}

#search-bar-container #search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1.2rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    font-family: var(--font-body);
}

#search-bar-container #search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px var(--secondary-color-translucent, rgba(92, 108, 160, 0.4));
}

#search-bar-container #search-results {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 5px 5px;
    margin-top: -1px; /* Overlap border */
    max-height: 50vh;
    overflow-y: auto;
}

#search-bar-container #search-results li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}
#search-bar-container #search-results li:last-child a {
    border-bottom: none;
}
#search-bar-container #search-results li a:hover {
    background-color: var(--background-color);
    text-decoration: none;
}


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

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3 {
  /*  font-family: var(--font-title); */
   font-family: var(--font-body);
    color: var(--primary-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }







a {
    color: var(--secondary-color);
    text-decoration: none;
}


a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

.site-container {
    max-width: 1600px;
    margin: 0 auto;
    background-color: var(--surface-color);
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
}

/* Header */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  /*  padding: 1rem 2rem; */ 
    padding: 0 4rem 0 2rem;
    background-color: var(--header-footer-bg);
    border-bottom: 2px solid var(--border-color);
    flex-wrap: wrap;
}

/* .logo-container .logo-img {
    height: 50px;
    width: auto;
} */

.logo-container .logo-img {
    height: 80px;
    width: 150px;
    margin-left: 2rem;
}



.top-nav ul {
    display: flex;
    gap: 1.5rem;
}

.top-nav a {
    font-weight: bold;
    font-size: 1rem;
}

.search-container {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden;
}

.search-container input {
    padding: 0.5rem;
    border: none;
    font-size: 1rem;
    min-width: 250px;
}

.search-container input:focus {
    outline: 2px solid var(--secondary-color);
}

.search-container button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
}

/* Main Layout */
.main-content-area {
    display: grid;
    grid-template-columns: 240px 1fr 240px;
}

.sidebar-left {
    padding: 1.5rem;
    border-right: 1px solid var(--border-color);
    background-color: var(--background-color);
}

.main-nav h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.main-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.main-nav li a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 5px;
    transition: background-color 0.2s;
}

.main-nav li a:hover {
    background-color: #d8d8e0;
    text-decoration: none;
}

.main-nav i {
    width: 18px;
    height: 18px;
}

.main-nav .nav-icon {
    width: 18px;
    height: 18px;
    filter: invert(19%) sepia(59%) saturate(1478%) hue-rotate(222deg) brightness(92%) contrast(91%);
}


.content-main {
    padding: 2rem;
    background-color: var(--surface-color);
}

.content-main section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px dashed var(--border-color);
}
.content-main section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #666;
}

.breadcrumb-nav ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-nav li:not(:last-child)::after {
    content: '>';
    margin: 0 0.5rem;
    color: var(--border-color);
}

.breadcrumb-nav a {
    color: var(--secondary-color);
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
}

.breadcrumb-nav span {
    font-weight: bold;
    color: var(--text-color);
}



/* Search Filter for Tables */
.search-filter-container {
    flex-grow: 1;
    min-width: 250px;
}

.search-filter-container input {
    width: 100%;
    max-width: 400px; /* Limit width on larger screens */
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    display: block; /* To apply margin auto if needed */
}

.search-filter-container input:focus {
    outline: 2px solid var(--secondary-color);
    border-color: var(--secondary-color);
}

.calculator-results {
    background-color: var(--surface-color);
    padding: 1rem;
    border-left: 4px solid var(--secondary-color);
}

.calculator-results h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.calculator-results p {
    font-size: 1.1rem;
    margin: 0;
}

.calculator-results strong {
    color: var(--primary-color);
}

.calculator-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.calculator-form label {
    font-weight: bold;
    font-size: 1rem;
    color: var(--primary-color);
}

.calculator-form input[type="number"] {
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    width: 100px;
}
.calculator-form input[type="number"]:focus {
    outline: 2px solid var(--secondary-color);
    border-color: var(--secondary-color);
}


.calc-button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    font-family: var(--font-body);
    border: none;
    border-radius: 5px;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.calc-button:hover {
    background-color: var(--secondary-color);
    text-decoration: none;
}

.example-message-box {
    background-color: var(--background-color);
    border-left: 4px solid var(--secondary-color);
    padding: 1rem;
    margin: 1rem 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    border-radius: 0 4px 4px 0;
    
    max-width: 100%;
box-sizing: border-box;
word-wrap: break-word;
overflow-wrap: break-word;
word-break: break-word;
}

.example-message-box p {
    margin: 0;
}

.email-contact {
    font-weight: bold;
    font-size: 1.1rem;
    background-color: #e8e8f0;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--primary-color);
}


/* Page Content Layout */
.page-content-wrapper {
    display: block; /* Will be grid on larger screens */
}

/* Infobox (Right Column) */
.infobox {
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.infobox-image {
    width: 100%;
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto 1rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
}

.infobox-item-image {
    max-width: 64px;
    max-height: 64px;
    image-rendering: pixelated; /* Melhora a visualização de pixel art */
}

.infobox-title {
    text-align: center;
    font-size: 1.3rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.infobox-data table {
    width: 100%;
    border-collapse: collapse;
}

.infobox-data th, .infobox-data td {
    padding: 0.4rem;
    text-align: left;
    vertical-align: top;
    font-size: 0.95rem;
}

.infobox-data th {
    font-weight: bold;
    width: 40%;
}

.infobox-data tr:not(:last-child) {
    border-bottom: 1px solid #e0e0e0;
}

.infobox-data td code {
    background-color: #e0e0e0;
    padding: 0.2em 0.4em;
    margin: 0;
    font-size: 90%;
    border-radius: 3px;
    font-family: monospace;
}

/* Article Content Sections */
.article-content h1 {
    margin-bottom: 1.5rem;
}

.article-content ul {
    list-style: disc;
    padding-left: 2rem;
}

.article-content p {
    margin-bottom: 1rem;
}

/* Item List Table */
.table-container {
    overflow-x: auto; /* Enables horizontal scrolling on small screens */
     -webkit-overflow-scrolling: touch;
    margin-top: 1.5rem;
   
}

.item-list-table {
     /* width: 100%; */
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 800px; /* Force scroll on smaller viewports */
}

.item-list-table th, .item-list-table td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
    vertical-align: middle;
}

.item-list-table thead {
    background-color: var(--header-footer-bg);
}

.item-list-table th {
    font-weight: bold;
    font-family: var(--font-body);
    font-size: 0.9rem;
}

.item-list-table th[data-sortable] {
    cursor: pointer;
    position: relative;
    padding-right: 20px; /* Space for arrow */
}

.item-list-table th[data-sortable]::after {
    content: '';
    position: absolute;
    right: 8px;
    top: 50%;
    margin-top: -8px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    opacity: 0.3;
}

.item-list-table th[data-sortable].sort-asc::after {
    border-bottom: 5px solid var(--text-color);
    opacity: 1;
}

.item-list-table th[data-sortable].sort-desc::after {
    border-top: 5px solid var(--text-color);
    opacity: 1;
}

.item-list-table tbody tr:nth-child(even) {
    background-color: var(--background-color);
}

.item-list-table tbody tr:hover {
    background-color: #d8d8e0;
}

.item-list-table .item-icon {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
    vertical-align: middle;
}

.item-list-table td:first-child, .item-list-table th:first-child {
    text-align: center;
}

.loot-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
}

.loot-table th, .loot-table td {
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    text-align: left;
}

.loot-table thead {
    background-color: var(--header-footer-bg);
}

.loot-table th {
    font-weight: bold;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

.sidebar-right {
    padding: 1.5rem;
    border-left: 1px solid var(--border-color);
    background-color: var(--background-color);
}

.useful-links h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.useful-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.useful-links li a {
    display: block;
    padding: 0.5rem;
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    text-align: center;
}
.useful-links li a:hover {
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
}

.sidebar-widget {
    margin-bottom: 2rem;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

.sidebar-widget ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.sidebar-widget li a {
   /* display: block; */
    padding: 0.25rem;
    border-radius: 3px;
}
.sidebar-widget li a:hover {
    background-color: #d8d8e0;
    text-decoration: none;
}

/* Main Content Sections */
.category-cards .cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
}

.category-cards .card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-cards .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-decoration: none;
}

.category-cards .card img {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
}

.news-item {
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--secondary-color);
    padding-left: 1rem;
}

.event-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.event-card h3 {
    color: white;
    font-family: var(--font-body);
    font-weight: bold;
}

.btn {
    display: inline-block;
    background-color: white;
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
}
.btn:hover {
    background-color: var(--background-color);
    text-decoration: none;
}

/* Footer */
.site-footer {
    padding: 1.5rem;
    text-align: center;
    background-color: var(--header-footer-bg);
    border-top: 2px solid var(--border-color);
    font-size: 0.9rem;
    color: #666;
}

.footer-nav {
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-nav a {
    color: var(--secondary-color);
    font-weight: bold;
}

/* Responsive Design */
@media (min-width: 769px) {
    .page-content-wrapper {
        display: block;
    }
    .infobox {
        float: right;
        width: 300px;
        margin-left: 2rem;
        margin-bottom: 1rem; /* Adjust margin for float */
    }
}


@media (max-width: 1200px) {
    .main-content-area {
        grid-template-columns: 220px 1fr;
    }
    .sidebar-right {
        display: none; /* Hide right sidebar on smaller screens */
    }
}

@media (max-width: 992px) {
    .site-header {
        position: relative;
        padding: 2rem;
    }
    .top-nav {
        display: none;
    }
    .main-content-area {
        grid-template-columns: 1fr;
    }
    .sidebar-left {
        position: fixed;
        top: 0;
        left: -300px;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        background-color: var(--background-color);
        transition: left 0.3s ease-in-out;
        overflow-y: auto;
        border-right: 1px solid var(--border-color);
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }
    .sidebar-left.open {
        left: 0;
    }
    .mobile-menu-toggle {
        display: block;
        order: -1; /* Move hamburger to the left */
    }
    .search-container {
        width: 100%;
        margin-top: 1rem;
        order: 3; /* Move search to new line */
    }
    .search-container input {
        width: 100%;
    }
    .logo-container {
        position: absolute;
        left: 45%;
        top: 2px;
        transform: translateX(-50%);
    }
    .sidebar-right {
        display: block; /* Show right sidebar again */
        border-left: none;
        padding-top: 2rem;
    }
    
        .search-filter-container {
        width: 100%;
    }

    .search-filter-container input {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .main-content-area {
        grid-template-columns: 1fr;
    }
    .infobox {
        float: none;
        width: 100%;
        margin-left: 0;
    }
    .sidebar-right {
        border-left: none;
        padding-top: 2rem;
    }
   
       .item-list-table {
        min-width: auto;
        }
        
       .item-list-table th:nth-child(n+6),
       .item-list-table td:nth-child(n+6) {
        display: none;
    }
.useful-links img {
    width: 24px;
    height: 24px;
  }
    
    /* 
     .item-list-table {
        min-width: auto;
        }
        
       .item-list-table th:nth-child(n+6),
       .item-list-table td:nth-child(n+6) {
        display: none;
    }
    
    */
}


@media (max-width: 576px) {
     h1 { font-size: 2rem; }
     h2 { font-size: 1.75rem; }
     h3 { font-size: 1.25rem; }
     .site-header {
         padding: 2rem;  
     }
     .content-main {
         padding: 1rem;
     }
    .article-header p {
        font-size: 0.9rem;
    }
     .item-list-table {
        font-size: 0.85rem;
        width: 100%;
     }
     .item-list-table th, .item-list-table td {
        padding: 0.5rem;
     }
}