/**
 * Cuba Hospital — lớp giao diện công khai (public)
 * Không dùng AdminLTE; không phụ thuộc assets magazine style-2.4.1.
 * Chỉ kích hoạt trong body.cuba_hospital — đi cùng Bootstrap 5.
 */

/* ----- Icon glyph thay vr-icons (Unicode, không font ngoài) ----- */
body.cuba_hospital [class^="icon-"]::before,
body.cuba_hospital [class*=" icon-"]::before {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif !important;
    font-style: normal;
    font-weight: normal;
    speak: none;
    display: inline-block;
    text-decoration: none;
    width: 1em;
    text-align: center;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
}

body.cuba_hospital .icon-arrow-down::before { content: "▾"; font-size: 0.65em; vertical-align: 0.15em; }
body.cuba_hospital .icon-arrow-up::before { content: "▴"; }
body.cuba_hospital .icon-arrow-left::before { content: "◂"; }
body.cuba_hospital .icon-arrow-right::before { content: "▸"; }

/* ----- Trang & liên kết ----- */
body.cuba_hospital {
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.cuba_hospital a {
    text-decoration-skip-ink: auto;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ----- Nav chính (mega + dropdown) ----- */
body.cuba_hospital .nav-main {
    padding: 0;
    border-bottom: none;
}

body.cuba_hospital #nav-top .dropdown-menu {
    z-index: 10050;
    border: none;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
    padding: 0.35rem 0;
}

body.cuba_hospital .dropdown .dropdown-menu {
    margin-top: 0 !important;
    border-radius: 12px !important;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.1);
    z-index: 10040;
}

body.cuba_hospital .dropdown .dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border-radius: 8px;
    margin: 0 0.25rem;
}

body.cuba_hospital .dropdown-item:hover,
body.cuba_hospital .dropdown-item:focus,
body.cuba_hospital .dropdown-item:active,
body.cuba_hospital .dropdown-item.active {
    color: #0f172a !important;
    background-color: #f1f5f9 !important;
}

body.cuba_hospital .nav-dropdown-menu > li {
    position: relative;
}

body.cuba_hospital .nav-dropdown-menu > li:hover > .dropdown-menu {
    display: block;
}

body.cuba_hospital .nav-dropdown-menu .dropdown-sub {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
}

body.cuba_hospital .nav-dropdown-menu > li:hover > .dropdown-sub {
    display: block;
}

body.cuba_hospital .nav-main .nav-dropdown-menu .dropdown-sub {
    left: auto !important;
    right: 100% !important;
    margin-right: -1px;
}

body.cuba_hospital .nav-main ul ul {
    margin-left: -15px;
}

body.cuba_hospital .nav-main .navbar-left .dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
}

body.cuba_hospital .profile-dropdown .dropdown-menu {
    left: -40px !important;
    min-width: 11rem !important;
    top: 4px !important;
}

body.cuba_hospital .profile-dropdown > a {
    padding: 0 !important;
}

body.cuba_hospital .profile-dropdown > a img {
    border-radius: 50%;
    border: 1px solid rgba(15, 23, 42, 0.12);
    width: 28px;
    height: 28px;
}

body.cuba_hospital .dropdown-languages .dropdown-menu {
    left: -34px !important;
    max-height: 400px;
    overflow-y: auto;
}

/* ----- Mega menu ----- */
body.cuba_hospital .mega-menu-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    z-index: 9999;
}

body.cuba_hospital .mega-menu {
    display: none;
    position: absolute;
    width: 100%;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 9999;
    top: -1px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 0 0 16px 16px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
}

body.cuba_hospital .mega-menu .menu-left {
    min-height: 250px;
    max-height: 320px;
    padding: 1.25rem 0;
    background-color: var(--vr-mega-menu-color, #0d47a1);
}

body.cuba_hospital .mega-menu .menu-left a {
    display: block;
    padding: 0.5rem 1.25rem 0.5rem 1rem;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    text-align: right;
    color: rgba(255, 255, 255, 0.92);
    border-right: 3px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

body.cuba_hospital .mega-menu .menu-left a:hover,
body.cuba_hospital .mega-menu .menu-left .active {
    background: rgba(255, 255, 255, 0.08);
    border-right-color: rgba(255, 255, 255, 0.5);
}

body.cuba_hospital .mega-menu .menu-right {
    padding: 1.75rem 0;
    min-height: 280px;
}

body.cuba_hospital .width100 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

body.cuba_hospital .width20 {
    flex: 0 0 20% !important;
    max-width: 20% !important;
}

body.cuba_hospital .width25 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
}

body.cuba_hospital .mega-menu .menu-right .container-fluid {
    padding-left: 10px;
    padding-right: 10px;
}

body.cuba_hospital .mega-menu .menu-post-item .image {
    display: block;
    width: 100%;
    height: 144px;
    position: relative;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 10px;
}

body.cuba_hospital .mega-menu .menu-post-item .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.cuba_hospital .mega-menu .menu-post-item .title {
    font-size: 0.8125rem;
    line-height: 1.35;
    font-weight: 600;
    margin-bottom: 6px;
}

body.cuba_hospital .mega-menu .menu-post-item .title a {
    color: #0f172a;
}

body.cuba_hospital .mega-menu .menu-category-items {
    display: none;
}

body.cuba_hospital .mega-menu .menu-right .active {
    display: block !important;
}

body.cuba_hospital .mega-menu .small-post-meta a,
body.cuba_hospital .mega-menu .small-post-meta span {
    font-size: 11px;
}

body.cuba_hospital .vr-scrollbar {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) transparent;
}

body.cuba_hospital .vr-scrollbar::-webkit-scrollbar {
    width: 6px;
}

body.cuba_hospital .vr-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 6px;
}

/* ----- Header mobile + menu trượt ----- */
body.cuba_hospital .header-mobile-container {
    display: none;
    position: relative;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    z-index: 100000;
}

@media (max-width: 767.98px) {
    body.cuba_hospital .header-mobile-container {
        display: block;
    }
}

body.cuba_hospital .header-mobile {
    width: 100%;
    padding: 6px 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    position: relative;
    z-index: 100000;
}

body.cuba_hospital .header-mobile-container .header-mobile > .d-flex {
    min-height: 56px;
}

body.cuba_hospital .header-mobile .menu-button {
    margin: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 10px 13px !important;
    background: transparent !important;
    border-radius: 10px;
}

body.cuba_hospital .mobile-search-form {
    padding: 10px;
    background: #fff;
    display: none;
}

body.cuba_hospital .mobile-search-form input {
    height: 44px;
    border-radius: 10px 0 0 10px;
}

body.cuba_hospital .mobile-search-form .btn {
    height: 44px;
    border-radius: 0 10px 10px 0;
}

body.cuba_hospital .nav-mobile {
    width: 0;
    height: 100%;
    position: fixed;
    z-index: 10002;
    top: 0;
    left: 0;
    padding-top: 70px;
    text-align: left;
    transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--vr-mega-menu-color, #0d47a1);
    overflow-x: hidden;
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.12);
}

body.cuba_hospital .nav-mobile .nav-mobile-inner {
    position: absolute;
    width: min(310px, 100vw);
    top: 0;
    left: 0;
    bottom: 40px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 1rem 4rem;
}

body.cuba_hospital .nav-mobile-open {
    width: min(310px, 100vw);
}

body.cuba_hospital .nav-mobile-open .nav-mobile-inner {
    width: 100%;
}

@keyframes cuba-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

body.cuba_hospital .overlay-bg {
    position: fixed;
    inset: 0;
    display: none;
    background: rgba(15, 23, 42, 0.45);
    z-index: 10001;
    animation: cuba-fade-in 0.2s ease;
    backdrop-filter: blur(2px);
}

body.cuba_hospital .nav-mobile .nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.cuba_hospital .nav-mobile .nav-item .nav-link {
    display: flex;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.95);
    padding: 12px 0;
}

body.cuba_hospital .nav-mobile .dropdown .menu-sub-items {
    transform: none !important;
    background: transparent !important;
    position: relative !important;
    box-shadow: none !important;
    border: 0 !important;
    padding: 0 0 10px !important;
}

body.cuba_hospital .nav-mobile .dropdown .menu-sub-items .nav-link {
    padding: 8px 15px 8px 20px;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.88);
}

body.cuba_hospital .nav-mobile .profile-dropdown-mobile {
    padding-bottom: 15px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

body.cuba_hospital .nav-mobile .profile-dropdown-mobile .menu-sub-items {
    width: 100%;
    left: 0 !important;
}

body.cuba_hospital .nav-mobile .profile-dropdown-mobile .menu-sub-items .dropdown-item {
    color: rgba(255, 255, 255, 0.9);
}

body.cuba_hospital .nav-link-mobile-profile {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #fff;
}

body.cuba_hospital .nav-link-mobile-profile img {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
    margin-right: 10px !important;
}

body.cuba_hospital .mobile-language-dropdown .dropdown-menu {
    position: relative !important;
    width: 100%;
    transform: none !important;
    top: -1px !important;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 10px;
}

/* ----- Nút (chỉ class legacy theme — không đè toàn bộ .btn Bootstrap) ----- */
body.cuba_hospital .btn-custom {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    color: #fff !important;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    background-color: var(--vr-theme-color, #1565c0) !important;
    box-shadow: 0 4px 14px rgba(21, 101, 192, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

body.cuba_hospital .btn-custom:hover,
body.cuba_hospital .btn-custom:focus-visible {
    color: #fff !important;
    filter: brightness(1.06);
    box-shadow: 0 6px 20px rgba(21, 101, 192, 0.32);
}

body.cuba_hospital .btn-default {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 10px;
    background-color: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
}

body.cuba_hospital .btn-default:hover {
    background-color: #e2e8f0 !important;
}

body.cuba_hospital .btn-block {
    width: 100% !important;
}

body.cuba_hospital .btn-account {
    width: 100%;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
}

body.cuba_hospital .input-account {
    padding: 12px 16px;
    line-height: 1.5;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

body.cuba_hospital .input-account:focus {
    border-color: var(--vr-theme-color, #1565c0);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.15);
}

/* ----- Section / sidebar / bài viết ----- */
body.cuba_hospital .section-page {
    min-height: 50vh;
    margin-bottom: 4rem;
}

body.cuba_hospital .col-sidebar {
    padding-left: 12px;
}

@media (max-width: 991.98px) {
    body.cuba_hospital .col-sidebar {
        padding-left: 0;
        margin-top: 2rem;
    }
}

body.cuba_hospital .post-item {
    display: block;
    width: 100%;
    margin-bottom: 2rem;
}

body.cuba_hospital .post-item .badge-category {
    position: absolute;
    left: 15px;
    top: 15px;
    z-index: 1;
}

body.cuba_hospital .post-item .image {
    width: 100%;
    display: block;
    position: relative;
    background-color: #f1f5f9;
    --bs-aspect-ratio: 61.9%;
    overflow: hidden;
    border-radius: 14px;
}

body.cuba_hospital .post-item-no-image .badge-category {
    position: relative;
    left: 0;
    margin-bottom: 15px;
}

body.cuba_hospital .post-item .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.cuba_hospital .post-item .title {
    font-size: 1.125rem;
    line-height: 1.35;
    font-weight: 700;
    margin-top: 0.75rem;
}

body.cuba_hospital .post-item .title a {
    color: #0f172a;
}

body.cuba_hospital .post-item .title a:hover {
    color: var(--vr-theme-color, #1565c0);
}

body.cuba_hospital .post-item .description {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.55;
}

body.cuba_hospital .media-icon {
    position: absolute;
    width: 42px;
    height: 42px;
    inset: 0;
    margin: auto;
    z-index: 10;
    text-align: center;
    pointer-events: none;
}

body.cuba_hospital .media-icon svg {
    display: inline-block;
    width: 42px;
    height: 42px;
    z-index: 1;
    background: rgba(15, 23, 42, 0.35) !important;
    border-radius: 50% !important;
}

body.cuba_hospital .media-icon-sm {
    width: 36px;
    height: 36px;
    line-height: 36px;
}

body.cuba_hospital .media-icon-sm svg {
    width: 36px;
    height: 36px;
}

body.cuba_hospital .media-icon-lg {
    width: 52px;
    height: 52px;
    line-height: 52px;
}

body.cuba_hospital .media-icon-lg svg {
    width: 52px;
    height: 52px;
}

body.cuba_hospital .post-meta,
body.cuba_hospital .small-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin: 0 0 0.5rem;
}

body.cuba_hospital .post-meta span,
body.cuba_hospital .post-meta a,
body.cuba_hospital .small-post-meta span,
body.cuba_hospital .small-post-meta a {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ----- Widget sidebar ----- */
body.cuba_hospital .sidebar-widget {
    display: block;
    margin-bottom: 2rem;
}

body.cuba_hospital .sidebar-widget .widget-head {
    margin-bottom: 1.25rem;
    position: relative;
    border-bottom: 2px solid #e2e8f0;
}

body.cuba_hospital .sidebar-widget .widget-head::after {
    content: "";
    width: 56px;
    height: 2px;
    display: block;
    position: relative;
    bottom: -2px;
    background: var(--vr-theme-color, #1565c0);
    border-radius: 2px;
}

body.cuba_hospital .sidebar-widget .widget-head .title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #0f172a;
}

body.cuba_hospital .sidebar-widget .tag-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

body.cuba_hospital .sidebar-widget .tag-list li {
    display: inline-block;
    margin: 0 6px 8px 0;
}

body.cuba_hospital .sidebar-widget .tag-list li a {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.8125rem;
    padding: 6px 12px;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

body.cuba_hospital .sidebar-widget .tag-list li a:hover {
    background: var(--vr-theme-color, #1565c0);
    border-color: var(--vr-theme-color, #1565c0);
    color: #fff !important;
}

body.cuba_hospital .sidebar-widget .widget-head-tabs .nav-tabs .active {
    color: #fff !important;
    background-color: var(--vr-theme-color, #1565c0) !important;
    border-radius: 10px 10px 0 0;
}

/* ----- Phân trang (BS5 + legacy) ----- */
body.cuba_hospital .pagination {
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

body.cuba_hospital .pagination .page-link,
body.cuba_hospital .pagination li a {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: 0.875rem;
    font-weight: 600;
    background: #fff;
    box-shadow: none !important;
}

body.cuba_hospital .pagination .page-link:hover,
body.cuba_hospital .pagination li a:hover {
    background: #f1f5f9;
    border-color: #cbd5e1 !important;
}

body.cuba_hospital .pagination li.active .page-link,
body.cuba_hospital .pagination li.active a {
    background-color: var(--vr-theme-color, #1565c0) !important;
    border-color: var(--vr-theme-color, #1565c0) !important;
    color: #fff !important;
}

/* ----- Nút cuộn lên ----- */
body.cuba_hospital .scrollup {
    display: none;
    position: fixed;
    bottom: 24px;
    right: 20px;
    z-index: 999999;
    color: #fff !important;
}

body.cuba_hospital .scrollup i {
    width: 46px;
    height: 46px;
    line-height: 46px;
    display: block;
    text-align: center;
    background: linear-gradient(145deg, var(--vr-block-color, #1565c0), #0d47a1);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(13, 71, 161, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.cuba_hospital .scrollup:hover i {
    transform: translateY(-2px);
}

/* ----- Modal đăng nhập / thêm bài ----- */
body.cuba_hospital .modal-login {
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}

body.cuba_hospital .modal-login .modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

body.cuba_hospital .modal-login .modal-header {
    text-align: center;
    border: 0;
    padding: 1.25rem 1.5rem 0;
}

body.cuba_hospital .modal-login .modal-body {
    padding: 0 1.5rem 1.75rem;
}

body.cuba_hospital .modal-header .modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    width: 100%;
}

body.cuba_hospital .link-forget {
    font-size: 0.875rem;
    color: var(--vr-theme-color, #1565c0);
}

body.cuba_hospital .modal-add-post .modal-dialog {
    max-width: 900px;
}

body.cuba_hospital .modal-add-post .modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.14);
}

body.cuba_hospital .modal-add-post .modal-header {
    border: 0;
    text-align: center;
    padding: 1.5rem;
}

body.cuba_hospital .modal-add-post .modal-body {
    padding: 1rem 1.25rem 2rem;
}

body.cuba_hospital .modal-add-post .item {
    height: auto;
    min-height: 200px;
    background: #f8fafc;
    padding: 1.25rem;
    margin-bottom: 10px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.cuba_hospital .modal-add-post .item:hover {
    border-color: rgba(21, 101, 192, 0.35);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

body.cuba_hospital .modal-add-post .item-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 50%;
    margin: 0 auto;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

body.cuba_hospital .modal-add-post .item .title {
    font-size: 0.95rem;
    font-weight: 700;
    text-align: center;
    margin: 0.75rem 0 0.35rem;
    color: #0f172a !important;
}

body.cuba_hospital .modal-add-post .item .desc {
    color: #64748b;
    text-align: center;
    font-size: 0.8125rem;
    margin: 0;
}

/* ----- SweetAlert2 (màu theo theme) ----- */
body.cuba_hospital .swal2-confirm {
    background-color: var(--vr-theme-color, #1565c0) !important;
    border-radius: 10px !important;
    font-weight: 600 !important;
}

/* ----- Dark mode public ----- */
body.cuba_hospital.dark-mode .header-mobile,
body.cuba_hospital.dark-mode .mobile-search-form {
    background: rgba(30, 41, 59, 0.95) !important;
}

body.cuba_hospital.dark-mode .mega-menu {
    background: #1e293b;
    border-top-color: #334155;
}

body.cuba_hospital.dark-mode .mega-menu .menu-post-item .title a {
    color: #f1f5f9;
}

body.cuba_hospital.dark-mode .post-item .title a {
    color: #f1f5f9;
}

body.cuba_hospital.dark-mode .post-item .description,
body.cuba_hospital.dark-mode .post-meta a,
body.cuba_hospital.dark-mode .post-meta span {
    color: #94a3b8;
}

body.cuba_hospital.dark-mode .sidebar-widget .widget-head {
    border-bottom-color: #334155;
}

body.cuba_hospital.dark-mode .sidebar-widget .widget-head .title {
    color: #f1f5f9;
}

body.cuba_hospital.dark-mode .pagination .page-link,
body.cuba_hospital.dark-mode .pagination li a {
    background: #1e293b;
    border-color: #334155 !important;
    color: #e2e8f0 !important;
}

@media (prefers-reduced-motion: reduce) {
    body.cuba_hospital *,
    body.cuba_hospital *::before,
    body.cuba_hospital *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
