/* ==========================================================================
   TIS FEE PAGE - FULL DNA V3 SYSTEM (MAY 2026)
   ========================================================================== */

:root {
    --navy: #00008A;
    --orange: #ee5421;
    --light: #f8f9fa;
    --text-dark: #111;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Hệ thống Radius đồng bộ cho trang Biểu phí */
    --radius-fee-sm: 8px;
    --radius-fee-md: 18px;
    --radius-fee-lg: 30px;
}

.tis-fee-v3 { 
    font-family: 'Montserrat', sans-serif; 
    color: var(--text-dark); 
    background: #fff; 
    overflow-x: hidden; 
}

.container { max-width: 1200px; margin: auto; padding: 0 25px; }
.sec-p { padding: 100px 0; }

/* 1. HERO SECTION */
.fee-hero { display: flex; gap: 80px; align-items: center; }
.fee-hero-img { flex: 0.9; position: relative; }
.fee-hero-img img { 
    width: 100%; 
    border-radius: var(--radius-fee-lg);
    box-shadow: 20px 20px 60px rgba(0,0,138,0.1); 
}

.fee-hero-text { flex: 1.1; }
.fee-hero-text h1 { 
    font-size: 52px; font-weight: 900; color: var(--navy); 
    margin-bottom: 25px; line-height: 1.1; text-transform: uppercase;
}
.fee-hero-text p { 
    font-size: 16px; margin-bottom: 30px; text-align: justify; 
    border-left: 5px solid var(--orange); padding-left: 20px; 
}

.btn-group-v3 { display: flex; gap: 20px; }
.btn-v3 {
    padding: 18px 35px; font-weight: 900; text-transform: uppercase;
    letter-spacing: 1px; transition: var(--transition-smooth);
    border-radius: var(--radius-fee-sm); cursor: pointer;
    text-decoration: none; display: inline-block;
}
.btn-navy { background: var(--navy); color: #fff; border: 2px solid var(--navy); }
.btn-orange { background: var(--orange); color: #fff; border: 2px solid var(--orange); }
.btn-v3:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,138,0.2); }

/* 2. TABS NAVIGATION */
.fee-tabs { display: flex; gap: 12px; margin-bottom: 30px; flex-wrap: wrap; }
.tab-btn {
    padding: 14px 28px; border: 1px solid #eee; background: #fff;
    cursor: pointer; font-weight: 800; text-transform: uppercase;
    font-size: 13px; letter-spacing: 1px; border-radius: var(--radius-fee-sm);
    transition: 0.3s; color: var(--navy);
}
.tab-btn.active { background: var(--navy); color: white; border-color: var(--navy); }

/* 3. MAIN FEE TABLE - FIX DÀN TRẢI & NHẢY DÒNG */
.table-container-v3 { 
    background: #fff; 
    box-shadow: 0 30px 70px rgba(0,0,0,0.06); 
    border-radius: var(--radius-fee-md); 
    overflow-x: auto; /* Cuộn ngang cho màn hình nhỏ */
    border: 1px solid #eee;
    margin-top: 30px;
}

.table-v3 { 
    width: 100%; border-collapse: separate; border-spacing: 0;
    min-width: 1100px; /* Ép bảng đủ rộng để số không bị rớt dòng */
}

.table-v3 th { 
    background: var(--navy); color: #fff; padding: 22px 10px; 
    text-align: center; font-weight: 900; text-transform: uppercase;
    font-size: 11px; border-bottom: 1px solid rgba(255,255,255,0.1);
    border-right: 1px solid rgba(255,255,255,0.1); vertical-align: middle;
}

/* Bo tròn góc cho bảng */
.table-v3 tr:first-child th:first-child { border-top-left-radius: var(--radius-fee-md); }
.table-v3 tr:first-child th:last-child { border-top-right-radius: var(--radius-fee-md); border-right: none; }

.table-v3 td { 
    padding: 18px 12px; border-bottom: 1px solid #eee; border-right: 1px solid #eee;
    font-weight: 600; font-size: 14px; text-align: center; color: #333;
    white-space: nowrap; /* Giữ con số trên một hàng */
}

.table-v3 td:first-child { width: 100px; background: #fcfcfc; font-weight: 800; }
.table-v3 td:last-child { border-right: none; }

/* Bo tròn góc dưới của bảng */
.table-v3 tr:last-child td:first-child { border-bottom-left-radius: var(--radius-fee-md); }
.table-v3 tr:last-child td:last-child { border-bottom-right-radius: var(--radius-fee-md); }

/* 4. INCLUDED CARDS */
.include-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 50px; }
.include-card-v3 { 
    height: 450px; position: relative; overflow: hidden; 
    border-radius: var(--radius-fee-md); 
}
.include-card-v3 img { width: 100%; height: 100%; object-fit: cover; transition: 0.6s; }
.include-overlay-v3 { 
    position: absolute; inset: 0; padding: 40px;
    background: linear-gradient(to top, rgba(0,0,138,0.9) 20%, transparent); /* Không dùng màu nâu */
    display: flex; flex-direction: column; justify-content: flex-end; color: #fff;
}
.include-overlay-v3 h3 { font-size: 24px; font-weight: 900; margin-bottom: 15px; text-transform: uppercase; }
.include-overlay-v3 p { font-size: 14px; margin: 0; opacity: 0.9; line-height: 1.6; }
.include-card-v3:hover img { transform: scale(1.1); }

/* 5. POLICY SECTION */
.policy-v3 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 50px; }
.policy-box { 
    padding: 70px; color: #fff; min-height: 500px; 
    display: flex; flex-direction: column; justify-content: center; 
    border-radius: var(--radius-fee-lg); overflow: hidden;
}
.policy-box.discount { 
    background: linear-gradient(rgba(0,0,138,0.85), rgba(0,0,138,0.85)), url('https://tis.edu.vn/wp-content/uploads/2024/05/bg-policy.jpg') center/cover; 
}
.policy-box.admission { background: var(--light); color: var(--navy); border: 1px solid #eee; }

.policy-box h2 { font-size: 36px; font-weight: 900; text-transform: uppercase; margin-bottom: 30px; }
.policy-item-v3 { margin-bottom: 25px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 15px; }
.policy-box.admission .policy-item-v3 { border-bottom: 1px solid #ddd; }
.policy-item-v3 span { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; color: var(--orange); }
.policy-item-v3 strong { font-size: 20px; font-weight: 900; display: block; margin-top: 5px; }

/* 6. RESPONSIVE & UTILS */
@media (max-width: 991px) {
    .fee-hero, .policy-v3, .include-grid { grid-template-columns: 1fr; flex-direction: column; }
    .policy-box { padding: 40px; margin-bottom: 20px; }
    .fee-hero-text h1 { font-size: 34px; }
    .sec-p { padding: 60px 0; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.tab-content.active { animation: fadeIn 0.5s ease; display: block; }
.tab-content { display: none; }

/* Custom Scrollbar */
.table-container-v3::-webkit-scrollbar { height: 8px; }
.table-container-v3::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }
.table-container-v3::-webkit-scrollbar-thumb:hover { background: var(--navy); }

/* Main Tabs Program */
.program-tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 40px; }
.p-tab-btn { padding: 15px 25px; border: 2px solid var(--navy); background: none; cursor: pointer; font-weight: 700; border-radius: 50px; transition: 0.3s; color: var(--navy); }
.p-tab-btn.active { background: var(--navy); color: white; }

/* Content Sections */
.program-content { display: none; animation: fadeIn 0.5s; }
.program-content.active { display: block; }

/* Sub Tabs for Levels */
.level-tabs { display: flex; gap: 10px; margin-bottom: 20px; border-bottom: 1px solid #ddd; padding-bottom: 10px; }
.l-tab-btn { padding: 8px 15px; border: none; background: #eee; cursor: pointer; font-weight: 600; border-radius: 5px; }
.l-tab-btn.active { background: var(--orange); color: white; }

/* Tables */
.table-container { overflow-x: auto; margin-top: 20px; }
table { width: 100%; border-collapse: collapse; background: white; border-radius: 10px; overflow: hidden; }
th { background: var(--navy); color: white; padding: 15px; text-align: center; border: 1px solid #eee; font-size: 13px; }
td { padding: 12px; border: 1px solid #eee; text-align: center; font-size: 14px; }
.fw-bold { font-weight: 700; }
.highlight { background: #fff5f0; color: var(--orange); font-weight: 800; }

/* Other Styles */
.policy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.policy-card { background: white; padding: 30px; border-radius: 15px; border-top: 5px solid var(--orange); shadow: 0 10px 30px rgba(0,0,0,0.05); }
.btn-v3 { display: inline-block; padding: 15px 30px; border-radius: 50px; font-weight: 700; text-decoration: none; transition: 0.3s; }
.btn-orange { background: var(--orange); color: white; }
.btn-navy { background: var(--navy); color: white; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 768px) { .fee-hero { flex-direction: column; } .fee-hero-img { height: 250px; width: 100%; } }