/**
 * Lectures Page Styles - CEDE
 */

/* Events Navigation */
.events-nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
}
.events-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    gap: 2rem;
    justify-content: center;
}
.events-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.3s;
}
.events-nav a:hover {
    background: #f0f0f0;
}
.events-nav a.active {
    background: var(--color-primary);
    color: white;
}
.events-nav a i {
    font-size: 1.3rem;
}

/* Hero Section */
.lectures-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    padding: 4rem 2rem;
    text-align: center;
    color: white;
}

.lectures-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 1rem;
}

.lectures-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Today Highlight */
.today-section {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    padding: 2rem;
    color: white;
}

.today-container {
    max-width: 1200px;
    margin: 0 auto;
}

.today-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.today-header .pulse {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.today-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.today-lectures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.today-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 1.5rem;
    border: 1px solid rgba(255,255,255,0.2);
}

.today-card .time {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.today-card .topic {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.today-card .speaker {
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Main Content */
.lectures-main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

/* Sidebar */
.lectures-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* Filters Card */
.filter-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-card h3 {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group {
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

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

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.btn-filter {
    width: 100%;
    padding: 0.75rem;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-filter:hover {
    background: var(--color-primary-dark);
}

.btn-clear {
    width: 100%;
    padding: 0.5rem;
    background: transparent;
    color: #666;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

.btn-clear:hover {
    color: var(--color-primary);
}

/* Upcoming Card */
.upcoming-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 1.5rem;
}

.upcoming-card h3 {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.upcoming-item {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: background 0.3s;
}

.upcoming-item:hover {
    background: #e9ecef;
}

.upcoming-date {
    min-width: 50px;
    text-align: center;
}

.upcoming-date .day {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.upcoming-date .month {
    font-size: 0.7rem;
    color: #666;
    text-transform: uppercase;
}

.upcoming-info .topic {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.upcoming-info .speaker {
    font-size: 0.8rem;
    color: #666;
}

/* Timeline Section */
.lectures-timeline {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
}

.timeline-header {
    background: var(--color-primary);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.month-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.month-nav button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.month-nav button:hover {
    background: rgba(255,255,255,0.3);
}

.month-nav .current-month {
    font-weight: 600;
    min-width: 150px;
    text-align: center;
}

/* Calendar Grid */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.weekday {
    padding: 0.75rem;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
}

.calendar-grid {
    display: none;
}

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

.calendar-day {
    min-height: 100px;
    border: 1px solid #f0f0f0;
    padding: 0.5rem;
    cursor: pointer;
    transition: background 0.3s;
}

.calendar-day:hover {
    background: #f8f9fa;
}

.calendar-day.empty {
    background: #fafafa;
    cursor: default;
}

.calendar-day.today {
    background: #fff3cd;
    border-color: #ffc107;
}

.calendar-day.has-lecture {
    background: #e8f5e9;
}

.calendar-day .day-number {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.calendar-day.today .day-number {
    background: #ffc107;
    color: #333;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.calendar-day .lecture-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    margin-right: 3px;
}

.calendar-day .lecture-preview {
    font-size: 0.7rem;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Lectures List */
.lectures-list {
    padding: 1.5rem;
}

.lectures-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.lectures-list-header h3 {
    margin: 0;
    color: var(--color-primary);
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-toggle button {
    padding: 0.5rem 1rem;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.view-toggle button.active {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

/* Day Group */
.day-group {
    margin-bottom: 2rem;
}

.day-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.day-header .date-badge {
    background: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    text-align: center;
    min-width: 70px;
}

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

.day-header .date-badge .month {
    font-size: 0.75rem;
    text-transform: uppercase;
}

.day-header .day-name {
    font-size: 1.1rem;
    color: #666;
}

.day-header.is-today .date-badge {
    background: #ff6b6b;
}

/* Lecture Card */
.lecture-card {
    display: flex;
    gap: 1.5rem;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    transition: all 0.3s;
    border-left: 4px solid var(--color-primary);
}

.lecture-card:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.lecture-card.is-past {
    opacity: 0.6;
    border-left-color: #ccc;
}

.lecture-card.is-today {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.lecture-time {
    min-width: 80px;
    text-align: center;
}

.lecture-time .time {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
}

.lecture-time .duration {
    font-size: 0.75rem;
    color: #888;
}

.lecture-content {
    flex: 1;
}

.lecture-content .topic {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.3rem;
}

.lecture-content .reference {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--color-primary);
    color: white;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.lecture-content .speaker {
    color: #666;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lecture-content .speaker i {
    color: var(--color-accent);
}

/* YouTube Button */
.youtube-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    background: #FF0000;
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.youtube-btn:hover {
    background: #CC0000;
    transform: scale(1.05);
}

.youtube-btn i {
    font-size: 1rem;
}

.lecture-youtube {
    display: flex;
    align-items: center;
    padding-left: 1rem;
}

.lecture-youtube .youtube-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 0, 0, 0.1);
    color: #FF0000;
    border-radius: 50%;
    font-size: 1.3rem;
    transition: all 0.3s;
}

.lecture-youtube .youtube-link:hover {
    background: #FF0000;
    color: white;
    transform: scale(1.1);
}

/* Empty State */
.empty-lectures {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.empty-lectures i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-lectures h3 {
    margin: 0 0 0.5rem;
    color: #333;
}

/* Loading */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 992px) {
    .lectures-main {
        grid-template-columns: 1fr;
    }

    .lectures-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .lectures-sidebar {
        grid-template-columns: 1fr;
    }

    .today-lectures {
        grid-template-columns: 1fr;
    }

    .calendar-weekdays {
        display: none;
    }

    .lecture-card {
        flex-direction: column;
        gap: 0.75rem;
    }

    .lecture-time {
        display: flex;
        gap: 1rem;
        text-align: left;
    }
}

@media (max-width: 576px) {
    .lectures-hero h1 {
        font-size: 1.8rem;
    }

    .timeline-header {
        flex-direction: column;
        gap: 1rem;
    }
}
