/* how-to page styles. Extracted from how-to.blade.php. */

/* =====================================================
   HOW-TO INDEX — Page Specific Styles
   ===================================================== */
.h-grid--2 { max-width: 920px; margin: 0 auto; }

/* ----- hero stats ----- */
.ht-stats {
    display: flex; flex-wrap: wrap;
    gap: 18px;
    margin-top: 28px;
    justify-content: center;
}
.ht-stat {
    min-width: 140px;
    padding: 14px 22px;
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 14px;
    text-align: center;
}
.ht-stat__num {
    font-size: 28px; font-weight: 800;
    line-height: 1;
    color: #fff;
    letter-spacing: -0.02em;
}
.ht-stat__label {
    font-size: 11.5px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: rgba(255,255,255,.78);
    margin-top: 6px;
}

/* ----- filter chips bar ----- */
.ht-filters {
    padding: 22px 0 6px;
    background: var(--surface, #fff);
}
.ht-filters__inner {
    display: flex; flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}
.ht-chip {
    display: inline-flex; align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: var(--surface-2, #f4f6fb);
    border: 1px solid var(--border, #e3e7ee);
    border-radius: 999px;
    color: var(--text, #1f2937);
    font-size: 14px; font-weight: 600;
    text-decoration: none;
    transition: all .2s ease;
}
.ht-chip:hover {
    border-color: var(--primary, #1e40af);
    color: var(--primary, #1e40af);
    transform: translateY(-1px);
}
.ht-chip.is-active {
    background: linear-gradient(135deg, var(--primary-dark, #1e3a8a), var(--primary, #1e40af));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 18px rgba(30,64,175,.22);
}
.ht-chip__count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; height: 22px;
    padding: 0 7px;
    background: rgba(0,0,0,.08);
    border-radius: 999px;
    font-size: 11.5px; font-weight: 700;
}
.ht-chip.is-active .ht-chip__count {
    background: rgba(255,255,255,.2);
    color: #fff;
}

/* ----- card grid ----- */
.ht-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}
.ht-card {
    position: relative;
    display: flex; flex-direction: column;
    padding: 26px 24px 22px;
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    overflow: hidden;
}
.ht-card::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(30,64,175,.04), transparent 50%);
    opacity: 0; transition: opacity .25s ease;
    pointer-events: none;
}
.ht-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary, #1e40af);
    box-shadow: 0 16px 36px rgba(30,64,175,.14);
}
.ht-card:hover::before { opacity: 1; }
.ht-card__top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.ht-card__icon {
    width: 48px; height: 48px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary-light, #3b82f6), var(--primary, #1e40af));
    color: #fff;
    border-radius: 12px;
    font-size: 19px;
    box-shadow: 0 8px 18px rgba(30,64,175,.22);
    flex-shrink: 0;
}
.ht-card__cat {
    display: inline-flex; align-items: center;
    gap: 6px;
    padding: 5px 11px;
    background: var(--surface-2, #f4f6fb);
    border-radius: 999px;
    font-size: 11.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--text-muted, #4b5563);
}
.ht-card__cat i { font-size: 10px; }
.ht-card__cat--programming {
    background: rgba(30,64,175,.10);
    color: var(--primary, #1e40af);
}
.ht-card__cat--math {
    background: rgba(124,58,237,.10);
    color: #7c3aed;
}
.ht-card__title {
    font-size: 18px; font-weight: 800;
    line-height: 1.35;
    color: var(--text, #111827);
    letter-spacing: -0.01em;
    margin: 0 0 10px;
}
.ht-card__intro {
    font-size: 14.5px;
    line-height: 1.6;
    color: var(--text-muted, #4b5563);
    margin: 0 0 18px;
    flex-grow: 1;
}
.ht-card__meta {
    display: flex; flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}
.ht-card__chip {
    display: inline-flex; align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--surface-2, #f4f6fb);
    border-radius: 999px;
    font-size: 11.5px; font-weight: 600;
    color: var(--text-muted, #4b5563);
}
.ht-card__chip i { font-size: 10px; }
.ht-card__chip--diff.ht-card__chip--beginner { background: rgba(16,185,129,.10); color: #059669; }
.ht-card__chip--diff.ht-card__chip--intermediate { background: rgba(245,158,11,.10); color: #d97706; }
.ht-card__chip--diff.ht-card__chip--advanced { background: rgba(239,68,68,.10); color: #dc2626; }
.ht-card__cta {
    display: inline-flex; align-items: center;
    gap: 7px;
    font-size: 14px; font-weight: 700;
    color: var(--primary, #1e40af);
    margin-top: auto;
}
.ht-card:hover .ht-card__cta i { transform: translateX(4px); }
[dir="rtl"] .ht-card:hover .ht-card__cta i { transform: translateX(-4px) scaleX(-1); }
[dir="rtl"] .ht-card__cta i { transform: scaleX(-1); }
.ht-card__cta i { transition: transform .2s ease; }

/* =====================================================
   HOW-TO ARTICLE (SHOW) — Single Guide Page
   ===================================================== */
.ht-show-hero { padding-block-end: 56px; }
.ht-show__badges {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-bottom: 22px;
    justify-content: center;
}
.ht-show__badges .ht-card__cat {
    background: rgba(255,255,255,.16);
    color: #fff;
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
}
.ht-show__badges .ht-card__chip {
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(8px);
}
.ht-show__title {
    text-align: center;
    max-width: 880px;
    margin-left: auto; margin-right: auto;
}
.ht-show__intro {
    max-width: 760px;
    margin: 14px auto 0;
    text-align: center;
}
.ht-show__intro p { margin: 0 0 10px; }
.ht-show__intro p:last-child { margin-bottom: 0; }

/* ----- article body ----- */
.ht-article {
    max-width: 860px;
    margin: 0 auto;
}
.ht-block {
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 18px;
    padding: 26px 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(15,23,42,.04);
}
.ht-block__head {
    display: flex; align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.ht-block__head i {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary-light, #3b82f6), var(--primary, #1e40af));
    color: #fff;
    border-radius: 10px;
    font-size: 16px;
    flex-shrink: 0;
}
.ht-block__head h2 {
    margin: 0;
    font-size: 22px; font-weight: 800;
    color: var(--text, #111827);
    letter-spacing: -0.01em;
}
.ht-block__body {
    font-size: 16px;
    line-height: 1.75;
    color: var(--text, #1f2937);
}
.ht-block__body p { margin: 0 0 12px; }
.ht-block__body p:last-child { margin-bottom: 0; }
.ht-block__body ul,
.ht-block__body ol { padding-inline-start: 22px; margin: 0 0 12px; }
.ht-block__body li { margin-bottom: 6px; }
.ht-block__body code {
    padding: 2px 6px;
    background: var(--surface-2, #f4f6fb);
    border-radius: 5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    color: var(--primary-dark, #1e3a8a);
}
.ht-block__body a { color: var(--primary, #1e40af); text-decoration: underline; }

.ht-block--prereq .ht-block__head i {
    background: linear-gradient(135deg, #60a5fa, #2563eb);
}
.ht-block--tips {
    background: linear-gradient(135deg, #fffbeb 0%, #fff 60%);
    border-color: #fde68a;
}
.ht-block--tips .ht-block__head i {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}
.ht-tips-list { list-style: none; padding: 0; margin: 0; }
.ht-tips-list li {
    display: flex; align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-block-end: 1px dashed rgba(217,119,6,.18);
    font-size: 15.5px;
    line-height: 1.6;
    color: var(--text, #1f2937);
}
.ht-tips-list li:last-child { border-block-end: 0; }
.ht-tips-list li i {
    color: #d97706;
    font-size: 17px;
    margin-top: 3px;
    flex-shrink: 0;
}

.ht-block--conclusion {
    background: linear-gradient(135deg, #ecfdf5 0%, #fff 60%);
    border-color: #a7f3d0;
}
.ht-block--conclusion .ht-block__head i {
    background: linear-gradient(135deg, #10b981, #059669);
}

/* ----- steps ----- */
.ht-steps {
    background: #fff;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 18px;
    padding: 26px 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 12px rgba(15,23,42,.04);
}
.ht-step-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step;
}
.ht-step {
    display: flex;
    gap: 18px;
    padding: 22px 0;
    border-block-end: 1px solid var(--border, #eef0f3);
}
.ht-step:last-child { border-block-end: 0; padding-block-end: 6px; }
.ht-step:first-child { padding-block-start: 4px; }
.ht-step__num {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark, #1e3a8a), var(--primary, #1e40af));
    color: #fff;
    border-radius: 50%;
    font-size: 15px; font-weight: 800;
    box-shadow: 0 6px 14px rgba(30,64,175,.22);
    flex-shrink: 0;
}
.ht-step__body { flex: 1; min-width: 0; }
.ht-step__title {
    margin: 4px 0 8px;
    font-size: 18px; font-weight: 800;
    color: var(--text, #111827);
    letter-spacing: -0.01em;
    line-height: 1.4;
}
.ht-step__content {
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--text, #1f2937);
}
.ht-step__content p { margin: 0 0 10px; }
.ht-step__content p:last-child { margin-bottom: 0; }
.ht-step__content code {
    padding: 2px 6px;
    background: var(--surface-2, #f4f6fb);
    border-radius: 5px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.92em;
    color: var(--primary-dark, #1e3a8a);
}

/* ----- code block ----- */
.ht-code {
    position: relative;
    margin: 14px 0 4px;
    background: #0f172a;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(15,23,42,.12);
}
.ht-code__head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 14px;
    background: rgba(255,255,255,.04);
    border-block-end: 1px solid rgba(255,255,255,.06);
}
.ht-code__lang {
    font-size: 11.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: rgba(255,255,255,.6);
}
.ht-code__copy {
    display: inline-flex; align-items: center;
    gap: 6px;
    padding: 5px 11px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 7px;
    color: rgba(255,255,255,.85);
    font-size: 12px; font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}
.ht-code__copy:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
}
.ht-code__copy.is-copied {
    background: rgba(16,185,129,.18);
    color: #6ee7b7;
    border-color: rgba(16,185,129,.32);
}
.ht-code pre {
    margin: 0;
    padding: 16px 18px;
    overflow-x: auto;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13.5px;
    line-height: 1.65;
    color: #e2e8f0;
    direction: ltr;
    text-align: left;
}
.ht-code pre code { color: inherit; background: transparent; padding: 0; }

/* ----- tags ----- */
.ht-tags {
    display: flex; flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.ht-tag {
    padding: 5px 12px;
    background: var(--surface-2, #f4f6fb);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 999px;
    font-size: 12.5px; font-weight: 600;
    color: var(--text-muted, #4b5563);
}

.ht-article__nav {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}
.h-icon-arrow-back { transition: transform .2s ease; }
.h-btn:hover .h-icon-arrow-back { transform: translateX(-4px); }
[dir="rtl"] .h-icon-arrow-back { transform: scaleX(-1); }
[dir="rtl"] .h-btn:hover .h-icon-arrow-back { transform: scaleX(-1) translateX(-4px); }

/* =====================================================
   COMING SOON BOX (legacy — kept for empty state)
   ===================================================== */
.h-soon {
    position: relative;
    max-width: 760px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--primary-light) 100%);
    box-shadow: 0 24px 48px rgba(30,64,175,.24);
}
.h-soon::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 16% 20%, rgba(255,255,255,.16) 0%, transparent 40%),
        radial-gradient(circle at 84% 80%, rgba(255,255,255,.10) 0%, transparent 42%),
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    pointer-events: none;
}
.h-soon__glow {
    position: absolute;
    top: -80px; right: -80px;
    width: 280px; height: 280px;
    background: var(--accent);
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
}
[dir="rtl"] .h-soon__glow { right: auto; left: -80px; }
.h-soon__inner {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 56px 40px;
    color: #fff;
}
.h-soon__icon {
    width: 84px; height: 84px;
    margin: 0 auto 22px;
    background: rgba(255,255,255,.16);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; color: #fff;
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}
.h-soon__badge {
    display: inline-flex; align-items: center;
    gap: 8px;
    padding: 7px 16px;
    background: rgba(255,255,255,.16);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    margin-bottom: 20px;
}
.h-soon__badge-dot {
    width: 8px; height: 8px;
    background: #4ade80;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(74,222,128,.3);
    animation: h-pulse-g 1.8s ease-in-out infinite;
}
@keyframes h-pulse-g {
    0%, 100% { box-shadow: 0 0 0 4px rgba(74,222,128,.3); }
    50% { box-shadow: 0 0 0 8px rgba(74,222,128,0); }
}
.h-soon__title {
    font-size: clamp(26px, 3.6vw, 38px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 16px;
    color: #fff;
}
.h-soon__message {
    font-size: 16.5px;
    line-height: 1.7;
    color: rgba(255,255,255,.9);
    margin: 0 auto 32px;
    max-width: 560px;
}
.h-soon__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* =====================================================
   TOPICS (legacy — preserved)
   ===================================================== */
.h-topic__icon {
    width: 52px; height: 52px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: #fff;
    border-radius: 13px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(30,64,175,.22);
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    .ht-stats { gap: 12px; }
    .ht-stat { min-width: 110px; padding: 12px 16px; }
    .ht-stat__num { font-size: 22px; }
    .ht-grid { grid-template-columns: 1fr; gap: 16px; }
    .ht-card { padding: 22px 20px 20px; }
    .ht-block, .ht-steps { padding: 22px 20px; }
    .ht-block__head h2 { font-size: 19px; }
    .ht-step { gap: 14px; padding: 18px 0; }
    .ht-step__num { width: 32px; height: 32px; font-size: 14px; }
    .ht-step__title { font-size: 17px; }
}
@media (max-width: 640px) {
    .h-soon__inner { padding: 44px 24px; }
    .h-soon__icon { width: 72px; height: 72px; font-size: 30px; }
    .h-soon__message { font-size: 15px; }
}
