/* Container */
.vn-event-wrapper {
    display: flex; flex-wrap: wrap; gap: 30px;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; margin-top: 40px;
}

/* --- CỘT TRÁI (SIDEBAR) --- */
.vn-event-sidebar {
    flex: 0 0 400px; 
    background: #f5f6f8;
    padding: 25px;
    border-radius: 16px;
    height: fit-content; /* Để không bị giãn dài theo cột phải */
}

/* Nav Năm */
.vn-year-nav {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 25px; padding: 0 5px;
}
.vn-current-year { font-size: 36px; font-weight: 300; color: #222; }
.vn-year-actions { display: flex; align-items: center; gap: 10px; }
.vn-year-btn {
    width: 36px; height: 36px; border-radius: 50%; border: none;
    background: #fff; cursor: pointer; color: #333;
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s; box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.vn-year-btn:hover { background: #fff; transform: scale(1.1); box-shadow: 0 4px 8px rgba(0,0,0,0.1); }

/* Grid Tháng */
.vn-month-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px;
}

/* Item Tháng */
.vn-month-item {
    border-radius: 50px;
    padding: 8px 15px 8px 10px;
    display: flex; align-items: center; justify-content: space-between;
    cursor: pointer; transition: all 0.3s ease;
    min-height: 40px;
    position: relative;
    border: 1px solid transparent;
}

.vn-month-left { display: flex; align-items: center; gap: 8px; }
.vn-m-icon-img { width: 24px; height: 24px; object-fit: contain; display: block; }
.vn-m-name { font-size: 14px; font-weight: 300; text-transform: uppercase; color: #999; }

/* Trạng thái */
.vn-month-item.disabled {
    background: #ebebeb; opacity: 0.5; pointer-events: none; filter: grayscale(100%);
}
.vn-month-item.disabled .vn-m-icon-img { display: none; }
.vn-month-item.disabled .vn-m-name { color: #333; margin-left: 5px; }

.vn-month-item.has-event {
    background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.vn-month-item.has-event .vn-m-name { color: #333; font-weight: 300; }
.vn-month-item.has-event:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

.vn-month-item.active {
    background: #d30026;
    background: linear-gradient(90deg, #d30026 0%, #ff0033 100%);
    color: #fff; box-shadow: 0 5px 15px rgba(211, 0, 38, 0.3);
}
.vn-month-item.active .vn-m-name { color: #fff; }
.vn-month-item.active .vn-m-count { color: #d30026; background: #fff; }

.vn-m-count {
    background: #eee; color: #555;
    font-size: 11px; font-weight: bold;
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

/* --- CỘT PHẢI (LIST SỰ KIỆN) --- */
.vn-event-content { flex: 1; min-width: 0; position: relative; } /* Sửa min-width để Swiper không bị lỗi */

/* Loader Icon */
.vn-event-loader {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    z-index: 10;
}
.vn-loader-icon {
    width: 40px; height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #d30026;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Slider container */
.vn-event-slider {
    width: 100%;
    padding-bottom: 48px !important; /* chỗ cho dots */
    overflow: hidden;
}

/* FIX: Set chiều rộng cho slide khi dùng slidesPerView: 'auto' */
.vn-event-slider .swiper-slide {
    width: 48%;
}

/* --- NAVIGATION BUTTONS --- */
.vn-event-nav-prev,
.vn-event-nav-next {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: #d30026 !important;
    box-shadow: 0 4px 14px rgba(211, 0, 38, 0.35);
    top: calc(50% - 24px) !important; /* trừ nửa chiều cao dots */
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.vn-event-nav-prev:hover,
.vn-event-nav-next:hover {
    background: #aa001e !important;
    box-shadow: 0 6px 18px rgba(211, 0, 38, 0.45);
}
.vn-event-nav-prev::after,
.vn-event-nav-next::after {
    font-size: 14px !important;
    font-weight: 700;
    color: #fff !important;
}
.vn-event-nav-prev.swiper-button-disabled,
.vn-event-nav-next.swiper-button-disabled {
    opacity: 0.35 !important;
    box-shadow: none;
}

/* --- PAGINATION DOTS --- */
.vn-event-pagination {
    bottom: 8px !important;
}
.vn-event-pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    background: #ccc;
    opacity: 1;
    transition: all 0.3s;
}
.vn-event-pagination .swiper-pagination-bullet-active {
    background: #d30026;
    width: 24px;
    border-radius: 4px;
}

/* --- XỬ LÝ KHI CHỈ CÓ 1 SỰ KIỆN (MỚI) --- */
.vn-event-card:only-child {
    grid-column: 1 / -1; /* Tràn hết số cột (Full width) */
    height: 400px; /* Tăng chiều cao lên cho cân đối */
}

/* Card Style */
.vn-event-card {
    display: block;
    height: 220px; 
    border-radius: 12px; 
    overflow: hidden; 
    position: relative;
    background-size: cover; 
    background-position: center; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: 0.3s;
    text-decoration: none !important;
    color: inherit;
}
.vn-event-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.vn-event-overlay { 
    position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; 
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 60%, transparent 100%); 
}

.vn-event-info { 
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 25px; 
    color: #fff; z-index: 2; box-sizing: border-box;
}

/* Typography trong Card */
.vn-e-date .label { font-size: 11px; opacity: 0.8; letter-spacing: 1px; text-transform: uppercase; color: #fff; }
.vn-e-date .value { 
    font-size: 32px; /* Font to cho ngày */
    font-weight: 300; 
    line-height: 1.2; 
    display: block; 
    color: #fff;
}

.vn-e-title { 
    margin: 10px 0 0; 
    font-size: 20px; 
    line-height: 1.4; 
    font-weight: 700; 
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.vn-e-title a { color: #fff; text-decoration: none; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }

/* Thông báo rỗng */
.vn-no-event { 
    width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; 
    background: #fff; border-radius: 12px; color: #888; min-height: 200px; border: 1px dashed #ddd;
}

/* --- RESPONSIVE --- */
@media (max-width: 991px) {
    .vn-event-wrapper { flex-direction: column; }
    .vn-event-sidebar { flex: auto; width: 100%; }
}
@media (max-width: 767px) {
    .vn-event-card:only-child { height: 250px; }
    .vn-event-slider .swiper-slide {
        width: 80%; /* Trên mobile hiển thị 1 slide và 1 phần slide kế tiếp */
    }
}