/* Course landing (CourseLanding snippet). One file, one block per section — same order as course_landing/_html.html. */

.course-v2 {
    --course-bg: #0d0d0d;
    --course-card: #161616;
    --course-border: rgba(255, 255, 255, 0.1);
    --course-text: #fff;
    --course-muted: rgba(255, 255, 255, 0.65);
    --course-accent: #e02022;
    --course-radius: 8px;
    background: var(--course-bg);
    color: var(--course-text);
}

/* ---------- Layout from base template (same trick as walk-in) ---------- */

.course-landing-body header.section .headerImage,
.course-landing-body header.section .decorative-bg-video {
    display: none !important;
}

.course-landing-body header.section {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 5;
    height: auto !important;
    min-height: 0 !important;
    background: transparent;
    margin: 0;
    padding: 0;
}

.course-landing-body main.container,
.course-landing-body > main {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
}

/* ---------- Shared ---------- */

/* Section width = site .container (same as navbar/breadcrumbs), no own max-width. */

.course-v2 section {
    padding: 40px 0;
}

.course-title {
    margin: 0 0 10px;
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 600;
    color: var(--course-text);
    text-transform: none;
}

.course-intro {
    margin: 0 0 24px;
    max-width: 760px;
    color: var(--course-muted);
    font-size: 14px;
}

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

.course-rich {
    color: var(--course-muted);
    font-size: 15px;
    line-height: 1.6;
}

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

.course-icon {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    color: var(--course-accent);
}

.course-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 24px;
    border-radius: 4px;
    border: 1px solid var(--course-accent);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s;
}

.course-btn--primary {
    background: var(--course-accent);
    color: #fff;
}

.course-btn--primary:hover {
    background: #b9161a;
    color: #fff;
}

.course-btn--outline {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.course-btn--outline:hover {
    border-color: #fff;
    color: #fff;
}

.course-btn--block {
    width: 100%;
}

/* Carousel arrows: inside the slider on the left/right edge, always visible (like other site carousels). */
.course-v2 .course-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    opacity: 1;
}

.course-v2 .course-arrow.splide__arrow--prev {
    left: 8px;
}

.course-v2 .course-arrow.splide__arrow--next {
    right: 8px;
}

.course-v2 .course-arrow svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transform: none;
}

.course-v2 .course-arrow:disabled {
    opacity: 0.3;
}

.course-checklist,
.course-iconlist {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* ---------- 1. Hero ---------- */

.course-v2 .course-hero {
    position: relative;
    overflow: hidden;
    min-height: 560px;
    display: flex;
    align-items: center;
    padding: 120px 0 56px;
}

.course-hero__bg,
.course-hero__bg-img,
.course-hero__bg-tint {
    position: absolute;
    inset: 0;
}

.course-hero__bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-hero__bg-tint {
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.6) 50%, rgba(0, 0, 0, 0.1) 100%);
}

.course-hero__inner {
    position: relative;
    z-index: 1;
}

.course-hero__title {
    display: flex;
    flex-direction: column;
    margin: 0 0 16px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    font-weight: 700;
    text-transform: none;
    color: #fff;
}

.course-hero__subtitle {
    max-width: 460px;
    margin: 0 0 24px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
}

.course-hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.course-hero__students {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 360px;
    font-size: 12px;
    color: var(--course-muted);
}

.course-hero__avatars {
    display: flex;
}

.course-hero__avatars img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #373737;
    object-fit: cover;
}

.course-hero__avatars img + img {
    margin-left: -10px;
}

.course-hero__video {
    position: absolute;
    right: 15px;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 180px;
    color: #fff;
    font-size: 13px;
    text-decoration: none;
}

.course-hero__video-play {
    display: grid;
    place-items: center;
    flex: 0 0 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.course-hero__video-play svg {
    width: 20px;
    height: 20px;
}

/* Hero video popup (<dialog>) */
.course-video {
    width: min(960px, 92vw);
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
}

.course-video::backdrop {
    background: rgba(0, 0, 0, 0.85);
}

.course-video__frame {
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--course-radius);
    overflow: hidden;
}

.course-video__frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.course-video__close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    background: transparent;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.course-video__close:hover,
.course-video__close:focus-visible {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.course-v2 .course-features {
    padding: 20px 0;
    border-top: 1px solid var(--course-border);
    border-bottom: 1px solid var(--course-border);
}

/* Benefit strip + extra courses row: space-between keeps the gaps between items equal. */
.course-features__list,
.course-extra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.course-features__item,
.course-extra__item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.course-features__item .course-icon,
.course-extra__item .course-icon {
    width: 39px;
    height: 39px;
}

.course-features__item strong,
.course-extra__item strong,
.course-extra__item span {
    white-space: nowrap;
}

.course-features__item strong,
.course-extra__item strong {
    display: block;
    font-size: 14px;
}

.course-features__item span,
.course-extra__item span {
    font-size: 12px;
    color: var(--course-muted);
}

/* ---------- 2. Programs ---------- */

.course-program {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--course-card);
    border: 1px solid var(--course-border);
    border-radius: var(--course-radius);
    overflow: hidden;
}

.course-program--highlight {
    border-color: var(--course-accent);
}

.course-program__image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 3;
    object-fit: cover;
}

.course-program__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--course-accent);
    font-size: 11px;
    font-weight: 600;
}

.course-program__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px;
}

.course-program__title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 600;
    text-transform: none;
    color: #fff;
}

.course-program__meta {
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--course-accent);
}

.course-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
}

.course-checklist li[hidden] {
    display: none;
}

.course-program__more {
    align-self: flex-start;
    margin: 2px 0 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--course-accent);
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.course-program__more:hover {
    color: #fff;
}

/* Gradient fade over the card that does not fit on the right, instead of a hard cut. */
.course-programs__slider::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    width: min(22%, 240px);
    background: linear-gradient(to right, rgba(13, 13, 13, 0), var(--course-bg) 90%);
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.course-programs__slider.is-at-end::after {
    opacity: 0;
}

.course-checklist .course-icon {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
}

.course-program__price {
    margin: auto 0 16px;
    padding-top: 12px;
    font-size: 20px;
    font-weight: 700;
}

.course-program__ctas {
    display: grid;
    gap: 10px;
}

.course-extra {
    margin-top: 24px;
    padding: 16px 24px;
    border: 1px solid var(--course-border);
    border-radius: var(--course-radius);
}

/* ---------- 3. Steps ---------- */

.course-steps__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 14px 0 0;
    list-style: none;
}

.course-step__image {
    position: relative;
    margin: 0 0 14px;
    aspect-ratio: 3 / 2;
}

.course-step__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--course-radius);
    background: var(--course-card);
}

/* Round badge centred on the top-left corner of the photo. */
.course-step__num {
    position: absolute;
    top: 0;
    left: 0;
    transform: translate(-30%, -30%);
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--course-accent);
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 0 0 4px var(--course-bg);
}

.course-step__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 600;
    text-transform: none;
    color: #fff;
}

.course-step p {
    margin: 0;
    font-size: 13px;
    color: var(--course-muted);
}

/* ---------- 4. Works ---------- */

.course-works__slide img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: var(--course-radius);
    cursor: zoom-in;
}

/* ---------- 5. Diploma / 6. SEO (shared split layout) ---------- */

.course-split__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.course-split__media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--course-radius);
}

.course-split .course-btn {
    margin-top: 16px;
}

.course-iconlist li {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    font-size: 14px;
}

/* ---------- 7. Why ---------- */

.course-iconlist--grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 40px;
}

/* ---------- 8. Teachers ---------- */

.course-teachers__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* Photo is flush with the card and stretches to its full height. */
.course-teacher {
    display: flex;
    align-items: stretch;
    gap: 16px;
    overflow: hidden;
    background: var(--course-card);
    border: 1px solid var(--course-border);
    border-radius: var(--course-radius);
}

.course-teacher img {
    flex: 0 0 120px;
    width: 120px;
    height: auto;
    min-height: 120px;
    object-fit: cover;
}

.course-teacher > div {
    min-width: 0;
    padding: 12px 16px 12px 0;
}

.course-teacher__name {
    margin: 4px 0 8px;
    font-size: 16px;
    font-weight: 600;
    text-transform: none;
    color: #fff;
}

.course-teacher__name a {
    color: inherit;
}

.course-teacher p {
    margin: 0 0 4px;
    font-size: 12px;
    color: var(--course-muted);
}

/* ---------- 9. FAQ + form ---------- */

.course-faq__title {
    margin-bottom: 12px;
}

/* Two FAQ blocks of 5 side by side; each column grows independently when an item opens. */
.course-faq__blocks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 24px;
    align-items: start;
}

.course-faq__item {
    border: 1px solid var(--course-border);
    border-radius: 4px;
    margin-bottom: 8px;
    background: var(--course-card);
}

.course-faq__item summary {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    list-style: none;
}

.course-faq__item summary::-webkit-details-marker {
    display: none;
}

.course-faq__item summary::after {
    content: "+";
    font-size: 18px;
    line-height: 1;
}

.course-faq__item[open] summary::after {
    content: "–";
}

.course-faq__item .course-rich {
    padding: 0 16px 14px;
    font-size: 14px;
}

/* ---------- Consultation form (_contact.html) ---------- */

.course-contact__card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 48px;
    padding: 48px;
    background: var(--course-card);
    border: 1px solid var(--course-border);
    border-radius: var(--course-radius);
}

.course-contact__eyebrow {
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--course-accent);
}

.course-contact__title {
    margin: 0 0 18px;
    font-size: clamp(30px, 3.4vw, 46px);
    line-height: 1.05;
    font-weight: 800;
    text-transform: none;
    color: #fff;
}

.course-contact__subtitle {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

.course-contact__text {
    margin: 0 0 22px;
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
}

.course-contact__points {
    margin: 0;
    padding: 0;
    list-style: none;
}

.course-contact__points li {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 15px;
}

.course-contact__check {
    display: grid;
    place-items: center;
    flex: 0 0 22px;
    height: 22px;
    border: 1.5px solid var(--course-accent);
    border-radius: 4px;
}

.course-contact__check .course-icon {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

.course-contact__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.course-contact__form .form-group {
    margin: 0;
}

.course-contact__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.course-contact__form label {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 700;
    text-transform: none;
    color: #fff;
}

.course-contact__form label span {
    font-weight: 400;
    color: var(--course-muted);
}

.course-contact__form .iti {
    display: block;
    width: 100%;
}

.course-contact__form input[type="text"],
.course-contact__form input[type="tel"],
.course-contact__form textarea {
    display: block;
    width: 100%;
    min-height: 52px;
    padding-top: 12px;
    padding-bottom: 12px;
    padding-right: 16px;
    background: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 6px;
    color: #fff;
    font-size: 15px;
}

/* Left padding only for non-tel fields: intl-tel-input sets its own left padding for the flag. */
.course-contact__form input[type="text"],
.course-contact__form textarea {
    padding-left: 16px;
}

.course-contact__form textarea {
    min-height: 84px;
    resize: vertical;
}

.course-contact__form input::placeholder,
.course-contact__form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.course-contact__form input:focus,
.course-contact__form textarea:focus {
    outline: none;
    border-color: #fff;
}

.course-contact__consent label {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    font-weight: 400;
    font-size: 14px;
}

/* Site CSS hides every checkbox (opacity 0) and draws it via `input + label::before`;
   here the input sits inside the label, so draw the box on the input itself. */
.course-contact__consent input[type="checkbox"] {
    position: static;
    z-index: auto;
    opacity: 1;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    border-radius: 4px;
    background: transparent no-repeat center / 14px 14px;
    cursor: pointer;
}

.course-contact__consent input[type="checkbox"]:checked {
    border-color: var(--course-accent);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e02022' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M4.5 12.5l5 5 10-11'/%3e%3c/svg%3e");
}

.course-contact__consent input[type="checkbox"]:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* The «politika» translation already underlines the link with an inline border-bottom. */
.course-contact__consent a {
    color: #fff;
    text-decoration: none;
}

.course-contact__form .captcha-container {
    margin: 0;
}

.course-contact__form .form-group.row {
    margin: 0;
}

.course-contact__submit {
    width: 100%;
    min-height: 56px;
    border-radius: 6px;
    font-size: 17px;
    font-weight: 700;
}

.course-contact__form p.error {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--course-accent);
}

/* ---------- 10. Location ---------- */

.course-location__inner {
    display: grid;
    /* map column = form column of .course-contact__card (1fr / 1.15fr, 48px gap+padding) */
    grid-template-columns: minmax(0, 1fr) calc((100% - 96px) * 1.15 / 2.15);
    gap: 48px;
    padding-right: 48px;
    align-items: center;
}

.course-location__facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
}

.course-location__facts li {
    display: flex;
    align-items: center;
    gap: 12px;
}

.course-location__facts strong {
    display: block;
    font-size: 14px;
}

.course-location__facts strong a {
    color: inherit;
}

.course-location__facts span {
    font-size: 12px;
    color: var(--course-muted);
}

.course-location__map iframe {
    display: block;
    width: 100%;
    height: 180px;
    border: 0;
    border-radius: var(--course-radius);
    filter: invert(0.9) hue-rotate(180deg);
}

/* ---------- Smooth anchor scrolling (buttons → #course-contact etc.) ---------- */

html:has(body.course-landing-body) {
    scroll-behavior: smooth;
}

/* Keep anchor targets below the sticky navbar. */
.course-v2 [id] {
    scroll-margin-top: 100px;
}

@media (prefers-reduced-motion: reduce) {
    html:has(body.course-landing-body) {
        scroll-behavior: auto;
    }
}

/* ---------- Responsive ---------- */

/* Desktop is wide enough for one-line teacher texts. */
@media (min-width: 992px) {
    .course-teacher__name,
    .course-teacher p {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

@media (max-width: 991px) {
    .course-features__list,
    .course-extra {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .course-split__inner,
    .course-contact__card,
    .course-faq__blocks,
    .course-location__inner,
    .course-iconlist--grid {
        grid-template-columns: 1fr;
    }

    .course-location__inner {
        padding-right: 0;
        gap: 24px;
    }

}

@media (max-width: 767px) {
    .course-v2 section {
        padding: 28px 0;
    }

    .course-contact__card {
        gap: 28px;
        padding: 24px 16px;
    }

    .course-contact__row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .course-v2 .course-hero {
        min-height: 0;
        padding-top: 96px;
    }

    .course-hero__video {
        position: static;
        margin-top: 20px;
    }

    .course-features__list,
    .course-extra,
    .course-location__facts {
        grid-template-columns: 1fr;
    }
}
