/* ==========================================================================
   TĂ™Y BIáº¾N GIAO DIá»†N OJS 3.3 - CHá»¦ Äá»€ Äá» DUY TĂ‚N (#A32223)
   ========================================================================== */

/* 1. MĂ€U Sáº®C CHUNG VĂ€ LIĂN Káº¾T (LINKS) */
a {
    color: #A32223;
}
a:hover, a:focus {
    color: #7a191a; /* Äá» sáº«m khi hover */
}

/* 2. THANH MENU CHĂNH (NAVIGATION) */
.pkp_navigation_primary_wrapper {
    background-color: #A32223;
    border-bottom: 2px solid #7a191a;
}
.pkp_navigation_primary > li > a {
    color: #ffffff !important;
    font-weight: 600;
}
.pkp_navigation_primary > li > a:hover,
.pkp_navigation_primary > li > a:focus {
    background-color: #7a191a;
    color: #ffffff !important;
    border-radius: 4px;
}
  .pkp_nav_list ul a {
       
        color: #A32223
    }

    .pkp_nav_list ul a:hover,.pkp_nav_list ul a:focus {
        background: #ddd;
        border-color: #7a191a;
        color: #7a191a
    }
/* 3. MENU Xá»” XUá»NG (DROPDOWN) */
.pkp_navigation_primary ul {
    background-color: #A32223; /* Ná»n dropdown mĂ u Ä‘á» */
    border: 1px solid #7a191a;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.pkp_navigation_primary ul li a {
    color: #ffffff !important; /* Chá»¯ tráº¯ng */
    padding: 10px 15px;
}
.pkp_navigation_primary ul li a:hover,
.pkp_navigation_primary ul li a:focus {
    background-color: #7a191a; /* Äá»•i sang Ä‘á» sáº«m khi hover */
    color: #ffffff !important; /* Chá»¯ váº«n giá»¯ mĂ u tráº¯ng */
}
.pkp_navigation_primary .dropdown-menu a:focus, 
.pkp_navigation_primary .dropdown-menu a:hover {
    border-left: unset;
}
.pkp_navigation_primary>li:first-child a {
    margin-left: 0;
}
.pkp_navigation_primary>li:last-child a {
    margin-right: 0; 
}

/* 4. NĂT Báº¤M TOĂ€N Há»† THá»NG (BUTTONS & CUSTOM CLASSES) */
.pkp_button, button, input[type="submit"], input[type="button"] {
    background-color: #A32223;
    color: #ffffff;
    border: 1px solid #A32223;
}
.pkp_button:hover, .pkp_button:focus,
button:hover, input[type="submit"]:hover {
    background-color: #7a191a;
    border-color: #7a191a;
    color: #ffffff;
}

/* Override láº¡i nĂºt primary cá»§a OJS */
.pkp_button.is_primary {
    background-color: #A32223;
    border-color: #A32223;
}
.pkp_button.is_primary:hover, .pkp_button.is_primary:focus {
    background-color: #7a191a;
}

/* NĂºt Gá»­i bĂ i vĂ  cĂ¡c nĂºt form bá»• sung */
.cmp_button, .cmp_form .buttons button, .page_lost_password .buttons button, .page_search .submit button, .block_make_submission a {
    display: inline-block;
    padding: 0 1em;
    background: #A32223; /* Ná»n Ä‘á» */
    border: 1px solid #A32223;
    border-radius: 3px;
    box-shadow: none; /* Bá» viá»n bĂ³ng Ä‘á»• cÅ© */
    font-size: .93rem;
    line-height: calc(2.143rem - 2px);
    font-weight: 700;
    color: #ffffff !important; /* Chá»¯ tráº¯ng */
    text-decoration: none;
    transition: all 0.3s ease;
}
.page_search .submit button{
        padding-right: 1em;
    padding-left: 3.2145rem;
      transition: none;
}
.page_search .submit button:after {
     background: #A32223;
     box-shadow: unset;
}
.page_search .submit button:hover:after{
      box-shadow: unset;
      background: #7a191a;
}
.cmp_button:hover, .cmp_form .buttons button:hover, .page_lost_password .buttons button:hover, .page_search .submit button:hover, .block_make_submission a:hover,
.cmp_button:focus, .cmp_form .buttons button:focus, .page_lost_password .buttons button:focus, .page_search .submit button:focus, .block_make_submission a:focus {
    background: #7a191a; /* Äá» Ä‘áº­m khi hover */
    border-color: #7a191a;
    color: #ffffff !important;
}

/* 5. KHá»I BĂ€I BĂO (ARTICLE SUMMARY) - Trang chá»§ & Danh má»¥c */
.obj_article_summary {
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.obj_article_summary:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* 6. NĂT Táº¢I PDF (GALLEY BUTTONS) */
.obj_galley_link {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    color: #495057 !important;
    border-radius: 4px;
    padding: 5px 15px;
    font-size: 13px;
    font-weight: 600;
}
.obj_galley_link:hover {
    background-color: #A32223;
    color: #ffffff !important;
    border-color: #A32223;
}

/* 7. TRANG CHI TIáº¾T BĂ€I BĂO (ARTICLE VIEW DETAILS) */
/* LĂ m ná»•i Abstract */
.obj_article_details .item.abstract {
    background-color: #f9f9f9;
    border-left: 4px solid #A32223;
    padding: 20px;
    margin-top: 15px;
    margin-bottom: 25px;
    border-radius: 0 4px 4px 0;
}
.obj_article_details .item.abstract h3 {
    margin-top: 0;
    color: #A32223;
}
/* Danh sĂ¡ch tĂ¡c giáº£ */
.obj_article_details .authors .author {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #cccccc;
}
.obj_article_details .authors .author:last-child {
    border-bottom: none;
}

/* 8. TIĂU Äá»€ CHUYĂN Má»¤C (SECTION HEADING) */
.issue_toc .heading {
    border-bottom: 2px solid #A32223;
    color: #333333;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* 9. THANH TĂŒM KIáº¾M (HEADER SEARCH) */
.pkp_search input[type="text"]:focus {
    border-color: #A32223;
    outline: none;
}
.pkp_search button {
    border-radius: 0 20px 20px 0;
    background-color: #A32223;
    color: white;
    border: 1px solid #A32223;
}
.pkp_search button:hover {
    background-color: #7a191a;
    border-color: #7a191a;
}

/* 10. Cá»˜T TIá»†N ĂCH BĂN PHáº¢I (SIDEBAR BLOCKS) */
.pkp_structure_sidebar .block {
    background-color: #fcfcfc;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.pkp_structure_sidebar .block_make_submission a.pkp_button {
    background-color: #A32223;
    color: #ffffff !important;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: bold;
    padding: 12px 20px;
    width: 100%;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
    text-align: center;
    display: block;
}
.pkp_structure_sidebar .block_make_submission a.pkp_button:hover {
    background-color: #7a191a;
}
.cmp_notification {
    border-left: .357rem solid #A32223;
}
/* 11. NHĂƒN ÄĂNH Dáº¤U (BADGES) */
.badge {
    background-color: #A32223;
}
/* ==========================================================================
   12. TĂ™Y BIáº¾N CHĂ‚N TRANG (CUSTOM FOOTER)
   ========================================================================== */
.pkp_structure_footer_wrapper {
    background-color: #A32223 !important; /* Ă‰p ná»n Ä‘á» toĂ n khá»‘i footer */
    color: #ffffff;
    border-top: none;
    padding-top: 0;
    padding-bottom: 0;
}
.pkp_structure_footer {
    max-width: 1200px; /* BĂ³p chiá»u rá»™ng cho cĂ¢n Ä‘á»‘i */
    margin: 0 auto;
    padding: 40px 20px 20px;
}
/* áº¨n dĂ²ng text máº·c Ä‘á»‹nh cá»§a OJS */
.pkp_structure_footer .pkp_brand_footer {
    display: none;
}

.custom-footer p {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.6;
}
.custom-footer h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 15px;
    text-transform: uppercase;
}
.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
}
.footer-col.logo-col {
    flex: 0 0 180px; /* Chiá»u rá»™ng logo */
}
.footer-col.info-col {
    flex: 1;
    min-width: 300px;
}
.footer-col.contact-col {
    flex: 0 0 380px;
}
.contact-col p {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
/* Tinh chá»‰nh icon Lucide */
.contact-col .lucide {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 3px;
    color: #ffffff;
}
.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    margin: 30px 0 20px;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.copyright {
    font-size: 14px;
}
.social-links {
    display: flex;
    gap: 12px;
}
.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #ffffff;
    border-radius: 4px;
    color: #ffffff !important;
    transition: all 0.3s;
}
.social-links a:hover {
    background: #ffffff;
    color: #A32223 !important;
}

/* 13. NĂT BACK TO TOP */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: rgba(0, 0, 0, 0.5); /* NĂºt tá»‘i mĂ u nhÆ° áº£nh */
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    transition: background-color 0.3s;
}
#scrollToTopBtn:hover {
    background-color: #333333;
}
#scrollToTopBtn .lucide {
    width: 24px;
    height: 24px;
    margin-top: 2px;
}
/* ==========================================================================
   14. DANH Má»¤C THá»‚ LOáº I (CATEGORIES GRID)
   ========================================================================== */
.custom-categories-section {
    margin: 0 0 60px 0;
    text-align: center;
}
.categories-title {
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333333;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}
/* Táº¡o Ä‘Æ°á»ng gáº¡ch dÆ°á»›i chá»¯ giá»‘ng áº£nh máº«u */
.categories-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 1200px;
    height: 1px;
    background-color: #dddddd;
}

.categories-grid {
    display: grid;
    /* Tá»± Ä‘á»™ng chia cá»™t: tá»‘i thiá»ƒu 300px, tá»‘i Ä‘a 1 pháº§n báº±ng nhau */
   grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.category-card {
    background: #ffffff;
    border-radius: 8px;
    padding-bottom: 10px;
    transition: transform 0.3s ease;
}
.category-card:hover {
    transform: translateY(-5px);
}
.category-card img {
    width: 100%;
    max-width: 260px;
    height: auto;
    margin: 0 auto 20px;
    display: block;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* Äá»• bĂ³ng cho áº£nh bĂ¬a */
}
.category-card h3 {
    font-size: 17px;
    font-weight: 700;
    color: #333333;
    margin-bottom: 15px;
    padding: 0 10px;
}

/* NĂºt báº¥m mĂ u cam */
.btn-category {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f39c12; /* MĂ u cam giá»‘ng áº£nh thiáº¿t káº¿ */
    color: #ffffff !important;
    padding: 8px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s ease;
}
.btn-category:hover, .btn-category:focus {
    background-color: #d68910; /* Cam Ä‘áº­m khi hover */
    color: #ffffff !important;
}
.btn-category .lucide {
    width: 16px;
    height: 16px;
    margin-left: 5px;
}
.custom-about-section {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
    background: #ffffff;
    align-items: flex-start;
}
.about-image {
    flex: 0 0 45%; 
}
.about-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.about-content {
    flex: 1;
}
.about-content p {
    font-size: 14.5px;
    line-height: 1.7;
    color: #444444;
    text-align: justify;
}
.section-title {
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    color: #333333;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}
.text-center {
    display: block;
    text-align: center;
}
.btn-readmore {
    display: inline-flex;
    align-items: center;
    padding: 8px 25px;
    border: 1px solid #A32223;
    color: #A32223 !important;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s;
}
.btn-readmore:hover {
    background: #A32223;
    color: #ffffff !important;
}
.btn-readmore .lucide {
    width: 18px;
    height: 18px;
    margin-left: 5px;
}

/* 16. Äá»NH Dáº NG Láº I TIĂU Äá»€ "Sá» Má»I NHáº¤T" Cá»¦A OJS */
.homepage_issue > h2 {
    font-size: 22px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #333333 !important;
    border-bottom: 2px solid #eaeaea;
    padding-bottom: 10px;
    margin-bottom: 30px;
}
.pkp_site_nav_menu{
  background-color: #A32223;
}
/* 4. Khôi phục chính xác thuộc tính width="..." và height="..." trên thẻ <img> */
.pkp_structure_main img[width] {
    width: revert-layer !important;
    max-width: 100% !important;
}

.pkp_structure_main img[height] {
    height: revert-layer !important;
}

/* Đối với các ảnh trong bài viết không khai báo width="...", giữ kích thước gốc của file ảnh thay vì kéo giãn 100% */
.pkp_structure_main img:not([width]) {
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
}
/* 2. Xử lý menu xổ xuống (Dropdown Cấp 2 & Cấp 3): Tự động xuống hàng khi chữ dài */
.pkp_navigation_primary ul {
    width: 260px !important; /* Độ rộng chuẩn của khung xổ xuống, có thể chỉnh 240px - 300px */
    max-width: 320px !important;
    overflow: visible !important;
}

.pkp_navigation_primary ul li {
    width: 100% !important;
    white-space: normal !important; /* Cho phép chữ tự xuống dòng */
}

.pkp_navigation_primary ul li a {
    white-space: normal !important; /* Bỏ khóa 1 dòng để chữ dài tự động xuống hàng */
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.4 !important; /* Giãn dòng vừa phải khi rớt xuống 2 hàng */
    padding: 8px 15px !important;
    display: block !important;
    height: auto !important;
}
/* =========================================================
   BỐ CỤC 4 CỘT: 3 CỘT CHUYÊN MỤC + 1 CỘT THÔNG BÁO (ANNOUNCEMENTS)
   ========================================================= */
.categories-announcements-container {
    display: grid;
    grid-template-columns: 3fr 1fr; /* Chia tỷ lệ 3 phần bên trái (3 cột) và 1 phần bên phải (1 cột) */
    gap: 25px;
    align-items: start;
    margin-top: 20px;
}

/* Bên trong khối Chuyên mục: chia đúng 3 cột đều nhau */
.custom-categories-section .categories-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
}

/* Khung cột thứ 4: Thông báo */
.custom-announcements-section {
    margin-top:40px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-top: 3px solid #991b1e; /* Màu đỏ thương hiệu ĐH Duy Tân */
    border-radius: 6px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.custom-announcements-section .section-title {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    color: #991b1e;
    text-align: left;
}

.announcements-box .ann-item {
    padding: 12px 0;
    border-bottom: 1px dashed #e5e5e5;
}

.announcements-box .ann-item:first-child {
    padding-top: 0;
}

.announcements-box .ann-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.announcements-box .ann-title {
    display: block;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.4;
    color: #222222;
    text-decoration: none;
    margin-bottom: 5px;
    transition: color 0.2s ease;
}

.announcements-box .ann-title:hover {
    color: #991b1e;
}

.announcements-box .ann-date {
    display: block;
    font-size: 12px;
    color: #777777;
}

.announcements-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    text-align: right;
}

.btn-all-announcements {
    font-size: 13px;
    font-weight: 600;
    color: #991b1e;
    text-decoration: none;
}

.btn-all-announcements:hover {
    text-decoration: underline;
}

/* Ẩn khối Thông báo mặc định nằm phía trên Additional Content của OJS để tránh bị lặp 2 lần */
.pkp_page_index .cmp_announcements {
    display: none !important;
}
/* Mobile responsive */
/* ==========================================
   TABLET
========================================== */

@media (max-width: 1100px) {

   .categories-announcements-container {
        grid-template-columns: 2fr 1fr;
    }
    .custom-categories-section .categories-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

}

/* Áp dụng cho màn hình máy tính (Desktop) */
@media (min-width: 992px) {
    /* Bắt buộc các mục menu nằm trên 1 hàng ngang duy nhất, không rớt dòng */
    .pkp_navigation_primary_row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
    }

    .pkp_navigation_primary {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: auto !important;
        margin: 0 !important;
    }

    /* Giảm khoảng cách thừa giữa các mục menu */
    .pkp_navigation_primary > li {
        margin: 0 1px !important;
        white-space: nowrap !important;
    }

    /* Thu gọn khoảng đệm trái/phải (padding) và cỡ chữ để vừa đủ 9 mục */
    .pkp_navigation_primary > li > a {
        padding-left: 8px !important;
        padding-right: 8px !important;
        font-size: 13.5px !important;
    }

    /* Thu gọn khoảng chiếm chỗ của nút Tìm kiếm bên phải */
    .pkp_navigation_search_wrapper {
        width: auto !important;
        flex-shrink: 0 !important;
        margin-left: 5px !important;
    }

    .pkp_navigation_search_wrapper a {
        padding-left: 8px !important;
        padding-right: 8px !important;
        font-size: 13.5px !important;
        white-space: nowrap !important;
    }
}
@media (max-width: 768px) {
    .custom-about-section { flex-direction: column; }
    .footer-col.contact-col {
        flex: unset;
    }
    .about-image { flex: 0 0 100%; }
    .pkp_nav_list ul a{
        color:#fff;
    }
    /* Reset lại độ rộng của menu con để vừa khít khung màn hình điện thoại */
    .pkp_navigation_primary ul {
        width: 100% !important;
        max-width: 100% !important;
        position: static !important;
        box-shadow: none !important;
        padding-left: 15px !important;
        display: none !important; /* Mặc định ẩn toàn bộ menu con trên mobile */
    }

    /* Khi mục menu cha có class .mobile-open (do JS thêm vào khi click) thì mới xổ xuống */
    .pkp_navigation_primary li.mobile-open > ul {
        display: block !important;
    }

    /* Định dạng lại dòng chữ menu cha trên mobile để có biểu tượng mũi tên rõ ràng */
    .pkp_navigation_primary li.has-submenu > a {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
   .categories-announcements-container {
        grid-template-columns: 1fr; /* Xếp dọc 1 cột trên điện thoại */
    }
    .custom-categories-section .categories-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================
   MOBILE NHỎ
========================================== */

@media (max-width: 480px) {

    .custom-categories-main .categories-grid {
        grid-template-columns: 1fr;
    }

    .custom-announcements-slot {
        padding: 15px;
    }

}
