/* =====================================================================
   Portal UTT — Modern Design Layer
   Nạp SAU các CSS khác để override. Mục tiêu: bố cục hiện đại, sạch,
   khoa học + hệ chữ kiểu Apple (San Francisco / Inter).
   ===================================================================== */

:root {
    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
        "Inter", "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;

    --navy: #1C3967;
    --navy-700: #16335c;
    --accent: #E11D48;
    --accent-soft: #fde7ec;

    --page-bg: #f4f6fb;
    --surface: #ffffff;
    --surface-2: #eef2f9;

    --text: #1f2937;
    --text-muted: #6b7280;
    --border: rgba(15, 23, 42, 0.08);

    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
    --shadow-md: 0 10px 28px rgba(16, 24, 40, 0.10), 0 4px 10px rgba(16, 24, 40, 0.06);
}

/* ---------- Hệ chữ kiểu Apple (không chân) ---------- */
body,
h1, h2, h3, h4, h5, h6,
p, div, span, a, button, input, textarea, select,
li, td, th, label, strong, b, em {
    font-family: var(--font-sans) !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

/* Giữ nguyên các font icon (không bị stack chữ đè lên) */
.fa, .fas, .far, .fab, .fa-solid, .fa-regular, .fa-brands {
    font-family: "FontAwesome" !important;
}
.glyphicon {
    font-family: "Glyphicons Halflings" !important;
}
[class^="flaticon-"], [class*=" flaticon-"] {
    font-family: "Flaticon" !important;
}
.fc-icon {
    font-family: "Courier New", Courier, monospace !important;
}

body {
    background: var(--page-bg);
    color: var(--text);
    line-height: 1.55;
}

/* ---------- Khối section chung ---------- */
.services-for-teachers,
.services-for-students,
.user-manual {
    padding: 64px 0;
}
.services-for-teachers {
    background: var(--surface);
}
.services-for-students {
    background: var(--page-bg);
}
.user-manual {
    background: var(--surface-2);
}

/* ---------- Tiêu đề section ---------- */
.title-services-for-teachers,
.title-manual {
    text-align: center;
    margin-bottom: 44px;
}
.title-services-for-teachers h2,
.title-manual h2 {
    color: var(--navy);
    font-weight: 700;
    font-size: 30px;
    letter-spacing: -0.025em;
    margin: 6px 0 0;
    text-transform: capitalize;
}
.title-services-for-teachers p {
    color: var(--text-muted);
    font-size: 16px;
    margin: 10px 0 0;
}
/* "eyebrow" nhỏ phía trên tiêu đề Hướng dẫn */
.user-manual .title-manual {
    text-align: left;
}
.user-manual .title-manual div {
    text-decoration: none;
    color: var(--accent);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.user-manual .title-manual h2 {
    text-align: left;
    font-size: 28px;
}

/* =====================================================================
   LƯỚI CARD — Dịch vụ cho giảng viên (CSS Grid đều nhau)
   ===================================================================== */
.block-services-for-teachers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: stretch;
}
/* Vô hiệu hoá lưới float của Bootstrap bên trong */
.block-services-for-teachers > .item-services {
    display: block;
    margin: 0;
}
/* Bỏ gạch chân khi hover link trong card */
.block-services-for-teachers > .item-services,
.block-services-for-teachers > .item-services:hover,
.block-services-for-teachers > .item-services:focus {
    text-decoration: none !important;
}
.block-services-for-teachers > .item-services > [class*="col-"] {
    width: 100% !important;
    padding: 0 !important;
    float: none !important;
    height: 100%;
}
.block-services-for-teachers .itemm {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 0 !important;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.block-services-for-teachers .item-services:hover .itemm {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
}
.block-services-for-teachers .image-item-services img {
    width: 100%;
    height: 152px;
    object-fit: cover;
    border-radius: 0 !important;
}
.block-services-for-teachers .info-item-services {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 18px 18px 16px !important;
}
.block-services-for-teachers .info-item-services .name {
    color: var(--navy);
    font-weight: 600;
    font-size: 15.5px;
    line-height: 1.3;
}
.block-services-for-teachers .info-item-services .des {
    color: var(--text-muted);
    font-size: 13.5px;
    line-height: 1.5;
    margin: 8px 0 16px;
    flex: 1 1 auto;
}
.block-services-for-teachers .info-item-services .btn {
    text-align: left;
    margin-top: auto;
}
.block-services-for-teachers .info-item-services .btn button {
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--navy);
    border-radius: 999px;
    padding: 7px 16px;
    font-size: 12.5px;
    font-weight: 600;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.block-services-for-teachers .item-services:hover .info-item-services .btn button {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* =====================================================================
   LƯỚI CARD — Dịch vụ cho sinh viên (card ngang)
   ===================================================================== */
.block-services-for-students {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}
.block-services-for-students > a,
.block-services-for-students > a:hover,
.block-services-for-students > a:focus {
    display: block;
    text-decoration: none !important;
}
.block-services-for-students > a > [class*="col-"] {
    width: 100% !important;
    padding: 0 !important;
    float: none !important;
    height: 100%;
}
.block-services-for-students .item-student {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 18px 20px !important;
    margin-bottom: 0 !important;
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.block-services-for-students .item-student:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.block-services-for-students .item-student .image {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-soft);
    border-radius: 14px;
}
.block-services-for-students .item-student .image img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}
.block-services-for-students .item-student .right-student {
    width: auto !important;
    flex: 1 1 auto;
}
.block-services-for-students .item-student .right-student .title {
    color: var(--navy);
    font-weight: 600;
    font-size: 15px;
}
.block-services-for-students .item-student .right-student .des {
    color: var(--text-muted);
    font-size: 13px;
    margin-top: 4px;
    min-height: 0;
}

/* =====================================================================
   Hướng dẫn sử dụng
   ===================================================================== */
.step-manual {
    list-style: none;
    padding-left: 0;
    counter-reset: step;
}
.step-manual li {
    position: relative;
    color: var(--navy);
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 22px;
    padding-left: 52px;
    min-height: 36px;
}
.step-manual li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    border-radius: 999px;
    font-weight: 700;
    font-size: 15px;
}
.step-manual li div {
    font-weight: 400;
    color: var(--text);
    font-size: 14.5px;
}
.step-manual li div b {
    color: var(--navy);
    font-weight: 600;
}
.step-manual li div:first-child {
    margin-left: 0 !important;
}

/* =====================================================================
   Footer hiện đại
   ===================================================================== */
footer {
    background: var(--navy) !important;
    border-top: 0 !important;
    padding: 40px 0 28px !important;
    margin-top: 0 !important;
}
footer .list-inline li a {
    color: rgba(255, 255, 255, 0.88) !important;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.02em;
    transition: color 0.2s ease;
}
footer .list-inline li a:hover {
    color: #fff !important;
    text-decoration: none;
}
footer p {
    color: rgba(255, 255, 255, 0.72) !important;
}
footer p a {
    color: #fff !important;
    text-decoration: underline;
}

/* =====================================================================
   Tên người dùng khi đã đăng nhập (header)
   ===================================================================== */
.header-login-panel {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-user-name {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =====================================================================
   Brand trong thanh menu (logo + 2 dòng chữ) — chỉ hiện khi menu dính
   ===================================================================== */
.second-header-panel .container {
    align-items: center;
}
.menu-brand {
    display: none;            /* ẩn khi chưa cuộn */
    align-items: center;
    gap: 10px;
    text-decoration: none;
    overflow: hidden;
    max-height: 50px;         /* khớp chiều cao thanh menu */
}
.menu-brand:hover,
.menu-brand:focus {
    text-decoration: none;
}
.menu-brand-logo {
    height: 36px;
    width: auto;
    flex: 0 0 auto;
}
.menu-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.15;
    color: #fff;
    text-transform: uppercase;
}
.menu-brand-line1 {
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
}
.menu-brand-line2 {
    font-size: 10.5px;
    font-weight: 400;
    opacity: 0.92;
    white-space: nowrap;
}

/* Khi thanh menu dính (fixed-header) -> hiện brand bên trái, menu bên phải */
.second-header-panel.fixed-header .container {
    justify-content: space-between;
}
.second-header-panel.fixed-header .menu-brand {
    display: flex;
}
.second-header-panel.fixed-header .nav.navbar-nav > li > a {
    padding-top: 14px;
    padding-bottom: 14px;
}

/* Màn hình nhỏ: menu thu gọn (hamburger) -> không hiện brand để tránh tràn */
@media (max-width: 767px) {
    .second-header-panel.fixed-header .menu-brand {
        display: none;
    }
}
@media (max-width: 991px) {
    .menu-brand-line1 { font-size: 11.5px; }
    .menu-brand-line2 { font-size: 10px; }
    .menu-brand-logo { height: 32px; }
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width: 1199px) {
    .block-services-for-teachers { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px) {
    .block-services-for-teachers { grid-template-columns: repeat(2, 1fr); }
    .block-services-for-students { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
    .services-for-teachers,
    .services-for-students,
    .user-manual { padding: 40px 0; }
    .block-services-for-teachers { grid-template-columns: 1fr; }
    .block-services-for-students { grid-template-columns: 1fr; }
    .title-services-for-teachers h2,
    .title-manual h2 { font-size: 24px; }
}
