/* Top margin fix - place at top of CSS file */
html, body {
    margin: 0;
    padding: 0;
}

html {
    box-sizing: border-box;
}
*, *:before, *:after {
    box-sizing: inherit;
}

/* Base styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #1F1F29;
    padding-top: 0;
}



/* Header styles - Removed unused .site-header class */

/* Hero section */
.hero {
    background: rgba(31, 31, 41, 0.6); /* translucent dark to match header */
    background-image: url('/assets/main_campus.jpeg'); /* updated background image */
    background-size: cover;
    background-position: top center;
    background-blend-mode: overlay; /* blend color over image */
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    transition: background 0.3s ease; /* add transition for consistency */
    position: relative;
    z-index: 0; /* keep hero behind header */
    margin-top: 0; /* no negative overlap – hero background starts at page top */
    padding-top: 4rem;
    min-height: 100vh; /* full viewport height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero.solid {
    background: #1F1F29; /* solid on scroll if desired */
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Home slide section */
.home-slide {
    background: rgba(31, 31, 41, 0.6); /* translucent dark to match header */
    background-image: url('/assets/9131a0f18eacb2c5bda26e4bcf8f377b.JPG'); /* default background image */
    background-size: cover;
    background-position: top center;
    background-blend-mode: overlay; /* blend color over image */
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    transition: background 0.3s ease; /* add transition for consistency */
    position: relative;
    z-index: 0; /* keep home slide behind header */
    margin-top: 0; /* no negative overlap – home slide background starts at page top */
    padding-top: 4rem;
    min-height: 100vh; /* full viewport height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.home-slide.solid {
    background: #1F1F29; /* solid on scroll if desired */
}

.home-slide h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.home-slide p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Home slide banner - completely separate from hero section */
.home-slide-banner {
    background: rgba(31, 31, 41, 0.6);
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    background-blend-mode: overlay;
    color: white;
    text-align: center;
    transition: background 0.3s ease;
    position: relative;
    width: 100%;
    height: 100vh;
    z-index: 999; /* above headers to make them translucent */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Carousel container */
.home-slide-carousel {
    position: relative;
    width: 100%;
    height: 100vh; /* Full viewport height to accommodate absolute positioned banner */
    overflow: hidden;
    z-index: 0; /* ensure it stays behind header */
    margin-top: -250px; /* Increased from -200px to accommodate extra header line */
    padding-top: 250px; /* Increased from 200px to compensate for negative margin */
}

.home-slide-track {
    position: relative;
    width: 100%;
}

/* Ensure all slides are hidden by default except the first one */
.home-slide-track .home-slide-banner {
    display: none;
}

.home-slide-track .home-slide-banner:first-child {
    display: flex;
}

/* Ensure carousel container allows pointer events */
.home-slide-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    pointer-events: auto;
}

.home-slide-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-slide-text {
    background: rgba(31, 31, 41, 0.75);
    padding: 2.5rem 2rem 2rem 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.18);
    display: inline-block;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    max-width: 800px;
}

.home-slide-primary-text {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.home-slide-main-text {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.home-slide-sub-text {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

.home-slide-scroll-indicator {
    font-size: 2rem;
    color: #ffffff;
    animation: bounce 2s infinite;
    cursor: pointer;
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.home-slide-scroll-arrow {
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 15px solid #ffffff;
    margin: 0 auto;
    animation: bounce 2s infinite;
}

/* Responsive styles for home slide banner */
@media (max-width: 768px) {
    .home-slide-carousel {
        margin-top: -200px; /* Increased from -150px */
        padding-top: calc(4rem + 200px); /* Increased from calc(4rem + 150px) */
    }
    
    .home-slide-banner {
        margin-top: -200px; /* Increased from -150px */
        padding-top: calc(4rem + 200px); /* Increased from calc(4rem + 150px) */
    }
    
    .home-slide-content {
        margin-top: -50px; /* Move content up */
    }
    
    .home-slide-text {
        max-width: 90%;
        margin-left: auto;
        margin-right: auto;
        padding: 1.5rem 1rem 1rem 1rem;
        box-sizing: border-box;
    }
    
    .home-slide-primary-text {
        font-size: 2rem;
        white-space: normal !important;
        word-break: break-word;
    }
    
    .home-slide-main-text {
        font-size: 1.5rem;
        white-space: normal !important;
        word-break: break-word;
    }
    
    .home-slide-sub-text {
        font-size: 1rem;
    }
    
    .home-slide-scroll-indicator {
        bottom: 3rem; /* Move scroll arrow up */
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .home-slide-carousel {
        margin-top: -250px; /* Increased from -200px */
        padding-top: calc(4rem + 250px); /* Increased from calc(4rem + 200px) */
    }
    
    .home-slide-banner {
        margin-top: -250px; /* Increased from -200px to accommodate extra header line */
        padding-top: calc(4rem + 250px); /* Increased from calc(4rem + 200px) to compensate for negative margin */
    }
    
    .home-slide-content {
        margin-top: -150px; /* Move content up even more */
    }
    
    .home-slide-text {
        padding: 2rem 1.5rem 1.5rem 1.5rem;
    }
    
    .home-slide-primary-text {
        font-size: 2.2rem;
    }
    
    .home-slide-main-text {
        font-size: 1.6rem;
    }
    
    .home-slide-scroll-indicator {
        bottom: 4rem; /* Move scroll arrow up */
    }
}

/* Features section */
.features {
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* Footer styles */
.desktop-footer {
    background: #1F1F29;
    color: white;
}

/* Remove outline and keep centering styles */
@media (min-width: 768px) {
    .desktop-footer h5 {
        text-align: center;
        margin-bottom: 1.5rem;
    }
    
    .desktop-footer .social-links {
        display: flex;
        justify-content: center;
        gap: 1.5rem;
        margin-top: 2rem;
    }
}

/* Footer link hover effect - matches nav */
.footer-link {
    color: white;
    text-decoration: none;
    position: relative;
    padding: 0.25rem 0;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

.footer-link:hover {
    color: var(--accent-color);
}

/* Social icons hover effect */
.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    color: var(--accent-color) !important;
    transform: translateY(-2px);
}

/* Contact list spacing */
.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Update social links centering */
.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 2rem auto 0;
    text-align: center;
    width: 100%;
}

/* Force center alignment for social icons container */
.desktop-footer .col-md-4:last-child {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.desktop-footer .col-md-4:last-child .social-links {
    justify-content: center;
    width: auto;
    min-width: 200px;
}

/* Target only social media icons */
.desktop-footer .social-icon.bi {
    font-size: 2rem !important;
}

.social-link {
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.social-link:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.footer-bottom {
    margin-top: 3rem;
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0;
    opacity: 0.8;
}

/* Layout-rendered FAQ styles: match patient-resources FAQ appearance
   so animated-tile (layout-faq) looks identical to the site FAQ tiles. */
.layout-faq {
  margin-top: 1rem;
  width: 100%;
}

.layout-faq .faq-item {
  margin-bottom: 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
  background-color: white;
}

.layout-faq .faq-question {
  padding: 1.25rem 1rem; /* slightly more vertical space for the title */
  cursor: pointer;
  display: flex;
  align-items: center;
  background-color: white;
  transition: background-color 0.2s ease;
}

.layout-faq .faq-question:hover {
  background-color: #f8f9fa;
}

.layout-faq .toggle-icon {
  margin-right: 1rem;
  transition: transform 0.3s ease;
  color: #2F72B2;
}

.layout-faq .faq-item.active .faq-question {
  border-bottom: 1px solid #e2e8f0;
}

.layout-faq .faq-item.active .toggle-icon {
  transform: rotate(90deg);
}

.layout-faq .faq-answer {
  display: none;
  padding: 1rem; /* match patient-resources padding */
  background-color: #f8f9fa;
}

/* Force compact spacing for faq-answer content (but NOT the title) in case other rules win */
.layout-faq .faq-answer,
.layout-faq .faq-answer > .card-body {
  padding: 0.5rem !important;
}

.layout-faq .faq-answer p,
.layout-faq .faq-answer > .card-body p {
  margin: 0 0 0.35rem 0 !important;
}

.layout-faq .faq-item.active .faq-answer {
  display: block;
}

/* If layout-generated FAQ is placed inside a card/card-body we may end up
   with doubled padding (card-body + faq-answer). Reduce inner padding to
   match patient-resources appearance when nested. */
.card .layout-faq .faq-question,
.card .layout-faq .faq-answer,
.card-body .layout-faq .faq-question,
.card-body .layout-faq .faq-answer {
  padding: 0.75rem; /* slightly less than 1rem to compensate for card padding */
}

/* If the faq-answer sits inside an already padded card-body keep content
   compact by removing extra margin on paragraphs inside the answer. */
.card .layout-faq .faq-answer p,
.card-body .layout-faq .faq-answer p {
  margin: 0 0 0.5rem 0;
}

/* Specifically target the case where the layout renderer wraps content
   inside an extra .card-body within the .faq-answer (observed in page
   markup). Remove that extra card-body padding to avoid large whitespace. */
.layout-faq .faq-answer > .card-body {
  padding: 0.5rem 0.75rem; /* smaller vertical padding */
}

.layout-faq .faq-answer > .card-body p {
  margin: 0 0 0.4rem 0; /* tighten paragraph spacing */
}

/* If deeper nested card elements exist, ensure they don't add large
   top/bottom padding which accumulates visually. */
.layout-faq .faq-answer .card-body.p-0 {
  padding: 0 !important;
}

/* Responsive styles */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        padding: 1rem;
    }

    .main-nav ul {
        margin-top: 1rem;
        gap: 1rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .hero-content-box {
        max-width: 90%;
    }

    .hero {
        margin-top: -80px;
        padding-top: calc(4rem + 80px);
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .hero {
        margin-top: -150px; /* Increased from -100px to accommodate extra header line */
        padding-top: calc(4rem + 150px); /* Increased from calc(4rem + 100px) to compensate for negative margin */
    }
}

/* Header Styles */
.top-band {
  background: rgba(31, 31, 41, 0.7);
  color: #fff;
  padding: 2px 10px; /* slightly reduced padding */
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px; /* much tighter gap so items pack closer */
  transition: background 0.3s ease;
  position: relative;
  width: 100%;
  border: none;
  z-index: 1002; /* above main-header and other elements */
}
.top-band.solid {
    background: #1F1F29;
}
.top-band a {
  color: #fff;
  text-decoration: none;
  font-size: 0.82em; /* slightly increased for better legibility */
  position: relative;
  padding: 0.16rem 0.45rem; /* slightly larger padding for comfort */
  transition: color 0.3s ease;
}

/* Anchor language selector to the left of the top band while keeping other
   items aligned to the right (language selector sits before the flex group). */
.top-band .language-selector {
  margin-right: auto; /* push remaining items to the right */
  font-size: 0.82em; /* keep language selector comfortably legible */
  display: flex;
  align-items: center;
  gap: 6px; /* small increase so language items aren't cramped */
}

.top-band a:hover,
.top-band a:focus {
    color: var(--accent-color);
}

.top-band a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.top-band a:hover::after,
.top-band a:focus::after {
    width: 100%;
}

/* Top band dropdown styles */
.top-band .nav-item {
    position: relative;
    display: inline-block;
}

.top-band .patients-visitors-item {
    position: relative;
}

.top-band .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #1F1F29;
    min-width: 200px;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 1003;
    margin-top: 3px;
    border: 1px solid rgba(255,255,255,0.1);
}

.top-band .dropdown-content {
    padding: 8px 0;
}

.top-band .dropdown-content a {
    display: block;
    padding: 8px 16px;
    color: #fff;
    text-decoration: none;
  font-size: 0.85em;
    transition: background-color 0.3s ease;
    border-radius: 0;
}

.top-band .dropdown-content a:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--accent-color);
}

.top-band .dropdown-content a::after {
    display: none;
}

@media (min-width: 992px) and (hover: hover) {
    .top-band .patients-visitors-item:hover .dropdown-menu,
    .top-band .patients-visitors-item:focus-within .dropdown-menu,
    .top-band .dropdown-menu:hover {
        display: block !important;
    }
}

/* Main navigation dropdown styles for Services and Research & Training */
.main-nav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--primary-bg);
    min-width: 200px;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 1003;
    margin-top: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.main-nav .dropdown-content {
    padding: 8px 0;
}

.main-nav .dropdown-content a {
    display: block;
    padding: 8px 16px;
    color: #fff;
    text-decoration: none;
    font-size: 0.85em;
    transition: background-color 0.3s ease;
    border-radius: 0;
}

.main-nav .dropdown-content a:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--accent-color);
}

.main-nav .dropdown-content a::after {
    display: none;
}

@media (min-width: 992px) and (hover: hover) {
    .main-nav .services-item:hover .dropdown-menu,
    .main-nav .services-item:focus-within .dropdown-menu,
    .main-nav .research-training-item:hover .dropdown-menu,
    .main-nav .research-training-item:focus-within .dropdown-menu,
    .main-nav .dropdown-menu:hover {
        display: block !important;
    }
}

.main-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 15px 35px;
    background: rgba(31, 31, 41, 0.7);
    transition: background 0.3s ease;
    position: relative;
    width: 100%;
    z-index: 1001; /* below top-band */
}
.main-header.solid {
    background: #1F1F29;
}
.header-left img, .header-right img {
    height: 100px; /* Increased from 75px */
    max-width: 160px; /* Increased from 120px */
    object-fit: contain;
}
.header-center {
    text-align: center;
    color: #ffffff; /* Ensure text is white on dark header */
}
.header-title {
    font-size: 1.4em;
    font-weight: bold;
    color: inherit;
}
.header-subtitle {
    font-size: 1.2em;
    margin-top: 8px;
    color: inherit;
}

.nav-wrapper {
    /* Changed to scroll away with header (no longer fixed) */
    position: relative;
    top: auto;
    left: 0;
    width: 100%;
    background: var(--primary-bg); /* translucent dark */
    box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    z-index: 1000; /* stay above hero just like top-band & main-header */
}

.main-nav {
    /* Give it the same translucent background as its wrapper so it is always visible */
    background: transparent; /* inherit translucency from wrapper */
    padding: 10px 0 0; /* previously 10px 0; removed bottom padding to keep dropdown open when cursor moves from nav item to mega menu */
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    position: relative;
    display: flex;          /* horizontal layout */
    justify-content: center; /* centered nav items */
    gap: 2rem;             /* spacing between links */
}

.main-nav ul {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Main navigation link styles - matching top-band styling */
.main-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a:focus {
    color: var(--accent-color);
}

.main-nav a.active {
    color: var(--accent-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px; /* slight gap below text */
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a:focus::after {
    width: 100%;
}

.main-nav a.active::after {
    width: 100%; /* keep underline visible for active link */
}

/* Additional Hero Enhancements */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.welcome-label {
    font-size: 1.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.85;
}

.scroll-btn {
    font-weight: 500;
}

.scroll-indicator {
    font-size: 2rem;
    color: #ffffff;
    animation: bounce 2s infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* prevent anchor content being hidden under fixed header */
#features,
#departments {
    scroll-margin-top: 0;
}

.hero-content-box {
    background: rgba(31, 31, 41, 0.75);
    padding: 2.5rem 2rem 2rem 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.18);
    display: inline-block;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.hero-content-box h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Additional Home Slide Enhancements */
.home-slide-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-slide-content-box {
    background: rgba(31, 31, 41, 0.75);
    padding: 2.5rem 2rem 2rem 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.18);
    display: inline-block;
    margin-bottom: 2rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.home-slide-content-box h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

/* Solid state for navigation wrapper when page is scrolled */
.nav-wrapper.solid {
    background: #1F1F29; /* solid dark */
}

/* When both fixed and solid are present, keep it solid */
.nav-wrapper.fixed.solid {
    background: #1F1F29;
}

/* Ensure same translucent look when nav becomes fixed before scrolling */
.nav-wrapper.fixed {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--primary-bg); /* translucent dark */
}

/* When wrapper becomes solid, let the nav adopt the solid background too */
.nav-wrapper.solid .main-nav,
.nav-wrapper.fixed.solid .main-nav {
    background: #1F1F29;
}

/* Prevent wrapping of hero title */
.hero-content-box h1 {
    white-space: nowrap !important;
}

/* --------------------------------------------------
   Mobile & Tablet Specific Header Styles
   -------------------------------------------------- */

/* Mobile Header */
.mobile-header {
    background: rgba(31, 31, 41, 0.6);
    color: #ffffff;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}
.mobile-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}
.mobile-logo {
    height: 40px;
}
.mobile-menu-toggle {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.8rem;
    cursor: pointer;
}
.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 0.75rem 1rem 1rem 1rem;
    background: rgba(31, 31, 41, 0.6);
}
.mobile-nav.open {
    display: flex;
}
.mobile-nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
}

/* Tablet Header */
.tablet-header {
    background: rgba(31, 31, 41, 0.6);
    color: #ffffff;
    width: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 2rem;
    position: relative;
    z-index: 1000;
}
.tablet-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.tablet-logo img,
.tablet-urt-logo img {
    height: 50px;
}
.tablet-title .header-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.tablet-title .header-subtitle {
    font-size: 1rem;
    font-weight: 400;
}
.tablet-nav {
    margin-top: 0.75rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.tablet-nav a {
    color: #ffffff;
    text-decoration: none;
}

/* Ensure mobile header only shows on small screens */
@media (min-width: 769px) {
    .mobile-header { display: none; }
}
@media (max-width: 768px) {
    /* Hide tablet header when on smaller screens */
    .tablet-header { display: none; }
}

/* ----- Desktop Hero Offset (to ensure background starts at top) ----- */
@media (min-width: 992px) {
  .hero {
    margin-top: -250px; /* Increased from -200px to accommodate extra header line */
    padding-top: calc(4rem + 250px); /* Increased from calc(4rem + 200px) to compensate for negative margin */
  }
  
  .home-slide-carousel {
    margin-top: -250px; /* Increased from -200px to accommodate extra header line */
    padding-top: 250px; /* Increased from 200px to compensate for negative margin */
  }
  
  .home-slide-banner {
    margin-top: -250px; /* Increased from -200px to accommodate extra header line */
    padding-top: calc(4rem + 250px); /* Increased from calc(4rem + 200px) to compensate for negative margin */
    position: relative;
    z-index: 0; /* ensure it stays behind header */
  }
}

/* --------------------- Director Section --------------------- */
.director-section {
  background: #ffffff;
  color: #1F1F29;
  position: relative;
  z-index: 1; /* ensure it stays below header */
}

.director-section h3 {
  font-size: 1.75rem;
  font-weight: 600;
}

.director-section .card,
.director-section .border {
  border-color: rgba(0, 0, 0, 0.1) !important;
}

@media (max-width: 768px) {
  .director-section .row {
    text-align: center;
  }
  .director-section .col-md-4 {
    margin-bottom: 2rem;
  }
}

/* --------------------- Services Section --------------------- */
.services-section {
  background: #f8f9fa; /* light background */
  color: #1F1F29;
}

.services-section h2 {
  font-size: 2rem;
  font-weight: 700;
}

.services-section .card-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.services-section .card-img-top {
  height: 160px;
  object-fit: cover;
}

@media (max-width: 576px) {
  .services-section .card-img-top {
    height: 140px;
  }
}

/* Mega menu styles */
.nav-item {
    position: relative;
    display: flex;            /* make nav-item participate in flexbox */
    align-items: center;      /* vertically center its child link */
}

.departments-item {
    position: static;
}

.research-training-item {
    position: static;
}

.services-item {
    position: relative;
}

/* Override research-training-item position for dropdown functionality */
.main-nav .research-training-item {
    position: relative;
}

.mega-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    transform: none;
    background: var(--mega-bg);
    color: #f0f0f0;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    z-index: 1000;
}

@media (min-width: 992px) and (hover: hover) {
    .departments-item:hover .mega-menu,
    .departments-item:focus-within .mega-menu,
    .mega-menu:hover {
        display: block !important;
    }
    
    /* Main navigation dropdown styles for services and research-training */
    .main-nav .services-item:hover .dropdown-menu,
    .main-nav .services-item:focus-within .dropdown-menu,
    .main-nav .research-training-item:hover .dropdown-menu,
    .main-nav .research-training-item:focus-within .dropdown-menu,
    .main-nav .dropdown-menu:hover {
        display: block !important;
    }
}

.mega-content {
    display: flex;
}

.mega-left {
    flex: 0 0 220px;
}

.mega-divider {
    width: 1px;
    background: rgba(255,255,255,0.1);
}

.mega-right {
    flex: 1 1 auto;
}

.mega-right ul {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Main navigation dropdown menu styles */
.main-nav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--mega-bg);
    min-width: 200px;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 1003;
    margin-top: 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.main-nav .dropdown-content {
    padding: 8px 0;
}

.main-nav .dropdown-content a {
    display: block;
    padding: 8px 16px;
    color: #f0f0f0;
    text-decoration: none;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
    border-radius: 0;
}

.main-nav .dropdown-content a:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--accent-color);
}

.main-nav .dropdown-content a::after {
    display: none;
}

/* Mega menu anchor tags */
.mega-right ul li a {
    color: inherit;
    text-decoration: none;
    display: block;
    transition: color 0.3s ease;
}

.mega-right ul li strong {
    position: relative;
    color: #ffffff; /* default white */
    transition: color 0.3s ease;
}

.mega-right ul li strong::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.mega-right ul li:hover strong {
    color: var(--accent-color);
}

.mega-right ul li:hover strong::after {
    width: 100%;
}

.mega-right ul li span {
    color: #e6e6e6;
    transition: color 0.3s ease;
}

.mega-right ul li:hover span {
    color: var(--accent-color);
}

.mega-left h3 {
    color: #ffffff;
}

.mega-left p,
.mega-right ul li span {
    color: #e6e6e6;
}

/* Override default white hover colour for mega menu items */
.mega-right ul li:hover strong,
.mega-right ul li:hover span {
    color: var(--accent-color) !important;
}

:root {
    --accent-color: #4FC3F7; /* light blue accent */
    --primary-bg: rgba(31, 31, 41, 0.7); /* translucent dark */
    --mega-bg: #1F1F29; /* opaque dropdown */
    --text-light: #f5f5f5; /* brighter text */
}

/* Markdown styling */
.markdown-body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.8;
    color: #1F1F29;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.markdown-body h1 { font-size: 2.25rem; }
.markdown-body h2 { font-size: 1.95rem; border-bottom: 2px solid #eee; padding-bottom: .4rem; margin-top: 4rem; margin-bottom: 1.25rem; padding-bottom: .35rem; border-bottom: 2px solid #e6e6e6; }
.markdown-body h3 { font-size: 1.65rem; }
.markdown-body h4 { font-size: 1.35rem; }

.markdown-body p {
    font-size: 1.05rem;
    margin-bottom: 1.4rem;
    text-align: justify;
}

.markdown-body ul,
.markdown-body ol {
    margin-left: 1.2rem;
    margin-bottom: 1rem;
}

.markdown-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

/* Alternate image alignment */
.markdown-body img:nth-of-type(odd) {
    float: right;
    margin-left: 1.5rem;
}

.markdown-body img:nth-of-type(even) {
    float: left;
    margin-right: 1.5rem;
}

/* Ensure clearing floats after markdown */
.markdown-body::after {
    content: "";
    display: block;
    clear: both;
}

@media (max-width: 768px) {
    .markdown-body img {
        float: none !important;
        margin: 1rem 0 !important;
    }
}

/* Department Section Bands */
.dept-section {
  position: relative;
  padding: 3rem 0;
}

.dept-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background: inherit;
  z-index: -1;
}

.dept-section.section-odd {
  background: #f3f5f8;
}

.dept-section.section-even {
  background: #ffffff;
}

/* Disable drop-cap */
.markdown-body p:first-of-type::first-letter {
  float: none !important;
  font-size: inherit !important;
  padding: 0 !important;
  font-weight: inherit !important;
}

/* Alternating content rows for department page */
.content-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
  background: #ffffff;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

.content-row.reverse {
  flex-direction: row-reverse;
}

.content-text {
  flex: 1 1 300px;
  background: #ffffff;
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.content-media {
  flex: 1 1 300px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.content-media img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.content-decor {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 450px;
  height: 220px;
  --accent-color: #2F72B2;
}

/* Circle outline */
.decor-circle {
  position: relative;
}
.decor-circle::before {
  content: "";
  width: 140px;
  height: 140px;
  border: 4px solid var(--accent-color);
  border-radius: 50%;
  opacity: 0.3;
}

/* Double circle */
.decor-double-circle {
  position: relative;
}
.decor-double-circle::before,
.decor-double-circle::after {
  content: "";
  position: absolute;
  border: 3px solid var(--accent-color);
  border-radius: 50%;
  opacity: 0.25;
}
.decor-double-circle::before {
  width: 160px;
  height: 160px;
}
.decor-double-circle::after {
  width: 110px;
  height: 110px;
  top: 25px;
  left: 25px;
}

/* Updated stacked squares – 3x3 grid */
.decor-stacked-squares {
  width: fit-content;
  max-width: 320px;
  display: grid;
  grid-template-columns: repeat(3, 40px);
  grid-template-rows: repeat(3, 40px);
  row-gap: 10px;
  column-gap: 40px; /* wider horizontal spacing */
  margin: 0 auto;
}

.decor-stacked-squares div {
  width: 40px;
  height: 40px;
  background: var(--accent-color);
  opacity: calc(0.3 + 0.07 * var(--i));
  border-radius: 4px;
}

/* Quote box */
.decor-quote {
  font-size: 3rem;
  font-weight: 700;
  color: var(--accent-color);
  opacity: 0.15;
}
.decor-quote::before { content: "\201C"; }

/* New decorative styles */
.decor-hollow-square::before {
  content: "";
  width: 120px;
  height: 120px;
  border: 4px solid var(--accent-color);
  opacity: 0.3;
}

.decor-cross {
  position: relative;
}
.decor-cross::before,
.decor-cross::after {
  content: "";
  position: absolute;
  background: var(--accent-color);
  opacity: 0.15;
}
.decor-cross::before {
  width: 20px;
  height: 120px;
  left: calc(50% - 10px);
}
.decor-cross::after {
  width: 120px;
  height: 20px;
  top: calc(50% - 10px);
}

/* Section-level styling for specialty grid */
.subspecialty-section {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-top: 4px solid var(--accent-color);
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    padding: 2rem;
}

/* Minimal card appearance inside the section */
.sub-card {
    padding: 0 0 1rem 0;
}

.sub-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 .25rem 0;
}

.title-underline { display: none; }
.sub-card::before { content: none !important; }

/* Horizontal bars */
.decor-bars {
  position: relative;
  width: 90%;
  max-width: 500px;
  height: 60px;
}
.decor-bars::before,
.decor-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  border-radius: 3px;
  /* Gradient fades toward both ends */
  background: linear-gradient(to right, transparent 0%, var(--accent-color) 20%, var(--accent-color) 80%, transparent 100%);
}
.decor-bars::before { top: 0; }
.decor-bars::after { bottom: 0; }

/* Wider container for department page */
@media (min-width: 992px) {
  .dept-section > .container {
    max-width: 1500px;
  }
}

/* Department page heading color */
.dept-section .markdown-body h1:first-of-type {
  color: #2F72B2;
}

/* Department heading color (accent) */
.markdown-body h1 { color: #2F72B2; }

/* ========== Layout Renderer Styling ========== */
/* These styles ensure that layout-rendered pages (using the new content add/edit system)
   look as good as markdown-rendered pages with proper spacing and typography */

/* Ensure layout sections have proper container structure like markdown pages */
.dept-section[data-rendered="layout"] {
  padding: 3rem 0;
}

.dept-section[data-rendered="layout"] > .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Layout Rows - provide structure and spacing similar to content-row */
.layout-row {
  margin-bottom: 2.5rem;
  padding: 1.5rem 0;
}

/* Layout Row Headers */
.layout-row-header {
  color: #2F72B2;
  font-size: 1.65rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e6e6e6;
  padding-bottom: 0.35rem;
}

/* Layout Columns - flexible grid system */
.layout-col {
  flex: 1;
  min-width: 0; /* Allow content to shrink */
  padding: 0 0.75rem;
}

/* When columns are in a row, make them flex containers */
.layout-row .row,
.layout-row > .row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: flex-start;
  margin: 0; /* Remove Bootstrap row margins */
}

/* Override Bootstrap column defaults for layout columns */
.layout-row .col.layout-col {
  flex: 1;
  padding: 0 0.75rem;
  max-width: none;
}

/* Layout Column Headers */
.layout-col-title {
  color: #2F72B2;
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Layout Images - match markdown image styling */
.layout-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

/* Layout Cards Container */
.layout-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

/* Layout Card and Tile Items */
.layout-item {
  flex: 0 1 300px;
  background: #ffffff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.layout-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* Card variant styling */
.layout-item.card {
  border-left: 4px solid #2F72B2;
}

/* Tile variant styling - more prominent */
.layout-item.tile {
  background: linear-gradient(135deg, #2F72B2 0%, #1e5a96 100%);
  color: white;
  border: none;
}

.layout-item.tile h1,
.layout-item.tile h2,
.layout-item.tile h3,
.layout-item.tile h4,
.layout-item.tile h5,
.layout-item.tile h6 {
  color: white;
}

/* Ensure layout content inherits markdown body styling for typography */
.markdown-body[data-rendered="layout"] p,
.markdown-body .dept-section[data-rendered="layout"] p {
  font-size: 1.05rem;
  margin-bottom: 1.4rem;
  text-align: justify;
  line-height: 1.8;
}

.markdown-body[data-rendered="layout"] ul,
.markdown-body[data-rendered="layout"] ol,
.markdown-body .dept-section[data-rendered="layout"] ul,
.markdown-body .dept-section[data-rendered="layout"] ol {
  margin-left: 1.2rem;
  margin-bottom: 1rem;
}

/* YouTube embed styling for layout renderer */
.markdown-body[data-rendered="layout"] .ratio,
.markdown-body .dept-section[data-rendered="layout"] .ratio {
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

/* Section content wrapper for proper spacing */
.section-content {
  margin-top: 1rem;
}

/* Responsive adjustments for layout elements */
@media (max-width: 768px) {
  .layout-row .row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .layout-col {
    padding: 0;
  }
  
  .layout-cards {
    flex-direction: column;
  }
  
  .layout-item {
    flex: none;
  }
}

/* Extra breathing room for smaller headings inside content sections */
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  padding-top: 0.4rem;
}

/* ---------- Fancy Bullet List Styling ---------- */
.markdown-body ul {
  list-style: none;  /* remove default bullets */
  padding-left: 0;
}

.markdown-body ul li {
  position: relative;
  margin-bottom: 1.25rem;
  padding: 0.25rem 0 0.25rem 1.75rem; /* space for bullet */
  border-left: 3px solid var(--accent-color);
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.markdown-body ul li::before {
  content: "\2022"; /* bullet dot */
  position: absolute;
  left: 0.55rem;
  top: 0.55rem;
  transform: translate(-50%, -50%);
  color: var(--accent-color);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Ordered lists keep numbers but accentuated */
.markdown-body ol li::marker {
  color: var(--accent-color);
  font-weight: 600;
}

/* ---------- Heading underline styling (left-aligned) ---------- */
.markdown-body h2,
.markdown-body h3,
.markdown-body h4 {
  position: relative;
  padding-top: 0.4rem;
  border-bottom: none !important; /* remove default grey rule */
}

.markdown-body h2::after,
.markdown-body h3::after,
.markdown-body h4::after {
  content: "";
  display: block;
  width: 72px;
  height: 3px;
  background: #2F72B2; /* dark blue */
  margin-top: 0.4rem;
  border-radius: 2px;
}

/* Specialist card enhancements */
.specialist-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* Use natural height instead of forced 100% */
}

.specialist-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.1);
}

.specialist-card .card-body {
  padding: 1rem;
  /* Use natural flex layout instead of forced height */
  display: flex;
  flex-direction: column;
}

.specialist-avatar-container {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--accent-color);
  background: #f8f9fa; /* Fallback background */
  flex-shrink: 0; /* Prevent shrinking */
  overflow: hidden; /* Hide any overflow - this is crucial */
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.specialist-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover; /* This will crop the image to fit the container */
  object-position: center; /* Center the image within the container */
  border-radius: 50%;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--accent-color);
  background: #fff;
  border-radius: 50%;
}

.specialist-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-height: 0; /* Allow content to shrink */
}

.specialist-card .card-title {
  font-size: 1rem;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  color: #1F1F29;
  font-weight: 600;
}

.specialist-details {
  flex-grow: 1;
}

.specialist-details p {
  margin-bottom: 0.25rem;
  font-size: 0.85rem;
  line-height: 1.3;
  color: #666;
}

.specialist-details p:last-child {
  margin-bottom: 0;
}

.designation-badge {
  display: inline-block;
  background: var(--accent-color);
  color: #fff;
  padding: 2px 8px;
  font-size: 0.7rem;
  border-radius: 999px;
}

.accent-purple { --accent-color: #C084FC; --accent-bg: #F3E8FF; }
.accent-blue   { --accent-color: #60A5FA; --accent-bg: #DBEAFE; }
.accent-orange { --accent-color: #F59E0B; --accent-bg: #FEF3C7; }

/* About Page Styles */
.about-page {
    padding-top: 80px;
    min-height: 100vh;
    background: #f8f9fa;
}

.about-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #1F1F29;
    padding: 2rem 2rem;
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid #dee2e6;
}

.about-hero h1 {
    font-size: 2rem;
    margin: 0;
    font-weight: 600;
    color: #1F1F29;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.content-section {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.content-section p {
    margin: 0;
    color: #333;
    font-weight: normal;
    font-size: 1.1rem;
    line-height: 1.8;
}

.vision-mission-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.vision-box,
.mission-box {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.vision-box::before,
.mission-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1F1F29, #2F72B2);
}

.vision-box h2,
.mission-box h2 {
    color: #1F1F29;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.vision-box p,
.mission-box p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.values-section {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 3rem;
}

.values-section h2 {
    color: #1F1F29;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.value-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #2F72B2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.value-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.value-item p {
    margin: 0;
    color: #333;
    font-weight: 500;
    line-height: 1.6;
}

.leadership-section {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 0 auto 3rem;
    max-width: 1200px;
}

.leadership-section h2 {
    color: #1F1F29;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.leadership-member {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.leadership-member:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-color: #2F72B2;
}

.member-photo {
    margin-bottom: 1rem;
}

.member-photo img {
  display: block;
  max-width: 100%;
  height: auto;
}

.leadership-member h3 {
    color: #1F1F29;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.leadership-member p {
    color: #2F72B2;
    font-weight: 500;
    margin: 0;
    font-size: 1rem;
}

/* Responsive Design for About Page */
@media (max-width: 768px) {
    .about-hero h1 {
        font-size: 1.5rem;
    }
    
    .about-content {
        padding: 0 1rem 2rem;
    }
    
    .leadership-section {
        margin: 0 1rem 2rem;
    }
    
    .content-section,
    .values-section {
        padding: 2rem;
    }
    
    .vision-mission-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .leadership-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* .member-photo img {
        width: 100px;
        height: 100px;
    } */
}

@media (min-width: 769px) and (max-width: 991px) {
    .about-hero h1 {
        font-size: 1.8rem;
    }
    
    .leadership-section {
        margin: 0 2rem 3rem;
    }
    
    .vision-mission-section {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .values-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .leadership-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Services Page Styles */
.services-page {
    background: #f8f9fa;
    min-height: 100vh;
}

.services-categories {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 3rem;
    margin-bottom: 3rem;
}

.category-title {
    color: #1F1F29;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #1F1F29, #2F72B2);
}

.category-description {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.service-item {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
    height: 100%;
}

.service-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    border-color: #2F72B2;
}

.service-icon {
    margin-bottom: 1rem;
}

.service-icon i {
    font-size: 2rem;
    color: #2F72B2;
}

.service-name {
    color: #1F1F29;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}

.info-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 3rem;
}

.info-section h3 {
    color: #1F1F29;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
}

.info-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
    height: 100%;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
    border-color: #2F72B2;
}

.info-icon {
    margin-bottom: 1rem;
}

.info-icon i {
    font-size: 2.5rem;
    color: #2F72B2;
}

.info-card h4 {
    color: #1F1F29;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.info-card p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design for Services Page */
@media (max-width: 768px) {
    .services-categories,
    .info-section {
        padding: 2rem 1rem;
        margin: 0 1rem 2rem;
    }
    
    .category-title {
        font-size: 1.5rem;
    }
    
    .service-item,
    .info-card {
        padding: 1.5rem 1rem;
    }
    
    .service-icon i,
    .info-icon i {
        font-size: 1.8rem;
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .services-categories,
    .info-section {
        padding: 2.5rem;
        margin: 0 2rem 3rem;
    }
    
    .category-title {
        font-size: 1.8rem;
    }
}

/* Clinical Departments pill style */
.clinical-departments .dept-pill {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1F1F29;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    transition: background-color 0.2s ease;
}

.clinical-departments .dept-pill:hover {
    background-color: #e9ecef;
    text-decoration: none;
}

/* Ensure clinical department rows don't grow too tall on small screens */
@media (max-width: 576px) {
    .clinical-departments .dept-pill {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
}

/* Services page interactive cards */
.services-page .svc-card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.services-page .svc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1F1F29, #2F72B2);
}

.services-page .svc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
    border-color: #2F72B2;
}

.services-page .svc-card h5 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1F1F29;
    margin-bottom: 0.75rem;
}

.services-page .svc-card p {
    color: #666;
    line-height: 1.55;
    margin: 0;
}

/* Research & Training Page Styles */
.research-training-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding-top: 80px;
}

.research-training-page h1 {
    color: #1F1F29;
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

.research-training-page .content-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 3rem;
    margin-bottom: 3rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.research-training-page .content-section h2 {
    color: #1F1F29;
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #2F72B2;
    padding-bottom: 0.5rem;
}

.research-training-page .content-section h2:first-child {
    margin-top: 0;
}
  /* Layout renderer cards (row-level) should match the look and elevation of
     the regular markdown page cards. These classes are applied by
     LayoutRenderer for row-level 'cards' and 'tiles'. */
  .layout-cards-row {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
  }

  /* Row-level styling when a row contains cards: give the whole row a
     subtle elevation and padding so it reads as a card band like markdown
     pages that use section bands. */
  .layout-row.has-cards {
    background: #ffffff;
    border-radius: 0.6rem;
    padding: 1rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.04);
    margin-bottom: 1rem;
  }

  .layout-row.has-cards > .layout-col,
  .layout-row.has-cards > .col-12,
  .layout-row.has-cards > [class*="col-"] {
    display: flex;
    align-items: stretch;
  }

  .layout-row.has-cards .card-item,
  .layout-row.has-cards .tile-item,
  .layout-row.has-cards .animated-tile-item {
    flex: 1 1 auto;
  }

  .layout-cards-row .card-item,
  .layout-cards-row .tile-item,
  .layout-cards-row .animated-tile-item {
    display: block;
    height: 100%;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: transform 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  }

  /* Ensure visual elevation matches other cards across the site */
  .layout-cards-row .card-item.card,
  .layout-cards-row .tile-item.card,
  .layout-cards-row .animated-tile-item.card {
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
  }

  .layout-cards-row .card-item.card:hover,
  .layout-cards-row .tile-item.card:hover,
  .layout-cards-row .animated-tile-item.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 1.5rem rgba(0,0,0,0.12);
  }

  .layout-cards-row .card-item .card-header,
  .layout-cards-row .tile-item .card-header,
  .layout-cards-row .animated-tile-item .card-header {
    background: transparent;
    border-bottom: none;
    padding: 0;
  }

  .layout-cards-row .card-item .card-body,
  .layout-cards-row .tile-item .card-body,
  .layout-cards-row .animated-tile-item .card-body {
    padding: 1rem;
  }

  .layout-cards-row .tile-item.card {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    color: white;
  }

  .layout-cards-row .animated-tile-item.card {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
  }

.research-training-page .content-section p {
    color: #333;
    font-weight: normal;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.research-training-page .content-section ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.research-training-page .content-section ul li {
    color: #333;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.research-training-page .content-section strong {
    color: #2F72B2;
    font-weight: 600;
}

/* Leadership section styles for research training page */
.research-training-page .leadership-section {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin: 0 auto 3rem;
    max-width: 1200px;
}

.research-training-page .leadership-section h2 {
    color: #1F1F29;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
}

.research-training-page .leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.research-training-page .leadership-member {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
}

.research-training-page .leadership-member:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-color: #2F72B2;
}

.research-training-page .member-photo {
    margin-bottom: 1rem;
}

.research-training-page .member-photo img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #2F72B2;
    background: #f8f9fa;
}

.research-training-page .leadership-member h3 {
    color: #1F1F29;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.research-training-page .leadership-member p {
    color: #2F72B2;
    font-weight: 500;
    margin: 0;
    font-size: 1rem;
}

/* Responsive Design for Research & Training Page */
@media (max-width: 768px) {
    .research-training-page h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
    
    .research-training-page .content-section {
        padding: 2rem;
        margin-bottom: 2rem;
    }
    
    .research-training-page .content-section h2 {
        font-size: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .research-training-page .leadership-section {
        margin: 0 1rem 2rem;
    }
    
    .research-training-page .leadership-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .research-training-page .member-photo img {
        width: 100px;
        height: 100px;
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .research-training-page .content-section {
        padding: 2.5rem;
    }
    
    .research-training-page h1 {
        font-size: 2.2rem;
    }
    
    .research-training-page .leadership-section {
        margin: 0 2rem 3rem;
    }
    
    .research-training-page .leadership-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Patient Resources FAQ Accordion Styles */
.faq-accordion {
  margin-top: 2rem;
  width: 100%;
}

.faq-item {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 1rem;
  overflow: hidden;
  border: 1px solid #dee2e6;
  width: 100%;
  display: block;
}

.faq-question {
  padding: 1rem 1.5rem;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  background-color: white;
}

.toggle-icon {
  color: #2F72B2;
  margin-right: 10px;
  transition: transform 0.3s ease;
  display: inline-block;
}

.faq-item.active .toggle-icon {
  transform: rotate(90deg) !important;
}

.faq-answer {
  padding: 0 !important;
  max-height: 0 !important;
  overflow: hidden;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
  display: block;
}

.faq-item.active .faq-answer {
  padding: 1rem 1.5rem 1.5rem 2.5rem !important;
  max-height: 500px !important;
}

.faq-question:hover {
  background-color: #f3f5f8;
}

/* Override any markdown styles that might interfere */
.markdown-body .faq-item p {
  margin: 0;
}

.markdown-body .faq-question strong {
  font-weight: 600;
  color: #1F1F29;
}

/* === Enhanced Footer Styles === */
.desktop-footer,
.tablet-footer,
.mobile-footer {
  font-size: 1.05rem; /* slight bump */
  line-height: 1.6;
}
.desktop-footer h5,
.tablet-footer h5,
.mobile-footer h6 {
  font-size: 1.15rem;
}

/* contact list better spacing */
.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.footer-contact-item strong {
  font-weight: 600;
  margin-right: .5rem;
}
.footer-contact-item a {
  margin: 0;
}

/* footer contact list as two-column grid */
.footer-contact-list {
  padding: 0;
  margin: 0;
}
.footer-contact-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 1rem;
  align-items: flex-start;
  margin-bottom: .75rem;
}
.footer-contact-item .contact-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-contact-item .contact-value {
  word-break: break-word;
  overflow-wrap: break-word;
}
.footer-contact-item strong,
.footer-contact-item a {
  margin: 0;
}

/* Responsive adjustments for specialist cards */
@media (max-width: 768px) {
  .specialist-avatar-container {
    width: 60px;
    height: 60px;
  }
  
  .avatar-placeholder {
    font-size: 1.2rem;
  }
  
  .specialist-card .card-title {
    font-size: 1rem;
  }
  
  .specialist-details p {
    font-size: 0.85rem;
  }
  
  .specialist-card .card-body {
    padding: 1rem;
  }
}

/* Publications Page Styles */
.publications-hero {
  background: linear-gradient(rgba(0,123,194,0.8), rgba(0,123,194,0.8)), url('/assets/main_campus.jpeg');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 100px 0;
}

.publication-card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.publication-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.publication-featured {
  border-left: 4px solid #ffc107;
}

.publication-category-filter {
  border-radius: 20px;
  transition: all 0.2s ease-in-out;
}

.publication-category-filter:hover {
  transform: translateY(-1px);
}

.publication-category-filter.active {
  background-color: #007bff;
  color: white;
}

.publication-search-container {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 10px;
  padding: 2rem;
  margin-bottom: 2rem;
}

.publication-year-divider {
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
}

.publication-year-divider h3 {
  color: #495057;
  font-weight: 600;
}

.publication-abstract {
  max-height: 100px;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

.publication-abstract.expanded {
  max-height: none;
}

.publication-keywords .badge {
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}

.publication-citation-container {
  background-color: #f8f9fa;
  border-radius: 5px;
  padding: 0.75rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  font-family: 'Courier New', monospace;
}

.publication-no-results {
  text-align: center;
  padding: 4rem 0;
  color: #6c757d;
}

.publication-no-results i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* DOI Link Styling */
a[href*="doi.org"] {
  color: #28a745;
  text-decoration: none;
  border-bottom: 1px dotted #28a745;
}

a[href*="doi.org"]:hover {
  color: #218838;
  border-bottom: 1px solid #218838;
}

/* PDF Link Styling */
.btn-pdf {
  background-color: #dc3545;
  border-color: #dc3545;
  color: white;
}

.btn-pdf:hover {
  background-color: #c82333;
  border-color: #bd2130;
  color: white;
}

/* Publication Search Form */
.publication-search-form {
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-radius: 25px;
  overflow: hidden;
}

.publication-search-form input {
  border: none;
  border-radius: 25px 0 0 25px;
  padding: 0.75rem 1.5rem;
}

.publication-search-form button {
  border-radius: 0 25px 25px 0;
  padding: 0.75rem 1.5rem;
}

/* Loading States */
.publication-loading {
  text-align: center;
  padding: 2rem;
}

.publication-loading .spinner-border {
  width: 3rem;
  height: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .publications-hero {
    padding: 60px 0;
  }
  
  .publications-hero h1 {
    font-size: 2rem;
  }
  
  .publication-search-container {
    padding: 1rem;
  }
  
  .publication-category-filter {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
  }
  
  .publication-card .card-body {
    padding: 1rem;
  }
  
  .publication-card .card-title {
    font-size: 1rem;
  }
  
  .publication-search-form input,
  .publication-search-form button {
    border-radius: 5px;
    margin-bottom: 0.5rem;
  }
  
  .publication-search-form {
    border-radius: 5px;
  }
}

/* Print Styles */
@media print {
  .publication-search-container,
  .publication-category-filter,
  .btn,
  .navbar,
  .footer {
    display: none !important;
  }
  
  .publication-card {
    break-inside: avoid;
    margin-bottom: 1rem;
    border: 1px solid #dee2e6;
  }
  
  .publication-abstract {
    max-height: none;
  }
}

.values-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.values-list li {
    background: #f8f9fa;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 4px solid #2F72B2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.values-list li:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.values-list li {
    margin: 0;
    color: #333;
    font-weight: 500;
    line-height: 1.6;
}

/* Pagination Styles */
.pagination {
    margin: 0;
    padding: 0;
}

.pagination .page-link {
    color: #2F72B2;
    border: 1px solid #dee2e6;
    background-color: #fff;
    padding: 0.5rem 0.75rem;
    margin: 0 2px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    color: #fff;
    background-color: #2F72B2;
    border-color: #2F72B2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(47, 114, 178, 0.2);
}

.pagination .page-item.active .page-link {
    background-color: #2F72B2;
    border-color: #2F72B2;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
    cursor: not-allowed;
}

.pagination .page-item.disabled .page-link:hover {
    transform: none;
    box-shadow: none;
}

/* Pagination container */
#pagination-container {
    margin-top: 2rem;
    margin-bottom: 6rem;
    padding-bottom: 2rem;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
        margin: 0 1px;
    }
    
    .pagination .page-link:not(.disabled) {
        min-width: 40px;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .pagination .page-link {
        padding: 0.25rem 0.375rem;
        font-size: 0.8rem;
        margin: 0;
    }
    
    .pagination .page-item:not(.active):not(.disabled) .page-link {
        display: none;
    }
    
    .pagination .page-item.active .page-link,
    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link {
        display: inline-block;
    }
}

/* Responsive template visibility for specialists */
.view-template {
  display: none;
}

/* Mobile: show mobile template */
@media (max-width: 767px) {
  .mobile-template {
    display: block;
  }
}

/* Tablet: show tablet template */
@media (min-width: 768px) and (max-width: 991px) {
  .tablet-template {
    display: block;
  }
}

/* Desktop: show desktop template */
@media (min-width: 992px) {
  .desktop-template {
    display: block;
  }
}

/* ------------------------------------------------------------------
   Final overrides: ensure layout-generated FAQ (animated tiles) use
   compact spacing. Placed at EOF to win over other rules and include
   !important to defeat competing styles or Bootstrap defaults.
------------------------------------------------------------------ */
.faq-accordion.layout-faq .faq-question,
.faq-accordion.layout-faq .faq-answer,
.faq-accordion.layout-faq .faq-answer > .card-body,
.layout-faq .faq-question,
.layout-faq .faq-answer,
.layout-faq .faq-answer > .card-body {
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
  padding-left: 0.6rem !important;
  padding-right: 0.6rem !important;
}

.faq-accordion.layout-faq .faq-answer p,
.faq-accordion.layout-faq .faq-answer > .card-body p,
.layout-faq .faq-answer p,
.layout-faq .faq-answer > .card-body p {
  margin-top: 0 !important;
  margin-bottom: 0.35rem !important;
}

/* Remove extra top/bottom margins on headings inside faq-answer */
.layout-faq .faq-answer h1,
.layout-faq .faq-answer h2,
.layout-faq .faq-answer h3,
.layout-faq .faq-answer h4,
.layout-faq .faq-answer h5,
.layout-faq .faq-answer h6 {
  margin-top: 0 !important;
  margin-bottom: 0.35rem !important;
}

/* Ensure the FAQ item border and radius remain as intended */
.layout-faq .faq-item {
  margin-bottom: 10px !important;
  border-radius: 8px !important;
  overflow: hidden !important;
}

/* Force a larger title padding for layout-faq to ensure the question row
   has extra breathing room even when compact rules exist. */
.faq-accordion.layout-faq .faq-question,
.layout-faq .faq-question {
  padding: 1.5rem 1rem !important;
}

/* Make regular (non-animated) tiles match the cards' white background
   but remain rectangular. Placed at EOF to ensure it overrides the
   earlier gradient tile rules. */
.tile-item.card,
.tile-item.card .card-body {
  background: #ffffff !important;
  color: #1F1F29 !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
  border-radius: 6px !important; /* slightly more rectangular than cards */
  box-shadow: 0 6px 18px rgba(0,0,0,0.06) !important;
}

.tile-item.card .card-header {
  background: transparent !important;
  padding: 0 !important;
}

/* Ensure bootstrap icons render even if some font-family is overridden elsewhere.
   Scoped to .bi to avoid affecting other icon fonts. Placed at EOF so it wins
   over earlier rules that might have changed font-family. */
.bi {
  font-family: "bootstrap-icons" !important;
  font-style: normal;
  font-weight: 400;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 1.25em; /* ensure visible size */
}

