header .header-primary .action-menu-list .action-menu-item a.primary-link {
    background-color: #333333;
    border-color: #333333;
    color: #FFFFFF;
}

header .header-primary .action-menu-list .action-menu-item a.primary-link:hover {
    background-color: #CF2D1E;
    border-color: #CF2D1E;
    color: #FFFFFF;
}

.language-toggle {
    display: flex;
    gap: 4px;
}

.language-link {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: #e9ecef;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    border: 1px solid #ced4da;
    border-radius: 0; /* Square shape */
    transition: background-color 0.3s, color 0.3s;
}

.language-link:hover {
    background-color: #d6d8db;
    color: #212529;
}

.language-link.active {
    background-color: #8c1515;
    color: white;
    border-color: #8c1515;
}

header .header-menu-bar .menu-list > li > a {
    font-size: 1.15rem;
}

header .header-menu-bar .menu-list > li.active > a {
    background-color: #b58f64;
}

header .header-menu-bar .menu-list > li.has-submenu .dropdown-menu li a {
    font-size: 1.15rem;
}

header .header-menu-bar .menu-list > li.has-submenu > a {
    padding-right: 1rem;
}

/* header .header-menu-bar .menu-list > li > a { font-size: 0.95rem; }
header .header-menu-bar .menu-list > li.has-submenu .dropdown-menu li a { font-size: 0.85rem; }
header .header-primary .head-shortcut-menu li a { font-size: 15px; }
*/

/* * Minimalist Quick Menu Styles 
 * Focus on clean typography and subtle interaction
 * -------------------------------------------
 */

header .header-primary .head-shortcut-menu {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05); /* Softer divider */
}

header .header-primary .head-shortcut-menu ul {
    display: flex;
    justify-content: flex-end; /* Align to right for a cleaner look */
    gap: 5px;
    padding: 0;
    margin: 0;
}

header .header-primary .head-shortcut-menu li {
    list-style: none;
}

header .header-primary .head-shortcut-menu li a {
    font-family: "athitimedium", sans-serif; /* Lighter weight for minimal feel */
    padding: 6px 15px;
    font-size: 1.1rem;
    color: #666; /* Neutral color */
    border-radius: 50px; /* Pill shape for modern look */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-block;
}

/* Minimal Hover: Soft background tint */
header .header-primary .head-shortcut-menu li a:hover {
    background: rgba(207, 45, 30, 0.08); /* Faint red tint */
    color: #cf2d1e;
    transform: translateY(-1px);
}

/* --- Mobile View Enhancements --- */
@media (max-width: 991px) {
    .head-shortcut-menu {
        background-color: #ffffff !important; /* Switch to clean white on mobile */
        padding: 10px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

    .head-shortcut-menu ul {
        display: grid !important; /* Use Grid for perfect alignment */
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .head-shortcut-menu li {
        width: 100% !important;
        border: none !important; /* Remove borders */
    }

    .head-shortcut-menu li a {
        text-align: center;
        color: #333 !important;
        background: #f8f8f8; /* Soft button background */
        padding: 12px;
        border-radius: 12px;
        font-size: 0.95rem !important;
    }

    .head-shortcut-menu li a:hover {
        background: #cf2d1e !important;
        color: #ffffff !important;
    }
}

@media (max-width: 1024px) {
    header .header-primary .head-shortcut-menu li a {
        font-size: 0.85rem;
        padding: 5px 10px;
    }
}

/* --- Campus Button --- */
/* 1. Target the row and create a grid layout */
.btn-grid-container {
    display: grid !important;
    /* 3-column grid (Desktop) with equal height items */
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    align-items: stretch;
    gap: 20px;
}

/* 2. Neutralize CMS wrappers that break the height */
.btn-grid-container .col,
.btn-grid-container .frame,
.btn-grid-container .ce-textpic,
.btn-grid-container .ce-bodytext,
.btn-grid-container .frame-type-text p,
.btn-grid-container .ce-bodytext p {
    display: contents !important; 
}

/* 3. Button Styling */
.campus-btn {
    font-family: "athitisemibold", sans-serif;
    font-weight: normal;
    font-size: 1.1rem;
    line-height: 1.4;
    color: #2b2c27 !important;
    text-decoration: none !important;
    display: flex !important;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 80px; 
    height: 100%; /* Fill Grid cell */
    padding: 20px 45px 20px 20px;
    background: #F8FAFC;
    border-radius: 12px;
    border: 2px solid #BDB395;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

/* 4. Arrow Right Icon */
.campus-btn::after {
    content: '>'; /* Minimalist Chevron */
    position: absolute;
    right: 20px;
    font-size: 1.5rem;
    font-weight: 300;
    color: #BDB395;
    line-height: 1;
    transition: transform 0.3s ease, color 0.3s ease;
}

.campus-btn:hover::after {
    transform: translateX(5px) scale(1.1);
    color: #8e1c12;
}

.campus-btn:hover {
    border-color: #8e1c12;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

/* Optimized Grid for Mobile Devices */
@media screen and (max-width: 767px) {
    .btn-grid-container {
        /* 2 columns on small screens instead of 1 */
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 5px;
        margin: 2px;
    }
    
    .campus-btn {
        font-size: 0.9rem;
        padding: 10px;
        min-height: 0px;
    }

    .campus-btn::after {
        display: none;
    }
}

.more-link a {
    font-family: 'athitiregular', sans-serif;
    background: #8c1515;
    color: #FFFFFF;
    padding: 5px 15px;
    border-radius: 10px;
}

.more-link a:hover {
    background: #cf2d1e;
    color: #FFFFFF;
}

/* Heading Styles */
.frame-6 {
    display: inline-block;
    background-color: #cf2d1e;
    padding: 7px 15px 0 15px;
    margin-bottom: 10px;
    margin-top: 10px;
}

.frame-6 h2 {
    color: #FFFFFF;
}

.head-line2 {
    border-left: 15px solid #cf2d1e;
    padding-left: 5px;
}

.head-line3 {
    overflow: hidden;
    border-bottom: 3px solid #cf2d1e;
    margin-bottom: 20px;
}

.head-line3 h2 {
    display: inline-block; 
    background-color: #cf2d1e; 
    margin-bottom: 0; 
    color: #ffffff; 
    padding: 3px 20px 2px 11px;
    font-size: 1.2em;
}

.head-line4 {
    text-transform: capitalize;
    margin-bottom: 10px;
    border-bottom: 5px solid #cf2d1e;
    width: 100%;
}

.head-line4 h2 {
    color: #232931;
    font-size: 2rem;
}

.head-line4 h3 {
    border-bottom: 0px;
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: rgba(0, 0, 0, 0.4);
    padding-bottom: 10px;
    margin-bottom: 0;
}

/* Frame 21 Landing Button Grid */
.frame-21 ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px;
    padding: 0;
    list-style: none;
    margin: 0;
}

.frame-21 ul li {
    border-radius: 20px;
}

.frame-21 ul li a {
    display: block;
    padding: 15px 20px;
    font-size: 1.2rem;
    text-align: center;
    color: #FFFFFF;
    background-image: linear-gradient(25deg, #4e1919, #752c2e, #9e4145, #c9575d);
    border-radius: 30px;
    box-shadow: rgba(0, 0, 0, 0.17) 0px -23px 25px 0px inset, 0px -36px 30px 0px inset rgba(0, 0, 0, 0.15);
}

.frame-21 ul li a:hover {
    background-image: linear-gradient(25deg, #4e1919, #752c2e, #9e4145, #c9575d);
    color: #fff;
    transform: translateY(-5px);
}

@media (max-width: 991px) and (min-width: 576px) {
    .frame-21 ul {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .frame-21 ul li a { font-size: 0.9rem; }
}

@media (max-width: 575px) {
    .frame-21 ul { grid-template-columns: 1fr !important; }
    .frame-21 ul li a { font-size: 0.9rem; }
}

/* Degree Menu Card */
.container-card {
    position: relative;
    width: 100%;
}

.image-card {
    display: block;
    width: 100%;
    height: auto;
    padding: 0;
    margin-bottom: 10px;
}

.overlay-card {
    position: absolute;
    top: 0; bottom: 0; left: 0; right: 0;
    height: 100%;
    width: 100%;
    opacity: 0;
    transition: .5s ease;
    background-image: linear-gradient(25deg, #701900, #9c2a1b, #cb3d33, #fc504c);
}

.container-card:hover .overlay-card {
    opacity: 90%;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 30px 60px -12px;
}

.text-card {
    color: white;
    font-size: 2em;
    font-family: "athitimedium", sans-serif;
    font-weight: 600;
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

/* Holiday Cards */
.holiday-card-official {
    border: 1px solid #dee2e6;
    border-radius: 12px;
    background: #ffffff;
    height: 100%;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.holiday-card-official:hover {
    border-color: #cccccc;
    background: #F6F5F2;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.bg-highlight-special { background-color: #fffaf0; }
.bg-highlight-festival { background-color: #f0f7ff; }

/* Past events styling */
.past-event {
    opacity: 0.5;
    filter: grayscale(1);
    pointer-events: none;
    background-color: #f9f9f9 !important;
}

/* Operation Manual List Styles */
.list-manual-container, .list-manual-container ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.list-manual-container > li {
    border-bottom: 1px solid #ececec;
    background-color: #ffffff;
}

.list-manual-container li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
}

/* Indent for nested levels */
.list-manual-container li ul li a {
    padding-left: 40px;
    position: relative;
}

/* PDF Tag Style */
.list-manual-container li a::after {
    content: 'PDF';
    font-size: 10px;
    font-weight: 800;
    color: #fff;
    background: #d9534f;
    padding: 2px 6px;
    border-radius: 3px;
    opacity: 0;
    transform: translateX(5px);
    transition: all 0.2s ease;
}

.list-manual-container li a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* --- Organization List Styles --- */

/* Main container reset */
.mfu-organization {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

/* Item container with border and spacing */
.org-item {
    border-bottom: 1px solid #eee;
    background-color: #fff;
    transition: background-color 0.2s ease;
}

.org-item:hover {
    background-color: #fcfcfc;
}

/* Main layout: Flex direction changes on mobile */
.org-item-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    gap: 1.5rem;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

/* Link area for School Name */
.org-main-link {
    text-decoration: none;
    color: #333;
    flex: 1; /* Occupy remaining space */
    min-width: 250px;
}

.org-details h4 {
    margin: 0;
    font-size: 1.1rem;
    color: #cf2d1e; /* Example MFU Theme Color */
}
.org-details h4:hover{
    color: #ad8a50;
    text-decoration: underline;
}

.org-details small {
    display: block;
    color: #666;
    margin-top: 2px;
}

/* Contact information section */
.org-contact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 280px;
}

.contact-row {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.contact-link {
    text-decoration: none;
    color: #555;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-link:hover {
    color: #ad8a50;
    text-decoration: underline;
}

/* Email group with Copy Button */
.email-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-copy {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.btn-copy:hover {
    color: #ad8a50;
    background-color: #f0f0f0;
}

/* Nested sub-groups (e.g., Dental Clinic) */
.sub-group {
    list-style: none;
    padding-left: 2rem;
    background-color: #f9f9f9;
}

.sub-group .org-item {
    border-bottom: 1px solid #e0e0e0;
}

/* --- Responsive Adjustments --- */

@media (max-width: 768px) {
    .org-item-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .org-contact {
        min-width: 100%;
        padding-top: 10px;
        border-top: 1px dashed #eee;
    }
    
    .sub-group {
        padding-left: 1rem;
    }
}

/* Degree/Programme List from page menu element */
.list-programme { padding-top: 20px; }

.list-programme .frame-type-menu_pages {
    border: none;
    background: transparent;
    padding: 15px;
    margin-bottom: 20px;
}

.list-programme h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #cf2d1e;
    border-bottom: 2px solid #eee;
}

/* Programme item list */
.list-programme ul { list-style: none; padding: 0; }

.list-programme ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    text-decoration: none;
    color: #333333;
    transition: all 0.2s ease;
}

.list-programme ul li a:hover { color: #8e1c12 !important; }

/* ============================================================
   MFU PROGRAMME PAGE MASTER BUNDLE
   ============================================================ */

/* --- 1. TAB NAVIGATION --- */
.programme-container .tab-navigation {
    position: relative;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    width: 100%;
}

.programme-container .nav-tabs {
    width: 100%;
    border-bottom: none !important;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 12px;
    padding: 10px;
    background: #f4f4f4;
    border-radius: 18px;
    /* Add right padding to prevent button from overlapping last item */
    padding-right: 50px !important;
}

.programme-container .nav-link.active {
    background: #cf2d1e !important;
    color: #ffffff !important;
    box-shadow: 0 8px 16px rgba(142, 28, 18, 0.25);
    transform: scale(1.02);
}

/* Fix: Scroll button class for interactivity */
.tab-scroll-btn {
    position: absolute;
    right: 15px;
    width: 32px;
    height: 32px;
    background: #8e1c12;
    color: white;
    border: none;
    border-radius: 50%;
    display: none; /* Displayed via JS when menu overflows */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    animation: arrowBounce 2s infinite;
}

/* --- 2. PREMIUM COURSE & FEE TABLE --- */
.programme-container .header-total td {
    background: #b58f64 !important;
    color: #ffffff !important;
    padding: 18px 25px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(181, 143, 100, 0.3);
}

.programme-container .td-credits {
    text-align: right;
    font-family: 'athitibold', sans-serif;
    color: #8e1c12;
    width: 140px;
}

/* --- 3. TAB SCHOOL PROGRAMME --- */
.sch-programme .nav-tabs {
    border-bottom: none !important;
    background-color: #f5f5f5;
    padding: 6px;
    border-radius: 50px;
    display: inline-flex !important;
    width: 100%;
}

.sch-programme .nav-link.active {
    color: #CF2D1E !important;
    background-color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08) !important;
}

.sch-programme .ce-tab-pane ul li ul li a:hover {
    background: #fff5f5;
    border-color: #CF2D1E;
    color: #CF2D1E !important;
    padding-left: 30px;
}

/* --- 4. NEWSLETTER CONTAINER --- */
/* Focus on existing structure + text visibility */
.newsletter-container figure {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    /* Keep the shadow and transitions as preferred */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

/* Fix: Force figcaption to display simply without extra complex effects */
.newsletter-container figcaption {
    display: block !important;
    padding-top: 15px !important;
}

/* Lifting effect on hover */
.newsletter-container article:hover figure {
    transform: translateY(-50px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.12);
}

/* LANDING PAGE --- */
/* --- 2. FULLPAGE WRAPPER --- */
.mfu-landing-page {
    position: relative;
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px; /* Space for the overlapping effect */
    box-sizing: border-box;

}

/* --- 3. CONTAINER SETUP --- */
.selection-container {
    width: 100%;
    max-width: 1140px; /* Fixed base width to manage calculations */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* --- 4. BANNER (Lower Layer) --- */
.banner-wrapper {
    width: 100%;
    line-height: 0;
    z-index: 999;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.landing-banner {
    width: 100%;
    height: auto;
    display: block;
}

/* --- 5. OVERLAPPING CARD (Top Layer) --- */
.lang-selection-card {
    background: #ffffff;
    /* Dimensional overlap: slightly wider than the banner but safe within the screen */
    width: calc(100% + 60px); 
    margin-top: -50px; /* Pull the card up over the banner */
    padding: 40px;
    border-radius: 20px;
    z-index: 2;
    
    /* Shadow for depth */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
    text-align: center;
}

/* --- 6. BUTTONS --- */
.lang-btn {
    font-family:'athitisemibold',sans-serif;
    font-size:1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #8B1D1D;
    color: #ffffff !important;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
}

.lang-btn:hover {
    background-color: #a32424;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* --- 7. RESPONSIVE FIX --- */
@media (max-width: 1024px) {
    /* On smaller screens, we reduce the overlap width to prevent side-clipping */
    .lang-selection-card {
        width: 100%;
        margin-top: -30px;
        padding: 30px 20px;
    }
    
    .mfu-landing-page {
        padding: 10px 15px;
    }
    .lang-btn{
        font-size:1rem;
    }
}