.premium-banner-bordered-box {
    border: 2px solid #40a4aa; /* Border color */
    padding: 20px;
    position: relative;
}

.premium-banner-label {
    position: absolute;
    top: -12px; /* Position above the border */
    left: 10px;
    background-color: white; /* To create the effect of cutting into the border */
    padding: 0 10px;
    font-weight: bold;
    color: #40a4aa; /* Text color */
    display: flex;
    align-items: center;
}

.premium-banner-label .icon {
    margin-left: 5px; /* Space between text and icon */
}

.premium-banner-crown-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    background: url("/static/image/crown.fbe2b1019783.png") no-repeat center center;
    background-size: contain; /* Make sure the icon fits properly */
}

.gram-text, .gram-text-v2 {
    border-radius: 23px !important;
    padding-top: 1px !important;
    padding-right: 5px !important;
    padding-left: 5px !important;
    padding-bottom: 3px !important;
}

/* ============ Course Module Tags ============ */
.course-module-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.course-module-tag-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.course-module-tag:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.course-module-tag--1 {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
.course-module-tag--1:hover {
    background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
    color: #1b5e20;
}

.course-module-tag--2 {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1565c0;
    border: 1px solid #90caf9;
}
.course-module-tag--2:hover {
    background: linear-gradient(135deg, #bbdefb 0%, #90caf9 100%);
    color: #0d47a1;
}

.course-module-tag--3 {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #e65100;
    border: 1px solid #ffcc80;
}
.course-module-tag--3:hover {
    background: linear-gradient(135deg, #ffe0b2 0%, #ffcc80 100%);
    color: #bf360c;
}

.course-module-tag--4 {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    color: #c2185b;
    border: 1px solid #f48fb1;
}
.course-module-tag--4:hover {
    background: linear-gradient(135deg, #f8bbd9 0%, #f48fb1 100%);
    color: #880e4f;
}

/* === Новый заголовок упражнений === */
.ex-header-new {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    flex-wrap: wrap;
}
.ex-header-new .ex-header-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border: 1px solid #ccc;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}
.ex-header-new .ex-header-icon img {
    max-width: 100%;
    max-height: 100%;
}
.ex-header-new .ex-header-title-ru {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.2;
}
.ex-header-new .ex-header-sep {
    color: #ccc;
    font-size: 14px;
}
.ex-header-new .ex-header-title-de {
    font-size: 15px;
    font-weight: 500;
    color: #40a4aa;
    line-height: 1.2;
}
.ex-header-new .ex-header-info {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #138496;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    position: relative;
}
.ex-header-new .ex-header-info:hover .ex-header-tooltip {
    display: block;
}
.ex-header-new .ex-header-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    left: -100px;
    margin-top: 6px;
    width: 240px;
    padding: 8px 10px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 400;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.ex-header-new .ex-header-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    line-height: 1.4;
    white-space: nowrap;
}
.ex-header-pill--progress {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}
.ex-header-pill--done {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.ex-header-pill--fail {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ============================================================
   Hub / landing pages — shared layout
   (tasks-main, lexicon-main, gramm-main, lesson-main,
    dialog-main, testing/listing)
   Values are hardcoded (no course.css vars) so these styles
   work even on pages that don't load course.css.
   ============================================================ */

/* ── Page hero ── */
.page-hero { padding-top: 0; padding-bottom: 10px; text-align: center; }
.page-hero-title { font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 30px; font-weight: 600; line-height: 1.15; color: #0f172a; margin: 0 0 0.75rem; }
.page-hero-subtitle { font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 14px; color: #64748b; line-height: 1.6; margin: 0 auto; max-width: 700px; }

/* ── Sections ── */
.hub-section { padding: 40px 0; padding-top: 10px; }
.hub-section--white { background: #fff; }
.hub-section--gray { background: #f8f9fa; }
.hub-section-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; }
.hub-section-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.hub-section-title { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 1.5rem; font-weight: 600; color: #0f172a; margin: 0 0 4px; }

/* ── Feature cards ── */
.feature-cards, .feature-cards--3col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.feature-cards--2col { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.feature-card {
    display: block; padding: 1.25rem; background: #fff; border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 12px rgba(0,0,0,.04);
    text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; border-top: 4px solid #e2e8f0;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: 0 4px 16px rgba(0,0,0,.1); text-decoration: none; color: inherit; }
.feature-card img.feature-card-img { width: 100%; height: auto; border-radius: 12px; display: block; margin-bottom: 0.75rem; }
.feature-card-title { font-size: 1.125rem; font-weight: 600; color: #0f172a; margin: 0 0 6px; }
.feature-card-desc { font-size: 14px; color: #64748b; line-height: 1.5; margin: 0 0 10px; }
.feature-card-badge { display: inline-block; padding: 4px 12px; border-radius: 100px; font-size: 13px; font-weight: 600; margin-right: 6px; }
.feature-card-badge--blue { background: #dbeafe; color: #1e40af; }
.feature-card-badge--green { background: #dcfce7; color: #166534; }
.feature-card-badge--purple { background: #f3e8ff; color: #6d28d9; }
.feature-card-badge--amber { background: #fef3c7; color: #92400e; }
.feature-card-arrow { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: #2563eb; margin-top: 8px; }

/* Card accents (per-hub) */
.feature-card--audio { border-top-color: #3b82f6; }
.feature-card--artikel { border-top-color: #22c55e; }
.feature-card--verb { border-top-color: #f59e0b; }
.feature-card--cases { border-top-color: #8b5cf6; }
.feature-card--plural { border-top-color: #ef4444; }
.feature-card--dictant { border-top-color: #40a4aa; }
.feature-card--words { border-top-color: #3b82f6; }
.feature-card--cards { border-top-color: #f59e0b; }
.feature-card--crossword { border-top-color: #ec4899; }
.feature-card--rules { border-top-color: #22c55e; }
.feature-card--trainer { border-top-color: #3b82f6; }
.feature-card--advanced { border-top-color: #f59e0b; }
.feature-card--beginner { border-top-color: #22c55e; }
.feature-card--video { border-top-color: #3b82f6; }
.feature-card--practical { border-top-color: #f59e0b; }
.feature-card--roles { border-top-color: #3b82f6; }
.feature-card--ai { border-top-color: #8b5cf6; }
.feature-card--text { border-top-color: #059669; }

/* ── FAQ ── */
.hub-faq-list { margin-top: 1.25rem; }
.hub-faq-item { border-bottom: 1px solid #e2e8f0; }
.hub-faq-item:first-child { border-top: 1px solid #e2e8f0; }
.hub-faq-item summary { padding: 1.25rem 0; font-size: 1rem; font-weight: 600; color: #1e293b; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.hub-faq-item summary::-webkit-details-marker { display: none; }
.hub-faq-item summary::after { content: '\f107'; font-family: FontAwesome; font-size: 1.1rem; color: #94a3b8; transition: transform .2s; flex-shrink: 0; }
.hub-faq-item[open] summary::after { transform: rotate(180deg); }
.hub-faq-item p { font-size: 15px; color: #475569; line-height: 1.7; padding: 0 0 1.25rem; margin: 0; }
.hub-faq-item p a { color: #2563eb; }

/* ── Materials ── */
.hub-materials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hub-material-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #fff; border-radius: 10px; border: 1px solid #e5e7eb; text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s; }
.hub-material-item:hover { border-color: #c5c8ce; box-shadow: 0 2px 8px rgba(0,0,0,.06); text-decoration: none; color: inherit; }
.hub-material-icon { font-size: 1.5rem; flex-shrink: 0; width: 36px; text-align: center; }
.hub-material-text { flex: 1; min-width: 0; }
.hub-material-title { display: block; font-size: .9375rem; font-weight: 600; color: #1a1a1a; line-height: 1.3; }
.hub-material-desc { display: block; font-size: .8125rem; color: #888; line-height: 1.3; margin-top: 2px; }
.hub-material-arrow { flex-shrink: 0; color: #aaa; font-size: 1rem; }

/* ── SEO block / CTA ── */
.seo-block { border: none; padding: 0; }
.seo-block__content p { font-size: 15px; line-height: 1.7; color: #64748b; margin: 0; }
@media (min-width: 769px) { .seo-block__toggle { display: none; } }
@media (max-width: 768px) {
    .seo-block__toggle { cursor: pointer; font-weight: 600; font-size: 1rem; color: #1e293b; padding: 12px 0; list-style: none; display: flex; align-items: center; justify-content: space-between; }
    .seo-block__toggle::-webkit-details-marker { display: none; }
    .seo-block__toggle::after { content: '\f107'; font-family: FontAwesome; font-size: 1.1rem; color: #94a3b8; transition: transform .2s; }
    .seo-block[open] .seo-block__toggle::after { transform: rotate(180deg); }
    .seo-block:not([open]) .seo-block__toggle::after { content: " "; }
}
.cta-block { max-width: 500px; margin: 0 auto; background: #fff; border: 2px solid #e2e8f0; border-radius: 16px; padding: 28px 20px 22px; text-align: center; }
.cta-block .cta-text { font-size: 1.05rem; font-weight: 600; color: #1e293b; margin-bottom: 16px; line-height: 1.4; }
.cta-btn { display: block; width: 100%; padding: 14px 24px; border-radius: 10px; font-weight: 700; font-size: 1.05rem; text-decoration: none; text-align: center; }
.cta-btn:hover { text-decoration: none; }
.cta-hint { margin-top: 10px; font-size: .8rem; color: #94a3b8; }

@media (max-width: 768px) {
    .page-hero-title { font-size: 25px; }
    .hub-section { padding: 28px 0; }
    .feature-cards, .feature-cards--3col, .feature-cards--2col { grid-template-columns: 1fr; }
    .hub-materials-grid { grid-template-columns: 1fr; gap: 8px; }
    .hub-faq-item summary { font-size: 15px; }
}

/* ============================================================
   Testing catalog — /testing/list/ (matches hub aesthetic)
   ============================================================ */

/* Featured "level test" banner */
.level-test-banner { display: flex; align-items: center; gap: 18px; padding: 20px 22px; border-radius: 16px; background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%); border: 1px solid #dbeafe; text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s; margin-bottom: 22px; }
.level-test-banner:hover { box-shadow: 0 6px 20px rgba(37,99,235,.12); transform: translateY(-2px); text-decoration: none; color: inherit; }
.level-test-icon { flex-shrink: 0; width: 56px; height: 56px; border-radius: 14px; background: #2563eb; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.level-test-body { flex: 1; min-width: 0; }
.level-test-title { font-size: 1.15rem; font-weight: 700; color: #0f172a; margin: 0 0 4px; line-height: 1.25; }
.level-test-sub { font-size: 14px; color: #475569; margin: 0; line-height: 1.5; }
.level-test-meta { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: #64748b; }
.level-test-meta .lt-done { color: #166534; font-weight: 700; }
.level-test-meta .lt-time { background: #fef3c7; color: #92400e; border-radius: 100px; padding: 2px 10px; font-weight: 600; }
.level-test-cta { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 11px 20px; border-radius: 10px; background: #2563eb; color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; }
.level-test-banner:hover .level-test-cta { background: #1d4ed8; }

/* Filters / toolbar */
.test-toolbar { display: flex; flex-direction: column; gap: 12px; margin: 4px 0 18px; }
.test-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.test-filter-label { font-size: 13px; font-weight: 700; color: #64748b; margin-right: 2px; }
.test-pill { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 100px; border: 1px solid #e2e8f0; background: #fff; color: #475569; font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s; text-decoration: none; }
.test-pill:hover { border-color: #94a3b8; color: #1e293b; text-decoration: none; }
.test-pill.is-active { background: #2563eb; border-color: #2563eb; color: #fff; }

/* Test list rows */
.test-list { display: flex; flex-direction: column; gap: 8px; min-height: 40vh; }
.test-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; text-decoration: none; color: inherit; transition: border-color .2s, box-shadow .2s, transform .2s; }
.test-row:hover { border-color: #c5c8ce; box-shadow: 0 2px 10px rgba(0,0,0,.06); transform: translateY(-1px); text-decoration: none; color: inherit; }
.test-row-level { flex-shrink: 0; min-width: 48px; text-align: center; padding: 4px 10px; border-radius: 8px; background: #eef2ff; color: #4338ca; font-weight: 700; font-size: 13px; }
.test-row-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; color: #1e293b; line-height: 1.3; }
.test-row-meta { flex-shrink: 0; font-size: 13px; color: #64748b; white-space: nowrap; }
.test-row-meta .ok { color: #166534; font-weight: 700; }
.test-row-meta .miss { color: #b91c1c; font-weight: 700; }
.test-row-arrow { flex-shrink: 0; color: #cbd5e1; font-size: 15px; }
.test-row:hover .test-row-arrow { color: #2563eb; }

@media (max-width: 768px) {
    .level-test-banner { flex-wrap: wrap; gap: 14px; padding: 18px; }
    .level-test-icon { width: 46px; height: 46px; font-size: 22px; }
    .level-test-cta { width: 100%; justify-content: center; }
    .test-row { padding: 12px 14px; gap: 10px; }
    .test-row-meta { font-size: 12px; }
}