/* ACMR single course page — scoped so header/footer stay untouched */
body.acmr-cd-page {
    --acmr-navy: #161439;
    --acmr-blue: var(--tg-theme-primary, #5751e1);
    --acmr-blue-deep: #050071;
    --acmr-text: #3d3d4e;
    --acmr-muted: #6b6b80;
    --acmr-line: #e8e8f0;
    --acmr-soft: #f6f7fb;
    --acmr-white: #ffffff;
    --acmr-radius: 18px;
    --acmr-shadow: 0 12px 40px rgba(22, 20, 57, 0.08);
}

.acmr-cd {
    color: var(--acmr-text);
    padding: 48px 0 80px;
    background: var(--acmr-white);
}

.acmr-cd a {
    color: var(--acmr-blue);
}

.acmr-cd-crumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    font-size: 13px;
    color: var(--acmr-muted);
}

.acmr-cd-crumb a {
    color: var(--acmr-muted);
    text-decoration: none;
}

.acmr-cd-crumb a:hover {
    color: var(--acmr-blue);
}

.acmr-cd-crumb span {
    color: var(--acmr-navy);
}

.acmr-cd-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.72fr);
    gap: 36px;
    align-items: start;
    margin-bottom: 48px;
}

.acmr-cd-media {
    position: relative;
    border-radius: var(--acmr-radius);
    overflow: hidden;
    box-shadow: var(--acmr-shadow);
    background: var(--acmr-soft);
}

.acmr-cd-media img {
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: cover;
    display: block;
}

.acmr-cd-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.acmr-cd-play span {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(22, 20, 57, 0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.acmr-cd-play:hover span {
    transform: scale(1.06);
    background: var(--acmr-blue);
}

.acmr-cd-intro {
    margin-top: 22px;
}

.acmr-cd-kicker {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    background: rgba(87, 81, 225, 0.08);
    color: var(--acmr-blue);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    margin-bottom: 10px;
}

.acmr-cd-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 8px 0 12px;
    font-size: 13px;
    color: var(--acmr-muted);
}

.acmr-cd-stars {
    color: #f5b400;
    letter-spacing: 1px;
}

.acmr-cd-stars + span,
.acmr-cd-meta > span {
    color: var(--acmr-navy);
    font-weight: 600;
}

.acmr-cd-title {
    font-size: 30px;
    line-height: 1.28;
    color: var(--acmr-navy);
    font-weight: 700;
    margin: 0 0 12px;
}

.acmr-cd-lead {
    font-size: 15px;
    line-height: 1.7;
    color: var(--acmr-text);
    margin: 0 0 18px;
    max-width: 640px;
}

.acmr-cd-teacher {
    display: flex;
    align-items: center;
    gap: 12px;
}

.acmr-cd-teacher img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.acmr-cd-teacher a {
    color: var(--acmr-navy);
    text-decoration: none;
}

.acmr-cd-teacher a:hover {
    color: var(--acmr-blue);
}

.acmr-cd-teacher strong {
    display: block;
    color: var(--acmr-navy);
    font-size: 14px;
}

.acmr-cd-teacher span {
    display: block;
    font-size: 12px;
    color: var(--acmr-muted);
}

.acmr-cd-wish {
    margin-left: auto;
    color: var(--acmr-muted);
    font-size: 16px;
}

.acmr-cd-card {
    position: relative;
    background: var(--acmr-white);
    border: 1px solid var(--acmr-line);
    border-radius: var(--acmr-radius);
    box-shadow: var(--acmr-shadow);
    padding: 24px 22px 22px;
}

.acmr-cd-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--acmr-blue);
    border-radius: 18px 18px 0 0;
}

.acmr-cd-card-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--acmr-muted);
    margin-bottom: 8px;
}

.acmr-cd-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 6px;
}

.acmr-cd-price-now {
    font-size: 28px;
    font-weight: 700;
    color: var(--acmr-navy);
    line-height: 1;
}

.acmr-cd-price-was {
    font-size: 15px;
    color: var(--acmr-muted);
    text-decoration: line-through;
}

.acmr-cd-save {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #1a7f4b;
    background: #eaf7f0;
    border-radius: 999px;
    padding: 3px 10px;
    margin-bottom: 18px;
}

.acmr-cd-enroll {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 50px;
    border: 0;
    border-radius: 12px;
    background: var(--acmr-blue);
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s ease, transform 0.15s ease;
}

.acmr-cd-enroll:hover {
    background: var(--acmr-blue-deep);
    color: #fff !important;
}

.acmr-cd-enroll.is-enrolled {
    background: var(--acmr-navy);
}

.acmr-cd-enroll.is-booked {
    background: #9aa0b4;
    cursor: default;
}

.acmr-cd-trust {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
}

.acmr-cd-trust li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--acmr-text);
    padding: 5px 0;
}

.acmr-cd-trust i {
    color: #1a7f4b;
    font-size: 12px;
    width: 14px;
}

.acmr-cd-gift {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: var(--acmr-navy);
}

.acmr-cd-share {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--acmr-line);
}

.acmr-cd-share p {
    font-size: 12px;
    color: var(--acmr-muted);
    margin-bottom: 8px;
}

.acmr-cd-share .shareon {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.acmr-cd-share .shareon > a {
    width: 32px;
    height: 32px;
    font-size: 13px;
}

.acmr-cd-section {
    margin-bottom: 56px;
}

.acmr-cd-heading {
    font-size: 24px;
    line-height: 1.3;
    color: var(--acmr-navy);
    font-weight: 700;
    margin: 0 0 22px;
}

.acmr-cd-section-lead {
    margin: -12px 0 20px;
    color: var(--acmr-muted);
    font-size: 14.5px;
}

.acmr-cd-gallery-section {
    margin-top: 8px;
}

.acmr-cd-gallery-head {
    margin-bottom: 22px;
}

.acmr-cd-gallery-head span {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--acmr-blue);
    margin-bottom: 8px;
}

.acmr-cd-gallery-head .acmr-cd-heading {
    margin-bottom: 8px;
}

.acmr-cd-gallery-head p {
    margin: 0;
    max-width: 540px;
    color: var(--acmr-muted);
    font-size: 14.5px;
    line-height: 1.7;
}

.acmr-cd-gallery {
    display: grid;
    gap: 10px;
}

.acmr-cd-gallery--1 {
    grid-template-columns: 1fr;
}

.acmr-cd-gallery--1 .acmr-cd-gallery-item {
    height: min(460px, 58vw);
}

.acmr-cd-gallery--2 {
    grid-template-columns: 1.25fr 1fr;
}

.acmr-cd-gallery--2 .acmr-cd-gallery-item {
    height: 340px;
}

.acmr-cd-gallery--3 {
    grid-template-columns: 1fr 1fr;
}

.acmr-cd-gallery--4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.acmr-cd-gallery--3 .is-featured,
.acmr-cd-gallery--4 .is-featured {
    grid-column: 1 / -1;
    height: min(440px, 52vw);
}

.acmr-cd-gallery--3 .acmr-cd-gallery-item:not(.is-featured),
.acmr-cd-gallery--4 .acmr-cd-gallery-item:not(.is-featured) {
    height: 188px;
}

.acmr-cd-gallery-item {
    position: relative;
    display: block;
    border-radius: 18px;
    overflow: hidden;
    background: #e6e8f0;
    box-shadow: 0 10px 30px rgba(22, 20, 57, 0.07);
}

.acmr-cd-gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 62%, rgba(22, 20, 57, 0.28) 100%);
    opacity: 0.55;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.acmr-cd-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: absolute;
    inset: 0;
    transition: transform 0.55s ease;
}

.acmr-cd-gallery-more {
    position: absolute;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    min-width: 44px;
    height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(22, 20, 57, 0.78);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.acmr-cd-gallery-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

.acmr-cd-gallery-item:hover img {
    transform: scale(1.045);
}

.acmr-cd-gallery-item:hover::after {
    opacity: 0.28;
}

.acmr-cd-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0;
    border: 1px solid var(--acmr-line);
    border-radius: var(--acmr-radius);
    background: var(--acmr-soft);
    overflow: hidden;
}

.acmr-cd-highlight {
    padding: 20px 18px;
    border-right: 1px solid var(--acmr-line);
}

.acmr-cd-highlight:last-child {
    border-right: 0;
}

.acmr-cd-highlight i {
    color: var(--acmr-blue);
    font-size: 16px;
    margin-bottom: 8px;
}

.acmr-cd-highlight strong {
    display: block;
    color: var(--acmr-navy);
    font-size: 15px;
    margin-bottom: 2px;
}

.acmr-cd-highlight span {
    font-size: 12px;
    color: var(--acmr-muted);
}

.acmr-cd-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 28px;
}

.acmr-cd-benefit i {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(87, 81, 225, 0.08);
    color: var(--acmr-blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.acmr-cd-benefit h3 {
    font-size: 16px;
    color: var(--acmr-navy);
    margin: 0 0 6px;
}

.acmr-cd-benefit p {
    font-size: 14px;
    line-height: 1.65;
    color: var(--acmr-text);
    margin: 0;
}

.acmr-cd-about {
    max-width: 820px;
    font-size: 15.5px;
    line-height: 1.8;
}

.acmr-cd-about p {
    margin-bottom: 1rem;
}

.acmr-cd-about :is(h1, h2, h3, h4, h5) {
    color: var(--acmr-navy);
    font-size: 18px;
    margin: 22px 0 10px;
}

.acmr-cd-about ul,
.acmr-cd-about ol {
    padding-left: 1.2rem;
    margin-bottom: 1rem;
}

.acmr-cd-about li {
    margin-bottom: 6px;
}

.acmr-cd-about strong {
    color: var(--acmr-navy);
}

.acmr-cd-learn {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 28px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.acmr-cd-learn li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    color: var(--acmr-navy);
    padding: 8px 0;
}

.acmr-cd-learn i {
    color: #1a7f4b;
    margin-top: 4px;
    font-size: 13px;
}

.acmr-cd-acc .accordion-item {
    border: 1px solid var(--acmr-line);
    border-radius: 12px !important;
    margin-bottom: 10px;
    overflow: hidden;
    background: #fff;
}

.acmr-cd-acc .accordion-button {
    font-size: 15px;
    font-weight: 600;
    color: var(--acmr-navy);
    background: #fff;
    box-shadow: none;
    padding: 16px 18px;
}

.acmr-cd-acc .accordion-button:not(.collapsed) {
    background: var(--acmr-soft);
    color: var(--acmr-navy);
}

.acmr-cd-acc .accordion-button:focus {
    box-shadow: none;
    border-color: var(--acmr-line);
}

.acmr-cd-acc .accordion-button::after {
    width: 14px;
    height: 14px;
    background-size: 14px;
}

.acmr-cd-acc .accordion-body {
    padding: 0 8px 8px;
}

.acmr-cd-lesson {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border-top: 1px solid var(--acmr-line);
    color: var(--acmr-text);
    text-decoration: none;
    font-size: 14px;
}

.acmr-cd-lesson:hover {
    color: var(--acmr-navy);
}

.acmr-cd-lesson-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--acmr-muted);
    font-size: 12px;
    white-space: nowrap;
}

.acmr-cd-type {
    background: var(--acmr-soft);
    border-radius: 999px;
    padding: 2px 8px;
    text-transform: capitalize;
}

.acmr-cd-instructor {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
}

.acmr-cd-instructor img {
    width: 160px;
    height: 160px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--acmr-shadow);
}

.acmr-cd-instructor h3 {
    font-size: 20px;
    color: var(--acmr-navy);
    margin: 0 0 4px;
}

.acmr-cd-instructor .role {
    display: block;
    font-size: 13px;
    color: var(--acmr-blue);
    margin-bottom: 12px;
}

.acmr-cd-instructor p {
    font-size: 14.5px;
    line-height: 1.7;
    margin-bottom: 14px;
}

.acmr-cd-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.acmr-cd-chip {
    font-size: 12px;
    background: var(--acmr-soft);
    color: var(--acmr-navy);
    border-radius: 999px;
    padding: 5px 10px;
}

.acmr-cd-social {
    display: flex;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.acmr-cd-social a {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--acmr-line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--acmr-navy);
}

.acmr-cd-certificate {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 32px;
    align-items: center;
    background: var(--acmr-soft);
    border-radius: var(--acmr-radius);
    padding: 28px;
}

.acmr-cd-certificate img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--acmr-shadow);
    background: #fff;
}

.acmr-cd-cert-fallback {
    min-height: 220px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--acmr-line);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    color: var(--acmr-navy);
}

.acmr-cd-cert-fallback i {
    font-size: 36px;
    color: var(--acmr-blue);
    margin-bottom: 10px;
}

.acmr-cd-certificate ul {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
}

.acmr-cd-certificate li {
    display: flex;
    gap: 10px;
    font-size: 14.5px;
    margin-bottom: 10px;
}

.acmr-cd-certificate li i {
    color: var(--acmr-blue);
    margin-top: 3px;
}

.acmr-cd-info {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.acmr-cd-info-item {
    padding: 14px 0;
    border-top: 1px solid var(--acmr-line);
}

.acmr-cd-info-item span {
    display: block;
    font-size: 12px;
    color: var(--acmr-muted);
    margin-bottom: 4px;
}

.acmr-cd-info-item strong {
    color: var(--acmr-navy);
    font-size: 14px;
    font-weight: 600;
}

.acmr-cd-reviews {
    display: grid;
    gap: 16px;
}

.acmr-cd-review {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid var(--acmr-line);
}

.acmr-cd-review img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.acmr-cd-review h4 {
    font-size: 15px;
    color: var(--acmr-navy);
    margin: 0 0 4px;
}

.acmr-cd-review p {
    margin: 8px 0 0;
    font-size: 14.5px;
    line-height: 1.65;
}

.acmr-cd-empty {
    padding: 28px;
    text-align: center;
    background: var(--acmr-soft);
    border-radius: var(--acmr-radius);
    color: var(--acmr-muted);
}

.acmr-cd-final {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--acmr-navy);
    color: #fff;
    border-radius: var(--acmr-radius);
    padding: 28px 32px;
}

.acmr-cd-final h2 {
    font-size: 22px;
    color: #fff;
    margin: 0 0 6px;
}

.acmr-cd-final p {
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14.5px;
    max-width: 460px;
}

.acmr-cd-final-action {
    display: flex;
    align-items: center;
    gap: 18px;
}

.acmr-cd-final .acmr-cd-price-now {
    color: #fff;
}

.acmr-cd-final .acmr-cd-price-was {
    color: rgba(255, 255, 255, 0.55);
}

.acmr-cd-final .acmr-cd-enroll {
    width: auto;
    min-width: 180px;
    padding: 0 22px;
}

.acmr-cd-sticky {
    display: none;
}

.acmr-cd-sticky.is-hidden {
    transform: translateY(110%);
}

@media (max-width: 1199px) {
    .acmr-cd-hero {
        grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
        gap: 24px;
    }

    .acmr-cd-title {
        font-size: 26px;
    }

    .acmr-cd-benefits,
    .acmr-cd-info {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    body.acmr-cd-page {
        padding-bottom: 72px;
    }

    .acmr-cd {
        padding: 28px 0 56px;
    }

    .acmr-cd-hero {
        grid-template-columns: 1fr;
    }

    .acmr-cd-media img {
        max-height: 280px;
    }

    .acmr-cd-title {
        font-size: 22px;
    }

    .acmr-cd-card {
        position: relative;
    }

    .acmr-cd-highlights {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .acmr-cd-highlight {
        border-right: 0;
        border-bottom: 1px solid var(--acmr-line);
    }

    .acmr-cd-learn,
    .acmr-cd-instructor,
    .acmr-cd-certificate {
        grid-template-columns: 1fr;
    }

    .acmr-cd-gallery--2 {
        grid-template-columns: 1fr;
    }

    .acmr-cd-gallery--3,
    .acmr-cd-gallery--4 {
        grid-template-columns: 1fr 1fr;
    }

    .acmr-cd-gallery--3 .is-featured,
    .acmr-cd-gallery--4 .is-featured {
        grid-column: 1 / -1;
        min-height: 240px;
        max-height: none;
    }

    .acmr-cd-gallery--2 .acmr-cd-gallery-item,
    .acmr-cd-gallery--3 .acmr-cd-gallery-item:not(.is-featured),
    .acmr-cd-gallery--4 .acmr-cd-gallery-item:not(.is-featured) {
        height: 160px;
    }

    .acmr-cd-instructor img {
        width: 120px;
        height: 120px;
    }

    .acmr-cd-final {
        padding: 24px;
    }

    .acmr-cd-final .acmr-cd-enroll {
        width: 100%;
    }

    .acmr-cd-final-action {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .acmr-cd-sticky {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1050;
        background: #fff;
        border-top: 1px solid var(--acmr-line);
        padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 24px rgba(22, 20, 57, 0.08);
        transition: transform 0.25s ease;
    }

    .acmr-cd-sticky .acmr-cd-enroll {
        width: auto;
        flex: 1;
        min-height: 46px;
    }

    .acmr-cd-sticky .acmr-cd-price-now {
        font-size: 18px;
    }
}

@media (max-width: 575px) {
    .acmr-cd-benefits,
    .acmr-cd-info,
    .acmr-cd-highlights {
        grid-template-columns: 1fr;
    }

    .acmr-cd-gallery--2,
    .acmr-cd-gallery--3,
    .acmr-cd-gallery--4 {
        grid-template-columns: 1fr;
    }

    .acmr-cd-gallery--1 .acmr-cd-gallery-item,
    .acmr-cd-gallery--2 .acmr-cd-gallery-item,
    .acmr-cd-gallery--3 .is-featured,
    .acmr-cd-gallery--4 .is-featured {
        height: 220px;
    }

    .acmr-cd-gallery--3 .acmr-cd-gallery-item:not(.is-featured),
    .acmr-cd-gallery--4 .acmr-cd-gallery-item:not(.is-featured) {
        height: 180px;
    }

    .acmr-cd-heading {
        font-size: 20px;
    }
}
