/* Loading placeholders follow the same shells and column widths as News pages. */
.news-list-page.is-loading,
.news-detail-page.is-loading {
    position: relative;
}

.news-list-page.is-loading > .news-list-shell,
.news-detail-page.is-loading > .news-detail-shell {
    visibility: hidden;
}

.news-page-skeleton {
    position: absolute;
    z-index: 5;
    inset: 0;
    display: block;
    padding: 104px 20px 76px;
    overflow: hidden;
    color: var(--news-text, #172b43);
    pointer-events: none;
}

.news-page-skeleton,
.news-page-skeleton * {
    box-sizing: border-box;
}

.news-page-skeleton .news-list-shell,
.news-page-skeleton .news-detail-shell {
    width: min(1120px, 100%);
    max-width: 100%;
    margin: 0 auto;
}

.news-sk-block {
    display: block;
    background: linear-gradient(90deg, #e8edf2 25%, #f5f7f9 40%, #e8edf2 65%);
    background-size: 400% 100%;
    animation: news-sk-shimmer 1.35s ease infinite;
}

@keyframes news-sk-shimmer {
    to { background-position: -100% 0; }
}

.news-page-skeleton .news-list-header,
.news-page-skeleton .news-search-panel,
.news-page-skeleton .news-list-panel,
.news-page-skeleton .news-article-card,
.news-page-skeleton .news-side-card {
    border: 1px solid var(--news-border, #d8e3ef);
    border-radius: 18px;
    background: #fff;
}

.news-page-skeleton .news-list-header,
.news-page-skeleton .news-detail-header {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 88px;
    margin-bottom: 16px;
    padding: 18px 20px;
}

.news-page-skeleton .news-detail-header > span,
.news-page-skeleton .news-list-header > span {
    display: grid;
    flex: 1;
    gap: 8px;
}

.news-sk-back { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; }
.news-sk-icon { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 13px; }
.news-sk-title { width: min(300px, 58%); height: 20px; border-radius: 7px; }
.news-sk-subtitle { width: min(420px, 74%); height: 12px; border-radius: 6px; }

.news-page-skeleton .news-search-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) auto;
    gap: 14px 18px;
    margin-bottom: 16px;
    padding: 15px 18px;
}
.news-sk-search { height: 44px; border: 1px solid #d8e3ef; border-radius: 12px; }
.news-sk-summary { width: 150px; height: 16px; align-self: center; border-radius: 6px; }
.news-sk-filters { display: flex; grid-column: 1 / -1; gap: 8px; }
.news-sk-filters i { width: 90px; height: 32px; border-radius: 10px; }

.news-page-skeleton .news-list-panel { overflow: hidden; }
.news-page-skeleton .news-list-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #e8edf3;
}
.news-page-skeleton .news-list-panel-heading > span { display: grid; flex: 1; gap: 8px; }
.news-sk-count { width: 36px; height: 30px; border-radius: 9px; }
.news-page-skeleton .news-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 16px; }
.news-sk-list-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 13px; min-height: 175px; padding: 12px; border: 1px solid #e5ebf1; border-radius: 14px; }
.news-sk-list-cover { width: 100%; height: 148px; border-radius: 10px; }
.news-sk-list-card > span { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 4px; }
.news-sk-meta-line { width: 68%; height: 10px; border-radius: 5px; }
.news-sk-card-title { width: 92%; height: 15px; margin-top: 3px; border-radius: 6px; }
.news-sk-card-copy { width: 100%; height: 10px; border-radius: 5px; }
.news-sk-card-copy-short { width: 72%; }
.news-sk-card-link { width: 92px; height: 12px; margin-top: auto; border-radius: 5px; }
.news-sk-pagination { display: flex; justify-content: center; gap: 8px; padding: 16px; border-top: 1px solid #edf1f5; }
.news-sk-pagination i { width: 34px; height: 34px; border-radius: 9px; }

.news-page-skeleton .news-detail-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr); gap: 20px; align-items: start; }
.news-page-skeleton .news-article-card { min-width: 0; padding: 24px; }
.news-sk-label { width: 92px; height: 26px; margin-bottom: 16px; border-radius: 9px; }
.news-sk-article-title { width: 82%; height: 28px; margin-bottom: 15px; border-radius: 8px; }
.news-sk-meta { display: flex; gap: 16px; margin-bottom: 20px; }
.news-sk-meta i { width: 170px; height: 13px; border-radius: 6px; }
.news-sk-cover { width: 100%; height: clamp(210px, 28vw, 390px); margin-bottom: 22px; border-radius: 15px; }
.news-sk-agenda { margin-bottom: 22px; padding: 18px; border: 1px solid #e5ebf1; border-radius: 14px; }
.news-sk-section-title { width: 190px; height: 17px; margin-bottom: 16px; border-radius: 6px; }
.news-sk-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.news-sk-detail-grid i { height: 40px; border-radius: 8px; }
.news-sk-copy { display: grid; gap: 12px; margin: 22px 0; }
.news-sk-copy i { width: 100%; height: 12px; border-radius: 5px; }
.news-sk-copy i:nth-child(3n) { width: 82%; }
.news-sk-gallery { margin-top: 26px; }
.news-sk-gallery > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.news-sk-gallery > div i { height: 130px; border-radius: 12px; }
.news-sk-sidebar { display: grid; gap: 14px; }
.news-page-skeleton .news-side-card { padding: 18px; }
.news-sk-side-title { width: 66%; height: 17px; margin-bottom: 18px; border-radius: 6px; }
.news-sk-side-line { width: 100%; height: 13px; margin-top: 12px; border-radius: 5px; }
.news-sk-side-line:last-child { width: 72%; }

body[data-theme="zavier"] .news-page-skeleton { padding: 2rem !important; }
body[data-theme="zavier"] .news-page-skeleton .news-list-shell,
body[data-theme="zavier"] .news-page-skeleton .news-detail-shell { width: min(1380px, 100%); }
body[data-theme="zavier"] .news-sk-block { background-image: linear-gradient(90deg, #e4edf1 25%, #f4f8f9 40%, #e4edf1 65%); }
body[data-theme="rain"] .news-sk-block { background-image: linear-gradient(90deg, #e4ece5 25%, #f5f8f5 40%, #e4ece5 65%); }
body[data-theme="finexy"] .news-sk-block { background-image: linear-gradient(90deg, #e4eaf5 25%, #f5f7fb 40%, #e4eaf5 65%); }

@media (max-width: 991px) {
    .news-page-skeleton .news-detail-layout { grid-template-columns: minmax(0, 1fr); }
    .news-page-skeleton .news-sk-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .news-page-skeleton .news-sk-sidebar .news-side-card:last-child { display: none; }
    .news-page-skeleton .news-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .news-page-skeleton { padding: 76px 12px 64px; }
    .news-page-skeleton .news-list-shell,
    .news-page-skeleton .news-detail-shell { width: 100%; }
    .news-page-skeleton .news-list-header,
    .news-page-skeleton .news-detail-header { min-height: 76px; gap: 9px; margin-bottom: 12px; padding: 12px; }
    .news-sk-back { width: 34px; height: 34px; flex-basis: 34px; }
    .news-sk-icon { width: 38px; height: 38px; flex-basis: 38px; }
    .news-sk-title { width: 68%; height: 17px; }
    .news-sk-subtitle { width: 88%; height: 10px; }
    .news-page-skeleton .news-search-panel { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 12px; padding: 12px; }
    .news-sk-summary { width: 125px; }
    .news-sk-filters { flex-wrap: wrap; }
    .news-sk-filters i { width: 75px; height: 29px; }
    .news-page-skeleton .news-list-panel-heading { padding: 14px; }
    .news-page-skeleton .news-card-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; padding: 10px; }
    .news-sk-list-card { grid-template-columns: 86px minmax(0, 1fr); min-height: 132px; gap: 10px; padding: 9px; }
    .news-sk-list-cover { height: 112px; }
    .news-sk-list-card > span { gap: 8px; }
    .news-sk-meta-line { width: 75%; height: 9px; }
    .news-sk-card-title { height: 13px; }
    .news-sk-card-copy { height: 9px; }
    .news-sk-card-link { height: 10px; }
    .news-page-skeleton .news-article-card { padding: 15px; }
    .news-sk-article-title { width: 96%; height: 21px; }
    .news-sk-meta { flex-wrap: wrap; gap: 8px; margin-bottom: 15px; }
    .news-sk-meta i { width: 130px; height: 11px; }
    .news-sk-cover { height: 210px; margin-bottom: 16px; }
    .news-sk-agenda { padding: 13px; }
    .news-sk-detail-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; }
    .news-sk-gallery > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .news-sk-gallery > div i { height: 100px; }
    .news-page-skeleton .news-sk-sidebar { grid-template-columns: minmax(0, 1fr); }
    .news-page-skeleton .news-sk-sidebar .news-side-card:last-child { display: block; }
    body[data-theme="rain"] .news-page-skeleton,
    body[data-theme="finexy"] .news-page-skeleton { padding-right: 5px; padding-left: 5px; }
    body[data-theme="zavier"] .news-page-skeleton { padding: 1.1rem 12px 6.5rem !important; }
}

@media (prefers-reduced-motion: reduce) {
    .news-sk-block { animation: none; }
}
