/* ESGRI Further Reading — styles for the "Further Reading" section */
.esgri-fr {
    max-width: 880px;
    margin: 48px auto 0;
    padding: 32px 0 0;
    text-align: center;
    position: relative;
}
.esgri-fr::before {
    content: '';
    position: absolute;
    top: 0;
    left: -170px;
    right: -170px;
    height: 2px;
    background: #193b65;
}
.esgri-fr__title {
    font-size: 28px;
    font-weight: 700;
    color: #193b65;
    margin: 0 0 4px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.esgri-fr__subtitle {
    font-size: 18px;
    color: #193b65;
    margin: 0 auto 32px !important;
    padding: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.esgri-fr__badge {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    background: #193b65;
    padding: 2px 10px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}
.esgri-fr__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style: none;
    margin: 24px 0 0 !important;
    padding: 0 !important;
}
.esgri-fr__item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    padding: 16px 20px;
    text-align: left;
    background: #f7fafc;
    border: 2px solid #193b65;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.esgri-fr__item:hover {
    background: #193b65;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.esgri-fr__item:hover .esgri-fr__link {
    color: #fff;
}
.esgri-fr__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    color: #193b65;
    opacity: 0.6;
}
.esgri-fr__link {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
    text-decoration: none;
    line-height: 1.55;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    display: block;
}
.esgri-fr__link:hover {
    color: #193b65;
}
.esgri-fr__source {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: #193b65;
    padding: 1px 6px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.5px;
}
@media (max-width: 768px) {
    .esgri-fr { max-width: 100%; padding: 24px 0 0; margin-top: 32px; }
    .esgri-fr__item { padding: 12px 14px; }
    .esgri-fr__link { font-size: 15px; }
}

/* Minimize / Expand buttons — hidden by default, shown only on desktop */
.esgri-fr__minimize,
.esgri-fr__expand {
    display: none;
}

/* Desktop — floating sidebar on the right */
@media (min-width: 1200px) {
    .esgri-fr {
        position: fixed;
        right: 24px;
        top: 50%;
        transform: translateY(-50%);
        max-width: 300px;
        width: 300px;
        margin: 0;
        padding: 24px 20px;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 6px 28px rgba(0,0,0,0.12);
        z-index: 99;
        max-height: 80vh;
        overflow-y: auto;
        transition: all 0.3s ease;
    }
    .esgri-fr::before {
        display: none;
    }
    .esgri-fr__title {
        font-size: 20px;
        margin: 0 0 2px;
    }
    .esgri-fr__subtitle {
        font-size: 13px !important;
        margin: 0 auto 20px !important;
    }
    .esgri-fr__badge {
        font-size: 11px;
        padding: 1px 7px;
    }
    .esgri-fr__list {
        gap: 10px;
        margin-top: 16px !important;
    }
    .esgri-fr__item {
        padding: 12px 14px;
    }
    .esgri-fr__link {
        font-size: 13px;
        line-height: 1.45;
    }

    /* Minimize button (top-right of expanded card) */
    .esgri-fr__minimize {
        display: block;
        position: absolute;
        top: 8px;
        right: 10px;
        width: 24px;
        height: 24px;
        padding: 0;
        background: transparent;
        border: none;
        color: #718096;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
        transition: color 0.2s ease;
        z-index: 2;
    }
    .esgri-fr__minimize:hover {
        color: #193b65;
    }

    /* Collapsed state — vertical half-pill sticking out from right edge */
    .esgri-fr--collapsed {
        top: 50%;
        bottom: auto;
        right: -30px;
        transform: translateY(-50%);
        width: auto;
        max-width: none;
        padding: 0;
        max-height: none;
        overflow: visible;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        transition: right 0.3s ease;
    }
    .esgri-fr--collapsed:hover {
        right: -20px;
    }
    .esgri-fr--collapsed .esgri-fr__title,
    .esgri-fr--collapsed .esgri-fr__subtitle,
    .esgri-fr--collapsed .esgri-fr__list,
    .esgri-fr--collapsed .esgri-fr__minimize {
        display: none;
    }
    .esgri-fr--collapsed .esgri-fr__expand {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 70px;
        height: 180px;
        padding: 0 0 0 30px;
        background: #193b65;
        color: #fff;
        border: none;
        border-radius: 40px;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 1px;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        cursor: pointer;
        box-shadow: -4px 4px 16px rgba(25, 59, 101, 0.3);
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        text-orientation: mixed;
    }
}
