/* Global CSS for Xinjiang Medical University */
:root {
    --primary-color: #e7232b;
    --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;
}

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.9rem;
}

.top-header-contact span {
    margin-right: 20px;
}

.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: 15px 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: 60px;
    transition: var(--transition);
}

.logo.small img {
    height: 40px;
}

/* 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: 15px 20px;
    display: 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;
}

.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: 80px 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-contact span {
        display: 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;
  left: 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: 4.5rem;
  background-color: #25D366 !important; /* WhatsApp green */
}

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

#backToTop {
  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;
    left: 1rem;
  }

  #whatsappWidget {
    bottom: 5.5rem;
  }

  #wechatWidget {
    bottom: 9rem;
  }

  #backToTop {
    bottom: 1.5rem;
  }
}

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

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



/* Consultant Agents Row */
.consultant-row {
    position: fixed;
    bottom: 30px;
    right: 200px;
    z-index: 1000;
    display: flex;
    gap: 12px;
    align-items: center;
    background:var(--primary-color);
    color: white !important;
    padding: 8px 12px;
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

. consultant-row .reach{
    color: white !important;
   }

.consultant-agent {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.consultant-agent:hover {
    transform: translateY(-5px);
}

.consultant-agent:hover .agent-avatar {
    box-shadow: 0 8px 25px rgba(0, 104, 55, 0.4);
    transform: scale(1.1);
}

.agent-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50% !important;
   overflow: hidden;
    object-fit: cover;
    transition: all 0.3s ease;
}

/* Agent Modals */
.agent-modal {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.agent-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 20px;
    width: 280px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.agent-qr {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 5px;
    background: white;
}

.agent-info {
    flex: 1;
}

.agent-name {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.2rem;
    font-weight: 600;
}

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

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

.contact-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    color: white;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.contact-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.whatsapp {
    background: #25D366;
}

.email {
    background: #EA4335;
}

.wechat {
    background: #09BB07;
    cursor: default;
}

.contact-link:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.whatsapp:hover {
    background: #128C7E;
}

.email:hover {
    background: #D32F2F;
}

.wechat:hover {
    background: #07AD07;
}

/* Tooltip for agent names */
.consultant-agent::after {
    content: attr(data-agent-name);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1002;
}

.consultant-agent::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.consultant-agent:hover::after,
.consultant-agent:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Responsive Design */
@media (max-width: 768px) {
    .consultant-row {
        bottom: 20px;
        right: 100px;
        gap: 10px;
        padding: 6px 10px;
    }
    
    .agent-avatar {
        width: 45px;
        height: 45px;
    }
    
    .agent-modal {
        bottom: 90px;
        right: 20px;
        width: 90%;
        max-width: 250px;
    }
    
    .modal-content {
        padding: 15px;
        width: 100%;
    }
    
    .modal-header {
        gap: 12px;
        margin-bottom: 15px;
    }
    
    .agent-qr {
        width: 70px;
        height: 70px;
    }
    
    .agent-name {
        font-size: 1.1rem;
    }
    
    .agent-title {
        font-size: 0.8rem;
    }
    
    .contact-link {
        padding: 8px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .consultant-row {
        bottom: 15px;
        right: 40px !important;
        gap: 8px;
        padding: 5px 8px;
    }
    
    .agent-avatar {
        width: 40px;
        height: 40px;
        border-width: 2px;
    }
    
    .agent-modal {
        bottom: 80px;
        right: 15px;
        max-width: 220px;
    }
    
    .agent-qr {
        width: 60px;
        height: 60px;
    }
    
    .agent-name {
        font-size: 1rem;
    }
    
    .contact-link {
        padding: 7px 10px;
        font-size: 0.8rem;
        gap: 8px;
    }
    
    .contact-link i {
        font-size: 1rem;
    }
}