/* Base styles */
body {
    background-color: #fdeac0;
    background-repeat: repeat;
    font-family: 'Merriweather', serif;
}

a {
    text-decoration: none !important;
}

a:hover {
    text-decoration: none !important;
}

.container {
    max-width: 1240px !important;
    margin: 0 auto;
}
.dataTables_length label {
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
}
aside.app-sidebar.bg-body-light {
    background: #fff;
}
/* Header styles */
.site-header {
    text-align: center;
    padding: 20px 0;
    background-image: url('../images/top_header.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.site-title {
    color: #2b4694;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    text-transform: uppercase;
}

.site-subtitle {
    color: #bd1e25;
    font-size: 1.8rem;
    margin: 5px 0 0;
    font-weight: 700;
    text-transform: uppercase;
}

.main-body {
    background-color: #fdeac0;
    background-image: url('../images/bg.png');
    background-repeat: repeat;
}

/* Navigation styles */
.main-nav {
    background-color: #bd1e25;
    padding: 0;
    border-top: 2px solid #eac989;
    border-bottom: 2px solid #eac989;
    position: relative;
}

.navbar::after {
    content: '';
    position: absolute;
    left: 50% !important;
    right: 50% !important;
    width: 100vw !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    height: 8px;
    background-image: url('../images/bg-pattern.png');
    background-repeat: repeat-x;
    background-size: auto 8px;
    bottom: -10px;
}

.navbar-nav .nav-item {
    margin: 0 !important;
    background-color: transparent !important;
    transition: all 0.2s ease !important;
    position: relative !important;
    border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.navbar-nav .nav-item:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.main-nav .nav-link {
    color: white !important;
    padding: 10px 20px !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    letter-spacing: 0.5px !important;
    font-size: 0.85rem !important;
}

.main-nav .nav-link i {
    font-size: 0.9rem;
}

.main-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Login button */
.login-btn {
    margin-left: auto !important;
}

.login-btn .btn {
    background-color: white !important;
    color: #bd1e25 !important;
    border: none !important;
    font-weight: bold !important;
    padding: 4px 12px !important;
    font-size: 0.85rem !important;
}

.login-btn .btn i {
    font-size: 0.85rem;
}

.login-btn .btn:hover {
    background-color: #f8f8f8 !important;
}

.container-lg {
    max-width: 1140px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* Main content wrapper */
.content-wrapper {
    padding: 1rem 0;
    border-top: 2px solid #eac989;
    border-bottom: 2px solid #eac989;
    min-height: calc(100vh - 500px);
}

/* Main content styles */
.main-content {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 2rem;
}

/* Card styles */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    margin-bottom: 1.5rem;
    background-color: #fff;
}

.card:hover {
    transform: translateY(-5px);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    color: #2b4694;
    font-weight: bold;
    margin-bottom: 1rem;
}

.btn-primary {
    background-color: #2b4694;
    border-color: #2b4694;
}

.btn-primary:hover {
    background-color: #1a237e;
    border-color: #1a237e;
}

/* Footer styles */
.site-footer {
    background-color: transparent;
    margin-top: 30px;
    text-align: center;
}

.footer-section {
    margin-bottom: 20px;
}

.footer-heading {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: bold;
    text-align: center;
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.footer-list li {
    margin-bottom: 8px;
    color: #666;
}

.footer-list a {
    color: #666;
    text-decoration: none;
}

.footer-list a:hover {
    color: #bd1e25;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0d6c0;
    margin-top: 20px;
}

.copyright img {
    height: 50px;
    margin-bottom: 10px;
}

.copyright p {
    color: #666;
    margin: 0;
}

/* Mobile styles */
@media (max-width: 991px) {
    .site-title {
        font-size: 1.8rem;
    }

    .site-subtitle {
        font-size: 1.4rem;
    }

    .main-nav {
        padding: 0;
        border: none;
    }

    .container-lg {
        padding: 0 !important;
    }

    .navbar-toggler {
        margin: 10px 15px !important;
        padding: 4px 8px !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 3px !important;
    }

    .navbar-toggler-icon {
        width: 1.2em !important;
        height: 1.2em !important;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }

    .navbar-collapse {
        background-color: #bd1e25;
        margin-top: 0;
        padding: 0;
    }

    .navbar-nav {
        margin: 0 !important;
        padding: 0 !important;
    }

    .navbar-nav .nav-item {
        border: none !important;
        margin: 0 !important;
    }

    .main-nav .nav-link {
        padding: 12px 15px !important;
        font-size: 0.9rem !important;
    }

    .login-btn {
        margin: 0 !important;
        padding: 15px !important;
    }

    .login-btn .btn {
        width: 100%;
        padding: 8px 15px !important;
        font-size: 0.9rem !important;
        border-radius: 3px !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .login-btn .btn i {
        margin-right: 8px;
    }

    .footer-section {
        margin-bottom: 30px;
    }
}

/* Banner styles */
.banner {
    background-image: url('../../static/home/assets/img/bg-pattern.png');
    background-repeat: repeat;
    padding: 30px 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #eac989;
}

.banner h2 {
    color: #2b4694;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.banner h3 {
    color: #bd1e25;
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* App Grid Styles */
.app-grid {
    padding: 0;
}

.app-item {
    background: #ffffffab;
    border-radius: 10px;
    padding: 10px 5px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.app-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.app-icon {
    width: 130px;
    height: 130px;
    object-fit: contain;
    margin-bottom: 8px;
}

/* Điều chỉnh kích thước cho Font Awesome icons */
i.app-icon {
    font-size: 130px;
    width: auto;
    height: auto;
    color: #333;
}

.app-title {
    font-size: 14px;
    margin-top: 5px;
    color: #333;
    line-height: 1.2;
}

.app-item {
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.app-item:hover {
    /* background-color: rgba(0,0,0,0.05); */
    transform: translateY(-2px);
}

.app-item a {
    text-decoration: none;
    color: inherit;
}

@media (max-width: 768px) {
    .col-md-2 {
        width: 33.333%;
        padding: 0 5px;
    }

    .app-icon {
        width: 48px;
        height: 48px;
    }

    .app-title {
        font-size: 12px;
    }

    i.app-icon {
        font-size: 48px;
    }
}

@media (max-width: 576px) {
    .col-md-2 {
        width: 50%;
    }
    #clock {
        font-size: 0.95rem;
        word-break: break-word;
        margin: 12px;
    }
}

/* Category Section Styles */
.category-section {
    /* background: rgba(255, 255, 255, 0.9); */
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 15px;
}

.category-title {
    color: #2b4694;
    font-size: 1.2rem;
    font-weight: 600;
    padding-bottom: 8px;
    border-bottom: 2px solid #eac989;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .category-title {
        font-size: 1rem;
    }
}

/* Điều chỉnh khoảng cách grid */
.row.g-4 {
    --bs-gutter-x: 10px;
    --bs-gutter-y: 10px;
}

/* Login Modal Styles */
#loginModal .modal-content {
    border-radius: 8px;
    border: none;
}

#loginModal .modal-header {
    background-color: #bd1e25;
    color: white;
    border-bottom: none;
    padding: 15px 20px;
    display: block;
    text-align: center;
    position: relative;
}

#loginModal .modal-title {
    font-weight: 500;
    font-size: 1.25rem;
    margin: 0;
    width: 100%;
}

#loginModal .btn-close {
    color: white;
    opacity: 1;
    filter: brightness(0) invert(1);
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

#loginModal .modal-body {
    padding: 2rem;
}

#loginModal .form-label {
    font-weight: 500;
    color: #333;
}

#loginModal .input-group-text {
    background-color: white;
    border-right: none;
}

#loginModal .form-control {
    border-left: none;
}

#loginModal .input-group-text i {
    color: #6c757d;
}

#loginModal .btn-outline-secondary {
    border-left: none;
}

#loginModal .btn-danger {
    background-color: #c41e3a;
    border-color: #c41e3a;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

#loginModal .btn-danger:hover {
    background-color: #a01830;
    border-color: #a01830;
}

#loginModal .form-check-label {
    color: #666;
}

#loginModal .text-danger {
    color: #c41e3a !important;
}

/* Remove focus outline from input groups */
#loginModal .form-control:focus,
#loginModal .input-group-text,
#loginModal .btn-outline-secondary:focus {
    box-shadow: none;
    border-color: #ced4da;
}

/* Custom style for password toggle button */
#loginModal #togglePassword:hover {
    background-color: transparent;
    color: #6c757d;
}

#profileModal .modal-content {
    border: none;
}

#profileModal .modal-header {
    background-color: #bd1e25;
    color: white;
    border-bottom: none;
    padding: 15px 20px;
}

#profileModal .modal-title {
    font-weight: 500;
    font-size: 1.25rem;
    width: 100%;
    text-align: left;
}

#profileModal .btn-close {
    position: absolute;
    right: 15px;
    color: white;
    opacity: 1;
    filter: brightness(0) invert(1);
}

#profileModal .profile-sidebar {
    background-color: white;
    border-bottom: 1px solid #dee2e6;
}

#profileModal .profile-image-container {
    width: 120px;
    margin: 0 auto;
}

#profileModal .profile-image-container img {
    width: 120px;
    height: 120px;
    object-fit: cover;
}

#profileModal .nav-tabs {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

#profileModal .nav-tabs .nav-link {
    border: none;
    color: #495057;
    padding: 12px;
    margin: 0;
    font-weight: 500;
    border-radius: 0;
    border-bottom: 2px solid transparent;
}

#profileModal .nav-tabs .nav-link:hover {
    border-bottom: 2px solid #dee2e6;
}

#profileModal .nav-tabs .nav-link.active {
    color: #bd1e25;
    background: none;
    border-bottom: 2px solid #bd1e25;
}

#profileModal .form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.3rem;
}

#profileModal .form-control,
#profileModal .form-select {
    border-radius: 4px;
    padding: 6px 12px;
}

#profileModal .form-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

#profileModal .btn-danger {
    background-color: #bd1e25;
    border-color: #bd1e25;
    padding: 8px 16px;
}

#profileModal .btn-danger:hover {
    background-color: #a01830;
    border-color: #a01830;
}

#profileModal .badge {
    font-weight: 500;
    padding: 5px 10px;
}

#profileModal .btn-outline-secondary {
    color: #6c757d;
    border-color: #ced4da;
}

#profileModal .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    color: #495057;
}

#profileModal select:disabled {
    background-color: #e9ecef;
    cursor: not-allowed;
}

/* Book Section Styles */
.book-cover {
  max-width: 280px;
  max-height: 400px;
  width: auto;
  height: auto;
  border-radius: 12px;
  display: block;
  background: #fff;
}
.card {
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  background: none;
  box-shadow: none;
  min-height: 400px;
  margin-left: 12px;
  margin-right: 12px;
}

.book-bg {
    background-image: url(../images/bgbook.png);
    background-size: cover;
    background-position: center;
    width: 290px;
    height: 420px;
    min-width: 280px;
    min-height: 400px;
    border-radius: 12px;
    position: relative;
}

.qr-title {
    position: absolute;
    left: 0;
    right: 0;
    top: 70px;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.95rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #ed2024;
    z-index: 2;
    letter-spacing: -1px;
    line-height: 1.1;
}
.qr-title .qr-sub {
    color: #ed2024;
    font-size: 1.1rem;
}
.qr-title .qr-main {
    font-size: 0.95rem;
}
.qr-img {
    position: absolute;
    left: 50%;
    top: 106px;
    transform: translateX(-50%);
    width: 250px;
    height: 275px;
    background: #fff;
    padding: 6px;
    border-radius: 12px;
    z-index: 2;
}
.logo-m-center {
    position: absolute;
    left: 50%;
    top: 245px;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;   
    border-radius: 50%;
    object-fit: cover;
    z-index: 3;
}
.custom-procedure-item {
    background: #ffffffb0;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(30, 34, 90, 0.07);
    border: 1px solid #e6e6e6;
    margin-bottom: 10px;
    transition: box-shadow 0.2s, border 0.2s;
    padding: 0;
}

.custom-procedure-item:hover {
    box-shadow: 0 6px 24px rgba(30, 34, 90, 0.13);
    border: 1.5px solid #b3c6ff;
    background: #fafdff;
}

.custom-procedure-body {
    display: flex;
    align-items: flex-start;
    gap: 22px;
    padding: 22px 28px;
}

.qr-section {
    flex-shrink: 0;
    width: 106px;
    height: 106px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f8ff;
    border-radius: 10px;
    border: 1.5px solid #bd1e25;
    box-shadow: 0 1px 6px rgba(30, 34, 90, 0.04);
}

.procedure-qr-img {
    width: 100px;
    height: 100px;
    border-radius: 6px;
    object-fit: contain;
    display: block;
    background: #fff;
}

.procedure-info {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.custom-procedure-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
    line-height: 1.2;
    transition: color 0.2s;
    width: 100%;
}
.custom-procedure-title:hover {
    color: #1976d2;
    /* text-decoration: underline; */
    cursor: pointer;
}

.custom-procedure-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.custom-procedure-meta {
    font-size: 0.98rem;
    color: #555;
    margin-bottom: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    }
@media (max-width: 700px) {
    .custom-procedure-meta {
      flex-direction: column;
      gap: 0;
    }
  }
.custom-procedure-meta strong {
    color: #222;
    font-weight: 600;
}

.custom-procedure-meta > div {
    margin-right: 2rem;
    margin-bottom: 0.25rem;
}

.btn-danger {
    font-size: 1rem;
    padding: 6px 22px;
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.07);
    transition: background 0.18s, box-shadow 0.18s, transform 0.18s;
}
.btn-danger:hover, .btn-danger:focus {
    background: #b91c1c;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.13);
    transform: translateY(-2px) scale(1.04);
}

@media (max-width: 700px) {
    .custom-procedure-body {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px 8px;
    }
    .custom-procedure-meta-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .qr-section {
        margin-bottom: 8px;
        align-self: flex-start;
    }
}
.procedure-header-box {
        /* background: #fff; */
    /* border-radius: 14px; */
    /* box-shadow: 0 2px 12px rgba(30, 34, 90, 0.07); */
    /* border: 1px solid #e6e6e6; */
    /* padding: 28px 0 18px 0; */
    margin-bottom: 32px;
    text-align: center;
    /* max-width: 700px; */
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.procedure-header-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a237e;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.procedure-header-subtitle {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1976d2;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 0;
}

.procedure-header-tools {
    padding: 0 18px 8px 18px;
    font-size: 1rem;
}
.procedure-date {
    font-size: 0.98rem;
    color: #888;
    font-style: italic;
}
.procedure-search-form input[type="search"] {
    min-width: 220px;
    max-width: 400px;
    width: 100%;
}
@media (max-width: 700px) {
    .procedure-header-tools {
        flex-direction: column;
        align-items: stretch !important;
        gap: 8px;
        padding: 0 4px 8px 4px;
    }
    .procedure-search-form input[type="search"] {
        min-width: 0;
        width: 100%;
        max-width: 100%;
    }
    .procedure-search-form {
        width: 100%;
    }
}
/* --- TOPBAR FULL WIDTH, CĂN GIỮA NỘI DUNG --- */
.topbar-bg {
    width: 100%;
    background: #fff;
    min-height: 36px;
    padding: 0;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
}
.topbar_search .input-group {
    max-width: 380px;
    width: 100%;
    margin: 10px 0 2px auto;
    border-radius: 6px;
    box-shadow: none;
    background: transparent;
}
.topbar_search .form-control {
    border-radius: 6px 0 0 6px;
    font-size: 0.98rem;
    background: #fff;
    border: 1px solid #e0e0e0;
    box-shadow: none;
    height: 32px;
    padding: 2px 10px;
}
.topbar_search .btn {
    border-radius: 0 6px 6px 0;
    border: 1px solid #e0e0e0;
    border-left: none;
    background: #fff;
    color: #222;
    box-shadow: none;
    height: 32px;
    padding: 2px 12px;
}
@media (max-width: 700px) {
    .topbar-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .topbar_search .input-group {
        max-width: 100%;
        margin-top: 0 !important;
    }
    .day_date_time {
        text-align: center;
        margin-bottom: 0 !important;
    }
    .container.topbar-container {
        border-radius: 0;
        box-shadow: none;
    }
}

/* Xóa style cũ không còn dùng cho topbar */
.procedure-header-box.topbar,
.topbar {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    border: none !important;
    margin-top: 0 !important;
    padding: 0 !important;
}
span#realtime {
    font-size: 14px;
    color: #666;
}
.logo-title-row.d-flex.align-items-center {
    position: absolute;
    top: 8px;
    /*gap: 8px;  Giảm khoảng cách logo và chữ */
}
.logo-m-left {
    width: 40px;
    height: 40px;
    margin-right: 5px;
}
.title-text-1 {
    font-weight: bold;
    font-size: 10px;
    color: #fff;
    line-height: 1.2;      /* Giảm khoảng cách dòng */
    letter-spacing: 0.1px;  /* Giảm khoảng cách chữ */
}
.title-text-2 {
    font-weight: bold;
    font-size: 10px;
    color: #fff;
    line-height: 1.2;      /* Giảm khoảng cách dòng */
    letter-spacing: 0.2px;  /* Giảm khoảng cách chữ */
}
.title-text-3 {
    font-weight: bold;
    font-size: 9px;
    color: #fff;
    line-height: 1.2;      /* Giảm khoảng cách dòng */
    letter-spacing: 0.2px;  /* Giảm khoảng cách chữ */
}
.title-text-4{
    position: relative;
    top: 178px;
    font-weight: bold;
    font-size: 13px;
    color: #ed2024;
    line-height: 1.2;
    letter-spacing: -0.8px;
}
.row.topbar-row {
    margin-bottom: 0 !important;
    row-gap: 0 !important;
}
.topbar_search {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

@media (max-width: 700px) {
  .qr-section {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
    align-self: center !important;
  }
}

@media (max-width: 700px) {
  .custom-procedure-title {
    text-align: center;
    width: 100%;
  }
}

.search-result-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: linear-gradient(90deg, #e3f7fc 80%, #d0f0fa 100%);
    color: #155a6a;
    border: 1.5px solid #b6e2f2;
    border-radius: 14px;
    padding: 16px 28px 14px 20px;
    margin-bottom: 22px;
    margin-top: 0;
    font-size: 1.08rem;
    box-shadow: 0 4px 18px 0 rgba(0,0,0,0.07);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    transition: box-shadow 0.2s, border 0.2s;
    position: relative;
    animation: fadeInSearchResult 0.5s;
}

@keyframes fadeInSearchResult {
    from { opacity: 0; transform: translateY(-10px);}
    to { opacity: 1; transform: translateY(0);}
}

.search-result-alert b {
    color: #0b3c4c;
    font-weight: 700;
}

.search-result-icon {
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d0f0fa;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    box-shadow: 0 2px 8px 0 rgba(0,0,0,0.04);
}

@media (max-width: 800px) {
    .search-result-alert {
        padding: 12px 10px 10px 10px;
        font-size: 1rem;
        max-width: 98%;
    }
    .search-result-icon {
        width: 32px;
        height: 32px;
    }
}

/* Dropdown menu cho 'Danh mục sách' */
.main-nav .navbar-nav > li {
    position: relative;
  }
  
  .main-nav .navbar-nav > li > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 320px;   /* Tăng chiều rộng tối thiểu */
   /* Có thể tăng nữa nếu cần */
    word-break: break-word;
    white-space: normal;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    padding: 0.5rem 0;
    z-index: 1000;
    border: none;
  }
  
  .main-nav .navbar-nav > li:hover > ul,
  .main-nav .navbar-nav > li:focus-within > ul {
    display: block;
  }
  
  .main-nav .navbar-nav > li > ul > li {
    border-bottom: 1px dashed #ddd;
    padding: 0;
  }
  
  .main-nav .navbar-nav > li > ul > li:last-child {
    border-bottom: none;
  }
  
  .main-nav .navbar-nav > li > ul > li > a {
    display: block;
    padding: 12px 20px;
    color: #222;
    text-decoration: none;
    background: transparent;
    transition: background 0.2s, color 0.2s;
    text-transform: uppercase;
    font-size: 15px;
  }
  
  .main-nav .navbar-nav > li > ul > li > a:hover {
    background: #f5f5f5;
    color: #d32f2f;
  } 
  .main-nav .navbar-nav > li > a {
    text-transform: uppercase;
  } 
