/**
 * NukeViet Content Management System
 * @version 4.x
 * @author VINADES.,JSC <contact@vinades.vn>
 * @copyright (C) 2009-2021 VINADES.,JSC. All rights reserved
 * @license GNU/GPL version 2 or any later version
 * @see https://github.com/nukeviet The NukeViet CMS GitHub project
 */

/* PHCN 2026 homepage refresh - keeps NukeViet modules and data intact. */
:root {
    --phcn-primary: #07599c;
    --phcn-primary-dark: #063f73;
    --phcn-accent: #15a38b;
    --phcn-ink: #17324d;
    --phcn-muted: #60758a;
    --phcn-soft: #eef7fb;
    --phcn-border: #dce9f1;
    --phcn-shadow: 0 12px 32px rgba(8, 58, 96, .10);
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    background: #f4f8fb;
    color: var(--phcn-ink);
}

.wraper,
.container {
    width: 100% !important;
    max-width: none;
}

.wraper {
    padding-left: 24px;
    padding-right: 24px;
}

.section-body > .wraper {
    background: #fff;
    box-shadow: none;
    padding-left: 0;
    padding-right: 0;
}

/* Let the page frame reach both viewport edges. Spacing belongs to each
 * content region, not to the outer frame, so full-width sections stay aligned. */
.section-body > .wraper > section > .container {
    padding-left: 0;
    padding-right: 0;
}

.section-body > .wraper > section > .container > .row {
    margin-left: 0;
    margin-right: 0;
}

.section-body > .wraper > section > .container > .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}

/* Header and identity */
.phcn-header {
    background: linear-gradient(135deg, #e8f6fd 0%, #fff 56%, #eaf8f5 100%);
}

.phcn-header .section-header-bar {
    display: none;
}

.phcn-header .header-nav {
    min-height: 34px;
}

.phcn-brand-hero {
    max-width: none;
    padding: 0;
}

.phcn-brand-link,
.phcn-brand-banner {
    display: block;
    width: 100%;
}

.phcn-brand-banner {
    height: auto;
    min-height: 0;
    max-height: 260px;
    object-fit: cover;
    object-position: center;
}

.section-nav {
    background: linear-gradient(90deg, var(--phcn-primary-dark), var(--phcn-primary));
    border: 0;
    box-shadow: 0 4px 16px rgba(6, 63, 115, .18);
}

.section-nav .wraper,
.second-nav .container {
    padding-left: 0;
    padding-right: 0;
    max-width: none;
}

.second-nav .bg {
    background: transparent;
    box-shadow: none;
}

.section-nav .panel,
.section-nav .metismenu {
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.section-nav .metismenu > .sidebar > .sidebar-nav > ul {
    display: flex;
    align-items: stretch;
    margin: 0;
}

.section-nav .metismenu > .sidebar > .sidebar-nav > ul > li {
    flex: 1 1 auto;
}

.section-nav .metismenu > .sidebar > .sidebar-nav > ul > li > a {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-align: center;
    border: 0;
}

.section-nav .metismenu > .sidebar > .sidebar-nav > ul > li > a:hover,
.section-nav .metismenu > .sidebar > .sidebar-nav > ul > li.active > a {
    background: rgba(255,255,255,.14);
}

.third-nav .bg {
    border: 0;
    background: #f7fbfd;
    border-bottom: 1px solid var(--phcn-border);
}

.headerSearch .form-control,
.headerSearch .btn {
    border-radius: 20px;
}

/* Homepage sections */
.phcn-home-showcase {
    margin: 8px 0 34px;
}

/* Trang chủ dùng dữ liệu động từ module hospital. Các khối tĩnh cũ được giữ
 * trong template để có thể hoàn nguyên, nhưng không còn tham gia hiển thị. */
.phcn-home-showcase > .phcn-feature-section {
    display: none;
}

.phcn-hospital-home {
    padding: 12px 24px 8px;
    background: #f7fbfd;
}

.phcn-hospital-home > .panel,
.phcn-hospital-home > div {
    max-width: 100%;
}

/* The main news area is an explicit grid so legacy floats cannot overlap. */
.phcn-content-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(300px, 1fr);
    grid-template-areas: "main sidebar";
    gap: 28px;
    align-items: start;
    margin: 0;
    padding: 0 24px 36px;
}

.phcn-content-layout > .phcn-main-column,
.phcn-content-layout > .phcn-sidebar-column {
    float: none;
    width: auto;
    min-width: 0;
    padding: 0;
    left: auto !important;
    right: auto !important;
    margin-left: 0;
    margin-right: 0;
}

.phcn-main-column {
    grid-area: main;
}

.phcn-sidebar-column {
    grid-area: sidebar;
}

.phcn-main-column > *,
.phcn-sidebar-column > * {
    max-width: 100%;
}

.phcn-sidebar-column {
    position: relative;
}

.phcn-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    width: 100%;
    margin: 0 0 42px;
    background: var(--phcn-border);
    border-bottom: 1px solid var(--phcn-border);
}

.phcn-quick-actions > a {
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 88px;
    padding: 16px 20px;
    background: #fff;
    color: var(--phcn-ink);
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
    min-width: 0;
}

.phcn-quick-actions > a > div {
    min-width: 0;
}

.phcn-quick-actions > a:hover {
    background: var(--phcn-soft);
    transform: translateY(-2px);
}

.phcn-quick-actions em {
    width: 45px;
    height: 45px;
    flex: 0 0 45px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--phcn-primary), var(--phcn-accent));
    font-size: 20px;
}

.phcn-quick-actions strong,
.phcn-quick-actions small {
    display: block;
    overflow-wrap: anywhere;
}

.phcn-quick-actions strong {
    font-size: 15px;
    margin-bottom: 4px;
}

.phcn-quick-actions small {
    color: var(--phcn-muted);
    line-height: 1.35;
}

.phcn-feature-section {
    padding: 28px 20px 48px;
    border-top: 1px solid #e1edf3;
    background: #f7fbfd;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.phcn-feature-section:nth-of-type(even) {
    margin-left: 0;
    margin-right: 0;
    padding-left: 35px;
    padding-right: 35px;
    background: #f7fbfd;
}

.phcn-section-heading {
    max-width: 740px;
    margin: 0 auto 28px;
    text-align: center;
}

.phcn-section-heading > span {
    color: var(--phcn-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.phcn-section-heading h2 {
    margin: 7px 0 10px;
    color: var(--phcn-primary-dark);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.5;
}

.phcn-section-heading h2:after {
    content: "";
    display: block;
    width: 58px;
    height: 3px;
    margin: 12px auto 0;
    border-radius: 3px;
    background: var(--phcn-accent);
}

.phcn-section-heading p {
    margin: 0;
    color: var(--phcn-muted);
    font-size: 14px;
    line-height: 1.65;
}

.phcn-specialty-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.phcn-specialty-grid > a {
    min-height: 178px;
    padding: 24px 12px 18px;
    border: 1px solid var(--phcn-border);
    border-radius: 14px;
    background: #fff;
    color: var(--phcn-ink);
    text-align: center;
    box-shadow: 0 6px 22px rgba(25, 78, 113, .06);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.phcn-specialty-grid > a:hover {
    transform: translateY(-5px);
    border-color: #8bcfc4;
    box-shadow: var(--phcn-shadow);
    text-decoration: none;
}

.phcn-specialty-grid em {
    display: block;
    color: var(--phcn-primary);
    font-size: 35px;
    margin-bottom: 15px;
}

.phcn-specialty-grid strong,
.phcn-specialty-grid span {
    display: block;
}

.phcn-specialty-grid strong {
    margin-bottom: 8px;
    font-size: 15px;
}

.phcn-specialty-grid span {
    color: var(--phcn-muted);
    font-size: 13px;
    line-height: 1.45;
}

.phcn-doctor-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.phcn-doctor-grid article {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 142px;
    padding: 24px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--phcn-shadow);
}

.phcn-doctor-avatar {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    display: grid;
    place-items: center;
    border: 5px solid #e2f3f1;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--phcn-primary), var(--phcn-accent));
    font-size: 18px;
    font-weight: 700;
}

.phcn-doctor-grid span {
    color: var(--phcn-accent);
    font-size: 12px;
    font-weight: 700;
}

.phcn-doctor-grid h3 {
    margin: 5px 0 6px;
    color: var(--phcn-primary-dark);
    font-size: 18px;
    font-weight: 700;
}

.phcn-doctor-grid p {
    margin: 0;
    color: var(--phcn-muted);
}

.phcn-service-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.phcn-service-grid > a {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    min-height: 128px;
    padding: 25px;
    border: 1px solid var(--phcn-border);
    border-radius: 15px;
    color: var(--phcn-ink);
    background: #fff;
    transition: transform .2s ease, border-color .2s ease;
}

.phcn-service-grid > a:hover {
    transform: translateY(-3px);
    border-color: var(--phcn-accent);
    text-decoration: none;
}

.phcn-service-grid > a > em {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: var(--phcn-primary);
    font-size: 23px;
}

.phcn-service-grid h3 {
    margin: 1px 0 8px;
    color: var(--phcn-primary-dark);
    font-size: 18px;
    font-weight: 700;
}

.phcn-service-grid p {
    margin: 0;
    color: var(--phcn-muted);
    line-height: 1.55;
}

.phcn-section-link {
    margin-top: 24px;
    text-align: center;
}

.phcn-section-link a {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid var(--phcn-primary);
    border-radius: 22px;
    color: var(--phcn-primary);
    font-weight: 700;
}

.phcn-section-link a:hover {
    color: #fff;
    background: var(--phcn-primary);
    text-decoration: none;
}

/* Refresh existing content blocks without changing their behaviour. */
.panel {
    border-color: var(--phcn-border);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(24, 65, 94, .06);
}

.panel-default > .panel-heading {
    border-color: var(--phcn-border);
    color: #fff;
    background: linear-gradient(90deg, var(--phcn-primary-dark), var(--phcn-primary));
    font-weight: 700;
}

/* Danh sách văn bản mới: đồng bộ với block TIN MỚI NHẤT. */
.panel:has(> .panel-body .phcn-latest-documents) {
    overflow: hidden;
    border-color: #dce9f1;
    border-radius: 10px;
    background-color: #fff;
    box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}

.panel:has(> .panel-body .phcn-latest-documents) > .panel-heading {
    padding: 10px;
    border-color: #428bca;
    color: #fff;
    background-color: #428bca;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, .05) 0%, rgba(0, 0, 0, 0) 100%) !important;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
}

.panel:has(> .panel-body .phcn-latest-documents) > .panel-body {
    padding: 15px;
    background-color: transparent;
}

.phcn-latest-documents {
    margin: 0;
    padding: 0;
    background-color: transparent;
    list-style: none;
}

.phcn-latest-documents > li {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 18px;
    min-height: 58px;
    padding: 12px 15px 12px 45px;
    border-bottom: 1px solid #eee;
    background-color: transparent;
    line-height: 1.42857143;
    transition: background-color .18s ease;
}

.phcn-latest-documents > li:last-child {
    border-bottom: 0;
}

.phcn-latest-documents > li:before {
    content: "\f15c";
    position: absolute;
    top: 13px;
    left: 15px;
    width: 22px;
    color: #428bca;
    font-family: FontAwesome;
    font-size: 18px;
    line-height: 1.2;
    text-align: center;
}

.phcn-latest-documents > li:hover {
    background-color: #f5f5f5;
}

.phcn-latest-documents .phcn-document-title {
    min-width: 0;
    color: #1a3f5e;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.42857143;
}

.phcn-latest-documents .phcn-document-title:hover,
.phcn-latest-documents .phcn-document-title:focus {
    color: #428bca;
    text-decoration: underline;
}

.phcn-latest-documents .phcn-document-date {
    align-self: start;
    color: #999;
    font-size: 12px;
    font-style: normal;
    line-height: 1.65;
    white-space: nowrap;
}

.phcn-sidebar-column .phcn-latest-documents > li {
    grid-template-columns: 1fr;
    gap: 4px;
}

img {
    max-width: 100%;
    height: auto;
}

@media (max-width: 1024px) {
    .section-nav .navbar-header {
        float: none;
    }

    .section-nav .navbar-toggle {
        display: block;
        float: left;
        margin: 7px 12px;
        border-color: rgba(255,255,255,.55);
        background: rgba(255,255,255,.12);
    }

    .section-nav .navbar-toggle .icon-bar {
        background: #fff;
    }

    .section-nav .navbar-collapse.collapse {
        display: none !important;
        border-top: 1px solid rgba(255,255,255,.18);
        box-shadow: none;
    }

    .section-nav .navbar-collapse.collapse.in,
    .section-nav .navbar-collapse.collapsing {
        display: block !important;
    }

    .section-nav .navbar-nav {
        float: none !important;
        margin: 0;
    }

    .section-nav .navbar-nav > li {
        float: none;
    }

    .section-nav .navbar-nav > li > a {
        padding: 12px 18px;
        color: #fff;
        white-space: normal;
    }

    .phcn-specialty-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .phcn-quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-nav .metismenu > .sidebar > .sidebar-nav > ul > li > a {
        padding-left: 8px;
        padding-right: 8px;
        font-size: 12px;
    }

    .phcn-content-layout {
        grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr);
        gap: 20px;
    }
}

@media (max-width: 900px) {
    .phcn-content-layout {
        grid-template-columns: 1fr;
        grid-template-areas: "main" "sidebar";
    }

    .phcn-sidebar-column {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .phcn-sidebar-column > * {
        margin-bottom: 0;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .phcn-hospital-home .hospital-specialty-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .phcn-hospital-home .hospital-doctor-grid,
    .phcn-hospital-home .hospital-service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767px) {
    .wraper,
    .container {
        min-width: 0 !important;
        padding-left: 10px;
        padding-right: 10px;
    }

    .section-body > .wraper {
        padding-left: 0;
        padding-right: 0;
    }

    .section-body .row,
    .section-nav .row,
    footer .row {
        margin-left: 0;
        margin-right: 0;
    }

    .phcn-header .section-header-bar {
        display: none;
    }

    .phcn-brand-hero {
        padding: 0;
    }

    .phcn-brand-banner {
        min-height: 0;
        height: auto;
        object-fit: contain;
    }

    .section-nav .wraper {
        padding: 0;
    }

    .section-nav .metismenu > .sidebar > .sidebar-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .section-nav .metismenu > .sidebar > .sidebar-nav > ul {
        width: max-content;
        min-width: 100%;
    }

    .section-nav .metismenu > .sidebar > .sidebar-nav > ul > li {
        flex: 0 0 auto;
    }

    .section-nav .metismenu > .sidebar > .sidebar-nav > ul > li > a {
        min-height: 46px;
        padding: 9px 13px;
        white-space: nowrap;
    }

    .third-nav .col-xs-24,
    .third-nav .col-sm-18,
    .third-nav .col-sm-6,
    .section-body [class*="col-sm-"],
    .section-body [class*="col-md-"] {
        float: none;
        width: 100%;
    }

    .current-time {
        display: block;
        padding: 8px 0 4px;
        text-align: center;
    }

    .headerSearch {
        padding-bottom: 8px;
    }

    .phcn-home-showcase {
        margin-top: 0;
    }

    .phcn-quick-actions {
        grid-template-columns: 1fr;
        margin: 0 0 26px;
    }

    .phcn-quick-actions > a {
        min-height: 74px;
        padding: 12px 15px;
    }

    .phcn-hospital-home {
        padding: 10px 10px 6px;
    }

    .phcn-hospital-home .hospital-specialty-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .phcn-hospital-home .hospital-doctor-grid,
    .phcn-hospital-home .hospital-service-grid {
        grid-template-columns: 1fr !important;
    }

    .phcn-feature-section,
    .phcn-feature-section:nth-of-type(even) {
        margin-left: 0;
        margin-right: 0;
        padding: 24px 14px 34px;
    }

    .phcn-section-heading h2 {
        font-size: 24px;
    }

    .phcn-specialty-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .phcn-specialty-grid > a {
        min-height: 160px;
        padding: 20px 8px 14px;
    }

    .phcn-doctor-grid,
    .phcn-service-grid {
        grid-template-columns: 1fr;
    }

    .phcn-content-layout {
        gap: 18px;
        padding: 0 10px 28px;
    }

    .phcn-sidebar-column {
        display: block;
    }

    .phcn-sidebar-column > * {
        margin-bottom: 16px;
    }

    .phcn-latest-documents > li {
        grid-template-columns: 1fr;
        gap: 4px;
        padding-right: 14px;
    }

    .phcn-doctor-grid article,
    .phcn-service-grid > a {
        padding: 18px;
    }

    .phcn-doctor-avatar {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
        font-size: 15px;
    }

    .table-responsive,
    #body table {
        display: block;
        width: 100% !important;
        overflow-x: auto;
    }
}

@media (max-width: 420px) {
    .phcn-hospital-home .hospital-specialty-grid {
        grid-template-columns: 1fr !important;
    }

    .phcn-specialty-grid {
        grid-template-columns: 1fr;
    }

    .phcn-specialty-grid > a {
        min-height: 0;
    }
}
