/* Skill-Hive home page (app/views/home/index.php). Shared pieces live in css/site.css. */

body.sh-home { margin: 0; background: var(--sh-page); color: var(--sh-text); font-family: 'Inter', 'Segoe UI', system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
:where(.sh-home) :is(h1, h2, h3, h4, p) { margin: 0; }   /* weak on purpose: the preloader's own spacing must win */
.sh-home a { color: inherit; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

/* ---------------- Hero ---------------- */
.hero { position: relative; overflow: hidden; padding: calc(var(--sh-nav-h) + 4.5rem) 0 5.5rem; }
.hero::before { content: ''; position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(760px 480px at 12% 8%, rgba(99,102,241,0.26), transparent 65%),
                radial-gradient(640px 460px at 92% 30%, rgba(236,72,153,0.13), transparent 65%),
                radial-gradient(800px 400px at 50% 110%, rgba(139,92,246,0.14), transparent 70%); }
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
    background-image: linear-gradient(rgba(148,163,184,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148,163,184,0.05) 1px, transparent 1px);
    background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse at 40% 20%, #000 25%, transparent 72%); mask-image: radial-gradient(ellipse at 40% 20%, #000 25%, transparent 72%); }
.hero > .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 3.5rem; align-items: center; }
.hero-hello { display: inline-block; font-size: clamp(1.7rem, 2.6vw, 2.15rem); transform: rotate(-3deg); transform-origin: left; margin: 0 0 0.9rem 0.15rem; }
.hero-title { font-size: clamp(2.6rem, 5.6vw, 4.4rem); font-weight: 850; line-height: 1.04; letter-spacing: -0.04em; text-wrap: balance; }
.hero-title .sh-scribble > svg { bottom: -0.28em; }
.hero-sub { margin-top: 1.4rem !important; max-width: 560px; font-size: 1.14rem; line-height: 1.7; color: #a7b3c8; text-wrap: pretty; }

.hero-search { position: relative; display: flex; gap: 0.5rem; align-items: center; max-width: 560px; margin-top: 2rem; padding: 0.4rem 0.4rem 0.4rem 1rem; border-radius: 16px;
    background: rgba(13, 21, 40, 0.92); border: 1px solid var(--sh-line-2); box-shadow: 0 20px 50px -24px rgba(0,0,0,0.8); transition: border-color .15s, box-shadow .15s; }
.hero-search:focus-within { border-color: var(--sh-primary); box-shadow: 0 0 0 4px rgba(99,102,241,0.18), 0 20px 50px -24px rgba(0,0,0,0.8); }
.hero-search > i { color: var(--sh-faint); font-size: 1.05rem; }
.hero-search input { flex: 1; min-width: 0; height: 46px; border: 0; outline: 0; background: transparent; color: var(--sh-text); font: inherit; font-size: 1.02rem; }
.hero-search input::placeholder { color: var(--sh-faint); }
.hero-search .sh-btn { min-height: 46px; border-radius: 12px; }
.hero-popular { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin-top: 0.95rem; color: var(--sh-faint); font-size: 0.86rem; }
.hero-popular a { padding: 0.28rem 0.7rem; border-radius: 999px; border: 1px solid var(--sh-line-2); color: #cbd5e1; text-decoration: none; transition: border-color .15s, color .15s, background .15s; }
.hero-popular a:hover { border-color: rgba(99,102,241,0.7); color: #fff; background: rgba(99,102,241,0.1); }

.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 2rem; }
.hero-stats { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 2.25rem; margin-top: 2.75rem; padding-top: 1.75rem; border-top: 1px solid rgba(148,163,184,0.1); }
.hero-stat b { display: block; font-size: 1.85rem; font-weight: 800; letter-spacing: -0.02em; color: #fff; font-variant-numeric: tabular-nums; }
.hero-stat span { color: var(--sh-muted); font-size: 0.88rem; }
.hero-stats .sh-hand { font-size: 1.5rem; transform: rotate(-6deg); margin-bottom: 0.5rem; display: inline-flex; align-items: center; gap: 0.35rem; }
.hero-stats .sh-hand svg { width: 34px; height: 22px; }

/* Picture side */
.hero-visual { position: relative; padding: 1.5rem 1.5rem 2.5rem 2rem; }
.hero-photo { position: relative; border-radius: 26px; overflow: hidden; aspect-ratio: 4 / 4.4; border: 1px solid rgba(148,163,184,0.14);
    box-shadow: 0 40px 80px -30px rgba(0,0,0,0.85), 0 0 0 8px rgba(99,102,241,0.06); background: #111a2e; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(10,15,30,0.55)); }
.hero-chip { position: absolute; display: flex; align-items: center; gap: 0.75rem; padding: 0.8rem 1rem; border-radius: 16px; z-index: 2;
    background: rgba(15, 23, 42, 0.92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid var(--sh-line-2); box-shadow: 0 20px 40px -18px rgba(0,0,0,0.8); }
.hero-chip i.lead { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.15rem; flex: none; }
.hero-chip small { display: block; color: var(--sh-muted); font-size: 0.76rem; }
.hero-chip b { font-size: 1.05rem; }
.hero-chip .stars { color: #fbbf24; font-size: 0.72rem; letter-spacing: 1px; }
.hero-chip.one { left: -0.5rem; top: 18%; animation: floaty 6s ease-in-out infinite; }
.hero-chip.one i.lead { background: rgba(251,191,36,0.15); color: #fcd34d; }
.hero-chip.two { right: -0.25rem; bottom: 16%; animation: floaty 6s 1.5s ease-in-out infinite; }
.hero-chip.two i.lead { background: rgba(16,185,129,0.15); color: #6ee7b7; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
.hero-visual .sh-note { position: absolute; right: -0.5rem; top: -0.25rem; z-index: 3; max-width: 210px; transform: rotate(4deg); }
.hero-visual .sh-note p { font-size: 1.3rem; }
.hero-arrow { position: absolute; right: 9.5rem; top: 4.4rem; width: 70px; height: 60px; z-index: 3; transform: rotate(10deg); }

/* ---------------- Why Skill-Hive ---------------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.feature { padding: 1.6rem 1.5rem; transition: border-color .2s, transform .2s, box-shadow .2s; }
.feature:hover { border-color: rgba(99,102,241,0.45); transform: translateY(-3px); box-shadow: 0 24px 50px -30px rgba(99,102,241,0.7); }
.feature .ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 1.15rem; }
.feature h3 { font-size: 1.08rem; font-weight: 750; margin-bottom: 0.45rem !important; }
.feature p { color: var(--sh-muted); font-size: 0.93rem; line-height: 1.65; }

/* How it works */
.how { margin-top: 4.5rem; padding: 2.5rem; position: relative; }
.how-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 2rem; }
.how-head h3 { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; }
.how-head .sh-hand { font-size: 1.7rem; transform: rotate(-4deg); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; counter-reset: s; position: relative; }
.steps::before { content: ''; position: absolute; top: 30px; left: 9%; right: 9%; border-top: 2px dashed rgba(148,163,184,0.18); }
.step { position: relative; text-align: center; padding: 0 0.5rem; }
.step .num { position: relative; z-index: 1; width: 60px; height: 60px; margin: 0 auto 1.1rem; border-radius: 50%; display: grid; place-items: center;
    background: #0f172a; border: 1px solid var(--sh-line-2); font-family: var(--sh-hand); font-size: 2.1rem; font-weight: 700; color: var(--sh-ink); }
.step h4 { font-size: 1.05rem; font-weight: 750; margin-bottom: 0.4rem !important; }
.step p { color: var(--sh-muted); font-size: 0.93rem; line-height: 1.6; max-width: 280px; margin: 0 auto !important; }

/* ---------------- Categories ---------------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.cat { display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.2rem; text-decoration: none; color: var(--sh-text);
    transition: border-color .2s, transform .2s, background .2s; }
.cat:hover { border-color: color-mix(in srgb, var(--c) 60%, transparent); transform: translateY(-2px); color: #fff; }
.cat .ico { width: 48px; height: 48px; border-radius: 14px; flex: none; display: grid; place-items: center; font-size: 1.25rem;
    color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.cat b { display: block; font-size: 0.98rem; font-weight: 700; line-height: 1.3; }
.cat small { display: block; color: var(--sh-muted); font-size: 0.82rem; margin-top: 0.15rem; }
.cat .go { margin-left: auto; color: var(--sh-faint); transition: transform .15s, color .15s; }
.cat:hover .go { color: var(--c); transform: translateX(3px); }
.cat-more { display: flex; justify-content: center; margin-top: 2rem; }

/* ---------------- Teachers ---------------- */
.teachers-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.teachers-head .sh-head { margin: 0; }
.teacher-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.teacher-card { display: flex; flex-direction: column; gap: 1rem; padding: 1.4rem; text-decoration: none; color: var(--sh-text); transition: border-color .2s, transform .2s, box-shadow .2s; }
.teacher-card:hover { border-color: rgba(99,102,241,0.5); transform: translateY(-3px); color: var(--sh-text); box-shadow: 0 24px 50px -30px rgba(99,102,241,0.7); }
.teacher-card-top { display: flex; align-items: center; gap: 0.85rem; }
.teacher-avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; flex: none; background: var(--sh-grad); box-shadow: 0 0 0 3px rgba(99,102,241,0.18); }
.teacher-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.teacher-avatar.is-initials { display: grid; place-items: center; color: #fff; font-weight: 800; }
.teacher-identity { min-width: 0; }
.teacher-name { display: flex; align-items: center; gap: 0.35rem; font-weight: 750; font-size: 1.02rem; }
.teacher-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-verified { color: #38bdf8; font-size: 0.9rem; }
.teacher-title { color: var(--sh-muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-rating { display: flex; align-items: center; gap: 0.4rem; font-size: 0.88rem; }
.teacher-rating .stars { color: #fbbf24; font-size: 0.8rem; letter-spacing: 1px; }
.teacher-rating .count { color: var(--sh-muted); }
.teacher-new { color: #6ee7b7; font-weight: 700; font-size: 0.85rem; }
.teacher-skills { display: flex; flex-wrap: wrap; gap: 0.35rem; min-height: 28px; }
.teacher-skill { padding: 0.22rem 0.6rem; border-radius: 999px; background: rgba(99,102,241,0.12); color: #c7d2fe; font-size: 0.78rem; font-weight: 600; }
.teacher-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; padding: 0.85rem 0; border-top: 1px solid var(--sh-line); border-bottom: 1px solid var(--sh-line); text-align: center; }
.teacher-meta-value { font-weight: 750; font-size: 0.98rem; }
.teacher-meta-label { color: var(--sh-faint); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; }
.teacher-cta { display: flex; align-items: center; justify-content: space-between; font-size: 0.88rem; font-weight: 650; color: #c7d2fe; margin-top: auto; }
.availability { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--sh-muted); font-weight: 600; }
.availability::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #64748b; }
.availability.is-available { color: #6ee7b7; }
.availability.is-available::before { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.2); }

/* ---------------- Reviews ---------------- */
.reviews-head { position: relative; }
.reviews-head .sh-hand { position: absolute; right: 4%; top: -0.75rem; font-size: 1.8rem; transform: rotate(6deg); }
.testimonials-track { display: flex; gap: 1.1rem; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding: 0.5rem 0.25rem 1.25rem; scrollbar-width: none; }
.testimonials-track::-webkit-scrollbar { display: none; }
.testimonial-card { flex: 0 0 calc((100% - 2.2rem) / 3); scroll-snap-align: start; display: flex; flex-direction: column; gap: 1.1rem; padding: 1.6rem; position: relative; }
.testimonial-card::before { content: '\201C'; position: absolute; right: 1.2rem; top: 0.2rem; font-family: var(--sh-hand); font-size: 5rem; line-height: 1; color: rgba(253, 230, 138, 0.18); }
.testimonial-stars { font-size: 0.85rem; letter-spacing: 2px; }
.testimonial-text { color: #d5ddea; line-height: 1.7; font-size: 0.97rem; flex: 1; }
.testimonial-author { display: flex; align-items: center; gap: 0.75rem; padding-top: 1rem; border-top: 1px solid var(--sh-line); }
.testimonial-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #1e293b; }
.testimonial-author-name { font-weight: 700; font-size: 0.95rem; }
.testimonial-author-role { color: var(--sh-muted); font-size: 0.82rem; }
.testimonials-nav { display: flex; justify-content: center; gap: 0.6rem; margin-top: 0.75rem; }
.testimonials-nav-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--sh-line-2); background: rgba(15,23,42,0.8); color: #e2e8f0; display: grid; place-items: center; cursor: pointer; transition: background .15s, border-color .15s, opacity .15s; }
.testimonials-nav-btn:hover:not(:disabled) { background: var(--sh-primary); border-color: var(--sh-primary); }
.testimonials-nav-btn:disabled { opacity: 0.35; cursor: default; }
.testimonials-share { text-align: center; margin-top: 1.5rem !important; color: var(--sh-muted); }
.testimonials-share a { color: #a5b4fc; font-weight: 650; }
.reviews-empty { text-align: center; padding: 3rem 1.5rem; }
.reviews-empty .sh-note { margin-bottom: 1.5rem; }

/* ---------------- Call to action + newsletter ---------------- */
.cta { position: relative; overflow: hidden; padding: 4rem 3rem; border-radius: 28px; text-align: center;
    background: radial-gradient(600px 300px at 15% 0%, rgba(255,255,255,0.16), transparent 60%), linear-gradient(135deg, #4f46e5, #7c3aed 55%, #db2777); box-shadow: 0 40px 80px -40px rgba(124,58,237,0.9); }
.cta::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.25;
    background-image: radial-gradient(rgba(255,255,255,0.35) 1px, transparent 1px); background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%, #000 60%, transparent); mask-image: linear-gradient(90deg, transparent, #000 40%, #000 60%, transparent); }
.cta > * { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(2rem, 4vw, 3rem); font-weight: 850; letter-spacing: -0.03em; color: #fff; }
.cta p { color: rgba(255,255,255,0.85); font-size: 1.1rem; margin-top: 0.75rem !important; }
.cta-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.cta .sh-btn:not(.sh-btn-light) { border-color: rgba(255,255,255,0.45); }
.cta .sh-btn:not(.sh-btn-light):hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.cta .sh-hand { position: absolute; left: 7%; top: 1.6rem; font-size: 1.9rem; color: #fef3c7; transform: rotate(-10deg); }

.newsletter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2.5rem; align-items: center; padding: 2.5rem; margin-top: 2rem; }
.newsletter h2 { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.02em; }
.newsletter p { color: var(--sh-muted); margin-top: 0.5rem !important; }
.newsletter-form { display: flex; gap: 0.5rem; }
.newsletter-input { flex: 1; min-width: 0; height: 50px; padding: 0 1rem; border-radius: 13px; border: 1px solid var(--sh-line-2); background: #0b1222; color: var(--sh-text); font: inherit; }
.newsletter-input:focus { outline: none; border-color: var(--sh-primary); box-shadow: 0 0 0 4px rgba(99,102,241,0.18); }
.newsletter-input::placeholder { color: var(--sh-faint); }
.newsletter-form .sh-btn { min-height: 50px; }
.newsletter-fine { color: var(--sh-faint); font-size: 0.82rem; margin-top: 0.6rem !important; }
.nl-msg { margin-top: 0.85rem; padding: 0.8rem 1rem; border-radius: 12px; font-size: 0.92rem; display: flex; gap: 0.55rem; align-items: flex-start; }
.nl-msg.ok { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.4); color: #a7f3d0; }
.nl-msg.bad { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.4); color: #fecaca; }
.spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; animation: spin .7s linear infinite; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1199.98px) {
    .teacher-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 991.98px) {
    .hero { padding-top: calc(var(--sh-nav-h) + 2.5rem); }
    .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-visual { max-width: 520px; margin: 0 auto; width: 100%; }
    .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .testimonial-card { flex-basis: calc((100% - 1.1rem) / 2); }
    .newsletter { grid-template-columns: 1fr; gap: 1.5rem; }
}
@media (max-width: 767.98px) {
    .steps { grid-template-columns: 1fr; gap: 1.75rem; }
    .steps::before { top: 30px; bottom: 30px; left: 30px; right: auto; border-top: 0; border-left: 2px dashed rgba(148,163,184,0.18); }
    .step { display: grid; grid-template-columns: 60px 1fr; gap: 0 1rem; text-align: left; padding: 0; }
    .step .num { grid-row: span 2; margin: 0; }
    .step p { margin: 0 !important; max-width: none; }
    .how { padding: 1.75rem 1.4rem; margin-top: 3rem; }
    .cta { padding: 3.25rem 1.5rem 2.75rem; }
    .cta .sh-hand { position: static; display: inline-block; margin-bottom: 0.6rem; }
}
@media (max-width: 575.98px) {
    .hero { padding-bottom: 4rem; }
    .hero-search { padding-left: 0.85rem; }
    .hero-search .sh-btn span { display: none; }
    .hero-stats { gap: 1.5rem; }
    .hero-stat b { font-size: 1.5rem; }
    .hero-stats .sh-hand { display: none; }
    .hero-visual { padding: 1rem 0.5rem 1.5rem; }
    .hero-chip { padding: 0.6rem 0.75rem; }
    .hero-chip i.lead { width: 34px; height: 34px; }
    .hero-chip.one { left: -0.25rem; } .hero-chip.two { right: -0.25rem; }
    .hero-visual .sh-note { right: 0.25rem; top: -0.75rem; max-width: 170px; } .hero-visual .sh-note p { font-size: 1.1rem; }
    .hero-arrow { display: none; }
    .feature-grid, .cat-grid, .teacher-grid { grid-template-columns: 1fr; }
    .testimonial-card { flex-basis: 86%; }
    .testimonials-nav { display: none; }
    .reviews-head .sh-hand { position: static; display: inline-block; margin-top: 0.6rem; }
    .newsletter { padding: 1.6rem 1.25rem; }
    .newsletter-form { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-chip.one, .hero-chip.two { animation: none; }
    .feature, .cat, .teacher-card { transition: none; }
}
