        /* ==========================================================================
           💎 PREMIUM HOMEPAGE OVERRIDES & ELASTIC iOS ANIMATIONS 💎
           ========================================================================== */

        /* --- 💡 ใหม่: iOS Elastic/Spring Scroll Animation 💡 --- */
        .reveal {
            opacity: 0;
            /* 💡 ใช้ scaleY(1.3) ทำให้ดูยืดตัวยาวๆ เหมือนสปริง และหมุนเอนหนีไป 20 องศา */
            transform: translateY(180px) scale(0.7) scaleY(1.3) rotateX(-20deg);
            transform-origin: bottom center;
            /* ดึงจากด้านล่างให้ดูมีน้ำหนัก */

            /* 💡 หัวใจสำคัญ: cubic-bezier แบบสปริง (เลยจุด 1 ไปที่ 1.56 แล้วเด้งกลับ) */
            transition: all 1s cubic-bezier(0.34, 1.56, 0.64, 1);
            will-change: transform, opacity;
            /* ช่วยให้การ์ดจอเรนเดอร์ลื่นขึ้น */
            backface-visibility: hidden;
        }

        .reveal.active {
            opacity: 1;
            /* 💡 คืนรูปทรงปกติ (สปริงจะเด้งกลับมาจุดนี้อย่างสมูท) */
            transform: translateY(0) scale(1) scaleY(1) rotateX(0deg);
        }

        /* --- Infinite Auto-Scroll Carousel --- */
        .carousel-wrapper {
            width: 100%;
            overflow: hidden;
            padding: 20px 0;
            position: relative;
        }

        .carousel-wrapper::before,
        .carousel-wrapper::after {
            content: '';
            position: absolute;
            top: 0;
            width: 100px;
            height: 100%;
            z-index: 2;
            pointer-events: none;
        }

        .carousel-wrapper::before {
            left: 0;
            background: linear-gradient(to right, rgba(255, 255, 255, 0.95) 0%, transparent 100%);
        }

        .carousel-wrapper::after {
            right: 0;
            background: linear-gradient(to left, rgba(255, 255, 255, 0.95) 0%, transparent 100%);
        }

        .carousel-track {
            display: flex;
            width: max-content;
            animation: scrollTrack 45s linear infinite;
        }

        .carousel-track:hover {
            animation-play-state: paused;
        }

        @keyframes scrollTrack {
            0% {
                transform: translateX(0);
            }

            100% {
                transform: translateX(-50%);
            }
        }

        .carousel-item-group {
            display: flex;
            gap: 2.5rem;
            padding-right: 2.5rem;
        }

        .carousel-item-group .premium-card {
            width: 360px;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
        }

        /* 💡 ล็อคความสูงหัวข้อข่าว/กิจกรรม (Desktop) */
        .news-card-title, .bg-gradient-activities .card-body h3 {
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            min-height: 3.8rem;
            margin-bottom: 12px !important;
        }

        /* 💡 ดันปุ่มลงด้านล่างเสมอ */
        .premium-card .read-more-link {
            margin-top: auto;
        }

        /* --- 💡 ใหม่: Premium Controlled News Slider (Desktop) --- */
        .news-slider-outer {
            position: relative;
            padding: 0 50px;
            margin-bottom: 3rem;
        }

        .news-slider-container {
            display: flex;
            align-items: stretch;
            overflow-x: auto;
            scroll-snap-type: x mandatory;
            gap: 2.5rem;
            scroll-behavior: smooth;
            -webkit-overflow-scrolling: touch;
            padding: 20px 5px;
        }

        .news-slider-container::-webkit-scrollbar {
            display: none;
        }

        .news-slider-container .premium-card {
            flex: 0 0 calc(33.333% - 1.67rem);
            scroll-snap-align: start;
        }

        /* ==========================================================================
           📱 MOBILE OPTIMIZATION (Compact & Small Fonts) 
           ========================================================================== */
        @media (max-width: 1024px) {
            /* 1. ขนาดตัวการ์ด (Compact Peek 30%) */
            .news-slider-container .premium-card,
            .bg-gradient-activities .carousel-item-group .premium-card {
                flex: 0 0 70% !important; 
                width: 70% !important;
                scroll-snap-align: start;
            }

            /* 2. รูปภาพ */
            .news-slider-container .premium-card .img-wrapper,
            .bg-gradient-activities .premium-card .img-wrapper {
                height: 150px !important;
            }

            /* 3. ตัวอักษร (Small Font Support) */
            .premium-card h3, 
            .news-card-title,
            .bg-gradient-activities .card-body h3 {
                font-size: 1.05rem !important;
                min-height: 3rem !important;
                line-height: 1.3 !important;
            }

            .premium-card p.excerpt {
                font-size: 0.82rem !important;
                line-height: 1.5 !important;
                margin-bottom: 15px !important;
            }

            .premium-card .date-badge {
                font-size: 0.72rem !important;
                padding: 4px 10px !important;
                margin-bottom: 10px !important;
            }

            .read-more-link {
                font-size: 0.85rem !important;
            }

            /* 4. ระยะห่าง Container & ระบบเลื่อน */
            .news-slider-outer,
            .bg-gradient-activities .carousel-wrapper {
                padding: 10px 10px !important;
                overflow-x: auto !important; /* 💡 เปิดระบบเลื่อน */
                scroll-snap-type: x mandatory !important; /* 💡 เด้งเข้าล็อค */
                -webkit-overflow-scrolling: touch;
            }

            .news-slider-container,
            .bg-gradient-activities .carousel-track,
            .bg-gradient-activities .carousel-item-group {
                gap: 1.2rem !important;
                display: flex !important; /* 💡 มั่นใจว่าเป็นแนวนอน */
            }

            /* 5. หยุด Activity Animation เฉพาะมือถือ */
            .bg-gradient-activities .carousel-track {
                animation: none !important;
                width: auto !important;
            }
            .bg-gradient-activities .carousel-item-group:nth-child(n+2) {
                display: none !important;
            }

            .news-slider-outer {
                padding: 0 10px !important;
            }
        }

        .slider-nav-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 50px;
            height: 50px;
            background: #fff;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
            cursor: pointer;
            z-index: 10;
            border: none;
            color: var(--primary-color);
            font-size: 1.5rem;
            transition: all 0.3s ease;
        }

        .slider-nav-btn:hover {
            background: var(--primary-color);
            color: #fff;
        }

        .btn-prev { left: -10px; }
        .btn-next { right: -10px; }

        @media (max-width: 1024px) {
            .slider-nav-btn { display: none; }
        }

        /* --- Background Gradients --- */
        .bg-gradient-news {
            background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
            padding: 6rem 0;
            overflow: hidden;
        }

        .bg-gradient-activities {
            background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
            padding: 7rem 0;
            overflow: hidden;
        }

        .bg-gradient-activities .carousel-wrapper::before {
            background: linear-gradient(to right, #f8fafc 0%, transparent 100%);
        }

        .bg-gradient-activities .carousel-wrapper::after {
            background: linear-gradient(to left, #eff6ff 0%, transparent 100%);
        }

        .bg-gradient-docs {
            background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
            padding: 6rem 0;
        }

        /* --- Cinematic Hero Section --- */
        .hero-slideshow {
            height: 75vh; /* ปรับลดส่วนสูงจาก 85vh เพื่อขยับสไลด์ให้กระชับขึ้น */
            min-height: 500px; /* ปรับลดจาก 600px */
            border-radius: 0; /* เอาขอบโค้งออกตามความต้องการ */
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
        }

        .slide {
            background-size: cover;
            background-position: center;
            pointer-events: none;
            /* 💡 ปิดการรับคำสั่งคลิกของสไลด์ที่มองไม่เห็น */
        }

        .slide.active-slide {
            animation: zoomEffect 10s ease-in-out forwards;
            pointer-events: auto;
            /* 💡 เปิดให้คลิกได้เฉพาะสไลด์ที่กำลังโชว์อยู่เท่านั้น */
        }

        @keyframes zoomEffect {
            0% {
                transform: scale(1);
            }

            100% {
                transform: scale(1.08);
            }
        }

        .slide::before {
            background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.85) 100%);
        }

        .slide-content {
            transform: translateY(20px);
            opacity: 0;
            transition: all 1s cubic-bezier(0.25, 0.8, 0.25, 1);
            transition-delay: 0.3s;
        }

        .slide.active-slide .slide-content {
            transform: translateY(0);
            opacity: 1;
        }

        .slide-content h1 {
            font-size: 4.8rem;
            font-weight: 700;
            margin-bottom: 15px;
            text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
            letter-spacing: 1px;
        }

        /* --- Elegant Gradient Typography --- */
        .premium-heading {
            text-align: center;
            margin-bottom: 3rem;
        }

        .premium-heading .sub-title {
            color: var(--primary-color);
            font-weight: 600;
            letter-spacing: 2px;
            text-transform: uppercase;
            font-size: 0.98rem;
            display: block;
            margin-bottom: 10px;
        }

        /* 💡 แก้ไข: หัวข้อหลักแต่ละ Section ให้ไล่สี แดง ไป แดงเข้ม */
        .premium-heading h2 {
            font-size: 3.2rem;
            font-weight: 700;
            margin: 0;
            background: linear-gradient(135deg, #d90000 0%, #7f0000 100%);
            /* เปลี่ยนจาก var(--secondary-color) เป็นแดงเข้ม */
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            display: inline-block;
        }

        .premium-heading h2::after {
            display: none;
        }

        /* --- Premium Cards --- */
        .premium-card {
            background: #fff;
            border-radius: 18px;
            border: none;
            position: relative;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
            overflow: hidden;
            transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
            display: flex;
            flex-direction: column;
            height: 100%;
        }

        /* 💡 แก้ไข: เปลี่ยนเส้นขอบบนให้ไล่สี แดง ไป แดงเข้ม */
        .premium-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            background: linear-gradient(90deg, #d90000 0%, #7f0000 100%);
            /* แดง -> แดงเข้ม */
            z-index: 10;
            opacity: 0.8;
            transition: opacity 0.3s;
        }

        .premium-card::after {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            border-radius: inherit;
            border: 3px solid transparent;
            pointer-events: none;
            z-index: 20;
            transition: border-color 0.3s;
        }

        .premium-card:hover {
            transform: translateY(-12px);
            box-shadow: 0 20px 45px rgba(0, 0, 0, 0.13);
        }

        .premium-card:hover::after {
            border-color: var(--card-hover-color, #d90000);
        }

        .premium-card:hover::before {
            opacity: 0;
        }

        .premium-card .img-wrapper {
            height: 230px;
            overflow: hidden;
        }

        .premium-card .img-wrapper img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.7s ease;
        }

        .premium-card:hover .img-wrapper img {
            transform: scale(1.08);
        }

        .premium-card .card-body {
            padding: 20px;
            flex-grow: 1;
            display: flex;
            flex-direction: column;
        }

        .premium-card .date-badge {
            display: inline-block;
            background: #fef2f2;
            color: var(--primary-color);
            padding: 7px 16px;
            border-radius: 50px;
            font-size: 0.88rem;
            font-weight: 600;
            margin-bottom: 16px;
            align-self: flex-start;
        }

        /* 💡 แก้ไข: คืนค่าหัวข้อในการ์ดให้เป็นสีเข้มแบบเดิม (อ่านง่ายสบายตา) */
        .premium-card h3 {
            font-size: 1.35rem;
            font-weight: 600;
            color: #0f172a;
            /* กลับมาใช้สีเข้มตามเดิม */
            margin: 0 0 16px 0;
            line-height: 1.4;
        }

        .premium-card p.excerpt {
            color: #64748b;
            line-height: 1.7;
            margin-bottom: 22px;
            font-size: 0.98rem;
            /* 💡 บังคับจองพื้นที่ 2 บรรทัดเสมอ แม้ไม่มีข้อความ */
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            min-height: 3.4rem; 
        }

        .premium-card .read-more-link {
            color: var(--primary-color);
            font-weight: 600;
            text-decoration: none;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            transition: gap 0.3s;
            margin-top: auto;
            align-self: flex-end; /* ขยับหัวข้ออ่านต่อให้อยู่ด้านขวาเพื่อความสะดวกในการใช้นิ้วโป้งกดบนสมาร์ตโฟน */
        }

        .premium-card:hover .read-more-link {
            gap: 11px;
        }

        /* --- Floating Documents --- */
        .premium-doc-item {
            background: #fff;
            padding: 22px 32px;
            border-radius: 18px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
            display: flex;
            align-items: center;
            transition: all 0.3s ease;
            margin-bottom: 16px;
            text-decoration: none;
            position: relative;
        }

        .premium-doc-item::after {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            border-radius: inherit;
            border: 3px solid transparent;
            pointer-events: none;
            z-index: 20;
            transition: border-color 0.3s;
        }

        .premium-doc-item:hover {
            transform: translateX(10px);
            box-shadow: 0 10px 28px rgba(0, 0, 0, 0.09);
        }

        .premium-doc-item:hover::after {
            border-color: var(--secondary-color, #d4af37);
        }

        .premium-doc-item .doc-icon {
            font-size: 2.1rem;
            margin-right: 22px;
        }

        .premium-doc-item .doc-title {
            font-size: 1.15rem;
            font-weight: 600;
            color: #1e293b;
            margin-bottom: 5px;
        }

        .premium-doc-item .doc-meta {
            color: #64748b;
            font-size: 0.92rem;
        }

        /* --- Buttons --- */
        .btn-luxury {
            display: inline-block;
            background: linear-gradient(135deg, var(--primary-color) 0%, #990000 100%);
            color: #fff !important;
            padding: 15px 42px;
            border-radius: 50px;
            font-weight: 600;
            border: none;
            box-shadow: 0 10px 20px rgba(192, 0, 0, 0.22);
            transition: all 0.3s ease;
            letter-spacing: 1px;
        }

        .btn-luxury:hover {
            transform: translateY(-3px);
            box-shadow: 0 15px 28px rgba(192, 0, 0, 0.42);
            background: linear-gradient(135deg, #e60000 0%, var(--primary-color) 100%);
        }

        .slide-button {
            background: linear-gradient(135deg, var(--secondary-color) 0%, #b8962e 100%);
            color: #fff;
            border: none;
            border-radius: 50px;
            padding: 16px 42px;
            font-size: 1.15rem;
            box-shadow: 0 10px 20px rgba(212, 175, 55, 0.32);
            margin-top: 22px;
            display: inline-block;
        }

        .slide-button:hover {
            transform: translateY(-3px);
            box-shadow: 0 15px 28px rgba(212, 175, 55, 0.52);
            background: linear-gradient(135deg, #ebd171 0%, var(--secondary-color) 100%);
            color: #fff;
        }

        @media (max-width: 768px) {
            .slide-content h1 {
                font-size: 1.38rem !important; /* Shrunk slide header slightly to share space with subtext */
                line-height: 1.25 !important;
                margin-bottom: 6px !important;
                font-weight: 700 !important;
                text-shadow: 0 2px 8px rgba(0,0,0,0.8) !important; /* Crisp readability drop shadow */
            }

            .slide-content p {
                display: -webkit-box !important; /* Restore subtext paragraph with extreme compact styling */
                -webkit-line-clamp: 2 !important; /* Clamp description exactly to 2 readable lines */
                -webkit-box-orient: vertical !important;
                overflow: hidden !important;
                font-size: 0.85rem !important; /* Shrunk subtext to a mini readable scale */
                line-height: 1.35 !important;
                margin: 0 0 12px 0 !important; /* Balanced gap under description */
                opacity: 0.9 !important;
                text-shadow: 0 2px 6px rgba(0,0,0,0.8) !important;
            }

            .slide-content .slide-button {
                padding: 8px 22px !important; /* Compact aesthetic button padding */
                font-size: 0.82rem !important; /* Sleek button typography scale */
                margin-top: 0 !important; /* Flush margin to prevent vertical space bloating */
            }

            .hero-slideshow {
                height: 45vh; /* ปรับลดความสูงลงอย่างชัดเจนเพื่อไม่ให้กินพื้นที่บนหน้าจอมือถือมากเกินไป */
                min-height: 280px; /* ส่วนสูงขั้นต่ำที่พอเหมาะและกระชับ */
                border-radius: 0; /* เอาขอบโค้งออก */
            }

            /* 🎛️ Slideshow Navigation Arrows Tuning on Mobile */
            .prev-slide, 
            .next-slide {
                top: 62% !important; /* Push buttons down to avoid overlapping the central text contents */
                font-size: 1.8rem !important; /* Shrunk arrow font size slightly */
                padding: 10px !important; /* Sleek button padding for mobile ergonomics */
                background-color: rgba(0, 0, 0, 0.2) !important; /* Soft, unobtrusive background */
            }

            .premium-heading h2 {
                font-size: 2rem !important; /* Scale down dynamic section header text on smartphones */
            }

            .carousel-item-group .premium-card {
                width: 310px;
            }

            .premium-heading {
                margin-bottom: 1.5rem !important; /* Shrunk bottom margin under section header */
            }

            /* 🎥 Cinematic Sections Padding Compression on Mobile */
            .bg-gradient-news,
            .bg-gradient-docs,
            .facebook-section {
                padding: 2.5rem 0 !important; /* Shrunk from 6rem / 5rem to a tight and modern 2.5rem padding */
            }
            .bg-gradient-activities {
                padding: 3rem 0 !important; /* Shrunk from 7rem to 3rem to maximize scan density on mobile viewports */
            }

            /* 🔗 Luxury Buttons & Facebook Section Compact Scaling */
            .facebook-section h2 {
                font-size: 1.7rem !important; /* Scale down facebook section header text for portrait screen balance */
            }
            .btn-luxury {
                padding: 10px 28px !important; /* Shrunk padding from 15px 42px to a crisp mobile standard */
                font-size: 0.88rem !important; /* Sleek button typography scale */
                box-shadow: 0 6px 12px rgba(192, 0, 0, 0.15) !important; /* Subtle soft shadow */
            }
        }

        /* --- 💡 Facebook Responsive --- */
        .fb-responsive-wrapper {
            background: #fff;
            padding: 10px;
            border-radius: 12px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
            width: 500px;
            max-width: 100%;
            box-sizing: border-box;
            margin: 0 auto;
        }

        @media (max-width: 520px) {
            .fb-responsive-wrapper {
                padding: 5px;
                border-radius: 8px;
            }
        }

        /* --- Academic Calendar Micro-Widget --- */
        .bg-gradient-calendar {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            padding: 5rem 0;
            position: relative;
            overflow: hidden;
        }

        .calendar-widget-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 1.5rem;
            margin-bottom: 3rem;
        }

        @media (max-width: 1024px) {
            .calendar-widget-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 640px) {
            .calendar-widget-grid {
                grid-template-columns: 1fr;
            }
        }

        .calendar-mini-card {
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border-radius: 18px;
            border: 1px solid rgba(255, 255, 255, 0.6);
            padding: 1.5rem;
            display: flex;
            align-items: center;
            gap: 1.25rem;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.03);
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .calendar-mini-card::after {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            border-radius: inherit;
            border: 3px solid transparent;
            pointer-events: none;
            z-index: 20;
            transition: border-color 0.3s;
        }

        .calendar-mini-card:hover {
            transform: translateY(-8px);
            box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
            background: #ffffff;
        }

        .calendar-mini-card:hover::after {
            border-color: var(--event-color, #10b981);
        }

        /* Simulated Calendar Sheet Icon */
        .calendar-date-sheet {
            width: 72px;
            height: 84px;
            flex-shrink: 0;
            border-radius: 12px;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
            border: 1px solid #e2e8f0;
        }

        .calendar-date-sheet .sheet-header {
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: 700;
            color: #ffffff;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .calendar-date-sheet .sheet-body {
            flex-grow: 1;
            background: #ffffff;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: space-evenly;
            padding-bottom: 2px;
        }

        .calendar-date-sheet .sheet-weekday {
            font-size: 0.72rem;
            font-weight: 700;
            color: #475569;
            margin-top: 1px;
            line-height: 1;
        }

        .calendar-date-sheet .sheet-day {
            font-size: 1.35rem;
            font-weight: 800;
            color: #1f2937;
            line-height: 1;
        }

        .calendar-date-sheet .sheet-year {
            font-size: 0.62rem;
            color: #94a3b8;
            font-weight: 600;
            line-height: 1;
        }

        .calendar-mini-info {
            flex-grow: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
        }

        .calendar-mini-title {
            font-size: 1rem;
            font-weight: 700;
            color: #1e293b;
            margin: 0;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            line-height: 1.35;
        }

        .calendar-mini-desc {
            font-size: 0.85rem;
            color: #64748b;
            margin: 0;
            display: -webkit-box;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .calendar-mini-tag {
            align-self: flex-start;
            font-size: 0.72rem;
            font-weight: 600;
            padding: 3px 8px;
            border-radius: 6px;
            margin-top: 4px;
        }

        @media (max-width: 640px) {
            .bg-gradient-calendar {
                padding: 2.5rem 0 !important;
            }
        }
