/* ==========================================================================
   DSD RRU - Main Stylesheet
   University Palette: Royal Blue (#1F4E79), RRU Gold (#D4AF37), Slate (#0F172A)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

:root {
    --primary: #1F4E79;
    --primary-dark: #123352;
    --primary-light: #2D6CA4;
    --accent-gold: #D4AF37;
    --accent-gold-hover: #b89628;
    --secondary: #0ea5e9;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Prompt', 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1 0 auto;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-light);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Container & Layout --- */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.container-fluid {
    width: 100%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

/* --- Top Info Bar (Ultra-Premium Royal Deep) --- */
.top-bar {
    background: linear-gradient(90deg, #091728 0%, #112845 50%, #0d213b 100%);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.83rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.25);
    position: relative;
    z-index: 101;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.top-bar-contact {
    display: flex;
    align-items: center;
    gap: 1.15rem;
    flex-wrap: wrap;
}

.top-bar-item {
    color: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.83rem;
    letter-spacing: 0.2px;
    transition: var(--transition);
}

.top-bar-contact a.top-bar-item:hover {
    color: #fde047;
    text-shadow: 0 0 8px rgba(253, 224, 71, 0.4);
}

.text-gold {
    color: #f59e0b;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.top-bar-divider {
    color: rgba(212, 175, 55, 0.35);
    font-size: 0.75rem;
    user-select: none;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-bar-social {
    color: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.83rem;
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
}

.top-bar-social:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
}

.top-bar-login {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.81rem;
    font-weight: 500;
    color: #fef08a !important;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.35);
    padding: 0.22rem 0.75rem;
    border-radius: 9999px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
}

.top-bar-login:hover {
    background: rgba(212, 175, 55, 0.22);
    border-color: rgba(212, 175, 55, 0.65);
    color: #ffffff !important;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.35);
    transform: translateY(-1px);
}

/* --- Main Sticky Header (Glass Luxury Aesthetic) --- */
.main-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.07);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #1F4E79 0%, #D4AF37 20%, #FEF08A 50%, #D4AF37 80%, #1F4E79 100%) 1;
    transition: all 0.3s ease;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    gap: 1rem;
}

/* Logo Brand */
.logo-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-symbol {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #ffffff;
    border: 2px solid rgba(212, 175, 55, 0.6);
    box-shadow: 0 3px 10px rgba(31, 78, 121, 0.15), 0 0 0 2px rgba(212, 175, 55, 0.1);
    flex-shrink: 0;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.logo-brand:hover .logo-symbol {
    transform: scale(1.05) rotate(2deg);
    border-color: #D4AF37;
    box-shadow: 0 6px 18px rgba(31, 78, 121, 0.22), 0 0 0 3px rgba(212, 175, 55, 0.25);
}

.logo-symbol img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f2942;
    line-height: 1.22;
    letter-spacing: -0.2px;
    transition: color 0.25s ease;
}

.logo-brand:hover .logo-title {
    color: #1F4E79;
}

.logo-subtitle {
    font-size: 0.77rem;
    color: #64748b;
    margin-top: 0.15rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    line-height: 1.3;
}

.logo-badge {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #854d0e;
    border: 1px solid rgba(212, 175, 55, 0.45);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.08rem 0.45rem;
    border-radius: 9999px;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 2px rgba(212, 175, 55, 0.15);
    display: inline-block;
}

/* --- Navigation Menu (Ultra-Refined High-End) --- */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-links li {
    display: flex;
    align-items: center;
}

.nav-links a:not(.btn-nav-action) {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.52rem 0.82rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: #334155;
    border-radius: 10px;
    white-space: nowrap;
    position: relative;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Icon within nav links */
.nav-links a:not(.btn-nav-action) i {
    font-size: 1.05rem;
    color: #64748b;
    transition: transform 0.22s ease, color 0.22s ease;
}

/* Hover state */
.nav-links a:not(.btn-nav-action):hover {
    color: #1F4E79;
    background: rgba(31, 78, 121, 0.05);
}

.nav-links a:not(.btn-nav-action):hover i {
    color: #D4AF37;
    transform: translateY(-1.5px);
}

/* Active state with golden glowing indicator underline */
.nav-links a:not(.btn-nav-action).active {
    color: #1F4E79;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(31, 78, 121, 0.08) 0%, rgba(212, 175, 55, 0.06) 100%);
}

.nav-links a:not(.btn-nav-action).active i {
    color: #D4AF37;
}

.nav-links a:not(.btn-nav-action).active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 18%;
    right: 18%;
    height: 2.5px;
    background: linear-gradient(90deg, #D4AF37, #F59E0B);
    border-radius: 9999px;
    box-shadow: 0 1px 4px rgba(212, 175, 55, 0.4);
}

/* --- Mega Dropdown Menu (Ultra-Premium Royal Style) --- */
.nav-item-dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.52rem 0.82rem;
    font-size: 0.92rem;
    font-weight: 500;
    color: #334155;
    border-radius: 10px;
    white-space: nowrap;
    position: relative;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-arrow {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-left: 0.15rem;
    transition: transform 0.25s ease, color 0.25s ease;
}

.nav-item-dropdown:hover .dropdown-arrow,
.nav-item-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
    color: #D4AF37;
}

.nav-item-dropdown:hover .nav-link-dropdown-toggle,
.nav-item-dropdown.open .nav-link-dropdown-toggle {
    color: #1F4E79;
    background: rgba(31, 78, 121, 0.05);
}

.nav-item-dropdown:hover .nav-link-dropdown-toggle i:first-child,
.nav-item-dropdown.open .nav-link-dropdown-toggle i:first-child {
    color: #D4AF37;
    transform: translateY(-1.5px);
}

/* Mega Menu Container - Seamlessly attached with zero gap (using padding-top for visual spacing) */
.mega-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    width: 680px;
    max-width: 92vw;
    padding-top: 10px; /* Seamless hover bridge: connects trigger directly to dropdown with 0px gap */
    background: transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s;
    z-index: 200;
}

/* Hover Bridge on Nav Item to eliminate any diagonal mouse movement dead-zone */
.nav-item-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: -40px;
    right: -40px;
    height: 18px;
    background: transparent;
    z-index: 198;
}

/* Visual Card Container */
.mega-menu-content {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    border-radius: 18px;
    box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(212, 175, 55, 0.15);
    position: relative;
    overflow: hidden;
}

/* Arrow pointer above mega menu content */
.mega-menu-content::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 13px;
    height: 13px;
    background: #ffffff;
    border-left: 1.5px solid rgba(212, 175, 55, 0.35);
    border-top: 1.5px solid rgba(212, 175, 55, 0.35);
    z-index: 2;
}

/* Show Mega Menu on Desktop Hover / Open */
@media (min-width: 1081px) {
    .nav-item-dropdown:hover .mega-dropdown-menu,
    .nav-item-dropdown.open .mega-dropdown-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    padding: 1.4rem;
}

/* Column Header */
.mega-col-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1.5px solid rgba(212, 175, 55, 0.2);
}

.mega-col-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(31, 78, 121, 0.1), rgba(212, 175, 55, 0.15));
    color: #1F4E79;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}

.mega-col-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f2942;
    line-height: 1.2;
    margin: 0;
}

.mega-col-desc {
    font-size: 0.74rem;
    color: #64748b;
    margin: 0.15rem 0 0;
}

/* Links List */
.mega-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.mega-link-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.7rem;
    border-radius: 12px;
    background: transparent;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid transparent;
}

.mega-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(31, 78, 121, 0.06);
    color: #1F4E79;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: all 0.22s ease;
}

.mega-item-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.mega-item-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s ease;
}

.external-badge {
    font-size: 0.72rem;
    color: #94a3b8;
    transition: color 0.2s ease, transform 0.2s ease;
}

.mega-item-desc {
    font-size: 0.74rem;
    color: #64748b;
    line-height: 1.3;
    margin-top: 0.15rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hover on link item */
.mega-link-item:hover {
    background: linear-gradient(135deg, rgba(31, 78, 121, 0.04) 0%, rgba(212, 175, 55, 0.08) 100%);
    border-color: rgba(212, 175, 55, 0.25);
    transform: translateX(4px);
}

.mega-link-item:hover .mega-item-icon {
    background: linear-gradient(135deg, #1F4E79 0%, #123352 100%);
    color: #fde047;
    box-shadow: 0 4px 10px rgba(31, 78, 121, 0.25);
    transform: scale(1.05);
}

.mega-link-item:hover .mega-item-title {
    color: #1F4E79;
}

.mega-link-item:hover .external-badge {
    color: #D4AF37;
    transform: translate(1px, -1px);
}

/* Mega Menu Bottom Bar */
.mega-menu-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.4rem;
    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    font-size: 0.82rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.mega-bottom-info {
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
}

.mega-bottom-info strong {
    color: #0f2942;
}

.mega-view-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #1F4E79;
    font-weight: 600;
    font-size: 0.83rem;
    padding: 0.3rem 0.8rem;
    border-radius: 9999px;
    background: #ffffff;
    border: 1px solid rgba(31, 78, 121, 0.2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.mega-view-all-btn:hover {
    background: #1F4E79;
    color: #ffffff !important;
    border-color: #1F4E79;
    transform: translateX(2px);
    box-shadow: 0 3px 8px rgba(31, 78, 121, 0.25);
}

/* Action Button (กยศ. / กรอ.) - Luxury Royal Gold & Navy */
.btn-nav-action {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    background: linear-gradient(135deg, #1F4E79 0%, #102e4c 100%) !important;
    color: #ffffff !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    padding: 0.52rem 1.15rem !important;
    border-radius: 9999px !important;
    border: 1.5px solid rgba(212, 175, 55, 0.55) !important;
    box-shadow: 0 4px 14px rgba(31, 78, 121, 0.28), 0 0 0 1px rgba(212, 175, 55, 0.2) !important;
    white-space: nowrap !important;
    position: relative !important;
    overflow: hidden !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-nav-action i {
    font-size: 1.1rem;
    color: #fde047;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    transition: transform 0.25s ease;
}

/* Subtle Shimmer highlight animation */
.btn-nav-action::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-25deg);
    transition: 0.6s ease;
}

.btn-nav-action:hover {
    background: linear-gradient(135deg, #14375a 0%, #0d233a 100%) !important;
    border-color: #D4AF37 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 18px rgba(31, 78, 121, 0.38), 0 0 16px rgba(212, 175, 55, 0.35) !important;
}

.btn-nav-action:hover::before {
    left: 125%;
}

.btn-nav-action:hover i {
    transform: scale(1.15) rotate(-5deg);
}

.btn-nav-action.active {
    border-color: #fde047 !important;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.4), 0 4px 14px rgba(31, 78, 121, 0.3) !important;
}

.mobile-menu-btn {
    display: none;
    background: rgba(31, 78, 121, 0.05);
    border: 1px solid rgba(31, 78, 121, 0.15);
    font-size: 1.6rem;
    color: var(--primary-dark);
    cursor: pointer;
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-menu-btn:hover {
    background: rgba(31, 78, 121, 0.1);
    color: var(--primary);
}

/* --- News Ticker Bar (Modern Clean Floating Ticker) --- */
.ticker-wrap {
    background: linear-gradient(90deg, #fffdf7 0%, #ffffff 35%, #fffdf7 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.18);
    padding: 0.45rem 0;
    font-size: 0.9rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.ticker-inner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.ticker-badge {
    background: linear-gradient(135deg, #D4AF37 0%, #b89628 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.78rem;
    padding: 0.28rem 0.8rem;
    border-radius: 9999px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.28);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    flex-shrink: 0;
}

.ticker-badge i {
    font-size: 0.82rem;
    color: #fef08a;
}

/* Pulsing live dot */
.ticker-dot {
    width: 6px;
    height: 6px;
    background-color: #ef4444;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: ticker-pulse 1.8s infinite;
}

@keyframes ticker-pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.ticker-content {
    overflow: hidden;
    white-space: nowrap;
    flex: 1;
    color: #334155;
    font-size: 0.88rem;
    font-weight: 400;
}

/* --- Hero Carousel Slider (Ultra-Premium Centered Design) --- */
.hero-section {
    position: relative;
    background: radial-gradient(circle at 50% 20%, rgba(31, 78, 121, 0.45) 0%, rgba(11, 25, 44, 0.95) 75%, #071322 100%);
    padding: 2rem 0 2.5rem;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 75%;
    height: 65%;
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.15) 0%, rgba(31, 78, 121, 0) 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-container {
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto !important;
    border-radius: 18px;
    border: 2px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.7), 0 0 35px rgba(212, 175, 55, 0.22);
    overflow: hidden;
    background: #0b192c;
    perspective: 1000px;
    transition: box-shadow 0.4s ease, border-color 0.4s ease;
}

.slider-wrapper:hover {
    border-color: rgba(212, 175, 55, 0.65);
    box-shadow: 0 25px 55px -10px rgba(0, 0, 0, 0.8), 0 0 45px rgba(212, 175, 55, 0.32);
}

.slides-container {
    position: relative;
    width: 100%;
    aspect-ratio: 960 / 400;
    max-height: 440px;
    overflow: hidden;
    display: block;
}

/* Strict Defensive Rules: Inactive slides are never rendered in document flow */
.slide-card {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1), transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-card.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
    transform: none;
}

/* Transition Variations */
.slide-card[data-effect="fade"].active {
    animation: slideFadeIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-card[data-effect="zoom"].active {
    animation: slideZoomIn 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.slide-card[data-effect="flip"].active {
    animation: slideFlipIn 0.75s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideFadeIn {
    from { opacity: 0; transform: scale(1.01); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideZoomIn {
    from { opacity: 0; transform: scale(1.06); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes slideFlipIn {
    from { opacity: 0; transform: perspective(800px) rotateY(12deg) scale(0.96); }
    to { opacity: 1; transform: perspective(800px) rotateY(0deg) scale(1); }
}

/* Slide Direction Transitions */
.slide-card.slide-in-right {
    display: flex !important;
    animation: slideInRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-card.slide-out-left {
    display: flex !important;
    animation: slideOutLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-card.slide-in-left {
    display: flex !important;
    animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-card.slide-out-right {
    display: flex !important;
    animation: slideOutRight 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideInRight {
    from { opacity: 0.4; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutLeft {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(-100%); }
}

@keyframes slideInLeft {
    from { opacity: 0.4; transform: translateX(-100%); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100%); }
}

.slide-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.slide-banner-img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    display: block;
    border-radius: 16px;
    transition: transform 0.5s ease;
}

.slide-link:hover .slide-banner-img {
    transform: scale(1.015);
}

/* Frosted Glass Navigation Buttons */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(11, 25, 44, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.slider-arrow:hover {
    background: var(--accent-gold);
    color: #0b192c;
    border-color: var(--accent-gold);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.6);
}

.slider-arrow.prev-btn {
    left: 16px;
}

.slider-arrow.next-btn {
    right: 16px;
}

/* Frosted Glass Indicators Bar */
.slider-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    background: rgba(11, 25, 44, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.85);
}

.slider-dot.active {
    width: 28px;
    border-radius: 12px;
    background: var(--accent-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.75);
}

/* --- High-Impact Quick Access & Student Portals Section --- */
.quick-access-section {
    position: relative;
    z-index: 5;
    padding: 2.75rem 0 2rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1px solid #f1f5f9;
}

.portal-section-header {
    margin-bottom: 1.85rem;
    text-align: center;
}

.portal-badge-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: #1F4E79;
    background: rgba(31, 78, 121, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.35);
    padding: 0.25rem 0.85rem;
    border-radius: 9999px;
    margin-bottom: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.portal-section-title {
    font-size: 1.65rem;
    font-weight: 700;
    color: #0f2942;
    line-height: 1.3;
    margin-bottom: 0.35rem;
}

.portal-section-subtitle {
    font-size: 0.92rem;
    color: #64748b;
    max-width: 650px;
    margin: 0 auto;
}

/* Featured Online Portals Grid (3 Main Cards) */
.featured-portals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.portal-featured-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.5rem;
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(212, 175, 55, 0.1);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.portal-featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1F4E79, #D4AF37, #F59E0B);
    transition: height 0.25s ease;
}

.portal-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.portal-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(31, 78, 121, 0.08) 0%, rgba(212, 175, 55, 0.14) 100%);
    color: #1F4E79;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.portal-card-badge {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.portal-card-badge.badge-gold {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #854d0e;
    border-color: rgba(212, 175, 55, 0.4);
}

.portal-card-badge.badge-blue {
    background: rgba(14, 165, 233, 0.1);
    color: #0369a1;
    border-color: rgba(14, 165, 233, 0.25);
}

.portal-card-badge.badge-green {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border-color: rgba(16, 185, 129, 0.25);
}

.portal-card-title {
    font-size: 1.18rem;
    font-weight: 700;
    color: #0f2942;
    line-height: 1.35;
    margin-bottom: 0.45rem;
    transition: color 0.2s ease;
}

.portal-card-desc {
    font-size: 0.86rem;
    color: #64748b;
    line-height: 1.55;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.portal-card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.85rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.88rem;
    font-weight: 600;
    color: #1F4E79;
    transition: color 0.2s ease;
}

.portal-card-action i {
    font-size: 1.15rem;
    color: #D4AF37;
    transition: transform 0.2s ease;
}

/* Hover on featured portal card */
.portal-featured-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px -8px rgba(31, 78, 121, 0.18), 0 0 0 1px rgba(212, 175, 55, 0.35);
    border-color: #D4AF37;
}

.portal-featured-card:hover::before {
    height: 5px;
}

.portal-featured-card:hover .portal-icon-wrapper {
    background: linear-gradient(135deg, #1F4E79 0%, #123352 100%);
    color: #fde047;
    box-shadow: 0 6px 18px rgba(31, 78, 121, 0.25);
    transform: scale(1.08) rotate(3deg);
}

.portal-featured-card:hover .portal-card-title {
    color: #1F4E79;
}

.portal-featured-card:hover .portal-card-action {
    color: #b89628;
}

.portal-featured-card:hover .portal-card-action i {
    transform: translateX(4px) scale(1.1);
}

/* Secondary Services Grid (5 Compact Cards) */
.sub-services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
}

.sub-service-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.1rem 0.85rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none !important;
    color: #1e293b;
}

.sub-service-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: rgba(31, 78, 121, 0.06);
    color: #1F4E79;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: all 0.25s ease;
}

.sub-service-card span {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
    color: #334155;
    transition: color 0.2s ease;
}

.sub-service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 18px -3px rgba(31, 78, 121, 0.12);
    border-color: rgba(212, 175, 55, 0.5);
}

.sub-service-card:hover .sub-service-icon {
    background: linear-gradient(135deg, #1F4E79, #123352);
    color: #fde047;
    transform: scale(1.08);
}

.sub-service-card:hover span {
    color: #1F4E79;
}

/* Backward compatibility */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.quick-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 1.25rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
}

/* --- Section Headers --- */
.section {
    padding: 3.5rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.85rem;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-gold);
}

.view-all-link {
    font-size: 0.92rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* --- News Cards Grid --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.75rem;
}

.news-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(31, 78, 121, 0.3);
}

.news-thumb {
    position: relative;
    height: 190px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    overflow: hidden;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.4s ease;
}

.article-content img,
.announcement-posters img,
.poster-box img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    display: block;
    margin: 1.25rem auto;
    box-shadow: var(--shadow-sm);
}

.news-card:hover .news-thumb img {
    transform: scale(1.05);
}

.news-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.news-badge.pinned {
    background: #dc2626;
}

.news-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.news-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title a {
    color: inherit;
}

.news-title a:hover {
    color: var(--primary);
}

.news-excerpt {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

.news-footer {
    margin-top: auto;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

/* --- Executive Leadership Showcase Section (Compact & Ultra-Refined) --- */
.executive-section {
    padding: 1.75rem 0 2rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    position: relative;
    border-bottom: 1px solid #e2e8f0;
}

.executive-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.15rem;
}

.executive-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.executive-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #1F4E79;
    background: rgba(31, 78, 121, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.35);
    padding: 0.15rem 0.65rem;
    border-radius: 9999px;
    width: fit-content;
}

.executive-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f2942;
    line-height: 1.25;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Executive Grid (Compact 2-Card Horizontal Symmetrical Layout) */
.executive-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.executive-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.15rem 1.35rem;
    text-align: left;
    border: 1.5px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 18px -4px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(212, 175, 55, 0.08);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
}

.executive-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #1F4E79 0%, #D4AF37 50%, #F59E0B 100%);
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.executive-card:hover {
    transform: translateY(-3px);
    border-color: #D4AF37;
    box-shadow: 0 12px 28px -6px rgba(31, 78, 121, 0.14), 0 0 18px rgba(212, 175, 55, 0.22);
}

/* Avatar Double Gold Ring - Compact */
.executive-avatar-wrap {
    flex-shrink: 0;
    margin-bottom: 0;
    position: relative;
}

.executive-avatar-ring {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    overflow: hidden;
    background: #f8fafc;
    border: 2.5px solid #D4AF37;
    outline: 2px solid rgba(212, 175, 55, 0.3);
    outline-offset: 3px;
    box-shadow: 0 6px 16px rgba(31, 78, 121, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.executive-card:hover .executive-avatar-ring {
    transform: scale(1.04);
    outline-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 8px 20px rgba(31, 78, 121, 0.22), 0 0 15px rgba(212, 175, 55, 0.35);
}

.executive-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.executive-card:hover .executive-img {
    transform: scale(1.06);
}

.executive-placeholder-icon {
    font-size: 2.5rem;
    color: #94a3b8;
}

/* Info Details - Compact Horizontal */
.executive-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.executive-name {
    font-size: 1.06rem;
    font-weight: 700;
    color: #0f2942;
    line-height: 1.3;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    transition: color 0.2s ease;
}

.executive-card:hover .executive-name {
    color: #1F4E79;
}

.executive-position {
    font-size: 0.86rem;
    font-weight: 600;
    color: #b89628;
    margin-bottom: 0.2rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.executive-dept {
    font-size: 0.78rem;
    color: #64748b;
    margin-bottom: 0.55rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Contact Links - Compact horizontal pills */
.executive-contact {
    width: 100%;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.45rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.executive-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    color: #475569;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-decoration: none !important;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.executive-contact-item i {
    color: #D4AF37;
    font-size: 0.74rem;
    transition: transform 0.2s ease;
}

.executive-contact-item:hover {
    color: #1F4E79;
    background: rgba(31, 78, 121, 0.08);
    border-color: rgba(31, 78, 121, 0.2);
    transform: translateY(-1px);
}

.executive-contact-item:hover i {
    transform: scale(1.15);
}

@media (max-width: 900px) {
    .executive-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .executive-card {
        padding: 1rem;
        gap: 0.9rem;
    }
    .executive-avatar-ring {
        width: 72px;
        height: 72px;
    }
    .executive-name {
        font-size: 1rem;
        white-space: normal;
    }
    .executive-position, .executive-dept {
        white-space: normal;
    }
    .executive-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* --- Forms Table & Card Style --- */
.forms-table {
    width: 100%;
    background: #ffffff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border-collapse: collapse;
}

.forms-table th {
    background: var(--primary);
    color: #ffffff;
    text-align: left;
    padding: 0.9rem 1.25rem;
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
}

.forms-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.92rem;
    vertical-align: middle;
}

.forms-table tr:hover td {
    background-color: #f8fafc;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #ffffff !important;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.btn-download:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(31, 78, 121, 0.25);
}

/* --- Footer --- */
.main-footer {
    background: var(--primary-dark);
    color: #cbd5e1;
    padding: 3.5rem 0 1.5rem;
    margin-top: 3.5rem;
    border-top: 4px solid var(--accent-gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
}

.footer-col h3 {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 2px;
    background: var(--accent-gold);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.92rem;
}

.footer-links a:hover {
    color: var(--accent-gold);
    transform: translateX(3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #94a3b8;
}

.footer-bottom-copy {
    line-height: 1.5;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.footer-bottom-link,
.footer-bottom-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #94a3b8;
    text-decoration: none;
    background: none;
    border: none;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    padding: 0.35rem 0.25rem;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-bottom-link:hover,
.footer-bottom-btn:hover {
    color: #ffffff !important;
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
    }
    .footer-bottom-links {
        justify-content: center;
        gap: 0.5rem 1.25rem;
    }
    .footer-bottom-link,
    .footer-bottom-btn {
        min-height: 44px;
        padding: 0.5rem 0.6rem;
    }
}

/* --- Breadcrumb --- */
.breadcrumb-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
}

.breadcrumb-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb-list li+li::before {
    content: "/";
    color: var(--text-muted);
    margin-right: 0.5rem;
}

/* --- Responsive Breakpoints (Ultra-Refined Mobile & Tablet Navigation) --- */
@media (max-width: 1080px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        padding: 1.25rem 1.5rem;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        border-top: 1px solid rgba(212, 175, 55, 0.2);
        border-bottom: 3px solid #D4AF37;
        z-index: 99;
        animation: navSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    @keyframes navSlideDown {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .main-nav.show {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.4rem;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a:not(.btn-nav-action) {
        width: 100%;
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-radius: 8px;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .nav-links a:not(.btn-nav-action).active::after {
        display: none;
    }

    /* Mobile Accordion for Mega Menu */
    .nav-item-dropdown {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .nav-link-dropdown-toggle {
        justify-content: space-between;
        width: 100%;
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
        border-radius: 8px;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        align-items: center;
    }

    .nav-link-dropdown-toggle.active::after {
        display: none;
    }

    .nav-item-dropdown::after {
        display: none;
    }

    .mega-dropdown-menu {
        position: static;
        width: 100%;
        max-width: 100%;
        transform: none !important;
        box-shadow: none;
        border: 1px solid rgba(212, 175, 55, 0.25);
        border-radius: 12px;
        background: #f8fafc;
        display: none;
        margin-top: 0.35rem;
        margin-bottom: 0.5rem;
        padding-top: 0;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .mega-dropdown-menu::before,
    .mega-menu-content::before {
        display: none;
    }

    .mega-menu-content {
        background: transparent;
        border: none;
        box-shadow: none;
        border-radius: 0;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .nav-item-dropdown.open .mega-dropdown-menu {
        display: block;
        animation: navSlideDown 0.2s ease-out;
    }

    .mega-menu-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .mega-menu-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .nav-links a.btn-nav-action {
        width: 100%;
        min-height: 46px;
        margin-top: 0.6rem;
        justify-content: center;
        padding: 0.75rem 1rem !important;
        font-size: 0.98rem !important;
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .top-bar-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
    }
    .top-bar-contact {
        gap: 0.6rem;
        font-size: 0.78rem;
    }
    .top-bar-item {
        font-size: 0.78rem;
    }
    .logo-title {
        font-size: 1.15rem;
    }
    .logo-symbol {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 640px) {
    .slider-wrapper {
        border-radius: var(--radius-md);
    }
    .slider-arrow {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    .slider-arrow.prev-btn {
        left: 8px;
    }
    .slider-arrow.next-btn {
        right: 8px;
    }
    .slider-dots {
        bottom: 8px;
        padding: 4px 10px;
    }
    .slider-dot {
        width: 8px;
        height: 8px;
    }
    .slider-dot.active {
        width: 20px;
    }
    .executive-card {
        padding: 1.75rem 1.25rem;
    }
    .executive-avatar-ring {
        width: 115px;
        height: 115px;
    }
    .executive-name {
        font-size: 1.15rem;
    }
    .executive-title {
        font-size: 1.45rem;
    }
    .featured-portals-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .sub-services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    .portal-section-title {
        font-size: 1.35rem;
    }
    .quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 641px) and (max-width: 992px) {
    .featured-portals-grid {
        grid-template-columns: 1fr;
    }
    .sub-services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* --- Rich Text Article Content (Quill & Standard HTML) --- */
.article-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--text-main);
    word-break: break-word;
}

.article-content p {
    margin-bottom: 1.25rem;
}

.article-content h1, 
.article-content h2, 
.article-content h3, 
.article-content h4 {
    color: var(--primary-dark);
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: 0.85rem;
    line-height: 1.4;
}

.article-content h1 { font-size: 1.65rem; border-bottom: 2px solid #f1f5f9; padding-bottom: 0.4rem; }
.article-content h2 { font-size: 1.4rem; }
.article-content h3 { font-size: 1.2rem; }

.article-content ul, 
.article-content ol {
    margin: 1rem 0 1.25rem 1.75rem;
    padding: 0;
}

.article-content li {
    margin-bottom: 0.4rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.25rem auto;
    display: block;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.article-content img[style*="float: left"],
.article-content img[style*="float:left"] {
    display: inline-block;
    margin: 0.5rem 1.5rem 1rem 0;
}

.article-content img[style*="float: right"],
.article-content img[style*="float:right"] {
    display: inline-block;
    margin: 0.5rem 0 1rem 1.5rem;
}

.article-content::after {
    content: "";
    display: table;
    clear: both;
}

.article-content blockquote {
    border-left: 4px solid var(--accent-gold);
    background: #f8fafc;
    padding: 1rem 1.25rem;
    margin: 1.25rem 0;
    border-radius: 0 8px 8px 0;
    color: #475569;
    font-style: italic;
}

.article-content pre, 
.article-content code {
    background: #0f172a;
    color: #e2e8f0;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: Consolas, Monaco, monospace;
}

.article-content pre {
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.25rem 0;
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.article-content table th, 
.article-content table td {
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    text-align: left;
}

.article-content table th {
    background: #f8fafc;
    color: var(--primary-dark);
    font-weight: 600;
}

/* Quill Alignment Classes */
.article-content .ql-align-center {
    text-align: center;
}

.article-content .ql-align-right {
    text-align: right;
}

.article-content .ql-align-justify {
    text-align: justify;
}

/* ==========================================================================
   DYNAMIC STAFF DIRECTORY & ORGANIZATIONAL HIERARCHY (ทำเนียบและผังโครงสร้าง)
   ========================================================================== */

/* Page Header & Quick Jump Pills */
.staff-page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.staff-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.staff-page-subtitle {
    font-size: 1rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto;
}

.staff-nav-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.staff-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1.15rem;
    border-radius: 9999px;
    background: #ffffff;
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.staff-nav-pill:hover,
.staff-nav-pill.active {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(31, 78, 121, 0.2);
}

.staff-nav-pill i {
    color: var(--accent-gold);
    font-size: 0.95rem;
}

.staff-nav-pill:hover i {
    color: #ffd700;
}

/* --- Executive Hierarchy Tree Structure --- */
.executive-tree-section {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06);
    margin-bottom: 3.5rem;
    position: relative;
    overflow: hidden;
}

.executive-tree-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #1F4E79 0%, #D4AF37 50%, #F59E0B 100%);
}

.tree-section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.tree-section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #0f2942;
    margin-bottom: 0.35rem;
}

.tree-section-subtitle {
    font-size: 0.92rem;
    color: #64748b;
}

/* President Card (Tier 1 - Apex) */
.tree-president-wrapper {
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.tree-card-president {
    background: #ffffff;
    border-radius: 20px;
    padding: 1.75rem 2rem;
    text-align: center;
    max-width: 420px;
    width: 100%;
    border: 2px solid #D4AF37;
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.18), 0 4px 15px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.3s ease;
}

.tree-card-president:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 45px rgba(212, 175, 55, 0.28), 0 6px 20px rgba(0, 0, 0, 0.08);
}

.tree-card-president .tree-avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    overflow: hidden;
    border: 3.5px solid #D4AF37;
    outline: 3px solid rgba(212, 175, 55, 0.3);
    outline-offset: 4px;
    box-shadow: 0 8px 20px rgba(31, 78, 121, 0.15);
}

.tree-card-president .tree-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Connector Line Between President & Executives */
.tree-connector-stem {
    width: 2px;
    height: 40px;
    background: linear-gradient(180deg, #D4AF37 0%, rgba(212, 175, 55, 0.4) 100%);
    margin: 0 auto;
    position: relative;
}

.tree-connector-stem::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #D4AF37;
}

.tree-connector-fork {
    position: relative;
    width: 60%;
    max-width: 620px;
    height: 20px;
    margin: 0 auto 1.5rem;
    border-top: 2px solid rgba(212, 175, 55, 0.45);
    border-left: 2px solid rgba(212, 175, 55, 0.45);
    border-right: 2px solid rgba(212, 175, 55, 0.45);
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

/* Direct Leadership (Tier 2 - Vice President & Director) */
.tree-sub-executives {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 860px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.tree-card-sub {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.5rem;
    text-align: center;
    border: 1.5px solid rgba(212, 175, 55, 0.35);
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.08);
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tree-card-sub:hover {
    transform: translateY(-4px);
    border-color: #D4AF37;
    box-shadow: 0 14px 30px -4px rgba(31, 78, 121, 0.16), 0 0 15px rgba(212, 175, 55, 0.2);
}

.tree-card-sub .tree-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    margin: 0 auto 0.85rem;
    overflow: hidden;
    border: 3px solid #D4AF37;
    outline: 2.5px solid rgba(212, 175, 55, 0.25);
    outline-offset: 3px;
    box-shadow: 0 6px 16px rgba(31, 78, 121, 0.12);
}

.tree-card-sub .tree-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card Typography & Badges */
.tree-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.2rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 0.45rem;
}

.tree-role-badge.gold {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #854d0e;
    border: 1px solid rgba(212, 175, 55, 0.5);
}

.tree-role-badge.blue {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.tree-staff-name {
    font-size: 1.12rem;
    font-weight: 700;
    color: #0f2942;
    margin-bottom: 0.25rem;
    line-height: 1.35;
}

.tree-staff-pos {
    font-size: 0.88rem;
    font-weight: 600;
    color: #b89628;
    margin-bottom: 0.25rem;
    line-height: 1.35;
}

.tree-staff-dept {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.85rem;
}

.tree-staff-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.75rem;
    width: 100%;
}

.tree-contact-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.76rem;
    color: #475569;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    text-decoration: none !important;
    transition: all 0.2s ease;
}

.tree-contact-pill:hover {
    color: var(--primary);
    background: #e0f2fe;
    border-color: #bae6fd;
    transform: translateY(-1px);
}

.tree-contact-pill i {
    color: var(--accent-gold);
}

/* --- Department Section & Staff Cards --- */
.dept-division-section {
    margin-bottom: 3.5rem;
    scroll-margin-top: 90px;
}

.dept-banner-header {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.35rem 1.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.75rem;
    border-left: 5px solid var(--accent-gold);
}

.dept-banner-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.dept-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1F4E79 0%, #153452 100%);
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(31, 78, 121, 0.25);
}

.dept-banner-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f2942;
    margin: 0 0 0.2rem 0;
}

.dept-banner-sub {
    font-size: 0.85rem;
    color: #64748b;
    margin: 0;
}

.dept-count-badge {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1F4E79;
    background: rgba(31, 78, 121, 0.08);
    border: 1px solid rgba(31, 78, 121, 0.18);
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
}

/* Division Head (Featured Top Card in Department) */
.dept-head-showcase {
    max-width: 520px;
    margin: 0 auto 2rem;
}

.dept-head-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.35rem 1.5rem;
    border: 1.5px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 8px 24px -4px rgba(31, 78, 121, 0.12), 0 0 15px rgba(212, 175, 55, 0.15);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dept-head-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #1F4E79, #D4AF37);
}

.dept-head-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px -4px rgba(31, 78, 121, 0.18), 0 0 20px rgba(212, 175, 55, 0.25);
}

.dept-head-avatar {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid #D4AF37;
    outline: 2px solid rgba(212, 175, 55, 0.3);
    outline-offset: 3px;
    box-shadow: 0 6px 16px rgba(31, 78, 121, 0.14);
}

.dept-head-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dept-head-info {
    flex: 1;
    min-width: 0;
}

/* Staff Grid (General Staff Members) */
.dept-team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.35rem;
}

.team-staff-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.35rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.25s ease;
}

.team-staff-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.5);
    box-shadow: 0 10px 25px -3px rgba(31, 78, 121, 0.12), 0 0 12px rgba(212, 175, 55, 0.15);
}

.team-staff-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    overflow: hidden;
    background: #f8fafc;
    border: 2.5px solid #D4AF37;
    margin-bottom: 0.85rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.team-staff-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-staff-name {
    font-size: 0.98rem;
    font-weight: 700;
    color: #0f2942;
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.team-staff-pos {
    font-size: 0.82rem;
    font-weight: 500;
    color: #b89628;
    margin-bottom: 0.25rem;
    line-height: 1.35;
}

.team-staff-dept {
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .staff-page-title {
        font-size: 1.5rem;
    }
    .executive-tree-section {
        padding: 1.75rem 1rem;
    }
    .tree-connector-fork {
        width: 80%;
    }
    .tree-sub-executives {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .dept-head-card {
        flex-direction: column;
        text-align: center;
    }
    .dept-team-grid {
        grid-template-columns: 1fr;
    }
    .dept-banner-header {
        flex-direction: column;
        align-items: flex-start;
    }
}