/* หน้าแรก: ปฏิทินการประชุม (เขียนทับ FullCalendar — ต้องโหลดหลัง main.min.css) + ภาพกิจกรรม */

/* ══ ปฏิทินการประชุม ═════════════════════════════════════ */
/* === GLASSMORPHISM PREMIUM CALENDAR === */

/* Scrollbar for upcoming list */
#upcomingEventsList::-webkit-scrollbar { width: 4px; }
#upcomingEventsList::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

#meetingCalendar {
    font-family: 'Sarabun', sans-serif;
    --fc-border-color: rgba(0, 51, 102, 0.1);
    --fc-daygrid-event-dot-width: 8px;
    --fc-today-bg-color: rgba(255, 215, 0, 0.1);
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: transparent;
}

/* Transparent base */
.fc-theme-bootstrap5 .fc-scrollgrid,
.fc-scrollgrid {
    border: none !important;
}
.fc-scrollgrid-section > * {
    border-top: none !important;
}

/* Header Toolbar */
.fc-toolbar-title {
    font-weight: 700 !important;
    color: #003366 !important;
    font-size: 1.4rem !important;
}
/* จอมือถือ: แถบปุ่มปฏิทินเดิมยาวเกินกรอบ (~90px ที่จอ 375px) — ให้ชื่อเดือนขึ้นบรรทัดบนสุด ปุ่มแตกบรรทัดตรงกลาง */
@media (max-width: 576px) {
    .fc .fc-header-toolbar {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
    .fc .fc-header-toolbar .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
    }
    .fc .fc-header-toolbar .fc-toolbar-chunk:nth-child(2) {
        order: -1;
        width: 100%;
    }
    .fc-toolbar-title {
        font-size: 1.15rem !important;
    }
    .fc .fc-button-primary {
        padding: 5px 10px;
        font-size: .85rem;
    }
}

.fc .fc-button-primary {
    background: linear-gradient(135deg, #003366 0%, #004a99 100%) !important;
    backdrop-filter: none;
    border: none !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    padding: 6px 14px;
    box-shadow: 0 3px 10px rgba(0,51,102,0.2);
}

.fc .fc-button-primary:hover {
    background: linear-gradient(135deg, #004a99 0%, #003366 100%) !important;
    border-color: transparent !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,51,102,0.3);
}

.fc .fc-button-primary:not(:disabled):active,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background: #ffd700 !important;
    color: #003366 !important;
    border-color: transparent !important;
    box-shadow: inset 0 3px 5px rgba(0,0,0,0.15) !important;
}

/* Column Headers (Days of week) */
.fc-col-header-cell {
    background: rgba(0, 51, 102, 0.04);
    padding: 10px 0;
    border-color: rgba(0, 51, 102, 0.1) !important;
}

.fc-col-header-cell-cushion {
    color: #003366 !important;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
}

/* Day Cells */
.fc-daygrid-day {
    border-color: rgba(0,51,102,0.07) !important;
    transition: background 0.2s;
}
.fc-daygrid-day:hover {
    background: rgba(0,51,102,0.03);
}

.fc-daygrid-day-number {
    color: #2c3e50;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 8px !important;
    text-decoration: none;
    transition: all 0.3s;
    margin: 4px;
    text-shadow: none;
}

.fc-daygrid-day-number:hover {
    color: #003366;
    background: rgba(0,51,102,0.08);
    border-radius: 50%;
}

/* Weekend days red tint */
.fc-day-sat .fc-daygrid-day-number,
.fc-day-sun .fc-daygrid-day-number {
    color: #dc3545;
}

/* Today Highlight - Glowing Gold */
.fc-day-today {
    background: rgba(255,215,0,0.06) !important;
}
.fc-day-today .fc-daygrid-day-number {
    background: linear-gradient(135deg, #ffd700 0%, #ffb300 100%);
    color: #003366 !important;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.6), 0 0 24px rgba(255,215,0,0.2);
    animation: todayPulse 2.5s ease-in-out infinite;
}

@keyframes todayPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 215, 0, 0.6), 0 0 24px rgba(255,215,0,0.2); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.9), 0 0 40px rgba(255,215,0,0.4); }
}

/* Events - Glass style bars */
.fc-event {
    cursor: pointer;
    border: none !important;
    border-radius: 8px !important;
    padding: 3px 8px;
    font-size: 0.82em;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    margin: 2px 4px !important;
    filter: brightness(1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.fc-event:hover {
    transform: translateY(-3px) scale(1.03);
    filter: brightness(1.15);
    box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    z-index: 5;
}

.fc-event-main {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

/* List view */
.fc-list {
    background: transparent !important;
    border: none !important;
}
.fc-list-event td {
    color: #444 !important;
    border-color: rgba(0,51,102,0.08) !important;
    background: transparent !important;
}
.fc-list-day-cushion {
    background: rgba(0,51,102,0.05) !important;
    color: #003366 !important;
    font-weight: 700;
}
.fc-list-event:hover td {
    background: rgba(0,51,102,0.04) !important;
}
.fc-list-empty {
    background: transparent !important;
    color: #999;
}

/* Time grid week view */
.fc-timegrid-slot {
    border-color: rgba(0,51,102,0.06) !important;
}
.fc-timegrid-axis {
    color: #888 !important;
    font-size: 0.78rem;
}

/* Upcoming Events Sidebar - Light cards */
.upcoming-glass-card {
    background: #f8fafc;
    border: 1px solid rgba(0,51,102,0.1);
    border-radius: 12px;
    padding: 12px 14px;
    transition: all 0.25s ease;
    cursor: pointer;
}
.upcoming-glass-card:hover {
    background: #f0f4f8;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,51,102,0.1);
    border-color: rgba(0,51,102,0.2);
}
.upcoming-glass-card .event-date-badge {
    min-width: 60px;
    border-radius: 10px;
    text-align: center;
    padding: 8px 10px;
    color: #fff;
}
.upcoming-glass-card .event-title {
    color: #1a2d4e;
    font-weight: 600;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.upcoming-glass-card .event-time {
    color: #6c7a8d;
    font-size: 0.78rem;
}

/* Filter dropdown - light style */
#calendarFilterMenu {
    background: #fff !important;
    border: 1px solid rgba(0,51,102,0.12) !important;
    border-radius: 12px !important;
}
#calendarFilterMenu .dropdown-item {
    color: #333 !important;
    border-radius: 8px;
    margin: 2px 4px;
}
#calendarFilterMenu .dropdown-item:hover,
#calendarFilterMenu .dropdown-item.active {
    background: rgba(0,51,102,0.08) !important;
    color: #003366 !important;
}
#calendarFilterMenu .dropdown-divider {
    border-color: rgba(0,51,102,0.1);
}
.meeting-section { background: #f8fafc; position: relative; overflow: hidden; }
.meeting-blob { position: absolute; border-radius: 50%; pointer-events: none; }
.meeting-blob-tr { top: -80px; right: -80px; width: 300px; height: 300px; background: radial-gradient(circle, rgba(0,51,102,0.04) 0%, transparent 70%); }
.meeting-blob-bl { bottom: -60px; left: -60px; width: 250px; height: 250px; background: radial-gradient(circle, rgba(55,136,216,0.05) 0%, transparent 70%); }
.meeting-header { position: relative; z-index: 1050; }
.meeting-card { border: 1px solid rgba(0,51,102,0.08); box-shadow: 0 4px 24px rgba(0,51,102,0.08); }
.meeting-watermark { top: -20px; right: -20px; font-size: 8rem; color: rgba(0,51,102,0.03); z-index: 0; pointer-events: none; }
.meeting-upcoming-title { z-index: 1; color: #003366; }
/* การ์ด "กำลังจะมาถึง" ยกขึ้นเมื่อชี้ (เดิม JS ใส่ <style> เองแต่ถูก CSP บล็อก จึงไม่เคยทำงาน) */
.hover-lift:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important; }

/* ══ ภาพกิจกรรม ══════════════════════════════════════════ */
/* Premium Accordion Gallery Styles */
#activity-gallery-section .activity-gallery {
    display: flex;
    gap: 15px;
    height: 450px;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    padding: 5px;
}

#activity-gallery-section .activity-item {
    position: relative;
    border-radius: 15px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    flex: 1;
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    filter: grayscale(80%);
}

#activity-gallery-section .activity-item.active,
#activity-gallery-section .activity-item:hover {
    flex: 4;
    filter: grayscale(0%);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

#activity-gallery-section .activity-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 50%);
    opacity: 0.6;
    transition: opacity 0.4s ease;
}

#activity-gallery-section .activity-item:hover::before,
#activity-gallery-section .activity-item.active::before {
    opacity: 0.8;
}

#activity-gallery-section .activity-content {
    position: absolute;
    bottom: 25px;
    left: 25px;
    right: 25px;
    color: white;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    transition-delay: 0.1s;
}

#activity-gallery-section .activity-item:hover .activity-content,
#activity-gallery-section .activity-item.active .activity-content {
    opacity: 1;
    transform: translateY(0);
}

#activity-gallery-section .activity-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    color: #ffd700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#activity-gallery-section .activity-desc {
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    #activity-gallery-section .activity-gallery {
        flex-direction: column;
        height: 600px;
    }
    #activity-gallery-section .activity-item {
        filter: grayscale(0%); /* Disable grayscale on mobile for better visibility */
    }
}
