/* Related sites page */
.sites-section {
    padding: 48px 0 80px;
    background: #F9F6F4;
}

.sites-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.sites-content-wrapper {
    display: flex;
    gap: 30px;
    position: relative;
    align-items: flex-start;
}

.sites-title {
    text-align: center;
    font-size: 54px;
    font-weight: 800;
    color: #D7172A;
    margin-bottom: 24px;
    letter-spacing: 0.06em;
    line-height: 1.5;
}

.sites-card {
    background: #FEF4E4;
    border-radius: 14px;
    padding: 15px 20px 24px;
    display: flex;
    flex-direction: column;
}

.sites-card+.sites-card {
    margin-top: 22px;
}

.sites-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.category-pill {
    position: relative;
    padding-left: 14px;
    font-weight: 700;
    font-size: 20px;
    color: #1C1C1C;
    line-height: 1.4;
}

.sites-card-wrapper {
    display: grid;
    gap: 20px;
}

.sites-card-wrapper-content {
    background: #FFFFFF;
    padding: 30px;
    border-radius: 14px;
    flex: 1;
    min-width: 0;
}

.sites-card-wrapper-title {
    color: #000000;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.5;
    margin-bottom: 10px;
    margin-top: 10px;
    position: relative;
    padding-left: 14px;
}

.sites-card-wrapper-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #E87B37;
    border-radius: 4px;
}

.topic-divider {
    height: 3px;
    background: repeating-linear-gradient(to right, #C9C9C9 0, #C9C9C9 20px, transparent 8px, transparent 26px);
    margin: 20px 5px;
}

.category-pill::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 30px;
    background: linear-gradient(180deg, #D7172A 0%, #D7172A 100%);
    border-radius: 4px;
    transform: translateY(-50%);
}

.category-divider {
    flex: 1;
    border-bottom: 2px dashed #f4cdd7;
    margin-left: 14px;
}

.site-group {
    margin-top: 18px;
}

.site-group-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #7e0031;
    font-size: 15px;
    margin-bottom: 10px;
}

.group-marker {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f47fa3;
    box-shadow: 0 0 0 4px #ffe3ea;
}

.sites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 6px;
}

.site-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #f1c6d1;
    border-radius: 5px;
    padding: 4px 8px;
    font-weight: 400;
    font-size: 18px;
    color: #1C1C1C;
    min-height: 32px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.sites-card-title {
    font-size: 28px;
    font-weight: 700;
    color: #1C1C1C;
    line-height: 1.5;
    margin-bottom: 10px;
    /* text-align: center; */
    margin-top: 10px;
    text-decoration: none;
}

.sites-card-description {
    font-size: 16px;
    font-weight: 400;
    color: #515151;
    line-height: 1.5;
    margin-bottom: 10px;
    margin-top: 10px;
}

.sites-card-actions {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
}

.sites-card-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 14px;
    background: #B42318;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.sites-card-more:hover {
    background: #ff6a0a;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.sites-card-more:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.sites-more {
    text-align: right;
    margin-top: 12px;
}

.sites-more a {
    color: #D7172A;
    font-size: 24px;
    font-weight: 700;
    text-decoration: underline;
}

.sites-more a:hover {
    text-decoration: underline;
}

/* Sticky Sidebar */
.sites-sticky-sidebar {
    position: sticky;
    top: 2%;
    align-self: flex-start;
    width: 240px;
    flex-shrink: 0;
    z-index: 10;
}

.sites-sidebar-nav {
    background: #FFFFFF;
    border-radius: 14px;
    padding: 20px 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sites-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sites-sidebar-item {
    margin-bottom: 12px;
}

.sites-sidebar-item:last-child {
    margin-bottom: 0;
}

.sites-sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: #1C1C1C;
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    pointer-events: auto;
    z-index: 1;
}

.sites-sidebar-link:hover {
    background: #F9F6F4;
    color: #E87B37;
}

.sites-sidebar-link.active {
    color: #E87B37;
    font-weight: 700;
    background: #FFEAEE;
}

.sites-sidebar-bullet {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #C9C9C9;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sites-sidebar-link.active .sites-sidebar-bullet {
    background: #E87B37;
    width: 10px;
    height: 10px;
    box-shadow: 0 0 0 3px rgba(215, 23, 42, 0.2);
}

@media (max-width: 768px) {
    .sites-title {
        font-size: 26px;
    }

    /* tránh thanh fixed che mất nội dung */
    .sites-section {
        padding-bottom: 120px;
    }

    /* Thanh sidebar cố định dưới màn hình trên mobile */
    .sites-sticky-sidebar {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        z-index: 1000;
    }

    .sites-sidebar-nav {
        border-radius: 14px 14px 0 0;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
    }

    .sites-card {
        padding: 18px 14px 22px;
    }

    .sites-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }
}

/* Detective list page */
.detective-page {
    background: #f8f7f6;
    padding: 48px 0 64px;
}

.detective-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.detective-heading {
    text-align: center;
    color: #d12c3b;
    font-size: 54px;
    font-weight: 800;
    margin-bottom: 22px;
    letter-spacing: 0.05em;
    line-height: 1.5;
}

.detective-card {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    padding: 20px;
}

.detective-card__inner {
    /* border: 4px solid #fae7ea; */
    border-radius: 14px;
    padding: 30px 26px;
    background: #FEF4E4;
    padding: 30px;
}

.detective-title {
    color: #000000;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.5;
}

.detective-lead {
    color: #515151;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.detective-section {
    margin-top: 12px;
}

.detective-section__title {
    color: #000000;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
}

.detective-section__title--lined {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding-left: 8px;
    position: relative;
}

.detective-section__title--lined::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0px;
    width: 4px;
    height: calc(100% - 0px);
    background: #E87B37;
    border-radius: 4px;
}

.detective-section__title--with-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.detective-bullet {
    width: 12px;
    height: 12px;
    background: #d12c3b;
    border-radius: 50%;
    display: inline-block;
}

.detective-chip-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detective-chip-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(90px, 1fr));
    gap: 8px;
}

.detective-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    background: #ffffff;
    /* border: 1px solid #f5c8d2; */
    border-radius: 8px;
    font-size: 18px;
    font-weight: 700;
    color: #3d3d3d;
    min-height: 38px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    text-decoration: none;
}

.detective-chip--ghost {
    visibility: hidden;
}

.detective-subblock {
    /* background: #fff2f5; */
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.detective-subblock:last-child {
    margin-bottom: 0;
}

.detective-subblock__label {
    color: #FCA242;
    font-weight: 500;
    font-size: 18px;
    margin: 0 0 10px;
    line-height: 1.5;
}


@media (max-width: 768px) {
    .detective-heading {
        font-size: 30px;
    }

    .detective-title {
        font-size: 18px;
    }

    .detective-chip-row {
        grid-template-columns: repeat(3, minmax(90px, 1fr));
    }

    .sites-content-wrapper {
        display: grid;
        grid-template-columns: 1fr;
    }

    .detective-subblock {
        padding: 0;
    }

    .sites-sidebar-list {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sites-sidebar-link {
        display: block;
        font-size: 12px;
        padding: 5px 10px;
    }

    .sites-sidebar-bullet {
        display: none;
    }

    .sites-sidebar-item {
        margin: 0;
    }

    .detective-chip,
    .detective-lead {
        font-size: 16px;
    }

    .back-to-top {
        bottom: 90px;
    }
    
    .sites-card-wrapper-content {
        padding: 10px;
    }

    .detective-card__inner {
        padding: 10px;
    }

    .detective-card {
        padding: 10px;
    }

}