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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.calendar-hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    color: white;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.calendar-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('../images/head/23CS0403.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.calendar-hero .hero-content {
    position: relative;
    z-index: 2;
    padding: 0 2rem;
}

.calendar-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.calendar-hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

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

.term-section {
    margin-bottom: 4rem;
}

.term-section h2 {
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.term-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
}

.term-section:nth-child(3n+1) h2::after {
    background: #3498db;  /* Blue */
}

.term-section:nth-child(3n+2) h2::after {
    background: #e74c3c;  /* Red */
}

.term-section:nth-child(3n+3) h2::after {
    background: #2ecc71;  /* Green */
}

.term-section {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.term-section:nth-child(1) { animation-delay: 0.2s; }
.term-section:nth-child(2) { animation-delay: 0.4s; }
.term-section:nth-child(3) { animation-delay: 0.6s; }

.calendar-card {
    opacity: 0;
    animation: slideInRight 0.6s ease forwards;
}

.calendar-grid .calendar-card:nth-child(1) { animation-delay: 0.3s; }
.calendar-grid .calendar-card:nth-child(2) { animation-delay: 0.5s; }
.calendar-grid .calendar-card:nth-child(3) { animation-delay: 0.7s; }

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.calendar-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    transition: transform 0.3s ease;
}

.calendar-card:hover {
    transform: translateY(-5px);
}

.calendar-date {
    color: white;
    padding: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 100px;
}

.term-section:nth-child(3n+1) .calendar-date {
    background: #3498db;  /* Blue */
}

.term-section:nth-child(3n+2) .calendar-date {
    background: #e74c3c;  /* Red */
}

.term-section:nth-child(3n+3) .calendar-date {
    background: #2ecc71;  /* Green */
}

.calendar-date .month {
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
}

.calendar-date .day {
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
    margin-top: 0.5rem;
}

.calendar-content {
    padding: 1.5rem;
    flex: 1;
}

.calendar-content h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.calendar-content p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.important-notes {
    background: #f8f9fa;
    padding: 3rem 2rem;
    border-radius: 10px;
    margin-top: 4rem;
}

.important-notes h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 2rem;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.note-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.note-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.note-card:nth-child(3n+1) i {
    color: #3498db;  /* Blue */
}

.note-card:nth-child(3n+2) i {
    color: #e74c3c;  /* Red */
}

.note-card:nth-child(3n+3) i {
    color: #2ecc71;  /* Green */
}

.note-card {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.notes-grid .note-card:nth-child(1) { animation-delay: 0.8s; }
.notes-grid .note-card:nth-child(2) { animation-delay: 1s; }
.notes-grid .note-card:nth-child(3) { animation-delay: 1.2s; }

.note-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.note-card p {
    color: #666;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .calendar-hero h1 {
        font-size: 2.5rem;
    }
    
    .calendar-card {
        flex-direction: column;
    }
    
    .calendar-date {
        padding: 1rem;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 1rem;
    }
    
    .calendar-date .day {
        margin-top: 0;
    }
}
