/* Style cho tab */
.schedule-tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap; /* Thêm cái này để tab không vỡ trên mobile */
}

.schedule-tab {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f8f8f8;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.schedule-tab.active {
    background: #e91e63;
    color: #fff;
    border-color: #e91e63;
}

/* Container */
.schedule-content {
    position: relative;
    /* overflow: hidden; -> Bỏ cái này để shadow không bị cắt */
}

/* Ẩn các container không hoạt động */
.schedule-container {
    display: none;
}

/* --- [SỬA 1] Kích hoạt chế độ cột (Masonry) --- */
.schedule-container.active {
    display: block;
    /* Chia thành 2 cột kiểu báo chí, item sẽ tự dồn lên */
    -webkit-column-count: 2;
    -moz-column-count: 2;
    column-count: 2;
    
    /* Khoảng cách giữa 2 cột */
    -webkit-column-gap: 20px;
    -moz-column-gap: 20px;
    column-gap: 20px;
}

/* Day Header */
.day-header {
    background: #0066ff;
    padding: 12px 15px;
    border-radius: 8px 8px 0px 0px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.day-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.schedule-description {
    color: #fff;
    font-size: 14px;
    margin: 0;
}

/* --- [SỬA 2] Item con: Bỏ float, chuyển sang inline-block --- */
.day-schedule-wrapper {
    margin-bottom: 30px;
    width: 100%; /* Chiều rộng là 100% của cột (không phải 48% nữa) */
    
    /* Reset float cũ */
    float: none; 
    margin: 0 0 30px 0;
    
    /* Quan trọng: Ngăn khối bị cắt đôi khi sang cột mới */
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
    
    /* Hiển thị kiểu khối nội dòng */
    display: inline-block; 
}

/* --- [SỬA 3] Bỏ flex-wrap cũ đi --- */
.schedule-columns {
    /* flex-wrap: wrap; -> Không cần nữa */
    /* gap: 20px; -> Khoảng cách do cha quản lý rồi */
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border: 1px solid #e5e5e5;
    overflow: hidden; /* Bo tròn góc dưới */
}

.schedule-column {
    /* flex: 1 1 calc(50% - 10px); -> Bỏ chia cột cũ */
    display: flex;
    flex-direction: column;
}

/* Session Card */
.session-card {
    display: flex;
    align-items: flex-start;
    background: #fff;
    border-bottom: 1px solid #e5e5e5; /* Đổi thành border bottom cho đẹp */
    padding: 25px;
    /* box-shadow: 0 2px 6px rgba(0,0,0,0.08); -> Bỏ shadow từng card, dùng shadow chung của columns */
    transition: all 0.3s ease;
}

/* Xóa viền dưới của card cuối cùng */
.session-card:last-child {
    border-bottom: none;
}

.session-card:hover {
    /* box-shadow: 0 4px 12px rgba(0,0,0,0.15); -> Có thể bỏ hoặc giữ */
    background-color: #f9f9f9; /* Hiệu ứng hover nhẹ */
}

.session-avatar {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    flex-shrink: 0; /* Giữ avatar không bị méo */
}

.session-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

.session-avatar .fas {
    font-size: 30px;
    color: #666;
}

.session-content {
    /* width: 85%; -> Dùng flex grow linh hoạt hơn */
    flex-grow: 1;
    padding-left: 15px;
}

.session-time {
    margin: 0 0 5px 0;
    font-size: 0.9em;
    color: #666;
}

.session-title {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #1d1d1d;
}

.session-speakers {
    margin: 0;
    font-size: 0.9em;
}

.speaker-name {
    color: #e91e63;
    font-weight: 500;
}

.speaker-position {
    color: #666;
    margin-left: 5px;
    font-style: italic;
}

/* Ngày tiêu đề */
.schedule-title {
    font-size: 20px;
    font-weight: 700;
    margin: 25px 0 15px;
    color: #222;
}

/* Responsive */
@media (max-width: 768px) {
    /* Chuyển về 1 cột trên mobile */
    .schedule-container.active {
        -webkit-column-count: 1;
        -moz-column-count: 1;
        column-count: 1;
    }
    
    .schedule-columns {
        flex-direction: column;
        gap: 0;
        padding: 0;
    }
    
    .day-schedule-wrapper {
        width: 100% !important;
        margin-bottom: 20px;
        display: block; /* Về block thường trên mobile */
    }

    .schedule-column {
        width: 100%;
    }

    .session-card {
        border-radius: 0;
        /* box-shadow: none; */
    }
}

/* --- Container cho Single Topic (Giữ nguyên gốc của bạn) --- */
.event-schedule-single {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
}

.single-topic-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

.single-schedule-content {
    position: relative;
}

.single-schedule-container {
    margin-bottom: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.single-day-header {
    background: #4CAF50; /* Màu xanh lá khác biệt với #0066ff */
    padding: 15px;
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.single-day-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.single-schedule-description {
    color: #fff;
    font-size: 14px;
    margin: 0;
}

.single-session-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    background-color: #fff;
}

.single-session-item {
    display: flex;
    align-items: flex-start;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.single-session-item:hover {
    background: #e8f5e9; /* Màu xanh nhạt khi hover */
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.single-session-avatar {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    margin-right: 15px;
}

.single-session-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #bbb;
}

.single-session-avatar .fas {
    font-size: 30px;
    color: #555;
}

.single-session-content {
    width: 85%;
    padding-left: 10px;
}

.single-session-time {
    margin: 0 0 5px 0;
    font-size: 0.9em;
    color: #555;
}

.single-session-title {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.single-session-speakers {
    margin: 0;
    font-size: 0.9em;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.single-speaker-name {
    color: #FF5722; /* Màu cam khác biệt với #e91e63 */
    font-weight: 500;
}

.single-speaker-position {
    color: #555;
    margin-left: 5px;
}

/* Responsive cho Single Topic */
@media (max-width: 768px) {
    .event-schedule-single {
        padding: 10px;
    }

    .single-session-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .single-session-avatar {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .single-session-content {
        width: 100%;
        padding-left: 0;
    }
}