/* ==========================================================================
   JIM Student Theme — Base Layout
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Reset scoped to .jim-theme ── */
.jim-theme *,
.jim-theme *::before,
.jim-theme *::after {
    box-sizing: border-box;
}

.jim-theme {
    font-family: var(--jim-font);
    color: var(--jim-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.jim-theme img {
    max-width: 100%;
    height: auto;
    display: block;
}

.jim-theme a {
    color: var(--jim-teal);
    text-decoration: none;
    transition: color var(--jim-duration) var(--jim-ease);
}

.jim-theme a:hover {
    color: var(--jim-teal-dark);
}

.jim-theme a:focus-visible {
    outline: 2px solid var(--jim-teal);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ── Container ── */
.jim-container {
    max-width: var(--jim-max-width);
    margin-inline: auto;
    padding-inline: var(--jim-content-padding);
}

/* ── Section spacing ── */
.jim-section {
    padding-block: var(--jim-sp-12);
}

.jim-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--jim-sp-8);
    gap: var(--jim-sp-4);
}

.jim-section__title {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--jim-navy);
    display: flex;
    align-items: center;
    gap: var(--jim-sp-3);
    margin: 0;
}

.jim-section__title svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: var(--jim-teal);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.jim-section__link {
    font-size: .875rem;
    font-weight: 600;
    color: var(--jim-teal);
    display: inline-flex;
    align-items: center;
    gap: var(--jim-sp-1);
    white-space: nowrap;
}

.jim-section__link:hover {
    gap: var(--jim-sp-2);
}

/* ── Two-column content grid ── */
.jim-content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: var(--jim-sp-8);
    align-items: start;
}

/* ── Screen-reader only ── */
.jim-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Override default theme styles that conflict */
.jim-theme .pkp_structure_page {
    overflow-x: hidden;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}

.jim-theme .pkp_structure_content,
.jim-theme .pkp_structure_content.has_sidebar {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.jim-theme .pkp_structure_main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Remove default OJS theme vertical line borders (full-height pseudo-elements) */
.jim-theme .pkp_structure_main::before,
.jim-theme .pkp_structure_main::after,
.jim-theme .pkp_structure_content::before,
.jim-theme .pkp_structure_content::after,
.jim-theme .pkp_structure_page::before,
.jim-theme .pkp_structure_page::after {
    display: none !important;
    content: none !important;
    width: 0 !important;
    height: 0 !important;
    border: none !important;
    background: transparent !important;
}

.jim-theme .pkp_structure_sidebar {
    display: none !important;
}

.jim-theme .page_index_site {
    padding: 0;
}
