/* ==========================================================================
   publications.css — Publications page styles
   Figma node: 539-18425 (full page), 539-18801 (stats), 539-18433 (list)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HERO — overrides / extensions for the shared .research-hero
   -------------------------------------------------------------------------- */

.pub-hero-title-em {
    font-style: italic;
    color: #f16522;
}

/* --------------------------------------------------------------------------
   2. STATS SECTION  (node 539:18801)
      3 boxes in a centered row — each box bg #F2F2F2, ~349 × 216 px
   -------------------------------------------------------------------------- */

.pub-stats {
    background: #ffffff;
    padding: 60px 24px;
}

.pub-stats-inner {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 auto;
}

/* Each stat box: exactly 349 × 216 px, padding 40 80, bg #F2F2F2
   Inner layout: column, center, gap 24px (from Frame 60 / layout_Y3E64P) */
.pub-stat-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    background: #f2f2f2;
    padding: 40px 80px;
    width: 349px;
    height: 216px;      /* fixed height — all boxes identical */
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Number row: fixed 130 px wide, centered */
.pub-stat-number-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 130px;
    flex-shrink: 0;
}

.pub-stat-number {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 800;           /* ExtraBold */
    font-size: 56px;
    line-height: 56px;
    letter-spacing: -0.02em;
    color: #f16522;
    text-align: center;
    width: 130px;
    display: block;
}

/* Label: fills the column width, centered text */
.pub-stat-label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 21px;
    color: #1c2b4a;
    text-align: center;
    margin: 0;
    width: 100%;
}

/* --------------------------------------------------------------------------
   3. PUBLICATIONS LIST SECTION  (node 539:18433)
   -------------------------------------------------------------------------- */

.pub-section {
    background: #ffffff;
    padding: 120px 0 100px;
}

.pub-inner {
    max-width: 1642px;
    margin: 0 auto;
    padding: 0 clamp(24px, 7.24vw, 139px);
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Section Header ─────────────────────────────────────────────────────── */

.pub-header {
    display: flex;
    flex-direction: column;
    gap: 0px;
    margin-bottom: 64px;
}

/* Row 1: orange line + "PUBLICATIONS" label */
.pub-label-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

.pub-label-line {
    display: inline-block;
    width: 32px;
    height: 2px;
    background: #f16522;
    flex-shrink: 0;
}

.pub-label-text {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 150%;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #f16522;
}

/* Row 2: heading + search/filter controls — space-between */
.pub-heading-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

/* Heading: "Recent Peer-Reviewed Publications" */
.pub-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 44px;
    line-height: 120%;
    color: #1c2b4a;
    margin: 0;
    max-width: 560px;
}

.pub-heading-em {
    font-style: italic;
    font-weight: 700;
    color: #f16522;
}

.pub-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.pub-filter-field {
    flex-shrink: 0;
}

.pub-filter-select {
    appearance: none;
    min-width: 220px;
    max-width: 280px;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231c2b4a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    border: 1px solid #e5e7eb;
    padding: 12px 40px 12px 16px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(13, 27, 42, 0.8);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.pub-filter-select:hover {
    border-color: #f16522;
}

.pub-filter-select:focus {
    outline: none;
    border-color: #f16522;
    box-shadow: 0 0 0 3px rgba(241, 101, 34, 0.12);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Search box */
.pub-search-box {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    width: 280px;
    flex-shrink: 0;
    padding: 12px 60px 12px 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    position: relative;
}

.pub-search-icon {
    flex-shrink: 0;
    display: block;
    opacity: 0.5;
}

.pub-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 13px;
    line-height: 1.4;
    color: rgba(13, 27, 42, 0.8);
    padding: 0;
}

.pub-search-input::placeholder {
    color: rgba(13, 27, 42, 0.4);
}

/* ── Articles Grid (course-card style) ──────────────────────────────────── */

.pub-section .pub-articles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

.pub-section .pub-empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 48px 0;
    text-align: center;
    color: #5c5c5c;
    font-size: 16px;
    line-height: 1.5;
}

/* Reset homepage .pub-card rules from style.css */
.pub-section .pub-card {
    min-width: 0;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0;
    gap: 0;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    isolation: auto;
}

.pub-section .pub-card:hover {
    filter: none;
    overflow: hidden;
    box-shadow: var(--card-hover-shadow, 0 8px 24px rgba(28, 43, 74, 0.08));
}

.pub-section .pub-card-thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    flex-shrink: 0;
}

.pub-section .pub-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pub-section .pub-card-body {
    padding: 12px 12px 10px;
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: visible;
}

.pub-section .pub-card-date {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: Inter, 'DM Sans', sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 15px;
    color: #0d6e7a;
    margin: 0 0 6px;
    padding-top: 16px;
    padding-bottom: 10px;
}

.pub-section .pub-card-date svg {
    flex-shrink: 0;
}

.pub-section .pub-card-title {
    font-family: Inter, 'DM Sans', sans-serif;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.25;
    color: #111827;
    margin: 0 0 4px;
    padding-bottom: 8px;
    flex: 0 1 auto;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.pub-section .pub-card-authors {
    font-family: Inter, 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #110c2d;
    margin: 0 0 2px;
    line-height: 1.3;
    padding-bottom: 8px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    text-overflow: unset;
}

.pub-section .pub-card-org {
    font-family: Inter, 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
    line-height: 16px;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

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

.pub-pagination {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 64px;
    padding-bottom: 20px;
}

.pub-pag-pages {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

.pub-pag-arrow,
.pub-pag-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 6px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: rgba(13, 27, 42, 0.6);
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.pub-pag-arrow {
    min-width: 36px;
    color: rgba(13, 27, 42, 0.5);
}

.pub-pag-arrow:hover:not(:disabled),
.pub-pag-page:hover {
    border-color: #f16522;
    color: #f16522;
}

.pub-pag-page.pub-pag-active {
    background: #f16522;
    border-color: #f16522;
    color: #ffffff;
    font-weight: 600;
}

.pub-pag-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 1199px) {
    .pub-inner {
        padding-left: 48px;
        padding-right: 48px;
    }

    .pub-heading {
        font-size: 38px;
    }

    .pub-stat-box {
        padding: 36px 60px;
        width: 340px;
        height: 216px;
    }
}

@media (max-width: 991px) {
    .pub-section {
        padding: 80px 0 80px;
    }

    .pub-inner {
        padding-left: 32px;
        padding-right: 32px;
    }

    .pub-heading {
        font-size: 32px;
    }

    .pub-search-box {
        width: 220px;
        padding-right: 16px;
    }

    .pub-filter-select {
        min-width: 180px;
        max-width: 220px;
    }

    .pub-controls {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .pub-section .pub-articles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .pub-stats-inner {
        gap: 12px;
    }

    .pub-stat-box {
        padding: 32px 48px;
        width: 300px;
        height: 196px;
    }

    .pub-stat-number {
        font-size: 48px;
        line-height: 48px;
        width: 110px;
    }

    .pub-stat-number-wrap {
        width: 110px;
    }
}

@media (max-width: 767px) {
    .pub-section {
        padding: 60px 0 60px;
    }

    .pub-inner {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Stack heading and search vertically */
    .pub-heading-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .pub-heading {
        font-size: 28px;
        max-width: 100%;
    }

    .pub-controls {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .pub-filter-select {
        width: 100%;
        max-width: none;
        min-width: 0;
    }

    .pub-search-box {
        width: 100%;
        max-width: none;
    }

    .pub-section .pub-articles {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Stats stack */
    .pub-stats-inner {
        flex-direction: column;
        align-items: center;
    }

    .pub-stat-box {
        width: 100%;
        max-width: 349px;
        height: auto;
        min-height: 160px;
        padding: 28px 40px;
    }

    .pub-stat-number {
        font-size: 44px;
        line-height: 44px;
        width: auto;
    }

    .pub-stat-number-wrap {
        width: auto;
    }

    .pub-stat-label {
        font-size: 15px;
    }

    /* Pagination wraps */
    .pub-pag-pages {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .pub-stats {
        padding: 40px 16px;
    }

    .pub-header {
        margin-bottom: 40px;
    }

    .pub-section .pub-card-title {
        font-size: 18px;
    }

    .pub-section .pub-card-authors {
        font-size: 15px;
    }
}
