﻿/* Theme layout styles */
.jp-site-header {
    background: #fff;
    border-bottom: 1px solid var(--jp-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

body.admin-bar .jp-site-header {
    top: 32px;
}

.jp-top-strip {
    background: linear-gradient(90deg, #0d2f59, #154c8a);
    color: #fff;
}

.jp-top-strip-inner {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.jp-site-mini-title {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.jp-navbar {
    padding: 14px 0;
    background: #fff;
}

.jp-navbar-inner {
    align-items: center;
}

.jp-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 380px;
    white-space: normal;
}

.jp-brand-logo img,
.jp-brand .custom-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.jp-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.jp-brand-name {
    font-family: "Merriweather", Georgia, serif;
    font-size: 21px;
    font-weight: 700;
    color: var(--jp-dark);
}

.jp-brand-tagline {
    color: #64748b;
    font-size: 13px;
    margin-top: 4px;
}

.jp-menu,
.jp-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jp-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
}

.jp-menu > li {
    position: relative;
}

.jp-menu a {
    display: block;
    color: #123456;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    padding: 10px 14px;
    border-radius: 999px;
    transition: 0.2s ease;
}

.jp-menu > li > a:hover,
.jp-menu > li > a:focus,
.jp-menu > li.current-menu-item > a,
.jp-menu > li.current-menu-ancestor > a {
    background: rgba(21, 76, 138, 0.09);
    color: var(--jp-primary);
}

.jp-menu .sub-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 220px;
    background: #fff;
    border: 1px solid var(--jp-border);
    border-radius: 16px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

.jp-menu li:hover > .sub-menu,
.jp-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.jp-menu .sub-menu li {
    position: relative;
}

.jp-menu .sub-menu li a {
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
}

.jp-menu .sub-menu li a:hover,
.jp-menu .sub-menu li.current-menu-item > a {
    background: #f4f7fb;
}

.jp-menu .sub-menu .sub-menu {
    top: -10px;
    left: calc(100% + 8px);
}

.navbar-toggler {
    border: 1px solid var(--jp-border);
}

.jp-hero {
    background: linear-gradient(135deg, #113b73, #1d5ba7 60%, #2d7ee8);
    color: #ffffff;
    padding: 28px 0 52px;
}

.jp-hero-panel,
.jp-hero-callout {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    padding: 24px;
    backdrop-filter: blur(8px);
}

.jp-hero-callout {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
}

.jp-hero-current-issue {
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.jp-hero-current-issue h2 {
    color: #fff;
}

.jp-hero-current-issue p {
    color: rgba(255, 255, 255, 0.92);
}

.jp-hero-current-issue-link {
    color: #fff;
    font-weight: 700;
    text-decoration: underline;
}

.jp-hero-current-issue-link:hover,
.jp-hero-current-issue-link:focus {
    color: #fff;
    opacity: 0.9;
}

.jp-hero-callout-label,
.jp-section-kicker,
.hero-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 16px;
    border-radius: 999px;
}

.jp-hero h1 {
    font-size: clamp(28px, 3vw, 42px);
    margin-top: 18px;
    margin-bottom: 10px;
    color: #fff;
}

.jp-hero p {
    max-width: 620px;
    opacity: 0.9;
    margin-bottom: 0;
}

.jp-stats {
    margin-top: -28px;
    position: relative;
    z-index: 2;
}

.jp-stats .stat-card {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid var(--jp-border);
    padding: 18px;
    text-align: center;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    height: 100%;
}

.jp-stats .stat-card h3 {
    margin: 0 0 6px;
    font-size: 24px;
    color: var(--jp-dark);
}

.jp-main-home {
    background: linear-gradient(180deg, #ffffff, #f7f9fc);
}

.jp-announcements {
    padding: 0;
    overflow: hidden;
}

.jp-announcements__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--jp-border);
}

.jp-announcements__viewport {
    position: relative;
    overflow: hidden;
}

.jp-announcements__list {
    list-style: none;
    margin: 0;
    padding: 0;
    transition: transform 0.5s ease;
}

.jp-announcements__item {
    border-bottom: 1px solid var(--jp-border);
}

.jp-announcements__item:last-child {
    border-bottom: 0;
}

.jp-announcements__item a {
    display: grid;
    gap: 4px;
    padding: 18px 22px;
    color: inherit;
}

.jp-announcements__date {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--jp-primary);
}

.jp-announcements__title {
    color: var(--jp-dark);
    font-weight: 600;
}

.jp-about {
    padding: 0;
}

.jp-about .about-card,
.jp-cover-card,
.card-jp {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid var(--jp-border);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.jp-cover-card {
    padding: 12px;
}

.jp-copy {
    font-size: 16px;
    line-height: 1.8;
    color: #334155;
}

.jp-copy h1,
.jp-copy h2,
.jp-copy h3,
.jp-copy h4 {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 18px;
    color: var(--jp-dark);
}

.jp-copy ul,
.jp-copy ol {
    padding-left: 20px;
}

.jp-partners {
    background: transparent;
    padding: 0;
    border: 0;
}

.partner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 16px;
}

.partner-widget,
.jp-partner-card,
.jp-partner-placeholder {
    background: #fff;
    border: 1px solid var(--jp-border);
    border-radius: 16px;
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
    padding: 14px;
    font-weight: 700;
    color: #475569;
}

.jp-partner-card {
    text-decoration: none;
}

.jp-partner-card:hover,
.jp-partner-card:focus {
    border-color: rgba(21, 76, 138, 0.28);
    transform: translateY(-2px);
}

.partner-grid img {
    max-height: 56px;
    width: auto;
    filter: grayscale(1);
    opacity: 0.9;
}

.jp-why {
    padding: 0;
}

.jp-why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.why-widget {
    background: #ffffff;
    border-radius: 18px;
    border: 1px solid var(--jp-border);
    padding: 24px;
    text-align: center;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
}

.jp-content-section,
.jp-subjects {
    padding: 0;
    background: transparent;
}

.jp-subjects ul {
    columns: 2;
    column-gap: 28px;
    padding-left: 20px;
    margin-bottom: 0;
}

.jp-subjects li {
    break-inside: avoid;
    margin-bottom: 10px;
    color: #334155;
}

.jp-sidebar .widget {
    background: #ffffff;
    border: 1px solid var(--jp-border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    margin-bottom: 18px;
}

.jp-sidebar .widget-title {
    font-size: 20px;
    margin-bottom: 14px;
    color: var(--jp-dark);
}

.jp-home-sidebar.sticky-top {
    top: 140px;
}

.jp-current-issue-card .jp-issue-meta {
    margin-bottom: 8px;
    color: var(--jp-primary);
    font-weight: 700;
}

.jp-copy-sm {
    font-size: 15px;
    line-height: 1.6;
}

.jp-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.jp-recent-list li + li {
    border-top: 1px solid var(--jp-border);
    margin-top: 10px;
    padding-top: 10px;
}

.jp-recent-list__meta {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
}

.jp-issue-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.jp-issue-detail {
    border: 1px solid var(--jp-border);
    border-radius: 14px;
    padding: 14px 16px;
    background: #f8fbff;
}

.jp-issue-detail span {
    display: block;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.jp-issue-detail strong {
    color: var(--jp-dark);
}

.jp-archives-page {
    scroll-behavior: smooth;
}

.jp-archives-banner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, #113b73, #1d5ba7);
    color: #fff;
}

.jp-archives-banner .section-title,
.jp-archives-banner .jp-muted,
.jp-archives-banner .jp-section-kicker {
    color: #fff;
}

.jp-archives-banner__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(110px, 1fr));
    gap: 12px;
    min-width: 240px;
}

.jp-archives-stat {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
}

.jp-archives-stat span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.85;
}

.jp-archives-stat strong {
    display: block;
    font-size: 28px;
    line-height: 1.1;
    margin-top: 6px;
}

.jp-archives-jump {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.jp-archives-jump a,
.jp-volume-filter {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: #eef4fb;
    border: 1px solid var(--jp-border);
    color: var(--jp-primary);
    font-weight: 700;
    text-decoration: none;
}

.jp-volume-filter {
    cursor: pointer;
}

.jp-volume-filter.is-active {
    background: var(--jp-primary);
    border-color: var(--jp-primary);
    color: #fff;
}

.jp-volume-card.is-hidden {
    display: none;
}

.jp-archives-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.jp-volume-card {
    background: #fff;
    border: 1px solid var(--jp-border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.jp-volume-card__header {
    padding: 18px 22px;
    background: linear-gradient(135deg, #154c8a, #0f3f73);
}

.jp-volume-card__title {
    color: #fff;
    font-size: 24px;
}

.jp-volume-card__title span {
    font-size: 18px;
    font-weight: 400;
    opacity: 0.88;
}

.jp-volume-card__issues {
    list-style: none;
    margin: 0;
    padding: 0;
}

.jp-issue-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 22px;
    background: #f8fbff;
    border-top: 1px solid var(--jp-border);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.jp-issue-row:hover {
    background: #eef5ff;
}

.jp-issue-row__content {
    display: grid;
    gap: 4px;
}

.jp-issue-row__title {
    font-weight: 700;
    color: var(--jp-dark);
}

.jp-issue-row__meta {
    color: #64748b;
    font-size: 13px;
}

.jp-issue-row__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.jp-issue-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--jp-border);
    background: #fff;
    color: var(--jp-primary);
    font-size: 13px;
    font-weight: 700;
}

.jp-issue-link--primary {
    background: var(--jp-primary);
    border-color: var(--jp-primary);
    color: #fff;
}

.jp-archives-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    margin-right: 8px;
    border-radius: 999px;
    border: 1px solid var(--jp-border);
    background: #fff;
    color: var(--jp-primary);
    font-weight: 700;
}

.jp-archives-pagination .current {
    background: var(--jp-primary);
    color: #fff;
    border-color: var(--jp-primary);
}

.jp-footer {
    background: #0f172a;
    color: #e2e8f0;
    padding: 28px 0;
    margin-top: 56px;
}

.jp-footer a {
    color: #e2e8f0;
}

.jp-footer .footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.jp-breadcrumbs {
    font-size: 13px;
    color: #64748b;
    margin: 12px 0;
}

.search-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-form .search-field {
    border: 1px solid var(--jp-border);
    border-radius: 999px;
    padding: 8px 14px;
    min-width: 220px;
}

.search-form .search-submit,
.btn-jp {
    background: var(--jp-primary);
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 700;
}

.search-form .search-submit:hover,
.btn-jp:hover {
    background: #0f3f73;
    color: #ffffff;
}

@media (max-width: 1199px) {
    .jp-menu {
        display: block;
        margin-top: 18px;
    }

    .jp-menu > li {
        width: 100%;
    }

    .jp-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: 0;
        padding: 0 0 0 14px;
        margin-top: 6px;
        min-width: auto;
    }

    .jp-menu .sub-menu .sub-menu {
        top: auto;
        left: auto;
    }

    .jp-mobile-search .search-form {
        justify-content: flex-start;
    }
}

@media (max-width: 991px) {
    .jp-top-strip-inner {
        justify-content: center;
    }

    .jp-brand {
        max-width: none;
    }

    .jp-subjects ul {
        columns: 1;
    }

    .jp-announcements__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .jp-archives-banner {
        flex-direction: column;
    }

    .jp-archives-banner__stats {
        min-width: 0;
        width: 100%;
    }

    .jp-archives-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jp-home-sidebar.sticky-top {
        position: static;
        top: auto;
    }
}

@media (max-width: 767px) {
    body.admin-bar .jp-site-header {
        top: 46px;
    }

    .jp-brand {
        align-items: flex-start;
    }

    .jp-brand-logo img,
    .jp-brand .custom-logo {
        width: 56px;
        height: 56px;
    }

    .search-form {
        flex-wrap: wrap;
    }

    .search-form .search-field {
        min-width: 0;
        width: 100%;
    }

    .jp-archives-grid {
        grid-template-columns: 1fr;
    }

    .jp-issue-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .jp-issue-row__actions {
        justify-content: flex-start;
    }
}

body.admin-bar .jp-home-sidebar.sticky-top {
    top: 172px;
}

.jp-paper-table th,
.jp-paper-table td {
    vertical-align: middle;
}

.jp-paper-table thead th {
    background: #f3f7fc;
    color: var(--jp-dark);
    font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.jp-paper-table tbody tr:nth-child(odd) {
    background: #fbfdff;
}

.jp-paper-avatar {
    display: inline-block;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(180deg, #75c2ff, #2d7ee8);
}

.jp-paper-thumb {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 50%;
}

.jp-paper-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--jp-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
}

.jp-paper-download-btn:hover,
.jp-paper-download-btn:focus {
    background: #0f3f73;
    color: #fff;
}

@media (max-width: 767px) {
    .jp-paper-table {
        min-width: 720px;
    }
}

/* Homepage clean-square blocks as requested */
.jp-about .about-card,
.jp-partners .jp-partner-placeholder,
.jp-subjects .card-jp {
    border-radius: 0;
}
