/* Estilos Globais */
:root {
    --primary-color: #4a6fa5;
    --secondary-color: #6b8cae;
    --accent-color: #ff9a3c;
    --text-color: #333;
    --light-text: #666;
    --background-color: #f9f9f9;
    --card-background: #fff;
    --border-color: #e0e0e0;
    --holiday-highlight: rgba(255, 154, 60, 0.2);
    --holiday-dot: #ff9a3c;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Filtros */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--light-text);
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: var(--transition);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(74, 111, 165, 0.2);
}

/* Calendário */
.calendar {
    width: 100%;
    background-color: var(--card-background);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
}

.calendar-header h2 {
    font-size: 1.5rem;
    font-weight: 500;
}

.calendar-header button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.calendar-header button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    padding: 0.5rem 0;
    font-weight: 500;
    background-color: #f0f0f0;
    border-bottom: 1px solid var(--border-color);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background-color: var(--border-color);
}

.calendar-day {
    background-color: var(--card-background);
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-day:hover {
    background-color: rgba(74, 111, 165, 0.1);
}

.calendar-day.today {
    background-color: rgba(74, 111, 165, 0.1);
    font-weight: bold;
    color: var(--primary-color);
}

.calendar-day.has-events {
    position: relative;
}


.calendar-day.other-month {
    color: var(--light-text);
    opacity: 0.5;
}

.day-number {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.day-dots {
    display: flex;
    gap: 2px;
    margin-top: auto;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--card-background);
    border-radius: 8px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow);
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0px 15px 0px 15px;
    background-color: #b3d6f5;
    color: var(--light-text);
    transition: var(--transition);
    border: none;
    text-align: center;
}
.country-count-info {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.1em;
    color: #333;
}
.close-button:hover {
    color: var(--text-color);
}

#modal-date {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

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

.event-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.event-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.event-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.event-country, .event-type {
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background-color: rgba(74, 111, 165, 0.1);
    color: var(--primary-color);
}

.event-description {
    font-size: 0.95rem;
    color: var(--light-text);
    line-height: 1.5;
}

/* Responsividade */
@media (max-width: 768px) {
    .filter-group {
        min-width: 100%;
    }

    .calendar-weekdays div, .calendar-day {
        font-size: 0.9rem;
    }

    .day-number {
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .calendar-header h2 {
        font-size: 1.2rem;
    }

    .calendar-weekdays div {
        padding: 0.25rem 0;
    }

    .calendar-day {
        padding: 0.25rem;
    }
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal.show .modal-content {
    animation: fadeIn 0.3s ease;
}

/* Acessibilidade */
button:focus, select:focus, input:focus {
    outline: 2px solid var(--primary-color);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
/* Estilos adicionais para o novo conteúdo do modal */
.event-header {
    margin-bottom: 1rem;
}

.event-name-pt {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.event-name-en {
    display: block;
    font-size: 1rem;
    color: var(--light-text);
    font-style: italic;
}

.event-country {
    display: flex;
    align-items: center;
    margin-top: 0.75rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
}

.event-country img {
    width: 24px;
    height: 18px;
    margin-right: 8px;
    border-radius: 4px;
    object-fit: cover;
    box-shadow: var(--shadow);
}

.event-type {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    padding: 0.3rem 0.6rem;
    background-color: rgba(74, 111, 165, 0.1);
    color: var(--primary-color);
    border-radius: 4px;
}

.event-description-pt, .event-description-en {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--light-text);
    line-height: 1.5;
}

.event-description-pt::before {
    content: "📖 ";
}

.event-description-en::before {
    content: "📚 ";
}

.event-item {
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.event-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}
.day-dots {
    display: flex;
    gap: 2px;
    margin-top: 3px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.holiday-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.holiday-dot.public {
    background-color: #ff9a3c; /* Laranja */
}

.holiday-dot.national {
    background-color: #3498db; /* Azul */
}

.holiday-dot.observance {
    background-color: #2ecc71; /* Verde */
}

.holiday-dot.religious {
    background-color: #9b59b6; /* Roxo */
}

.holiday-dot.cultural {
    background-color: #f1c40f; /* Amarelo */
}

.holiday-dot.international {
    background-color: #e74c3c; /* Vermelho */
}

.holiday-dot.bank {
    background-color: #34495e; /* Cinza escuro */
}

.holiday-dot.school {
    background-color: #1abc9c; /* Verde água */
}

.holiday-dot.optional {
    background-color: #95a5a6; /* Cinza claro */
}
