/* ==========================================================================
   FictionX Region — Public Site Styles
   Bootstrap 5 + Pure CSS

   --region-color is the single source. All brand shades are derived from it.
   ========================================================================== */

/* --- Font Loading --- */
@font-face {
    font-family: "ArabicFont";
    src: url("../fonts/arabic-font.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "EnglishFont";
    src: url("../fonts/english-font.ttf") format("truetype");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* --- Dynamic Theme Palette ---
   Pass ONE color (--region-color), get a full brand scale.
   Mapped to the brand naming: ice → sky → ocean → depth → midnight
   + a complementary accent (berry).
   ---------------------------------------------------------------- */
:root {
    /* Brand scale — derived from --region-color */
    --brand-ice:      color-mix(in oklch, var(--region-color) 20%, white);
    --brand-sky:      color-mix(in oklch, var(--region-color) 35%, white);
    --brand-ocean:    color-mix(in oklch, var(--region-color) 70%, white);
    --brand-depth:    var(--region-color);
    --brand-midnight: color-mix(in oklch, var(--region-color) 100%, black 30%);

    /* Accent — hue-rotated complement (purple-ish shift) */
    --brand-berry:    color-mix(in oklch, var(--region-color) 60%, #9b59b6);

    /* Accent gold (static — works with any base) */
    --accent-gold:       #D4A853;
    --accent-gold-light: #E8C678;
    --accent-gold-dark:  #B8913F;

    /* Surfaces */
    --surface-bg:     #f8f9fb;
    --surface-card:   #ffffff;
    --surface-muted:  color-mix(in srgb, var(--region-color) 4%, white);
    --text-primary:   var(--brand-midnight);
    --text-secondary: color-mix(in srgb, var(--brand-depth) 50%, #666);
}

/* --- Base --- */
body {
    font-family: "ArabicFont", "EnglishFont", sans-serif;
    background: var(--surface-bg);
    color: var(--text-primary);
}

/* --- Navbar --- */
.fx-navbar {
    padding: 0.75rem 0;
    background: var(--brand-depth);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
/* On home page, navbar starts transparent over hero */
.fx-home .fx-navbar {
    background: transparent;
}
.fx-navbar.scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}
.fx-navbar.scrolled .navbar-brand span,
.fx-navbar.scrolled .nav-link {
    color: var(--brand-depth) !important;
}
.fx-navbar.scrolled .nav-link:hover {
    color: var(--brand-ocean) !important;
}
.fx-navbar.scrolled .navbar-toggler {
    border-color: var(--brand-depth);
    color: var(--brand-depth);
}

/* --- Mobile collapsed navbar --- */
@media (max-width: 991.98px) {
    .fx-navbar .navbar-collapse {
        background: #fff;
        border-radius: 0.5rem;
        margin-top: 0.5rem;
        padding: 0.75rem 1rem;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }
    .fx-navbar .navbar-collapse .nav-link {
        color: var(--brand-depth) !important;
        font-weight: 600;
        padding: 0.5rem 0.75rem;
        border-radius: 0.375rem;
        transition: background 0.15s ease;
    }
    .fx-navbar .navbar-collapse .nav-link:hover,
    .fx-navbar .navbar-collapse .nav-link:focus {
        color: var(--brand-ocean) !important;
        background: rgba(0, 0, 0, 0.03);
    }
    .fx-navbar .navbar-collapse .navbar-brand span {
        color: var(--brand-depth) !important;
    }
}

/* --- Footer --- */
.fx-footer {
    background: var(--brand-midnight) !important;
    border-top: 3px solid var(--accent-gold);
    color: #fff;
}

/* --- Cards --- */
.fx-card {
    background: var(--surface-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.fx-card-header {
    background: var(--brand-depth);
    color: #fff;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
}
.fx-card-header:first-child {
    border-radius: 0.75rem 0.75rem 0 0;
}

/* --- Buttons using brand scale --- */
.btn-brand {
    background: var(--brand-ocean);
    border-color: var(--brand-ocean);
    color: #fff;
}
.btn-brand:hover {
    background: var(--brand-depth);
    border-color: var(--brand-depth);
    color: #fff;
}
.btn-brand-outline {
    border: 1px solid var(--brand-ocean);
    color: var(--brand-ocean);
    background: transparent;
}
.btn-brand-outline:hover {
    background: var(--brand-ocean);
    color: #fff;
}

/* --- Badge / Tag --- */
.badge-brand {
    background: var(--brand-ice);
    color: var(--brand-depth);
    font-weight: 600;
}
.badge-accent {
    background: var(--brand-berry);
    color: #fff;
}

/* --- Section headers --- */
.fx-section-title {
    color: var(--brand-depth);
    font-weight: 700;
    position: relative;
    padding-bottom: 0.5rem;
}
.fx-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 2px;
}

/* --- Links --- */
a {
    color: var(--brand-ocean);
}
a:hover {
    color: var(--brand-depth);
}

/* --- Empty State --- */
.fx-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}
.fx-empty-state i {
    font-size: 3rem;
    color: var(--brand-sky);
    margin-bottom: 1rem;
    display: block;
}

/* --- Utilities --- */
.text-brand       { color: var(--brand-depth) !important; }
.text-brand-light { color: var(--brand-ocean) !important; }
.text-brand-ice   { color: var(--brand-ice) !important; }
.text-accent      { color: var(--accent-gold) !important; }
.text-berry       { color: var(--brand-berry) !important; }
.bg-brand         { background: var(--brand-depth) !important; }
.bg-brand-light   { background: var(--brand-ice) !important; }
.bg-brand-ocean   { background: var(--brand-ocean) !important; }
.bg-brand-midnight{ background: var(--brand-midnight) !important; }
.bg-surface       { background: var(--surface-bg) !important; }
.bg-surface-muted { background: var(--surface-muted) !important; }
.border-brand     { border-color: var(--brand-ocean) !important; }
.border-gold      { border-color: var(--accent-gold) !important; }

/* ==========================================================================
   Home Page — Full Viewport, Theme BG, No Scroll
   ========================================================================== */

.fx-home {
    background: var(--brand-depth);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Push body below fixed navbar */
.fx-home .fx-navbar {
    flex-shrink: 0;
}

.fx-home-body {
    flex: 1;
    padding: 0.75rem 0;
    min-height: 0;
}
.fx-home-body > .container,
.fx-home-body > .container > .row {
    height: 100%;
}

.fx-home-footer {
    flex-shrink: 0;
    background: var(--brand-midnight);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* --- Hero Carousel --- */
.fx-hero-carousel {
    border-radius: 0.75rem;
    overflow: hidden;
}
.fx-hero-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fx-hero-carousel .fx-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, transparent 50%);
}
.fx-hero-carousel .carousel-caption {
    text-align: right;
    right: 5%;
    left: 5%;
    bottom: 1.5rem;
}
.fx-hero-carousel .carousel-caption h5 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.fx-hero-carousel .carousel-caption h5 a {
    color: #fff;
    text-decoration: none;
}
.fx-hero-carousel .carousel-caption p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
}
.fx-slide-placeholder {
    width: 100%;
    height: 100%;
    background: var(--brand-midnight);
}
.fx-hero-carousel .carousel-indicators {
    margin-bottom: 0.75rem;
}
.fx-hero-carousel .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    opacity: 0.4;
    border: 0;
}
.fx-hero-carousel .carousel-indicators .active {
    opacity: 1;
    background: var(--accent-gold);
}

/* --- Glass Cards (sidebar on dark bg) --- */
.fx-glass-card {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    overflow-y: auto;
}

/* --- Updates Ticker --- */
.fx-ticker {
    position: relative;
    min-height: 70px;
}
.fx-ticker-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    text-decoration: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}
.fx-ticker-slide.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    position: relative;
}
.fx-ticker-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--accent-gold);
    font-size: 0.85rem;
}
.fx-ticker-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}
.fx-ticker-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.5;
}
.fx-ticker-snippet {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.78rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fx-ticker-meta {
    color: var(--accent-gold);
    font-size: 0.78rem;
    font-weight: 600;
}
.fx-ticker-slide.active:hover .fx-ticker-text {
    color: #fff;
}

/* Ticker controls */
.fx-ticker-btn {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}
.fx-ticker-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}
.fx-ticker-counter {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    margin-inline-end: 0.25rem;
}

/* News items (thumbnail + title + snippet) */
.fx-news-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.2s;
}
.fx-news-item:last-child {
    border-bottom: 0;
}
.fx-news-item:hover .fx-news-title {
    color: var(--accent-gold);
}
.fx-news-thumb {
    width: 64px;
    height: 52px;
    border-radius: 0.4rem;
    overflow: hidden;
    flex-shrink: 0;
}
.fx-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.fx-news-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    font-size: 0.9rem;
}
.fx-news-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.fx-news-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.2s;
}
.fx-news-snippet {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.78rem;
    line-height: 1.4;
}
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Responsive --- */
@media (max-width: 991.98px) {
    .fx-home {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }
    .fx-home-body {
        padding: 1rem 0;
    }
    .fx-hero-carousel {
        min-height: 280px;
    }
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Topics Page
   ========================================================================== */

/* --- Banner --- */
.fx-topics-banner {
    background: var(--brand-depth);
    padding: 3rem 0 2.5rem;
    text-align: center;
    border-bottom: 3px solid var(--accent-gold);
}
.fx-topics-banner-title {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}
.fx-topics-banner .breadcrumb {
    justify-content: center;
    margin-bottom: 0;
    margin-top: 0.75rem;
}
.fx-topics-banner .breadcrumb-item a,
.fx-topics-banner .breadcrumb-item {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}
.fx-topics-banner .breadcrumb-item a:hover {
    color: #fff;
}
.fx-topics-banner .bullet {
    background: rgba(255, 255, 255, 0.4) !important;
}

/* --- Topics Container --- */
.fx-topics-container {
    padding-top: 2.5rem;
    padding-bottom: 3rem;
    min-height: 60vh;
}

/* --- Topic Cards --- */
.fx-topic-card {
    background: var(--surface-card);
    border-radius: 0.625rem;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.fx-topic-card-img-wrap {
    position: relative;
    overflow: hidden;
}
.fx-topic-card-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    display: block;
}

/* --- Date Badge --- */
.fx-topic-date-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--brand-depth);
    color: #fff;
    border-radius: 0.375rem;
    padding: 0.3rem 0.55rem;
    text-align: center;
    line-height: 1;
    font-size: 0.78rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}
.fx-topic-date-badge .fx-topic-date-day {
    font-size: 0.78rem;
    font-weight: 700;
}
.fx-topic-date-badge .fx-topic-date-month {
    font-size: 0.78rem;
    font-weight: 500;
}

/* --- Card Body --- */
.fx-topic-card-body {
    padding: 1.25rem 1.25rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.fx-topic-card-title {
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}
.fx-topic-card-title a,
.fx-topic-card-title a.text-white {
    color: var(--text-primary) !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
}
.fx-topic-card-title a:hover {
    color: var(--brand-depth) !important;
}
.fx-topic-card-snippet {
    color: #6c757d;
    font-size: 0.88rem;
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

/* --- "Read More" Link --- */
.fx-topic-more {
    color: var(--brand-depth);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
}
.fx-topic-more:hover {
    color: var(--brand-ocean);
}
.fx-topic-more-icon {
    font-size: 0.8rem;
    font-weight: 700;
}

/* --- Image Placeholder --- */
.fx-topic-card-placeholder {
    width: 100%;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-muted);
    color: var(--brand-sky);
    font-size: 3rem;
}

/* --- Pagination --- */
.fx-topics-pagination {
    display: flex;
    justify-content: center;
    margin-top: 2.5rem;
}
.fx-topics-pagination .pagination {
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
}
.fx-topics-pagination .pagination li {
    margin: 0;
}
.fx-topics-pagination .pagination li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.5rem;
    margin: 0 !important;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--surface-card);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
}
.fx-topics-pagination .pagination li a:hover {
    background: var(--brand-ice);
    border-color: var(--brand-sky);
    color: var(--brand-depth);
}
.fx-topics-pagination .pagination li.selected a,
.fx-topics-pagination .pagination li.active a {
    background: var(--brand-depth);
    border-color: var(--brand-depth);
    color: #fff;
}
.fx-topics-pagination .pagination li.selected a:hover,
.fx-topics-pagination .pagination li.active a:hover {
    background: var(--brand-midnight);
    color: #fff;
}

/* --- Show Topic Page --- */
.fx-topic-show-card {
    background: var(--surface-card);
    border-radius: 0.625rem;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}
.fx-topic-show-img-wrap {
    overflow: hidden;
}
.fx-topic-show-img-wrap img {
    width: 100%;
    height: auto;
    display: block;
}
.fx-topic-show-meta {
    padding: 1.25rem 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.fx-topic-date-badge-inline {
    background: var(--brand-depth);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 0.375rem;
}
.fx-topic-meta-item {
    color: #6c757d;
    font-size: 0.85rem;
}
.fx-topic-meta-item a {
    color: var(--brand-depth);
    text-decoration: none;
}
.fx-topic-show-title {
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.7;
    color: var(--text-primary);
    padding: 1rem 1.5rem 0.5rem;
    margin: 0;
}
.fx-topic-show-note {
    padding: 0 1.5rem;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--brand-depth);
    font-weight: 600;
}
.fx-topic-show-body {
    padding: 1rem 1.5rem 2rem;
    font-size: 1rem;
    line-height: 2;
    color: #333;
}
.fx-topic-show-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

/* --- Archive Page --- */
.fx-archive-filter {
    background: var(--surface-card);
    border-radius: 0.625rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.fx-archive-select {
    max-width: 280px;
    border-color: var(--brand-sky);
}
.fx-archive-select:focus {
    border-color: var(--brand-depth);
    box-shadow: 0 0 0 0.2rem rgba(var(--brand-depth), 0.15);
}
.fx-archive-list {
    background: var(--surface-card);
    border-radius: 0.625rem;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.fx-archive-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.15s ease;
}
.fx-archive-item:last-child {
    border-bottom: 0;
}
.fx-archive-item:hover {
    background: var(--surface-muted);
}
.fx-archive-item-title {
    flex: 1;
    min-width: 0;
}
.fx-archive-item-title a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}
.fx-archive-item-title a:hover {
    color: var(--brand-depth);
}
.fx-archive-item-meta {
    display: flex;
    gap: 1rem;
    color: #6c757d;
    font-size: 0.82rem;
    flex-shrink: 0;
    margin-inline-start: 1rem;
}

/* ==========================================================================
   Updates Page
   ========================================================================== */

/* Small Update Cards (3-col grid) */
.fx-update-card-sm {
    background: var(--surface-card);
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    text-decoration: none;
    height: 100%;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.fx-update-card-sm:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    border-color: var(--brand-sky);
}
.fx-update-card-sm-icon {
    width: 36px;
    height: 36px;
    border-radius: 0.4rem;
    background: var(--brand-ice);
    color: var(--brand-depth);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.85rem;
}
.fx-update-card-sm:hover .fx-update-card-sm-icon {
    background: var(--brand-depth);
    color: #fff;
}
.fx-update-card-sm-body {
    min-width: 0;
    flex: 1;
}
.fx-update-card-sm-title {
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fx-update-card-sm:hover .fx-update-card-sm-title {
    color: var(--brand-depth);
}
.fx-update-card-sm-date {
    font-size: 0.75rem;
    color: #999;
}

/* ==========================================================================
   Album Page
   ========================================================================== */

/* Category Cards */
.fx-album-cat-card {
    display: block;
    border-radius: 0.625rem;
    overflow: hidden;
    text-decoration: none;
    background: var(--surface-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.fx-album-cat-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}
.fx-album-cat-img-wrap {
    position: relative;
    overflow: hidden;
}
.fx-album-cat-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.fx-album-cat-card:hover .fx-album-cat-img {
    transform: scale(1.05);
}
.fx-album-cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.5) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 0.75rem;
}
.fx-album-cat-count {
    background: var(--brand-depth);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 0.375rem;
}
.fx-album-cat-name {
    padding: 0.65rem 0.85rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Image Grid Cards */
.fx-album-img-card {
    display: block;
    border-radius: 0.5rem;
    overflow: hidden;
    text-decoration: none;
    background: var(--surface-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s ease;
}
.fx-album-img-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.fx-album-img-wrap {
    overflow: hidden;
}
.fx-album-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.fx-album-img-card:hover .fx-album-img {
    transform: scale(1.05);
}
.fx-album-img-name {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Show Image Page */
.fx-album-show-img-wrap {
    text-align: center;
    background: var(--surface-muted);
}
.fx-album-show-img-wrap img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ==========================================================================
   Library Page
   ========================================================================== */

/* Book Cards (4-col grid) */
.fx-book-card {
    background: var(--surface-card);
    border-radius: 0.625rem;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.fx-book-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}
.fx-book-card-cover {
    overflow: hidden;
    background: var(--surface-muted);
}
.fx-book-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.fx-book-card-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-muted);
    color: var(--brand-sky);
    font-size: 2.5rem;
}
.fx-book-card-body {
    padding: 0.85rem 1rem;
    flex: 1;
}
.fx-book-card-title {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.fx-book-card-title a {
    color: var(--text-primary);
    text-decoration: none;
}
.fx-book-card-title a:hover {
    color: var(--brand-depth);
}
.fx-book-card-author {
    font-size: 0.78rem;
    color: #999;
}

/* Book Detail Page */
.fx-book-show-cover {
    padding: 1.5rem;
}
.fx-book-show-cover img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.fx-book-show-info {
    padding: 1.5rem;
}
.fx-book-show-meta {
    margin: 1rem 0;
}
.fx-book-meta-row {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}
.fx-book-meta-row:last-child {
    border-bottom: 0;
}
.fx-book-meta-label {
    color: #6c757d;
    min-width: 120px;
    flex-shrink: 0;
}
.fx-book-meta-value {
    color: var(--text-primary);
    font-weight: 600;
}
.fx-book-meta-value a {
    color: var(--brand-depth);
    text-decoration: none;
}
.fx-book-show-desc {
    font-size: 0.92rem;
    line-height: 1.8;
    color: #555;
    padding: 0.75rem 0;
}

/* --- Responsive --- */
@media (max-width: 767.98px) {
    .fx-topics-banner {
        padding: 2.5rem 0 2rem;
    }
    .fx-topics-banner-title {
        font-size: 1.5rem;
    }
    .fx-topic-card-img {
        height: 200px;
    }
    .fx-topic-show-title {
        font-size: 1.2rem;
    }
    .fx-archive-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .fx-archive-item-meta {
        margin-inline-start: 0;
    }
}
