/* =====================================================
   Category listing page ("Showcase" design, live since 2026-10-04)
   Used only by app/Views/categories/show.php.

   Loaded AFTER home.css: the category page reuses the homepage's tokens
   and building blocks (.hv1 colours, .hv1-hero / .hv6-hero, .hv1-dock,
   .hv1-tool cards, .hv1-cta ...) so both pages always look like the same
   site. This file only adds what a category page needs on top. Note the
   coupling: changing those .hv1-* / .hv6-* rules in home.css changes
   this page too.

   .cs    category page base (accent colour, breadcrumb, filter, grid,
          current-category dock item, trust trio, About card)
   .cs1-* the Showcase hero extras (buttons, floating tool cards)

   The cs/cs1 names come from the numbered design samples this page was
   chosen from (2026-10-04; the samples were deleted afterwards).

   --accent / --c are the category's colour, set inline on the wrapper.
   ===================================================== */

/* ---------- Base ---------- */
.cs { --accent: #3B82F6; }

/* Filtered-out cards. Needed because .hv1-tool sets display:flex,
   which would otherwise beat the browser's own [hidden] rule. */
.cs [hidden] { display: none !important; }

/* Hero glow follows the category colour. */
.cs .hv1-glow-a { background: var(--accent); }

.cs-grad {
    background: linear-gradient(92deg, color-mix(in srgb, var(--accent) 55%, #fff) 0%, #A78BFA 60%, #F0ABFC 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- Breadcrumb (on the dark hero) ---------- */
.cs-crumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0 0 1.25rem;
    padding: 0;
    list-style: none;
    color: #94A3B8;
    font-size: 0.875rem;
}

.cs-crumbs li + li::before {
    content: "/";
    margin-right: 0.4rem;
    opacity: 0.5;
}

.cs-crumbs a { color: #CBD5E1; }
.cs-crumbs a:hover { color: #fff; }
.cs-crumbs [aria-current] { color: #fff; font-weight: 500; }

/* ---------- Buttons ---------- */
.cs-btn-primary {
    border: 0;
    background: linear-gradient(135deg, #3B82F6, #6366F1);
    color: #fff;
    box-shadow: 0 14px 30px -14px rgba(79, 70, 229, 0.9);
}

.cs-btn-primary:hover { color: #fff; filter: brightness(1.08); }

/* ---------- Filter box ---------- */
.cs-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 360px;
    margin-bottom: 0;
    padding: 0.3rem 0.45rem 0.3rem 0.95rem;
    border: 1px solid var(--hv1-border);
    border-radius: 14px;
    background: var(--hv1-surface);
    box-shadow: var(--hv1-shadow);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cs-filter:focus-within {
    border-color: color-mix(in srgb, var(--accent) 60%, var(--hv1-border));
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

.cs-filter > i { color: var(--hv1-muted); }

.cs-filter input {
    flex: 1;
    min-width: 0;
    padding: 0.55rem 0.2rem;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--hv1-text);
    font-size: 0.95rem;
}

.cs-filter input::placeholder { color: var(--hv1-muted); }

.cs-filter .hv1-kbd {
    margin: 0;
    border-color: var(--hv1-border);
    background: var(--hv1-surface-2);
    color: var(--hv1-muted);
}

/* ---------- Tool grid ---------- */
.cs-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}

.cs-empty {
    padding: 2.5rem 1.5rem;
    border: 1px dashed var(--hv1-border);
    border-radius: 20px;
    color: var(--hv1-muted);
    text-align: center;
}

.cs-empty i {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--accent);
    font-size: 1.6rem;
}

.cs-empty a { color: var(--hv1-blue); font-weight: 600; }

/* ---------- Dock: current category ---------- */
.cs .hv1-dock-item.is-current {
    background: color-mix(in srgb, var(--c) 12%, transparent);
    box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 50%, transparent);
}

/* One column per category on wide screens (the homepage grid is fixed
   at 8, so a 9th category wraps onto its own row there). */
@media (min-width: 1200px) {
    .cs .hv1-dock { grid-template-columns: repeat(var(--cs-dock-cols, 8), minmax(0, 1fr)); }
}

/* ---------- Trust trio ---------- */
.cs-trio {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.1rem;
}

.cs-trio-item {
    display: flex;
    gap: 1rem;
    padding: 1.4rem;
    border: 1px solid var(--hv1-border);
    border-radius: 20px;
    background: var(--hv1-surface);
}

.cs-trio-icon {
    display: grid;
    flex-shrink: 0;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: color-mix(in srgb, var(--accent) 14%, transparent);
    color: var(--accent);
    font-size: 1.1rem;
}

.cs-trio-item h3 {
    margin: 0 0 0.3rem;
    color: var(--hv1-text);
    font-size: 1rem;
    font-weight: 700;
}

.cs-trio-item p {
    margin: 0;
    color: var(--hv1-muted);
    font-size: 0.875rem;
    line-height: 1.55;
}

/* ---------- About card ---------- */
.cs-about {
    padding: 2.25rem;
    border: 1px solid var(--hv1-border);
    border-radius: 24px;
    background: var(--hv1-surface);
}

.cs-about h2 {
    margin: 0 0 1rem;
    color: var(--hv1-text);
    font-size: clamp(1.35rem, 1.1rem + 0.8vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.cs-about p {
    max-width: 820px;
    margin: 0 0 0.9rem;
    color: var(--hv1-muted);
    line-height: 1.75;
}

.cs-about p:last-child { margin-bottom: 0; }

/* ---------- Showcase hero extras ---------- */
.cs1 .hv6-hero { padding: 64px 0 136px; }

.cs1-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
}

.cs1-stage {
    position: relative;
    height: 380px;
}

/* Big category icon behind the cards. */
.cs1-emblem {
    position: absolute;
    top: 50%;
    right: 2%;
    display: grid;
    place-items: center;
    width: 220px;
    height: 220px;
    border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
    border-radius: 56px;
    background: radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--accent) 50%, transparent), color-mix(in srgb, var(--accent) 10%, transparent) 70%);
    box-shadow: 0 0 120px -10px color-mix(in srgb, var(--accent) 65%, transparent);
    color: color-mix(in srgb, var(--accent) 45%, #fff);
    font-size: 5.5rem;
    transform: translateY(-50%) rotate(-8deg);
}

/* Floating tool cards (glass look from home.css .hv6-card). */
.cs1-card { width: 64%; }
.cs1-card-1 { top: 0; left: 0; z-index: 3; }
.cs1-card-2 { top: 124px; left: 12%; z-index: 2; animation-delay: -3s; }
.cs1-card-3 { top: 248px; left: 2%; z-index: 1; animation-delay: -6s; }

.cs1-card-body {
    display: -webkit-box;
    margin: 0;
    padding: 0.75rem 0.9rem 0.95rem;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #94A3B8;
    font-size: 0.8rem;
    line-height: 1.5;
}

/* ---------- Responsive ---------- */
@media (max-width: 1199px) {
    .cs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cs1-emblem { width: 180px; height: 180px; font-size: 4.5rem; }
}

@media (max-width: 991px) {
    .cs1-actions { justify-content: center; }
}

@media (max-width: 767px) {
    .cs1 .hv6-hero { padding: 48px 0 120px; }
    .cs-trio { grid-template-columns: 1fr; }
    .cs-about { padding: 1.5rem; }
    .cs-filter { max-width: none; }
}

@media (max-width: 575px) {
    .cs-grid { grid-template-columns: 1fr; gap: 0.6rem; }
}
