/* ==========================================================================
   MFU MICROSITE THEME: THEME-IM
   Description: Standardized and modular styles for TYPO3 CMS & Bootstrap.
   ========================================================================== */

/* ==========================================================================
   01. THEME VARIABLES & DESIGN TOKENS (:root)
   ========================================================================== */
:root {
    --theme-primary: #00adb5;
    --theme-secondary: #222831;
    --theme-text-dark: #333333;
    --theme-white: #ffffff;
}

/* ==========================================================================
   02. HEADER & NAVIGATION
   ========================================================================== */
header .header-menu-bar {
    background-color: var(--theme-primary, #00adb5);
}

/* Default styles for menu links */
header .header-menu-bar .menu-list > li > a {
    color: #ffffff !important; /* Default text color */
    background: transparent !important; /* Default background */
    position: relative;
    transition: color 0.3s, background 0.3s;
}

/* Hover and active styles for all menu items */
header .header-menu-bar .menu-list > li:hover > a,
header .header-menu-bar .menu-list > li.active > a {
    color: #333333 !important; /* Text color for hover and active state */
    background: #ffffff !important; /* Background color for hover and active state */
    border-radius: 0.3125rem;
}

/* Submenu arrow styles */
header .header-menu-bar .menu-list > li.has-submenu > a:after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-top: 0.3125rem solid #ffffff; /* Default arrow color */
    border-left: 0.3125rem solid transparent;
    border-right: 0.3125rem solid transparent;
    transition: border-top 0.3s;
}

/* Hover and active styles for submenu arrows */
header .header-menu-bar .menu-list > li.has-submenu:hover > a:after,
header .header-menu-bar .menu-list > li.active > a:after {
    border-top: 0.3125rem solid #333333 !important; /* Arrow color for hover and active state */
}

.bg-im {
    background-color: var(--theme-primary, #00adb5);
}

/* Button: More Link with Animated SVG Arrow */
.more-link a {
    font-family: "athitimedium", sans-serif;
    font-size: 90%;
    background-color: var(--theme-primary, #00adb5);
    color: #ffffff;
    border-radius: 100px;
    padding: 6px 16px 6px 14px;
    text-decoration: none;
    transition: all 0.2s linear;
    float: right;
    box-shadow: rgba(0, 0, 0, 0.15) 1.95px 1.95px 2.6px;
    margin: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* CSS Arrow Icon via ::after pseudo-element */
.more-link a::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    background-color: #ffffff;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>') no-repeat center / contain;
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>') no-repeat center / contain;
    transition: transform 0.2s linear;
}

/* Hover States */
.more-link a:hover {
    color: #ffffff;
    background-color: var(--theme-primary, #00adb5);
    filter: brightness(0.88);
    box-shadow: rgba(0, 0, 0, 0.25) 1.95px 3px 5px;
    text-decoration: none;
}

/* Smooth Arrow Slide Effect on Hover */
.more-link a:hover::after {
    transform: translateX(4px);
}

.btn-port {
    border-radius: 0;
    -webkit-transition: all .3s;
    -moz-transition: all .3s;
    transition: all .3s
}

.btn-port.btn-porttheme {
    background: #f2f1eb;
    color: var(--theme-secondary, #222831);
    width: 100%;
    border-radius: 5px;
    text-align: left;
    font-size: 17px;
    margin: 1px 0;
    font-weight: 300;
    white-space: normal!important
}

.btn-port.btn-porttheme:hover, .btn-port.btn-porttheme:active {
    color: #FFF;
    background: var(--theme-secondary, #222831)
}

.btn-instrument {
    color: var(--theme-secondary, #222831);
    width: 100%;
    text-align: left;
    font-size: 17px;
    margin: 1px 0;
    font-weight: 300;
    white-space: normal!important;
    -webkit-transition: all .3s;
    -moz-transition: all .3s;
    transition: all .3s;
    border-left: 5px solid #8c1515
}

.btn-instrument:hover, .btn-instrument:active {
    color: #8c1515;
    border-left: 15px solid #8c1515
}

.tx-srlanguagemenu-links div a {
    border-radius:0px;
    width:50px;
    border: 0.0625rem solid #333333;
    background: #FFFFFF;
    color:#333333;
}

.tx-srlanguagemenu-links div a:hover {
     background:#333333;
     color:#ffffff;
}

.tx-srlanguagemenu-links div.CUR a {
    background: #333333;
    color:#FFFFFF;
}

.apply-now-btn, .frame-25 li a {
    background: #0BAB9F !important;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;
}

.apply-now-btn, .frame-25 li a:hover {
    background: #098D82 !important;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;
}

/* ==========================================================================
   04. TYPOGRAPHY & SECTION HEADINGS
   ========================================================================== */
.head-line2 {
   border-left: 15px solid #00686D;
   padding-left:5px;
    margin-bottom:30px;
}

.head-line2 h2 {
    font-size:3rem;
}

.head-line4 {
  text-transform: capitalize;
  margin-bottom:10px;
  border-bottom: 5px solid #ED213A;
  /* width:50%; */
}

.head-line4 h2 {
  color:#232931;
  margin-bottom:0;
  font-size: 250%;
}

.head-line4 h3 {
  border-bottom:0px;
    font-size: 150%;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: rgba(0, 0, 0, 0.4);
  padding-bottom: 10px;
  margin-bottom:0;
}

/* ==========================================================================
   05. CONTENT FRAMES & CARDS
   ========================================================================== */
/*Service Box*/
.service-box ul li a {
  padding: 15px 15px;
  color: #333333;
  background-color: #F2EBDA;
  box-shadow:none;
}

.service-box ul li a:hover {
  background: var(--theme-primary, #00adb5);
  color: #ffffff;
  text-decoration:none;
  box-shadow: rgba(0, 0, 0, 0.07) 0px 1px 1px, rgba(0, 0, 0, 0.07) 0px 2px 2px, rgba(0, 0, 0, 0.07) 0px 4px 4px, rgba(0, 0, 0, 0.07) 0px 8px 8px, rgba(0, 0, 0, 0.07) 0px 16px 16px;
}

/*Box link*/
.frame-2 ul {
  list-style-type: none;
  line-height: 20pt;
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: left;
}

.frame-2 li a {
  display: block;
  color: #213253;
  font-size: 100%;
  font-weight: 500;
  padding: 8px 16px;
  text-decoration: none;
  background: #eeeeee;
  border-radius: 5px;
  margin-top: 5px;
  margin-bottom: 5px;
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  transition: all 0.3s;
  box-shadow:none;
}

.frame-2 li a:hover {
  background-color: var(--theme-primary, #00adb5);
  color: white;
}

.servicebox {
    position: relative;
    width: 100%;
    margin-top: 30px;
}

.servicebox .table .table-cell {
    font-size: 19px;
    line-height: 1.3333333;
    border-radius: 5px;
    padding: 16px 20px;
    background: #f2f1eb;
    color: var(--theme-secondary, #222831);
    text-align: center;
    text-transform: uppercase;
}

.servicebox a {
    margin: auto;
    color: var(--theme-secondary, #222831);
    display: block;
    font-weight: 500;
}

.servicebox .table .table-cell:hover {
    -webkit-transition: all 0.3s;
    -moz-transition: all 0.3s;
    transition: all 0.3s;
    background: var(--theme-secondary, #222831);
    color: #fff;
    cursor: pointer;
}

.servicebox .table .table-cell:hover a {
    color: #fff;
    text-decoration: none;
}

.list-underline {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.list-underline li a {
  display: block;
  color: #000;
  padding: 8px 16px;
  text-decoration: none;
  background: #f2f1eb;
  margin-bottom:10px;
  transition: all 0.3s;
  border-radius: 5px;
}

.list-underline li a:hover {
  background-color: var(--theme-secondary, #222831);
  color: white;
}

.block3d {
  /* border: 2px solid #45526C; */
  padding:30px 10px;
  box-shadow: rgba(0, 0, 0, 0.1) -4px 9px 25px -6px;
  background: #F8F5F1;
  border-radius:20px;
}

.accordion-button.collapsed, .accordion-button:not(.collapsed) {
    font-size: 80%;
}

.sidemenu ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  width: 100%;
  text-align:center;
}

.sidemenu  li a {
  font-size:100%;
  display: block;
  background: #3ea3cb;
  border-radius: 5px;
  color: #ffffff;
  padding: 10px;
  text-decoration: none;
  margin-bottom: 15px;
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  transition: all 0.3s;
}

.sidemenu  li a:hover {
  background:#213253;
  color:#FFFFFF;
}

.frame-17 .card-img-3col, .frame-17 .card-img-4col { height: auto; }

.programme-container .nav-link.active {
    background: #098D82 !important;
    box-shadow: rgba(0, 0, 0, 0.1) 0px 20px 25px -5px, rgba(0, 0, 0, 0.04) 0px 10px 10px -5px;
}

/* ==========================================================================
   05. ACADEMIC PROGRAM CARDS (MFU FIRST)
   ========================================================================== */
.mfu-first { 
    padding: 40px 15px; 
    background-color: #fcfcfc; 
}
.mfu-first .row { 
    margin-left: -15px; 
    margin-right: -15px; 
}
.mfu-first .row > .col { 
    padding: 15px; 
}

.mfu-first .frame-type-text {
    background: #ffffff !important;
    border-radius: 16px !important;
    padding: 35px 25px !important;
    height: 100% !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
    border: 5px solid #ae1b1f !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
    display: flex;
    flex-direction: column;
}

.mfu-first .frame-type-text:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 12px 25px rgba(174, 27, 31, 0.1) !important;
    border-color: #a07617 !important;
}

.bg-red { 
    background: #8c1515; 
}

.program-selection-grid .col { 
    padding-bottom: 30px; 
}

/* Base Card: Square Tile on Desktop */
.program-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    aspect-ratio: 16 / 8;
    background-color: #1a0503;
    overflow: hidden;
    text-decoration: none !important;
    border: 1px solid #15858c;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

/* Background Atmosphere Image */
.program-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    filter: grayscale(20%);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.5s ease;
    z-index: 1;
}

/* Gradient Overlay: MFU Red Identity */
.program-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-image: linear-gradient(25deg, #2a2878, #3b5984, #3c8b8f, #24bf99);
    transition: opacity 0.4s ease, background 0.4s ease;
}

/* Radial Light Accent */
.program-card::before {
    content: "";
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(252, 217, 0, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
    z-index: 3;
    pointer-events: none;
}

/* Card Content Container */
.program-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    pointer-events: none;
    width: 100%;
}

/* Degree Subtitle (Bachelors, Masters) */
.program-subtitle {
    display: inline-block;
    color: #fcd900;
    font-family: "athitisemibold", sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    opacity: 0.9;
    transition: color 0.3s ease;
}

/* Degree Title */
.program-title {
    color: #ffffff;
    font-family: "athitisemibold", sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: color 0.3s ease;
}

/* Bottom Accent Line */
.program-content::after {
    content: "";
    display: block;
    width: 30px;
    height: 3px;
    background: #fcd900;
    border-radius: 2px;
    margin-top: 14px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Keyboard Focus Accessibility (WCAG 2.1 AA) */
.program-card:focus-visible {
    outline: 3px solid #fcd900;
    outline-offset: 3px;
}

/* Desktop Hover States */
@media (hover: hover) and (pointer: fine) {
    .program-card:hover img {
        opacity: 0.75;
        filter: grayscale(0%);
        transform: scale(1.05);
    }
    .program-card:hover .program-overlay {
        background: linear-gradient(135deg, rgb(30 207 169 / 50%) 0%, rgba(20, 5, 3, 0.85) 100%);
    }
    .program-card:hover .program-content::after {
        width: 50px;
        background: #ffffff;
    }
    .program-card:hover {
        border-color: rgba(252, 217, 0, 0.5);
        box-shadow: 0 15px 35px rgba(207, 45, 30, 0.25);
    }
}

/* Mobile Responsive: Converts to Compact Horizontal Bar */
@media (max-width: 767.98px) {
    .program-selection-grid .col { 
        padding-bottom: 12px; 
    }
    .program-card {
        aspect-ratio: auto;
        min-height: 52px;
        border-radius: 10px;
        justify-content: flex-start;
    }
    .program-overlay {
        background: linear-gradient(90deg, rgba(207, 45, 30, 0.92) 0%, rgba(114, 16, 8, 0.95) 100%);
    }
    .program-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 12px 18px;
        text-align: left;
    }
    .program-title {
        font-size: 1.05rem;
        line-height: 1.3;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .program-subtitle {
        margin-bottom: 0;
        margin-left: 10px;
        font-size: 0.7rem;
        letter-spacing: 1px;
        white-space: nowrap;
        order: 2;
        background: rgba(0, 0, 0, 0.25);
        padding: 3px 8px;
        border-radius: 4px;
        flex-shrink: 0;
    }
    .program-content::after { 
        display: none; 
    }
    .program-card:active { 
        transform: scale(0.98); 
        border-color: #fcd900; 
    }
}

@media (max-width: 400px) {
    .program-content { 
        padding: 10px 14px; 
    }
    .program-title { 
        font-size: 0.95rem; 
    }
    .program-subtitle { 
        font-size: 0.65rem; 
        padding: 2px 6px; 
    }
}

/* ==========================================================================
   06. TYPO3 CMS COMPONENTS & PAGINATION
   ========================================================================== */
.tx-jpfaq  h2.accordion-header {font-size:130%;}

.f3-widget-paginator>li.current a {
    background: var(--theme-primary, #00adb5);
}

.f3-widget-paginator>li>a {
    color: var(--theme-primary, #00adb5);
    border: 1px solid var(--theme-primary, #00adb5);
}

/* ==========================================================================
   07. SIDEBAR & NAVIGATION SHORTCUTS
   ========================================================================== */
.side-menu ul {
  list-style-type: none;
  font-size:110%;
  margin: 0;
  padding: 0;
  width: 100%;
}

.side-menu ul li a {
  display: block;
  background: #eeeeee;
  border-radius: 5px;  
  color: #213253;
  padding: 10px;
  text-decoration: none;
  margin-bottom: 15px;
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  transition: all 0.3s;
  border:1px #eeeeee solid;
}

.side-menu ul li a:hover {
  background:var(--theme-primary, #00adb5);
  border:1px var(--theme-primary, #00adb5)  solid;
  color:#FFFFFF;
    box-shadow: rgb(0 0 0 / 7%) 0px 1px 1px, rgb(0 0 0 / 7%) 0px 2px 2px, rgb(0 0 0 / 7%) 0px 4px 4px, rgb(0 0 0 / 7%) 0px 8px 8px, rgb(0 0 0 / 7%) 0px 16px 16px;
}

.side-menu ul li.active a {
  background: var(--theme-primary, #00adb5);
  border: 1px var(--theme-primary, #00adb5) solid;
  color:#FFFFFF;
    box-shadow: rgb(0 0 0 / 7%) 0px 1px 1px, rgb(0 0 0 / 7%) 0px 2px 2px, rgb(0 0 0 / 7%) 0px 4px 4px, rgb(0 0 0 / 7%) 0px 8px 8px, rgb(0 0 0 / 7%) 0px 16px 16px;
}

/* ==========================================================================
   08. FOOTER & SOCIAL MEDIA
   ========================================================================== */
footer {
background:var(--theme-primary, #00adb5);
}

/*Social media*/
footer .social-media-list {
    margin-bottom:100px;
    /*float:left;*/
}

footer .social-media-list ul {
    float: left;
}

footer .social-media-list ul li a {
    box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}

footer .social-media-list ul li a.facebook {
    background:#4267B2;
}

footer .social-media-list ul li a.youtube {
    background:#FF0000;
}

footer .social-media-list ul li a.twitter {
    background:#14171A;
}

footer .social-media-list ul li a.instagram {
    background:#FCAF45;
}

footer .social-media-list ul li a:hover {
    background:#333333;
}

/* ==========================================================================
   09. DARK THEME OVERRIDES
   ========================================================================== */

/* ==========================================================================
   DARK THEME OVERRIDES (Scoped via body.dark-theme & .dark-theme)
   Comprehensive Dark Mode Suite for MFU Microsites.
   Ensures WCAG AA compliance, eliminates glare, and preserves brand identity.
   ========================================================================== */

/* 1. Global Page Background & Base Typography */
body.dark-theme,
.dark-theme {
    background-color: var(--theme-dark-bg, #1a1e24) !important;
    color: #f1f5f9;
}

body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6,
.dark-theme h1,
.dark-theme h2,
.dark-theme h3,
.dark-theme h4,
.dark-theme h5,
.dark-theme h6 {
    color: #ffffff !important;
}

body.dark-theme p,
.dark-theme p {
    color: #cbd5e1;
}

body.dark-theme .head-line4 h2,
body.dark-theme .head-line-primary h2,
.dark-theme .head-line4 h2,
.dark-theme .head-line-primary h2 {
    color: #f1f5f9 !important;
}

body.dark-theme .head-line4 h3,
body.dark-theme .head-line-primary h3,
.dark-theme .head-line4 h3,
.dark-theme .head-line-primary h3 {
    color: #94a3b8 !important;
}

/* 2. Header & Main Navigation Bar */
body.dark-theme header .header-menu-bar,
.dark-theme header .header-menu-bar {
    background-color: #1a1e24 !important;
    border-bottom: 5px solid var(--theme-primary, #00adb5) !important;
}

body.dark-theme header .header-menu-bar .menu-list > li > a,
body.dark-theme .menu-list > li a,
.dark-theme header .header-menu-bar .menu-list > li > a,
.dark-theme .menu-list > li a {
    color: #f1f5f9 !important;
}

body.dark-theme header .header-menu-bar .menu-list > li:hover > a,
body.dark-theme header .header-menu-bar .menu-list > li.active > a,
.dark-theme header .header-menu-bar .menu-list > li:hover > a,
.dark-theme header .header-menu-bar .menu-list > li.active > a {
    color: #ffffff !important;
    background: var(--theme-primary, #00adb5) !important;
}

body.dark-theme header .header-menu-bar .menu-list > li.has-submenu > a::after,
.dark-theme header .header-menu-bar .menu-list > li.has-submenu > a::after {
    border-top-color: #f1f5f9 !important;
}

@media (max-width: 991px) {
    body.dark-theme header .header-primary .head-right,
    .dark-theme header .header-primary .head-right {
        background-color: #1a1e24 !important;
    }
}

/* 3. Action Buttons & Links */
body.dark-theme .more-link a,
.dark-theme .more-link a {
    background-color: var(--theme-primary, #00adb5) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .more-link a:hover,
.dark-theme .more-link a:hover {
    filter: brightness(1.15) !important;
}

body.dark-theme .btn-port.btn-porttheme,
.dark-theme .btn-port.btn-porttheme {
    background: #242a35 !important;
    color: #f1f5f9 !important;
    border: 1px solid #374151 !important;
}

body.dark-theme .btn-port.btn-porttheme:hover,
.dark-theme .btn-port.btn-porttheme:hover {
    background: var(--theme-primary, #00adb5) !important;
    color: #ffffff !important;
}

body.dark-theme .btn-instrument,
.dark-theme .btn-instrument {
    color: #cbd5e1 !important;
}

body.dark-theme .btn-instrument:hover,
.dark-theme .btn-instrument:hover {
    color: var(--theme-accent, #ffac00) !important;
}

/* 4. Service Boxes, Sidebars & Shortlists */
body.dark-theme .service-box ul li a,
body.dark-theme .box-link li a,
body.dark-theme .frame-2 li a,
body.dark-theme .frame-layout-1 li a,
.dark-theme .service-box ul li a,
.dark-theme .box-link li a,
.dark-theme .frame-2 li a,
.dark-theme .frame-layout-1 li a {
    background-color: #242a35 !important;
    color: #e2e8f0 !important;
    border: 1px solid #374151 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25) !important;
}

body.dark-theme .service-box ul li a:hover,
body.dark-theme .box-link li a:hover,
body.dark-theme .frame-2 li a:hover,
body.dark-theme .frame-layout-1 li a:hover,
.dark-theme .service-box ul li a:hover,
.dark-theme .box-link li a:hover,
.dark-theme .frame-2 li a:hover,
.dark-theme .frame-layout-1 li a:hover {
    background-color: var(--theme-primary, #00adb5) !important;
    color: #ffffff !important;
    border-color: var(--theme-primary, #00adb5) !important;
}

body.dark-theme .side-menu ul li a,
.dark-theme .side-menu ul li a {
    background: #242a35 !important;
    border-color: #374151 !important;
    color: #e2e8f0 !important;
}

body.dark-theme .side-menu ul li a:hover,
body.dark-theme .side-menu ul li.active a,
.dark-theme .side-menu ul li a:hover,
.dark-theme .side-menu ul li.active a {
    background: var(--theme-primary, #00adb5) !important;
    border-color: var(--theme-primary, #00adb5) !important;
    color: #ffffff !important;
}

body.dark-theme .sidemenu li a,
.dark-theme .sidemenu li a {
    background: #242a35 !important;
    color: #e2e8f0 !important;
    border-color: #374151 !important;
}

body.dark-theme .sidemenu li a:hover:not(.active),
.dark-theme .sidemenu li a:hover:not(.active) {
    background: #333d4d !important;
    color: #ffffff !important;
}

body.dark-theme .sidebar-intro li a,
.dark-theme .sidebar-intro li a {
    background: #242a35 !important;
    color: #e2e8f0 !important;
    border: 1px solid #374151 !important;
}

body.dark-theme .sidebar-intro li a.active,
body.dark-theme .sidebar-intro li a:hover,
.dark-theme .sidebar-intro li a.active,
.dark-theme .sidebar-intro li a:hover {
    border-left-color: var(--theme-primary, #00adb5) !important;
    background-color: #1a1e24 !important;
    color: #ffffff !important;
}

body.dark-theme .list-underline li a,
.dark-theme .list-underline li a {
    background: #242a35 !important;
    color: #e2e8f0 !important;
    border: 1px solid #374151 !important;
}

body.dark-theme .list-underline li a:hover,
.dark-theme .list-underline li a:hover {
    background-color: var(--theme-primary, #00adb5) !important;
    color: #ffffff !important;
}

/* 5. TYPO3 Frames, Cards & Document Containers */
body.dark-theme .card,
body.dark-theme .article .card,
body.dark-theme .frame-default,
body.dark-theme .frame-type-textpic,
.dark-theme .card,
.dark-theme .article .card,
.dark-theme .frame-default,
.dark-theme .frame-type-textpic {
    background-color: #202630 !important;
    border-color: #333d4d !important;
    color: #e2e8f0 !important;
}

body.dark-theme .list-manual-container > li,
.dark-theme .list-manual-container > li {
    border-bottom-color: #334155 !important;
    background-color: #202630 !important;
}

body.dark-theme .list-manual-container li a,
.dark-theme .list-manual-container li a {
    color: #f1f5f9 !important;
}

body.dark-theme .list-manual-container li a:hover,
.dark-theme .list-manual-container li a:hover {
    background-color: #2b3341 !important;
    color: #ffffff !important;
}

/* 6. News, Articles & Link Lists */
body.dark-theme .link-news a,
.dark-theme .link-news a {
    background-color: #242a35 !important;
    border-color: #374151 !important;
    color: #f1f5f9 !important;
}

body.dark-theme .link-news a:hover,
.dark-theme .link-news a:hover {
    background-color: #2e3644 !important;
    border-color: var(--theme-primary, #00adb5) !important;
}

body.dark-theme .link-news div[itemprop="headline"],
body.dark-theme .link-news h3,
body.dark-theme .link-news h4,
.dark-theme .link-news div[itemprop="headline"],
.dark-theme .link-news h3,
.dark-theme .link-news h4 {
    color: #f1f5f9 !important;
}

body.dark-theme .news-item li,
body.dark-theme .article-item li,
.dark-theme .news-item li,
.dark-theme .article-item li {
    background-color: #242a35 !important;
    border-color: #374151 !important;
}

/* 7. Tables & Data Display */
body.dark-theme .table,
body.dark-theme table,
.dark-theme .table,
.dark-theme table {
    color: #cbd5e1 !important;
    border-color: #374151 !important;
}

body.dark-theme .table th,
body.dark-theme table th,
.dark-theme .table th,
.dark-theme table th {
    background-color: #1a1e24 !important;
    color: #f1f5f9 !important;
    border-color: #374151 !important;
}

body.dark-theme .table td,
body.dark-theme table td,
.dark-theme .table td,
.dark-theme table td {
    background-color: #202630 !important;
    color: #cbd5e1 !important;
    border-color: #374151 !important;
}

/* 8. Breadcrumbs, Form Controls & Pagination */
body.dark-theme .breadcrumb,
.dark-theme .breadcrumb {
    background-color: #1a1e24 !important;
}

body.dark-theme .breadcrumb-item,
body.dark-theme .breadcrumb-item a,
.dark-theme .breadcrumb-item,
.dark-theme .breadcrumb-item a {
    color: #94a3b8 !important;
}

body.dark-theme .breadcrumb-item.active,
.dark-theme .breadcrumb-item.active {
    color: #f1f5f9 !important;
}

body.dark-theme input.form-control,
body.dark-theme select.form-control,
body.dark-theme textarea.form-control,
.dark-theme input.form-control,
.dark-theme select.form-control,
.dark-theme textarea.form-control {
    background-color: #1a1e24 !important;
    border-color: #374151 !important;
    color: #f1f5f9 !important;
}

body.dark-theme .page-link,
.dark-theme .page-link {
    background-color: #242a35 !important;
    border-color: #374151 !important;
    color: #cbd5e1 !important;
}

body.dark-theme .page-item.active .page-link,
.dark-theme .page-item.active .page-link {
    background-color: var(--theme-primary, #00adb5) !important;
    border-color: var(--theme-primary, #00adb5) !important;
    color: #ffffff !important;
}

/* 9. Footer & Social Elements */
body.dark-theme footer,
body.dark-theme .footer,
.dark-theme footer,
.dark-theme .footer {
    background-color: #14171c !important;
    color: #cbd5e1 !important;
    border-top: 1px solid #28303d !important;
}

body.dark-theme footer a,
body.dark-theme .footer a,
.dark-theme footer a,
.dark-theme .footer a {
    color: var(--theme-secondary, var(--theme-primary, #00adb5));
}

body.dark-theme footer .social-media-list ul li a:hover,
.dark-theme footer .social-media-list ul li a:hover {
    background: #374151 !important;
}

/* 10. Language Switcher */
body.dark-theme .tx-srlanguagemenu-links div a,
.dark-theme .tx-srlanguagemenu-links div a {
    background: #242a35 !important;
    border-color: #374151 !important;
    color: #e2e8f0 !important;
}

body.dark-theme .tx-srlanguagemenu-links div.CUR a,
.dark-theme .tx-srlanguagemenu-links div.CUR a {
    background: #000000 !important;
    border-color: #64748b !important;
    color: #ffffff !important;
}


.frame-14 h2::after {
    background: #00adb5 !important;
}

/* ==========================================================================
   MINIMAL STAFF CARD (Anti-Stretch & Grid Safe)
   School of Integrative Medicine (IM) Theme
   ========================================================================== */

/* Grid Column Spacing & Row Gap */
.list-staff.row,
.row.list-staff,
.list-staff .row {
    row-gap: 2.5rem !important;
    margin-left: -15px;
    margin-right: -15px;
}

.list-staff.row > .col,
.list-staff.row > [class*="col"],
.list-staff .row > .col,
.list-staff .row > [class*="col"] {
    padding-left: 15px;
    padding-right: 15px;
    display: flex;
    flex-direction: column;
}

/* 1. Base Card Container (Default: Max-width 320px & Centered)
   Prevents standalone cards outside .col from stretching full-width */
.list-staff .frame-type-textpic,
.list-staff.frame-type-textpic {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    height: 100%;
    width: 100%;
    max-width: 320px; /* Constrains standalone cards from stretching */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* When inside grid columns: expand to fill column naturally */
.list-staff.row > .col > .frame-type-textpic,
.list-staff.row > [class*="col"] > .frame-type-textpic,
.list-staff .row > .col > .frame-type-textpic,
.list-staff .row > [class*="col"] > .frame-type-textpic,
.ce_grid .col > .frame-type-textpic,
.ce_grid [class*="col"] > .frame-type-textpic,
[class*="ce_columns"] .col > .frame-type-textpic,
[class*="ce_columns"] [class*="col"] > .frame-type-textpic {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 0;
}

/* Card Hover: Stationary (No Movement), subtle border & shadow only */
.list-staff .frame-type-textpic:hover,
.list-staff.frame-type-textpic:hover {
    border-color: var(--theme-primary, #00adb5);
    box-shadow: 0 8px 24px rgba(0, 173, 181, 0.12);
}

/* Internal Layout */
.list-staff .ce-textpic {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.list-staff .ce-gallery,
.list-staff .ce-outer,
.list-staff .ce-inner,
.list-staff .ce-row,
.list-staff .ce-column {
    margin: 0;
    padding: 0;
    width: 100%;
}

/* 2. Photo Frame: Crisp sizing & smooth zoom effect */
.list-staff figure.image {
    margin: 1.5rem auto 0 auto !important;
    padding: 0;
    width: 140px;
    height: 185px;
    border-radius: 8px;
    overflow: hidden; /* Clips the zoomed photo cleanly */
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
}

.list-staff figure.image img.image-embed-item {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Only the Photo Animates on Card Hover */
.list-staff .frame-type-textpic:hover figure.image img.image-embed-item,
.list-staff.frame-type-textpic:hover figure.image img.image-embed-item {
    transform: scale(1.08);
}

/* 3. Text Section */
.list-staff .ce-bodytext {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem 1rem 1.5rem 1rem;
    background: transparent;
}

/* Staff Name */
.list-staff .ce-bodytext h4,
.list-staff .ce-bodytext h5 {
    margin: 0 0 0.4rem 0;
    font-family: "athitisemibold", sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--theme-secondary, #222831);
    transition: color 0.25s ease;
}

.list-staff .ce-bodytext h4 a,
.list-staff .ce-bodytext h5 a {
    color: inherit;
    text-decoration: none;
}

.list-staff .frame-type-textpic:hover .ce-bodytext h4,
.list-staff .frame-type-textpic:hover .ce-bodytext h5 {
    color: var(--theme-primary, #00adb5);
}

/* Position / Role */
.list-staff .ce-bodytext p:nth-of-type(1) {
    margin: 0 0 0.85rem 0;
    font-family: "athitimedium", sans-serif;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #64748b;
}

/* 4. Minimal Contact Badge (<br> line breaks & link font fixed) */
.list-staff .ce-bodytext p:nth-of-type(2) {
    margin-top: auto;
    margin-bottom: 0;
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-family: "athitimedium", sans-serif !important;
    font-size: 0.88rem;
    line-height: 1.6;
    color: #475569;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #edf2f7;
    text-align: center;
    display: block; /* Enables clean line break between email and details */
    white-space: normal;
    word-break: normal;
    overflow-wrap: anywhere;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

/* Force same font family for all links & text inside contact badge */
.list-staff .ce-bodytext p:nth-of-type(2) a,
.list-staff .ce-bodytext p:nth-of-type(2) span {
    font-family: "athitimedium", sans-serif !important;
    font-size: 0.88rem;
    color: var(--theme-primary, #00adb5);
    text-decoration: none;
    display: inline-block;
    margin-top: 2px;
    transition: color 0.2s ease;
}

.list-staff .ce-bodytext p:nth-of-type(2) a:hover {
    color: var(--theme-secondary, #222831);
    text-decoration: underline;
}

.list-staff .frame-type-textpic:hover .ce-bodytext p:nth-of-type(2) {
    background: #f0fbfc;
    border-color: #d8f3f5;
}

.list-staff .ce-bodytext p:nth-of-type(2) img {
    width: 15px !important;
    height: 15px !important;
    vertical-align: -2px;
    margin-right: 4px;
    display: inline-block;
    flex-shrink: 0;
}

/* Accessibility: Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .list-staff figure.image img.image-embed-item {
        transition: none !important;
        transform: none !important;
    }
}

/* ==========================================================================
   SUBPAGE NAVIGATION NAVBAR (.social-box / .frame-type-menu_subpages)
   Fullwidth sub-navigation bar module for MFU Microsites & TYPO3.
   
   Features:
   - Fullwidth banner bar with distinct background separating title and content
   - Touch-friendly horizontal scroll on mobile; centered wrap on desktop
   - Premium button pills with subtle depth, hover elevation, and smooth transitions
   - School of Sinology brand palette (Chinese Red: #AE1B1F)
   - Multi-state active detection (.cur, .active, [aria-current="page"])
   - Full Dark Theme support (body.dark-theme) adhering to WCAG AA contrast
   ========================================================================== */

/* 1. Main Navigation Bar Container */
.social-box,
.social-box .frame-type-menu_subpages {
    width: 100%;
    margin: 1.5rem 0 2.5rem 0;
    padding: 0;
    box-sizing: border-box;
}

.social-box .frame-type-menu_subpages {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.65rem 0.85rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* 2. Menu List Layout (Mobile First: Touch-Friendly Smooth Scroll) */
.social-box ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0.25rem 0.15rem !important;
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* Custom Scrollbar for Webkit Browsers */
.social-box ul::-webkit-scrollbar {
    height: 4px;
}

.social-box ul::-webkit-scrollbar-track {
    background: transparent;
}

.social-box ul::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* 3. List Item Elements */
.social-box ul li {
    display: inline-block !important;
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    width: auto !important;
}

/* 4. Subpage Action Buttons */
.social-box li a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.15rem !important;
    background-color: #ffffff;
    color: #475569 !important;
    border: 1px solid #e2e8f0;
    border-radius: 8px !important;
    font-family: 'athitisemibold', 'Prompt', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    text-decoration: none !important;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    cursor: pointer;
}

.social-box li a span {
    display: inline-block;
    transition: transform 0.2s ease;
}

/* Hover & Focus State */
.social-box li a:hover {
    background-color: #fff1f2 !important;
    color: var(--theme-primary, #AE1B1F) !important;
    border-color: var(--theme-primary, #AE1B1F) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(174, 27, 31, 0.14);
}

.social-box li a:focus-visible {
    outline: 2px solid #AE1B1F;
    outline-offset: 2px;
}

/* Active / Current Page State */
.social-box li.cur a,
.social-box li.active a,
.social-box li a.cur,
.social-box li a.active,
.social-box li a[aria-current="page"] {
    background: linear-gradient(135deg, var(--theme-primary, #AE1B1F) 0%, #891216 100%) !important;
    color: #ffffff !important;
    border-color: #891216 !important;
    box-shadow: 0 4px 14px rgba(174, 27, 31, 0.35) !important;
    font-weight: 700 !important;
    cursor: default;
    transform: none;
}

.social-box li.cur a:hover,
.social-box li.active a:hover,
.social-box li a.cur:hover,
.social-box li a.active:hover {
    color: #ffffff !important;
    transform: none;
}

/* 5. Desktop Layout & Media Queries */
@media (min-width: 992px) {
    .social-box .frame-type-menu_subpages {
        padding: 0.85rem 1.25rem;
        border-radius: 16px;
    }

    .social-box ul {
        flex-wrap: wrap !important;
        /* justify-content: center; */
        white-space: normal;
        gap: 0.65rem 0.75rem;
    }

    .social-box li a {
        font-size: 1rem !important;
        padding: 0.6rem 1.25rem !important;
    }
}


/* ==========================================================================
   06. DARK THEME COMPATIBILITY (body.dark-theme)
   ========================================================================== */
body.dark-theme .social-box .frame-type-menu_subpages,
.dark-theme .social-box .frame-type-menu_subpages {
    background: #1e293b !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .social-box ul::-webkit-scrollbar-thumb,
.dark-theme .social-box ul::-webkit-scrollbar-thumb {
    background: #475569;
}

body.dark-theme .social-box li a,
.dark-theme .social-box li a {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

body.dark-theme .social-box li a:hover,
.dark-theme .social-box li a:hover {
    background-color: #381519 !important;
    color: #fca5a5 !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25) !important;
}

body.dark-theme .social-box li.cur a,
body.dark-theme .social-box li.active a,
body.dark-theme .social-box li a.cur,
body.dark-theme .social-box li a.active,
body.dark-theme .social-box li a[aria-current="page"],
.dark-theme .social-box li.cur a,
.dark-theme .social-box li.active a,
.dark-theme .social-box li a.cur,
.dark-theme .social-box li a.active,
.dark-theme .social-box li a[aria-current="page"] {
    background: linear-gradient(135deg, #AE1B1F 0%, #891216 100%) !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
    box-shadow: 0 4px 16px rgba(174, 27, 31, 0.5) !important;
}