/* Notices, Calendar & Events Section - Professional UI */
/* This file contains styles specifically for the notices-events section */

/* Import theme variables for consistency */
/* @import url('theme.css'); */

/* CSS Variables for Calendar */
:root {
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --bg-light: #f8fafc;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #9ca3af;
    --text-white: #ffffff;
    --primary-color: #1e40af;
    --primary-color-light: #3b82f6;
    --primary-color-lighter: #dbeafe;
    --primary-color-dark: #1e3a8a;
    --accent-color: #f59e0b;
    --border-color-light: #e5e7eb;
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Section Base Styles */
.notices-events-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    position: relative;
}

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

.section-subtitle {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    display: block;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Card Base Styles */
.notices-card,
.calendar-card,
.events-card {
    background: var(--bg-card);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color-light);
    height: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.notices-card:hover,
.calendar-card:hover,
.events-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color-lighter);
}

/* Card Headers */
.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-light) 100%);
    color: black;
    padding: 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    backdrop-filter: blur(10px);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    margin-left: 1rem;
}

.notice-count,
.events-count,
.current-month {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

/* Notices Card Styles */
.notices-list {
    padding: 1.5rem;
}

.notice-item {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
}

.notice-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.notice-item.urgent {
    border-left-color: var(--danger-color);
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
}

.notice-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.notice-badge.urgent {
    background: var(--danger-color);
    color: white;
}

.notice-badge.general {
    background: var(--info-color);
    color: white;
}

.notice-badge.academic {
    background: var(--success-color);
    color: white;
}

.notice-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.notice-text {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.notice-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notice-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Calendar Card Styles */
.calendar-wrapper {
    padding: 1.5rem;
}

.calendar-header {
    margin-bottom: 1.5rem;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.nav-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nav-btn:hover {
    background: var(--primary-color);
    color: black;
    border-color: var(--primary-color);
}

.month-year {
    font-size: 1.125rem;
    font-weight: 600;
    color: black;
    margin: 0;
}

.calendar-grid {
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border-color-light);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--primary-color-lighter);
    border-bottom: 1px solid var(--border-color-light);
}

.calendar-weekdays span {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: black;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.day {
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: black;
    border-right: 1px solid var(--border-color-light);
    border-bottom: 1px solid var(--border-color-light);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.day:nth-child(7n) {
    border-right: none;
}

.day:hover {
    background: var(--primary-color-lighter);
    color: var(--primary-color);
}

.day.prev-month,
.day.next-month {
    color: black;
    background: var(--bg-tertiary);
}

.day.event-day {
    background: var(--info-color);
    color: black;
    font-weight: 600;
}

.day.holiday {
    background: var(--warning-color);
    color: black;
    font-weight: 600;
}

.day.event-day::after,
.day.holiday::after {
    content: attr(data-event);
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color-light);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: black;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-color.event {
    background: var(--info-color);
}

.legend-color.holiday {
    background: var(--warning-color);
}

.legend-color.exam {
    background: var(--danger-color);
}

/* Events Card Styles */
.events-timeline {
    padding: 1.5rem;
}

.event-item {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-color-light);
    transition: all 0.3s ease;
}

.event-item:last-child {
    border-bottom: none;
}

.event-item:hover {
    transform: translateX(4px);
}

.event-item.featured {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    margin: 0 -1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 0.75rem;
}

.event-date {
    background: var(--primary-color);
    color: white;
    border-radius: 0.75rem;
    padding: 0.75rem;
    text-align: center;
    min-width: 60px;
    flex-shrink: 0;
}

.date-day {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
}

.date-month {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.9;
}

.event-content {
    flex: 1;
}

.event-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.event-badge.featured {
    background: var(--warning-color);
    color: black;
}

.event-badge.academic {
    background: var(--success-color);
    color: black;
}

.event-badge.cultural {
    background: var(--info-color);
    color: black;
}

.event-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.event-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.event-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Card Footer */
.card-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color-light);
    background: var(--bg-secondary);
}

.view-all-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: black;
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: black;
}

.view-all-btn i {
    transition: transform 0.3s ease;
}

.view-all-btn:hover i {
    transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .notices-events-section {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .calendar-days {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .day {
        padding: 0.5rem 0.25rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.75rem;
    }
    
    .card-header {
        padding: 1.25rem;
    }
    
    .header-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    .notices-list,
    .calendar-wrapper,
    .events-timeline {
        padding: 1.25rem;
    }
    
    .event-item {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .event-date {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }
    
    .calendar-weekdays span {
        font-size: 0.625rem;
        padding: 0.5rem 0.25rem;
    }
    
    .day {
        padding: 0.375rem 0.125rem;
        font-size: 0.625rem;
    }
    
    .calendar-legend {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
    }
}

/* Enhanced Calendar Day Styles */
.calendar-days .day {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.calendar-days .day:hover {
    background: var(--primary-color-lighter);
    color: var(--primary-color);
    transform: scale(1.05);
}

.calendar-days .day.today {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.3);
}

.calendar-days .day.event-day {
    background: var(--accent-color);
    color: white;
    font-weight: 600;
    position: relative;
}

.calendar-days .day.event-day::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.calendar-days .day.holiday {
    background: #ef4444;
    color: white;
    font-weight: 600;
}

.calendar-days .day.exam-day {
    background: #8b5cf6;
    color: white;
    font-weight: 600;
    position: relative;
}

.calendar-days .day.exam-day::after {
    content: '📝';
    position: absolute;
    top: -2px;
    right: -2px;
    font-size: 10px;
    background: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.calendar-days .day.prev-month,
.calendar-days .day.next-month {
    color: var(--text-light);
    opacity: 0.5;
}

/* Calendar Navigation */
.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.nav-btn {
    background: none;
    border: none;
    color: black;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.nav-btn:active {
    transform: scale(0.95);
}

.month-year {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
    color: black;
}

/* Calendar Loading State */
.calendar-loading {
    text-align: center;
    padding: 0.5rem;
    color: black;
    font-size: 0.875rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
}

.calendar-loading i {
    margin-right: 0.5rem;
}

/* Disabled Navigation Buttons */
.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-btn:disabled:hover {
    background: none;
    transform: none;
}

/* Calendar Grid Responsiveness */
@media (max-width: 768px) {
    .calendar-grid {
        font-size: 0.875rem;
    }
    
    .calendar-weekdays span {
        font-size: 0.75rem;
        padding: 0.25rem;
    }
    
    .calendar-days .day {
        padding: 0.25rem;
        font-size: 0.875rem;
    }
    
    .month-year {
        font-size: 1rem;
    }
}

/* Event Popup Styles */
.event-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.event-popup {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: popupSlideIn 0.3s ease-out;
}

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

.popup-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-light) 100%);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.popup-content {
    padding: 1.5rem;
}

.event-info {
    margin-bottom: 1.5rem;
}

.event-date-display,
.event-time-display,
.event-location-display {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
    color: var(--text-primary);
}

.event-date-display i,
.event-time-display i,
.event-location-display i {
    color: var(--primary-color);
    width: 20px;
    text-align: center;
}

.event-description {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
}

.event-description p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.popup-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color-light);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.popup-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.popup-btn.secondary {
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-color-light);
}

.popup-btn.secondary:hover {
    background: var(--border-color-light);
}

.popup-btn.primary {
    background: var(--primary-color);
    color: white;
}

.popup-btn.primary:hover {
    background: var(--primary-color-dark);
    transform: translateY(-2px);
}

/* Year Selector Styles */
.year-selector-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.year-selector-popup {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    animation: popupSlideIn 0.3s ease-out;
}

.year-selector {
    padding: 1rem;
}

.year-input-group {
    margin-bottom: 1.5rem;
    text-align: center;
}

.year-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.year-input-group input {
    width: 100px;
    padding: 0.5rem;
    border: 2px solid var(--border-color-light);
    border-radius: 0.5rem;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
}

.year-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.month-btn {
    padding: 0.75rem;
    border: 1px solid var(--border-color-light);
    background: white;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: var(--text-primary);
}

.month-btn:hover {
    background: var(--primary-color-lighter);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.month-btn.selected {
    background: var(--primary-color);
    color: black;
    border-color: var(--primary-color);
}

/* Quick Navigation Styles */
.calendar-quick-nav {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quick-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: black;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Responsive Popup */
@media (max-width: 768px) {
    .event-popup,
    .year-selector-popup {
        width: 95%;
        margin: 1rem;
    }
    
    .popup-header,
    .popup-content,
    .popup-footer {
        padding: 1rem;
    }
    
    .month-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .popup-footer {
        flex-direction: column;
    }
    
    .popup-btn {
        width: 100%;
    }
}
