/* 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: 300px; position: relative; }



/* GRID LAYOUT */

.vn-event-grid { 

    display: grid; 

    grid-template-columns: repeat(2, 1fr); /* Mặc định 2 cột */

    gap: 20px; 

}



/* --- 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; /* Quan trọng: Để thẻ a biến thành khối */

    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; /* Bỏ gạch chân link */

    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: 15px; 

    color: #fff; z-index: 2; box-sizing: border-box; background-color: #0000004a;

}



/* 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: 18px; /* Font to cho ngày */

    font-weight: 300; 

    line-height: 1.2; 

    display: block; 

    color: #61c2b8;

}



.vn-e-title { 

    margin: 10px 0 0; 

    font-size: 17px; 

    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%; }

    

    .vn-event-grid { grid-template-columns: 1fr; } /* Mobile về 1 cột */

    

    /* Mobile: Dù 1 hay nhiều bài cũng chỉ cao vừa phải */

    .vn-event-card:only-child { height: 250px; } 

}

/* --- LOADING SPINNER --- */
.vn-event-content { 
    position: relative; /* Đảm bảo wrapper định vị đúng loader */
    min-height: 250px; 
}

.vn-event-loader {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(255, 255, 255, 0.7); /* Phủ mờ trắng */
    backdrop-filter: blur(2px);
    z-index: 10;
    display: flex; 
    align-items: center; 
    justify-content: center;
    border-radius: 12px;
}

.vn-spinner {
    width: 40px; 
    height: 40px;
    border: 4px solid #f3f3f3; 
    border-top: 4px solid #d30026; /* Màu đỏ của bạn */
    border-radius: 50%;
    animation: vn-spin 1s linear infinite;
}

@keyframes vn-spin { 
    0% { transform: rotate(0deg); } 
    100% { transform: rotate(360deg); } 
}

/* --- FIX ICON MŨI TÊN CHUYỂN NĂM --- */
.vn-year-btn { font-size: 16px; color: #555; font-weight: bold; }

/* --- CẤU TRÚC CUSTOM SLIDER 4 Ô --- */
.vn-custom-slider { position: relative; width: 100%; }

.vn-event-page {
    display: none; /* Mặc định ẩn tất cả các trang */
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    animation: vnFadeIn 0.5s ease-in-out;
}

.vn-event-page.active {
    display: grid; /* Chỉ hiện trang được active */
}

@keyframes vnFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Nút điều hướng Slider (Chấm & Mũi tên) */
.vn-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.vn-s-btn {
    width: 36px; height: 36px;
    border-radius: 50%; border: none;
    background: #fff; color: #d30026;
    font-size: 14px; cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: 0.3s;
}
.vn-s-btn:hover:not(:disabled) { background: #d30026; color: #fff; }
.vn-s-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.vn-s-dots { display: flex; gap: 8px; }
.vn-dot {
    width: 10px; height: 10px;
    background: #ccc; border-radius: 50%;
    cursor: pointer; transition: 0.3s;
}
.vn-dot.active { background: #d30026; width: 25px; border-radius: 10px; }

/* Xóa dòng này nếu đã có ở trên: .vn-event-grid { display: grid; ... } vì giờ ta dùng .vn-event-page */