/* ─── Programmes page — matches invento.uz/programms ─────────────────────── */

.programmes-page {
    --pg-teal: #00828e;
    --pg-beet: #7e2f3d;
    --pg-orange: #ff9900;
    --pg-bg-secondary: #f2f9f9;
    --pg-text: #474849;
    --pg-text-secondary: #959aa6;
    --pg-radius: 20px;
    --pg-grad-head: linear-gradient(281deg, #892436 11.88%, #02aaba 84.86%);
    width: 100%;
    color: var(--pg-text);
}

.programmes-page > section {
    margin-top: clamp(2.5rem, 5vw, 5rem);
}
.programmes-page > section:first-child {
    margin-top: 0;
}

.programmes-page .font-gradient {
    background: var(--pg-grad-head);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ── 1. Page banner (white card) ── */
.prog-banner {
    padding-top: 20px;
}
.prog-banner__card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: var(--pg-radius);
    box-shadow: 0 4px 32px rgba(130, 130, 130, 0.2);
    overflow: hidden;
    min-height: 102px;
}
.prog-banner__text {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-self: stretch;
    min-height: 102px;
}
.prog-banner__text .site-bc {
    color: var(--pg-text-secondary);
    flex-shrink: 0;
}
.prog-banner__text .site-bc__item a:hover {
    color: var(--pg-teal);
}
.prog-banner__title {
    margin: 0;
    margin-top: auto;
    font-weight: 700;
    font-size: clamp(1.75rem, 5vw, 3.25rem);
    line-height: 1.1;
    background: var(--pg-grad-head);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    display: inline-block;
}
.prog-banner__media {
    display: none;
}
@media (min-width: 768px) {
    .prog-banner__card {
        flex-direction: row;
        align-items: stretch;
        min-height: 200px;
    }
    .prog-banner__text {
        flex: 0 0 50%;
        padding: 32px 40px;
        min-height: 200px;
    }
    .prog-banner__media {
        display: block;
        flex: 1;
        position: relative;
        background: url("../img/pattern_min.3455eee9d12e.svg") no-repeat -35px center;
        background-size: 400px 400px;
    }
    .prog-banner__img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0 var(--pg-radius) var(--pg-radius) 0;
        clip-path: ellipse(80% 121% at 87% 82%);
    }
}
@media (min-width: 1200px) {
    .prog-banner__card {
        min-height: 280px;
    }
    .prog-banner__text {
        padding: 40px 60px;
        min-height: 280px;
    }
    .prog-banner__media {
        background-size: 450px 450px;
    }
    .prog-banner__img {
        clip-path: ellipse(75% 125% at 87% 95%);
    }
}

/* ── 2. IB intro + PDF files ── */
.prog-intro__grid {
    display: grid;
    gap: 1.5rem 2.5rem;
}
@media (min-width: 992px) {
    .prog-intro__grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}
.prog-intro__lead {
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}
.prog-intro__text {
    font-size: 1.125rem;
    line-height: 1.6;
}
.prog-intro__text p {
    margin-bottom: 1rem;
}
.prog-intro__text ul {
    list-style: none;
    padding-left: 20px;
    margin: 0.75rem 0 1rem;
}
.prog-intro__text ul li {
    position: relative;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}
.prog-intro__text ul li::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 0.65em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--pg-text);
}
.prog-intro__text a {
    color: var(--pg-teal);
}
.prog-intro__files {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-top: clamp(2.5rem, 5vw, 5rem);
}
.prog-file {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
    color: var(--pg-text);
    margin-right: 16px;
    margin-bottom: 20px;
    transition: opacity 0.2s ease;
}
.prog-file:hover {
    opacity: 0.85;
}
.prog-file__thumb {
    margin: 0 16px 20px;
    max-width: 150px;
    height: auto;
    display: block;
}
@media (min-width: 768px) {
    .prog-file__thumb {
        max-width: 170px;
    }
}
.prog-file__text {
    padding-left: 35px;
    position: relative;
}
.prog-file__name {
    display: block;
    color: var(--pg-teal);
    font-weight: 400;
    position: relative;
}
.prog-file__name::before {
    content: "";
    position: absolute;
    left: -32px;
    top: 0;
    width: 24px;
    height: 24px;
    background: url("../img/icons/arrow-down-tray.0054f0c62775.svg") no-repeat center;
    filter: invert(32%) sepia(87%) saturate(1442%) hue-rotate(158deg) brightness(87%) contrast(101%);
}
.prog-file:hover .prog-file__name::before {
    filter: invert(25%) sepia(66%) saturate(1641%) hue-rotate(156deg) brightness(97%) contrast(98%);
}
.prog-file__size {
    display: block;
    opacity: 0.4;
    font-size: 0.9rem;
}

/* ── 3. Programmes list (stages timeline) ── */
.prog-list__card {
    background: #fff;
    border-radius: var(--pg-radius);
    padding: clamp(1.5rem, 3vw, 2.5rem) 0;
}
.prog-stages {
    --stages-item-ui-color: var(--pg-orange);
}
.prog-stages__item {
    position: relative;
    padding: 0 0 39px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.prog-stages__item.is-visible {
    opacity: 1;
    transform: none;
}
.prog-stages__item:last-child {
    padding-bottom: 0;
}
.prog-stages__item::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--stages-item-ui-color);
    display: none;
}
.prog-stages__item::after {
    content: "";
    position: absolute;
    top: 28px;
    left: 8px;
    width: 1px;
    height: calc(100% - 32px);
    background: var(--stages-item-ui-color);
    display: none;
}
.prog-stages__row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.prog-stages__thumb-link {
    display: none;
    flex-shrink: 0;
    width: 80px;
    min-width: 80px;
    text-decoration: none;
}
@media (min-width: 576px) {
    .prog-stages__thumb-link {
        display: block;
    }
}
.prog-stages__thumb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}
.prog-stages__content {
    flex: 1;
    display: grid;
    gap: 0;
}
@media (min-width: 992px) {
    .prog-stages__item::before {
        display: block;
        left: 41%;
    }
    .prog-stages__item::after {
        display: block;
        left: calc(41% + 8px);
    }
    .prog-stages__content {
        grid-template-columns: 1fr 2fr;
        gap: 88px;
        align-items: start;
        min-height: 92px;
    }
    .prog-stages__desc {
        padding-left: 50px;
    }
}
@media (min-width: 1200px) {
    .prog-stages__item::before {
        left: 40%;
    }
    .prog-stages__item::after {
        left: calc(40% + 8px);
    }
}
@media (min-width: 1400px) {
    .prog-stages__item::before {
        left: 39%;
    }
    .prog-stages__item::after {
        left: calc(39% + 8px);
    }
}
.prog-stages__title {
    display: inline-block;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.5rem;
    text-decoration: none;
}
a.prog-stages__title:hover {
    opacity: 0.85;
}
.prog-stages__badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid var(--pg-teal);
    color: var(--pg-teal);
    text-decoration: none;
    margin: 0 8px 8px 0;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.prog-stages__badge--ashgabat {
    border-color: var(--pg-beet);
    color: var(--pg-beet);
}
a.prog-stages__badge:hover {
    background: var(--pg-teal);
    border-color: var(--pg-teal);
    color: #fff;
}
a.prog-stages__badge--ashgabat:hover {
    background: var(--pg-beet);
    border-color: var(--pg-beet);
    color: #fff;
}
.prog-stages__age {
    display: inline-block;
    font-size: 16px;
    font-weight: 700;
    color: var(--pg-text-secondary);
    margin-bottom: 8px;
    vertical-align: top;
}
@media (min-width: 768px) {
    .prog-stages__age {
        font-size: 22px;
    }
}
.prog-stages__desc {
    font-size: 1rem;
    line-height: 1.5;
}
@media (min-width: 992px) {
    .prog-stages__desc {
        font-size: 1.125rem;
    }
}
.prog-stages__desc p {
    margin: 0;
}

/* ── 4. CTA banner ── */
.prog-cta__banner {
    border-radius: var(--pg-radius);
    background: var(--pg-teal);
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 24px 20px 30px;
}
.prog-cta__content {
    flex: 1 1 auto;
    min-width: 0;
}
.prog-cta__heading {
    margin: 0 0 1rem;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
}
.prog-cta__heading-suffix {
    white-space: normal;
}
.prog-cta__decor {
    flex-shrink: 0;
    text-align: center;
    margin: 0 auto;
    perspective: 600px;
}
.prog-cta__decor img {
    max-width: 120px;
    height: auto;
    transform-origin: center center;
    backface-visibility: hidden;
    animation: prog-cta-logo-wiggle 0.75s ease-in-out infinite alternate;
}
@keyframes prog-cta-logo-wiggle {
    from {
        transform: rotateY(-18deg);
    }
    to {
        transform: rotateY(18deg);
    }
}
.prog-cta__btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border: 2px solid #fff;
    border-radius: 30px;
    background: transparent;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}
.prog-cta__btn:hover {
    background: #fff;
    color: var(--pg-teal);
}
/* Phone: one compact row — text and a small logo, nothing past the screen edge */
@media (max-width: 767.98px) {
    .prog-cta__banner {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        gap: 12px;
        padding: 14px 14px 14px 16px;
        overflow: hidden;
    }
    .prog-cta__content {
        flex: 1 1 auto;
        min-width: 0;
    }
    .prog-cta__heading {
        margin-bottom: 0.7rem;
        font-size: 1.05rem;
        line-height: 1.25;
        overflow-wrap: break-word;
    }
    .prog-cta__btn {
        padding: 9px 16px;
    }
    .prog-cta__decor {
        flex: 0 0 64px;
        width: 64px;
        margin: 0;
    }
    .prog-cta__decor img {
        width: 64px;
        max-width: 64px;
    }
}
@media (min-width: 768px) {
    .prog-cta__banner {
        padding: 20px 32px;
        text-align: left;
    }
    .prog-cta__content {
        flex: 1 1 75%;
        max-width: 75%;
    }
    .prog-cta__heading {
        margin-bottom: 1rem;
        font-size: 28px;
        max-width: 22em;
    }
    .prog-cta__decor {
        margin: 0;
    }
    .prog-cta__decor img {
        max-width: 140px;
    }
}
@media (min-width: 992px) {
    .prog-cta__banner {
        padding: 20px 60px;
    }
    .prog-cta__heading {
        font-size: 40px;
        max-width: 15em;
    }
    .prog-cta__decor img {
        max-width: 160px;
    }
}
