/* หน้างานสหกิจศึกษา (pages/coop.php) — ลำดับหมวดคงตามโค้ดเดิม
 * (banner-slider.css โหลดต่อท้ายเมื่อมีแบนเนอร์) */

/* ══ แบนเนอร์สไลด์ ═══════════════════════════════════════ */
.coop-carousel-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 1920 / 600;
    max-height: 600px;
    overflow: hidden;
    background: #0b1d3a;
    margin-bottom: 30px;
}
/* มือถือใช้สัดส่วนเดียวกับโปสเตอร์ (เดิม 16:9 + cover ทำให้ซ้าย-ขวาถูกตัด ข้อความหาย) */
@media (max-width: 768px) {
    .coop-carousel-wrapper {
        max-height: none;
    }
}
.coop-carousel-wrapper .carousel,
.coop-carousel-wrapper .carousel-inner,
.coop-carousel-wrapper .carousel-item {
    height: 100%;
}
.coop-carousel-wrapper .carousel-item {
    position: relative;
    overflow: hidden;
}
/* แสดงภาพเต็มใบเสมอ ส่วนที่เหลือ (ภาพสัดส่วนไม่ตรง) เติมด้วยภาพเดียวกันแบบเบลอ */
.coop-slide-bg {
    position: absolute;
    inset: -40px;
    background-size: cover;
    background-position: center;
    filter: blur(28px) brightness(.7) saturate(1.15);
    pointer-events: none;
}
.coop-carousel-wrapper .carousel-item img {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}
.coop-carousel-wrapper .carousel-indicators {
    bottom: 20px;
    z-index: 10;
}
.coop-carousel-wrapper .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: rgba(255,255,255,0.5);
    border: 2px solid rgba(255,255,255,0.8);
    transition: all 0.3s ease;
}
.coop-carousel-wrapper .carousel-indicators button.active {
    background-color: #ffd700;
    border-color: #ffd700;
    transform: scale(1.2);
}
.coop-carousel-wrapper .carousel-control-prev,
.coop-carousel-wrapper .carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.3s ease;
}
.coop-carousel-wrapper:hover .carousel-control-prev,
.coop-carousel-wrapper:hover .carousel-control-next {
    opacity: 1;
}
.coop-carousel-wrapper .carousel-control-prev { left: 20px; }
.coop-carousel-wrapper .carousel-control-next { right: 20px; }
.coop-carousel-wrapper .carousel-control-prev:hover,
.coop-carousel-wrapper .carousel-control-next:hover {
    background: rgba(0,0,0,0.7);
}
.coop-carousel-wrapper .carousel-item {
    transition: transform 0.6s ease-in-out;
}

/* ══ การ์ดลัด / ขั้นตอน / แถบตัวเลข / แท็บ / ระบบออนไลน์ ══════════════ */
/* Gradient Cards */
.quick-link-gradient {
    border-radius: 16px;
    padding: 25px 20px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}
.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(-8px); }

.ql-blue { background: linear-gradient(135deg, #003366 0%, #0066cc 100%); }
.ql-green { background: linear-gradient(135deg, #047857 0%, #10b981 100%); }
.ql-orange { background: linear-gradient(135deg, #c2410c 0%, #f97316 100%); }

/* Coop Timeline */
.coop-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 30px 0;
}
.coop-timeline::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    height: 4px;
    background: linear-gradient(90deg, #10b981 0%, #0066cc 50%, #f97316 100%);
    transform: translateY(-50%);
    border-radius: 2px;
}
.timeline-step { text-align: center; position: relative; z-index: 2; flex: 1; }
.step-icon {
    width: 70px; height: 70px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 15px; font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    transition: transform 0.3s;
}
.step-icon:hover { transform: scale(1.1); }
.step-title { font-weight: 600; font-size: 0.9rem; color: #1e293b; }
.step-desc { font-size: 0.75rem; color: #64748b; }

@media (max-width: 768px) {
    .coop-timeline { flex-direction: column; gap: 20px; }
    .coop-timeline::before { display: none; }
}

/* Counter Section */
.counter-section-coop {
    background: linear-gradient(135deg, #003366 0%, #001a33 50%, #002244 100%);
}
.counter-card-coop { text-align: center; padding: 25px; }
.counter-icon-coop {
    width: 70px; height: 70px;
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 15px; font-size: 1.5rem; color: #003366;
}
.counter-number-coop { font-size: 2.5rem; font-weight: 700; color: #fff; }
.counter-label-coop { color: #ffd700; font-weight: 600; }
.counter-sublabel-coop { color: rgba(255,255,255,0.6); font-size: 0.85rem; }

/* Modern Tabs */
.nav-pills-modern {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 16px; padding: 8px;
}
.nav-pills-modern .nav-link {
    color: #475569; background: transparent; border-radius: 12px;
    padding: 14px 24px; font-weight: 600; transition: all 0.3s ease; border: none;
}
.nav-pills-modern .nav-link:hover {
    background: rgba(0, 51, 102, 0.1); color: var(--npu-blue); transform: translateY(-2px);
}
.nav-pills-modern .nav-link.active {
    background: linear-gradient(135deg, #003366 0%, #0066cc 100%) !important;
    color: white !important;
    box-shadow: 0 8px 25px rgba(0, 51, 102, 0.3); transform: translateY(-2px);
}
.nav-pills-modern .nav-link.active i { color: #ffd700; }

/* Online co-op document system (/coop/) */
.coop-system-cta {
    position: relative; overflow: hidden;
    border-radius: 20px; padding: 28px 32px;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #0ea5e9 130%);
    color: #fff; box-shadow: 0 20px 45px -15px rgba(79, 70, 229, .55);
}
.coop-system-cta::after {
    content: ''; position: absolute; width: 320px; height: 320px; right: -80px; top: -140px;
    border-radius: 50%; background: rgba(255,255,255,.10); pointer-events: none;
}
.coop-system-cta .cta-icon {
    width: 64px; height: 64px; border-radius: 18px; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.18); font-size: 1.7rem;
}
.coop-system-cta h4 { font-weight: 700; margin-bottom: 4px; }
.coop-system-cta .cta-points { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9rem; opacity: .9; margin-top: 8px; }
.coop-system-cta .btn-cta {
    position: relative; z-index: 1;
    background: #fff; color: #4338ca; font-weight: 700; border-radius: 12px; padding: 12px 26px;
    box-shadow: 0 10px 25px -10px rgba(0,0,0,.35); transition: transform .2s, box-shadow .2s;
}
.coop-system-cta .btn-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(0,0,0,.45); color: #3730a3; }
@media (max-width: 767px) { .coop-system-cta { padding: 22px; text-align: center; } .coop-system-cta .cta-points { justify-content: center; } }
.coop-main { min-height: 400px; }
.coop-cta-inner { z-index: 1; }

/* ══ ปฏิทินสหกิจ / ตารางเอกสาร ═══════════════════════════════ */
.min-w-0 { min-width: 0; }
.coop-calendar-card {
    border-radius: 16px;
    padding: 18px 20px;
    color: #fff;
    background: linear-gradient(135deg, #047857 0%, #0891b2 100%);
    box-shadow: 0 12px 30px -14px rgba(4, 120, 87, .6);
}
.coop-calendar-card .cal-icon {
    width: 52px; height: 52px; flex: none; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.18); font-size: 1.4rem; color: #ffd700;
}
#formsTab .badge { color: #003366; }
#formsTab .nav-link:not(.active) .badge { background: #e2e8f0 !important; }

/* Stack table rows on phones so titles get the full width */
@media (max-width: 767.98px) {
    .coop-table thead { display: none; }
    .coop-table tr {
        display: flex; flex-wrap: wrap; align-items: center;
        gap: 8px 12px; padding: 14px 16px; border-bottom: 1px solid #e5e7eb;
    }
    .coop-table td { display: block; border: 0; padding: 0 !important; text-align: left !important; }
    .coop-table td:first-child { flex: 0 0 100%; }
    .coop-table td:last-child { margin-left: auto; }
    .coop-table td[colspan] { flex: 0 0 100%; text-align: center !important; padding: 24px 0 !important; }
    .coop-calendar-card { flex-wrap: wrap; }
}
.coop-anchor { scroll-margin-top: 100px; }
