:root {
    --primary-color: #003366;
    --secondary-color: #0066cc;
    --accent-color: #ff6600;
    --light-color: #f5f5f5;
    --dark-color: #333;
    --text-color: #333;
    --text-light: #fff;
    --highlight-color: #ffeb3b;
    --border-radius: 4px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: var(--text-color);
    line-height: 1.6;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 20px;
}

.calendar-section {
    display: flex;
    gap: 20px;
    margin-bottom: 2rem;
}

.calendar-container {
    flex: 2;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem;
}

.publications-sidebar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}
.publication-card {
    border: 1px solid #e0e0e0;
    padding: 1.5rem;
    background-color: #fff;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
    border-color: #007bff;
}
.publication-card i {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 1rem;
    display: block;
    transition: color 0.3s ease;
}
.publication-card:hover i {
    color: #0056b3;
}
.publication-card h3 {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    color: #333;
    font-weight: 600;
}
.publication-card a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-decoration: none;
    z-index: 1;
}
.publication-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1) 0%, rgba(0, 123, 255, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}
.publication-card:hover::after {
    opacity: 1;
}
@media (max-width: 1024px) {
    .publications-sidebar {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) {
    .publications-sidebar {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .publications-sidebar {
        grid-template-columns: 1fr;
    }
}

/* Calendar Styles */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 10px;
}

#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.month-year-selectors {
    display: flex;
    gap: 10px;
}

.month-selector, .year-selector {
    padding: 8px 12px;
    border-radius: var(--border-radius);
    border: 1px solid #ddd;
    background-color: white;
    cursor: pointer;
}

.calendar-nav {
    display: flex;
    gap: 5px;
}

.calendar-nav button {
    padding: 8px 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.calendar-nav button:hover {
    background-color: var(--secondary-color);
}
.calendar-day-header {
    text-align: center;
    font-weight: bold;
    padding: 5px;
}

.calendar-day {
    padding: 10px;
    text-align: center;
    border: 1px solid #eee;
    transition: all 0.2s;
}

.calendar-day:hover {
    background-color: var(--accent-color);
    color: white;
}

.calendar-day.has-publication {
    background-color: var(--primary-color); /* #4B4B4D; */
    color: white;
    cursor: pointer;
}

.calendar-day.has-publication:hover {
    background-color: #3A3A3C;
    transform: scale(1.05);
}


.calendar-day:not(.has-publication) {
    color: #ccc;
    cursor: default;
    pointer-events: none;
    background-color: #f9f9f9;
}

.calendar-day:not(.has-publication):hover {
    background-color: inherit;
    color: #ccc;
    transform: none;
}

.calendar-day.no-publication {
    color: #ddd;
    background-color: #f9f9f9;
    cursor: not-allowed;
}

.calendar-day.empty {
    visibility: hidden;
}
/* Search Section */
.search-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem;
    margin-bottom: 2rem;
}

#search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.search-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 200px;
}

.search-group label {
    margin-bottom: 5px;
    font-weight: bold;
}

.search-group input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
}

#search-form button {
    padding: 8px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.3s;
}

#search-form button:hover {
    background-color: var(--secondary-color);
}

/* Results Grid */
.results-section {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

#grid-results {
    display: flex;
    flex-direction: column;
}

/* Grid principal */
.grid-header, .grid-row {
    display: grid;
    grid-template-columns: 100px 100px minmax(200px, 3fr) 50px;
    align-items: start; /* Alinhamento no topo */
    padding: 12px 15px;
}

.grid-header {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
}

.grid-row {
    border-bottom: 1px solid #eee;
}

.grid-row:hover {
    background-color: #f9f9f9;
}

/* Célula de resumo com limite de linhas */
.resumo-cell {
    display: -webkit-box;
    -webkit-line-clamp: 5; /* Limite de 2 linhas */
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 9.0em; /* 2 linhas * 1.8em (line-height) */
    line-height: 1.8em;
    cursor: pointer;
    transition: max-height 0.3s ease;
}

.resumo-cell.expanded {
    -webkit-line-clamp: unset;
    line-clamp: unset;
    max-height: none;
}
.resumo-cell {
    text-align: left;
    padding: 8px;
}

.resumo-cell ul {
    margin: 0;
    padding-left: 20px;
}

.resumo-cell li {
    margin-bottom: 5px;
    list-style-type: disc;
}

.resumo-cell p {
    margin: 5px 0;
}
/* Ícones */
.view-icon {
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 1.2rem;
}

.expand-icon {
    color: var(--primary-color);
    margin-left: 5px;
    font-size: 0.9rem;
}

/* Alinhamento vertical */
.grid-row > div {
    align-self: start;
    padding: 4px 0;
}

/* Painel de Acessibilidade */
.accessibility-panel {
    position: fixed;
    right: 30px;
    bottom: 160px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    padding: 10px 0;
    width: 200px;
    display: none;
    z-index: 1000;
}

.accessibility-panel.show {
    display: block;
    animation: fadeIn 0.3s;
}

.accessibility-option {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.2s;
}

.accessibility-option:hover {
    background-color: #f5f5f5;
}

.accessibility-option i {
    width: 20px;
    text-align: center;
}

.close-panel {
    border-top: 1px solid #eee;
    margin-top: 5px;
    padding-top: 10px;
}

/* Modo Escuro */
body.dark-mode {
    background-color: #121212;
    color: #f5f5f5;
}

body.dark-mode .accessibility-panel {
    background: #333;
    color: white;
}

body.dark-mode .accessibility-option:hover {
    background-color: #444;
}

.org-chart {
    text-align: center;
}

.box {
    display: inline-block;
    padding: 10px 15px;
    border-radius: 8px;
    background: #1e3a8a;
    color: #fff;
    margin: 10px;
    min-width: 220px;
}

.box.light {
    background: #ffffff;
    color: #333;
    border: 2px solid #1e3a8a;
}

.level {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.line {
    width: 2px;
    height: 30px;
    background: #333;
    margin: 0 auto;
}

    
/* Responsividade */
@media (max-width: 768px) {
    .grid-header, .grid-row {
        grid-template-columns: 80px 80px minmax(150px, 1fr) 40px;
        font-size: 0.9rem;
    }
    .level {
        flex-direction: column;
        align-items: center;
    }    
}