/**
 * Publications Section Block Styles
 *
 * All content lives inside a single white card. The card opens with the
 * "Publications" title (bullet dot + underline text, matching the design),
 * followed by the category hierarchy and the upcoming-publications list.
 *
 * @package ACF Child Theme
 */

:root {
    --color-yellow: #e3cd51;
    --color-light: #e7e9ed;
    --color-text: #595959;
    --color-teal: #375663;
    --color-white: #ffffff;
    --font-primary: 'Aptos', sans-serif;
}

/* ── Section Wrapper (full-width background) ─────────────────────────────────── */
.pubs-section {
    width: 100%;
    padding: 80px 0;
    margin-bottom: 0 !important;
}

/* ── Content Container (WordPress layout width) ──────────────────────────────── */
.pubs-section__container {
    max-width: var(--theme-normal-container-max-width, 1290px);
    width: var(--theme-container-width, 100%);
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Single card containing everything ───────────────────────────────────────── */
.pubs-card {
    background-color: var(--color-white, #ffffff);
    padding: 46px 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CARD TITLE — "Publications" with bullet dot + underline, matching the design
   ═══════════════════════════════════════════════════════════════════════════════ */

.pubs-card__header {
    margin-bottom: 32px;
}

/* The h2 row: bullet ● + underlined text side-by-side */
.pubs-card__title {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 0;
    font-family: var(--font-primary, 'Aptos', sans-serif);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text, #595959);
    line-height: 1.2;
}

/* Title bullet hidden per design refinement */
.pubs-card__title-bullet {
    display: none;
}

/* Underlined title text (text-decoration, as shown in the design) */
.pubs-card__title-text {
    text-decoration: underline;
    text-underline-offset: 5px;
    text-decoration-thickness: 2px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   CATEGORY HIERARCHY  Articles / Scientific Papers → HH / AH → links
   ═══════════════════════════════════════════════════════════════════════════════ */

.pubs-hierarchy {
    list-style: none;
    margin: 0;
    padding: 0 0 0 36px;
}

/* ── Group (Articles / Scientific Papers) ────────────────────────────────────── */
.pubs-hierarchy__group {
    margin-bottom: 28px;
}

.pubs-hierarchy__group:last-child {
    margin-bottom: 0;
}

/* Group label: bullet + bold text */
.pubs-hierarchy__group-label {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-primary, 'Aptos', sans-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text, #595959);
    margin-bottom: 14px;
}


/* Sub-list (Human Health / Animal Health items) */
.pubs-hierarchy__sub {
    list-style: none;
    margin: 0;
    padding: 0 0 0 36px;
}

/* ── Category (Human Health / Animal Health) ──────────────────────────────────── */
.pubs-hierarchy__category {
    margin-bottom: 18px;
}

.pubs-hierarchy__category:last-child {
    margin-bottom: 0;
}

/* Category label: coloured bullet + coloured text */
.pubs-hierarchy__cat-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-primary, 'Aptos', sans-serif);
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.pubs-hierarchy__cat-label::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    flex-shrink: 0;
}

/* ── Publication links list ───────────────────────────────────────────────────── */
.pubs-links {
    list-style: none;
    margin: 0;
    padding: 0 0 0 32px;
}

.pubs-links__item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 6px 0;
    font-family: var(--font-primary, 'Aptos', sans-serif);
    font-size: 0.975rem;
    line-height: 1.55;
    color: var(--color-text, #595959);
}

.pubs-links__bullet {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.pubs-links__link {
    color: var(--color-text, #595959);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    transition: color 0.2s ease;
}

.pubs-links__link:hover {
    color: var(--color-teal, #375663);
    text-decoration: underline;
}

.pubs-links__icon {
    width: 13px;
    height: 13px;
    fill: currentColor;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.pubs-links__link:hover .pubs-links__icon {
    opacity: 1;
}

.pubs-links__text {
    color: var(--color-text, #595959);
    flex: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   UPCOMING PUBLICATIONS LIST — inside the same card, below categories
   ═══════════════════════════════════════════════════════════════════════════════ */

/* Separator from the category section above */
.pubs-upcoming--with-separator {
    margin-top: 36px;
    padding-top: 36px;
    border-top: 1px solid var(--color-light, #e7e9ed);
}

/* Optional heading (e.g. "Upcoming Publications") */
.pubs-upcoming__title {
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-primary, 'Aptos', sans-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--color-text, #595959);
    margin: 0 0 20px 0;
}


/* List */
.pubs-upc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ── Base row ─────────────────────────────────────────────────────────────────── */
.pubs-upc-list__row {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 9px 0;
    font-family: var(--font-primary, 'Aptos', sans-serif);
    font-size: 1rem;
    color: var(--color-text, #595959);
    line-height: 1.5;
}

.pubs-upc-list__row:last-child {
    border-bottom: none;
}

/* Round bullet dot */
.pubs-upc-list__bullet {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

/* Title: flex-grows to fill available width */
.pubs-upc-list__title {
    flex: 1;
    min-width: 0;
}

/* Date: right-aligned, min-width so it doesn't wrap prematurely */
.pubs-upc-list__date {
    flex-shrink: 0;
    min-width: 210px;
    text-align: right;
    color: var(--color-text, #595959);
    white-space: nowrap;
}

/* ── Group header row (bold label, no date) ───────────────────────────────────── */
.pubs-upc-list__row--group .pubs-upc-list__title {
    font-weight: 700;
}

/* ── Sub-item row (indented, different bullet colour) ─────────────────────────── */
.pubs-upc-list__row--sub {
    padding-left: 28px;
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet: 769px – 1023px
   ═══════════════════════════════════════════════════════════════════════════════ */
@media (min-width: 769px) and (max-width: 1023px) {
    .pubs-section {
        padding: 60px 0;
    }

    .pubs-card {
        padding: 36px 32px;
    }

    .pubs-card__title {
        font-size: 1.5rem;
    }

    .pubs-hierarchy__group-label,
    .pubs-upcoming__title {
        font-size: 1.15rem;
    }

    .pubs-upc-list__date {
        min-width: 170px;
        font-size: 0.9rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile: up to 768px
   ═══════════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .pubs-section {
        padding: 48px 0;
    }

    .pubs-card {
        padding: 28px 20px;
    }

    .pubs-card__title {
        font-size: 1.25rem;
    }

    .pubs-hierarchy {
        padding-left: 20px;
    }

    .pubs-hierarchy__sub {
        padding-left: 16px;
    }

    .pubs-hierarchy__group-label,
    .pubs-upcoming__title {
        font-size: 1.05rem;
        margin-bottom: 10px;
    }

    .pubs-hierarchy__cat-label {
        font-size: 0.95rem;
    }

    .pubs-links {
        padding-left: 18px;
    }

    .pubs-links__item {
        font-size: 0.875rem;
    }

    .pubs-upcoming--with-separator {
        margin-top: 24px;
        padding-top: 24px;
    }

    /* Stack date below title on mobile */
    .pubs-upc-list__row {
        flex-wrap: wrap;
        gap: 2px 12px;
        font-size: 0.9rem;
    }

    .pubs-upc-list__date {
        min-width: unset;
        width: 100%;
        padding-left: 20px;
        text-align: left;
        font-size: 0.8rem;
        opacity: 0.72;
    }

    .pubs-upc-list__row--sub {
        padding-left: 18px;
    }
}
