/* =====================================================================
   qi-kyyeu.css — SKIN mới cho chuyên trang Kỷ yếu (/homekyyeuhp, /kyyeuhp*).
   Nạp SAU vinhdanh.css ở _MasterKyyeuHaiPhong (bản máy tính). Chỉ ĐÈ kiểu,
   KHÔNG đổi markup cũ: header (logo + tên đơn vị + tên kỷ yếu), thanh menu
   8 mục, khung slide trang chủ, thẻ nội dung các trang trong, chân trang.
   Mọi bộ chọn đều gắn gốc "body.qi-ky" để thắng vinhdanh.css mà không cần
   !important (trừ vài chỗ bản cũ đã dùng !important / style nội tuyến).
   ===================================================================== */
body.qi-ky {
    --ky-do: #9A1B1E;
    --ky-do-sang: #C41F25;
    --ky-do-dam: #6E1215;
    --ky-vang: #D9A441;
    --ky-vang-nhat: #F6DE9A;
    --ky-nen: #FFF4DC;
    --ky-the: #FFFCF5;
    --ky-chu: #3A2A1C;
    --ky-chu-phu: #7A5A3A;
    --ky-bong: 0 18px 40px -18px rgba(110, 18, 21, .35), 0 2px 6px rgba(110, 18, 21, .08);
    background:
        radial-gradient(1200px 600px at 50% -10%, #FFFDF6 0%, rgba(255, 253, 246, 0) 70%),
        linear-gradient(180deg, #FFF6E4 0%, var(--ky-nen) 100%);
    background-attachment: fixed;
    color: var(--ky-chu);
    font-family: Roboto, "Segoe UI", Arial, sans-serif;
}

/* ---------- Họa tiết dải lụa hai bên: gọn lại cho khỏi đè chữ ---------- */
body.qi-ky .sec-anim + .sec-anim { display: none; }          /* bản cũ chèn TRÙNG 2 lần */
body.qi-ky .left-1-item { width: clamp(110px, 11vw, 190px); opacity: .95; }
body.qi-ky .right-item-1 { width: clamp(130px, 13vw, 240px); opacity: .95; }

/* ---------- Đầu trang ---------- */
body.qi-ky .main-container { min-width: 0; }
body.qi-ky header.row {
    margin: 0;
    padding: 22px 16px 14px !important;
    position: relative;
}
body.qi-ky header .w-1280 {
    /* Chữ đầu trang nằm thẳng trên nền ⇒ không được lấn sang hai dải lụa (rộng tới 13vw mỗi bên). */
    max-width: min(1060px, calc(100vw - 2 * clamp(130px, 13vw, 240px) - 24px));
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
body.qi-ky header .w-1280 > .col { flex: 0 1 auto; width: auto; padding: 0; }
body.qi-ky header .w-1280 > .col:last-child { justify-content: flex-end; }
body.qi-ky .vinhdanh-logo * { text-shadow: none; }
body.qi-ky .vinhdanh-logo .ms-4 { margin-left: 16px !important; }
body.qi-ky .image-logo-header {
    width: 84px;
    height: 84px;
    padding: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px var(--ky-vang-nhat), 0 8px 20px -8px rgba(110, 18, 21, .45);
}
/* Dòng 1: tên cơ quan chủ quản — nhỏ, giãn chữ. Dòng 2: tên đơn vị — đậm, đỏ. */
body.qi-ky .vinhdanh-logo:first-child .h1 {
    margin: 0 !important;
    text-align: left !important;
    font-size: 15px !important;
    line-height: 1.4;
    letter-spacing: .04em;
    font-weight: 600 !important;
    color: var(--ky-chu-phu);
}
body.qi-ky .vinhdanh-logo:first-child .text-center { text-align: left !important; }
body.qi-ky .vinhdanh-logo:first-child .ten_so {
    margin-top: 4px !important;
    font-size: 26px !important;
    line-height: 1.2;
    letter-spacing: .01em;
    font-weight: 800 !important;
    color: var(--ky-do);
}
/* Tên kỷ yếu bên phải */
body.qi-ky .vinhdanh-logo:last-child .text-center {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right !important;
}
body.qi-ky .namhaiphong {
    margin: 0 !important;
    font-family: inherit;
    font-size: 24px !important;
    line-height: 1.25;
    font-weight: 800 !important;
    letter-spacing: .02em;
    color: var(--ky-do);
    text-align: right;
}
body.qi-ky .namkyyeu {
    float: none;
    margin-top: 8px;
    padding: 3px 14px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 16px !important;
    line-height: 1.5;
    font-weight: 700 !important;
    letter-spacing: .06em;
    color: var(--ky-do-dam);
    background: linear-gradient(90deg, #E9B957, var(--ky-vang-nhat) 50%, #E9B957);
    box-shadow: inset 0 0 0 1px rgba(154, 27, 30, .18);
}
/* Đường chỉ vàng dưới đầu trang */
body.qi-ky header.row::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: min(1060px, calc(100% - 32px));
    height: 2px;
    transform: translateX(-50%);
    background: linear-gradient(90deg, transparent, var(--ky-vang) 15%, var(--ky-vang) 85%, transparent);
}

/* ---------- Thanh menu 8 mục ---------- */
body.qi-ky .menu-button {
    width: auto;
    max-width: calc(100% - 32px);
    margin: 18px auto 6px !important;
    padding: 6px;
    gap: 4px;
    flex-wrap: wrap;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--ky-do-sang), var(--ky-do));
    box-shadow: var(--ky-bong), inset 0 1px 0 rgba(255, 255, 255, .18);
}
body.qi-ky .menu-button .button-menu {
    margin: 0 !important;
    padding: 8px 16px;
    border: 0;
    border-radius: 999px;
    box-shadow: none !important;
    background: transparent;
    color: #FFF3DA;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .03em;
    line-height: 1.3;
    white-space: nowrap;
    transition: background-color .18s, color .18s;
}
body.qi-ky .menu-button .button-menu:hover,
body.qi-ky .menu-button .button-menu:focus-visible {
    background: rgba(255, 255, 255, .14);
    color: #fff;
}
body.qi-ky .menu-button .button-menu:focus-visible { outline: 2px solid var(--ky-vang-nhat); outline-offset: 1px; }
body.qi-ky .menu-button .button-menu.active {
    background: linear-gradient(180deg, #FCE7A8, #E8B651);
    color: var(--ky-do-dam);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18) !important;
}

/* ---------- Trang chủ: khung slide ảnh ---------- */
body.qi-ky .content-container-prop {
    min-height: 0;
    margin-top: 28px !important;
    padding: 0 16px;
}
body.qi-ky .content-container-prop > aside { width: 100%; max-width: 980px; }
body.qi-ky .border-two-swiper {
    left: -10px;
    top: -10px;
    width: calc(100% + 20px);
    max-width: none;
    height: calc(100% - 44px);   /* chừa phần chấm chuyển trang bên dưới */
    border: 1px solid rgba(217, 164, 65, .7);
    border-radius: 22px;
    pointer-events: none;
}
body.qi-ky .swiper-hight-student-img {
    max-width: none;
    padding: 10px;
    border-radius: 16px;
    background: linear-gradient(135deg, #C98A2A 0%, #F3D58A 40%, #E2AE4C 70%, #B97A22 100%);
    box-shadow: var(--ky-bong);
}
body.qi-ky .mySwiper {
    overflow: hidden;            /* bản cũ để lộ mép ảnh kế bên ở cạnh phải */
    border-radius: 10px;
    background: #1E1612;
}
body.qi-ky .mySwiper .swiper-slide { height: auto; }
body.qi-ky .image-container-1 {
    position: relative;
    width: 100%;
    height: clamp(320px, 62vh, 600px);
    background: radial-gradient(circle at 50% 40%, #3A2A20 0%, #1E1612 75%);
}
body.qi-ky .image-container-1 > a { display: block; width: 100%; height: 100%; }
body.qi-ky .image-container-1 img { width: 100%; height: 100%; object-fit: contain; }
/* Chú thích ảnh: phủ đáy ảnh, xuống dòng đầy đủ (bản cũ bị cắt chữ đầu dòng) */
body.qi-ky .tieudeanhslide {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 48px 28px 18px;
    background: linear-gradient(180deg, rgba(20, 12, 8, 0) 0%, rgba(20, 12, 8, .72) 45%, rgba(20, 12, 8, .9) 100%);
    color: #FFF6E2;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
    pointer-events: none;
}
body.qi-ky .tieudeanhslide:empty { display: none; }
/* Nút trước / sau */
/* Khung nút bám mép trong của vùng đệm 16px ⇒ nút lệch ra -8px vẫn không gây tràn ngang ở 1024px. */
body.qi-ky .button-swiper-vd { top: calc(50% - 22px); left: 16px; right: 16px; width: auto !important; z-index: 5; }
body.qi-ky .button-swiper-vd button {
    width: 48px;
    height: 48px;
    font-size: 26px;
    border: 2px solid #fff;
    background: var(--ky-do);
    color: #fff !important;
    box-shadow: 0 8px 18px -6px rgba(110, 18, 21, .55);
    transition: transform .15s, background-color .15s;
}
body.qi-ky .button-swiper-vd button:hover { background: var(--ky-do-sang); transform: scale(1.06); }
body.qi-ky .swiper-vd-back { left: -8px; }
body.qi-ky .swiper-vd-continue { right: -8px; }
/* Chấm chuyển trang */
body.qi-ky .swiper-item-v-render { margin: 18px 0 8px !important; }
body.qi-ky .swiper-place-v { display: flex; justify-content: center; align-items: center; gap: 8px; }
body.qi-ky .swiper-item-v {
    width: 9px;
    height: 9px;
    margin: 0;
    border-radius: 999px;
    background: rgba(154, 27, 30, .25);
    cursor: pointer;
    transition: width .2s, background-color .2s;
}
body.qi-ky .swiper-item-v.active { width: 28px; background: var(--ky-do); }

/* ---------- Thẻ nội dung các trang trong ---------- */
body.qi-ky .content-container {
    margin-top: 28px !important;
    border-radius: 18px;
    background-color: var(--ky-the);
    background-blend-mode: soft-light;
    box-shadow: var(--ky-bong), inset 0 0 0 1px rgba(154, 27, 30, .18);
}
body.qi-ky .content-container.w-1024 { max-width: 1040px; }
body.qi-ky .special-title-block * { font-size: 28px; letter-spacing: .03em; }
body.qi-ky .qinoidungsoan,
body.qi-ky .container-text-conent { color: var(--ky-chu); }
/* Thẻ nhân vật */
body.qi-ky .item-image-giai {
    border-radius: 10px;
    box-shadow: 0 10px 22px -12px rgba(110, 18, 21, .6);
    transition: transform .2s;
}
body.qi-ky .item-image-giai .image-student-giai { border-radius: 6px; object-fit: cover; background: #F3E6C8; }
body.qi-ky [onclick^="Chitiet"] { cursor: pointer; }
body.qi-ky [onclick^="Chitiet"]:hover .item-image-giai { transform: translateY(-4px); }

/* ---------- Chân trang ---------- */
body.qi-ky footer { height: auto; margin-top: 32px; }
body.qi-ky .line-footer { background: linear-gradient(90deg, var(--ky-vang), var(--ky-vang-nhat), var(--ky-vang)); }
body.qi-ky .content-footer {
    height: auto;
    min-height: 64px;
    padding: 18px 16px;
    background: linear-gradient(180deg, var(--ky-do), var(--ky-do-dam));
    color: #FBE3B0;
    font-size: 13px;
    letter-spacing: .04em;
    text-align: center;
}
body.qi-ky .content-footer * { color: inherit; }

/* ---------- Khổ hẹp (iPad ngang / laptop nhỏ) ---------- */
@media (min-width: 1200px) and (max-width: 1599.98px) {
    body.qi-ky .namhaiphong { font-size: 20px !important; }
    body.qi-ky .vinhdanh-logo:first-child .h1 { font-size: 13px !important; }
    body.qi-ky .vinhdanh-logo:first-child .ten_so { font-size: 22px !important; }
    body.qi-ky .image-logo-header { width: 72px; height: 72px; }
}
@media (max-width: 1199.98px) {
    body.qi-ky header .w-1280 { max-width: 100%; }
    body.qi-ky .sec-anim { display: none; }
    body.qi-ky header .w-1280 { flex-direction: column !important; gap: 12px; }  /* thắng .flex-row của Bootstrap */
    body.qi-ky header .w-1280 > .col,
    body.qi-ky header .w-1280 > .col:last-child { justify-content: center; }
    body.qi-ky .vinhdanh-logo:last-child .text-center { align-items: center; text-align: center !important; }
    body.qi-ky .namhaiphong { text-align: center; font-size: 21px !important; }
    body.qi-ky .vinhdanh-logo:last-child .ms-4 { margin-left: 0 !important; }
}
@media (max-width: 767.98px) {
    body.qi-ky .image-logo-header { width: 64px; height: 64px; }
    body.qi-ky .vinhdanh-logo:first-child .h1 { font-size: 12px !important; }
    body.qi-ky .vinhdanh-logo:first-child .ten_so { font-size: 19px !important; }
    body.qi-ky .namhaiphong { font-size: 17px !important; }
    body.qi-ky .menu-button { border-radius: 16px; }
    body.qi-ky .menu-button .button-menu { padding: 7px 11px; font-size: 12.5px; }
    /* Điện thoại: chú thích xuống DƯỚI ảnh (phủ lên thì che mất nửa ảnh ở khổ hẹp). */
    body.qi-ky .image-container-1 { height: auto; }
    body.qi-ky .image-container-1 > a { height: 72vw; max-height: 420px; }
    body.qi-ky .tieudeanhslide {
        position: static;
        padding: 10px 14px 12px;
        background: #2A1D16;
        font-size: 13.5px;
    }
    body.qi-ky .border-two-swiper { display: none; }
    body.qi-ky .swiper-vd-back { left: 4px; }
    body.qi-ky .swiper-vd-continue { right: 4px; }
    body.qi-ky .button-swiper-vd button { width: 38px; height: 38px; font-size: 20px; }
}
/* =====================================================================
   BẢN ĐIỆN THOẠI (_MasterKyyeuHaiPhongmb — các trang *mb): đầu trang
   .head-mobile, menu cuộn ngang .title-mobile-menu, chân trang ps-3.
   ===================================================================== */
body.qi-ky .main-container-mobile { overflow-x: clip; min-height: 100vh; min-height: 100dvh; }
body.qi-ky .main-container-mobile > footer { margin-top: auto !important; }   /* chân trang luôn dính đáy */
body.qi-ky header.head-mobile {
    align-items: center;
    padding: 10px 14px !important;
    background: linear-gradient(135deg, var(--ky-do-sang), var(--ky-do-dam));
    box-shadow: 0 6px 16px -10px rgba(110, 18, 21, .8);
    border-bottom: 2px solid var(--ky-vang);
}
body.qi-ky .head-mobile .logo-mobile {
    width: 48px;
    height: 48px;
    padding: 4px;
    border-radius: 50%;
    background: #fff;
    object-fit: contain;
    box-shadow: 0 0 0 2px var(--ky-vang-nhat);
}
body.qi-ky .head-mobile .ms-3 { margin-left: 12px !important; min-width: 0; }
body.qi-ky .head-mobile .fw-medium { font-size: 12px; line-height: 1.4; color: #FBE3B0; }
body.qi-ky .head-mobile .mobile-text-1 {
    margin-top: 2px;
    font-size: 15px;
    line-height: 1.3;
    letter-spacing: .02em;
    color: #fff;
    text-shadow: none;
}
body.qi-ky .title-mobile-menu {
    position: sticky;
    top: 0;
    z-index: 50;
    width: 100%;
    height: auto;
    padding: 8px 10px !important;
    background: rgba(255, 246, 228, .96);
    box-shadow: 0 6px 14px -10px rgba(110, 18, 21, .5);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}
body.qi-ky .title-mobile-menu .scrollmenu {
    gap: 6px;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
body.qi-ky .title-mobile-menu .scrollmenu::-webkit-scrollbar { display: none; }
body.qi-ky .title-mobile-menu li { flex: 0 0 auto; margin: 0; padding: 0; }
body.qi-ky .title-mobile-menu a {
    display: block;
    margin: 0;
    padding: 7px 14px;
    border: 1px solid rgba(154, 27, 30, .25);
    border-radius: 999px;
    background: #fff;
    color: var(--ky-do);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
}
body.qi-ky .title-mobile-menu a::after,
body.qi-ky .title-mobile-menu a::before { display: none; }
body.qi-ky .title-mobile-menu a.active {
    border-color: transparent;
    background: linear-gradient(180deg, var(--ky-do-sang), var(--ky-do));
    color: #fff;
}
body.qi-ky .main-container-mobile .content-container-prop { width: 100%; padding: 0 12px; margin: 18px 0 28px !important; }
body.qi-ky .main-container-mobile .content-container { max-width: calc(100% - 20px); height: auto; max-height: none; }
body.qi-ky .l2-left-mobile { display: none; }
body.qi-ky .main-container-mobile .content-footer {
    align-items: center !important;
    padding: 16px 14px !important;
    line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
    body.qi-ky * { transition: none !important; }
}
