/* หน้างานรับเข้าและแนะแนว (pages/admission.php)
 * hero อยู่ใน page-hero.css · ตารางค่าธรรมเนียมใช้ DataTables (CSS ของ DataTables โหลดท้ายหน้า)
 * ลำดับหมวดคงตามโค้ดเดิม
 */

/* ══ แบนเนอร์สมัครเรียน + ลิงก์ด่วน + แท็บค่าธรรมเนียม ═════════════ */
/* CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, #003366 0%, #0052a3 50%, #0066cc 100%);
    box-shadow: 0 20px 60px rgba(0, 51, 102, 0.3);
}

.cta-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 215, 0, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(0, 198, 255, 0.15) 0%, transparent 40%);
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 10px 40px rgba(255, 215, 0, 0.6);
    }
}

/* Gradient Quick Links */
.quick-link-gradient {
    border-radius: 16px;
    padding: 30px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.quick-link-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.quick-link-gradient:hover::before {
    opacity: 1;
}

.quick-link-gradient:hover {
    transform: translateY(-10px);
}

.ql-blue {
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%);
}

.ql-purple {
    background: linear-gradient(135deg, #5b21b6 0%, #8b5cf6 100%);
}

.ql-green {
    background: linear-gradient(135deg, #047857 0%, #10b981 100%);
}

.ql-orange {
    background: linear-gradient(135deg, #d97706 0%, #fbbf24 100%);
}

/* Fee Tabs Styling */
#feeTabs .nav-link {
    color: #003366;
    transition: all 0.3s ease;
}

#feeTabs .nav-link:hover {
    background: rgba(0, 51, 102, 0.1);
    transform: translateY(-2px);
}

#feeTabs .nav-link.active {
    background: linear-gradient(135deg, #003366 0%, #001a33 100%) !important;
    color: white !important;
    box-shadow: 0 8px 25px rgba(0, 51, 102, 0.3);
}

#feeTabs .nav-link.active i {
    color: #ffd700 !important;
}

/* ══ กำหนดการ TCAS (เส้นเวลา) ═════════════════════════════ */
.timeline-item.is-closed .timeline-content { opacity: .6; }
.tcas-timeline {
    position: relative;
    padding: 20px 0;
    /* การ์ดเลื่อนเข้าจากซ้าย/ขวา (AOS) ล้นขอบก่อนแอนิเมชันเล่น → ทำให้ทั้งหน้าเลื่อนแนวนอนได้ */
    overflow-x: hidden;
    overflow-x: clip;
    overflow-clip-margin: 24px;
}

.tcas-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #003366, #ffd700);
    border-radius: 2px;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
    text-align: right;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: 80px;
    margin-left: 0;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 80px;
}

.timeline-badge {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.timeline-content {
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    flex: 1;
    max-width: 45%;
}

@media (max-width: 768px) {
    .tcas-timeline::before {
        left: 25px;
    }

    .timeline-item,
    .timeline-item:nth-child(odd) {
        flex-direction: row;
        text-align: left;
    }

    .timeline-badge {
        left: 25px;
    }

    .timeline-content,
    .timeline-item:nth-child(odd) .timeline-content {
        margin-left: 80px !important;
        margin-right: 0 !important;
        max-width: 100%;
    }
}

/* ══ เอกสารงานรับเข้า ═══════════════════════════════════ */
/* Document Tab Navigation */
#admDocTabs .nav-link {
    background: rgba(0, 51, 102, 0.05);
    border: 2px solid transparent;
    color: #003366;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#admDocTabs .nav-link:hover {
    background: rgba(0, 51, 102, 0.1);
    transform: translateY(-2px);
}

#admDocTabs .nav-link.active {
    background: linear-gradient(135deg, #003366 0%, #001a33 100%);
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 5px 15px rgba(0, 51, 102, 0.3);
}

/* ══ แผนรับนักศึกษา ════════════════════════════════════ */
.plan-col-round { width: 15%; }
.plan-col-count { width: 25%; }

/* ══ สถิตินักศึกษา (การ์ดเลื่อนวน) ══════════════════════════ */
.stats-marquee-wrapper {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 10px 0;
}

.stats-marquee-wrapper::before,
.stats-marquee-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}

.stats-marquee-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #fff, transparent);
}

.stats-marquee-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #fff, transparent);
}

.stats-marquee-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: statsMarqueeScroll 30s linear infinite;
}

.stats-marquee-track:hover {
    animation-play-state: paused;
}

.stats-marquee-card {
    flex: 0 0 auto;
    width: 240px;
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-marquee-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

@keyframes statsMarqueeScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ══ ตารางรับเข้า ป.ตรี แยกรอบ TCAS ═══════════════════════ */
.tcas-round-head { background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.tcas-round-table thead th { background: #eef4fb; color: #003366; font-weight: 600; white-space: nowrap; }
.tcas-round-table tfoot td { background: #f8fafc; }
.tcas-round-row[role="button"] { cursor: pointer; }
.tcas-round-row[role="button"]:hover td, .tcas-round-row[aria-expanded="true"] td { background: #f1f5f9; }
.tcas-round-row:focus-visible { outline: 2px solid #ffd700; outline-offset: -2px; }
.tcas-round-row.is-now td { background: #fefce8; }
.tcas-round-row.is-upcoming td { color: #94a3b8; }
.tcas-caret { color: #94a3b8; font-size: .75rem; transition: transform .2s; width: 12px; }
.tcas-round-row[aria-expanded="true"] .tcas-caret { transform: rotate(90deg); color: #003366; }
.tcas-fac-row td { background: #fff; border-top: 0; padding-top: .35rem; padding-bottom: .35rem; }
@media (max-width: 576px) {
    .tcas-round-table { font-size: .85rem; }
    .tcas-round-table thead th { white-space: normal; font-size: .8rem; }
    .tcas-round-table td, .tcas-round-table th { padding: .5rem .35rem; }
}

/* ══ สถิตินักศึกษารับเข้า ═════════════════════════════════ */
.intake-kpi { background: linear-gradient(135deg, #003366 0%, #001a33 100%); border-radius: 16px; padding: 20px; text-align: center; color: #fff; height: 100%; }
.intake-kpi-value { font-size: 2.2rem; font-weight: 700; color: #ffd700; line-height: 1.2; }
.intake-kpi-label { color: rgba(255,255,255,0.85); font-size: 0.95rem; }
.intake-charts { background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.intake-chart-box { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 16px; height: 100%; }
.intake-chart-title { font-weight: 700; color: #003366; margin-bottom: 12px; }
.intake-donut-center { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.intake-table .intake-faculty-row td { background: #eef4fb; color: #003366; }
.intake-table tfoot td { background: #f8fafc; }
.intake-kpi-paid { background: linear-gradient(135deg, #047857 0%, #064e3b 100%); }
.intake-kpi-paid .intake-kpi-value { color: #fff; }
.intake-table .intake-paid { color: #047857; }
.intake-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.intake-filter-title { color: #003366; font-weight: 600; margin-right: 4px; }
.intake-chip { cursor: pointer; margin: 0; }
.intake-chip input { position: absolute; opacity: 0; pointer-events: none; }
.intake-chip span { display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid #cbd5e1; background: #fff; color: #475569; transition: all .15s; user-select: none; }
.intake-chip input:checked + span { background: #003366; border-color: #003366; color: #fff; }
.intake-chip input:focus-visible + span { outline: 2px solid #ffd700; outline-offset: 2px; }
.intake-chip small { opacity: .75; }
.intake-search { background: #fff; border-bottom: 1px solid #e2e8f0; }
.intake-search .form-control:focus { box-shadow: none; border-color: #003366; }
.intake-chart-level { height: 320px; }
.intake-col-no { width: 8%; }
.intake-col-level { width: 20%; }
.intake-col-num { width: 13%; }

/* ══ คำถามที่พบบ่อย (includes/admission/faq.php — ตอนนี้ปิดไว้) ═══ */
.faq-accordion .accordion-button {
    background: #f8f9fa;
    border-radius: 12px !important;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%);
    color: white;
}

.faq-accordion .accordion-button:not(.collapsed) i {
    color: #ffd700 !important;
}

.faq-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 51, 102, 0.25);
}

.faq-accordion .accordion-body {
    padding: 20px 25px;
    line-height: 1.8;
}

/* ══ ยูทิลิตีของหน้า ═════════════════════════════════════ */
.bg-soft-blue {
    background-color: #eef4fb;
}
