: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 {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.publication-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.publication-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 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;
}

/* Responsividade */
@media (max-width: 768px) {
    .grid-header, .grid-row {
        grid-template-columns: 80px 80px minmax(150px, 1fr) 40px;
        font-size: 0.9rem;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--dark-color);
    color: white;
    padding: 15px;
    z-index: 1000;
    display: none;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.cookie-banner p {
    flex: 1;
    min-width: 250px;
}

.cookie-banner a {
    color: var(--accent-color);
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.btn-accept, .btn-reject {
    padding: 8px 20px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
}

.btn-accept {
    background-color: var(--accent-color);
    color: var(--dark-color);
}

.btn-reject {
    background-color: transparent;
    border: 1px solid white;
    color: white;
}

/* Botões Flutuantes */
.floating-btn {
    position: fixed;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 999;
    transition: all 0.3s;
}

.floating-btn:hover {
    transform: scale(1.1);
}
/* Estilos para os tooltips */
.floating-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 60px;
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.floating-btn:hover::after {
    opacity: 1;
}

/* Posicionamento específico para cada botão */
.accessibility-btn::after {
    bottom: 5px;
}

.libras-btn::after {
    bottom: 15px;
}

/* Modo escuro para tooltips */
body.dark-mode .floating-btn::after {
    background: #f5f5f5;
    color: #333;
}

.accessibility-btn {
    right: 20px;
    bottom: 100px;
    background-color: #2c3e50;
    color: white;
    font-size: 1.5rem;
}

.libras-btn {
    right: 20px;
    bottom: 30px;
    background-color: #3498db;
    color: white;
    font-size: 1.5rem;
}

/* 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;
}

/* Modal de Libras */
.libras-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.libras-modal.show {
    display: flex;
}

.libras-content {
    background: white;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    max-height: 90vh;
    overflow: auto;
    position: relative;
    padding: 20px;
}

.close-libras {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.video-container {
    margin-top: 20px;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 4px;
    min-height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 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;
}
/* Paginação */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 20px;
    padding: 15px;
}

.page-numbers {
    display: flex;
    gap: 5px;
}

.pagination-button, .page-number {
    padding: 8px 10px;
    min-width: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.pagination-button {
    background-color: #f8f9fa;
}

.pagination-button:hover:not(:disabled) {
    background-color: #e9ecef;
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-number {
    background-color: white;
}

.page-number:hover:not(.active) {
    background-color: #f1f1f1;
}

.page-number.active {
    background-color: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.page-number.disabled {
    pointer-events: none;
    background: none;
    border: none;
}
.error-message {
    color: #e74c3c;
    padding: 20px;
    text-align: center;
    grid-column: 1 / -1;
}
/* Indicador de filtro ativo */
.filter-indicator {
    padding: 8px 12px;
    color: #27ae60;
    font-weight: bold;
    font-size: 0.9em;
}

/* Estilo para botões desabilitados */
.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f8f9fa;
}

/* Botão de reset do filtro */
.reset-filter-button {
    margin-left: 15px;
    padding: 8px 12px;
    background-color: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.reset-filter-button:hover {
    background-color: #c0392b;
}
/* Responsive Styles */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .calendar-section {
        flex-direction: column;
    }
    
    .grid-header, .grid-row {
        grid-template-columns: 1fr 1fr 2fr 1fr;
    }
}

@media (max-width: 480px) {
    .main-menu ul {
        flex-direction: column;
        gap: 5px;
    }
    
    .grid-header, .grid-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .grid-header div:nth-child(3),
    .grid-row div:nth-child(3) {
        display: none;
    }
}

/* Notificações */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 4px;
    color: white;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    background-color: #27ae60;
}

.notification.error {
    background-color: #e74c3c;
}

@keyframes slideIn {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* Mensagem de loading */
.loading-message {
    padding: 20px;
    text-align: center;
    color: #7f8c8d;
    grid-column: 1 / -1;
}

.loading-message::after {
    content: '...';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}