/* Explore by Category, Learning Paths, Top Tutorials */

.cm-learn {
    padding: 2.5rem 0 0.75rem;
}

.cm-cat-carousel {
    position: relative;
    margin-bottom: 1.75rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.cm-cat-viewport {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.cm-cat-track {
    display: flex;
    gap: 0.75rem;
    transition: transform 0.35s ease;
    will-change: transform;
}

.cm-cat-pill {
    flex: 0 0 calc((100% - 3.75rem) / 6);
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: #0b1220;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    padding: 0.8rem 0.9rem;
    color: inherit;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.cm-cat-pill:hover {
    border-color: rgba(59, 130, 246, 0.4);
    color: inherit;
    transform: translateY(-2px);
}

.cm-cat-pill img {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.cm-cat-pill span {
    display: grid;
    min-width: 0;
}

.cm-cat-pill strong {
    color: #fff;
    font-size: 0.9rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-cat-pill small {
    color: #94a3b8;
    font-size: 0.74rem;
    margin-top: 0.15rem;
    white-space: nowrap;
}

.cm-cat-btn {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: #111827;
    color: #e2e8f0;
    display: grid;
    place-items: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.cm-cat-btn:hover:not(:disabled) {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    color: #fff;
}

.cm-cat-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Paths + Tutorials row */
.cm-learn-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 1.15rem;
    align-items: stretch;
}

.cm-paths-wrap,
.cm-tut-box {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cm-paths-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    flex: 1;
    align-content: stretch;
}

.cm-path-item {
    background: #0b1220;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    padding: 1rem;
    color: inherit;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.cm-path-item:hover {
    border-color: rgba(59, 130, 246, 0.4);
    color: inherit;
    transform: translateY(-2px);
}

.cm-path-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.cm-path-logo {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.cm-path-top h3 {
    margin: 0;
    font-size: 1rem;
    color: #fff;
    line-height: 1.3;
}

.cm-path-item p {
    margin: 0 0 0.85rem;
    color: #94a3b8;
    font-size: 0.84rem;
    line-height: 1.45;
    flex: 1;
}

.cm-path-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.78rem;
    margin-bottom: 0.55rem;
}

.cm-path-progress {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.cm-path-bar {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.cm-path-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 999px;
}

.cm-path-progress strong {
    color: #cbd5e1;
    font-size: 0.78rem;
    min-width: 2.2rem;
    text-align: right;
}

/* Top Tutorials */
.cm-tut-box {
    background: #0b1220;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    padding: 1.05rem 1rem 0.6rem;
}

.cm-tut-panels {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.cm-tut-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}

.cm-tut-head h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff;
}

.cm-tut-tabs {
    display: flex;
    gap: 0.9rem;
}

.cm-tut-tabs button {
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.35rem 0;
    border-bottom: 2px solid transparent;
}

.cm-tut-tabs button.active {
    color: #fff;
    border-bottom-color: #3b82f6;
}

.cm-tut-panel { display: none; }

.cm-tut-panel.active {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.cm-tut-row {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.8rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    color: inherit;
    flex: 1;
}

.cm-tut-panel .cm-tut-row:first-child { border-top: 0; }

.cm-tut-row:hover { color: inherit; }
.cm-tut-row:hover h4 { color: #93c5fd; }

.cm-tut-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.cm-tut-copy {
    min-width: 0;
}

.cm-tut-copy h4 {
    margin: 0 0 0.18rem;
    font-size: 0.9rem;
    color: #fff;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cm-tut-copy small {
    color: #94a3b8;
    font-size: 0.74rem;
}

.cm-tut-row > .bi-bookmark {
    color: #64748b;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 1199px) {
    .cm-cat-pill { flex-basis: calc((100% - 3rem) / 5); }
}

@media (max-width: 991px) {
    .cm-learn-row { grid-template-columns: 1fr; }
    .cm-paths-wrap,
    .cm-tut-box { height: auto; }
    .cm-cat-pill { flex-basis: calc((100% - 2.25rem) / 4); }
}

@media (max-width: 767px) {
    .cm-paths-grid { grid-template-columns: 1fr; }
    .cm-cat-pill { flex-basis: calc((100% - 0.75rem) / 2); }
    .cm-tut-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 575px) {
    .cm-cat-pill { flex-basis: 78%; }
}
