/* =========================================================
   COURSE PAGE
========================================================= */

.course-page {
    padding: 18px 0;
    color: var(--color-text);
}


/* =========================================================
   BREADCRUMBS
========================================================= */

.course-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 35px;
    color: rgba(44, 44, 44, 0.48);
    font-size: 12px;
    line-height: 1.4;
}

.course-breadcrumbs a {
    color: inherit;
    transition: color 0.2s ease;
}

.course-breadcrumbs a:hover {
    color: var(--color-accent);
}


/* =========================================================
   COURSE HEADER
========================================================= */

.course-page__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    align-items: start;
    gap: 60px;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(44, 44, 44, 0.05);
}

.course-page__heading {
    max-width: 820px;
}

.course-page__title {
    margin: 0;
    color: var(--color-text);
    font-size: clamp(46px, 4.7vw, 68px);
    line-height: 0.96;
    font-weight: 250;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}

.course-page__lead {
    max-width: 760px;
    margin: 11px 0 0;
    color: rgba(44, 44, 44, 0.62);
    font-size: 15px;
    line-height: 1.55;
}

.course-page__register {
    display: inline-flex;
    width: 250px;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    padding: 12px 22px;
    border: 1px solid var(--color-accent);
    border-radius: var(--border-radius);
    color: #ffffff;
    background: var(--color-accent);
    font-size: 14px;
    line-height: 1.2;
    font-weight: 500;
    text-align: center;
    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.course-page__register:hover {
	border-color: rgba(162, 86, 61, 1);
    color: #ffffff;
    background: rgba(162, 86, 61, 1);
}

button.course-page__register {
    appearance: none;
    font-family: inherit;
    cursor: pointer;
}


/* =========================================================
   COURSE LAYOUT
========================================================= */

.course-page__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    align-items: start;
    gap: 60px;
    padding-top: 40px;
}

.course-page__main {
    min-width: 0;
}


/* =========================================================
   GALLERY PREVIEW
========================================================= */

.course-gallery {
    margin-bottom: 20px;
}

.course-gallery__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.course-gallery__item {
    position: relative;
    display: block;
    width: 100%;
    height: 192px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: var(--border-radius);
    background: rgba(44, 44, 44, 0.05);
    cursor: pointer;
}

.course-gallery__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.course-gallery__item:hover .course-gallery__image {
    transform: scale(1.025);
}

.course-gallery__more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(20, 20, 20, 0.48);
    font-size: 28px;
    line-height: 1;
    font-weight: 500;
}

.course-gallery__label {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    padding: 8px 20px;
    border: 1px solid rgba(44, 44, 44, 0.08);
    border-radius: var(--border-radius);
    color: var(--color-text);
    background: transparent;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.course-gallery__label:hover {
    color: rgba(146, 70, 45, 1);
    background: rgba(247, 208, 108, 1);
    border-color: rgba(247, 208, 108, 1);
}


/* =========================================================
   GALLERY MODAL
========================================================= */

body.course-gallery-open {
    overflow: hidden;
}

.course-gallery-modal[hidden] {
    display: none;
}

.course-gallery-modal {
    position: fixed;
    z-index: 99999;
    inset: 0;
}

.course-gallery-modal__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(20, 20, 20, 0.56);
    cursor: default;
}

.course-gallery-modal__dialog {
    position: absolute;
    top: 63px;
    right: 0;
    bottom: 0;
    left: 0;
    overflow: hidden;
    border-radius:
        var(--border-radius)
        var(--border-radius)
        0
        0;
    color: #ffffff;
    background: #292929;
}

.course-gallery-modal__top {
    position: absolute;
    z-index: 5;
    top: 20px;
    right: 8.3%;
    left: 8.3%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.course-gallery-modal__counter {
    color: rgba(255, 255, 255, 0.66);
    font-size: 14px;
    line-height: 1.2;
}

.course-gallery-modal__close {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0;
    border: 0;
    color: #ffffff;
    background: transparent;
    font-size: 14px;
    cursor: pointer;
}

.course-gallery-modal__close-icon {
    display: flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.course-gallery-modal__close:hover
.course-gallery-modal__close-icon {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.06);
}

.course-gallery-modal__stage {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 78px 110px 54px;
}

.course-gallery-modal__slides {
    width: min(796px, calc(100vw - 260px));
}

.course-gallery-modal__slide {
    display: none;
    margin: 0;
    text-align: center;
}

.course-gallery-modal__slide.is-active {
    display: block;
}

.course-gallery-modal__image {
    display: block;
    width: 100%;
    max-height: calc(100vh - 300px);
    margin: 0 auto;
    border-radius: var(--border-radius);
    object-fit: contain;
}

.course-gallery-modal__caption {
    margin-top: 17px;
    color: #ffffff;
    font-size: 16px;
    line-height: 1.4;
    text-align: center;
}

.course-gallery-modal__arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    display: flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    color: #ffffff;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
    transition:
        border-color 0.2s ease,
        background-color 0.2s ease;
}

.course-gallery-modal__arrow:hover {
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.06);
}

.course-gallery-modal__arrow--prev {
    left: 8.3%;
}

.course-gallery-modal__arrow--next {
    right: 8.3%;
}

.course-gallery-modal__progress {
    position: absolute;
    bottom: 19px;
    left: 50%;
    width: 25px;
    height: 4px;
    overflow: hidden;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.18);
    transform: translateX(-50%);
}

.course-gallery-modal__progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #ffffff;
    transition:
        width 0.25s ease,
        transform 0.25s ease;
}


/* =========================================================
   INFORMATION CARDS
========================================================= */

.course-info {
    margin-top: 18px;
}

.course-info__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid rgba(44, 44, 44, 0.08);
    border-radius: var(--border-radius);
}

.course-info__item {
    min-height: 150px;
    padding: 22px 18px;
    border-right: 1px solid rgba(44, 44, 44, 0.08);
    border-bottom: 1px solid rgba(44, 44, 44, 0.08);
}

.course-info__item:nth-child(3n) {
    border-right: 0;
}

.course-info__item:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.course-info__icon {
    width: 30px;
    height: 30px;
    margin-bottom: 13px;
}

.course-info__icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.course-info__title {
    margin: 0 0 13px;
    font-size: 14px;
    line-height: 1.25;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: uppercase;
}

.course-info__text {
    margin: 0;
    color: rgba(44, 44, 44, 1);
    font-size: 16px;
    line-height: 1.5;
}


/* =========================================================
   COURSE CONTENT
========================================================= */

.course-content,
.course-program,
.course-benefits {
    margin-top: 40px;
}

.course-section-label {
    margin-bottom: 30px;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 500;
    text-transform: uppercase;
}

.course-content__body {
    color: rgba(44, 44, 44, 0.82);
    font-size: 15px;
    line-height: 1.7;
}

.course-content__body > *:first-child {
    margin-top: 0;
}

.course-content__body > *:last-child {
    margin-bottom: 0;
}

.course-content__body p {
    margin: 0 0 18px;
    font: inherit;
}

.course-content__body h2,
.course-content__body h3 {
    margin: 32px 0 12px;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: 0;
}

.course-content__body ul,
.course-content__body ol {
    margin: 18px 0;
    padding-left: 20px;
}

.course-content__body li + li {
    margin-top: 7px;
}


/* =========================================================
   COURSE PROGRAM
========================================================= */

.course-program__list {
    display: grid;
    gap: 20px;
}

.course-program__item {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 70px;
    align-items: start;
    gap: 28px;
}

.course-program__number {
    display: flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--color-text);
    background: #f2ca62;
    font-size: 13px;
    line-height: 1;
    font-weight: 600;
}

.course-program__content {
    min-width: 0;
    padding-top: 2px;
}

.course-program__title {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
}

.course-program__description {
    margin: 4px 0 0;
    color: rgba(44, 44, 44, 0.58);
    font-size: 16px;
    line-height: 1.5;
}

.course-program__hours {
    padding-top: 7px;
    color: rgba(44, 44, 44, 0.48);
    font-size: 13px;
    line-height: 1.3;
    text-align: right;
}


/* =========================================================
   COURSE BENEFITS
========================================================= */

.course-benefits__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px;
}

.course-benefits__item {
    min-width: 0;
}

.course-benefits__icon {
    width: 40px;
    height: 40px;
    margin-bottom: 14px;
}

.course-benefits__icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.course-benefits__title {
    margin: 0 0 13px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: uppercase;
}

.course-benefits__text {
    margin: 0;
    color: rgba(44, 44, 44, 1);
    font-size: 16px;
    line-height: 1.55;
}


/* =========================================================
   COURSE CTA
========================================================= */

.course-cta {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 250px;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--border-radius);
    background:
        var(--course-cta-background, none)
        center / cover no-repeat,
        var(--color-text);
}

.course-cta__overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 20, 20, 0.42);
}

.course-cta__content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-right: 24px;
    padding-left: 24px;
    box-sizing: border-box;
    color: #ffffff;
    text-align: center;
}

.course-cta__title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(38px, 4vw, 58px);
    line-height: 0.98;
    font-weight: 250;
    letter-spacing: -0.045em;
    text-transform: uppercase;
}

.course-cta__details {
    margin: 12px 0 0;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.4;
}

.course-cta__button {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    margin-top: 18px;
    padding: 10px 24px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: var(--border-radius);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
    font-size: 13px;
    line-height: 1.2;
    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.course-cta__button:hover {
    color: #000;
    background: #fff;
}

button.course-cta__button {
    appearance: none;
    font-family: inherit;
    cursor: pointer;
}


/* =========================================================
   COURSE NAVIGATION SIDEBAR
========================================================= */

.course-sidebar {
    min-width: 0;
    align-self: stretch;
}

.course-sidebar__inner {
    position: sticky;
    top: 89px;
    max-height: calc(100vh - 113px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color:
        rgba(44, 44, 44, 0.18)
        transparent;
}

.admin-bar .course-sidebar__inner {
    top: 121px;
    max-height: calc(100vh - 145px);
}

.course-sidebar__inner::-webkit-scrollbar {
    width: 4px;
}

.course-sidebar__inner::-webkit-scrollbar-track {
    background: transparent;
}

.course-sidebar__inner::-webkit-scrollbar-thumb {
    border-radius: 4px;
    background: rgba(44, 44, 44, 0.18);
}

.course-sidebar__nav {
    display: flex;
    width: 100%;
    flex-direction: column;
}

.course-sidebar__link {
    display: flex;
    width: 100%;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(44, 44, 44, 0.04);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.25;
    font-weight: 500;
    text-align: center;
    text-transform: uppercase;
    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.course-sidebar__link:first-child {
    border-top: 1px solid rgba(44, 44, 44, 0.04);
}

a.course-sidebar__link:hover {
    color: var(--color-accent);
    background: rgba(146, 70, 45, 0.025);
}

.course-sidebar__link.is-current {
    color: var(--color-accent);
    cursor: default;
}


/* =========================================================
   RESPONSIVE — SMALL DESKTOP
========================================================= */

@media (max-width: 1100px) {
    .course-page__header,
    .course-page__layout {
        grid-template-columns: minmax(0, 1fr) 210px;
        gap: 38px;
    }

    .course-page__register {
        width: 210px;
    }

    .course-gallery__item {
        height: 165px;
    }

    .course-sidebar__link {
        min-height: 68px;
        padding: 14px 12px;
        font-size: 14px;
    }
}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 900px) {
    .course-page {
        padding-bottom: 80px;
    }

    .course-page__header {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .course-page__register {
        width: min(100%, 320px);
        margin-top: 0;
    }

    .course-page__layout {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .course-sidebar {
        grid-row: 1;
        width: 100%;
        align-self: auto;
    }

    .course-sidebar__inner,
    .admin-bar .course-sidebar__inner {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .course-sidebar__nav {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        scrollbar-width: none;
    }

    .course-sidebar__nav::-webkit-scrollbar {
        display: none;
    }

    .course-sidebar__link {
        width: auto;
        min-width: max-content;
        min-height: 48px;
        flex: 0 0 auto;
        padding: 12px 20px;
        border-top: 1px solid rgba(44, 44, 44, 0.04);
        border-right: 1px solid rgba(44, 44, 44, 0.04);
        border-bottom: 1px solid rgba(44, 44, 44, 0.04);
        font-size: 13px;
        white-space: nowrap;
    }

    .course-sidebar__link:first-child {
        border-left: 1px solid rgba(44, 44, 44, 0.04);
    }

    .course-sidebar__link.is-current {
        background: rgba(146, 70, 45, 0.04);
    }


    /* =====================================================
       TABLET GALLERY MODAL
    ===================================================== */

    .course-gallery-modal {
        position: fixed;
        inset: 0;
        z-index: 99999;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
        background: #292929;
    }

    .course-gallery-modal__backdrop {
        background: #292929;
    }

    .course-gallery-modal__dialog,
    .admin-bar .course-gallery-modal__dialog {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        height: 100dvh;
        max-width: none;
        max-height: none;
        overflow: hidden;
        border-radius: 0;
        background: #292929;
    }

    .course-gallery-modal__top {
        position: absolute;
        z-index: 5;
        top: 23px;
        right: 16px;
        left: 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
    }

    .course-gallery-modal__counter {
        color: rgba(255, 255, 255, 0.58);
        font-size: 14px;
        line-height: 1.2;
        font-weight: 400;
    }

    .course-gallery-modal__close {
        display: inline-flex;
        width: 38px;
        height: 38px;
        align-items: center;
        justify-content: center;
        gap: 0;
        padding: 0;
        border: 0;
        color: #ffffff;
        background: transparent;
        font-size: 24px;
        line-height: 1;
        font-weight: 300;
    }

    .course-gallery-modal__close > span:first-child {
        display: none;
    }

    .course-gallery-modal__close-icon {
        display: flex;
        width: 38px;
        height: 38px;
        align-items: center;
        justify-content: center;
        border: 0;
        border-radius: 0;
        font-size: 24px;
        line-height: 1;
    }

    .course-gallery-modal__stage {
        position: relative;
        display: flex;
        width: 100%;
        height: 100%;
        align-items: center;
        justify-content: center;
        padding: 80px 16px 70px;
        box-sizing: border-box;
    }

    .course-gallery-modal__slides {
        width: 100%;
        max-width: 620px;
    }

    .course-gallery-modal__slide {
        display: none;
        margin: 0;
        text-align: center;
    }

    .course-gallery-modal__slide.is-active {
        display: block;
    }

    .course-gallery-modal__image {
        display: block;
        width: 100%;
        max-height: calc(100dvh - 260px);
        margin: 0 auto;
        border-radius: 10px;
        object-fit: contain;
    }

    .course-gallery-modal__caption {
        max-width: 320px;
        margin: 14px auto 0;
        padding: 0;
        color: rgba(255, 255, 255, 0.52);
        font-size: 16px;
        line-height: 1.35;
        font-weight: 400;
        text-align: center;
    }

    .course-gallery-modal__arrow {
        display: none;
    }

    .course-gallery-modal__progress {
        position: absolute;
        z-index: 5;
        bottom: 34px;
        left: 50%;
        width: 25px;
        height: 4px;
        overflow: hidden;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.16);
        transform: translateX(-50%);
    }

    .course-gallery-modal__progress span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: #ffffff;
    }
}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 767px) {
    .course-page {
        padding-top: 14px;
        padding-bottom: 64px;
    }

    .course-breadcrumbs {
        margin-bottom: 22px;
    }

    .course-page__header {
        padding-bottom: 26px;
    }

    .course-page__title {
        font-size: 42px;
    }

    .course-page__lead {
        font-size: 14px;
    }

    .course-page__layout {
        gap: 24px;
        padding-top: 26px;
    }

    .course-gallery__grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .course-gallery__item {
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .course-info__grid {
        grid-template-columns: 1fr;
    }

    .course-info__item,
    .course-info__item:nth-child(3n),
    .course-info__item:nth-last-child(-n + 2) {
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(44, 44, 44, 0.08);
    }

    .course-info__item:last-child {
        border-bottom: 0;
    }

    .course-content,
    .course-program,
    .course-benefits {
        margin-top: 38px;
    }

    .course-program__item {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .course-program__number {
        width: 34px;
        height: 34px;
    }

    .course-program__hours {
        grid-column: 2;
        padding-top: 2px;
        text-align: left;
    }

    .course-benefits__grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .course-cta {
        min-height: 300px;
        margin-top: 42px;
    }

    .course-cta__content {
        width: 100%;
        padding-right: 16px;
        padding-left: 16px;
        box-sizing: border-box;
    }

    .course-cta__title {
        font-size: 38px;
    }


    /* =====================================================
       MOBILE GALLERY MODAL
    ===================================================== */

    .course-gallery-modal__top {
        top: 23px;
        right: 16px;
        left: 16px;
    }

    .course-gallery-modal__stage {
        padding: 80px 16px 70px;
    }

    .course-gallery-modal__slides {
        width: 100%;
        max-width: none;
    }

    .course-gallery-modal__image {
        width: 100%;
        max-height: calc(100dvh - 260px);
        border-radius: 10px;
    }

    .course-gallery-modal__caption {
        max-width: 320px;
        margin-top: 14px;
        padding: 0;
        font-size: 16px;
    }
}


/* =========================================================
   RESPONSIVE — SMALL MOBILE
========================================================= */

@media (max-width: 480px) {
    .course-page__title {
        font-size: 36px;
    }

    .course-page__register {
        width: 100%;
    }

    .course-sidebar__link {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 12px;
    }

    .course-cta__content {
        width: 100%;
        padding-right: 16px;
        padding-left: 16px;
    }

    .course-cta__title {
        font-size: 32px;
    }
}