/*
 * CSS of taxonomy-danh-muc-ky-thuat-giai-dap-ky-thuat-thi-cong.php, moved verbatim from its inline <style> blocks, in source order.
 * Loaded by kosmos_page_template_css (functions/actions.php).
 */

/* taxonomy-danh-muc-ky-thuat-giai-dap-ky-thuat-thi-cong.php, <style> at line 19 */
section.post_detail .grid-container {
    max-width: calc(100% - 9rem);
}

.post_detail .section_heading {
    margin-bottom: 0;
}

.post_detail {
    margin-top: 15px;
}

.site.grid-container.container.hfeed {
    margin-top: 86px;
}

.menu-ho-tro-ky-thuat {
    background: #fff;
    z-index: 1000;
    margin-top: -29px;
}

.menu-ho-tro-ky-thuat ul {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-content: center;
    justify-content: center;
    align-items: center;
}

.menu-ho-tro-ky-thuat ul li {
    background: #494949;
    padding: 3px 20px;
    margin-top: 10px;
    margin-bottom: 4px;
    margin-right: 10px;
}

.menu-ho-tro-ky-thuat ul a {
    color: #fff;
}

.menu-ho-tro-ky-thuat.fixed {
    position: fixed;
    top: 134px;
    left: 0;
    right: 0;
    animation: slideDown 0.3s ease-in-out;
    background-color: rgb(61 60 60 / 57%);
    box-shadow: 0 10px 30px rgb(0 0 0 / 10%);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.menu-ho-tro-ky-thuat ul li.active,
.menu-ho-tro-ky-thuat ul li:hover {
    background: #e31937;
}

/* ===== Heading ===== */
.giai-dap-heading {
    margin: 0px 0 5px;
    margin-bottom: 15px !important;
    width: 100%;
}

.giai-dap-heading .sec_title {
    font-size: 26px;
    font-weight: 700;
    color: #222;
    margin-bottom: 4px;
}

.giai-dap-heading .sec_subtitle {
    color: #777;
    font-size: 14px;
    margin: 0;
}

/* ===== Bo loc cot trai (giong canh-bao-an-toan) ===== */
.filter-section {
    margin: 30px 0;
}

.filter-box {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filter-box h3 {
    margin-top: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.parent-term {
    margin-bottom: 12px;
}

.child-terms {
    padding-left: 20px;
    margin-top: 8px;
}

.filter-box label {
    display: block;
    margin-bottom: 8px;
    cursor: pointer;
}

.filter-box .count {
    color: #999;
    font-size: 0.9em;
}

.filter-section .filter-box label input[type="checkbox"] {
    margin-right: 5px;
}

.parent-name{cursor:pointer;}
.filter-section .box{margin-bottom:5px;overflow:hidden;}
.filter-section label>span{width:80%;}
.filter-section input{-webkit-appearance:auto;width:15px;height:15px;opacity:1;display:block;clear:both;border:1px solid #ccc;position:relative;cursor:pointer;}
.filter-section input[type="checkbox"]{pointer-events:auto;float:left;margin-right:5px;margin-top:0;-webkit-appearance:none;border:2px solid #ccc;background-color:#ccc;cursor:pointer;border-radius:3px;outline:none;}
.filter-section input[type="checkbox"]:checked{background-color:#E31937;border-color:#EBEBEC;}
.filter-section{position:sticky;top:0;overflow-y:auto;}
.filter-section::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 6px rgba(0, 0, 0, 0.3);background-color:#F5F5F5;}
.filter-section::-webkit-scrollbar{width:2px;background-color:#F5F5F5;}
.filter-section::-webkit-scrollbar-thumb{background-color:#E31937;}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

/* ===== Luoi card ===== */
.giai-dap-grid {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.giai-dap-grid .gd-no-posts {
    grid-column: 1 / -1;
}

.giai-dap-card {
    background: #fff;
    border: 1px solid #e9e9e9;
    border-radius: 6px;
    padding: 10px 10px 18px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.gd-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.gd-thumb img.post-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.35s ease;
}

.giai-dap-card:hover .gd-thumb img.post-thumbnail {
    transform: scale(1.05);
}

/* Overlay hien khi re chuot vao thumbnail */
.gd-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.gd-thumb:hover .gd-overlay,
.gd-thumb:focus-within .gd-overlay {
    opacity: 1;
    visibility: visible;
}

/* May cam ung khong co hover -> luon hien overlay nhe */
@media (hover: none) {
    .gd-overlay {
        opacity: 1;
        visibility: visible;
        background: rgba(0, 0, 0, 0.25);
        align-items: flex-end;
        padding-bottom: 12px;
    }
}

.gd-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e31937;
    color: #fff;
    border: 0;
    border-radius: 99px;
    padding: 8px 16px;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.gd-view-btn:hover {
    background: #c41730;
}

.gd-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid #fff;
    color: #fff;
    transition: background 0.2s ease;
}

.gd-download-btn:hover {
    background: #e31937;
    border-color: #e31937;
    color: #fff;
}

.gd-view-btn svg,
.gd-download-btn svg {
    display: block;
}

/* Tieu de */
.giai-dap-card .gd-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    line-height: 1.45;
    margin: 12px 6px 12px;
}

/* Nut video */
.gd-video-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 190px;
    border: 1px solid #333;
    border-radius: 4px;
    background: #fff;
    color: #333;
    padding: 7px 16px;
    font-size: 13px;
    line-height: 1.2;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.gd-video-btn:hover {
    color: #e31937;
    border-color: #e31937;
}

/* Khong co link video -> khoa nut */
.gd-video-btn.is-updating {
    border-color: #d5d5d5;
    background: #f1f1f1;
    color: #9a9a9a;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== Popup xem chi tiet anh ===== */
.gd-lightbox[hidden] {
    display: none;
}

.gd-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.gd-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.gd-lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    margin: 0;
}

.gd-lightbox-inner img {
    display: block;
    max-width: 100%;
    max-height: 85vh;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Nut download + dong o goc phai tren cua anh */
.gd-lightbox-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 2;
}

.gd-lightbox-actions a,
.gd-lightbox-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.gd-lightbox-actions a:hover,
.gd-lightbox-actions button:hover {
    background: #e31937;
    color: #fff;
}

body.gd-lightbox-open {
    overflow: hidden;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .giai-dap-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 650px) {
    section.post_detail .grid-container {
        max-width: calc(100% - 2rem);
    }

    .giai-dap-grid {
        grid-template-columns: 1fr;
    }

    .filter-section .grid-15 {
        width: 100%;
        margin-bottom: 15px;
    }

    .menu-ho-tro-ky-thuat ul {
        flex-wrap: wrap;
    }

    .menu-ho-tro-ky-thuat ul li {
        width: 47%;
        margin: 0 3px 3px;
    }

    .menu-ho-tro-ky-thuat.fixed {
        top: 93px;
    }

    .menu-ho-tro-ky-thuat ul a {
        font-size: 12px;
    }

    section.post_detail {
        margin-top: 5%;
    }
}
