/**
 * PSY-IN Theme — courses.css
 * Стили для single-psy_course.php и page-dpo-archive.php
 *
 * Подключается условно через psy_enqueue_assets() при:
 *   is_singular('psy_course') OR is_page_template('page-dpo-archive.php')
 */

:root {
    --psy-blue:          #012DB3;
    --psy-blue-dark:     #001F80;
    --psy-magenta:       #C23571;
    --psy-magenta-dark:  #9E2A5C;
    --psy-bg-light:      #F5F7FB;
    --psy-bg-blue-soft:  #E8F0FE;
    --psy-bg-magenta-soft: #FCE4EC;
    --psy-text:          #1d2327;
    --psy-text-muted:    #50575E;
    --psy-border:        #E0E3EB;
}

/* ==========================================================================
   Container
   ========================================================================== */
.course-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: background .18s ease, transform .18s ease, color .18s ease;
    cursor: pointer;
    border: 2px solid transparent;
    line-height: 1.2;
}

.btn-primary { background: var(--psy-blue); color: #fff; }
.btn-primary:hover { background: var(--psy-blue-dark); transform: translateY(-1px); color: #fff; }

.btn-secondary { background: var(--psy-magenta); color: #fff; }
.btn-secondary:hover { background: var(--psy-magenta-dark); transform: translateY(-1px); color: #fff; }

.btn-ghost {
    background: transparent;
    color: var(--psy-blue);
    border-color: var(--psy-blue);
}
.btn-ghost:hover { background: var(--psy-blue); color: #fff; }

.btn-primary--small,
.btn-secondary--small {
    padding: 8px 14px;
    font-size: 13px;
}

/* ==========================================================================
   DPO archive page
   ========================================================================== */
.dpo-page {
    background: var(--psy-bg-light);
    padding-bottom: 80px;
    font-family: 'Geologica', sans-serif;
}

.dpo-page__intro {
    background: #fff;
    padding: 60px 0 40px;
    margin-bottom: 40px;
}

.dpo-page__title {
    font-size: 36px;
    font-weight: 700;
    color: var(--psy-text);
    margin: 0 0 24px;
    line-height: 1.2;
}

.dpo-page__content {
    font-size: 16px;
    line-height: 1.6;
    color: var(--psy-text);
}

.dpo-page__content p { margin: 0 0 16px; }
.dpo-page__content p:last-child { margin-bottom: 0; }

.dpo-section { margin: 48px 0; }

.dpo-section__title {
    font-size: 28px;
    font-weight: 700;
    color: var(--psy-text);
    margin: 0 0 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--psy-border);
}

.dpo-section__grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

@media (min-width: 1200px) {
    .dpo-section__grid--special { grid-template-columns: repeat(2, 1fr); }
    .dpo-section__grid--program { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   Course card (на ДПО-странице)
   ========================================================================== */
.course-card {
    background: #fff;
    border: 1px solid var(--psy-border);
    border-left: 4px solid var(--psy-blue);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: box-shadow .2s ease;
}

.course-card:hover { box-shadow: 0 8px 24px rgba(1, 45, 179, 0.08); }

.course-card--special { border-left-color: var(--psy-magenta); }
.course-card--program { border-left-color: var(--psy-blue); }

.course-card__top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.course-card__level-badge,
.course-card__type-badge,
.course-card__status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    line-height: 1.4;
}

.course-card__level-badge { background: var(--psy-blue); color: #fff; }
.course-card__type-badge--program { background: var(--psy-bg-blue-soft); color: var(--psy-blue); }
.course-card__type-badge--special { background: var(--psy-bg-magenta-soft); color: var(--psy-magenta); }
.course-card__status { color: #fff; }

.course-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.course-card__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: var(--psy-text);
    line-height: 1.3;
}

.course-card__link:hover .course-card__title { color: var(--psy-blue); }

.course-card__dates {
    font-size: 14px;
    color: var(--psy-text-muted);
    font-weight: 500;
}

.course-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.course-card__badge {
    display: inline-block;
    padding: 6px 14px;
    background: #F0F2F6;
    color: #5A6B8C;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

/* Палитра бейджей карточки ДПО — цвет автоопределяется по контенту */
.course-card__badge--hours      { background:#EAEFFB; color:#012DB3; }   /* синий */
.course-card__badge--count      { background:#E6F0FB; color:#3D7DD9; }   /* голубой */
.course-card__badge--duration   { background:#EEF1F6; color:#5A6B8C; }   /* серо-голубой */
.course-card__badge--price      { background:#E6F4EA; color:#2E7D32; }   /* зелёный */
.course-card__badge--format     { background:#FCE7EE; color:#C23571; }   /* магента */
.course-card__badge--highlight  { background:#FFF3E0; color:#F57C00; }   /* оранжевый */
.course-card__badge--default    { background:#F0F2F6; color:#5A6B8C; }   /* нейтральный */

/* ==========================================================================
   Status bar + nearest event — карточка ДПО (компактные плашки)
   ========================================================================== */
.course-card__status-bar,
.course-card__nearest {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-decoration: none;
}

.course-card__nearest {
    background: #F7F9FC;
    color: var(--psy-text);
    border: 1px solid var(--psy-border);
    transition: background .15s ease, border-color .15s ease;
}
.course-card__nearest:hover { background: #EEF2F8; border-color: #C6CEDD; color: var(--psy-blue); }

.course-card__status-icon,
.course-card__nearest-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-position: center;
            mask-position: center;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-size: contain;
            mask-size: contain;
}

.course-card__status-text,
.course-card__nearest-text { flex: 1; min-width: 0; }

/* Палитра status-bar по типу (синхронизирована с .course-single__status-bar--*) */
.course-card__status-bar--enrollment { background:#E6F4EA; color:#2E7D32; }
.course-card__status-bar--start      { background:#EAEFFB; color:#012DB3; }
.course-card__status-bar--recording  { background:#F0F2F6; color:#5A6B8C; }
.course-card__status-bar--cohort     { background:#FFF3E0; color:#F57C00; }
.course-card__status-bar--live       { background:#FCE7EE; color:#C23571; }

/* SVG-иконки через mask-image (background-color: currentColor) */
.course-card__status-bar--enrollment .course-card__status-icon,
.course-single__status-bar--enrollment .course-single__status-icon {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
}
.course-card__status-bar--start .course-card__status-icon,
.course-single__status-bar--start .course-single__status-icon,
.course-card__nearest-icon,
.course-single__nearest-icon {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4' width='18' height='18' rx='2'/><line x1='16' y1='2' x2='16' y2='6'/><line x1='8' y1='2' x2='8' y2='6'/><line x1='3' y1='10' x2='21' y2='10'/></svg>");
}
.course-card__status-bar--recording .course-card__status-icon,
.course-single__status-bar--recording .course-single__status-icon {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><polygon points='5 3 19 12 5 21 5 3'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'><polygon points='5 3 19 12 5 21 5 3'/></svg>");
}
.course-card__status-bar--cohort .course-card__status-icon,
.course-single__status-bar--cohort .course-single__status-icon {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><polyline points='12 6 12 12 16 14'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='10'/><polyline points='12 6 12 12 16 14'/></svg>");
}
.course-card__status-bar--live .course-card__status-icon,
.course-single__status-bar--live .course-single__status-icon {
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 12a10 10 0 0 1 20 0'/><path d='M5 12a7 7 0 0 1 14 0'/><circle cx='12' cy='12' r='2' fill='black' stroke='none'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 12a10 10 0 0 1 20 0'/><path d='M5 12a7 7 0 0 1 14 0'/><circle cx='12' cy='12' r='2' fill='black' stroke='none'/></svg>");
}

.course-card__desc {
    font-size: 15px;
    line-height: 1.5;
    color: var(--psy-text-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-card__audience {
    background: var(--psy-bg-blue-soft);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--psy-text);
}

.course-card__audience-label {
    font-weight: 700;
    color: var(--psy-blue);
}

.course-card__buttons {
    display: flex;
    gap: 12px;
    margin-top: auto;
    flex-wrap: wrap;
}

@media (max-width: 479px) {
    .course-card__buttons { flex-direction: column; }
    .course-card__buttons .btn-primary,
    .course-card__buttons .btn-secondary { width: 100%; }
}

/* ==========================================================================
   Single course
   ========================================================================== */
.course-single {
    background: var(--psy-bg-light);
    padding-bottom: 40px;
    font-family: 'Geologica', sans-serif;
}

.course-single__breadcrumbs {
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, .75);
}

.course-single__breadcrumbs a {
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    transition: color .15s ease;
}
.course-single__breadcrumbs a:hover { color: #fff; }
.course-single__breadcrumbs span { margin: 0 8px; color: rgba(255, 255, 255, .4); }

.course-single__hero--with-image .course-single__breadcrumbs {
    color: var(--psy-text-muted);
}
.course-single__hero--with-image .course-single__breadcrumbs a {
    color: var(--psy-text-muted);
}
.course-single__hero--with-image .course-single__breadcrumbs a:hover {
    color: var(--psy-blue);
}
.course-single__hero--with-image .course-single__breadcrumbs span {
    color: var(--psy-border);
}

/* Hero */
.course-single__hero {
    padding: 60px 0;
    position: relative;
}

.course-single__hero--gradient {
    background: linear-gradient(135deg, #012DB3 0%, #C23571 100%);
    color: #fff;
}

.course-single__hero--with-image { background: #fff; }

.course-single__hero-grid {
    display: grid;
    gap: 32px;
    grid-template-columns: 1fr;
    grid-template-areas: "media" "text";
}

@media (min-width: 992px) {
    .course-single__hero-grid {
        grid-template-columns: 6fr 4fr;
        grid-template-areas: "text media";
        align-items: center;
    }
}

.course-single__hero-text { grid-area: text; }
.course-single__hero-media { grid-area: media; }

.course-single__hero--gradient .course-single__hero-media { display: none; }

@media (min-width: 992px) {
    .course-single__hero--gradient .course-single__hero-media { display: block; }
    .course-single__hero--gradient .course-single__hero-placeholder {
        height: 280px;
        background: rgba(255, 255, 255, .12);
        border-radius: 16px;
        border: 1px solid rgba(255, 255, 255, .2);
    }
}

.course-single__status {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 16px;
}

.course-single__title {
    font-size: 40px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 20px;
}

.course-single__hero--with-image .course-single__title { color: var(--psy-text); }

.course-single__short-desc {
    font-size: 18px;
    line-height: 1.5;
    margin: 20px 0 0;
    opacity: .95;
}

.course-single__hero--with-image .course-single__short-desc { color: var(--psy-text-muted); }

.course-single__hero-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(1, 45, 179, .15);
}

/* Hero badges (внутри hero, схема "на градиенте") */
.course-single__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

.course-single__badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
}

.course-single__hero--with-image .course-single__badge {
    background: var(--psy-bg-light);
    color: var(--psy-text);
    border-color: var(--psy-border);
}

/* Hero status-bar (крупнее карточной версии, полупрозрачная на градиенте) */
.course-single__status-bar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0 0 20px;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .3);
    text-decoration: none;
    transition: background .18s ease;
}
.course-single__status-bar:hover { color: #fff; }
a.course-single__status-bar:hover { background: rgba(255, 255, 255, .22); }

.course-single__status-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-position: center;
            mask-position: center;
    -webkit-mask-repeat: no-repeat;
            mask-repeat: no-repeat;
    -webkit-mask-size: contain;
            mask-size: contain;
}

.course-single__status-text { flex: 1; min-width: 0; }

.course-single__status-cta {
    background: #fff;
    color: var(--psy-blue);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* На цветной градиент — bg из палитры с alpha 0.2 */
.course-single__hero--gradient .course-single__status-bar--enrollment { background: rgba(46, 125, 50, .22); }
.course-single__hero--gradient .course-single__status-bar--start      { background: rgba(255, 255, 255, .18); }
.course-single__hero--gradient .course-single__status-bar--recording  { background: rgba(255, 255, 255, .14); }
.course-single__hero--gradient .course-single__status-bar--cohort     { background: rgba(245, 124, 0, .25); }
.course-single__hero--gradient .course-single__status-bar--live       { background: rgba(194, 53, 113, .28); }

/* На белом hero (--with-image) — обычная цветная схема как на карточке */
.course-single__hero--with-image .course-single__status-bar {
    color: var(--psy-text);
    background: var(--psy-bg-light);
    border-color: var(--psy-border);
}
.course-single__hero--with-image .course-single__status-bar--enrollment { background:#E6F4EA; color:#2E7D32; border-color:rgba(46,125,50,.18); }
.course-single__hero--with-image .course-single__status-bar--start      { background:#EAEFFB; color:#012DB3; border-color:rgba(1,45,179,.18); }
.course-single__hero--with-image .course-single__status-bar--recording  { background:#F0F2F6; color:#5A6B8C; border-color:rgba(90,107,140,.18); }
.course-single__hero--with-image .course-single__status-bar--cohort     { background:#FFF3E0; color:#F57C00; border-color:rgba(245,124,0,.18); }
.course-single__hero--with-image .course-single__status-bar--live       { background:#FCE7EE; color:#C23571; border-color:rgba(194,53,113,.18); }

/* Hero nearest event — карточка-блок */
.course-single__nearest {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin: 24px 0 0;
    padding: 16px 20px;
    max-width: 480px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .15);
    border: 1px solid rgba(255, 255, 255, .2);
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
    color: #fff;
}

.course-single__hero--with-image .course-single__nearest {
    background: var(--psy-bg-light);
    border-color: var(--psy-border);
    color: var(--psy-text);
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
}

.course-single__nearest-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    opacity: .85;
}

.course-single__nearest-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.btn-primary-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: #fff;
    color: var(--psy-blue);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: background .18s ease, transform .18s ease;
    border: 2px solid transparent;
    line-height: 1.2;
}
.btn-primary-light:hover {
    background: var(--psy-bg-light);
    color: var(--psy-blue-dark);
    transform: translateY(-1px);
}

.course-single__hero--with-image .btn-primary-light {
    background: var(--psy-blue);
    color: #fff;
}
.course-single__hero--with-image .btn-primary-light:hover {
    background: var(--psy-blue-dark);
    color: #fff;
}

/* Generic content/section */
.course-single__content,
.course-single__section {
    background: #fff;
    padding: 40px 0;
    margin-bottom: 1px;
}

.course-single__section h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 24px;
    color: var(--psy-text);
    line-height: 1.2;
}

.course-single__content p { line-height: 1.7; }

/* Credentials (program) */
.course-single__credentials-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .course-single__credentials-grid { grid-template-columns: repeat(2, 1fr); }
}

.course-single__credential {
    background: var(--psy-bg-blue-soft);
    border-radius: 12px;
    padding: 20px;
}

.course-single__credential-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--psy-blue);
    margin-bottom: 6px;
    letter-spacing: .04em;
}

.course-single__credential strong {
    font-size: 18px;
    color: var(--psy-text);
}

/* Modules table */
.course-single__modules-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--psy-border);
    border-radius: 12px;
    overflow: hidden;
}

.course-single__modules-table thead { background: var(--psy-bg-light); }

.course-single__modules-table th {
    text-align: left;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--psy-text-muted);
    letter-spacing: .04em;
}

.course-single__modules-table td {
    padding: 14px 20px;
    border-top: 1px solid var(--psy-border);
    font-size: 15px;
}

.course-single__modules-row--total {
    background: var(--psy-bg-blue-soft);
    font-weight: 700;
}

.course-single__modules-row--free td {
    color: var(--psy-magenta);
    font-weight: 600;
}

@media (max-width: 767px) {
    .course-single__modules-table,
    .course-single__modules-table thead,
    .course-single__modules-table tbody,
    .course-single__modules-table tr,
    .course-single__modules-table td {
        display: block;
        width: 100%;
    }
    .course-single__modules-table thead { display: none; }
    .course-single__modules-table tr {
        margin-bottom: 16px;
        border: 1px solid var(--psy-border);
        border-radius: 12px;
        padding: 12px;
        background: #fff;
    }
    .course-single__modules-table td {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        padding: 8px 4px;
        border-top: none;
        border-bottom: 1px solid var(--psy-border);
        font-size: 14px;
        gap: 12px;
    }
    .course-single__modules-table td:last-child { border-bottom: none; }
    .course-single__modules-table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 12px;
        text-transform: uppercase;
        color: var(--psy-text-muted);
        flex: 0 0 auto;
    }
    .course-single__modules-row--total {
        background: var(--psy-bg-blue-soft);
    }
}

/* Payment options */
.course-single__payment-options {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .course-single__payment-options { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1200px) {
    .course-single__payment-options { grid-template-columns: repeat(3, 1fr); }
}

.course-single__payment-option {
    background: #fff;
    border: 1px solid var(--psy-border);
    border-radius: 12px;
    padding: 24px;
}

.course-single__payment-option h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--psy-blue);
}

.course-single__payment-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--psy-border);
}

.course-single__payment-row:first-of-type { border-top: none; }

.course-single__payment-label {
    font-size: 14px;
    color: var(--psy-text-muted);
    min-width: 70px;
}

.course-single__payment-row strong {
    font-size: 16px;
    color: var(--psy-text);
    flex: 1;
}

/* Admission */
.course-single__admission {
    font-size: 16px;
    line-height: 1.6;
    color: var(--psy-text);
}

.course-single__admission ul,
.course-single__admission ol {
    padding-left: 24px;
    margin: 16px 0;
}

.course-single__admission li { margin-bottom: 8px; }

/* Plan link */
.course-single__plan-link { display: inline-block; }

/* Audience */
.course-single__audience {
    background: var(--psy-bg-blue-soft);
    border-radius: 16px;
    padding: 32px;
}

.course-single__audience h2 {
    margin-top: 0;
    color: var(--psy-blue);
}

.course-single__audience p {
    font-size: 17px;
    line-height: 1.5;
    margin: 0;
}

/* Prerequisite */
.course-single__prerequisite {
    background: var(--psy-bg-light);
    border-left: 4px solid var(--psy-blue);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    font-size: 16px;
    line-height: 1.5;
}

/* Dates (special) */
.course-single__dates p {
    font-size: 20px;
    font-weight: 600;
    color: var(--psy-blue);
    margin: 0;
}

/* Teachers grid */
.course-single__teachers {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
}

@media (min-width: 480px) {
    .course-single__teachers { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .course-single__teachers { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
    .course-single__teachers { grid-template-columns: repeat(4, 1fr); }
}

.course-single__teacher-card {
    background: #fff;
    border: 1px solid var(--psy-border);
    border-radius: 12px;
    padding: 20px 16px;
    text-decoration: none;
    color: inherit;
    text-align: center;
    transition: box-shadow .2s ease, transform .2s ease;
    display: block;
}

.course-single__teacher-card:hover {
    box-shadow: 0 8px 24px rgba(1, 45, 179, .1);
    transform: translateY(-2px);
}

.course-single__teacher-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 12px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.course-single__teacher-photo--placeholder {
    width: 120px;
    height: 120px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--psy-blue) 0%, var(--psy-magenta) 100%);
}

.course-single__teacher-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    color: var(--psy-text);
    word-break: break-word;
}

/* Events grid (использует WC content-product.php) */
.course-single__events {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr;
    margin: 0;
    padding: 0;
    list-style: none;
}

@media (min-width: 480px) {
    .course-single__events { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
    .course-single__events { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1200px) {
    .course-single__events { grid-template-columns: repeat(4, 1fr); }
}

.course-single__events-more {
    text-align: center;
    margin-top: 32px;
}

/* Final CTA */
.course-single__cta {
    background: linear-gradient(135deg, #012DB3 0%, #C23571 100%);
    padding: 60px 0;
    text-align: center;
    color: #fff;
    margin-top: 40px;
}

.course-single__cta h2 {
    color: #fff;
    margin: 0 0 24px;
    font-size: 32px;
    font-weight: 700;
}

.course-single__cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.course-single__cta .btn-primary {
    background: #fff;
    color: var(--psy-blue);
}
.course-single__cta .btn-primary:hover {
    background: var(--psy-bg-light);
    color: var(--psy-blue-dark);
}

.course-single__cta .btn-secondary {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border: 2px solid #fff;
}
.course-single__cta .btn-secondary:hover {
    background: #fff;
    color: var(--psy-magenta);
}

@media (max-width: 479px) {
    .course-single__cta-buttons { flex-direction: column; }
    .course-single__cta-buttons .btn-primary,
    .course-single__cta-buttons .btn-secondary { width: 100%; }
}

/* Admin notice */
.dpo-page__admin-notice {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 24px 0;
    font-size: 14px;
    line-height: 1.5;
}

.dpo-page__admin-notice code {
    background: rgba(0, 0, 0, .06);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 13px;
}

/* Empty state */
.dpo-page__empty {
    padding: 60px 0;
    text-align: center;
}

.dpo-page__empty p {
    color: var(--psy-text-muted);
    font-size: 18px;
    margin: 0;
}

/* ==========================================================================
   Mobile responsive base
   ========================================================================== */
@media (max-width: 767px) {
    .dpo-page__title { font-size: 28px; }
    .dpo-section__title { font-size: 22px; }
    .course-single__title { font-size: 32px; }
    .course-single__short-desc { font-size: 16px; }
    .course-single__section h2 { font-size: 22px; }
    .course-single__hero { padding: 40px 0; }
    .course-single__content,
    .course-single__section { padding: 28px 0; }
    .course-single__cta { padding: 40px 0; }
    .course-single__cta h2 { font-size: 24px; }
    .course-single__audience { padding: 24px; }
}
