/* ============================
   SDG / ЦУР Pages
   ============================ */

/* Intro section: text + UN logo */
.sdg-intro {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    /*padding: 0 32px;  */
    margin: 0 0 50px;
}

.sdg-intro__text {
    flex: 1;
    min-width: 0;
    /* max-width: 936px; */
}

.sdg-intro__text p {
    font-size: 18px;
    line-height: 24px;
    color: #242624;
    margin-bottom: 16px;
}

.sdg-intro__text p:last-child {
    margin-bottom: 0;
}

.sdg-intro__text a {
    display: inline;
    color: #4680d9;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}

.sdg-intro__text a:hover {
    border-bottom-color: #4680d9;
}

.sdg-intro__text h1 {
    margin-bottom: 32px;
}

.sdg-page h1 {
    font-size: 56px;
    line-height: 60px;
    font-weight: 750;
    color: #242624;
}

.sdg-intro__logo {
    flex: 0 0 347px;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;
}

.sdg-un-logo {
    width: 280px;
    height: 260px;
}

.sdg-intro__logo img {
    object-fit: contain;
}

/* Goals Grid - Listing Page */
.sdg-goals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 0 0 60px;
}

.sdg-card {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    background: #F6F6F6;
    padding: 24px;
    gap: 24px;
    /* height auto-equalizes via CSS grid row stretch */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: #242624;
}

.sdg-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    color: #242624;
    text-decoration: none;
}

/* Card top: icon left + arrow right */
.sdg-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.sdg-card__icon {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sdg-card__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}

.sdg-card__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    color: #000;
    transition: opacity 0.2s;
}

.sdg-card__arrow svg {
    width: 24px;
    height: 24px;
}

.sdg-card:hover .sdg-card__arrow {
    opacity: 0.7;
}

.sdg-card__content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 16px;
    flex: 1;
}

.sdg-card__title {
    font-size: 24px;
    font-weight: 550;
    margin: 0;
    line-height: 28px;
    color: #242624;
}

.sdg-card__desc {
    font-size: 18px;
    font-weight: 450;
    color: #242624;
    line-height: 24px;
    margin: 0;
}

/* ============================
   Detail Page
   ============================ */

.sdg-detail .content-sidebar {
    display: flex;
    gap: 16px;
}

.sdg-detail .main {
    flex: 1;
    min-width: 0;
}

.sdg-detail .sidebar {
    flex: 0 0 25%;
    max-width: 25%;
}

/* Hero block */
.sdg-detail__hero {
    display: flex;
    align-items: center;
    padding: 30px;
    border-radius: 10px;
    color: #fff;
    margin-bottom: 40px;
    gap: 24px;
}

.sdg-detail__icon {
    width: 180px;
    height: 180px;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: cover;
}

.sdg-detail__hero-text {
    flex: 1;
}

.sdg-detail__number {
    font-size: 89px;
    font-weight: 750;
    line-height: 1;
    opacity: 0.1;
    display: block;
    margin-bottom: 8px;
}

.sdg-detail__title {
    font-size: 40px;
    font-weight: 750;
    color: #fff;
    margin: 0;
    line-height: 60px;
}

/* Body content */
.sdg-detail__body {
    font-size: 18px;
    line-height: 24px;
    color: #575757;
    margin-bottom: 40px;
}

.sdg-detail__body h2,
.sdg-detail__body h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #242624;
}

.sdg-detail__body p {
    margin-bottom: 16px;
}

.sdg-detail__body ul,
.sdg-detail__body ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.sdg-detail__body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

/* ============================
   Sidebar with 17 goal icons
   ============================ */

.sdg-sidebar {
    position: sticky;
    top: 100px;
}

.sdg-sidebar__title {
    display: block;
    font-size: 18px;
    margin-bottom: 16px;
    color: #242624;
}

.sdg-sidebar__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.sdg-sidebar__item {
    border-radius: 2px;
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.2s ease;
    display: block;
}

.sdg-sidebar__item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.sdg-sidebar__item:hover {
    opacity: 1;
    transform: scale(1.08);
}

.sdg-sidebar__item.active {
    opacity: 1;
}

.sdg-sidebar__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #4680d9;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.sdg-sidebar__back:hover {
    color: #2c5aa0;
    text-decoration: none;
}

/* ============================
   Responsive
   ============================ */

@media (max-width: 991px) {
    .sdg-page {
        padding-left: 20px;
        padding-right: 20px;
    }

    .sdg-page .breadcrumbs {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
    }
	
	.sdg-page .upper,
    .sdg-page .nav-down {
        right: 0;
    }


    body main .sdg-page h1 {
        font-size: 36px;
		line-height: 42px;
    }
	
	.sdg-intro__text p {
        font-size: 16px;
        line-height: 22px;
    }

    /* Breadcrumbs: prevent overlap, allow wrapping */
    .sdg-page .breadcrumbs ul {
        gap: 8px;
    }

    .sdg-page .breadcrumbs ul li {
        margin-right: 0;
    }

    .sdg-page .breadcrumbs ul li a,
    .sdg-page .breadcrumbs ul li span {
        padding: 5px 14px;
        font-size: 12px;
        white-space: nowrap;
    }

    .sdg-intro {
        flex-direction: column;
        gap: 24px;
    }

    .sdg-intro__logo {
        flex: 0 0 auto;
        text-align: center;
    }

    .sdg-un-logo {
        width: 220px;
    }

    .sdg-goals-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .sdg-card__icon {
        width: 100px;
        height: 100px;
    }

    .sdg-card__title {
        font-size: 20px;
        line-height: 24px;
    }
	
    .sdg-detail__body,
    .sdg-detail__body p {
        font-size: 16px;
        line-height: 22px;
    }

    .sdg-card__desc {
        font-size: 16px;
    }

    .sdg-detail .content-sidebar {
        flex-direction: column;
    }

    .sdg-detail .main,
    .sdg-detail .sidebar {
        max-width: 100%;
        flex: 0 0 100%;
    }

    .sdg-sidebar {
        position: static;
    }

    .sdg-sidebar__grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .sdg-sidebar__item img {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .sdg-detail__icon {
        width: 140px;
        height: 140px;
    }

    .sdg-detail__number {
        font-size: 48px;
    }

    .sdg-detail__title {
        font-size: 22px;
    }
}

@media (max-width: 575px) {
        .sdg-page {
        padding-left: 16px;
        padding-right: 16px;
    }

    .sdg-page .breadcrumbs {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    body main .sdg-page h1 {
        font-size: 26px;
        line-height: normal;
    }
	
    .sdg-detail__body,
    .sdg-detail__body p {
        font-size: 14px;
        line-height: 20px;
    }
	
	.sdg-detail__body {
        font-size: 13px;
        line-height: 18px;
    }

    .sdg-page .breadcrumbs ul li a,
    .sdg-page .breadcrumbs ul li span {
        padding: 4px 10px;
        font-size: 11px;
    }

    .sdg-goals-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .sdg-card {
        padding: 20px;
        gap: 20px;
    }

    .sdg-card__icon {
        width: 80px;
        height: 80px;
    }

    .sdg-card__title {
        font-size: 18px;
    }

    .sdg-card__desc {
        font-size: 15px;
    }

    .sdg-un-logo {
        width: 180px;
    }

    .sdg-detail__hero {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .sdg-detail__icon {
        width: 120px;
        height: 120px;
    }

    .sdg-detail__number {
        font-size: 36px;
    }

    .sdg-detail__title {
        font-size: 20px;
    }

    .sdg-sidebar__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1600px) {
    .sdg-page .container {
        max-width: 1500px;
        margin-left: auto;
        margin-right: auto;
    }
}
@media (min-width: 1800px) {
    .sdg-page .container {
        max-width: 1820px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 50px;
        padding-right: 50px;
    }
}

@media (min-width: 1600px) and (max-width: 1799px) {
    .sdg-page .present-btn {
        right: -50px;
    }
    .sdg-page .work-btn {
        right: -15px;
    }
    .sdg-page .top-btn {
        right: -30px;
    }
}
@media (min-width: 1800px) {
    .sdg-page .present-btn {
        right: calc(50% - 1100px);
    }
    .sdg-page .work-btn {
        right: calc(50% - 1065px);
    }
    .sdg-page .top-btn {
        right: calc(50% - 1080px);
    }
}


.sdg-page h1 {
    font-size: 56px;
    font-weight: 550;
}





