/* ============================================================
   Course page (/Page/Course) — "Сургалт".
   Scoped under .cr so it can't affect other pages.
   Replaces the broken isotope masonry with a clean grid.
   ============================================================ */

.cr {
    --cr-brand: #3f51b5;
    --cr-brand-d: #2c3a91;
    --cr-brand-l: #5c6bc0;
    --cr-accent: #ff7a59;
    --cr-ink: #16225a;
    --cr-body: #4d5468;
    --cr-muted: #8a90a2;
    --cr-line: #e4e7f2;
    --cr-bg-soft: #f6f7fb;
    --cr-radius: 18px;
    --cr-shadow: 0 22px 46px -22px rgba(22, 27, 51, .32);
    --cr-shadow-sm: 0 12px 26px -16px rgba(22, 27, 51, .26);

    font-family: 'Roboto', 'Segoe UI', system-ui, sans-serif;
    color: var(--cr-body);
    padding-bottom: 90px;
}
.cr * { box-sizing: border-box; }
.cr h1, .cr h2, .cr h3, .cr h4 { font-family: 'Montserrat', 'Roboto', sans-serif; color: var(--cr-ink); margin: 0; }
.cr__wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

/* ---------- Hero ---------- */
.cr-hero {
    position: relative;
    overflow: hidden;
    text-align: center;
    color: #fff;
    padding: 66px 22px 84px;
    background: linear-gradient(130deg, var(--cr-brand-d), var(--cr-brand) 55%, var(--cr-brand-l));
}
.cr-hero::before,
.cr-hero::after { content: ""; position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.cr-hero::before { width: 320px; height: 320px; top: -150px; right: -70px; }
.cr-hero::after { width: 230px; height: 230px; bottom: -120px; left: -50px; background: rgba(255, 122, 89, .18); }
.cr-hero__eyebrow {
    position: relative; display: inline-block;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
    color: #fff; background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .25);
    padding: 7px 16px; border-radius: 999px; margin-bottom: 18px;
}
.cr-hero h1 { position: relative; color: #fff; font-size: clamp(28px, 4vw, 44px); font-weight: 800; }
.cr-hero p { position: relative; color: rgba(255, 255, 255, .9); max-width: 580px; margin: 16px auto 0; font-size: 16.5px; }
.cr-hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; line-height: 0; }
.cr-hero__wave svg { width: 100%; height: 60px; display: block; }

/* ---------- Body ---------- */
.cr-body { position: relative; margin-top: -50px; }

/* ---------- Course cards ---------- */
.cr-courses {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
    margin-bottom: 40px;
}
.cr-course {
    position: relative;
    border-radius: var(--cr-radius);
    overflow: hidden;
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    box-shadow: var(--cr-shadow);
    transition: transform .35s ease, box-shadow .35s ease;
}
.cr-course:hover { transform: translateY(-6px); }
.cr-course__img {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    transition: transform .6s ease;
}
.cr-course:hover .cr-course__img { transform: scale(1.07); }
.cr-course::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(15, 20, 48, .94) 6%, rgba(15, 20, 48, .4) 52%, rgba(15, 20, 48, .05) 100%);
}
.cr-course__body { position: relative; z-index: 2; padding: 32px; color: #fff; width: 100%; }
.cr-course__tag {
    display: inline-block;
    font-size: 12px; font-weight: 600; letter-spacing: .04em;
    color: #fff; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3);
    padding: 5px 13px; border-radius: 999px; margin-bottom: 14px;
}
.cr-course__body h3 { color: #fff; font-size: 24px; font-weight: 700; margin-bottom: 16px; }
.cr-course__meta { list-style: none; padding: 0; margin: 0 0 22px; }
.cr-course__meta li {
    display: flex; align-items: flex-start; gap: 10px;
    font-size: 15px; color: rgba(255, 255, 255, .9); padding: 4px 0;
}
.cr-course__meta i { color: var(--cr-accent); margin-top: 4px; flex: none; }
.cr-course__btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 14px;
    color: var(--cr-brand);
    background: #fff;
    padding: 12px 24px; border-radius: 999px; text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease, gap .25s ease;
}
.cr-course__btn:hover { transform: translateY(-2px); color: var(--cr-brand); gap: 11px; box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .5); }

/* ---------- Finder ---------- */
.cr-finder {
    background: #fff;
    border: 1px solid var(--cr-line);
    border-radius: var(--cr-radius);
    box-shadow: var(--cr-shadow-sm);
    padding: 34px;
}
.cr-finder__head { text-align: center; margin-bottom: 26px; }
.cr-finder__head .cr-eyebrow {
    display: inline-block; font-family: 'Montserrat', sans-serif;
    font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
    color: var(--cr-brand); background: rgba(63, 81, 181, .1);
    padding: 6px 15px; border-radius: 999px; margin-bottom: 12px;
}
.cr-finder__head h2 { font-size: clamp(22px, 2.6vw, 28px); font-weight: 800; }
.cr-finder__head p { margin: 10px auto 0; max-width: 480px; color: var(--cr-body); font-size: 15.5px; }

.cr-finder__form {
    display: grid;
    grid-template-columns: 1.3fr 1fr auto;
    gap: 16px;
    align-items: end;
}
.cr-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--cr-ink); margin-bottom: 7px; }
.cr-field select {
    width: 100%;
    height: 50px;
    border: 1.5px solid var(--cr-line) !important;
    border-radius: 12px !important;
    padding: 0 15px !important;
    font-size: 15px !important;
    color: var(--cr-ink);
    background: #fff !important;
    box-shadow: none !important;
    transition: border-color .2s ease, box-shadow .2s ease;
}
.cr-field select:focus {
    outline: none; border-color: var(--cr-brand) !important;
    box-shadow: 0 0 0 3px rgba(63, 81, 181, .14) !important;
}
.cr-finder__btn {
    height: 50px;
    padding: 0 30px;
    border: 0; border-radius: 12px;
    background: linear-gradient(135deg, var(--cr-brand-l), var(--cr-brand));
    color: #fff;
    font-family: 'Montserrat', sans-serif; font-weight: 600; font-size: 15px;
    cursor: pointer; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 12px 24px -12px rgba(63, 81, 181, .8);
    transition: transform .2s ease;
}
.cr-finder__btn:hover { transform: translateY(-2px); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
    .cr-courses { grid-template-columns: 1fr; }
    .cr-finder__form { grid-template-columns: 1fr; }
    .cr-finder__btn { width: 100%; }
}
