/*
 * Module Cơ sở (co-so) — phần CSS riêng của module; các thành phần chung dùng hệ thống mn-* của giao diện (mn.css).
 * Màu theo cơ sở lấy từ biến --mn-coso-<mã> của giao diện, có giá trị dự phòng.
 */

/* ----- Màu nhấn theo cơ sở (khung minh hoạ, chữ cái đầu của tên) ----- */
.mn-coso-ph,
.mn-staff__initials {
    --coso-accent: var(--mn-coso-toan-truong, #084C9E);
    --coso-soft: var(--mn-blue-50, #EAF3FF);
}

.mn-coso-ph--truong-chinh,
.mn-staff__initials--truong-chinh {
    --coso-accent: var(--mn-coso-truong-chinh, #0B63CE);
    --coso-soft: #EAF3FF;
}

.mn-coso-ph--hoa-hong,
.mn-staff__initials--hoa-hong {
    --coso-accent: var(--mn-coso-hoa-hong, #D6297B);
    --coso-soft: #FDEAF3;
}

.mn-coso-ph--20-10,
.mn-staff__initials--20-10 {
    --coso-accent: var(--mn-coso-20-10, #B45309);
    --coso-soft: #FDF1E3;
}

.mn-coso-ph--7-5,
.mn-staff__initials--7-5 {
    --coso-accent: var(--mn-coso-7-5, #D0111B);
    --coso-soft: #FDECEE;
}

.mn-coso-ph--thanh-binh,
.mn-staff__initials--thanh-binh {
    --coso-accent: var(--mn-coso-thanh-binh, #15792A);
    --coso-soft: #E8F6EC;
}

/* ----- Thẻ cơ sở ----- */
.mn-coso-card {
    height: 100%;
}

.mn-coso-card .mn-card__media {
    background: transparent;
}

/* Danh sách thông tin có biểu tượng (địa chỉ, điện thoại, thư điện tử) */
.mn-coso-info {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mn-coso-info > li {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 3px 0;
    overflow-wrap: anywhere;
}

.mn-coso-info > li > .fa {
    flex: none;
    color: var(--mn-blue-700, #084C9E);
}

.mn-coso-info > li > span {
    min-width: 0;
}

/*
 * Vùng chạm tối thiểu 44px (CONTRACT §7.2) cho các liên kết đứng riêng một dòng của module: tiêu đề thẻ,
 * điện thoại, thư điện tử, tên cơ sở ở chân trang. Chỉ đặt chiều cao tối thiểu nên tiêu đề dài xuống dòng vẫn hiển thị đúng.
 */
.mn-coso .mn-card__title a,
.mn-coso-block .mn-card__title a,
.mn-coso-info a,
.mn-coso-detail .mn-pagehead__meta a,
.mn-coso-contacts a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

.mn-coso-card__legacy {
    color: var(--mn-ink-600, #4B5563);
    font-size: .9375em;
}

.mn-coso-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto !important;
    padding-top: 6px;
}

/* Khung minh hoạ trung tính khi chưa có ảnh thật của cơ sở (không dùng ảnh minh hoạ giả) */
.mn-coso-ph {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 120px;
    background: var(--coso-soft);
    color: var(--coso-accent);
}

.mn-coso-ph__art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.mn-coso-ph__sun {
    fill: var(--mn-yellow-400, #FFD60A);
}

.mn-coso-ph__house,
.mn-coso-ph__wing {
    fill: #fff;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linejoin: round;
}

.mn-coso-ph__door {
    fill: currentColor;
}

.mn-coso-ph__window {
    fill: var(--coso-soft);
    stroke: currentColor;
    stroke-width: 1.5;
}

.mn-coso-ph__ground {
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
}

.mn-coso-ph--news {
    font-size: 2.25em;
}

.mn-coso-staffbox {
    margin-top: var(--mn-space-6, 32px);
}

.mn-coso-block__more {
    margin: var(--mn-space-4, 16px) 0 0;
    text-align: center;
}

/* ----- Trang chi tiết cơ sở ----- */
.mn-coso-cover {
    margin: 0 0 var(--mn-space-5, 24px);
}

.mn-coso-cover img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    border-radius: var(--mn-radius-lg, 16px);
}

.mn-coso-detail__summary {
    margin: 0 0 var(--mn-space-4, 16px);
    font-size: 1.0625rem;
}

ul.mn-coso-more > li {
    display: flex;
}

.mn-coso-more__link {
    flex: 1 1 auto;
    justify-content: flex-start;
    min-height: 48px;
}

/* ----- Đội ngũ ----- */
.mn-staff,
.mn-staff.mn-card--row {
    flex-direction: row;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
}

.mn-staff > .mn-card__body {
    padding: 0;
    gap: 4px;
}

.mn-staff__avatar {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
}

.mn-staff__avatar img,
.mn-staff__initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
}

.mn-staff__avatar img {
    object-fit: cover;
}

.mn-staff__initials {
    background: var(--coso-soft);
    color: var(--coso-accent);
    border: 2px solid currentColor;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.mn-staff .mn-card__title {
    font-size: 1.0625rem;
}

.mn-staff__position {
    font-weight: 700;
}

.mn-staff__decision,
.mn-staff__note {
    overflow-wrap: anywhere;
}

.mn-coso-staffpage__intro {
    margin-bottom: var(--mn-space-5, 24px);
}

.mn-coso-back {
    margin-top: var(--mn-space-5, 24px);
}

/* ----- Block chân trang: địa chỉ các cơ sở ----- */
.mn-coso-contacts {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mn-coso-contacts__item {
    margin: 0 0 10px;
    line-height: 1.5;
}

.mn-coso-contacts__item:last-child {
    margin-bottom: 0;
}

/* Chân trang: năm cơ sở chia đều thành 2 cột (3 hàng) để khối không quá dài; điện thoại hẹp vẫn 1 cột */
@media (min-width: 480px) {
    .mn-footer .mn-coso-contacts {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px 32px;
    }

    .mn-footer .mn-coso-contacts__item {
        margin: 0;
    }
}

.mn-coso-contacts__name {
    font-weight: 700;
}

.mn-coso-contacts__address,
.mn-coso-contacts__phone {
    display: block;
    overflow-wrap: anywhere;
}

@media print {
    .mn-coso-card__actions,
    .mn-coso-more,
    .mn-coso-back,
    .mn-coso-staffbox,
    .mn-coso-block__more {
        display: none !important;
    }
}
