:root {
    --primary-color: #7B3F00;
    --secondary-color: #B8860B;
    --background-color: #f8f1e6;
    --text-color: #333;
    --border-color: #dcdcdc;
    --font-family: 'Helvetica Neue', Arial, sans-serif;
    --sunday-color: #922b2b; /* Tamnocrvena za nedjelju */
    --sunday-bg-color: #ffeceb; /* Svjetlija crvena za pozadinu */
}

.catholic-calendar-container {
    font-family: var(--font-family);
    max-width: 500px;
    margin: 1rem auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 1rem;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 8px;
    margin-bottom: 0.8rem;
}

.calendar-nav h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: normal;
}

.calendar-nav span {
    font-size: 0.9rem;
    margin-left: 0.3rem;
}

.calendar-nav button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.5rem;
    padding: 0.2rem;
    transition: transform 0.2s ease-in-out;
}

.calendar-nav button:hover {
    transform: scale(1.1);
}

.calendar-nav svg {
    width: 24px;
    height: 24px;
    stroke-width: 3;
}

.calendar-grid-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 0.5rem 0;
    font-weight: bold;
    border-radius: 8px;
    font-size: 0.9rem;
}

.calendar-grid-dates {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 0.3rem;
    padding: 0.5rem 0;
}

.date-cell {
    position: relative;
    padding: 0.8rem 0.2rem;
    border-radius: 8px;
    transition: background-color 0.2s, transform 0.2s;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    font-size: 0.8rem;
    border: 1px solid #e0e0e0;
}

.date-cell.today {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    background-color: rgba(255, 255, 255, 0.8);
}

.date-cell.sunday {
    background-color: var(--sunday-bg-color);
    border: 1px solid var(--sunday-color);
}

.date-cell.today:hover {
    transform: scale(1.05);
}

.date-cell:not(.today):hover {
    background-color: #f1e7d8;
    cursor: pointer;
}

.date-cell.empty {
    background-color: transparent;
    border: none;
    cursor: default;
}

.date-number {
    font-weight: bold;
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.date-cell.sunday .date-number {
    color: var(--sunday-color);
}

.gospel-ref {
    font-size: 0.9rem; /* Povećan font za bolju čitljivost */
    line-height: 1.4; /* Povećan razmak između redaka */
    color: var(--text-color);
    text-align: center;
    font-style: italic;
    margin-top: auto;
    word-break: break-word;
}

.gospel-ref a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.gospel-ref a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

@media (min-width: 768px) {
    .calendar-grid-weekdays div {
        font-size: 1rem;
    }
    
    .date-cell {
        min-height: 110px;
    }

    .date-number {
        font-size: 1.6rem;
    }

    .gospel-ref {
        font-size: 1rem;
    }
}