/********** LT Language - Chinese Language Center Style **********/
:root {
    --bs-primary: #C81E2B;
    --bs-primary-rgb: 200, 30, 43;
    --bs-primary-hover: #A71520;
    --bs-secondary: #1B2232;
    --bs-secondary-rgb: 27, 34, 50;
    --bs-dark: #111723;
    --bs-tertiary: #525968;
    --bs-gold: #D97706;
    --bs-gold-hover: #B45309;
    --bs-gold-light: #FEF3C7;
    --bs-light-bg: #F8FAFC;
    --bs-card-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    --bs-card-shadow-hover: 0 16px 36px rgba(200, 30, 43, 0.15);
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #475569;
    background-color: #ffffff;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--bs-secondary);
    font-weight: 700;
}

/* Primary & Secondary Color Overrides */
.text-primary {
    color: var(--bs-primary) !important;
}

.text-gold {
    color: var(--bs-gold) !important;
}

.bg-primary {
    background-color: var(--bs-primary) !important;
}

.bg-secondary {
    background-color: var(--bs-secondary) !important;
}

.bg-dark {
    background-color: var(--bs-dark) !important;
}

.bg-gold-light {
    background-color: var(--bs-gold-light) !important;
}

.bg-light-cn {
    background-color: #FFF9F8 !important;
}

.border-primary {
    border-color: var(--bs-primary) !important;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 30px;
    bottom: 30px;
    z-index: 99;
    background: var(--bs-primary);
    border: none;
    color: #fff;
    box-shadow: 0 4px 15px rgba(200, 30, 43, 0.4);
}

.back-to-top:hover {
    background: var(--bs-primary-hover);
    color: #fff;
}

.fw-bold {
    font-weight: 800 !important;
}

.fw-medium {
    font-weight: 600 !important;
}

.fw-normal {
    font-weight: 400 !important;
}

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/*** Button Styling ***/
.btn {
    font-weight: 600;
    transition: all .3s ease;
    border-radius: 8px;
}

.btn-primary {
    color: #ffffff !important;
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 4px 14px rgba(200, 30, 43, 0.3);
}

.btn-primary:hover, .btn-primary:focus {
    color: #ffffff !important;
    background-color: var(--bs-primary-hover) !important;
    border-color: var(--bs-primary-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 30, 43, 0.4);
}

.btn-secondary {
    color: #ffffff !important;
    background-color: var(--bs-secondary) !important;
    border-color: var(--bs-secondary) !important;
}

.btn-secondary:hover {
    background-color: #111723 !important;
    transform: translateY(-2px);
}

.btn-gold {
    color: #ffffff !important;
    background-color: var(--bs-gold) !important;
    border-color: var(--bs-gold) !important;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.3);
}

.btn-gold:hover {
    background-color: var(--bs-gold-hover) !important;
    color: #ffffff !important;
    transform: translateY(-2px);
}

.btn-outline-primary {
    color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--bs-primary) !important;
    color: #ffffff !important;
}

.btn-square {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/*** Topbar ***/
.topbar {
    font-size: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar-badge {
    background: rgba(200, 30, 43, 0.2);
    color: #ff8b94;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    border: 1px solid rgba(200, 30, 43, 0.4);
}

/*** Navbar ***/
.navbar {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s;
}

.brand-cn {
    font-size: 13px;
    letter-spacing: 2px;
    color: #ffccd0;
    font-weight: 500;
}

.navbar .navbar-nav .nav-link {
    margin: 0 10px;
    padding: 12px 6px;
    outline: none;
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    transition: color 0.2s ease;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link.active {
    color: #ff9da5 !important;
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", "Font Awesome 7 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 6px;
    font-size: 12px;
}

.navbar .dropdown-menu {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.06);
    padding: 10px 0;
}

.navbar .dropdown-menu .dropdown-item {
    font-size: 14px;
    font-weight: 600;
    padding: 8px 20px;
    color: var(--bs-secondary);
}

.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item.active {
    color: var(--bs-white);
    background: var(--bs-primary);
}

@media (max-width: 991.98px) {
    .navbar .navbar-nav .nav-link  {
        margin-left: 0;
        padding: 10px 0;
    }
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        border: none;
        margin-top: 0;
        top: 130%;
        opacity: 0;
        visibility: hidden;
        transition: .3s;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        visibility: visible;
        transition: .3s;
        opacity: 1;
    }
}

/*** Header Carousel ***/
.header-carousel .carousel-item {
    position: relative;
    max-height: 580px;
    overflow: hidden;
}

.header-carousel .carousel-item img {
    object-fit: cover;
    height: 560px;
    filter: brightness(0.72);
}

.header-carousel .carousel-caption {
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    text-align: left;
    max-width: 780px;
}

.carousel-control-prev,
.carousel-control-next {
    width: 7%;
    opacity: 0.8;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 50%;
    background-size: 50%;
}

/*** Section Title ***/
.section-title {
    position: relative;
    padding-left: 20px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    font-size: 13px;
    font-weight: 700;
}

.section-title::before {
    position: absolute;
    content: "";
    width: 10px;
    height: 10px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    border-radius: 3px;
    background: var(--bs-primary);
}

/*** Chinese Culture Badges ***/
.cn-seal {
    display: inline-block;
    border: 2px solid var(--bs-primary);
    color: var(--bs-primary);
    padding: 3px 12px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
}

.badge-course {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--bs-primary);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 2;
}

.badge-popular {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--bs-gold);
    color: #fff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 2;
}

/*** Course Cards (Khóa Học) ***/
.course-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--bs-card-shadow);
    transition: all 0.35s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--bs-card-shadow-hover);
    border-color: rgba(200, 30, 43, 0.3);
}

.course-card-img-wrap {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.course-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.course-card:hover .course-card-img-wrap img {
    transform: scale(1.08);
}

.course-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #64748B;
    margin-bottom: 12px;
}

.course-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.course-meta i {
    color: var(--bs-primary);
}

.course-highlights {
    list-style: none;
    padding: 0;
    margin: 12px 0 18px 0;
    font-size: 13.5px;
    color: #475569;
}

.course-highlights li {
    padding: 4px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.course-highlights li i {
    color: var(--bs-primary);
    font-size: 13px;
}

.course-footer {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px dashed #E2E8F0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.course-price {
    font-weight: 800;
    font-size: 18px;
    color: var(--bs-primary);
}

.course-old-price {
    font-size: 12px;
    text-decoration: line-through;
    color: #94A3B8;
    display: block;
}

/*** TOPIK & HSK Section ***/
.exam-banner {
    background: linear-gradient(135deg, #1B2232 0%, #2A364F 100%);
    border-radius: 20px;
    padding: 40px;
    color: #fff;
    box-shadow: 0 15px 40px rgba(27, 34, 50, 0.25);
}

.exam-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 30px;
    height: 100%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 5px solid var(--bs-primary);
}

.exam-card.exam-topik {
    border-top-color: #2563EB;
}

.exam-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.exam-level-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    margin-right: 6px;
    margin-bottom: 6px;
}

.tag-hsk {
    background: #FFE4E6;
    color: #C81E2B;
}

.tag-topik {
    background: #DBEAFE;
    color: #1E40AF;
}

/*** 1-on-1 Tutoring (Học Kèm) ***/
.tutoring-box {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--bs-card-shadow);
    border: 1px solid #F1F5F9;
    position: relative;
    transition: all 0.3s;
}

.tutoring-box:hover {
    box-shadow: var(--bs-card-shadow-hover);
    transform: translateY(-5px);
}

.tutoring-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #FFF1F2;
    color: var(--bs-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 20px;
}

/*** Registration Form (Đăng Ký) ***/
.register-section {
    background: linear-gradient(135deg, #1B2232 0%, #111723 100%);
    position: relative;
}

.register-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    color: var(--bs-primary);
}

.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(200, 30, 43, 0.2);
}

/*** Testimonial Cards ***/
.testimonial-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--bs-card-shadow);
    border: 1px solid #F1F5F9;
    height: 100%;
}

.student-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FFF1F2;
}

/*** Stats Box ***/
.stat-box {
    text-align: center;
    padding: 24px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    border-bottom: 4px solid var(--bs-primary);
    transition: all 0.3s;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.stat-number {
    font-size: 38px;
    font-weight: 800;
    color: var(--bs-primary);
    line-height: 1;
    margin-bottom: 8px;
}

/*** Floating Contact Widget ***/
.floating-contact-bar {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.floating-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff !important;
    font-size: 22px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    position: relative;
}

.floating-btn:hover {
    transform: scale(1.12);
}

.floating-zalo {
    background: #0088FF;
}

.floating-phone {
    background: #22C55E;
    animation: pulse-green 2s infinite;
}

.floating-register {
    background: var(--bs-primary);
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

.floating-tooltip {
    position: absolute;
    left: 64px;
    background: #1E293B;
    color: #fff;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.floating-btn:hover .floating-tooltip {
    opacity: 1;
}

/*** Footer ***/
.footer {
    color: rgba(255, 255, 255, 0.65);
    background: var(--bs-dark);
}

.footer .btn.btn-link {
    display: block;
    margin-bottom: 8px;
    padding: 0;
    text-align: left;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    font-size: 14px;
    transition: .3s;
    text-decoration: none;
}

.footer .btn.btn-link::before {
    position: relative;
    content: "\f105";
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free", "Font Awesome 7 Free";
    font-weight: 900;
    margin-right: 10px;
    color: var(--bs-primary);
}

.footer .btn.btn-link:hover {
    color: #ff9da5;
    padding-left: 5px;
}

.footer-social-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-right: 8px;
    transition: all 0.3s;
    text-decoration: none;
}

.footer-social-btn:hover {
    background: var(--bs-primary);
    color: #fff;
    transform: translateY(-3px);
}

/*** Copyright ***/
.copyright {
    color: rgba(255, 255, 255, 0.6);
    background: #0B0F17;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 14px;
}

/*** Test Kỹ Năng Tiếng Trung Module ***/
.test-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.test-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--bs-primary);
}

.option-label {
    cursor: pointer;
    background: #fff;
    transition: all 0.2s ease;
}

.option-label:hover {
    background: #f0f7ff;
    border-color: var(--bs-primary) !important;
}

.option-label input[type="radio"]:checked + .option-text {
    font-weight: 700;
    color: var(--bs-primary);
}

.bg-light-success {
    background-color: #f0fdf4 !important;
}

.bg-light-danger {
    background-color: #fef2f2 !important;
}

.cursor-pointer {
    cursor: pointer;
}

/* Mobile Touch & Test Engine Enhancements */
.btn-start-test, .btn-audio-touch {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.option-label {
    min-height: 48px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

.option-label.selected-option,
.option-label:has(input[type="radio"]:checked) {
    border-color: var(--bs-primary) !important;
    background-color: #fff5f5 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25) !important;
}

.option-label input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.ring-2 {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.25) !important;
}

.test-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.test-card:hover, .test-card:active {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1) !important;
}

/* Topbar Multi-line Branch Styling */
.topbar-branch-row {
    line-height: 1.4;
    font-size: 0.85rem;
}

@media (max-width: 991.98px) {
    .topbar-branch-row {
        font-size: 0.78rem;
        line-height: 1.35;
    }
}


/* ==================== ĐỘI NGŨ GIẢNG VIÊN ==================== */
.teacher-card {
    transition: all 0.3s ease;
    border: 1px solid #f1f5f9;
}
.teacher-card:hover {
    box-shadow: 0 15px 35px rgba(200, 30, 43, 0.08) !important;
    border-color: #ffd2d5 !important;
    transform: translateY(-3px);
}
.teacher-avatar-wrap {
    position: relative;
    max-width: 220px;
    margin: 0 auto;
}
.teacher-avatar-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: top center;
    border: 3px solid #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}
.teacher-exp-badge {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #C81E2B 0%, #a0141f 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 999px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(200, 30, 43, 0.35);
}
.teacher-cert-item {
    display: flex;
    align-items: center;
    font-weight: 600;
}
.teacher-methodology {
    background: #fdf8f8 !important;
    border-color: #fee2e2 !important;
}



/* ==================== NAVBAR & BRAND SIZING ENHANCEMENTS ==================== */
.navbar-brand {
    max-width: 220px !important;
    flex-shrink: 0 !important;
    padding: 6px 14px !important;
    margin-right: 8px !important;
}

.navbar-brand .brand-title {
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    margin-bottom: 2px !important;
}

.navbar-brand .brand-cn {
    font-size: 10px !important;
    letter-spacing: 0.6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 165px !important;
    display: block !important;
    color: #ffccd0 !important;
    font-weight: 500 !important;
}

@media (min-width: 992px) {
    .navbar .navbar-nav {
        flex-wrap: nowrap !important;
        align-items: center !important;
        gap: 1px !important;
    }

    .navbar .navbar-nav .nav-link {
        margin: 0 1px !important;
        padding: 8px 6px !important;
        font-size: 13.5px !important;
        font-weight: 600 !important;
        white-space: nowrap !important; /* Ngăn chặn tuyệt đối việc xuống dòng làm vỡ chữ */
        display: inline-flex !important;
        align-items: center !important;
        line-height: 1.2 !important;
    }

    .navbar .navbar-nav .nav-link .badge {
        font-size: 9.5px !important;
        padding: 2px 4px !important;
        margin-right: 3px !important;
        vertical-align: middle !important;
    }

    .navbar-nav .btn {
        white-space: nowrap !important;
        font-size: 13px !important;
        padding: 7px 12px !important;
        margin-left: 6px !important;
    }
}

.cn-seal {
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    max-width: 100% !important;
}

.teacher-exp-badge {
    white-space: nowrap !important;
}

.btn-start-test {
    white-space: nowrap !important;
}
