/*
 * ============================================
 * Archivio - LCARS / Among the Stars theme
 * Restyled to match style.css (dark LCARS bridge
 * console aesthetic). Reuses the --lcars-* /
 * --text-* variables defined in style.css's
 * :root, so both stylesheets stay in sync.
 *
 * NOTE: unlike fanatically.css, Archivio's gallery
 * output is NOT nested inside .about-block - it
 * renders its own .archivio-gallery wrapper directly
 * inside <main class="main-content"> (see index.php).
 * style.css's `.about-block * { background:
 * transparent !important; }` rule doesn't reach it,
 * and Archivio's own inline <style> block only sets
 * structural grid layout (no colors), so none of the
 * !important fights fanatically.css needed apply here.
 * ============================================
 */

/* ── Page heading ────────────────────────────────────────────── */
/* View::heading() (config: heading_level) renders a bare <h1>-<h6> as the
   gallery/category title with no class - otherwise falls back to the
   browser's default serif heading, which clashes with the rest of the
   site's Orbitron display type. */

.archivio-gallery h1,
.archivio-gallery h2,
.archivio-gallery h3,
.archivio-gallery h4,
.archivio-gallery h5,
.archivio-gallery h6 {
    color: var(--lcars-amber);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.7rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    margin-bottom: 1.2rem;
    text-shadow: 0 0 30px rgba(255, 204, 0, 0.3);
    text-transform: uppercase;
}

/* ── Icon grid ───────────────────────────────────────────────── */
/* --thumb-size and --gap are set by the integration mode inline \3c style>
   in index.php, which reads thumbnail_size from config.php. */

.image-grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: repeat(auto-fill, minmax(var(--thumb-size), 1fr));
    list-style: none;
    margin: 1.25rem 0 1.25rem;
    padding: 0;
}

.image-item {
    align-items: center;
    display: flex;
    justify-content: center;
}

.image-item figure {
    align-items: center;
    background: linear-gradient(160deg,
        rgba(10, 20, 50, 0.9) 0%,
        rgba(5, 13, 26, 0.95) 100%);
    border: 1px solid rgba(255, 153, 0, 0.25);
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
    display: flex;
    height: var(--thumb-size);
    justify-content: center;
    margin: 0;
    overflow: hidden;
    padding: 3px;
    position: relative;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
    width: var(--thumb-size);
}

.image-item figure::before {
    background: linear-gradient(90deg, var(--lcars-pink), var(--lcars-amber), var(--lcars-blue));
    content: '';
    height: 2px;
    left: 0;
    opacity: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: opacity 0.25s ease;
    z-index: 1;
}

.image-item figure:hover {
    border-color: var(--lcars-amber);
    box-shadow: 0 10px 24px rgba(255, 153, 0, 0.25);
    transform: translateY(-3px);
}

.image-item figure:hover::before {
    opacity: 1;
}

.image-item img {
    display: block;
    height: auto;
    max-height: calc(var(--thumb-size) - 8px);
    max-width: calc(var(--thumb-size) - 8px);
    object-fit: contain;
    width: auto;
}

/* ── Breadcrumb ──────────────────────────────────────────────── */

/* .breadcrumb is a <nav>, so it inherits the site-wide glass-pill `nav`
   styling (background/border/radius/shadow) from style.css. That rule's
   padding (1.1rem 1.5rem) is sized for the main site nav's larger link
   buttons — override it here with a slimmer pill sized for plain text. */
.breadcrumb {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    margin-bottom: 1.1rem;
    padding: 0.5rem 1.15rem;
    text-transform: uppercase;
}

.breadcrumb ol {
    color: var(--text-dim);
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    align-items: center;
    display: flex;
}

.breadcrumb li + li::before {
    color: var(--lcars-amber);
    content: "›";
    flex-shrink: 0;
    margin: 0 0.5rem;
    opacity: 0.7;
}

.breadcrumb a {
    color: var(--lcars-ltblue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: var(--lcars-amber);
}

.breadcrumb [aria-current="page"] {
    color: var(--text-bright);
    font-weight: 600;
}

/* ── Category / subcategory lists ────────────────────── */
/* .category-list is the home-page list of top-level categories.
   .subcategory-list is the same thing one level down (rendered inside a
   "Folders" <section class="subcategory-section">). Both were previously
   unstyled and fell back to a plain browser bullet list — replaced here
   with the same divider-row treatment used for owned/joined listings
   elsewhere on the site, so navigation lists read consistently everywhere. */

.category-list,
.subcategory-list {
    list-style: none;
    margin: 1.25rem 0;
    padding: 0;
}

.category-list li,
.subcategory-list li {
    border-bottom: 1px solid rgba(255, 153, 0, 0.2);
    padding: 0.7rem 0;
}

.category-list li:last-child,
.subcategory-list li:last-child {
    border-bottom: none;
}

.category-list a,
.subcategory-list a {
    border-bottom: 1px dotted rgba(255, 153, 0, 0.4);
    color: var(--lcars-pink);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.05rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.category-list a:hover,
.subcategory-list a:hover {
    border-bottom-color: var(--lcars-amber);
    border-bottom-style: solid;
    color: var(--lcars-amber);
}

.count {
    color: var(--text-dim);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.1em;
    margin-left: 0.4rem;
    text-transform: uppercase;
}

.subcategory-section {
    margin: 1.5rem 0;
}

/* ── Sort controls ────────────────────────────────── */

.sort-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.4rem 0;
}

.sort-label {
    color: var(--text-dim);
    font-family: 'Orbitron', sans-serif;
    font-size: 0.62rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sort-btn {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(5, 13, 26, 0.55);
    border: 1px solid rgba(255, 153, 0, 0.25);
    border-radius: 20px;
    color: var(--text-main);
    display: inline-block;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    padding: 0.35rem 0.85rem;
    text-decoration: none;
    text-transform: uppercase;
    transition: all 0.22s ease;
}

.sort-btn:hover {
    background: linear-gradient(120deg, rgba(255, 153, 0, 0.16) 0%, rgba(153, 153, 255, 0.16) 100%);
    border-color: var(--lcars-amber);
    color: var(--lcars-amber);
    transform: translateY(-2px);
}

.sort-btn.active {
    background: rgba(10, 20, 50, 0.85);
    border-color: var(--lcars-amber);
    color: var(--lcars-amber);
    font-weight: 600;
}

/* ── Pagination ───────────────────────────────────── */

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: center;
    margin: 1.5em 0;
}

.pagination-btn,
.pagination-page {
    align-items: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(5, 13, 26, 0.55);
    border: 1px solid rgba(255, 153, 0, 0.25);
    border-radius: 20px;
    color: var(--text-main);
    display: inline-flex;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.72rem;
    font-weight: 500;
    justify-content: center;
    letter-spacing: 0.1em;
    min-width: 32px;
    padding: 0.35rem 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination-btn:hover,
.pagination-page:hover {
    background: linear-gradient(120deg, rgba(255, 153, 0, 0.16) 0%, rgba(153, 153, 255, 0.16) 100%);
    border-color: var(--lcars-amber);
    color: var(--lcars-amber);
    transform: translateY(-2px);
}

.pagination-page.current {
    background: rgba(10, 20, 50, 0.85);
    border-color: var(--lcars-amber);
    color: var(--lcars-amber);
    font-weight: 600;
}

.pagination-ellipsis {
    color: var(--text-dim);
    padding: 0.35rem 0.2rem;
}

/* ── Feedback messages ────────────────────────────── */

.empty-message,
.error-message {
    color: var(--text-dim);
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    font-style: italic;
    margin: 1.5rem 0;
    text-align: center;
}

.error-message {
    color: var(--lcars-red);
}

/* ── Site description ──────────────────────── */
/* Optional intro copy from the site_description config key, shown on the
   home page between the title and the category list. Same gap as the
   Fanatically wrapper classes had: unstyled, so it fell back to the
   browser default text size instead of matching the site's body copy. */

.site-description {
    color: var(--text-main);
    font-family: 'Nunito', sans-serif;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.4rem;
}

.site-description p {
    font-size: inherit;
    margin: 0 0 1rem;
}

.site-description p:last-child {
    margin-bottom: 0;
}
