* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {
    margin: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    color: #1f2937;

    background: #f5f7fb;

    line-height: 1.7;
}


a {
    color: #2563eb;

    text-decoration: none;
}


a:hover {
    text-decoration: underline;
}


.container {
    width: min(1100px,
            calc(100% - 32px));

    margin: 0 auto;
}


/*
|--------------------------------------------------------------------------
| Header + Main Menu
|--------------------------------------------------------------------------
|
| Header cố định ở trên cùng.
| Khi Admin Bar xuất hiện, Header nằm ngay dưới Admin Bar.
| .site-main được chừa đúng chiều cao để nội dung không bị Header che.
|
*/

.site-header {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    z-index: 9000;

    width: 100%;

    background: #ffffff;

    border-bottom:
        1px solid #e5e7eb;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.05);
}


body:has(.cms-admin-bar) .site-header {
    top: 38px;
}


.header-inner {
    min-height: 70px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 24px;
}


.logo {
    flex-shrink: 0;

    font-size: 22px;

    font-weight: 700;

    color: #111827;

    text-decoration: none;

    white-space: nowrap;
}


.logo:hover {
    text-decoration: none;
}


.main-nav {
    display: block;

    margin-left: auto;
}


.main-nav>ul {
    display: flex;

    align-items: center;

    gap: 4px;

    margin: 0;

    padding: 0;

    list-style: none;
}


.main-nav li {
    position: relative;

    margin: 0;

    padding: 0;

    list-style: none;
}


.main-nav a {
    display: block;

    padding: 10px 12px;

    color: #374151;

    font-weight: 600;

    text-decoration: none;

    white-space: nowrap;
}


.main-nav a:hover {
    color: #2563eb;

    text-decoration: none;
}


/*
|--------------------------------------------------------------------------
| Dropdown Menu
|--------------------------------------------------------------------------
*/

.main-nav li>ul {
    position: absolute;

    top: 100%;
    left: 0;

    z-index: 9200;

    display: none;

    min-width: 210px;

    margin: 0;

    padding: 6px;

    background: #ffffff;

    border:
        1px solid #e5e7eb;

    border-radius: 8px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.10);
}


.main-nav li:hover>ul {
    display: block;
}


.main-nav li>ul li {
    width: 100%;
}


.main-nav li>ul a {
    width: 100%;
}


/*
|--------------------------------------------------------------------------
| Menu cấp sâu hơn
|--------------------------------------------------------------------------
*/

.main-nav li>ul li>ul {
    top: 0;

    left: 100%;
}


/*
|--------------------------------------------------------------------------
| Main
|--------------------------------------------------------------------------
|
| Header dùng position: fixed nên cần chừa 70px.
| Khi có Admin Bar, body đã tự chừa thêm 38px ở block CMS Admin Bar.
|
*/

.site-main {
    min-height:
        calc(100vh - 140px);

    padding-top: 70px;
}



/*
|--------------------------------------------------------------------------
| Hero
|--------------------------------------------------------------------------
*/

.hero {
    padding: 80px 0;

    color: #ffffff;

    background:
        linear-gradient(135deg,
            #0ea5e9,
            #2563eb);
}


.hero h1 {
    margin: 0 0 8px;

    font-size:
        clamp(34px,
            5vw,
            52px);
}


.hero p {
    margin: 0;

    font-size: 18px;
}


/*
|--------------------------------------------------------------------------
| Content
|--------------------------------------------------------------------------
*/

.content-section {
    padding-top: 42px;

    padding-bottom: 42px;
}


.card {
    background: #ffffff;

    border:
        1px solid #e5e7eb;

    border-radius: 12px;

    padding: 24px;

    box-shadow:
        0 4px 18px rgba(0, 0, 0, .04);
}


.post-list {
    display: grid;

    gap: 18px;
}


.card h3 {
    margin-top: 0;
}


.single-post h1,
.single-page h1 {
    margin-top: 0;

    line-height: 1.3;
}


.post-meta {
    color: #6b7280;

    font-size: 14px;

    margin-bottom: 24px;
}


.post-content img,
.page-content img {
    max-width: 100%;

    height: auto;
}


.button {
    display: inline-block;

    padding: 10px 16px;

    border-radius: 8px;

    background: #2563eb;

    color: #ffffff;
}


.button:hover {
    color: #ffffff;

    text-decoration: none;
}


/*
|--------------------------------------------------------------------------
| Footer
|--------------------------------------------------------------------------
*/

.site-footer {
    padding: 28px 0;

    background: #111827;

    color: #d1d5db;
}


.site-footer p {
    margin: 0;
}


/*
|--------------------------------------------------------------------------
| Admin Login
|--------------------------------------------------------------------------
*/

.admin-login {
    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 20px;
}


.admin-login-box {
    width: 100%;

    max-width: 420px;

    background: #ffffff;

    padding: 32px;

    border-radius: 12px;

    border: 1px solid #e5e7eb;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .08);
}


.admin-login-box h1 {
    margin-top: 0;

    margin-bottom: 5px;
}


.admin-login-box p {
    color: #6b7280;
}


.form-group {
    margin-bottom: 18px;
}


.form-group label {
    display: block;

    margin-bottom: 6px;

    font-weight: 600;
}


.form-group input {
    width: 100%;

    padding: 11px 12px;

    border:
        1px solid #d1d5db;

    border-radius: 8px;

    font-size: 16px;
}


.admin-button {
    width: 100%;

    border: 0;

    border-radius: 8px;

    padding: 12px;

    background: #2563eb;

    color: #ffffff;

    font-size: 16px;

    font-weight: 600;

    cursor: pointer;
}


.admin-button:hover {
    background: #1d4ed8;
}


.admin-error {
    margin-bottom: 18px;

    padding: 12px;

    border-radius: 8px;

    background: #fee2e2;

    color: #991b1b;
}


/*
|--------------------------------------------------------------------------
| Admin Layout
|--------------------------------------------------------------------------
*/

.admin-layout {
    min-height: 100vh;

    display: flex;

    background: #f5f7fb;
}


.admin-sidebar {
    width: 230px;

    flex-shrink: 0;

    padding: 24px;

    background: #111827;

    color: #ffffff;
}


.admin-sidebar h2 {
    margin-top: 0;
}


.admin-sidebar nav {
    display: flex;

    flex-direction: column;

    gap: 8px;
}


.admin-sidebar a {
    display: block;

    padding: 10px 12px;

    border-radius: 7px;

    color: #d1d5db;
}


.admin-sidebar a:hover {
    background: #1f2937;

    color: #ffffff;

    text-decoration: none;
}


.admin-content {
    flex: 1;

    padding: 40px;
}


.admin-card {
    background: #ffffff;

    border:
        1px solid #e5e7eb;

    border-radius: 12px;

    padding: 24px;
}


@media (max-width: 700px) {

    .admin-layout {
        display: block;
    }


    .admin-sidebar {
        width: 100%;
    }


    .admin-content {
        padding: 20px;
    }

}

/*
|--------------------------------------------------------------------------
| Admin Success
|--------------------------------------------------------------------------
*/

.admin-success {
    margin-bottom: 18px;

    padding: 12px 15px;

    border-radius: 8px;

    background: #dcfce7;

    color: #166534;
}


/*
|--------------------------------------------------------------------------
| Admin Form
|--------------------------------------------------------------------------
*/

.form-group textarea {
    width: 100%;

    padding: 11px 12px;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    font-family: inherit;

    font-size: 16px;

    line-height: 1.5;

    resize: vertical;
}

/*
|--------------------------------------------------------------------------
| Admin page header
|--------------------------------------------------------------------------
*/

.admin-page-header {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 24px;
}


.admin-page-header h1 {
    margin: 0;
}


.admin-page-header p {
    margin-bottom: 0;

    color: #6b7280;
}


/*
|--------------------------------------------------------------------------
| Admin table
|--------------------------------------------------------------------------
*/

.admin-table-wrap {
    width: 100%;

    overflow-x: auto;
}


.admin-table {
    width: 100%;

    border-collapse: collapse;
}


.admin-table th,
.admin-table td {
    padding: 14px 12px;

    border-bottom: 1px solid #e5e7eb;

    text-align: left;

    vertical-align: top;
}


.admin-table th {
    background: #f9fafb;

    font-size: 14px;
}


.admin-table small {
    color: #6b7280;
}


/*
|--------------------------------------------------------------------------
| Post status
|--------------------------------------------------------------------------
*/

.status-published,
.status-draft {
    display: inline-block;

    padding: 4px 8px;

    border-radius: 6px;

    font-size: 13px;

    font-weight: 600;
}


.status-published {
    background: #dcfce7;

    color: #166534;
}


.status-draft {
    background: #fef3c7;

    color: #92400e;
}


/*
|--------------------------------------------------------------------------
| Admin select
|--------------------------------------------------------------------------
*/

.form-group select {
    width: 100%;

    padding: 11px 12px;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    background: #ffffff;

    font-size: 16px;
}

/*
|--------------------------------------------------------------------------
| Scheduled post
|--------------------------------------------------------------------------
*/

.status-scheduled {
    display: inline-block;

    padding: 4px 8px;

    border-radius: 6px;

    background: #dbeafe;

    color: #1e40af;

    font-size: 13px;

    font-weight: 600;
}

#autosave-status {
    margin-top: 5px;

    color: #6b7280;

    font-size: 13px;
}

.post-thumbnail {
    display: block;

    width: 100%;

    aspect-ratio: 16 / 9;

    object-fit: cover;

    border-radius: 10px;
}

/*
|--------------------------------------------------------------------------
| Post List
|--------------------------------------------------------------------------
*/

.post-list {
    display: grid;

    grid-template-columns:
        repeat(var(--post-list-columns, 2),
            minmax(0, 1fr));

    gap: 20px;
}


.post-list-item {
    overflow: hidden;
}


.post-thumbnail-link {
    display: block;

    margin-bottom: 16px;

    overflow: hidden;

    border-radius: 10px;
}


.post-thumbnail {
    display: block;

    width: 100%;

    aspect-ratio: 16 / 9;

    object-fit: cover;

    transition: transform 0.25s ease;
}


.post-thumbnail-link:hover .post-thumbnail {
    transform: scale(1.03);
}


.post-list-content h3 {
    margin-top: 0;
}


.post-list-content small {
    color: #6b7280;
}


/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {

    .post-list {
        grid-template-columns: 1fr;
    }

}

/*
|--------------------------------------------------------------------------
| Plugin Actions
|--------------------------------------------------------------------------
*/

.plugin-actions {
    display: flex;

    align-items: center;

    gap: 8px;

    flex-wrap: wrap;
}


/*
|--------------------------------------------------------------------------
| Plugin Help
|--------------------------------------------------------------------------
*/

.plugin-help-card {
    margin-bottom: 20px;
}


.plugin-help-content {
    padding: 20px;

    border: 1px solid #e5e7eb;

    border-radius: 10px;

    background: #f9fafb;

    line-height: 1.7;

    white-space: normal;
}

.plugin-help-link {
    display: inline-block;

    margin-top: 6px;

    font-size: 13px;

    color: #6b7280;

    text-decoration: none;
}


.plugin-help-link:hover {
    text-decoration: underline;
}

/*
|--------------------------------------------------------------------------
| Post Editor
|--------------------------------------------------------------------------
*/

.post-editor-group {
    width: 100%;
}


.post-editor {
    width: 100%;
}


.editor-mode-tabs {
    display: flex;

    justify-content: flex-end;

    gap: 3px;

    margin-bottom: 0;
}


.editor-mode-button {
    padding: 7px 14px;

    border: 1px solid #d1d5db;

    border-bottom: 0;

    border-radius: 5px 5px 0 0;

    background: #f3f4f6;

    cursor: pointer;

    font-size: 13px;
}


.editor-mode-button.active {
    background: #fff;

    font-weight: 600;
}


.editor-toolbar {
    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 5px;

    width: 100%;

    padding: 8px;

    box-sizing: border-box;

    border: 1px solid #d1d5db;

    border-bottom: 0;

    background: #f8fafc;
}


.editor-toolbar button {
    min-height: 34px;

    padding: 5px 10px;

    border: 1px solid #d1d5db;

    border-radius: 4px;

    background: #fff;

    cursor: pointer;

    font-size: 13px;
}


.editor-toolbar button:hover {
    background: #f1f5f9;
}


.editor-separator {
    width: 1px;

    height: 24px;

    margin: 0 3px;

    background: #d1d5db;
}


/*
|--------------------------------------------------------------------------
| Visual
|--------------------------------------------------------------------------
*/

.visual-editor {
    display: block;

    width: 100%;

    min-height: 650px;

    padding: 22px;

    box-sizing: border-box;

    border: 1px solid #d1d5db;

    background: #fff;

    font-size: 16px;

    line-height: 1.8;

    outline: none;

    overflow-wrap: break-word;
}


.visual-editor:focus {
    border-color: #2563eb;
}


.visual-editor p {
    margin: 0 0 1em;
}


.visual-editor h2 {
    margin: 1.5em 0 0.6em;

    font-size: 1.6em;
}


.visual-editor h3 {
    margin: 1.3em 0 0.5em;

    font-size: 1.3em;
}


.visual-editor img {
    max-width: 100%;

    height: auto;
}


/*
|--------------------------------------------------------------------------
| HTML
|--------------------------------------------------------------------------
*/

.html-editor {
    display: block;

    width: 100%;

    min-height: 650px;

    padding: 18px;

    box-sizing: border-box;

    border: 1px solid #d1d5db;

    resize: vertical;

    font-family:
        Consolas,
        Monaco,
        "Courier New",
        monospace;

    font-size: 14px;

    line-height: 1.7;
}


.editor-help {
    display: block;

    margin-top: 7px;

    color: #6b7280;

    font-size: 13px;
}

/*
|--------------------------------------------------------------------------
| CMS Admin Bar
|--------------------------------------------------------------------------
*/

.cms-admin-bar {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    z-index: 99999;

    height: 38px;

    background: #1f2937;

    color: #fff;

    font-size: 13px;
}


.cms-admin-bar-inner {
    display: flex;

    align-items: center;

    gap: 0;

    max-width: 1200px;

    height: 38px;

    margin: 0 auto;

    padding: 0 16px;
}


.cms-admin-bar a {
    display: flex;

    align-items: center;

    height: 38px;

    padding: 0 12px;

    color: #fff;

    text-decoration: none;
}


.cms-admin-bar a:hover {
    background: #374151;
}


/*
|--------------------------------------------------------------------------
| Đẩy website xuống khi Admin Bar xuất hiện
|--------------------------------------------------------------------------
*/

body:has(.cms-admin-bar) {
    padding-top: 38px;
}


/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {

    .cms-admin-bar {
        overflow-x: auto;

        white-space: nowrap;
    }


    .cms-admin-bar-inner {
        justify-content: flex-start;

        width: max-content;

        min-width: 100%;

        padding: 0;
    }


    .cms-admin-bar a {
        padding: 0 10px;
    }

}

/*
|--------------------------------------------------------------------------
| Menu Admin
|--------------------------------------------------------------------------
*/

.menu-admin-grid {
    display: grid;

    grid-template-columns:
        minmax(260px, 0.8fr) minmax(400px, 1.5fr);

    gap: 20px;

    align-items: start;
}


.menu-select-form select {
    max-width: 400px;
}


.menu-item-list {
    display: flex;

    flex-direction: column;

    gap: 12px;
}


.menu-admin-item {
    padding: 16px;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    background: #fff;
}


.menu-admin-item.is-child {
    margin-left: 35px;
}


.menu-item-title {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    margin-bottom: 15px;

    padding-bottom: 10px;

    border-bottom: 1px solid #e5e7eb;
}


.menu-item-title small {
    color: #6b7280;

    text-transform: capitalize;
}


@media (max-width: 900px) {

    .menu-admin-grid {
        grid-template-columns: 1fr;
    }


    .menu-admin-item.is-child {
        margin-left: 20px;
    }

}

/*
|--------------------------------------------------------------------------
| Floating Site Header
|--------------------------------------------------------------------------
|
| Làm cùng cơ chế với CMS Admin Bar.
|
*/

.site-header {
    position: fixed;

    top: 0;
    left: 0;
    right: 0;

    z-index: 99990;

    height: 70px;

    background: #ffffff;

    border-bottom: 1px solid #e5e7eb;

    box-shadow:
        0 2px 10px rgba(0, 0, 0, 0.08);
}


/*
|--------------------------------------------------------------------------
| Header Inner
|--------------------------------------------------------------------------
*/

.site-header .header-inner {
    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 24px;

    height: 70px;

    min-height: 70px;
}


/*
|--------------------------------------------------------------------------
| Khi Admin Bar xuất hiện
|--------------------------------------------------------------------------
*/

body:has(.cms-admin-bar) .site-header {
    top: 38px;
}


/*
|--------------------------------------------------------------------------
| Chừa vị trí của Floating Header
|--------------------------------------------------------------------------
*/

.site-main {
    padding-top: 70px;
}


/*
|--------------------------------------------------------------------------
| Logo
|--------------------------------------------------------------------------
*/

.site-header .logo {
    flex-shrink: 0;

    font-size: 22px;

    font-weight: 700;

    color: #111827;

    text-decoration: none;

    white-space: nowrap;
}


/*
|--------------------------------------------------------------------------
| Menu
|--------------------------------------------------------------------------
*/

.site-header .main-nav {
    display: block;

    margin-left: auto;
}


/*
|--------------------------------------------------------------------------
| Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 768px) {

    .site-header {
        position: fixed;

        top: 0;

        height: 70px;
    }


    body:has(.cms-admin-bar) .site-header {
        top: 38px;
    }


    .site-header .header-inner {
        height: 70px;

        min-height: 70px;

        flex-direction: row;

        align-items: center;

        padding-top: 0;

        padding-bottom: 0;
    }

    .site-main {
        padding-top: 5px;
    }

}

/*
|--------------------------------------------------------------------------
| Menu Drag & Drop Admin
|--------------------------------------------------------------------------
*/

.menu-top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.menu-settings-row {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 18px;
}

.menu-delete-menu-form,
.menu-delete-item-form {
    margin-top: 10px;
}

.menu-builder-heading p {
    margin-top: 6px;
    color: #6b7280;
}

.menu-sortable-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-drag-item {
    margin-left:
        calc(var(--menu-depth, 0) * 32px);

    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #ffffff;

    transition:
        margin-left .15s ease,
        opacity .15s ease,
        box-shadow .15s ease;
}

.menu-drag-item.dragging {
    opacity: .55;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, .12);
}

.menu-drag-header {
    display: flex;
    align-items: center;
    gap: 10px;

    min-height: 52px;

    padding: 10px 12px;

    cursor: grab;

    background: #f9fafb;

    border-radius: 8px;
}

.menu-drag-header:active {
    cursor: grabbing;
}

.menu-drag-handle {
    color: #6b7280;
    font-size: 18px;
    line-height: 1;
}

.menu-drag-title {
    flex: 1;
}

.menu-drag-type {
    color: #6b7280;
    font-size: 12px;
    text-transform: capitalize;
}

.menu-toggle-details {
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
}

.menu-item-details {
    display: none;
    padding: 16px;
    border-top: 1px solid #e5e7eb;
}

.menu-drag-item.details-open .menu-item-details {
    display: block;
}

.menu-structure-actions {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-top: 18px;
}

.menu-structure-actions .admin-button {
    width: auto;
}

.menu-structure-actions small {
    color: #6b7280;
}

.menu-add-column .admin-card+.admin-card {
    margin-top: 18px;
}

@media (max-width: 900px) {

    .menu-top-grid,
    .menu-settings-row {
        grid-template-columns: 1fr;
    }

    .menu-drag-item {
        margin-left:
            calc(var(--menu-depth, 0) * 18px);
    }

}

.admin-sidebar-group>summary {
    position: relative;

    display: block;

    padding: 10px 32px 10px 14px;

    cursor: pointer;

    font-weight: 600;

    list-style: none;

    user-select: none;

    background: transparent;

    color: inherit;

    border: 0;

    border-radius: 6px;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}


/* =========================================================
   ADMIN SIDEBAR - COLLAPSIBLE GROUPS
   ========================================================= */

.admin-sidebar-menu {
    display: block;
}

.admin-sidebar-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 10px 14px;

    border: 0;
    background: transparent;

    font: inherit;
    text-align: left;
    cursor: pointer;
    color: #dbeafe;
}

.admin-sidebar-arrow {
    display: inline-block;
    font-size: 20px;
    line-height: 1;

    transition: transform 0.2s ease;
}

.admin-sidebar-menu.open .admin-sidebar-arrow {
    transform: rotate(90deg);
}


/*
|--------------------------------------------------------------------------
| Menu con
|--------------------------------------------------------------------------
*/

.admin-sidebar-submenu {
    display: none;
}

.admin-sidebar-menu.open .admin-sidebar-submenu {
    display: block;
}


/*
|--------------------------------------------------------------------------
| Link menu con
|--------------------------------------------------------------------------
*/

.admin-sidebar-submenu a {
    padding-left: 28px;
}

/*
|--------------------------------------------------------------------------
| Author Box
|--------------------------------------------------------------------------
|
| Box tác giả tách riêng khỏi phần nội dung bài viết.
| Dùng chung cho vị trí cuối content và các footer widget.
|
*/

.cms-author-box {
    display: flex;
    align-items: flex-start;
    gap: 18px;

    margin-top: 36px;
    padding: 22px;

    background: #f8fafc;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    box-shadow:
        0 6px 22px rgba(15, 23, 42, 0.05);
}

.cms-author-avatar {
    flex: 0 0 88px;
}

.cms-author-avatar img {
    display: block;

    width: 88px;
    height: 88px;

    object-fit: cover;

    border-radius: 50%;

    border: 3px solid #ffffff;

    box-shadow:
        0 4px 14px rgba(15, 23, 42, 0.12);
}

.cms-author-content {
    flex: 1;
    min-width: 0;
}

.cms-author-label {
    margin-bottom: 4px;

    color: #6b7280;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;

    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.cms-author-name {
    margin-bottom: 8px;

    color: #111827;

    font-size: 21px;
    font-weight: 700;
    line-height: 1.35;
}

.cms-author-bio {
    color: #4b5563;

    font-size: 15px;
    line-height: 1.75;
}


/*
|--------------------------------------------------------------------------
| Author Box trong bài viết
|--------------------------------------------------------------------------
*/

.single-post>.cms-author-box {
    margin-top: 40px;
    padding-top: 24px;
}


/*
|--------------------------------------------------------------------------
| Author Box trong Footer Widget
|--------------------------------------------------------------------------
|
| Khi đặt trong footer, box được rút gọn để phù hợp không gian cột.
|
*/

.site-footer .cms-author-box {
    gap: 12px;

    margin-top: 0;
    padding: 16px;

    background: rgba(255, 255, 255, 0.06);

    border-color:
        rgba(255, 255, 255, 0.10);

    box-shadow: none;
}

.site-footer .cms-author-avatar {
    flex-basis: 58px;
}

.site-footer .cms-author-avatar img {
    width: 58px;
    height: 58px;

    border-width: 2px;
}

.site-footer .cms-author-label {
    color: #9ca3af;
}

.site-footer .cms-author-name {
    margin-bottom: 5px;

    color: #ffffff;

    font-size: 17px;
}

.site-footer .cms-author-bio {
    color: #d1d5db;

    font-size: 14px;
    line-height: 1.6;
}


/*
|--------------------------------------------------------------------------
| Author Box Mobile
|--------------------------------------------------------------------------
*/

@media (max-width: 640px) {

    .cms-author-box {
        gap: 14px;

        margin-top: 30px;
        padding: 18px;
    }

    .cms-author-avatar {
        flex-basis: 68px;
    }

    .cms-author-avatar img {
        width: 68px;
        height: 68px;
    }

    .cms-author-name {
        font-size: 18px;
    }

    .cms-author-bio {
        font-size: 14px;
    }

    .site-footer .cms-author-box {
        padding: 14px;
    }

}



/*
|--------------------------------------------------------------------------
| Footer Widget Areas
|--------------------------------------------------------------------------
*/

.footer-widget-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 28px;

    padding-bottom: 28px;
}


.footer-widget-area {
    min-width: 0;
}


.footer-html-widget+.footer-html-widget {
    margin-top: 24px;
}


.footer-html-widget h3 {
    margin: 0 0 12px;

    color: #ffffff;

    font-size: 17px;

    font-weight: 700;

    line-height: 1.4;
}


.footer-html-widget-content {
    color: #d1d5db;

    font-size: 14px;

    line-height: 1.7;
}


.footer-html-widget-content p:first-child {
    margin-top: 0;
}


.footer-html-widget-content p:last-child {
    margin-bottom: 0;
}


.footer-html-widget-content a {
    color: #ffffff;

    text-decoration: none;
}


.footer-html-widget-content a:hover {
    text-decoration: underline;
}


.footer-html-widget-content ul,
.footer-html-widget-content ol {
    margin: 0;

    padding-left: 20px;
}


.footer-copyright {
    padding-top: 20px;

    border-top:
        1px solid rgba(255, 255, 255, 0.12);

    color: #9ca3af;

    font-size: 14px;
}


.footer-copyright p {
    margin: 0;
}


/*
|--------------------------------------------------------------------------
| Author Box khi nằm trong Footer
|--------------------------------------------------------------------------
*/

.site-footer .cms-author-box {
    margin: 0 0 24px;

    padding: 18px;

    background:
        rgba(255, 255, 255, 0.06);

    border:
        1px solid rgba(255, 255, 255, 0.10);

    box-shadow: none;
}


.site-footer .cms-author-label {
    color: #93c5fd;
}


.site-footer .cms-author-name {
    color: #ffffff;
}


.site-footer .cms-author-bio {
    color: #d1d5db;
}


@media (max-width: 800px) {

    .footer-widget-grid {
        grid-template-columns: 1fr;

        gap: 28px;
    }

}

/*
|--------------------------------------------------------------------------
| Post FAQ
|--------------------------------------------------------------------------
*/

.post-faq {
    margin-top: 32px;
}

.post-faq>h2 {
    margin: 0 0 18px;

    color: #111827;

    font-size: 24px;
    line-height: 1.35;
}

.post-faq-item {
    margin-bottom: 12px;

    overflow: hidden;

    border: 1px solid #e5e7eb;
    border-radius: 10px;

    background: #f8fafc;
}

.post-faq-item:last-child {
    margin-bottom: 0;
}

.post-faq-question {
    margin: 0;

    padding: 15px 18px;

    color: #111827;

    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
}

.post-faq-answer {
    padding: 0 18px 16px;

    color: #4b5563;

    line-height: 1.75;
}

.post-faq-answer> :first-child {
    margin-top: 0;
}

.post-faq-answer> :last-child {
    margin-bottom: 0;
}

@media (max-width: 640px) {

    .post-faq {
        margin-top: 26px;
    }

    .post-faq>h2 {
        font-size: 21px;
    }

    .post-faq-question {
        padding: 14px 15px;
    }

    .post-faq-answer {
        padding: 0 15px 15px;
    }

}

/* Menu trượt dành riêng cho điện thoại; không ảnh hưởng menu PC. */
.cms-mobile-menu-open,
.cms-mobile-menu,
.cms-mobile-menu-backdrop {
    display: none;
}

@media (min-width: 769px) {
    .main-nav .menu-hide-pc {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .site-header .main-nav {
        display: none !important;
    }

    .site-header .header-inner {
        gap: 12px;
    }

    .site-header .logo {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 19px;
    }

    .cms-mobile-menu-open {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        margin-left: auto;
        padding: 0;
        border: 1px solid #e5e7eb;
        border-radius: 10px;
        background: #fff;
        color: #111827;
        font-size: 25px;
        cursor: pointer;
    }

    .cms-mobile-menu-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 99991;
        background: rgba(15, 23, 42, .55);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .25s, visibility .25s;
    }

    .cms-mobile-menu {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(360px, 88vw);
        max-width: 100%;
        z-index: 99992;
        background: #fff;
        box-shadow: -8px 0 30px rgba(0, 0, 0, .15);
        transform: translateX(105%);
        visibility: hidden;
        transition: transform .25s ease, visibility .25s;
    }

    body.cms-mobile-menu-active {
        overflow: hidden;
    }

    body.cms-mobile-menu-active .cms-mobile-menu-backdrop {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.cms-mobile-menu-active .cms-mobile-menu {
        transform: translateX(0);
        visibility: visible;
    }

    .cms-mobile-menu-heading {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 17px 18px;
        border-bottom: 1px solid #e5e7eb;
        font-size: 18px;
        color: #111827;
    }

    .cms-mobile-menu-heading strong {
        overflow-wrap: anywhere;
    }

    .cms-mobile-menu-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: #f3f4f6;
        font-size: 29px;
        color: #374151;
        cursor: pointer;
    }

    .cms-mobile-menu-nav {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 8px 14px 24px;
    }

    .cms-mobile-menu-nav ul {
        position: static !important;
        display: block;
        margin: 0;
        padding: 0;
        list-style: none;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .cms-mobile-menu-nav li {
        position: relative;
        margin: 0;
        padding: 0;
        list-style: none;
        border-bottom: 1px solid #f1f5f9;
    }

    .cms-mobile-menu-nav a {
        display: block;
        padding: 13px 44px 13px 10px;
        color: #1f2937;
        font-size: 15px;
        font-weight: 600;
        text-decoration: none;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .cms-mobile-menu-nav a:hover {
        color: #2563eb;
        background: #f8fafc;
        text-decoration: none;
    }

    .cms-mobile-menu-nav .cms-mobile-submenu-toggle {
        position: absolute;
        top: 5px;
        right: 0;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 0;
        border-radius: 8px;
        background: #f3f4f6;
        color: #475569;
        font-size: 23px;
        cursor: pointer;
        transition: transform .2s;
    }

    .cms-mobile-menu-nav .cms-mobile-submenu-toggle[aria-expanded="true"] {
        transform: rotate(180deg);
    }

    .cms-mobile-menu-nav ul ul {
        margin: 0 0 8px 10px;
        padding-left: 10px;
        border-left: 2px solid #dbeafe;
    }

    .cms-mobile-menu-nav ul ul a {
        font-size: 14px;
        font-weight: 500;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .cms-mobile-menu-nav ul[hidden] {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {

    .cms-mobile-menu,
    .cms-mobile-menu-backdrop {
        transition: none !important;
    }
}