:root {
    --rotary-blue: #02266E;
    --rotary-gold: #FFC00F;
    --rotary-bg: #f9f9f9;
    --rotary-text: #333;
}

.rotary-agenda-wrapper {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* Header */
.rotary-agenda-header {
    background-color: var(--rotary-blue);
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rotary-month-title {
    margin: 0;
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: capitalize;
}

.rotary-nav-btn {
    text-decoration: none;
    color: var(--rotary-gold);
    font-weight: bold;
    padding: 8px 16px;
    border: 1px solid var(--rotary-gold);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.rotary-nav-btn:hover {
    background-color: var(--rotary-gold);
    color: var(--rotary-blue);
}

/* Grid */
.rotary-agenda-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-left: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.rotary-day-header {
    background-color: #f4f4f4;
    color: var(--rotary-blue);
    padding: 10px;
    text-align: center;
    font-weight: bold;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
}

.rotary-day-cell {
    min-height: 120px;
    background-color: #fff;
    border-right: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 5px;
    position: relative;
    transition: background-color 0.2s;
}

.rotary-day-cell:hover {
    background-color: #fafafa;
}

.rotary-day-cell.empty {
    background-color: #fcfcfc;
}

.day-number {
    display: block;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 5px;
    text-align: right;
    padding-right: 5px;
}

/* Events */
.rotary-event {
    background-color: var(--rotary-blue);
    color: #fff;
    padding: 4px 8px;
    margin-bottom: 4px;
    border-radius: 4px;
    font-size: 0.85rem;
    border-left: 3px solid var(--rotary-gold);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rotary-event:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    /* background-color: #033496; */ /* Slightly lighter blue or keep same */
}

.event-time {
    font-weight: bold;
    color: var(--rotary-gold);
    margin-right: 4px;
}

/* Modal */
.rotary-modal_overlay {
    display: none; 
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.5); 
    animation: fadeIn 0.3s;
}

.rotary-modal-box {
    background-color: #fefefe;
    margin: 10% auto; 
    padding: 20px;
    border-top: 5px solid var(--rotary-gold);
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: slideDown 0.3s;
}

.rotary-close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.rotary-close-btn:hover,
.rotary-close-btn:focus {
    color: var(--rotary-blue);
    text-decoration: none;
    cursor: pointer;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Mobile Responsiveness */
@media screen and (max-width: 768px) {
    .rotary-day-cell {
        min-height: 80px;
    }
    .rotary-nav-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    .rotary-month-title {
        font-size: 1.2rem;
    }
}
