/* =============================================
   CHIA SE KIEN THUC PAGE STYLES
   ============================================= */

/* Hero Section */
.csk-hero {
    position: relative;
    height: 433px;
    overflow: hidden;
}

.csk-hero-bg {
    position: absolute;
    inset: 0;
}

.csk-hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.csk-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(6, 70, 102, 0.75);
}

.csk-hero-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 27px;
}

.csk-breadcrumb {
    font-size: 14px;
    color: #fff;
    text-align: center;
    margin-bottom: 0;
}

.csk-hero-title {
    font-family: 'Google Sans', sans-serif;
    font-weight: 700;
    font-size: 48px;
    line-height: 1.1;
    letter-spacing: -2.4px;
    color: #26FFB1;
    text-align: center;
    margin-top: 36px;
    margin-bottom: 0;
}

.csk-tags-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 36px;
    flex-wrap: wrap;
}

.csk-tag {
    padding: 4px 32px;
    border-radius: 44px;
    border: 1px solid #d4d4d4;
    background: transparent;
    color: #d4d4d4;
    font-family: 'Google Sans', sans-serif;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
}

.csk-tag--active {
    background: #f8f8f8;
    color: #262626;
    border-color: #d4d4d4;
}

.csk-tag:hover:not(.csk-tag--active) {
    background: rgba(255, 255, 255, 0.1);
}

/* Intro / Search Section */
.csk-intro-section {
    padding: 60px 0 48px;
}

.csk-intro-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
}

.csk-search-bar {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #a7a7a7;
    border-radius: 20.5px;
    padding: 10px 16px 10px 35px;
    width: 560px;
    max-width: 100%;
    background: #fff;
}

.csk-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: 'Google Sans', sans-serif;
    font-size: 16px;
    color: #262626;
    opacity: 0.56;
    background: transparent;
    min-width: 0;
}

.csk-search-input::placeholder {
    color: #262626;
    opacity: 0.56;
}

.csk-search-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.csk-intro-text {
    font-family: 'Google Sans', sans-serif;
    font-size: 28px;
    font-weight: 400;
    color: #262626;
    text-align: center;
    max-width: 1030px;
    line-height: 1.5;
}

/* Sections */
.csk-section {
    padding: 0 0 60px;
}

.csk-section-heading {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 32px;
}

.csk-section-title {
    font-family: 'Google Sans', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #14313A;
    white-space: nowrap;
}

.csk-section-line {
    height: 1px;
    background: #a7a7a7;
    width: 100%;
    position: relative;
}

.csk-section-line::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 3px;
    width: 120px;
    background: #14313A;
    transform: translateY(-1px);
}

/* Featured Article */
.csk-featured {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.csk-featured-thumb {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    display: block;
}

.csk-featured-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.csk-featured-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.csk-article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.csk-atag {
    padding: 3px 12px;
    border-radius: 20px;
    font-family: 'Google Sans', sans-serif;
    font-size: 13px;
    color: #828282;
    white-space: nowrap;
}

.csk-atag--green {
    background: #BCEBDA;
}

.csk-atag--red {
    background: #FDF1F0;
}

.csk-atag--blue {
    background: #EFF5FE;
}

.csk-featured-title {
    font-family: 'Google Sans', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #14313A;
    line-height: 1.4;
    margin: 0;
}

.csk-featured-title a {
    text-decoration: none;
    color: inherit;
}

.csk-card-link {
    text-decoration: none !important;
    color: inherit !important;
    display: block;
}

/* Article Grid */
.csk-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 48px;
    margin-bottom: 48px;
}

.csk-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.csk-card-thumb {
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
}

.csk-card-thumb img {
    width: 100%;
    height: 241px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

.csk-card-author {
    font-family: 'Google Sans', sans-serif;
    font-size: 18px;
    color: rgba(0, 0, 0, 0.59);
    margin: 10px 0px;
}

.csk-card-title {
    font-family: 'Google Sans', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #2f2f2f;
    line-height: 1.4;
    margin: 0;
}

.csk-card:hover .csk-card-title,
.csk-featured:hover .csk-featured-title a {
    background: var(--gradient, linear-gradient(90deg, #19D08E 0%, #26FFB1 100%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.csk-card-divider {
    height: 1px;
    background: #d4d4d4;
    width: 100%;
}

/* Banner Ad */
.csk-banner-ad {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 48px;
    width: 100%;
}

.csk-banner-ad img {
    width: 100%;
    height: 349px;
    object-fit: cover;
    display: block;
    border-radius: 20px;
}

/* Pagination */
.csk-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 48px 0;
}

.csk-page-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.csk-page-btn img {
    width: 24px;
    height: 24px;
}

.csk-icon-flipped {
    transform: scaleX(-1);
}

.csk-page-info {
    font-family: 'Google Sans', sans-serif;
    font-size: 32px;
    color: #000;
    letter-spacing: 0.36px;
}

.csk-page-total {
    font-size: 18px;
    color: rgba(0, 0, 0, 0.42);
}

/* Bottom Banner */
.csk-banner-bottom {
    width: 100%;
    overflow: hidden;
    margin-bottom: 40px;
}

.csk-banner-bottom img {
    width: 100%;
    height: 205px;
    object-fit: cover;
    display: block;
}

/* Pagination */
.dt-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.dt-page-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dt-page-btn:hover circle {
    stroke: #19d08e;
}

.dt-page-count {
    font-family: 'Google Sans', sans-serif;
}

.dt-page-current {
    font-size: 32px;
    color: #000;
}

.dt-page-total {
    font-size: 18px;
    color: rgba(0, 0, 0, 0.42);
}

/* =============================================
   CONTENT + SIDEBAR LAYOUT
   ============================================= */

.csk-content-layout {
    padding: 0 0 60px;
}

.csk-content-wrap {
    display: grid;
    grid-template-columns: 1fr 339px;
    gap: 60px;
    align-items: start;
}

.csk-main-col {
    min-width: 0;
}

/* Fix featured thumb to be fluid inside main col */
.csk-featured-thumb {
    width: 100%;
    /* max-width: 60%; */
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
}

.csk-featured-thumb img {
    width: 100%;
    height: auto;
    aspect-ratio: 924 / 506;
    object-fit: cover;
    display: block;
    border-radius: 12px;
}

/* =============================================
   SIDEBAR
   ============================================= */

.csk-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.csks-widget {
    width: 100%;
}

/* --- Top bài viết được quan tâm --- */
.csks-top-posts {
    background: #fff;
}

.csks-widget-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 16px;
    overflow: visible;
}

.csks-widget-icon-svg {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
}

.csks-widget-title-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    overflow: visible;
}

.csks-widget-title {
    font-family: 'Google Sans', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #14313A;
    margin: 0;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

/* highlight "quan tâm" */
.csks-widget-title-bg {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 88px;
    height: 22px;
    background: #B9F5FF;
    border-radius: 3px;
    z-index: 0;
}

.csks-title-dot {
    flex-shrink: 0;
    margin-left: 6px;
    position: relative;
    z-index: 1;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    /* nhô ra khỏi bounding box của title-wrap */
    overflow: visible;
}

/* stick.png — đường dọc, chiều cao tự nhiên của ảnh */
.csks-title-dot img:first-child {
    display: block;
    width: auto;
    height: auto;
    max-width: 4px;
}

/* tickchiaseduan.png — tick tròn, đặt tuyệt đối lên trên đầu stick */
.csks-title-dot img:last-child {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.csks-top-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Mỗi item là card bo tròn có viền màu */
.csks-top-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid #F5C6C6;
    background: #fff;
}

.csks-top-item:hover {
    border-color: #2ED8C3;
    box-shadow: 0 4px 27px 0 rgba(0, 255, 163, 0.26);
}

/* .csks-top-item--2 {
    border-color: #F5C6C6;
}

.csks-top-item--3 {
    border-color: #F5C6C6;
    opacity: 0.7;
} */

.csks-rank {
    flex-shrink: 0;
    width: 44px;
    display: flex;
    align-items: flex-start;
    padding-top: 2px;
}

.csks-rank-num {
    font-family: 'Google Sans', sans-serif;
    font-weight: 700;
    font-size: 28px;
    line-height: 1;
}

.csks-top-item--1 .csks-rank-num {
    color: #14313A;
}

.csks-top-item--2 .csks-rank-num {
    color: #14313A;
    opacity: 0.45;
}

.csks-top-item--3 .csks-rank-num {
    color: #14313A;
    opacity: 0.3;
}

.csks-top-item-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.csks-top-title {
    font-family: 'Google Sans', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #262626;
    line-height: 1.4;
    margin: 0;
}

.csks-top-item:hover .csks-top-title {
    background: var(--gradient, linear-gradient(90deg, #19D08E 0%, #26FFB1 100%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.csks-view-detail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Google Sans', sans-serif;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    white-space: nowrap;
}

.csks-view-detail svg {
    flex-shrink: 0;
}

/* --- Newcomer widget --- */
.csks-newcomer {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.csks-newcomer-header {
    background: #C7EBEE;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 72px;
}

.csks-newcomer-flag-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1C338E;
    display: flex;
    align-items: center;
    justify-content: center;
}

.csks-newcomer-title {
    font-family: 'Google Sans', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #1C338E;
    margin: 0;
    line-height: 1.3;
}

.csks-newcomer-body {
    padding: 16px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fff;
    border-bottom: 1px solid #30E0FF;
    border-left: 1px solid #30E0FF;
    border-right: 1px solid #30E0FF;
    border-radius: 0 0 12px 12px;
}

.csks-newcomer-item {
    font-family: 'Google Sans', sans-serif;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px 0;
}

.csks-newcomer-link {
    font-size: 15px;
    font-weight: 400;
    color: #3a3a3a;
    line-height: 1.5;
    text-decoration: none;
    transition: all 0.2s ease;
    display: block;
}

.csks-newcomer-icon {
    display: none;
    flex-shrink: 0;
    margin-top: 4px;
}

.csks-newcomer-bullet {
    flex-shrink: 0;
    color: #888;
}

/* Hover & Active Styles */
.csks-newcomer-item:hover .csks-newcomer-link,
.csks-newcomer-item--active .csks-newcomer-link {
    color: #1C338E;
    font-weight: 700;
    font-size: 17px;
}

.csks-newcomer-item:hover .csks-newcomer-icon,
.csks-newcomer-item--active .csks-newcomer-icon {
    display: block;
}

.csks-newcomer-item:hover .csks-newcomer-bullet,
.csks-newcomer-item--active .csks-newcomer-bullet {
    display: none;
}

/* If user hovers over the list, the default active item reverts unless hovered */
.csks-newcomer-body:hover .csks-newcomer-item--active:not(:hover) .csks-newcomer-link {
    font-weight: 400;
    font-size: 15px;
    color: #3a3a3a;
}
.csks-newcomer-body:hover .csks-newcomer-item--active:not(:hover) .csks-newcomer-icon {
    display: none;
}
.csks-newcomer-body:hover .csks-newcomer-item--active:not(:hover) .csks-newcomer-bullet {
    display: block;
}

/* --- Banner image widget --- */
.csks-banner-img {
    overflow: hidden;
}

.csks-banner-img img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Expert card widget --- */
.csks-expert-card {
    overflow: hidden;
    position: relative;
    background: linear-gradient(180deg, #0D4A5C 0%, #14313A 100%);
    border-radius: 16px;
    display: block;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a.csks-expert-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.csks-expert-img {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    position: relative;
}

.csks-expert-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.csks-expert-info {
    padding: 16px 20px 20px;
    background: transparent;
    position: relative;
}

.csks-expert-name {
    font-family: 'Google Sans', sans-serif;
    font-weight: 700;
    font-size: 20px;
    color: #26FFB1;
    margin: 0 0 4px;
}

.csks-expert-role {
    font-family: 'Google Sans', sans-serif;
    font-size: 13px;
    color: #26FFB1;
    opacity: 0.85;
    margin: 0 0 10px;
}

.csks-expert-divider {
    height: 1.5px;
    background: #F28181;
    width: 100%;
    margin-bottom: 10px;
}

.csks-expert-desc {
    font-family: 'Google Sans', sans-serif;
    font-size: 14px;
    color: #26FFB1;
    opacity: 0.8;
    margin: 0;
    line-height: 1.6;
}

.csks-expert-rotate-icon {
    position: absolute;
    bottom: 38px;
    right: 14px;
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Expert avatar row */
.csks-expert-author {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
}

.csks-expert-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.1);
}

.csks-expert-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =============================================
   RESPONSIVE STYLES
   ============================================= */

/* Tablet — max-width: 1024px */
@media (max-width: 1024px) {

    /* Hero */
    .csk-hero {
        height: auto;
        min-height: 360px;
    }

    .csk-hero-title {
        font-size: 36px;
        letter-spacing: -1.5px;
        margin-top: 28px;
    }

    .csk-hero-content {
        padding-top: 24px;
        padding-bottom: 28px;
    }

    .csk-tag {
        font-size: 16px;
        padding: 4px 24px;
    }

    /* Intro */
    .csk-intro-section {
        padding: 40px 0 36px;
    }

    .csk-intro-text {
        max-width: 100%;
        font-size: 22px;
    }

    .csk-intro-wrap {
        gap: 28px;
    }

    /* Section */
    .csk-section {
        padding: 0 0 40px;
    }

    .csk-section-heading {
        margin-bottom: 24px;
    }

    .csk-featured-title {
        font-size: 22px;
    }

    /* Grid */
    .csk-grid {
        gap: 24px 28px;
        margin-bottom: 36px;
    }

    .csk-card-author {
        font-size: 15px;
    }

    .csk-card-title {
        font-size: 17px;
    }

    /* Layout: stack main + sidebar */
    .csk-content-wrap {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Sidebar: 2 cột ngang */
    .csk-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        align-items: start;
    }

    .csks-expert-img {
        aspect-ratio: 4 / 3;
    }

    .dt-page-current {
        font-size: 26px;
    }
}

/* Mobile — max-width: 768px */
@media (max-width: 768px) {

    /* Hero */
    .csk-hero {
        height: auto;
        min-height: 280px;
    }

    .csk-hero-title {
        font-size: 26px;
        letter-spacing: -0.8px;
        margin-top: 20px;
    }

    .csk-hero-content {
        padding-top: 18px;
        padding-bottom: 22px;
    }

    .csk-breadcrumb {
        font-size: 13px;
    }

    /* Tags */
    .csk-tags-row {
        gap: 8px;
        margin-top: 18px;
    }

    .csk-tag {
        font-size: 14px;
        padding: 4px 16px;
    }

    /* Search bar */
    .csk-search-bar {
        width: 100%;
        padding: 8px 12px 8px 20px;
    }

    /* Intro */
    .csk-intro-section {
        padding: 28px 0 24px;
    }

    .csk-intro-text {
        font-size: 17px;
    }

    .csk-intro-wrap {
        gap: 20px;
    }

    /* Section */
    .csk-section {
        padding: 0 0 28px;
    }

    .csk-section-heading {
        margin-bottom: 16px;
    }

    .csk-section-title {
        font-size: 16px;
    }

    .csk-featured-title {
        font-size: 18px;
    }

    .csk-atag {
        font-size: 12px;
    }

    /* Grid: 1 cột */
    .csk-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 24px;
    }

    .csk-card-thumb img {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .csk-card-author {
        font-size: 14px;
        margin: 8px 0;
    }

    .csk-card-title {
        font-size: 16px;
    }

    /* Banner ad */
    .csk-banner-ad {
        border-radius: 12px;
        margin-bottom: 32px;
    }

    .csk-banner-ad img {
        height: auto;
        aspect-ratio: 16 / 5;
        border-radius: 12px;
    }

    .csk-banner-bottom img {
        height: auto;
    }

    .csk-banner-bottom {
        margin-bottom: 20px;
    }

    /* Sidebar: 1 cột */
    .csk-sidebar {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .csks-expert-img {
        aspect-ratio: 16 / 9;
    }

    .csks-top-item {
        padding: 12px 14px;
        gap: 10px;
    }

    .csks-rank-num {
        font-size: 22px;
    }

    .csks-top-title {
        font-size: 14px;
    }

    /* Pagination */
    .dt-page-current {
        font-size: 22px;
    }

    .dt-page-total {
        font-size: 15px;
    }

    .csk-page-info {
        font-size: 24px;
    }

    .csk-pagination {
        margin: 32px 0;
    }
}

/* Small phones — max-width: 480px */
@media (max-width: 480px) {

    .csk-hero {
        min-height: 220px;
    }

    .csk-hero-title {
        font-size: 20px;
        letter-spacing: -0.3px;
        margin-top: 12px;
    }

    .csk-hero-content {
        padding-top: 12px;
        padding-bottom: 16px;
    }

    .csk-tags-row {
        gap: 6px;
        margin-top: 10px;
    }

    .csk-tag {
        font-size: 12px;
        padding: 3px 12px;
    }

    .csk-intro-text {
        font-size: 15px;
    }

    .csk-search-bar {
        padding: 7px 10px 7px 16px;
    }

    .csk-search-input {
        font-size: 14px;
    }

    .csk-featured-title {
        font-size: 15px;
    }

    .csk-card-title {
        font-size: 14px;
    }

    .csk-card-author {
        font-size: 13px;
    }

    .csks-widget-title {
        font-size: 15px;
    }

    .csks-newcomer-title {
        font-size: 15px;
    }

    .csks-newcomer-lead {
        font-size: 14px;
    }

    .csks-newcomer-sub {
        font-size: 13px;
    }

    .csks-expert-name {
        font-size: 17px;
    }

    .csks-expert-role,
    .csks-expert-desc {
        font-size: 13px;
    }
}