/* =============================================
   DearLove - Theme Variables (Dark / Light Mode)
   ============================================= */

:root,
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f8f8;
    --bg-tertiary: #f0f0f0;
    --bg-card: #ffffff;
    --bg-navbar: #f8f8f8;
    --bg-dropdown: #ffffff;
    --bg-input: #ffffff;
    --bg-hover: #e8e8e8;

    /* Aliases dùng trong Tailwind navbar */
    --navbar-bg: var(--bg-navbar);
    --dropdown-bg: var(--bg-dropdown);
    --hover-bg: var(--bg-hover);
    --input-bg: var(--bg-input);
    --link-color: var(--text-link);

    --text-primary: #333333;
    --text-secondary: #555555;
    --text-muted: #777777;
    --text-link: #428bca;
    --text-link-hover: #2a6496;
    --text-navbar: #777777;
    --text-navbar-hover: #333333;

    --border-color: #e7e7e7;
    --border-input: #cccccc;
    --border-navbar: #e7e7e7;

    --accent-primary: #f062a1;
    --accent-secondary: #428bca;

    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-navbar: 0 1px 3px rgba(0, 0, 0, 0.08);

    --pagination-bg: #ffffff;
    --pagination-border: #dddddd;
    --pagination-active-bg: #428bca;
    --pagination-active-color: #ffffff;

    --list-row-even: rgba(0, 0, 0, 0.02);
    --title-list-border: #e7e7e7;
    --title-list-color: #333333;

    --footer-bg: #f8f8f8;
    --footer-border: #e7e7e7;
    --footer-text: #4e4e4e;

    --chapter-bg: transparent;
    --chapter-text: #333333;
    --chapter-title-color: #f062a1;
    --chapter-nav-bg: rgba(0, 0, 0, 0.04);
    --chapter-nav-border: #dddddd;
    --chapter-nav-btn-bg: #f0f0f0;
    --chapter-nav-btn-border: #cccccc;
    --chapter-nav-btn-color: #333333;
    --chapter-nav-input-bg: #ffffff;

    --label-full-color: #86ad86;
    --label-hot-color: #fd8383;
    --label-new-color: #8eb3fd;

    /* Article detail hero — light mode */
    --hero-bg: #fdf6ee;
    --hero-text: #1a1203;
    --hero-text-secondary: rgba(30, 20, 5, 0.82);
    --hero-text-muted: rgba(30, 20, 5, 0.52);
    --hero-text-desc: rgba(30, 20, 5, 0.72);
    --hero-text-stats: rgba(30, 20, 5, 0.68);
    --hero-text-icon: rgba(30, 20, 5, 0.5);
    --hero-link: #1a1203;
    --hero-chip-bg: rgba(240, 98, 161, 0.1);
    --hero-chip-border: rgba(240, 98, 161, 0.28);
    --hero-chip-color: #c0306a;
    --hero-btn-bg: rgba(0, 0, 0, 0.05);
    --hero-btn-border: rgba(0, 0, 0, 0.14);
    --hero-btn-color: rgba(30, 20, 5, 0.88);
    --hero-btn-hover-bg: rgba(0, 0, 0, 0.09);
    --hero-btn-muted-bg: rgba(0, 0, 0, 0.06);
    --hero-btn-muted-border: rgba(0, 0, 0, 0.12);
    --hero-btn-ghost-bg: rgba(0, 0, 0, 0.02);
    --hero-subaction-color: rgba(30, 20, 5, 0.58);
    --hero-subaction-hover: rgba(30, 20, 5, 0.88);
    --hero-avatar-bg: rgba(0, 0, 0, 0.08);
    --hero-avatar-border: rgba(0, 0, 0, 0.1);
    --hero-cover-border: rgba(0, 0, 0, 0.08);
    --hero-rating-value: rgba(30, 20, 5, 0.88);

    /* Article detail infobar */
    --infobar-bg: #f6efe8;
    --infobar-border: rgba(0, 0, 0, 0.06);
    --infobar-tab-bg: rgba(255, 255, 255, 0.7);
    --infobar-tab-border: rgba(0, 0, 0, 0.06);
    --infobar-tab-color: rgba(0, 0, 0, 0.72);
    --infobar-tab-hover-color: rgba(0, 0, 0, 0.88);
    --infobar-tab-hover-bg: rgba(255, 255, 255, 0.92);
    --infobar-tab-active-bg: #4e4e4e;
    --infobar-tab-active-color: #ffffff;
    --infobar-meta-color: rgba(0, 0, 0, 0.68);
    --infobar-meta-strong: rgba(0, 0, 0, 0.78);
    --infobar-divider: rgba(0, 0, 0, 0.06);

    --transition:
        color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

[data-theme="dark"] {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --bg-card: #1e2a3a;
    --bg-navbar: #16213e;
    --bg-dropdown: #1e2a3a;
    --bg-input: #243447;
    --bg-hover: #243447;

    /* Aliases dùng trong Tailwind navbar */
    --navbar-bg: var(--bg-navbar);
    --dropdown-bg: var(--bg-dropdown);
    --hover-bg: var(--bg-hover);
    --input-bg: var(--bg-input);
    --link-color: var(--text-link);

    --text-primary: rgba(255, 255, 255, 0.87);
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --text-link: #7eb8e8;
    --text-link-hover: #a8d0f0;
    --text-navbar: rgba(255, 255, 255, 0.7);
    --text-navbar-hover: #ffffff;

    --border-color: #2d4a6a;
    --border-input: #2d4a6a;
    --border-navbar: #1a2d42;

    --accent-primary: #f062a1;
    --accent-secondary: #7eb8e8;

    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    --shadow-navbar: 0 1px 4px rgba(0, 0, 0, 0.5);

    --pagination-bg: #1e2a3a;
    --pagination-border: #2d4a6a;
    --pagination-active-bg: #f062a1;
    --pagination-active-color: #ffffff;

    --list-row-even: rgba(255, 255, 255, 0.03);
    --title-list-border: #2d4a6a;
    --title-list-color: #ffffff;

    --footer-bg: #16213e;
    --footer-border: #1a2d42;
    --footer-text: rgba(255, 255, 255, 0.6);

    --chapter-bg: transparent;
    --chapter-text: rgba(255, 255, 255, 0.87);
    --chapter-title-color: #f062a1;
    --chapter-nav-bg: rgba(255, 255, 255, 0.04);
    --chapter-nav-border: #2d4a6a;
    --chapter-nav-btn-bg: #243447;
    --chapter-nav-btn-border: #2d4a6a;
    --chapter-nav-btn-color: rgba(255, 255, 255, 0.87);
    --chapter-nav-input-bg: #243447;

    --label-full-color: #86ad86;
    --label-hot-color: #fd8383;
    --label-new-color: #8eb3fd;

    /* Article detail hero — dark mode keeps the same dark look */
    --hero-bg: #0f1923;
    --hero-text: #ffffff;
    --hero-text-secondary: rgba(255, 255, 255, 0.85);
    --hero-text-muted: rgba(255, 255, 255, 0.55);
    --hero-text-desc: rgba(255, 255, 255, 0.75);
    --hero-text-stats: rgba(255, 255, 255, 0.7);
    --hero-text-icon: rgba(255, 255, 255, 0.6);
    --hero-link: rgba(255, 255, 255, 0.92);
    --hero-chip-bg: rgba(255, 185, 65, 0.14);
    --hero-chip-border: rgba(255, 185, 65, 0.25);
    --hero-chip-color: rgba(255, 255, 255, 0.9);
    --hero-btn-bg: rgba(255, 255, 255, 0.06);
    --hero-btn-border: rgba(255, 255, 255, 0.12);
    --hero-btn-color: rgba(255, 255, 255, 0.9);
    --hero-btn-hover-bg: rgba(255, 255, 255, 0.09);
    --hero-btn-muted-bg: rgba(255, 255, 255, 0.08);
    --hero-btn-muted-border: rgba(255, 255, 255, 0.14);
    --hero-btn-ghost-bg: rgba(255, 255, 255, 0.02);
    --hero-subaction-color: rgba(255, 255, 255, 0.65);
    --hero-subaction-hover: rgba(255, 255, 255, 0.92);
    --hero-avatar-bg: rgba(255, 255, 255, 0.12);
    --hero-avatar-border: rgba(255, 255, 255, 0.1);
    --hero-cover-border: rgba(255, 255, 255, 0.06);
    --hero-rating-value: rgba(255, 255, 255, 0.92);

    /* Article detail infobar — dark mode */
    --infobar-bg: #16213e;
    --infobar-border: rgba(255, 255, 255, 0.06);
    --infobar-tab-bg: rgba(255, 255, 255, 0.06);
    --infobar-tab-border: rgba(255, 255, 255, 0.08);
    --infobar-tab-color: rgba(255, 255, 255, 0.7);
    --infobar-tab-hover-color: rgba(255, 255, 255, 0.92);
    --infobar-tab-hover-bg: rgba(255, 255, 255, 0.1);
    --infobar-tab-active-bg: #f062a1;
    --infobar-tab-active-color: #ffffff;
    --infobar-meta-color: rgba(255, 255, 255, 0.6);
    --infobar-meta-strong: rgba(255, 255, 255, 0.8);
    --infobar-divider: rgba(255, 255, 255, 0.06);

    --transition:
        color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

/* =============================================
   Base overrides using CSS variables
   ============================================= */

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

a {
    color: var(--text-link);
}

a:hover,
a:focus {
    color: var(--text-link-hover);
}

.header-logo {
    color: var(--accent-primary) !important;
    font-weight: 700;
    text-decoration: none !important;
}

/* Search form (Bootstrap compat for non-Tailwind pages) */
.form-control {
    background-color: var(--bg-input);
    border-color: var(--border-input);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-control:focus {
    background-color: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--accent-secondary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Lists */
.list > .row:nth-child(2n) {
    background-color: var(--list-row-even);
}

.list > .row > div {
    border-left-color: var(--border-color);
    border-bottom-color: var(--border-color);
}

.title-list,
.title-list > h2,
.title-list > h4 {
    border-bottom-color: var(--title-list-border);
    color: var(--title-list-color);
}

.title-list > h2 > a,
.title-list > h4 > a {
    color: var(--title-list-color);
}

/* Pagination (Bootstrap compat) */
.pagination > li > a,
.pagination > li > span {
    background-color: var(--pagination-bg);
    border-color: var(--pagination-border);
    color: var(--text-link);
}

.pagination > li > a:hover,
.pagination > li > span:hover {
    background-color: var(--bg-hover);
    border-color: var(--pagination-border);
    color: var(--text-primary);
}

.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover {
    background-color: var(--pagination-active-bg);
    border-color: var(--pagination-active-bg);
    color: var(--pagination-active-color);
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    border-top-color: var(--footer-border);
    color: var(--footer-text);
}

.footer a {
    color: var(--accent-secondary);
}

/* Chapter */
.chapter .truyen-title {
    color: var(--chapter-title-color);
}

.chapter .truyen-title svg {
    color: var(--chapter-title-color);
}

.chapter .chapter-title {
    color: var(--text-primary);
}

.chapter .chapter-c,
.chapter .chapter-c p,
.chapter .chapter-c * {
    color: var(--chapter-text) !important;
}

.chapter .chapter-nav {
    background-color: var(--chapter-nav-bg);
    border-color: var(--chapter-nav-border);
}

.chapter-nav .btn-group a {
    background-color: var(--chapter-nav-btn-bg);
    border-color: var(--chapter-nav-btn-border);
    color: var(--chapter-nav-btn-color);
}

.chapter-nav .btn-group a:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.chapter-nav .form-control {
    background-color: var(--chapter-nav-input-bg);
    border-color: var(--chapter-nav-btn-border);
    color: var(--chapter-nav-btn-color);
}

/* Article info */
.col-info-desc,
#list-chapter,
.comment-box {
    background: transparent;
}

.info-holder .info {
    border-right-color: var(--border-color);
}

.col-info-desc h3.title {
    border-bottom-color: var(--border-color);
    color: var(--text-primary);
}

/* Text colors */
.text-muted {
    color: var(--text-muted) !important;
}

/* Well (Bootstrap compat) */
.well {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Table */
table {
    color: var(--text-primary);
}

.table > thead > tr > th,
.table > tbody > tr > td {
    border-color: var(--border-color);
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: var(--list-row-even);
}

/* Alerts */
.alert {
    border-color: var(--border-color);
}

/* Breadcrumb */
.breadcrumb {
    background-color: var(--bg-secondary);
}

.breadcrumb > li + li::before {
    color: var(--text-muted);
}

/* =============================================
   Dark Mode Toggle Button
   ============================================= */

.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-navbar);
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

.theme-toggle-btn svg {
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.theme-toggle-btn .icon-sun {
    display: none;
}
.theme-toggle-btn .icon-moon {
    display: block;
}

[data-theme="dark"] .theme-toggle-btn .icon-sun {
    display: block;
}
[data-theme="dark"] .theme-toggle-btn .icon-moon {
    display: none;
}

/* =============================================
   Search results dropdown
   ============================================= */

.list-search-res {
    background-color: var(--bg-dropdown);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.list-search-res a {
    color: var(--text-primary);
}

.list-search-res a:hover {
    background-color: var(--bg-hover);
}

/* =============================================
   New select / filter
   ============================================= */

.new-select {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.filter a {
    color: var(--text-secondary);
}

.filter a.active {
    color: var(--text-primary);
}

/* =============================================
   Smooth transition for theme switch
   ============================================= */

*,
*::before,
*::after {
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

/* Exclude transitions that would look bad */
img,
.btn:active,
.pagination > .active > a {
    transition: none;
}

/* =============================================
   Navbar toggle button positioning fix (legacy - unused)
   ============================================= */

/* Logout button trong dropdown */
#logout button {
    background: none;
    border: none;
    padding: 3px 20px;
    width: 100%;
    text-align: left;
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
    line-height: 1.42857143;
    display: block;
}

#logout button:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

/* =============================================
   Article / Story list items
   ============================================= */

.list-truyen .row,
.list > .row {
    border-bottom: 1px solid var(--border-color);
}

.col-info-desc h3.title a,
.list h3 a,
.list h4 a {
    color: var(--text-primary);
}

.col-info-desc h3.title a:hover,
.list h3 a:hover {
    color: var(--accent-primary);
    text-decoration: none;
}

/* Chapter list */
.l-chapter .l-title {
    border-bottom-color: var(--border-color);
}

.l-chapter .l-title > h3 {
    border-bottom-color: var(--border-color);
    color: var(--text-primary);
}

.l-chapter a {
    color: var(--text-link);
}

/* =============================================
   Info section (article detail)
   ============================================= */

.info-holder .info {
    border-right: 1px dashed var(--border-color);
}

.desc .showmore a {
    color: var(--text-link);
    border-color: var(--border-color);
    background-color: var(--bg-secondary);
}

/* =============================================
   Wallet / Account pages
   ============================================= */

.single-page-inner .well {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* =============================================
   Fix list-group (search results)
   ============================================= */

[data-theme="dark"] .list-group-item {
    background-color: var(--bg-dropdown);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .list-group-item:hover {
    background-color: var(--bg-hover);
}

/* =============================================
   Fix text-888 (common muted text class)
   ============================================= */

.text-888 {
    color: var(--text-muted);
}

.text-888 a {
    color: var(--text-muted);
}

/* =============================================
   Fix hr dividers
   ============================================= */

hr {
    border-top-color: var(--border-color);
}

/* =============================================
   Article Detail Hero — theme-aware
   ============================================= */

.article-detail-hero {
    background: var(--hero-bg);
}

.article-detail-hero__cover img {
    border-color: var(--hero-cover-border);
}

.article-detail-hero__chip {
    background: var(--hero-chip-bg);
    border-color: var(--hero-chip-border);
    color: var(--hero-chip-color);
}

.article-detail-hero__title {
    color: var(--hero-text);
}

.article-detail-hero__byline {
    color: var(--hero-text-secondary);
}

.article-detail-hero__byline a {
    color: var(--hero-link);
}

.article-detail-hero__avatar {
    background: var(--hero-avatar-bg);
    border-color: var(--hero-avatar-border);
}

.article-detail-hero__rating-value {
    color: var(--hero-rating-value);
}

.article-detail-hero__rating-sub {
    color: var(--hero-text-muted);
}

.article-detail-hero__desc {
    color: var(--hero-text-desc);
}

.article-detail-hero__stats {
    color: var(--hero-text-stats);
}

.article-detail-hero__stats .fa {
    color: var(--hero-text-icon);
}

.article-btn {
    background: var(--hero-btn-bg);
    border-color: var(--hero-btn-border);
    color: var(--hero-btn-color);
}

.article-btn:hover,
.article-btn:focus {
    color: var(--hero-text);
    background: var(--hero-btn-hover-bg);
}

.article-btn--primary {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
}

.article-btn--primary:hover,
.article-btn--primary:focus {
    background: color-mix(in srgb, var(--accent-primary) 85%, #000);
    border-color: color-mix(in srgb, var(--accent-primary) 85%, #000);
    color: #ffffff;
}

.article-btn--muted {
    background: var(--hero-btn-muted-bg);
    border-color: var(--hero-btn-muted-border);
}

.article-btn--ghost {
    background: var(--hero-btn-ghost-bg);
    border-color: var(--hero-btn-border);
}

.article-detail-hero__subaction {
    color: var(--hero-subaction-color);
}

.article-detail-hero__subaction:hover,
.article-detail-hero__subaction:focus {
    color: var(--hero-subaction-hover);
}

/* =============================================
   Article Detail Infobar — theme-aware
   ============================================= */

.article-detail-infobar {
    background: var(--infobar-bg);
    border-color: var(--infobar-border);
}

.article-detail-infobar__tabs {
    border-bottom-color: var(--infobar-divider);
}

.article-detail-infobar__tab {
    background: var(--infobar-tab-bg);
    border-color: var(--infobar-tab-border);
    color: var(--infobar-tab-color);
}

.article-detail-infobar__tab:hover,
.article-detail-infobar__tab:focus {
    color: var(--infobar-tab-hover-color);
    background: var(--infobar-tab-hover-bg);
}

.article-detail-infobar__tab.is-active {
    background: var(--infobar-tab-active-bg);
    border-color: var(--infobar-tab-active-bg);
    color: var(--infobar-tab-active-color);
}

.article-detail-infobar__meta {
    color: var(--infobar-meta-color);
}

.article-detail-infobar__meta strong {
    color: var(--infobar-meta-strong);
}

/* =============================================
   Discover Section — Khám phá tác phẩm
   ============================================= */

#discover-section {
    padding-top: 40px;
    padding-bottom: 40px;
}

.discover-header {
    margin-bottom: 16px;
}

.discover-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-primary);
    margin-bottom: 6px;
}

.discover-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--accent-primary);
    margin: 0 0 20px;
    line-height: 1.2;
}

.section-title {
    background-image: url('../images/icon-site.png');
    background-size: 32px;
    background-position: left center;
    background-repeat: no-repeat;
    padding-left: 40px;
    color: var(--accent-primary);
}

.section-title * {
    color: var(--accent-primary);
}

/* Tabs */
.discover-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--bg-tertiary, #e8e8e8);
    margin-bottom: 28px;
}

.discover-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 8px 18px 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition:
        color 0.2s,
        border-color 0.2s;
}

.discover-tab:hover {
    color: var(--text-primary);
}

.discover-tab.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
    font-weight: 600;
}

/* Tab content */
.discover-tab-content {
    display: none;
}

.discover-tab-content.active {
    display: block;
}

/* Card grid — 6 columns on desktop */
.discover-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .discover-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 640px) {
    .discover-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* Card */
.discover-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s;
}

.discover-card:hover {
    transform: translateY(-4px);
    text-decoration: none;
    color: inherit;
}

.discover-card-img-wrap {
    width: 100%;
    aspect-ratio: 2 / 3;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-tertiary, #e0e0e0);
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.discover-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s;
}

.discover-card:hover .discover-card-img-wrap img {
    transform: scale(1.04);
}

.discover-card-info {
    padding: 0 2px;
}

.discover-card-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 3px;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.discover-card-author {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* "Xem thêm" button */
.discover-more-wrap {
    text-align: center;
    margin-top: 32px;
}

.discover-more-btn {
    display: inline-block;
    padding: 10px 32px;
    border: 1.5px solid var(--accent-primary);
    border-radius: 999px;
    color: var(--accent-primary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition:
        background 0.18s,
        color 0.18s;
}

.discover-more-btn:hover {
    background: var(--accent-primary);
    color: #fff;
    text-decoration: none;
}

/* =============================================
   Article List Page (index)
   ============================================= */

/* Hero */
.article-list-hero {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 48px 0 32px;
    text-align: center;
}

.article-list-hero__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: var(--accent-primary);
    background: rgba(240, 98, 161, 0.1);
    border: 1px solid rgba(240, 98, 161, 0.2);
    border-radius: 999px;
    padding: 4px 12px;
    margin-bottom: 16px;
}

.article-list-hero__title {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0 0 10px;
    line-height: 1.2;
}

.article-list-hero__desc {
    font-size: 15px;
    color: var(--text-muted);
    margin: 0 auto 16px;
    max-width: 560px;
    line-height: 1.6;
}

.article-list-hero__count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--accent-primary);
    font-weight: 500;
}

.article-list-hero__count strong {
    font-weight: 700;
}

/* Sort bar */
.article-list-sort-bar {
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
    position: sticky;
    top: 0;
    z-index: 10;
}

.article-list-sort-bar > div {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.article-list-sort-label {
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.article-list-sort-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.article-list-sort-tab {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s;
    white-space: nowrap;
}

.article-list-sort-tab:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    text-decoration: none;
}

.article-list-sort-tab.active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
    font-weight: 600;
}

/* Grid */
.article-list-section {
    padding-top: 32px;
    padding-bottom: 48px;
}

.article-list-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px 20px;
}

@media (max-width: 1024px) {
    .article-list-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .article-list-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px 12px;
    }
    .article-list-hero__title {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .article-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Card */
.article-card {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s;
}

.article-card:hover {
    transform: translateY(-4px);
    text-decoration: none;
    color: inherit;
}

.article-card__cover-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-tertiary);
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.article-card__cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s;
}

.article-card:hover .article-card__cover-wrap img {
    transform: scale(1.04);
}

/* Badges */
.article-card__badge {
    position: absolute;
    top: 8px;
    left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    line-height: 1.4;
}

.article-card__badge--premium {
    background: rgba(255, 185, 0, 0.92);
    color: #5a3a00;
    backdrop-filter: blur(4px);
}

.article-card__badge--completed {
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
    top: auto;
    bottom: 8px;
    left: 8px;
    backdrop-filter: blur(4px);
}

/* When both badges exist, offset completed */
.article-card__badge--premium ~ .article-card__badge--completed {
    top: auto;
    bottom: 8px;
}

/* Card info */
.article-card__info {
    padding: 0 2px;
}

.article-card__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-card:hover .article-card__title {
    color: var(--accent-primary);
}

.article-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.article-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.article-card__genres {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.article-card__genre-tag {
    font-size: 10px;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 1px 6px;
    white-space: nowrap;
}

/* Pagination */
.article-list-pagination {
    margin-top: 48px;
    padding-bottom: 16px;
}

.al-pag {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.al-pag__info {
    font-size: 13px;
    color: var(--text-muted);
}

.al-pag__info strong {
    color: var(--accent-primary);
    font-weight: 700;
}

.al-pag__nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.al-pag__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 6px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s;
}

.al-pag__num:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
    text-decoration: none;
}

.al-pag__num--active {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
    font-weight: 700;
    pointer-events: none;
}

.al-pag__ellipsis {
    font-size: 13px;
    color: var(--text-muted);
    padding: 0 2px;
    user-select: none;
}

.al-pag__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: 34px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background: var(--accent-primary);
    border: 1.5px solid var(--accent-primary);
    text-decoration: none;
    transition:
        background 0.15s,
        opacity 0.15s;
    white-space: nowrap;
}

.al-pag__btn:hover {
    background: color-mix(in srgb, var(--accent-primary) 85%, #000);
    color: #ffffff;
    text-decoration: none;
}

.al-pag__btn--disabled {
    opacity: 0.35;
    pointer-events: none;
    cursor: default;
}

@media (max-width: 640px) {
    .al-pag {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* =============================================
   Hot Ranking Section — Được đọc nhiều nhất
   ============================================= */

#hot-section {
    padding-top: 40px;
    padding-bottom: 40px;
}

/* Layout: hero left, mid cards top-right, list rows bottom-right */
.hot-ranking {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
}

/* Right column: stacks mid-row + list-col vertically */
.hot-right-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Mid row: 2 cards side by side */
.hot-mid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* List col: stacked rows */
.hot-list-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Hero card (rank 1) — left column */
.hot-hero-card {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-card);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.hot-hero-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
    text-decoration: none;
    color: inherit;
}

.hot-hero-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    flex-shrink: 0;
}

.hot-hero-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.hot-hero-card:hover .hot-hero-cover img {
    transform: scale(1.04);
}

.hot-hero-info {
    padding: 14px 16px 16px;
    flex: 1;
}

.hot-hero-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.3;
}

.hot-hero-card:hover .hot-hero-title {
    color: var(--accent-primary);
}

.hot-hero-author {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 8px;
}

.hot-hero-genres {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.hot-genre-tag {
    font-size: 10px;
    color: var(--accent-primary);
    background: rgba(240, 98, 161, 0.1);
    border: 1px solid rgba(240, 98, 161, 0.2);
    border-radius: 4px;
    padding: 2px 7px;
}

.hot-hero-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mid cards (rank 2-3) — top-right, side by side */
.hot-mid-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    background: var(--bg-card);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition:
        transform 0.18s,
        box-shadow 0.18s;
}

.hot-mid-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
    text-decoration: none;
    color: inherit;
}

.hot-mid-cover {
    position: relative;
    width: 72px;
    flex-shrink: 0;
    aspect-ratio: 2 / 3;
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.hot-mid-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s;
}

.hot-mid-card:hover .hot-mid-cover img {
    transform: scale(1.05);
}

.hot-mid-info {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.hot-mid-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hot-mid-card:hover .hot-mid-title {
    color: var(--accent-primary);
}

.hot-mid-author {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

/* List rows (rank 4+) — bottom-right */
.hot-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--bg-card);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition:
        background 0.15s,
        transform 0.15s;
}

.hot-list-row:hover {
    background: var(--bg-hover);
    transform: translateX(3px);
    text-decoration: none;
    color: inherit;
}

.hot-list-rank {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-muted);
    width: 28px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1;
}

.hot-list-thumb {
    width: 44px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.hot-list-info {
    flex: 1;
    min-width: 0;
}

.hot-list-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hot-list-row:hover .hot-list-title {
    color: var(--accent-primary);
}

.hot-list-author {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

/* Rank badges */
.hot-rank-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    z-index: 2;
}

.hot-rank-1 {
    background: linear-gradient(135deg, #f5a623, #e8471a);
    color: #fff;
    box-shadow: 0 2px 8px rgba(232, 71, 26, 0.5);
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.hot-rank-2 {
    background: linear-gradient(135deg, #b0bec5, #78909c);
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.hot-rank-3 {
    background: linear-gradient(135deg, #ffb74d, #e65100);
    color: #fff;
    box-shadow: 0 2px 6px rgba(230, 81, 0, 0.35);
}

.hot-rank-n {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Hot section — Splide grid (2 hàng) + article-card */
.hot-grid-slider-wrap {
    position: relative;
}

.hot-grid-slider.splide {
    position: relative;
}

.hot-grid-slider .splide__slide {
    height: auto;
}

.hot-slide-card-wrap {
    position: relative;
    height: 100%;
}

.hot-slide-card-wrap .hot-rank-badge {
    left: auto;
    right: 8px;
}

.hot-slide-card-wrap .ac {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Feature & Hot grid: ẩn prev/next khi không đủ item cuộn; hover (hoặc focus) mới hiện */
.feature-slider:not(.is-overflow) .splide__arrows,
.hot-grid-slider:not(.is-overflow) .splide__arrows {
    display: none !important;
}

@media (hover: hover) and (pointer: fine) {
    .feature-slider.is-overflow .splide__arrows,
    .hot-grid-slider.is-overflow .splide__arrows {
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease;
    }

    .feature-slider.is-overflow:hover .splide__arrows,
    .feature-slider.is-overflow:focus-within .splide__arrows,
    .hot-grid-slider.is-overflow:hover .splide__arrows,
    .hot-grid-slider.is-overflow:focus-within .splide__arrows {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (hover: none), (pointer: coarse) {
    .feature-slider.is-overflow .splide__arrows,
    .hot-grid-slider.is-overflow .splide__arrows {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Completed badge on hero */
.hot-completed-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
    backdrop-filter: blur(4px);
}

/* Responsive */
@media (max-width: 768px) {
    .hot-ranking {
        grid-template-columns: 1fr;
    }

    .hot-hero-card {
        grid-row: auto;
        flex-direction: row;
        max-height: 160px;
    }

    .hot-hero-cover {
        width: 110px;
        aspect-ratio: auto;
        height: 160px;
    }

    .hot-hero-desc {
        display: none;
    }

    .hot-mid-row {
        grid-template-columns: 1fr 1fr;
    }
}

/* =============================================
   Discover card — Full badge (completed section)
   ============================================= */

.discover-card-full-badge {
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 0;
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
    backdrop-filter: blur(4px);
}

#completed-section {
    padding-top: 40px;
    padding-bottom: 48px;
}

/* =============================================
   Genres & Themes Section — Thể loại & Chủ đề
   ============================================= */

#genres-section {
    padding-top: 40px;
    padding-bottom: 40px;
}

.genres-tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.genre-tag {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s;
    white-space: nowrap;
}

.genre-tag:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(240, 98, 161, 0.06);
    text-decoration: none;
}

/* Active = show_on_home = true */
.genre-tag--active {
    color: var(--accent-primary);
    background: rgba(240, 98, 161, 0.08);
    border-color: rgba(240, 98, 161, 0.35);
    font-weight: 600;
}

.genre-tag--active:hover {
    background: rgba(240, 98, 161, 0.15);
    border-color: var(--accent-primary);
}

/* =============================================
   Article Card — Atomic Component (.ac)
   ============================================= */

.ac {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s;
}

.ac:hover {
    transform: translateY(-4px);
    text-decoration: none;
    color: inherit;
}

/* Cover */
.ac__cover {
    position: relative;
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-tertiary);
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.13);
}

.ac__cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s;
}

.ac:hover .ac__cover img {
    transform: scale(1.04);
}

/* Badges */
.ac__badge {
    position: absolute;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 999px;
    line-height: 1.4;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    backdrop-filter: blur(4px);
}

.ac__badge--premium {
    top: 7px;
    left: 7px;
    background: rgba(255, 185, 0, 0.92);
    color: #5a3a00;
}

.ac__badge--full {
    bottom: 7px;
    left: 7px;
    background: rgba(16, 185, 129, 0.9);
    color: #fff;
}

/* Info block */
.ac__info {
    padding: 0 2px;
}

.ac__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ac:hover .ac__title {
    color: var(--accent-primary);
}

/* Stats row: chapters + views */
.ac__stats {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.ac__stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.ac__stat svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Genre tags */
.ac__genres {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.ac__genre {
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 2px 9px;
    white-space: nowrap;
    transition:
        background 0.15s,
        color 0.15s;
}

.ac:hover .ac__genre {
    background: rgba(240, 98, 161, 0.07);
    border-color: rgba(240, 98, 161, 0.25);
    color: var(--accent-primary);
}

/* ===== MANGA SLIDER ===== */

/* Theme variables */
:root,
[data-theme="light"] {
    --sl-bg: #f0f0f2;
    --sl-fade-color: #f0f0f2;
}
[data-theme="dark"] {
    --sl-bg: #111827;
    --sl-fade-color: #111827;
}

#manga-slider {
    padding: 0;
    position: relative;
}

/* Outer wrapper: full width, fixed height, clips overflow */
.sl-wrapper {
    position: relative;
    width: 100%;
    height: 340px;
    overflow: hidden;
    background-color: var(--sl-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Faint background texture image */
.sl-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.12;
    z-index: 0;
    pointer-events: none;
}

/* Left/right fade-out edges */
.sl-fade-left,
.sl-fade-right {
    position: absolute;
    top: 0;
    height: 100%;
    width: 220px;
    z-index: 3;
    pointer-events: none;
}
.sl-fade-left {
    left: 0;
    background: linear-gradient(
        to right,
        var(--sl-fade-color) 0%,
        transparent 100%
    );
}
.sl-fade-right {
    right: 0;
    background: linear-gradient(
        to left,
        var(--sl-fade-color) 0%,
        transparent 100%
    );
}

/* Stage: positions the 3 cards relative to each other */
.sl-stage {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    /* enough width to contain the fanned cards */
    width: 820px;
    height: 100%;
}

/* Base card */
.sl-card {
    position: absolute;
    flex-shrink: 0;
}

.sl-card a {
    display: block;
}

/* Landscape image — all cards same base ratio ~16:9 */
.sl-card .slide-img {
    display: block;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.38);
    transition: transform 0.25s ease;
}

.sl-card a:hover .slide-img {
    transform: scale(1.02);
    cursor: pointer;
}

/* LEFT card: smaller, tilted left, behind center */
.sl-card--left {
    z-index: 1;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) translateX(-260px) rotate(-12deg);
    transform-origin: bottom center;
}
.sl-card--left .slide-img {
    width: 340px;
    height: 200px;
}

/* CENTER card: largest, straight, on top */
.sl-card--center {
    z-index: 3;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.sl-card--center .slide-img {
    width: 400px;
    height: 240px;
}

/* RIGHT card: smaller, tilted right, behind center */
.sl-card--right {
    z-index: 1;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) translateX(260px) rotate(12deg);
    transform-origin: bottom center;
}
.sl-card--right .slide-img {
    width: 340px;
    height: 200px;
}

/* Tag label — sits above the center card image, top-left aligned */
.sl-tag {
    margin-bottom: 6px;
    line-height: 1.15;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 0.03em;
    padding-left: 2px;
}
.sl-tag__sub {
    display: inline;
    font-size: 13px;
    color: var(--text-secondary);
    margin-right: 4px;
}
.sl-tag__main {
    display: inline;
    font-size: 20px;
    color: var(--accent-primary);
}

/* Splide arrow buttons — outside the stage */
.splide__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition:
        background 0.2s,
        border-color 0.2s,
        color 0.2s;
    opacity: 1;
}
.splide__arrow--prev {
    left: 16px;
}
.splide__arrow--next {
    right: 16px;
}
.splide__arrow:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #fff;
}
.splide__arrow svg {
    display: none;
}

/* Tablet ≤ 991px */
@media (max-width: 991px) {
    .sl-wrapper {
        height: 280px;
    }
    .sl-stage {
        width: 680px;
    }
    .sl-card--left .slide-img,
    .sl-card--right .slide-img {
        width: 280px;
        height: 165px;
    }
    .sl-card--center .slide-img {
        width: 330px;
        height: 195px;
    }
    .sl-card--left {
        transform: translate(-50%, -50%) translateX(-210px) rotate(-12deg);
    }
    .sl-card--right {
        transform: translate(-50%, -50%) translateX(210px) rotate(12deg);
    }
    .sl-fade-left,
    .sl-fade-right {
        width: 140px;
    }
}

/* Small tablet ≤ 768px */
@media (max-width: 768px) {
    .sl-wrapper {
        height: 240px;
    }
    .sl-bg-img {
        display: none;
    }
    .sl-stage {
        width: 560px;
    }
    .sl-card--left .slide-img,
    .sl-card--right .slide-img {
        width: 220px;
        height: 130px;
    }
    .sl-card--center .slide-img {
        width: 270px;
        height: 160px;
    }
    .sl-card--left {
        transform: translate(-50%, -50%) translateX(-170px) rotate(-12deg);
    }
    .sl-card--right {
        transform: translate(-50%, -50%) translateX(170px) rotate(12deg);
    }
    .sl-fade-left,
    .sl-fade-right {
        width: 80px;
    }
    .sl-tag__main {
        font-size: 16px;
    }
}

/* Mobile ≤ 575px */
@media (max-width: 575px) {
    .sl-wrapper {
        height: 200px;
    }
    .sl-card--left,
    .sl-card--right {
        display: none;
    }
    .sl-card--center {
        transform: translate(-50%, -50%);
    }
    .sl-card--center .slide-img {
        width: 300px;
        height: 175px;
    }
    .sl-fade-left,
    .sl-fade-right {
        width: 40px;
    }
    .splide__arrow {
        width: 30px;
        height: 30px;
    }
    .splide__arrow--prev {
        left: 6px;
    }
    .splide__arrow--next {
        right: 6px;
    }
}
