/* Views/Tutorials/{Index,Tutorial}.cshtml — hub-i i tutorialeve dhe faqja e një tutoriali.
   Ngjyrat vijnë nga tokenat globalë (--card, --tx, --line…) që premium.css i ripërcakton për
   temën e errët, ndaj këtu s'ka bllok të veçantë dark përveç hero-s (gjithmonë Natë). */
.gm-tut { --cc: var(--accent); color: var(--tx); font-family: "Archivo", system-ui, sans-serif; line-height: 1.55; }
.gm-tut h1, .gm-tut h2, .gm-tut h3 { font-stretch: 108%; letter-spacing: -.02em; line-height: 1.1; }
.gm-tut .tut-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.gm-tut a { color: inherit; }
.gm-tut img { max-width: 100%; display: block; }

.tut-crumbs { font-size: 13px; color: var(--tx-soft); padding: 18px 0 0; }
.tut-crumbs a { text-decoration: none; }
.tut-crumbs a:hover { text-decoration: underline; }

/* ---------- Hero i hub-it (gjithmonë Natë, edhe në temën e errët) ---------- */
.tut-hero { background: #131C33; color: #F8F5EF; padding: 0 0 40px; position: relative; overflow: hidden; }
.tut-hero::after { content: ""; position: absolute; top: -140px; right: -80px; width: 420px; height: 420px; border-radius: 50%;
    background: radial-gradient(circle, color-mix(in oklab, var(--accent) 38%, transparent), transparent 65%); pointer-events: none; }
.tut-hero .tut-wrap { position: relative; z-index: 1; }
.tut-hero .tut-crumbs { color: #C5C9D6; }
.tut-kicker { margin: 22px 0 8px; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12.5px; text-transform: uppercase;
    letter-spacing: .08em; color: #F4B63A; display: flex; align-items: center; gap: 8px; }
.tut-hero h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 800; margin: 0 0 12px; max-width: 18ch; }
.tut-hero .tut-lede { color: #C5C9D6; max-width: 60ch; font-size: 17px; margin: 0 0 24px; }

.tut-search { display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 14px; padding: 6px 6px 6px 14px; max-width: 620px;
    box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .6); }
.tut-search > i { color: #646A7F; }
.tut-search input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 16px; color: #131C33; background: transparent; padding: 8px 4px; }
.tut-search input:focus-visible { outline: none; }
.tut-search:focus-within { box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 45%, transparent), 0 18px 40px -20px rgba(0, 0, 0, .6); }

/* ---------- Kategoritë + grid-i ---------- */
/* .gm-tut .tut-wrap e vendos padding-un me shorthand — ndaj këtu duhet i njëjti specificitet. */
.gm-tut .tut-body { padding-top: 26px; padding-bottom: 48px; }
.tut-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tut-chip { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--card); font-size: 14px; font-weight: 600; text-decoration: none; min-height: 40px; }
.tut-chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--cc); }
.tut-chip span { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; color: var(--tx-soft); }
.tut-chip:hover { border-color: var(--cc); }
.tut-chip.is-active { background: var(--tx); color: var(--card); border-color: var(--tx); }
.tut-chip.is-active span { color: inherit; opacity: .75; }
.tut-result-line { color: var(--tx-soft); margin: -6px 0 18px; }

.tut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.tut-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
    transition: transform .16s, border-color .16s, box-shadow .16s; position: relative; }
.tut-card:hover { transform: translateY(-2px); border-color: color-mix(in oklab, var(--cc) 55%, var(--line)); box-shadow: 0 16px 30px -22px rgba(19, 28, 51, .5); }
.tut-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: color-mix(in oklab, var(--cc) 16%, var(--card)); }
.tut-thumb > img { width: 100%; height: 100%; object-fit: cover; }
.tut-thumb-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 42px; color: var(--cc); }
.tut-thumb-ph img { width: 64px; height: 64px; object-fit: contain; }
.tut-play { position: absolute; right: 12px; bottom: 12px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(19, 28, 51, .82); color: #fff; font-size: 22px; }
.tut-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.tut-card h3 { font-size: 18px; font-weight: 750; margin: 0; }
.tut-card h3 a { text-decoration: none; }
/* Gjithë karta klikohet, lidhja mbetet te titulli (një lidhje për kartë për lexuesit e ekranit). */
.tut-card h3 a::after { content: ""; position: absolute; inset: 0; }
.tut-card h3 a:focus-visible { outline: none; }
.tut-card:has(h3 a:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.tut-card p { margin: 0; color: var(--tx-soft); font-size: 14.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tut-cat { align-self: flex-start; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em;
    color: var(--tx-soft); display: inline-flex; align-items: center; gap: 6px; }
.tut-cat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cc); }
.tut-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 0; margin: 4px 0 0; font-size: 13px; color: var(--tx-soft); }
.tut-facts i { color: var(--cc); }
.tut-card .tut-facts { margin-top: auto; padding-top: 6px; }

.tut-cta { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px;
    border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.tut-cta h2 { font-size: 22px; margin: 0 0 4px; }
.tut-cta p { margin: 0; color: var(--tx-soft); }
.tut-cta a:not(.btn) { color: var(--blue); }

/* ---------- Faqja e tutorialit ---------- */
.gm-tut-page { padding-bottom: 40px; }
.tut-head { padding: 18px 0 22px; max-width: 820px; }
.tut-head h1 { font-size: clamp(28px, 4.4vw, 44px); font-weight: 800; margin: 8px 0 10px; }
.tut-head .tut-lede { font-size: 17.5px; color: var(--tx-soft); margin: 0 0 12px; }
.tut-head .tut-facts { font-size: 14px; }

.tut-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
.tut-video { position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #131C33; margin: 0 0 24px; }
.tut-video > img, .tut-video video, .tut-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.tut-video.is-playing { background: #000; }
.tut-video-play { position: absolute; inset: 0; margin: auto; width: 84px; height: 84px; border-radius: 50%; border: 0; display: grid; place-items: center;
    background: var(--accent-fill); color: #fff; font-size: 44px; cursor: pointer; box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .7); transition: transform .15s; }
.tut-video-play i { margin-left: 5px; }
.tut-video-play:hover { transform: scale(1.06); background: var(--accent-fill-press); }
.tut-video-play:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.tut-video-note { position: absolute; left: 14px; bottom: 12px; font-size: 12px; color: #fff; background: rgba(19, 28, 51, .72); padding: 4px 9px; border-radius: 8px; }

.tut-safety { display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--warn-tint, #FFF4DB); border: 1px solid color-mix(in oklab, var(--warn, #B7791F) 40%, transparent);
    color: #5A3E05; margin: 0 0 24px; }
.tut-safety i { font-size: 20px; color: var(--warn, #B7791F); }
.tut-safety p { margin: 2px 0 0; }

.tut-guide { font-size: 17px; max-width: 72ch; }
.tut-guide h2 { font-size: 24px; margin: 30px 0 10px; }
.tut-guide h2:first-child { margin-top: 0; }
.tut-guide p, .tut-guide ul { margin: 0 0 14px; }
/* counter-reset vjen inline nga view-i, që numërimi të vazhdojë mes listave të ndara nga paragrafë. */
.tut-steps { list-style: none; padding: 0; margin: 0 0 18px; }
.tut-steps li { position: relative; padding: 2px 0 14px 50px; counter-increment: tut-step; scroll-margin-top: calc(var(--gm-navbar-h, 75px) + 16px); }
.tut-steps li::before { content: counter(tut-step); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
    background: color-mix(in oklab, var(--cc) 16%, var(--card)); color: var(--tx); font-weight: 800; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px;
    border: 1px solid color-mix(in oklab, var(--cc) 45%, transparent); }
.tut-steps li:not(:last-child)::after { content: ""; position: absolute; left: 16.5px; top: 38px; bottom: 4px; width: 1px; background: var(--line); }

.tut-side { position: sticky; top: calc(var(--gm-navbar-h, 75px) + 16px); display: flex; flex-direction: column; gap: 16px; }
.tut-box { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.tut-box h2 { font-size: 17px; margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.tut-box h2 i { color: var(--cc); }
.tut-box p { color: var(--tx-soft); font-size: 14.5px; margin: 0 0 14px; }
.tut-tools { margin: 0; padding-left: 18px; font-size: 15px; }
.tut-tools li { margin-bottom: 4px; }
.tut-box-cta { border-color: color-mix(in oklab, var(--cc) 45%, var(--line)); }

/* ---------- Gjej një profesionist ---------- */
.tut-pros { margin-top: 44px; padding: 36px 0; background: var(--paper-2, #EFEAF0); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scroll-margin-top: var(--gm-navbar-h, 75px); }
.tut-pros-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.tut-pros-head h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; margin: 0 0 6px; }
.tut-pros-head p { margin: 0; color: var(--tx-soft); max-width: 60ch; }
.tut-city { display: flex; flex-direction: column; gap: 4px; min-width: 240px; }
.tut-city label { font-size: 13px; font-weight: 600; color: var(--tx-soft); }
.tut-pro-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tut-pro { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    text-decoration: none; transition: border-color .15s, transform .15s; min-height: var(--tap, 44px); }
.tut-pro:hover { border-color: var(--cc); transform: translateY(-2px); }
.tut-pro-tx { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tut-pro-tx b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tut-vf { color: var(--blue); font-size: 13px; margin-left: 3px; }
.tut-star { color: var(--gold); }
.tut-pro-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--tx-soft); }
.tut-pros-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

.gm-tut .tut-related { padding-top: 40px; }
.tut-related h2 { font-size: 26px; font-weight: 800; margin: 0 0 16px; }
.tut-all { margin: 18px 0 0; font-weight: 600; }
.tut-all a { color: var(--blue); text-decoration: none; }

html[data-theme="dark"] .tut-safety { background: color-mix(in oklab, #B7791F 18%, var(--card)); color: var(--tx); }
html[data-theme="dark"] .tut-cta a:not(.btn), html[data-theme="dark"] .tut-all a { color: #9DB4F0; }

@media (max-width: 960px) {
    .tut-layout { grid-template-columns: 1fr; }
    .tut-side { position: static; }
}
@media (max-width: 640px) {
    .gm-tut .tut-wrap { padding: 0 16px; }
    .tut-hero { padding-bottom: 28px; }
    .tut-grid, .tut-pro-grid { grid-template-columns: 1fr; }
    .tut-video { border-radius: 0; margin-left: -16px; margin-right: -16px; }
    .tut-video-play { width: 68px; height: 68px; font-size: 36px; }
    .tut-city { min-width: 0; width: 100%; }
    .tut-cta { padding: 18px; }
    .tut-cta .btn, .tut-pros-actions .btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
    .tut-card, .tut-pro, .tut-video-play { transition: none; }
    .tut-card:hover, .tut-pro:hover { transform: none; }
}

/* ---------- Blloku "Bëje vetë" te faqja e kategorisë (Services/Category.cshtml) ---------- */
.gm-cat-tutorials { padding-top: 30px; padding-bottom: 6px; }
.gm-cat-tutorials .tut-cat-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.gm-cat-tutorials .tut-cat-head h2 { font-size: 24px; margin: 0; }
.gm-cat-tutorials .tut-cat-head a { font-weight: 600; color: var(--blue); text-decoration: none; }
html[data-theme="dark"] .gm-cat-tutorials .tut-cat-head a { color: #9DB4F0; }
