/*
Theme Name: GeneratePress Child
Author: Isaac Hiroman
Description: Đây là bản child theme do Isaac Hiroman tùy biến
Version: 1.0
Template: generatepress

This is the child theme for GeneratePress theme, generated with Generate Child Theme plugin by catchthemes.

(optional values you can add: Theme URI, Author URI, License, License URI, Tags, Text Domain)
*/
/* Css toan cuc */
.site-header {
    box-shadow: 0 2px 2px -2px rgba(0, 0, 0, .2);
}

/* CSS cho menu */
.main-navigation .main-nav ul li a {
    color: var(--contrast);
    font-size: 18px;
    font-weight: 500;
}

/* CSS cho danh sách bài viết liên quan */
.related-posts {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f8f8;
}

.related-posts h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-post {
    background-color: #ffffff;
    padding: 15px;
    border: 1px solid #e0e0e0;
}

.related-post img {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.related-post h3 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 10px;
}

.related-post p {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 0;
}

.related-post:hover {
    background-color: #f0f0f0;
    transition: background-color 0.3s;
}

/* Media queries cho responsiveness */
@media screen and (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Hiển thị 2 cột trên màn hình nhỏ hơn */
    }
}

@media screen and (max-width: 576px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
        /* Hiển thị 1 cột trên màn hình rất nhỏ */
    }
}

/* Định dạng câu hỏi */
.rank-math-question {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    cursor: pointer;
    color: #333;
    /* Màu chữ */
    transition: color 0.3s ease;
}

/* Định dạng câu trả lời mở ra */
.rank-math-list-item.active .rank-math-answer {
    display: block;
    margin-top: 10px;
    font-size: 16px;
    color: #555;
    /* Màu chữ câu trả lời */
}

/* Icon mở/rút câu trả lời */
.rank-math-list-item.active .rank-math-question::before {
    content: "\25bc";
    /* Mũi tên xuống */
    margin-right: 5px;
}

/* Icon câu hỏi mở ra */
.rank-math-list-item .rank-math-question::before {
    content: "\25b6";
    /* Mũi tên sang phải */
    margin-right: 5px;
}

/* Mở tất cả câu hỏi mặc định */
.rank-math-list-item .rank-math-question::before {
    content: "\25bc";
    /* Mũi tên xuống */
    margin-right: 5px;
}

.rank-math-list-item .rank-math-answer {
    display: block;
}


/* CSS cho danh sách bài viết liên quan */
.related-posts {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f8f8;
}

.related-posts h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.related-post {
    background-color: #ffffff;
    padding: 15px;
    border: 1px solid #e0e0e0;
}

.related-post img {
    width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.related-post h3 {
    font-size: 18px;
    margin-top: 0;
    margin-bottom: 10px;
}

.related-post p {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 0;
}

.related-post:hover {
    background-color: #f0f0f0;
    transition: background-color 0.3s;
}

/* Media queries cho responsiveness */
@media screen and (max-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        /* Hiển thị 2 cột trên màn hình nhỏ hơn */
    }

}

@media screen and (max-width: 576px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
        /* Hiển thị 1 cột trên màn hình rất nhỏ */
    }
}

.wp-block-image .aligncenter {
    border: 1px solid #eee;
}

h2#single a {
    color: #000000 !important;
}

.inside-article a:not(#ez-toc-container a), .paging-navigation a, .comments-area a, .page-header a {
    border-bottom: 2px solid #ffd200;
    text-decoration: none;
}

.inside-article a:not(#ez-toc-container a),
.paging-navigation a,
.comments-area a,
.page-header a {
    border-bottom: 2px solid #ffd200;
    text-decoration: none;
}

.wp-block-image {
    margin-bottom: 1.5em;
}

a {
    transition: .3s !important;
}

a:hover {
    transition: .3s !important;
}

.cat-links a {
    border-bottom: 2px solid rgb(255, 210, 0);
    text-decoration: none;
}

span.author.vcard a {
    border-bottom: 2px solid rgb(255, 210, 0);
    text-decoration: none;
}

div#ftwp-postcontent ul,
.wp-block-list {
    list-style-type: none !important;
}

div#ftwp-postcontent ul li::before,
.wp-block-list li::before {
    content: "";
    background-color: #ffcd00;
    position: absolute;
    width: 6px;
    height: 6px;
    margin-left: -30px !important;
    list-style-type: none !important;
    margin-top: 10px !important;
}

.inside-page-hero.grid-container.grid-parent {
    background: #fff;
    padding: 30px;
    line-height: 1.75em;
    margin-top: 20px;
    font-size: 17px;
    box-shadow: 0px 5px 20px 0px rgba(52,52,52, .12);
}

/* .inside-page-hero.grid-container.grid-parent:hover {
    border-color: var(--contrast);
} */


.wp-block-list {
    list-style-type: none !important;
}

.wp-block-list li::before {
    content: "";
    background-color: #ffcd00;
    position: absolute;
    width: 6px;
    height: 6px;
    margin-left: -30px !important;
    list-style-type: none !important;
    margin-top: 10px !important;
}

/* Css Ratio Bg Contract */
p.gb-headline {
    color: #575760 !important;
}

/* Wrapper cho toàn bộ khối */
.code-prism-wrapper {
    position: relative;
    display: inline-block;
    background: #000;
    border-radius: 5px;
    overflow: visible;
}

/* Định dạng chung cho khối code */
.custom-code-block {
    position: relative;
    background: #000;
    color: #ccc;
    padding: 15px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    line-height: 1.5;
    overflow-x: auto;
    display: block;
}
@media (min-width: 769px) {
	.inside-right-sidebar {
		position: sticky;
		top: 110px;
	}
}
/* Tô màu cú pháp trên nền đen */
.custom-code-block .token.keyword {
    color: #4a90e2;
    font-weight: bold;
}

.custom-code-block .token.function,
.custom-code-block .token.function-definition.function {
    color: #d7ba7d;
}

.custom-code-block .token.variable {
    color: #56b6c2;
}

.custom-code-block .token.string,
.custom-code-block .token.string.single-quoted-string {
    color: #e06c75;
}

.custom-code-block .token.comment {
    color: #5c6370;
    font-style: italic;
}

.custom-code-block .token.number {
    color: #98c379;
}

.custom-code-block .token.punctuation,
.custom-code-block .token.operator {
    color: #abb2bf;
}

/* Điều chỉnh nhãn ngôn ngữ */
.lang-label {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #222;
    color: #bbb;
    padding: 4px 8px;
    font-size: 12px;
    border-top-left-radius: 5px;
    z-index: 10;
}

/* Điều chỉnh nút Copy */
.custom-code-block .copy-button {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #333;
    color: #ddd;
    padding: 3px 8px;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    font-size: 10px;
    transition: background 0.3s;
    z-index: 10;
}

.custom-code-block .copy-button:hover {
    background: #555;
}

/* Loại bỏ ::before cũ để tránh xung đột */
.custom-code-block::before {
    content: none;
    /* Tắt nhãn cũ */
}

button.copy-button {
    float: right;
    background: #666;
    color: #eee;
    padding: 6px 12px;
    margin-top: 5px;
    margin-right: 5px;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    font-size: 10px;
    transition: background 0.3s;
}

.code-prism-wrapper {
    background: #2d2d2d;
    width: 100%;
}

pre.wp-block-custom-code-prism.custom-code-block.language-php {
    width: 100%;
}

.about-ihblog, .search-ihblog {
    padding: 2rem;
    box-shadow: 0px 5px 20px 0px rgba(52,52,52, .12);
}
.post-item, .site-main .post .inside-article {
    box-shadow: 0px 5px 20px 0px rgba(52,52,52, .12);
}

.inside-header {
    padding: 20px 0px !important;
}
.main-navigation.navigation-stick.has-sticky-branding .inside-navigation.grid-container {
    padding-left: 0px;
   padding-right: 0px;
}
.inside-article {
    border-radius: 8px;
}
.related-posts {
    border-radius: 8px;
}
.related-post {
    border-radius: 8px;
}
.related-post img {
    border-radius: 8px;
}
.comments-area {
    border-radius: 8px;
}
/* Megamenu */
@media (min-width: 769px) {
    nav .main-nav .mega-menu {
        position: static;
    }

    nav .main-nav .mega-menu>ul {
        position: absolute;
        width: 100%;
        left: 0 !important;
        display: flex;
        flex-wrap: wrap;
    }

    nav .main-nav .mega-menu>ul>li>a {
        font-weight: bold;
    }

    nav .main-nav .mega-menu>ul>li {
        display: inline-block;
        width: 25%;
        vertical-align: top;
    }

    nav .main-nav .mega-menu.mega-menu-col-2>ul>li {
        width: 50%;
    }

    nav .main-nav .mega-menu.mega-menu-col-3>ul>li {
        width: 33.3333%;
    }

    nav .main-nav .mega-menu.mega-menu-col-5>ul>li {
        width: 20%;
    }

    nav .main-nav .mega-menu>ul>li:hover>a,
    nav .main-nav .mega-menu>ul>li:focus>a,
    nav .main-nav .mega-menu>ul>li[class*="current-"]>a,
    nav .main-nav .mega-menu ul ul {
        background-color: transparent !important;
        color: inherit;
    }

    nav .main-nav .mega-menu ul .sub-menu {
        position: static;
        display: block;
        opacity: 1;
        visibility: visible;
        width: 100%;
        box-shadow: 0 0 0;
        left: 0;
        height: auto;
        pointer-events: auto;
        transform: scale(1);
    }

    nav .main-nav .mega-menu ul.toggled-on .sub-menu {
        pointer-events: auto;
    }

    nav .main-nav .mega-menu .sub-menu .menu-item-has-children .dropdown-menu-toggle {
        display: none;
    }
}