/* UNISSULA SDG Manager - Detail Template v1.2.0 */

.usm-sdg-detail-shell,
.usm-sdg-detail-shell *,
.usm-sdg-detail-shell *::before,
.usm-sdg-detail-shell *::after {
    box-sizing: border-box;
}

.usm-sdg-detail-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 34px;
    width: 100%;
    align-items: start;
}

.usm-sdg-detail-sidebar {
    min-width: 0;
}

.usm-sdg-detail-content {
    min-width: 0;
}

.usm-sdg-detail-header {
    margin-bottom: 34px;
    padding: 26px;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--sdg-color) 10%, white), #ffffff 70%);
    border: 1px solid color-mix(in srgb, var(--sdg-color) 16%, #e8eeee);
    border-radius: 22px;
}

.usm-sdg-detail-heading {
    display: flex;
    align-items: center;
    gap: 20px;
}

.usm-sdg-detail-badge {
    width: 88px;
    height: 88px;
    flex: 0 0 88px;

    display: grid;
    place-items: center;

    overflow: hidden;

    background: var(--sdg-color);
    color: #fff;

    border-radius: 14px;

    font-size: 24px;
    font-weight: 800;
}

.usm-sdg-detail-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.usm-sdg-kicker {
    display: block;
    margin-bottom: 5px;

    color: var(--sdg-color);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.usm-sdg-detail-header h2 {
    margin: 0;
    color: #163038;
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.08;
}

.usm-sdg-detail-header p {
    max-width: 780px;
    margin: 10px 0 0;
    color: #62747a;
    font-size: 15px;
    line-height: 1.65;
}

.usm-sdg-section {
    margin-bottom: 42px;
}

.usm-sdg-section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.usm-sdg-section-heading > span {
    display: grid;
    place-items: center;

    width: 42px;
    height: 42px;

    background: color-mix(in srgb, var(--sdg-color) 12%, white);
    color: var(--sdg-color);

    border-radius: 12px;

    font-size: 12px;
    font-weight: 800;
}

.usm-sdg-section-heading small,
.usm-sdg-section-heading h3 {
    display: block;
}

.usm-sdg-section-heading small {
    margin-bottom: 2px;

    color: #879499;

    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.usm-sdg-section-heading h3 {
    margin: 0;

    color: #163038;

    font-size: 21px;
    line-height: 1.2;
}

.usm-sdg-prose {
    padding: 24px;

    background: #fff;

    border: 1px solid #e7eeee;
    border-radius: 18px;

    color: #41565c;

    font-size: 15px;
    line-height: 1.75;
}

.usm-sdg-prose > :first-child {
    margin-top: 0;
}

.usm-sdg-prose > :last-child {
    margin-bottom: 0;
}

.usm-sdg-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.usm-sdg-stat-card {
    min-height: 120px;
    padding: 22px;

    background: #fff;

    border: 1px solid #e6eded;
    border-top: 4px solid var(--sdg-color);
    border-radius: 16px;
}

.usm-sdg-stat-card strong,
.usm-sdg-stat-card span {
    display: block;
}

.usm-sdg-stat-card strong {
    color: var(--sdg-color);
    font-size: 30px;
    line-height: 1.05;
}

.usm-sdg-stat-card span {
    margin-top: 8px;
    color: #65767b;
    font-size: 13px;
}

.usm-sdg-post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.usm-sdg-post-card {
    overflow: hidden;

    background: #fff;

    border: 1px solid #e6eded;
    border-radius: 18px;

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.usm-sdg-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(20,48,56,.09);
}

.usm-sdg-post-image {
    display: block;
    aspect-ratio: 16 / 10;

    overflow: hidden;

    background: var(--sdg-color);
    color: #fff;

    text-decoration: none;
}

.usm-sdg-post-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform .3s ease;
}

.usm-sdg-post-card:hover .usm-sdg-post-image img {
    transform: scale(1.035);
}

.usm-sdg-post-image > span {
    display: grid;
    place-items: center;

    width: 100%;
    height: 100%;

    font-size: 24px;
    font-weight: 800;
}

.usm-sdg-post-body {
    padding: 18px;
}

.usm-sdg-post-body time {
    color: #8b979b;
    font-size: 11px;
}

.usm-sdg-post-body h4 {
    margin: 7px 0 9px;

    font-size: 16px;
    line-height: 1.35;
}

.usm-sdg-post-body h4 a {
    color: #163038;
    text-decoration: none;
}

.usm-sdg-post-body p {
    margin: 0 0 13px;

    color: #68797e;

    font-size: 12px;
    line-height: 1.55;
}

.usm-sdg-read-more {
    color: var(--sdg-color);

    font-size: 12px;
    font-weight: 700;

    text-decoration: none;
}

.usm-sdg-evidence-list {
    display: grid;
    gap: 10px;
}

.usm-sdg-evidence-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;

    min-height: 62px;
    padding: 10px 16px;

    background: #fff;

    border: 1px solid #e7eded;
    border-radius: 13px;

    color: #173038;

    text-decoration: none;

    transition:
        border-color .2s ease,
        transform .2s ease;
}

.usm-sdg-evidence-item:hover {
    border-color: var(--sdg-color);
    transform: translateX(2px);
}

.usm-sdg-evidence-number {
    color: var(--sdg-color);
    font-size: 11px;
    font-weight: 800;
}

.usm-sdg-evidence-title {
    font-size: 13px;
    font-weight: 650;
}

.usm-sdg-evidence-arrow {
    color: var(--sdg-color);
    font-size: 18px;
}

.usm-sdg-related-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.usm-sdg-related-card {
    display: flex;
    align-items: center;
    gap: 13px;

    padding: 10px;

    background: #fff;

    border: 1px solid #e7eded;
    border-radius: 14px;

    color: #173038;

    text-decoration: none;

    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.usm-sdg-related-card:hover {
    transform: translateY(-2px);
    border-color: var(--related-color);
    box-shadow: 0 10px 20px rgba(20,48,56,.07);
}

.usm-sdg-related-icon {
    display: grid;
    place-items: center;

    width: 58px;
    height: 58px;
    flex: 0 0 58px;

    overflow: hidden;

    background: var(--related-color);
    color: #fff;

    border-radius: 10px;

    font-weight: 800;
}

.usm-sdg-related-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.usm-sdg-related-card small,
.usm-sdg-related-card strong {
    display: block;
}

.usm-sdg-related-card small {
    margin-bottom: 3px;
    color: #88969a;
    font-size: 10px;
}

.usm-sdg-related-card strong {
    font-size: 13px;
    line-height: 1.35;
}

.usm-sdg-empty {
    padding: 18px;
    background: #fff7e8;
    border: 1px solid #efdbb4;
    border-radius: 12px;
    color: #6c552d;
}

@media (max-width: 1100px) {
    .usm-sdg-detail-shell {
        grid-template-columns: 1fr;
    }

    .usm-sdg-detail-sidebar {
        order: 0;
    }

    .usm-sdg-detail-content {
        order: 1;
    }

    .usm-sdg-stats,
    .usm-sdg-post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .usm-sdg-detail-header {
        padding: 18px;
        border-radius: 17px;
    }

    .usm-sdg-detail-heading {
        align-items: flex-start;
    }

    .usm-sdg-detail-badge {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
        border-radius: 10px;
    }

    .usm-sdg-detail-header h2 {
        font-size: 25px;
    }

    .usm-sdg-stats,
    .usm-sdg-post-grid,
    .usm-sdg-related-grid {
        grid-template-columns: 1fr;
    }

    .usm-sdg-prose {
        padding: 18px;
    }
}
