﻿:root {
    --hvcg-red: #7d1620;
}

/* Hiệu ứng nền mờ cao cấp cho modal */
.modal-backdrop.show {
    background-color: rgba(0, 0, 0, 0.25) !important; /* giảm tối, nhìn trong hơn */
    backdrop-filter: blur(8px); /* mờ nền sau */
    -webkit-backdrop-filter: blur(8px);
}

/* Thân modal có độ trong, mềm */
.modal-content {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hiệu ứng nảy nhẹ khi bật modal */
.modal.show .modal-dialog {
    transform: scale(1.02);
    transition: all 0.25s ease-in-out;
}

/* Đầu modal (header) tone đỏ-nâu HVCG */
.modal-header {
    background-color: #7d1620;
    color: white;
    border-bottom: none;
}

    .modal-header .btn-close {
        filter: invert(1);
    }

/* Tiêu đề và icon trong nội dung modal */
.modal-body i {
    color: #7d1620;
}

/* Đoạn nội dung trong modal outline */
#cvContent {
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    font-size: 1rem;
    color: #222;
    line-height: 1.6;
}

    #cvContent em {
        color: #6c757d;
        font-style: italic;
    }


/* Tiêu đề modal giảng viên */
#lecturerModal h5,
#studentModal h5 {
    color: #7d1620; /* tone đỏ-nâu thương hiệu */
}

/* Icon trong modal */
.modal-body i {
    color: #7d1620;
}

.heading-hvcg h4 {
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    background-color: #F9FAFB;
    border-radius: 10px 10px 10px 10px;
    box-shadow: 0 0 0 1px var(--semester-color, #9C6D2E, 0.15);
    border: 1px;
    display: inline-block;
    margin-bottom: 1rem;
    letter-spacing: 0.2px;
    transition: all 0.3s ease;
    font-size: 1.2em
}

.heading-hvcg h4:hover {
    background-color: #EFF3F9;
    box-shadow: 0 0 0 2px var(--semester-color, #9C6D2E, 0.15);
}

.heading-hvcg h4::after {
    content: none !important;
}

/* Áp dụng riêng cho tiêu đề học kỳ */
.text-hvcg {
    color: #B22222 !important;
}

.text-hvcg::after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #7d1620, #b71c1c);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* ==== MÀU CHỮ RIÊNG CHO TỪNG HỌC KỲ ==== */
[data-semester="1"] .text-hvcg {
    color: #9C6D2E !important; /* vàng đồng - nền tảng */
    --semester-color: #9C6D2E;
}

[data-semester="2"] .text-hvcg {
    color: #9C6D2E !important; /* xanh navy nhạt - tầm nhìn */
    --semester-color: #9C6D2E;
}

[data-semester="3"] .text-hvcg {
    color: #9C6D2E !important; /* xanh lá - hội nhập */
    --semester-color: #9C6D2E;
}

[data-semester="4"] .text-hvcg {
    color: #9C6D2E !important; /* đỏ đất - ứng dụng */
    --semester-color: #9C6D2E;
}

.semester-group {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

/* ==== NHÓM MÔN HỌC ==== */
.semester-group h6 {
    color: #444;
    border-left: 4px solid #D6B85A !important;
    padding-left: 0.5rem;
    font-weight: 700;
}
.semester-group h5 {
    color: #444;    
    padding-left: 6px;
    font-weight: 600;
}

/* --- Grid courses --- */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.course-card {
    background: #FFFFFF;
    border: 1px solid #E6E8EB;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    transition: all 0.2s ease-in-out;
}

    .course-card:hover {
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.07);
        transform: translateY(-3px);
    }

    /* ==== ICON ==== */
    .course-card i.fa-solid {
        margin-right: 6px;
        margin-left: 6px;
        color: #6C757D;
    }

/* ==== BADGE ==== */
.badge.bg-light.text-dark {
    background-color: #FFF7E0 !important;
    color: #946B00 !important;
    border-color: #F2E1A5 !important;
}

.badge.bg-success-subtle.text-success {
    background-color: #E6F7EB !important;
    color: #0F6848 !important;
}

.btn-success {
    background-color: #0F6848;
    border-color: #0F6848;
}

    .btn-success:hover {
        background-color: #0B4E37;
    }

/* Badge nhẹ nhàng */
.bg-success-subtle {
    background-color: #e8f5e9 !important;
    border: 1px solid #a5d6a7 !important;
}

.update-card {
    max-width: 950px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 50px auto;
    padding: 30px 40px;
}

.update-title {
    text-align: center;
    color: #8B1E2D;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 25px;
}

.form-label {
    font-weight: 600;
    color: #333;
}

.input-group-text {
    background-color: var(--hvcg-red);
    color: #fff;
    border: none;
    width: 44px;
    justify-content: center;
}

.form-control, .form-select {
    border-radius: 8px;
}

.btn-register {
    background-color: var(--hvcg-red);
    border: none;
    color: #fff;
    font-weight: 600;
    transition: all 0.3s ease;
}

.card-register {
    max-width: 950px;
    margin: 40px auto;
    border-radius: 16px;
    border: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.btn-update {
    background: #8B1E2D;
    color: #fff;
    border: none;
    padding: 10px 25px;
    font-size: 1.05rem;
    border-radius: 8px;
    transition: 0.3s;
}

    .btn-update:hover {
        background: #6e1723;
    }

.btn-register:hover {
    background-color: #a11c2d;
}

.form-label {
    font-weight: 600;
    color: var(--hvcg-red);
}

h3.register-title {
    color: var(--hvcg-red);
    font-weight: 700;
}

.alert-top {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1055;
    width: 90%;
    max-width: 600px;
}

.member-label {
    margin-top: .5rem;
}

.member-label .label-box {
    background: #eaf7ee; /* xanh nền nhạt */
    border: 1px solid #b8e0c2; /* viền xanh nhạt */
    color: #17643b; /* chữ xanh đậm */
    padding: 10px 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 500;
}

.member-label .label-box i {
    color: #1f9254;
}

.member-label .label-box strong {
    color: #1f9254;
}

.student-photo img:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-content {
    background: #fff;
    border-radius: 15px;
}

.modal-backdrop.show {
    opacity: 0.85;
}

#deanery_page {
    font-family: "Segoe UI", sans-serif;
}

.semester-name h2 {
    font-weight: 600;
    color: #7d1620;    
    padding-left: 10px;
    /*display: flex;*/
    gap: 8px;
    text-align: center;
    font-size: 1.8em;
}

.section-title h3 {
    font-weight: 700;
    color: #7d1620;
    border-left: 5px solid #7d1620;
    padding-left: 10px;
    display: flex;
    gap: 8px;
    font-size: 2em;
}

.section-title h4{
    font-weight: 700;
    color: #7d1620;
    border-left: 5px solid #7d1620;
    padding-left: 10px;
    display: flex;
    gap: 8px;
    font-size: 2em;
}

/* === GIẢNG VIÊN === */
.lecturers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-top: 15px;
}

.lecturer-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    padding: 20px;
    text-align: center;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

    .lecturer-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 24px rgba(125, 22, 32, 0.1);
    }

.lecturer-photo img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.lecturer-info h5 {
    color: #7d1620;
    font-weight: 700;
    font-size: 1.1rem;    
}

/* ============================================================
   FIX MÀU NÚT GIẢNG VIÊN – ổn định trên mọi độ phân giải
   ============================================================ */
.lecturer-actions .btn {
    border: 1.6px solid #7d1620 !important;
    color: #7d1620 !important;
    background-color: #ffffff !important;
    font-weight: 600;
    border-radius: 6px;
    padding: 6px 14px;
    min-width: 95px;
    transition: all .2s ease-in-out;
}

.lecturer-actions .btn i {
    color: inherit !important;
}

.lecturer-actions .btn:hover {
    background-color: #7d1620 !important;
    color: #ffffff !important;
}

/* ============================================================
   NGĂN BOOTSTRAP OVERRIDE MÀU NÚT TRÊN LAPTOP < 1500px
   ============================================================ */
@media (max-width: 1920px) {
    .lecturer-actions .btn,
    .btn-bookshelf {
        border: 1.6px solid #7d1620 !important;
        color: #7d1620 !important;
        background-color: #ffffff !important;
    }
}

@media (max-width: 992px) {
    .lecturers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .lecturers-grid {
        grid-template-columns: 1fr;
    }

    .lecturer-photo img {
        width: 120px;
        height: 120px;
    }
}

/* === RESPONSIVE === */
@media (max-width: 576px) {
    .lecturer-card,
    .student-card {
        flex-direction: column;
        text-align: center;
    }

    .lecturer-avatar img,
    .student-avatar img {
        width: 110px;
        height: 110px;
    }

    .student-info,
    .lecturer-info {
        text-align: justify;
    }
}

.lecturers {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lecturers li {
    margin-bottom: 1.1em;
}

h3.lecturer-name {
    font-size: 2em;
    font-weight: 500;
    text-align: center;
    margin: 0 0 1em 0
}

.lecturer-photo {
    vertical-align: top;
    text-align: center;
}

.lecturer-photo img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.lecturer-photo img:hover {
    transform: scale(1.05);
}

/* === SINH VIÊN === */
/* Lưới 3 cột trên desktop, 2 cột tablet, 1 cột mobile */
.students-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 18px;
}

@media (max-width: 991.98px) {
    .students-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}

@media (max-width: 575.98px) {
    .students-grid {
        grid-template-columns: 1fr;
    }
}

.student-card {
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease;
    position: relative;
}

    .student-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 22px rgba(36,44,52,.08);
    }

    /* Ảnh tròn đẹp */
    .student-card .student-photo img {
        width: 130px;
        height: 130px;
        object-fit: cover;
        border: 4px solid #fff;
        box-shadow: 0 6px 16px rgba(36,44,52,.12);
    }

    .student-card .btn {
        position: relative;
        z-index: 2;
    }
    /* link luôn “nổi” hơn overlay nào đó */

    /* Loại bỏ focus xấu */
    .student-card:focus, .student-card img:focus {
        outline: none !important;
        box-shadow: none !important;
        filter: none !important;
    }