/* ==========================================================================
   MFU MICROSITE THEME: THEME-CAS
   Description: Standardized and modular styles for TYPO3 CMS & Bootstrap.
   ========================================================================== */

/* ==========================================================================
   01. THEME VARIABLES & DESIGN TOKENS (:root)
   ========================================================================== */
:root {
    --theme-primary: #2b3990;
    --theme-secondary: #0046bf;
    --theme-text-dark: #333333;
    --theme-white: #ffffff;
}

/* ==========================================================================
   02. HEADER & NAVIGATION
   ========================================================================== */
header .header-menu-bar {
    background-color: var(--theme-primary, #2b3990);
}

/* 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 */
}

/* Button: More Link with Animated SVG Arrow */
.more-link a {
    font-family: "athitimedium", sans-serif;
    font-size: 90%;
    background-color: var(--theme-primary, #2b3990);
    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, #2b3990);
    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);
}

/* ==========================================================================
   CAS LANDING PAGE STYLING (.cas-landing)
   No TYPO3 classes used - pure semantic selectors
   ========================================================================== */

/* Full-Height Centered Landing Container with Royal Ambient Background */
body:has(.cas-landing),
body.page-news-template:has(.cas-landing) {
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 28%, #ffffff 0%, #f7f4ee 45%, #ede5d5 100%) !important;
    background-attachment: fixed !important;
}

.cas-landing {
    /* display: flex; */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 36px 20px;
    margin: 0 auto;
    text-align: center;
    box-sizing: border-box;
    background: transparent;
}

body:has(.cas-landing) main,
body:has(.cas-landing) .container-fluid,
body:has(.cas-landing) .row,
body:has(.cas-landing) .col-12 {
    min-height: 100vh;
    background: transparent !important;
}

.cas-landing p {
    margin: 0;
    padding: 0;
    text-align: center;
    width: 100%;
}

/* Tribute Image (No fixed max-width, scales naturally) */
.cas-landing img {
    height: auto;
    /* max-height: 72vh; */
    display: block;
    margin: 0 auto;
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

@media (hover: hover) {
    .cas-landing img:hover {
        transform: translateY(-3px);
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.15);
    }
}

/* Enter Site Action Button (.enter-site) - No fixed max-width */
.cas-landing .enter-site,
ul.enter-site {
    list-style: none !important;
    padding: 0 !important;
    margin: 30px auto 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
}

.cas-landing .enter-site li,
ul.enter-site li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    display: inline-flex;
    justify-content: center;
}

.cas-landing .enter-site a,
ul.enter-site a {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 0 72px 0 32px;
    background: linear-gradient(135deg, #27308d 0%, #1a2266 100%);
    color: #ffffff !important;
    font-family: 'athitimedium', sans-serif;
    font-size: 1.35rem;
    font-weight: 500;
    text-decoration: none !important;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(39, 48, 141, 0.3);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-sizing: border-box;
}

.cas-landing .enter-site a::after,
ul.enter-site a::after {
    content: "TH";
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #d4a754 0%, #be955c 100%);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: Arial, sans-serif;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, background 0.3s ease;
}

/* ==========================================================================
   04. TYPOGRAPHY & SECTION HEADINGS
   ========================================================================== */
.head-line2 {
   border-left: 15px solid #cf2d1e;
   padding-left:5px;
}

/*Highlight Headline*/
.frame-14 h2 {
    position: relative !important;
    /* Sets anchoring context for the gradient line */
    border-bottom: 0px none transparent !important;
    /* Forcibly kills the old native border-bottom */
    border-bottom-width: 0px !important;
    /* Fail-safe override for stubborn system themes */
    font-size: 36px !important;
    color: #333333 !important;
    padding-bottom: 18px !important;
    /* Gives breathing room for the absolute gradient line */
    margin-bottom: 25px !important;
}

/* Beautiful Premium Gradient Underline */
.frame-14 h2::after {
    content: "" !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 10px !important;
    /* Sleek modern height */
    background-image: linear-gradient(25deg, #001855, #0a438a, #0d72c3, #02a4ff);
    /* MFU Red to Gold */
    border-radius: 10px !important;
    /* Soft premium rounded corners */
}

/* Main Container Wrapper */
.PageTitle {
  padding-left: 1.25rem;
  margin-bottom: 2rem;
  border-left: 3px solid #94a3b8;
}

/* Main Heading (h2) */
.PageTitle h2 {
  font-family: 'athitisemibold', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 0.35rem 0;
}

/* Subheading (h3) */
.PageTitle h3 {
  font-size: 1.2rem;
  font-weight: 400;
  color: #64748b;
  margin: 0;
  letter-spacing: 0.02em;
}

/* ==========================================================================
   05. CONTENT FRAMES & CARDS
   ========================================================================== */
.service-box ul li a {
  padding: 20px;
}

.service-box ul li a:hover {
  background: #2B3390;
}

/* ==========================================================================
   06. TYPO3 CMS COMPONENTS & PAGINATION
   ========================================================================== */
.f3-widget-paginator>li.current a {
    background: var(--theme-secondary, #0046bf);
}

.f3-widget-paginator>li a:hover {
    background: var(--theme-secondary, #0046bf);
    color:#ffffff;
}

.f3-widget-paginator>li>a {
    color: var(--theme-secondary, #0046bf);
    border: 1px solid var(--theme-secondary, #0046bf);
}

/* ==========================================================================
   07. SIDEBAR & NAVIGATION SHORTCUTS
   ========================================================================== */
/*Box link*/
.box-link ul {
  list-style-type: none;
  line-height: 20pt;
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: left;
}

.box-link li a {
  display: block;
  color: #333333;
  font-size: 110%;
  padding: 8px 14px;
  text-decoration: none;
  background: #f2f2f2;
  border-radius: 15px;
  border:#CED4DA solid 1px;
  margin-top: 5px;
  margin-bottom: 5px;
  -webkit-transition: all 0.3s;
  -moz-transition: all 0.3s;
  transition: all 0.3s;
  box-shadow: none;
}

.box-link li a:hover {
  background-color: #CF2D1E;
  color: white;
  border:1px solid #CF2D1E;
}

.side-menu ul li a {
    border: 0.0625rem solid #f2f2f2;
    margin-bottom: 5px;
    padding: 10px;
    border-radius: 17px;
}

.side-menu ul li a:hover {
    background:#f2f2f2;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
}

.side-menu ul li.active a {
    color: #ffffff;
    background:var(--theme-primary, #2b3990);
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
    border:1px solid var(--theme-primary, #2b3990);
}

/* ==========================================================================
   08. FOOTER & SOCIAL MEDIA
   ========================================================================== */
footer {background: var(--theme-primary, #2b3990);}

/* ==========================================================================
   09. DARK THEME OVERRIDES
   ========================================================================== */


/* ==========================================================================
   CENTRAL STAFF LIST CARDS (.list-staff)
   Standardized 4:6 (6:4 Portrait) Profile Card Module for MFU Microsites & TYPO3.
   Features:
   - Standard 4:6 portrait aspect-ratio photo with elegant rounded corners (12px)
   - Centered card presentation with equal-height alignment across grid columns
   - Support for both image cards (.frame-type-textpic) and text cards (.frame-type-text)
   - Support for standalone leader / manager card (.list-staff > .frame)
   - Clean typographic hierarchy (Name h4, Title & Affiliation p, Duties ul/li)
   - Smooth card elevation and subtle image zoom on hover
   - Full Dark Theme compatibility (body.dark-theme)
   ========================================================================== */

/* 1. Main Grid & Card Alignment */
.list-staff,
.list-staff.row,
.list-staff .row {
    row-gap: 1.5rem !important;
    margin-bottom: 2rem;
}

.list-staff > .col {
    display: flex;
    align-items: stretch;
}

/* 2. Staff Card Container */
.list-staff .frame-type-textpic,
.list-staff .frame-type-text,
.list-staff .frame {
    width: 100%;
    height: 100%;
    margin: 0 !important;
    background: #ffffff;
    border-radius: 16px;
    padding: 1.75rem 1.5rem !important;
    border: 1px solid #eef2f6;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    box-sizing: border-box;
}

/* Card Hover Elevation */
.list-staff .frame-type-textpic:hover,
.list-staff .frame-type-text:hover,
.list-staff .frame:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
    border-color: rgba(66, 103, 178, 0.25);
}

/* 3. Standalone Manager / Leader Card Center Alignment */
.list-staff > .frame-type-textpic,
.list-staff > .frame-type-text,
.list-staff > .frame {
    max-width: 480px;
    margin: 0 auto 2rem auto !important;
}

/* 4. Staff Profile Image (4:6 / 6:4 Portrait Ratio) */
.list-staff .ce-textpic {
    width: 100%;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
}

.list-staff .ce-gallery {
    margin-bottom: 1.25rem !important;
    display: flex;
    justify-content: center;
    width: 100%;
}

.list-staff .ce-outer,
.list-staff .ce-inner,
.list-staff .ce-row,
.list-staff .ce-column {
    margin: 0 !important;
    padding: 0 !important;
    width: 100%;
    display: flex;
    justify-content: center;
}

.list-staff figure.image {
    margin: 0 auto !important;
    width: 160px !important;
    max-width: 100%;
    aspect-ratio: 4 / 6 !important;
    border-radius: 12px !important;
    overflow: hidden;
    border: 4px solid #f8fafc;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
    position: relative;
    background: #f1f5f9;
}

.list-staff img.image-embed-item {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 4 / 6 !important;
    object-fit: cover !important;
    object-position: top center;
    border-radius: 0 !important;
    display: block;
    transition: transform 0.35s ease;
}

/* Subtle Image Zoom on Hover */
.list-staff .frame-type-textpic:hover img.image-embed-item,
.list-staff .frame:hover img.image-embed-item {
    transform: scale(1.05);
}

/* 5. Staff Information Content Area (.ce-bodytext & .frame-type-text) */
.list-staff .ce-bodytext,
.list-staff .frame-type-text {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Staff Name & Headings */
.list-staff .ce-bodytext h3,
.list-staff .ce-bodytext h4,
.list-staff .ce-bodytext h5,
.list-staff .ce-bodytext strong,
.list-staff .frame-type-text h3,
.list-staff .frame-type-text h4,
.list-staff .frame-type-text h5,
.list-staff .frame-type-text strong {
    font-family: 'athitisemibold', 'Prompt', sans-serif !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: var(--theme-primary, #0a4a5c) !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.35 !important;
}

.list-staff .ce-bodytext h3 a,
.list-staff .ce-bodytext h4 a,
.list-staff .ce-bodytext h5 a,
.list-staff .frame-type-text h3 a,
.list-staff .frame-type-text h4 a,
.list-staff .frame-type-text h5 a {
    color: inherit !important;
    text-decoration: none !important;
}

/* Position, Department & Contact Details */
.list-staff .ce-bodytext p,
.list-staff .frame-type-text p {
    font-family: 'athitimedium', 'Prompt', sans-serif !important;
    font-size: 0.95rem !important;
    color: #64748b !important;
    line-height: 1.55 !important;
    margin: 0 0 8px 0 !important;
}

.list-staff .ce-bodytext p:empty,
.list-staff .frame-type-text p:empty {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Email and Contact Links */
.list-staff .ce-bodytext a,
.list-staff .frame-type-text a {
    color: var(--theme-secondary, #a30b2e);
    text-decoration: none;
    word-break: break-all;
    transition: color 0.2s ease;
}

.list-staff .ce-bodytext a:hover,
.list-staff .frame-type-text a:hover {
    color: var(--theme-primary, #0a4a5c);
    text-decoration: underline;
}

/* Academic Activities & Duty List */
.list-staff .ce-bodytext ul,
.list-staff .ce-bodytext ol,
.list-staff .frame-type-text ul,
.list-staff .frame-type-text ol {
    list-style: none !important;
    padding: 0 !important;
    margin: 10px 0 0 0 !important;
    text-align: left;
    width: 100%;
}

.list-staff .ce-bodytext ul li,
.list-staff .ce-bodytext ol li,
.list-staff .frame-type-text ul li,
.list-staff .frame-type-text ol li {
    position: relative;
    padding-left: 18px !important;
    font-family: 'athitimedium', 'Prompt', sans-serif !important;
    font-size: 0.88rem !important;
    color: #64748b !important;
    line-height: 1.5 !important;
    margin-bottom: 6px;
}

.list-staff .ce-bodytext ul li:last-child,
.list-staff .ce-bodytext ol li:last-child,
.list-staff .frame-type-text ul li:last-child,
.list-staff .frame-type-text ol li:last-child {
    margin-bottom: 0;
}

.list-staff .ce-bodytext ul li::before,
.list-staff .frame-type-text ul li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 7px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--theme-secondary, #b58f64);
    opacity: 0.85;
}

/* Hide Extra Dividers inside Text Block */
.list-staff .ce-bodytext hr,
.list-staff .frame-type-text hr {
    display: none !important;
}

/* 6. Dark Theme Compatibility (.list-staff in body.dark-theme) */
body.dark-theme .list-staff .frame-type-textpic,
body.dark-theme .list-staff .frame-type-text,
body.dark-theme .list-staff .frame,
.dark-theme .list-staff .frame-type-textpic,
.dark-theme .list-staff .frame-type-text,
.dark-theme .list-staff .frame {
    background-color: #242a35 !important;
    border-color: #374151 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25) !important;
}

body.dark-theme .list-staff .frame-type-textpic:hover,
body.dark-theme .list-staff .frame-type-text:hover,
body.dark-theme .list-staff .frame:hover,
.dark-theme .list-staff .frame-type-textpic:hover,
.dark-theme .list-staff .frame-type-text:hover,
.dark-theme .list-staff .frame:hover {
    border-color: var(--theme-primary, #0a4a5c) !important;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4) !important;
}

body.dark-theme .list-staff figure.image,
.dark-theme .list-staff figure.image {
    border-color: #374151 !important;
    background-color: #1a1e24 !important;
}

body.dark-theme .list-staff .ce-bodytext h3,
body.dark-theme .list-staff .ce-bodytext h4,
body.dark-theme .list-staff .ce-bodytext h5,
body.dark-theme .list-staff .ce-bodytext strong,
body.dark-theme .list-staff .frame-type-text h3,
body.dark-theme .list-staff .frame-type-text h4,
body.dark-theme .list-staff .frame-type-text h5,
body.dark-theme .list-staff .frame-type-text strong,
.dark-theme .list-staff .ce-bodytext h3,
.dark-theme .list-staff .ce-bodytext h4,
.dark-theme .list-staff .ce-bodytext h5,
.dark-theme .list-staff .ce-bodytext strong,
.dark-theme .list-staff .frame-type-text h3,
.dark-theme .list-staff .frame-type-text h4,
.dark-theme .list-staff .frame-type-text h5,
.dark-theme .list-staff .frame-type-text strong {
    color: #f1f5f9 !important;
}

body.dark-theme .list-staff .ce-bodytext p,
body.dark-theme .list-staff .frame-type-text p,
.dark-theme .list-staff .ce-bodytext p,
.dark-theme .list-staff .frame-type-text p {
    color: #94a3b8 !important;
}

body.dark-theme .list-staff .ce-bodytext a,
body.dark-theme .list-staff .frame-type-text a,
.dark-theme .list-staff .ce-bodytext a,
.dark-theme .list-staff .frame-type-text a {
    color: var(--theme-secondary, #60a5fa) !important;
}

body.dark-theme .list-staff .ce-bodytext a:hover,
body.dark-theme .list-staff .frame-type-text a:hover,
.dark-theme .list-staff .ce-bodytext a:hover,
.dark-theme .list-staff .frame-type-text a:hover {
    color: #ffffff !important;
}

body.dark-theme .list-staff .ce-bodytext ul li,
body.dark-theme .list-staff .ce-bodytext ol li,
body.dark-theme .list-staff .frame-type-text ul li,
body.dark-theme .list-staff .frame-type-text ol li,
.dark-theme .list-staff .ce-bodytext ul li,
.dark-theme .list-staff .ce-bodytext ol li,
.dark-theme .list-staff .frame-type-text ul li,
.dark-theme .list-staff .frame-type-text ol li {
    color: #94a3b8 !important;
}

body.dark-theme .list-staff .ce-bodytext ul li::before,
body.dark-theme .list-staff .frame-type-text ul li::before,
.dark-theme .list-staff .ce-bodytext ul li::before,
.dark-theme .list-staff .frame-type-text ul li::before {
    background-color: var(--theme-secondary, #60a5fa) !important;
}

/* ==========================================================================
   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, #2b3990) !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, #2b3990) !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, #2b3990) !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, #2b3990) !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, #2b3990) !important;
    color: #ffffff !important;
    border-color: var(--theme-primary, #2b3990) !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, #2b3990) !important;
    border-color: var(--theme-primary, #2b3990) !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, #2b3990) !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, #2b3990) !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, #2b3990) !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, #2b3990) !important;
    border-color: var(--theme-primary, #2b3990) !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, #2b3990));
}

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;
}

/* ==========================================================================
   10. RESPONSIVE & MEDIA QUERIES
   ========================================================================== */
@media (min-width: 992px) {
.card-img-2col , .card-img-3col{
    height: 10vw;
}}

/* Landing Page Hover Effects (Desktop) */
@media (hover: hover) {
    .cas-landing .enter-site a:hover,
    ul.enter-site a:hover {
        background-color: #1e2570;
        transform: translateY(-2px);
        box-shadow: 0 8px 24px rgba(39, 48, 141, 0.35);
    }

    .cas-landing .enter-site a:hover::after,
    ul.enter-site a:hover::after {
        background-color: #a8814a;
        transform: translateY(-50%) scale(1.06);
    }
}

/* Landing Page Mobile Responsiveness */
@media (max-width: 767.98px) {
    .cas-landing {
        padding: 24px 15px;
        min-height: calc(100vh - 40px);
    }

    .cas-landing img {
        max-height: 60vh;
        border-radius: 10px;
    }

    .cas-landing .enter-site,
    ul.enter-site {
        margin-top: 22px !important;
    }

    .cas-landing .enter-site a,
    ul.enter-site a {
        min-height: 50px;
        padding: 0 58px 0 24px;
        font-size: 1.2rem;
    }

    .cas-landing .enter-site a::after,
    ul.enter-site a::after {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .cas-landing img {
        max-height: 56vh;
    }

    .cas-landing .enter-site a,
    ul.enter-site a {
        font-size: 1.1rem;
        padding: 0 54px 0 20px;
    }
}

/* Landing Page Dark Theme Support */
body.dark-theme:has(.cas-landing),
body.dark-theme.page-news-template:has(.cas-landing) {
    background: radial-gradient(ellipse at 50% 28%, #1a2233 0%, #0f1523 55%, #080c14 100%) !important;
}

body.dark-theme .cas-landing,
.dark-theme .cas-landing {
    background: transparent !important;
}

body.dark-theme .cas-landing img,
.dark-theme .cas-landing img {
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.7) !important;
}

body.dark-theme .cas-landing .enter-site a,
body.dark-theme ul.enter-site a,
.dark-theme .cas-landing .enter-site a,
.dark-theme ul.enter-site a {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5) !important;
}

body.dark-theme .cas-landing .enter-site a:hover,
body.dark-theme ul.enter-site a:hover,
.dark-theme .cas-landing .enter-site a:hover,
.dark-theme ul.enter-site a:hover {
    background: linear-gradient(135deg, #2b3990 0%, #1e2570 100%) !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.35) !important;
}

body.dark-theme .cas-landing .enter-site a::after,
body.dark-theme ul.enter-site a::after,
.dark-theme .cas-landing .enter-site a::after,
.dark-theme ul.enter-site a::after {
    background: linear-gradient(135deg, #d4a754 0%, #b38b40 100%) !important;
}

body.dark-theme .cas-landing .enter-site a:hover::after,
body.dark-theme ul.enter-site a:hover::after,
.dark-theme .cas-landing .enter-site a:hover::after,
.dark-theme ul.enter-site a:hover::after {
    background: linear-gradient(135deg, #f0cc70 0%, #c89e63 100%) !important;
}

/* Mobile Responsive */
@media (max-width: 575.98px) {
  .PageTitle h2 {
    font-size: 1.5rem;
  }
}
