/* ===========================
   EVENT PAGE CONTAINER
=========================== */

.container {
	padding: 100px 20px 100px;
}

.container h2 {
	text-align: center;
	margin-bottom: 30px;
}

.year-section {
	margin-bottom: 60px;
}

.year-section h3 {
	margin-bottom: 20px;
	color: black;
	text-align: center;
}

/* ===========================
   EVENT CARD GRID
=========================== */

.event {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 20px;
}

.event-card {
    background: white;
    border-radius: 10px;
    text-align: center;
    padding: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
	border: 1px solid #1a1a1a;
	opacity: 0;
    transform: translateY(30px) scale(0.95);
    animation: bounceUp 0.9s ease-out forwards;
}

/* 19 张卡片的阶梯式延迟 */
.event-card:nth-child(1) { animation-delay: 0.05s; }
.event-card:nth-child(2) { animation-delay: 0.10s; }
.event-card:nth-child(3) { animation-delay: 0.15s; }
.event-card:nth-child(4) { animation-delay: 0.20s; }
.event-card:nth-child(5) { animation-delay: 0.25s; }
.event-card:nth-child(6) { animation-delay: 0.30s; }
.event-card:nth-child(7) { animation-delay: 0.35s; }
.event-card:nth-child(8) { animation-delay: 0.40s; }
.event-card:nth-child(9) { animation-delay: 0.45s; }
.event-card:nth-child(10) { animation-delay: 0.50s; }
.event-card:nth-child(11) { animation-delay: 0.55s; }
.event-card:nth-child(12) { animation-delay: 0.60s; }
.event-card:nth-child(13) { animation-delay: 0.65s; }
.event-card:nth-child(14) { animation-delay: 0.70s; }
.event-card:nth-child(15) { animation-delay: 0.75s; }
.event-card:nth-child(16) { animation-delay: 0.80s; }
.event-card:nth-child(17) { animation-delay: 0.85s; }
.event-card:nth-child(18) { animation-delay: 0.90s; }
.event-card:nth-child(19) { animation-delay: 0.95s; }

/* 弹跳动画 */
@keyframes bounceUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    60% {
        opacity: 1;
        transform: translateY(-6px) scale(1.03);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.event-card img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 10%;
    margin-bottom: 10px;
    display: block;
    margin: 0 auto 10px;
}

.event-card h4 {
    margin: auto;
    color: #1a2288;
	height: 80px;
	display: flex;
	justify-content: center;
	align-items: center;
	text-align: center;
}

.event-card p {
    color: #555;
    margin: 0;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

/* Button */
.btn {
	margin-top: 10px;
	display: inline-block;
	padding: 8px 20px;
	background-color: #1a2288;
	color: white;
	text-decoration: none;
	border-radius: 20px;
	transition: background 0.3s;
    cursor: pointer;
}

.btn:hover {
	background-color: #4754bd;
}

/* ===========================
       MODAL OVERLAY
=========================== */

.modal {
    display: none;
    position: fixed;
    z-index: 9999999 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(3px);
    overflow-y: auto;
    padding: 40px 0;
}

/* Hide scrollbar */
.modal::-webkit-scrollbar {
    display: none;
}

/* ===========================
       MODAL CARD BOX
=========================== */

.modal-content {
    width: 85%;
    max-width: 950px;
    background: white;
    margin: auto;
    border-radius: 22px;
    padding: 0 0 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    position: relative;
    animation: fadeIn 0.25s ease-in-out;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===========================
       HEADER SECTION
=========================== */

.modal-header {
    background: #99b6f4;
    padding: 25px 64px 18px;
    border-radius: 22px 22px 0 0;
    text-align: center;
}

.modal-header h3 {
    color: #0c0e29;
    margin: 0;
}

/* ===========================
      CLOSE BUTTON (ROUND)
=========================== */

.close-btn {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 40px;
    height: 40px;
    background: #deeaff;
    border-radius: 50%;
    border: 2px solid #c9daf9;
    color: #0d1364;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s ease;
}

.close-btn:hover {
    background: #6890cd;
    transform: scale(1.1);
}

/* ===========================
      MAIN IMAGE / VIDEO
=========================== */

.modal-main-media {
    margin-top: 18px;
    text-align: center;
}

.modal-main-image,
.modal-main-video {
    display: block;
    margin: 0 auto;
    width: 55%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 12px;
}

/* prevent all images inside modal from being forced to full width */
.modal-content img {
    max-width: none !important;
}

/* ===========================
      DESCRIPTION TEXT
=========================== */

.modal-description {
    padding: 0 40px;
    color: #333;
    margin-top: 20px;
    text-align: left;
}

.modal-description p {
    margin-bottom: 1.2rem; 
}

/* ===========================
      GALLERY GRID
=========================== */

.modal-gallery {
    padding: 0 40px;
    margin: 25px auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    grid-gap: 14px;
}

.gallery-img {
    width: 100%;
    height: 130px;
    border-radius: 12px;
    object-fit: cover;
    cursor: pointer;
    transition: 0.25s;
}

.gallery-img:hover {
    transform: scale(1.05);
}
