/* =======================================================
   NikoUArxive - GLOBAL LAYOUT STANDARDIZATION
   ArXiv-Style Width System
   Final Clean Version
======================================================= */

/* 🌐 Global Page Wrapper - Used for ALL pages */
.page-wrap {
    width: 100%;
    margin: 0 auto;
    padding: 0 var(--site-side-padding);
    box-sizing: border-box;
}

/* Respect the global layout mode selected in Website Control. */
body.layout-mode-contained .page-wrap,
body.layout-mode-contained-standard .page-wrap {
    max-width: var(--site-max-width);
}

body.layout-mode-full-wide .page-wrap,
body.layout-mode-full .page-wrap {
    max-width: none;
}

/* 🌐 Inner White Content Box (About, Journals, Policies, Contact etc.) */
.content-box {
    background: #ffffff;
    border-radius: 18px;
    padding: 32px 36px;     /* Comfortable reading margin */
    margin-bottom: 40px;
    border: 1px solid #e6e6e6;
}

/* Remove ALL bootstrap auto-width conflicts */
.container,
.container-sm,
.container-md,
.container-lg,
.container-xl,
.container-fluid,
.public-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 auto !important;
}

/* =======================================================
   PAGE TITLES & TEXT (Smaller + Professional)
======================================================= */
.page-wrap h1 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0046b8;
    margin-bottom: 1rem;
}

.page-wrap h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0046b8;
    margin-top: 1.6rem;
    margin-bottom: 0.6rem;
}

.page-wrap p,
.page-wrap li {
    font-size: 0.92rem;
    line-height: 1.45rem;
    color: #222;
}

/* Bullet list indentation */
.page-wrap ul {
    padding-left: 1.4rem;
}

/* Founder / Highlight Box */
.founder-box {
    background: #e8f2ff;
    border-left: 4px solid #1976d2;
    padding: 14px 18px;
    font-size: 0.9rem;
    border-radius: 10px;
    margin-top: 1.8rem;
}

/* =======================================================
   MOBILE RESPONSIVE ADJUSTMENTS
======================================================= */
@media (max-width: 768px) {
    .page-wrap {
        padding: 0 18px;
    }
    .content-box {
        padding: 22px 22px;
    }
    .page-wrap h1 { font-size: 1.2rem; }
    .page-wrap h2 { font-size: 1rem; }
}


/* =======================================================
   EXACT FULL-WIDTH ALIGNMENT
   Header, main content, and footer share identical edges
======================================================= */

/* Remove horizontal space from the shared main wrapper in full-wide mode. */
body.layout-mode-full-wide .page-wrap,
body.layout-mode-full .page-wrap {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Remove the second inner horizontal padding from the three main discovery pages. */
body.layout-mode-full-wide .niko-preprints,
body.layout-mode-full .niko-preprints,
body.layout-mode-full-wide .published-discovery,
body.layout-mode-full .published-discovery,
body.layout-mode-full-wide .classification-page,
body.layout-mode-full .classification-page {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* The principal public sections now touch the same left and right edges as the header. */
body.layout-mode-full-wide .np-hero,
body.layout-mode-full .np-hero,
body.layout-mode-full-wide .np-layout,
body.layout-mode-full .np-layout,
body.layout-mode-full-wide .pd-hero,
body.layout-mode-full .pd-hero,
body.layout-mode-full-wide .pd-section-head,
body.layout-mode-full .pd-section-head,
body.layout-mode-full-wide .pd-journal-grid,
body.layout-mode-full .pd-journal-grid,
body.layout-mode-full-wide .pd-filter-card,
body.layout-mode-full .pd-filter-card,
body.layout-mode-full-wide .pd-result-bar,
body.layout-mode-full .pd-result-bar,
body.layout-mode-full-wide .pd-list,
body.layout-mode-full .pd-list,
body.layout-mode-full-wide .pd-pagination,
body.layout-mode-full .pd-pagination,
body.layout-mode-full-wide .cl-hero,
body.layout-mode-full .cl-hero,
body.layout-mode-full-wide .cl-breadcrumbs,
body.layout-mode-full .cl-breadcrumbs,
body.layout-mode-full-wide .cl-view-switch,
body.layout-mode-full .cl-view-switch,
body.layout-mode-full-wide .cl-tabs,
body.layout-mode-full .cl-tabs,
body.layout-mode-full-wide .cl-grid,
body.layout-mode-full .cl-grid,
body.layout-mode-full-wide .cl-records,
body.layout-mode-full .cl-records,
body.layout-mode-full-wide .cl-actions,
body.layout-mode-full .cl-actions,
body.layout-mode-full-wide .cl-empty,
body.layout-mode-full .cl-empty {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* Preserve a small safe inset only on tablets and phones. */
@media (max-width: 991.98px) {
    body.layout-mode-full-wide .page-wrap,
    body.layout-mode-full .page-wrap,
    body.layout-mode-full-wide .niko-preprints,
    body.layout-mode-full .niko-preprints,
    body.layout-mode-full-wide .published-discovery,
    body.layout-mode-full .published-discovery,
    body.layout-mode-full-wide .classification-page,
    body.layout-mode-full .classification-page {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* =======================================================
   PUBLISHED ARCHIVE — JOURNAL COVER VISIBILITY HOTFIX V2
   Forces visibly larger covers in both the four journal
   selector cards and every published-article record.
======================================================= */
body .published-discovery .pd-journal-card {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    min-height: 116px !important;
    column-gap: 12px !important;
}

body .published-discovery img.pd-journal-cover,
body .published-discovery .pd-cover-placeholder {
    display: block !important;
    width: 72px !important;
    min-width: 72px !important;
    max-width: none !important;
    height: 96px !important;
    min-height: 96px !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #f8fbff !important;
}

body .published-discovery .pd-article-main {
    grid-template-columns: 84px minmax(0, 1fr) 215px !important;
}

body .published-discovery img.pd-record-cover,
body .published-discovery .pd-record-placeholder {
    display: block !important;
    width: 84px !important;
    min-width: 84px !important;
    max-width: none !important;
    height: 116px !important;
    min-height: 116px !important;
    object-fit: contain !important;
    object-position: center !important;
    background: #f8fbff !important;
}

@media (max-width: 1040px) {
    body .published-discovery .pd-journal-card {
        grid-template-columns: 68px minmax(0, 1fr) !important;
        min-height: 110px !important;
    }

    body .published-discovery img.pd-journal-cover,
    body .published-discovery .pd-cover-placeholder {
        width: 68px !important;
        min-width: 68px !important;
        height: 92px !important;
        min-height: 92px !important;
    }

    body .published-discovery .pd-article-main {
        grid-template-columns: 74px minmax(0, 1fr) !important;
    }

    body .published-discovery img.pd-record-cover,
    body .published-discovery .pd-record-placeholder {
        width: 74px !important;
        min-width: 74px !important;
        height: 102px !important;
        min-height: 102px !important;
    }
}

@media (max-width: 720px) {
    body .published-discovery .pd-journal-card {
        grid-template-columns: 60px minmax(0, 1fr) !important;
        min-height: 98px !important;
    }

    body .published-discovery img.pd-journal-cover,
    body .published-discovery .pd-cover-placeholder {
        width: 60px !important;
        min-width: 60px !important;
        height: 82px !important;
        min-height: 82px !important;
    }

    body .published-discovery .pd-article-main {
        grid-template-columns: 64px minmax(0, 1fr) !important;
    }

    body .published-discovery img.pd-record-cover,
    body .published-discovery .pd-record-placeholder {
        width: 64px !important;
        min-width: 64px !important;
        height: 88px !important;
        min-height: 88px !important;
    }
}

@media (max-width: 460px) {
    body .published-discovery .pd-journal-card {
        grid-template-columns: 56px minmax(0, 1fr) !important;
    }

    body .published-discovery img.pd-journal-cover,
    body .published-discovery .pd-cover-placeholder {
        width: 56px !important;
        min-width: 56px !important;
        height: 76px !important;
        min-height: 76px !important;
    }

    body .published-discovery .pd-article-main {
        grid-template-columns: 58px minmax(0, 1fr) !important;
    }

    body .published-discovery img.pd-record-cover,
    body .published-discovery .pd-record-placeholder {
        width: 58px !important;
        min-width: 58px !important;
        height: 80px !important;
        min-height: 80px !important;
    }
}
