.calendar {
    background: linear-gradient(135deg, #034184, #0673d1);
    border-radius: 20px;
    padding: 15px;
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 2px 6px rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.3);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    width: 290px;
    height: 320px;
    margin-left: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-top: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    padding: 10px 0;
}

.calendar-header button {
    background: linear-gradient(135deg, #0560b3, #034184);
    border: none;
    padding: 5px 10px;
    color: white;
    font-size: 16px;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: 0.2s;
}

.calendar-header button:hover {
    background: linear-gradient(135deg, #0673d1, #0560b3);
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    font-weight: bold;
    margin-top: 5px;
}

.day {
    padding: 5px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-top: 5px;
    overflow-y: auto;
    flex-grow: 1;
}

.calendar-grid div {
    padding: 10px;
    background: linear-gradient(135deg, #0560b3, #034184);
    border-radius: 8px;
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.4), 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .calendar {
        margin: 20px auto;
        width: 90%;
        height: auto;
    }
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px;
    border-radius: 6px;
    white-space: nowrap;
    display: none;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.tooltip a {
  color: white;
  text-decoration: none;
}

.tooltip a:hover {
  text-decoration: underline;
}
.day.highlight {
    background: linear-gradient(135deg, #91BEFF, #80B5FF);
    color: black;
    font-weight: bold;
    cursor: pointer;
    position: relative;
}

.day.active .tooltip {
    display: block;
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
}

.day.active.tooltip-top .tooltip {
    bottom: auto;
    top: 110%;
}

@media (max-width: 872px) {
    body {
        flex-direction: column; 
    }

    .sidebar {
        position: relative; 
        width: 100%; 
        height: auto; 
        border-radius: 20px; 
        padding-bottom: 10px;
    }

    .content {
        margin-left: 0; 
        width: 100%; 
    }

    .calendar {
        margin-left: auto;
        margin-right: auto;
    }
}