/* Global CSS for Xinjiang Medical University */
:root {
    --primary-color: #e72128;
    --secondary-color: #cc0000;
    --accent-color: #ffcc00;
    --light-bg: #f8f9fa;
    --dark-text: #333333;
    --light-text: #666666;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    border-radius: 0px !important;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    overflow-x: hidden;
    max-width: 100%;
}

body.menu-open {
    overflow: hidden;
}

/* Header Styles */
.top-header {
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 0;
    transition: var(--transition);
    z-index: 1100;
    position: relative;
}

.top-header.hide {
    transform: translateY(-100%);
    opacity: 0;
}

.top-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.top-header-content .top-header-contact a{
 
   }

.top-header-contact a {
    margin-right: 20px;
    color: white !important;
    text-decoration: none;
}

.top-header-contact i {
    margin-right: 5px;
}

.social-icons a {
    color: var(--white);
    margin-left: 15px;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--accent-color);
}

/* Brand Bar Styles */
.brand-bar {
    background: var(--white);
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.brand-bar.fixed {
    position: fixed;
    top: 0;
    width: 100%;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

.brand-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.logo img {
    height: 80px;
    transition: var(--transition);
}

.logo.small img {
    display: none;
}

/* Mobile menu button */
.mobile-menu-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background: var(--secondary-color);
}

/* Main Navbar Styles */
.main-navbar {
    background: white;
    transition: var(--transition);
    z-index: 999;
}

.nav-links {
    display: flex;
    flex-direction: row;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    transition: var(--transition);
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: var(--dark-text);
    text-decoration: none;
    padding: 5px 15px;
    margin:  10px 0px;
    border-right: 1px solid black;
    display: inline-block;
    transition: var(--transition);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--secondary-color);
}

.dropdown-menu {
    background: var(--white);
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 0;
    min-width: 200px;
}

.dropdown-menu a {
    color: var(--dark-text);
    padding: 10px 20px;
}

.dropdown-menu a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.apply-now-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 25px;
    font-weight: bold;
    transition: var(--transition);
    cursor: pointer;
}

.apply-now-btn:hover {
    background: var(--secondary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* When navbar moves to brand bar */
.nav-in-brand {
    display: none;
}

.brand-bar.fixed .nav-in-brand {
    display: flex;
    align-items: center;
}

.brand-bar.fixed .nav-in-brand .nav-links {
    margin-left: 20px;
}

.brand-bar.fixed .nav-in-brand .nav-links a {
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* Mobile Menu Overlay Styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.show {
    display: block;
    opacity: 1;
}

/* Mobile Menu Panel */
.mobile-menu-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 350px;
    height: 100%;
    background: var(--white);
    box-shadow: -5px 0 25px rgba(0,0,0,0.1);
    z-index: 1050;
    transition: right 0.3s ease;
    overflow-y: auto;
    padding: 80px 20px 30px;
}

.mobile-menu-panel.show {
    right: 0;
}

/* Mobile Menu Close Button */
.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--dark-text);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mobile-menu-close:hover {
    color: var(--primary-color);
    transform: rotate(90deg);
}

/* Mobile Menu Content */
.mobile-nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-links li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-links a {
    display: block;
    padding: 15px 0;
    color: var(--dark-text);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    transition: var(--transition);
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: var(--primary-color);
    padding-left: 10px;
}

.mobile-apply-btn {
    margin-top: 30px;
    width: 100%;
}

/* Footer Styles */
.main-footer {
    background: #D3D3D3;
    color: var(--dark-text);
    padding: 50px 0 20px;
}

/* Blog post page: footer full viewport width (in global.css so it applies even if blog-post.css is cached) */
.blog-post-page + .main-footer,
.blog-post-page .main-footer {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    box-sizing: border-box;
    position: relative;
}

/* Prevent horizontal scroll from full-width footer on blog post page */
body:has(.blog-post-page) {
    overflow-x: hidden;
}

.footer-column h5 {
    color: var(--dark-text) !important;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--dark-text);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.contact-info p {
    margin-bottom: 10px;
    display: flex;
    align-items: left;
}

.contact-info i {
    margin-right: 10px;
    color: var(--dark-text);
}

.social-footer a {
    display: inline-block;
    width: 36px;
    height: 36px;
    color: var(--dark-text);
    text-align: center;
    line-height: 36px;
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}

.social-footer a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.copyright {
    border-top: 1px solid var(--dark-text);
    padding-top: 10px;
    margin-top: 10px;
    text-align: left;
    color: var(--dark-text);
    font-size: 0.9rem;
}

/* Utility Classes */
.section-padding {
    padding: 40px 0;
}

.section-title {
    color: var(--dark-color);
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 5px;
}

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

.card {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
    margin-bottom: 30px;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.btn-primary-custom {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 25px;
    transition: var(--transition);
}

.btn-primary-custom:hover {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary-custom {
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 10px 25px;
    transition: var(--transition);
}

.btn-secondary-custom:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .nav-in-brand {
        display: none !important;
    }

    /* Hide desktop navbar on mobile */
    .main-navbar {
        display: none;
    }

    /* Adjust brand bar when mobile menu is open */
    body.menu-open .brand-bar {
        position: relative;
        z-index: 1051;
    }
}

@media (max-width: 768px) {
    .top-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .top-header-contact {
        margin-bottom: 10px;
    }
   .top-header-content .contact-a{
     display: flex;
     flex-direction: column;
    }
    
    .top-header-contact span {
        display: inline-block;
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .social-icons {
        margin-top: 10px;
    }
    
    .social-icons a:first-child {
        margin-left: 0;
    }
    
    .section-padding {
        padding: 50px 0;
    }
    
    .brand-content {
        flex-direction: row;
    }
    
    .logo img {
        height: 50px;
    }
}

@media (min-width: 993px) {
    .mobile-menu-btn {
        display: none !important;
    }
    
    .mobile-menu-overlay,
    .mobile-menu-panel,
    .mobile-menu-close {
        display: none !important;
    }
}

/* Floating Buttons Styles */
.floating-widget {
  position: fixed;
  right: 1.25rem;
  z-index: 1050;
  transition: transform 0.3s ease, opacity 0.3s ease;
  border-radius: 50% !important;
  width: 3rem !important;
  height: 3rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

/* Common button styles for all widgets */
.floating-widget .btn-circle {
  width: 100% !important;
  height: 100% !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 2px solid transparent !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent;
}

/* Individual widget positioning */
#whatsappWidget {
  bottom: 6.5rem;
  background-color: #25D366 !important; /* WhatsApp green */
}

#wechatWidget {
  bottom: 10rem;
  background-color: #09BB07 !important; /* WeChat green */
}

#partnerWidget {
    position: fixed;
    right: 1.25rem;
    bottom: 13.5rem;
    z-index: 1050;
    background-color: var(--primary-color);
    color: #ffffff !important;
    border-radius: 999px;
    padding: 0.55rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

#partnerWidget:hover {
    color: #ffffff !important;
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

#backToTop {
  left: 1.25rem;
  bottom: 1rem;
  background-color: var(--primary-color) !important; /* Dark green */
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
}

/* Show/hide for back to top */
#backToTop.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Icon colors */
#whatsappWidget i,
#wechatWidget i,
#backToTop i {
  color: white !important;
  font-size: 1.2rem !important;
}

/* Hover effects */
.floating-widget:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3) !important;
}

#whatsappWidget:hover {
  background-color: #128C7E !important;
}

#wechatWidget:hover {
  background-color: #07AD07 !important;
}

#backToTop:hover {
  background-color: var(--secondary-color) !important;
}

/* WeChat Modal Styles */
.wechat-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.wechat-modal-backdrop.show {
  opacity: 1;
  visibility: visible;
}

.wechat-modal {
  background: #ffffff;
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  max-width: 360px;
  width: 90%;
  text-align: center;
  animation: slideUp 0.3s ease;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wechat-modal h5 {
  color: #006837;
  margin-bottom: 0.5rem;
}

.wechat-modal p {
  color: #666;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.wechat-modal img {
  max-width: 220px;
  border-radius: 4px;
  border: 1px solid #dee2e6;
  margin-bottom: 1.5rem;
}

.wechat-modal .btn-close {
  background: var(--primary-color);
  padding: 0rem 1rem 0.5rem 1rem ;
  color: white !important;
  cursor: pointer;
  transition: background 0.2s ease;
}

.wechat-modal .btn-close:hover {
  background:var(--secondary-color);
   
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .floating-widget {
    width: 2.75rem !important;
    height: 2.75rem !important;
    right: 1rem;
  }

    #partnerWidget {
        right: 1rem;
        bottom: 12rem;
        padding: 0.45rem 0.75rem;
        font-size: 0.75rem;
    }

  #whatsappWidget {
    bottom: 5.5rem;
  }

  #wechatWidget {
    bottom: 9rem;
  }

  #backToTop {
    left: 1rem;
    bottom: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .floating-widget {
    width: 2.5rem !important;
    height: 2.5rem !important;
  }

  #whatsappWidget {
    bottom: 4.8rem;
  }

  #wechatWidget {
    bottom: 8.3rem;
  }


    #partnerWidget {
        right: 0.75rem;
        bottom: 11.3rem;
        padding: 0.4rem 0.65rem;
        font-size: 0.7rem;
    }

  #whatsappWidget i,
  #wechatWidget i,
  #backToTop i {
    font-size: 1rem !important;
  }
}



/* Consultant Row */
.consultant-row {
    position: fixed;
    bottom: 0;
    right: 200px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: var(--primary-color);
    color: white;
    border-top-left-radius: 15px;
}

.consultant-row .reach-us {
    font-weight: 500;
    margin-right: 5px;
    font-size: 0.9rem;
}

.consultant-agent {
    position: relative;
    cursor: pointer;
}

.agent-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.consultant-agent:hover .agent-avatar {
    transform: scale(1.1);
}

/* Agent Modals */
.agent-modal {
    position: fixed;
    bottom: 70px;
    right: 200px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.agent-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    display: flex;
    flex-direction: row;
    background: white;
    border-radius: 8px;
    padding: 15px;
    width: 350px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border: 1px solid #ddd;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-header {
    display: flex;
    align-items: left;
    gap: 5px;
    margin-bottom: 10px;
    padding-right: 5px;
}

.agent-qr {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 3px;
}

.agent-info h4 {
    margin: 0 0 3px 0;
    font-size: 1.1rem;
    color: #333;
}

.agent-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.agent-contact {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-link {
    display: flex;
    justify-content: left;
    align-items: center !important;
    gap: 0px;
    padding: 0px 10px;
    text-decoration: none;
    color: #333;
    font-size: 0.9rem;
    border-radius: 4px;
    transition: background 0.2s ease;
}


.contact-link i {
    width: 20px;
    text-align: left;
    color: var(--primary-color);
}

.contact-link i.fa-whatsapp {
    color: #25D366;
}

.contact-link i.fa-weixin {
    color: #09BB07;
}

.contact-link i.fa-envelope {
    color: #EA4335;
}

.contact-link i.fa-phone {
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .consultant-row {
        padding: 6px 12px;
        gap: 8px;
        right: 100px;
        width: 300px;
    }
    
    .agent-avatar {
        width: 40px;
        height: 40px;
    }
    
    .modal-content {
        width: 350px;
        padding: 12px;
    }
    
    .agent-modal {
        bottom: 60px;
        right: 100px;
    }
}

@media (max-width: 480px) {
    .consultant-row {
        padding: 5px 10px;
        width: 280px !important;
    }
    
    .agent-avatar {
        width: 35px;
        height: 35px;
    }
    
    .modal-content {
        width: 220px;
    }
    
    .agent-modal {
        bottom: 60px;
        right: 100px;
    }
}


.top-header .welcome{
   font-size: 1.3rem;
  font-family:Monotype Corsiva;
  color: white;
  animation: blink 1s step-start infinite;
   }
  @keyframes blink { 50% { opacity: 0; } }

/* ==========================================================================
   Modern navbar (Phase 2 redesign) — overrides the legacy header styles above.
   Loaded on every page via global.css so the nav is consistent site-wide.
   ========================================================================== */
:root { --navy:#0b2a4a; --navy-600:#14487a; --ink:#16202e; --red-dark:#c81a20; }

/* --- Utility top bar: logo red; cursive blinking "Welcome!" kept (see original rule below) --- */
.top-header { background: var(--primary-color); padding: 8px 0; font-size: .82rem; }
.top-header-content { font-size: .82rem; }
.top-header-contact a { color:#fff !important; opacity: .92; transition: opacity .2s; }
.top-header-contact a:hover { opacity: 1; text-decoration: underline; }
.social-icons a:hover { color: #ff5259; }

/* --- Brand bar --- */
.brand-bar { padding: 12px 0; box-shadow: 0 1px 0 rgba(0,0,0,.06); }
.logo img { height: 62px; }

/* --- Apply Now button (pillless, refined) --- */
/* Header right-side action group (Apply + language switcher), kept together on the right */
.brand-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; flex: 0 0 auto; }
.brand-actions .xjmu-lang-switcher { margin-left: 0; }

/* Hover hint bubble for header action buttons (e.g. "Share Your Story"). Pure CSS. */
.nav-hovertip { position: relative; }
.nav-hovertip::after,
.nav-hovertip::before {
    position: absolute;
    left: 50%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .16s ease, transform .16s ease;
    z-index: 2000;
}
.nav-hovertip::after {
    content: attr(data-tip);
    top: calc(100% + 11px);
    transform: translateX(-50%) translateY(-4px);
    width: max-content;
    max-width: 240px;
    padding: .55rem .7rem;
    background: #0b2a4a;
    color: #fff;
    font-size: .78rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: normal;
    text-align: center;
    border-radius: 7px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
}
.nav-hovertip::before {
    content: "";
    top: calc(100% + 5px);
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-bottom-color: #0b2a4a;
}
.nav-hovertip:hover::after,
.nav-hovertip:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.nav-hovertip:hover::before,
.nav-hovertip:focus-visible::before {
    opacity: 1;
    visibility: visible;
}
@media (max-width: 991.98px) {
    .nav-hovertip::after,
    .nav-hovertip::before { display: none; }
}

/* Nav "Media" hover dropdown (pure CSS, matches the language-switcher pattern). */
.nav-dd { position: relative; }
.nav-dd-toggle { cursor: pointer; user-select: none; }
.nav-dd-toggle::after {
    content: "";
    display: inline-block;
    margin-left: 6px;
    vertical-align: middle;
    border: 4px solid transparent;
    border-top-color: currentColor;
    border-bottom: 0;
    transition: transform .15s ease;
}
.nav-dd:hover .nav-dd-toggle::after,
.nav-dd:focus-within .nav-dd-toggle::after { transform: rotate(180deg); }
.nav-dd-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 190px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid #e9edf2;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .16s ease, transform .16s ease;
    z-index: 1600;
}
.nav-dd:hover .nav-dd-menu,
.nav-dd:focus-within .nav-dd-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.nav-dd-menu li { margin: 0; }
.nav-dd-menu a {
    display: block;
    padding: 9px 14px;
    border-radius: 7px;
    color: #1f2d3d;
    text-decoration: none;
    white-space: nowrap;
    font-size: .92rem;
    font-weight: 500;
}
.nav-dd-menu a:hover { background: #f4f6f9; color: var(--primary-color); }

.apply-now-btn {
    background: var(--primary-color);
    color: #fff !important;
    text-decoration: none !important;      /* no underline */
    border-radius: 4px !important;
    margin: 0 !important;
    align-self: center;                    /* never stretch to bar height */
    padding: 9px 20px !important;          /* fixed size in every state */
    font-size: .92rem !important;
    line-height: 1.1 !important;
    height: auto !important;
    font-weight: 700;
    letter-spacing: .01em;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(230,33,41,.22);
    transition: background .2s ease, transform .2s ease;
}
.apply-now-btn:hover { background: var(--red-dark); color: #fff !important; text-decoration: none !important; transform: translateY(-1px); }
/* keep the same compact size when the sticky (fixed) navbar appears on scroll */
.brand-bar.fixed .apply-now-btn { padding: 8px 18px !important; font-size: .88rem !important; }
/* Apply label: full at top, short ("Apply") in the scrolled/sticky navbar */
.apply-now-btn .apply-short { display: none; }
.brand-bar.fixed .apply-now-btn .apply-full { display: none; }
.brand-bar.fixed .apply-now-btn .apply-short { display: inline; }

/* --- Main navigation: clean links, animated underline, no separators --- */
.main-navbar { border-top: 1px solid #eef1f5; box-shadow: 0 2px 10px rgba(0,0,0,.04); }
.nav-links { gap: 2px; }
.nav-links a {
    border-right: 0 !important;
    margin: 6px 0 !important;
    padding: 10px 16px !important;
    font-weight: 600;
    font-size: .95rem;
    color: var(--ink) !important;
    position: relative;
    font-family: 'Inter','Segoe UI',system-ui,sans-serif;
}
.nav-links a::after {
    content: ''; position: absolute; left: 16px; right: 16px; bottom: 3px;
    height: 2px; background: var(--primary-color);
    transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary-color) !important; }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

/* Nav that collapses into the brand bar on scroll keeps the clean look */
.brand-bar.fixed .nav-in-brand .nav-links a { padding: 8px 12px !important; }

/* --- Mobile menu polish --- */
.mobile-nav-links a { font-weight: 600; }
.mobile-nav-links a:hover, .mobile-nav-links a.active { color: var(--primary-color); }
.mobile-apply-btn { border-radius: 4px !important; }

/* --- "Be Our Partner": vertical tab sticky to the LEFT edge (overrides earlier rules) --- */
#partnerWidget {
    position: fixed !important;
    left: 0 !important;
    right: auto !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
    transform-origin: left center;
    writing-mode: vertical-rl !important;
    text-orientation: mixed;
    background: var(--primary-color);
    color: #fff !important;
    padding: 0.9rem 0.32rem !important;   /* ~30% narrower than before */
    font-size: 0.66rem !important;
    font-weight: 700;
    letter-spacing: .03em;
    border-radius: 0 6px 6px 0 !important;
    box-shadow: 2px 3px 12px rgba(0,0,0,.22);
    z-index: 1050;
    transition: background .2s ease, transform .2s ease;
}
#partnerWidget:hover {
    background: var(--red-dark, #c81a20);
    color: #fff !important;
    transform: translateY(-50%) scale(1.09) !important;   /* scale on hover */
}
@media (max-width: 767.98px) {
    #partnerWidget { font-size: 0.58rem !important; padding: 0.8rem 0.28rem !important; }
}

/* ==========================================================================
   Admission consultants — WhatsApp-style chat widget (bottom-left)
   Replaces the legacy consultant-row badge.
   ========================================================================== */
/* Brand auto-link — inherits surrounding text, subtle affordance on hover */
.xjmu-brandlink { color: inherit; text-decoration: none; }
.xjmu-brandlink:hover { color: var(--primary-color); text-decoration: underline; text-underline-offset: 2px; }

.chatw { position: fixed; left: 0; bottom: 0; z-index: 1060; max-width: 100vw; }

.chatw__launcher {
    display: inline-flex; align-items: center; gap: .55rem;
    background: var(--primary-color); color: #fff; border: none;
    padding: .8rem 1.35rem;
    border-radius: 0 999px 999px 0 !important;   /* square left side — hugs the left edge */
    font-weight: 700; font-size: 1rem; line-height: 1; cursor: pointer;
    box-shadow: 3px -3px 18px rgba(0,0,0,.25);
    transition: transform .2s ease, background .2s ease;
}
.chatw__launcher i { font-size: 1.25rem; }
.chatw__launcher:hover { background: var(--red-dark, #c81a20); transform: scale(1.04); }

.chatw__panel {
    position: absolute; left: 0; bottom: calc(100% + .9rem);
    width: min(340px, calc(100vw - 24px));
    background: #fff; border-radius: 16px !important; overflow: hidden;
    box-shadow: 0 20px 55px rgba(0,0,0,.28);
    opacity: 0; visibility: hidden; transform: translateY(14px) scale(.97);
    transform-origin: bottom left; transition: opacity .22s ease, transform .22s ease, visibility .22s;
    pointer-events: none;
}
.chatw.open:not(.detailing) .chatw__panel { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }

.chatw__head { background: var(--primary-color); color: #fff; padding: 1.35rem 1.3rem; position: relative; }
.chatw__head p { margin: 0; font-weight: 700; font-size: 1rem; line-height: 1.45; text-align: center; }
.chatw__close {
    position: absolute; top: .5rem; right: .55rem;
    width: 30px; height: 30px; border-radius: 50% !important;
    background: rgba(255,255,255,.22); color: #fff; border: none;
    font-size: 1.25rem; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background .2s ease;
}
.chatw__close:hover { background: rgba(255,255,255,.38); }

.chatw__list { padding: .25rem 0; max-height: 62vh; overflow-y: auto; }
.chatw__agent {
    display: flex; align-items: center; gap: .9rem; width: 100%;
    padding: .85rem 1.15rem; text-decoration: none; text-align: left;
    background: transparent; color: inherit; font: inherit; cursor: pointer;
    border: 0; border-bottom: 1px solid #f0f1f4; transition: background .15s ease;
}
.chatw__agent:last-child { border-bottom: 0; }
.chatw__agent:hover { background: #f6f8fb; }
.chatw__avatar { position: relative; flex: 0 0 auto; }
.chatw__avatar img { width: 54px; height: 54px; border-radius: 50% !important; object-fit: cover; border: 1px solid #eceff3; display: block; }
.chatw__dot { position: absolute; right: 1px; bottom: 3px; width: 13px; height: 13px; border-radius: 50% !important; background: #22c55e; border: 2px solid #fff; }
.chatw__meta { display: flex; flex-direction: column; min-width: 0; }
.chatw__name { font-weight: 800; color: #1f2937; font-size: 1.05rem; line-height: 1.2; }
.chatw__role { color: #4b5563; font-size: .9rem; margin-top: .1rem; }
.chatw__status { color: #9aa3af; font-size: .82rem; margin-top: .12rem; }
.chatw__chev { margin-left: auto; color: #c3c9d2; font-size: .8rem; }

/* Per-counsellor detail popup */
.chatw__detail {
    position: absolute; left: 0; bottom: calc(100% + .9rem);
    width: min(340px, calc(100vw - 24px));
    max-height: calc(100vh - 6rem);            /* never taller than the screen */
    display: flex; flex-direction: column;
    background: #fff; border-radius: 16px !important; overflow: hidden;
    box-shadow: 0 20px 55px rgba(0,0,0,.28);
    opacity: 0; visibility: hidden; transform: translateY(14px) scale(.97);
    transform-origin: bottom left; transition: opacity .22s ease, transform .22s ease, visibility .22s;
    pointer-events: none;
}
.chatw.detailing .chatw__detail.show { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.chatw__dhead { flex: 0 0 auto; background: var(--primary-color); color: #fff; display: flex; align-items: center; gap: .6rem; padding: .7rem .85rem; }
.chatw__dtitle { flex: 1; font-weight: 700; font-size: .98rem; }
.chatw__back {
    background: rgba(255,255,255,.22); color: #fff; border: none;
    width: 28px; height: 28px; border-radius: 50% !important; cursor: pointer;
    display: flex; align-items: center; justify-content: center; font-size: .9rem; transition: background .2s ease;
}
.chatw__back:hover { background: rgba(255,255,255,.38); }
.chatw__dhead .chatw__close { position: static; }
.chatw__dbody { flex: 1 1 auto; overflow-y: auto; padding: 1rem 1.1rem 1.15rem; text-align: center; }
.chatw__qr { width: 130px; height: 130px; object-fit: contain; border: 1px solid #eef0f3; border-radius: 10px !important; padding: 4px; margin: 0 auto .35rem; display: block; }
.chatw__qrhint { color: #9aa3af; font-size: .78rem; margin: 0 0 .7rem; }
.chatw__davatar { width: 66px; height: 66px; object-fit: cover; border-radius: 50% !important; margin: 0 auto .55rem; display: block; border: 1px solid #eef0f3; }
.chatw__dname { font-weight: 800; color: #1f2937; font-size: 1.08rem; }
.chatw__drole { color: #6b7280; font-size: .88rem; margin-bottom: .8rem; }
.chatw__links { display: flex; flex-direction: column; gap: .5rem; text-align: left; }
.chatw__link {
    display: flex; align-items: center; gap: .7rem;
    padding: .65rem .8rem; border: 1px solid #eef0f3; border-radius: 10px !important;
    text-decoration: none; color: #1f2937; font-size: .95rem; transition: background .15s ease;
}
.chatw__link:hover:not(.chatw__link--static) { background: #f6f8fb; }
.chatw__link--static { cursor: default; }
.chatw__link > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatw__link i:first-child { width: 22px; text-align: center; font-size: 1.15rem; flex: 0 0 auto; }
.chatw__lchev { margin-left: auto; color: #c3c9d2; font-size: .75rem; }
.chatw__link i.fa-whatsapp { color: #25D366; }
.chatw__link i.fa-weixin { color: #09BB07; }
.chatw__link i.fa-envelope { color: #EA4335; }
.chatw__link i.fa-phone { color: #0d6efd; }

@media (max-width: 575.98px) {
    .chatw { left: 0; bottom: 0; max-width: 100vw; }
    .chatw__panel, .chatw__detail { width: min(340px, calc(100vw - 20px)); }
    .chatw__launcher { padding: .7rem 1.05rem; font-size: .9rem; }
}


/* ==========================================================================
   Dark footer (magazine style) — applies site-wide
   ========================================================================== */
.main-footer { background: #141e29; color: #c7d2df; }
.main-footer h5, .footer-column h5 { color: #ffffff !important; }
.footer-links a { color: #c7d2df; }
.footer-links a:hover { color: #ffffff; }
.contact-info p { color: #c7d2df; }
.contact-info i { color: #ff8a8f; }
.social-footer a { color: #c7d2df; border: 1px solid rgba(255,255,255,.18); }
.social-footer a:hover { color: #ffffff; background: var(--primary-color); border-color: var(--primary-color); }
.main-footer .copyright { border-top: 1px solid rgba(255,255,255,.14); color: #92a1b3; }
.main-footer a { color: #c7d2df; }
.main-footer a:hover { color: #ffffff; }

/* Keep the logo visible when the header becomes sticky (was hidden via .logo.small) */
.logo.small img { display: block !important; height: 46px !important; }

/* ---- Language switcher: single button + dropdown ---- */
.xjmu-lang-dd .xjmu-lang-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent; border: 1px solid #ccc; color: #444;
    padding: 6px 12px; font-size: 12px; font-weight: 700; letter-spacing: .4px;
    border-radius: 4px !important; cursor: pointer; line-height: 1; transition: var(--transition);
}
.xjmu-lang-dd .xjmu-lang-toggle:hover { border-color: var(--primary-color); color: var(--primary-color); }
.xjmu-lang-dd .xjmu-lang-caret { font-size: 8px; opacity: .8; }
.xjmu-lang-dd { position: relative; }
.xjmu-lang-menu {
    display: block !important; position: absolute; top: 100%; right: 0; left: auto; margin: 0;
    min-width: 0; width: max-content; z-index: 1200;
    border: 1px solid var(--ds-line, #e4e8ee); box-shadow: 0 8px 24px rgba(0,0,0,.14); padding: .3rem; background: #fff;
    opacity: 0; visibility: hidden; transform: translateY(6px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
    pointer-events: none;
}
/* open on hover or keyboard focus; no gap so the cursor can reach the items */
.xjmu-lang-dd:hover .xjmu-lang-menu,
.xjmu-lang-dd:focus-within .xjmu-lang-menu { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.xjmu-lang-menu .dropdown-item { font-size: .92rem; font-weight: 600; padding: .5rem .8rem; border-radius: 4px !important; color: #333; }
.xjmu-lang-menu .dropdown-item:hover { background: #f4f4f4; }
.xjmu-lang-menu .dropdown-item.active, .xjmu-lang-menu .dropdown-item:active { background: var(--primary-color); color: #fff; }

/* transparent overlay (homepage hero) — white toggle */
body.home-hero-overlay .brand-bar:not(.fixed) .xjmu-lang-toggle { color: #fff; border-color: rgba(255,255,255,.55); }
body.home-hero-overlay .brand-bar:not(.fixed) .xjmu-lang-toggle:hover { border-color: #fff; color: #fff; }

/* Hide video players whose YouTube link hasn't been set in the admin */
iframe[src=""] { display: none !important; }
.ratio:has(iframe[src=""]) { display: none !important; }
