.page-header {
    display: none;
}
.white-bg {
    background-color: #FFFFFF;
}
.light-bg {
    background-color: #F6F7F8;
}
.dark-bg {
    background-color: #D9DCE3;
}
.light-outline {
    background-color: #CACFD8;
}
.text-primary {
    color: #0D1321;
}
.text-secondary {
    color: #313A4E;
}
.text-tertiary {
    color: #4E5565;
}
.text-not-selected {
    color: #9095A2;
}
.text-disabled {
    color: #AFB1B6;
}
.fx-badge {
    color: #0D1321;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
}
.fx-badge.icon {
    color: #0D1321;
}
.fx-badge.label {
    background-color: #fff;
    border: 1px solid #CACFD8;
    text-transform: capitalize;
}
.fx-badge.purchased {
    background-color: rgb(102, 157, 49, 0.3);
    border: 1px solid #CACFD8;
    font-weight: bold;
}
/* Рейтинг */
.stars-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 10px;
}

.star-container {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 24px;
}

.star-bg {
    position: absolute;
    color: #e9ecef;
}

.star-fill {
    position: absolute;
    color: #ffc107;
    overflow: hidden;
}

.page-body {
    margin-top: 0;
    font-family: "IBM Plex Sans", sans-serif;
}
.course-purchased-grid {
    margin-top: 0;
}

/* /courses page title + intro */
.course-catalog-page-header__title {
    font-size: clamp(1.5rem, 1.25rem + 1.1vw, 2rem);
    line-height: 1.25;
    color: #0d1321;
    letter-spacing: -0.02em;
}

.course-catalog-page-header__lead {
    font-size: 1.0625rem;
    line-height: 1.6;
    max-width: 42rem;
}

@media (min-width: 768px) {
    .course-catalog-page-header__lead {
        font-size: 1.125rem;
    }
}

/* Student /courses catalog — Tabler-aligned cards */
.course-catalog-card {
    border: 1px solid var(--tblr-border-color, #e6e7e9);
    overflow: hidden;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.course-catalog-card__row {
    min-height: 0;
}

.course-catalog-card__media-col {
    background: linear-gradient(165deg, rgba(250, 251, 252, 1) 0%, rgba(236, 241, 247, 0.96) 100%);
    padding: 0;
    border-bottom: 1px solid var(--tblr-border-color, #e6e7e9);
}

@media (max-width: 767.98px) {
    .course-catalog-card__ratio {
        border-radius: 0;
        box-shadow: none;
    }
}

@media (min-width: 768px) {
    .course-catalog-card__media-col {
        padding: 1.375rem 1.25rem 1.375rem 1.375rem;
        border-bottom: none;
        border-right: 1px solid var(--tblr-border-color, #e6e7e9);
    }

    .course-catalog-card__ratio {
        border-radius: 0.5rem;
        box-shadow: inset 0 0 0 1px rgba(13, 19, 33, 0.05);
    }
}

.course-catalog-card__content-col {
    min-width: 0;
}

.course-catalog-card:hover {
    border-color: rgba(13, 19, 33, 0.12);
    box-shadow: 0 0.5rem 1.25rem rgba(13, 19, 33, 0.07);
}

.course-catalog-card__media-link {
    display: block;
    max-width: 100%;
}

/* 16:9 — скругление и тень только на desktop (на мобиле см. .course-catalog-card__media-col) */
.course-catalog-card__ratio {
    overflow: hidden;
}

.course-catalog-card:hover .course-catalog-card__thumb {
    transform: scale(1.02);
}

.course-catalog-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
}

.course-catalog-card__body {
    padding: 1.125rem 1.125rem 0.5rem;
}

@media (min-width: 768px) {
    .course-catalog-card__body {
        padding: 1.375rem 1.5rem 1rem 1.5rem;
    }
}

.course-catalog-card__footer {
    padding: 0 1.125rem 1.125rem;
}

@media (min-width: 768px) {
    .course-catalog-card__footer {
        padding: 0 1.5rem 1.375rem 1.5rem;
    }
}

.course-catalog-card .card-title,
.course-catalog-card__title {
    font-size: clamp(1.375rem, 1.2rem + 0.9vw, 1.625rem);
    font-weight: 700;
    color: #0d1321;
    line-height: 1.28;
    letter-spacing: -0.01em;
}

.course-catalog-card__title-link {
    text-decoration: none;
}

.course-catalog-card__title-link:hover {
    color: #273b09;
}

.course-catalog-card__meta {
    margin-bottom: 0.875rem !important;
}

.course-catalog-card__badge {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.4em 0.75em;
    line-height: 1.3;
}

.course-catalog-card__badge--status {
    font-size: 0.75rem;
    letter-spacing: 0.02em;
}

.course-catalog-card__excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1rem;
    line-height: 1.65;
    max-width: 62ch;
    margin-top: 0.625rem;
}

.course-catalog-card .course-catalog-card__actions.btn-list {
    gap: 0.625rem;
}

.course-catalog-card .course-catalog-footer-btn {
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.25;
    padding: 0.5625rem 1.125rem;
    min-height: 2.75rem;
    border-radius: 0.375rem;
    transition: box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.course-catalog-card .course-catalog-footer-btn .icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 2;
}

.course-catalog-card .course-catalog-footer-btn.btn-primary {
    box-shadow: 0 1px 2px rgba(13, 19, 33, 0.08);
}

.course-catalog-card .course-catalog-footer-btn.btn-primary:hover {
    box-shadow: 0 2px 8px rgba(13, 19, 33, 0.12);
}

.course-catalog-card .course-catalog-footer-btn.btn-outline-primary {
    border-width: 2px;
    color: var(--tblr-primary, #206bc4);
}

.course-catalog-card .course-catalog-footer-btn.btn-outline-primary:hover,
.course-catalog-card .course-catalog-footer-btn.btn-outline-primary:focus-visible {
    color: var(--tblr-primary-fg, #ffffff);
    background-color: var(--tblr-primary, #206bc4);
    border-color: var(--tblr-primary, #206bc4);
    box-shadow: 0 2px 8px rgba(32, 107, 196, 0.22);
}

.course-catalog-card .course-catalog-footer-btn.btn-outline-primary:hover .icon,
.course-catalog-card .course-catalog-footer-btn.btn-outline-primary:focus-visible .icon {
    color: inherit;
    stroke: currentColor;
}

.course-catalog-card .card-footer .btn-list .course-catalog-footer-btn {
    flex: 1 1 auto;
    justify-content: center;
}

@media (min-width: 768px) {
    .course-catalog-card .card-footer .btn-list .course-catalog-footer-btn {
        flex: 0 1 auto;
        justify-content: flex-start;
    }
}

.course-purchased-grid .card {
    padding: 24px;
}
.course-purchased-grid .card .card-title {
    font-size: 26px;
    font-weight: bold;
    color: #0D1321;
}
.course-purchased-grid .card .card-title a {
    color: inherit;
    text-decoration: none;
}

.course-purchased-grid .card .card-title a:hover {
    color: #273B09;
}
.course-purchased-grid .card .card-body {
    padding: 0 0 0 20px;
}

.course-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 0;
}

.course-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e9ecef;
    position: relative;
    padding: 24px;
}

.course-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.course-card:hover .course-thumbnail img {
    transform: scale(1.05);
}

.course-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(32, 107, 196, 0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.course-badge.purchased {
    background: rgba(32, 107, 196, 0.9);
}

.course-badge.available {
    background: rgba(47, 179, 68, 0.9);
}

.course-category {
    display: inline-block;
    background: #f8f9fa;
    color: #6c757d;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.course-title {
    font-size: 20px;
    font-weight: 600;
    color: #0D1321;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.course-title a {
    color: inherit;
    text-decoration: none;
}

.course-title a:hover {
    color: #273B09;
}

.course-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.course-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.course-meta-item svg {
    width: 14px;
    height: 14px;
}

.course-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.course-rating .stars {
    color: #ffc107;
}

.course-rating .rating-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

.course-footer {
    align-items: center;
    justify-content: space-between;
}

.course-level {
    background: #e3f2fd;
    color: #1976d2;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.75rem;
    font-weight: 500;
}

.course-action {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.course-action.primary {
    background: #206bc4;
    color: white;
}

.course-action.primary:hover {
    background: #1a5aa3;
    color: white;
}

.course-action.secondary {
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.course-action.secondary:hover {
    background: #e9ecef;
    color: #495057;
}

.course-action.success {
    background: #2fb344;
    color: white;
}

.course-action.success:hover {
    background: #28a745;
    color: white;
}

/* Wishlist Button Styles */
/*.wishlist-button {*/
/*    position: absolute;*/
/*    top: 12px;*/
/*    right: 12px;*/
/*    z-index: 10;*/
/*}*/
.course-card .btn .icon {
    margin-right: 0;
}
.btn-course {
    padding-right: 30px;
    padding-left: 30px;
}

.wishlist-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    color: #dc3545;
}

.wishlist-btn.active {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
}

.wishlist-btn.active:hover {
    background: rgba(220, 53, 69, 1);
    color: white;
}

.wishlist-btn svg {
    transition: all 0.3s ease;
}

.wishlist-btn.active svg {
    fill: currentColor;
}

/* Animation for wishlist button */
@keyframes heartBeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.3);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.3);
    }
    70% {
        transform: scale(1);
    }
}

.wishlist-btn.animate {
    animation: heartBeat 1.3s ease-in-out;
}

/* Course Price Styles */
.course-price {
    display: inline;
    font-weight: 600;
    color: #273b09;
    font-size: 24px;
}

.course-price.free {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #bbdefb;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.progress-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(255, 255, 255, 0.9);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #206bc4;
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .course-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .course-content {
        padding: 1rem;
    }
}

/* Wishlist Page Specific Styles */
.course-card.wishlist {
    position: relative;
    border: 2px solid #f8f9fa;
    transition: all 0.3s ease;
}

.course-card.wishlist:hover {
    border-color: #e3f2fd;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.course-badge.wishlist {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 12px;
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 5;
    backdrop-filter: blur(10px);
}

/* Wishlist Header Styles */
.header {
    padding-top: 24px;
    padding-bottom: 24px;
}
.header p {
    color: #4E5565;
    font-size: 18px;
    margin: 0;
}
.header h2 {
    color: #0D1321;
    font-weight: 600;
    font-size: 24px;
}

.header .badge {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
}

/* Empty State for Wishlist */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 2rem 0;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
    opacity: 0.6;
    color: #6c757d;
}

.empty-state h3 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
}

/* Animation for removing wishlist items */
.course-card.wishlist.removing {
    opacity: 0.5;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

/* Responsive adjustments for wishlist */
@media (max-width: 576px) {
    .course-card.wishlist {
        margin-bottom: 1rem;
    }

    .header {
        text-align: center;
    }

    .header .d-flex {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .empty-state {
        padding: 2rem 1rem;
    }

    .empty-state svg {
        width: 60px;
        height: 60px;
    }
}

/* /courses catalog hero */
.course-catalog-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    padding: clamp(1.5rem, 2vw, 2.25rem);
    margin-bottom: 0.25rem;
    background: linear-gradient(128deg, #ffffff 0%, #f8f9fb 48%, #eef2f7 100%);
    border: 1px solid var(--tblr-border-color, #e6e7e9);
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(13, 19, 33, 0.04);
}

.course-catalog-hero__content {
    flex: 1 1 16rem;
    min-width: 0;
}

.course-catalog-hero__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.65rem;
}

.course-catalog-hero__title {
    margin: 0;
    font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2rem);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0d1321;
}

.course-catalog-hero__badge {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
}

.course-catalog-hero__lead {
    margin: 0;
    max-width: 36rem;
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--tblr-secondary, #64748b);
}

.course-catalog-hero__visual {
    flex: 0 1 13rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.course-catalog-hero__illustration {
    display: block;
    width: min(100%, 12.5rem);
    height: auto;
}

.course-catalog-empty {
    text-align: center;
    padding: clamp(2rem, 4vw, 3rem) 1.5rem;
    background: #fff;
    border: 1px solid var(--tblr-border-color, #e6e7e9);
    border-radius: 1rem;
}

.course-catalog-empty__illustration {
    display: block;
    width: min(100%, 11rem);
    height: auto;
    margin: 0 auto 1.25rem;
    opacity: 0.92;
}

.course-catalog-empty__title {
    margin: 0 0 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--tblr-body-color, #1e293b);
}

.course-catalog-empty__description {
    margin: 0 auto 1.5rem;
    max-width: 26rem;
    color: var(--tblr-secondary, #64748b);
    line-height: 1.55;
}

@media (max-width: 767.98px) {
    .course-catalog-hero {
        text-align: center;
    }

    .course-catalog-hero__content {
        flex-basis: 100%;
    }

    .course-catalog-hero__title-row {
        justify-content: center;
    }

    .course-catalog-hero__lead {
        margin-left: auto;
        margin-right: auto;
    }

    .course-catalog-hero__visual {
        flex-basis: 100%;
    }
}
