/* University / units and departments */
.welcome .welcome-image {
    display: none;
}
.welcome .welcome-content {
    display: none;
}
div.welcome {
    padding: 0 !important;
}


.calendar-container {
    max-width: 1200px;
    margin: 0 auto;
}

.calendar-tagline {
    color: var(--light-text);
    font-size: 1.2rem;
    max-width: 700px;
    margin: 40px auto 0;
    line-height: 1.8;
}

/* Year Section */
.year-section {
    margin-bottom: 60px;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    border-left: 3px solid var(--accent);
    transition: transform 0.3s ease;
}

.year-section:hover {
    transform: translateY(-3px);
}

.year-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 45, 88, 0.1);
}

.year-title i {
    color: var(--accent);
    font-size: 1.5rem;
}

/* Improved Accordion Styles */
.accordion {
    --bs-accordion-border-color: transparent;
    --bs-accordion-border-radius: 15px;
    --bs-accordion-inner-border-radius: 13px;
    --bs-accordion-btn-padding-x: 1.5rem;
    --bs-accordion-btn-padding-y: 1.25rem;
    --bs-accordion-active-color: var(--primary);
    --bs-accordion-active-bg: #f8fbff;
    --bs-accordion-btn-focus-box-shadow: 0 0 0 0.25rem rgba(243, 178, 0, 0.25);
}

.accordion-item {
    margin-bottom: 20px;
    border: 2px solid rgba(0, 45, 88, 0.08);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    border-color: rgba(0, 45, 88, 0.2);
}

.accordion-button {
    font-weight: 700;
    color: var(--primary);
    background-color: var(--white);
    font-size: 1.1rem;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.accordion-button:not(.collapsed) {
    color: var(--primary);
    background-color: #f8fbff;
    box-shadow: 0 4px 12px rgba(0, 45, 88, 0.05);
}

.accordion-button:hover {
    background-color: #f5f9ff;
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23002D58'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    transform: scale(1.2);
    transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed)::after {
    transform: rotate(180deg) scale(1.2);
}

.accordion-header-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.semester-icon {
    color: var(--accent);
    font-size: 1.3rem;
}

.accordion-body {
    overflow: auto;
    padding: 0;
    background: var(--light);
}

/* Enhanced Table Styles */
.events-table {
    width: 100%;
    background-color: var(--white);
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.events-table thead {
    background: var(--primary);
}

.events-table thead th {
    padding: 20px 25px;
    text-align: left;
    font-weight: 700;
    color: var(--white);
    font-size: 1rem;
    border: none;
    position: relative;
}

.events-table thead th:after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.3);
}

.events-table thead th:last-child:after {
    display: none;
}

.events-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.events-table tbody tr:last-child {
    border-bottom: none;
}

.events-table tbody tr:hover {
    background-color: #f8fbff;
}

.events-table td {
    padding: 22px 25px;
    vertical-align: middle;
}

.event-date {
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    width: 150px;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* .event-date:before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    display: inline-block;
} */

.event-name {
    font-weight: 600;
    color: var(--dark-text);
    line-height: 1.5;
    font-size: 1.05rem;
}

.event-notes {
    color: var(--light-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

.calendar-download {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    margin-top: 40px;
    border-top: 3px solid var(--accent);
}

.download-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.download-card:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.download-icon {
    width: 50px;
    height: 50px;
    background: #ff4b4b;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.download-info h4 {
    margin: 0 0 5px 0;
    color: var(--primary);
    font-weight: 600;
    font-size: 1.1rem;
}

.download-info p {
    margin: 0;
    color: var(--light-text);
    font-size: 0.9rem;
}

.disclaimer {
    background: #fff8e1;
    border-left: 3px solid var(--accent);
    padding: 15px 20px;
    border-radius: 6px;
    margin-top: 20px;
    color: var(--light-text);
    font-size: 0.9rem;
}

.disclaimer i {
    color: var(--accent);
    margin-right: 10px;
}

.calendar-download-header{
    color: var(--primary);
}
.calendar-download-header h3{
    color: var(--primary);
}
.calendar-download-header i{
    color: var(--accent);
}


/* Responsive Design */
@media (max-width: 992px) {
    /* .calendar-header h1 {
        font-size: 2.5rem;
    } */
    
    .stat-card {
        min-width: 170px;
        padding: 20px 25px;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .year-section {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }
    
    /* .calendar-header h1 {
        font-size: 2.2rem;
    } */
    
    .calendar-tagline {
        font-size: 1.1rem;
    }
    
    /* .calendar-stats {
        gap: 15px;
    }
        */
    .stat-card {
        min-width: calc(50% - 15px);
    }
    
    .accordion-button {
        font-size: 1rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .accordion-header-content {
        width: 100%;
        /* justify-content: space-between; */
    }
    
    /* .semester-badge {
        margin-left: 0;
        margin-top: 10px;
        align-self: flex-start;
    } */
    
    .events-table thead th,
    .events-table td {
        padding: 15px 20px;
    }
    

    .download-card {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .download-info h4 {
        font-size: 1rem;
    }
    
}

@media (max-width: 576px) {
    /* .calendar-header h1 {
        font-size: 1.8rem;
    } */
    
    .calendar-tagline {
        font-size: 1rem;
    }
    
    .stat-card {
        min-width: 100%;
    }
    
    .year-section {
        padding: 25px 20px;
    }
    
    .year-title {
        font-size: 1.5rem;
    }
    
    .events-table {
        display: block;
        overflow-x: auto;
    }
    
    .events-table thead th,
    .events-table td {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .disclaimer {
        padding: 20px;
    }
    .calendar-download {
        padding: 20px;
    }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.year-section, .calendar-download {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Fix accordion arrow on small screens */
@media (max-width: 768px) {
    .accordion-button {
    position: relative;
    padding-right: 3rem !important; /* Make space for the arrow */
    }

    .accordion-button::after {
    position: absolute;
    right: 1rem;   /* Move arrow to the right */
    top: 50%;
    transform: translateY(-50%) scale(1.2); /* Vertical center */
    }

    /* Keep rotation when expanded */
    .accordion-button:not(.collapsed)::after {
    transform: translateY(-50%) rotate(180deg) scale(1.2);
    }
}