/* NaroVeda — /conditions ("All Health Concerns") page enhancement pass.
   Plain static CSS (no Tailwind JIT on this host — see nav-v7.css's own header
   comment for why), loaded site-wide like nv-care-inclusions.css already is,
   but every selector below is scoped to this page's own element IDs/classes
   so it has zero effect anywhere else.

   Colours are hardcoded brand hexes rather than var(--nv-red) etc: those
   custom properties are only declared inside .nv-header's own scope in
   nav-v7.css, and this page sits outside the header, so referencing them
   here would resolve to nothing (the same scoping pitfall already hit and
   fixed once in the footer's dropdown, and again on the homepage's
   conditions section — same fix pattern reused here for consistency). */

/* ---- Shared icon-tile accent system (category-overview cards + condition
   list cards) — same red/orange/green cycling + arrow-chip language as the
   homepage's "Explore Men's Health Conditions" cards, so the two pages read
   as one consistent system rather than two different card styles. ---- */
.nv-hc-overview-card,
.nv-hc-card {
    position: relative;
    border-radius: 18px;
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.24s ease;
}
.nv-hc-overview-card::before,
.nv-hc-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, var(--nv-hc-accent, transparent), transparent 60%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.24s ease;
    pointer-events: none;
}
.nv-hc-overview-card:hover,
a.nv-hc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 38px -18px rgba(45, 30, 20, 0.24);
}
.nv-hc-overview-card:hover::before,
a.nv-hc-card:hover::before { opacity: 1; }

/* Red / orange / green accent cycling across both grids. */
#nv-hc-results .nv-cat-section .grid > a.nv-hc-card:nth-child(3n+1),
.grid > .nv-hc-overview-card:nth-child(4n+1) { --nv-hc-accent: #C63A27; }
#nv-hc-results .nv-cat-section .grid > a.nv-hc-card:nth-child(3n+2),
.grid > .nv-hc-overview-card:nth-child(4n+2) { --nv-hc-accent: #E98232; }
#nv-hc-results .nv-cat-section .grid > a.nv-hc-card:nth-child(3n),
.grid > .nv-hc-overview-card:nth-child(4n+3) { --nv-hc-accent: #24501D; }
.grid > .nv-hc-overview-card:nth-child(4n) { --nv-hc-accent: #C63A27; }
.nv-hc-overview-card .nv-orbit,
a.nv-hc-card .nv-orbit { color: var(--nv-hc-accent, #C63A27); }

/* Arrow chip — replaces the overview card's plain fading arrow glyph, and
   adds a matching one to clickable condition cards (previously no "go"
   affordance at all on those). Non-clickable cards ("Other Conditions"
   entries without a built detail page yet) get no chip, same as before. */
.nv-hc-view-arrow-chip,
.nv-hc-card-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #EFE2D8;
    color: var(--nv-hc-accent, #C63A27);
    transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease, transform 0.22s ease;
    flex-shrink: 0;
}
.nv-hc-overview-card:hover .nv-hc-view-arrow-chip,
a.nv-hc-card:hover .nv-hc-card-arrow {
    background: var(--nv-hc-accent, #C63A27);
    border-color: var(--nv-hc-accent, #C63A27);
    color: #fff;
    transform: translateX(3px);
}
.dark .nv-hc-view-arrow-chip,
.dark .nv-hc-card-arrow { border-color: rgba(255, 255, 255, 0.14); }

@media (prefers-reduced-motion: reduce) {
    .nv-hc-overview-card:hover,
    a.nv-hc-card:hover { transform: none; }
    .nv-hc-overview-card:hover .nv-hc-view-arrow-chip,
    a.nv-hc-card:hover .nv-hc-card-arrow { transform: none; }
}

/* ---- Search bar: focus ring + keyboard-shortcut hint badge (feature #8,
   "/" to focus). Hidden on touch devices (coarse pointer) since there's no
   physical keyboard to hint at. ---- */
#nv-hc-search-input:focus-visible { box-shadow: 0 0 0 3px rgba(198, 58, 39, 0.12); }

/* BUGFIX (2026-11-30): this badge relied on the Tailwind utility class
   `right-9` for its horizontal offset. This host has no live Tailwind JIT
   (see this file's header comment) — only utility classes already present
   in the precompiled public/build/assets/app-*.css survive, and right-9
   was never used elsewhere, so it was silently dropped. The element kept
   `absolute`/`top-1/2`/`-translate-y-1/2` (those ARE compiled in) but with
   no `right` value it fell back to its normal-flow position, rendering as
   plain inline text spilling out past the search box into the gap before
   the filter pills. Fix: position it entirely from this plain CSS file,
   with no dependency on any Tailwind utility at all. */
.nv-hc-kbd-hint {
    position: absolute;
    top: 50%;
    right: 2.25rem; /* clears the clear-button's own 2.5rem slot (right-2.5) */
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 6px;
    border: 1px solid #E9E1DC;
    background: #FAF6F3;
    color: #8A8178;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    pointer-events: none;
}
.dark .nv-hc-kbd-hint { background: #2A2522; border-color: rgba(255, 255, 255, 0.14); color: #B3A89F; }
@media (hover: hover) and (pointer: fine) {
    .nv-hc-kbd-hint { display: inline-flex; }
}
/* When the clear ("x") button is visible (hidden attribute removed), both
   it and the hint would otherwise land in the same slot — hide the hint
   rather than let them overlap each other instead of the search box edge. */
#nv-hc-search-clear:not([hidden]) ~ .nv-hc-kbd-hint { display: none; }

/* ---- Empty-state "browse by category" suggestion chips — shown instead of
   a dead end when a search matches nothing. ---- */
.nv-hc-empty-suggestions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0 0 20px;
}
.nv-hc-empty-suggestions a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #E9E1DC;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #292522;
    text-decoration: none;
    transition: border-color 0.18s ease, color 0.18s ease;
}
.dark .nv-hc-empty-suggestions a { border-color: rgba(255, 255, 255, 0.14); color: #fff; }
.nv-hc-empty-suggestions a:hover { border-color: #C63A27; color: #C63A27; }

/* ---- Active quick-nav link — explicit visual state to go with the
   aria-current the script now sets (previously relied on a bare class with
   no dedicated style, so the "active section" was not actually visible). ---- */
#nv-hc-quicknav a[aria-current="true"] {
    border-color: #C63A27;
    color: #C63A27;
    background: #FFF1E7;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

/* =============================================================================
   Visual/motion enhancement pass (2026-11-30) — scroll-reveal entrance,
   animated count-up, scroll-progress bar, icon ambient glow, hover shimmer.
   Everything here is additive polish on top of the structure above; nothing
   here changes layout or content, so a JS failure degrades to "everything
   just shows immediately" rather than missing content (see the no-JS-safe
   notes on each block). ============================================== */

/* ---- 1 & 9. Scroll-reveal entrance, staggered across each grid.
   IMPORTANT no-JS-safe fallback: cards are NOT hidden by default — only once
   health-concerns.js confirms it's running does it add `js-reveal` to <html>,
   and only then does .nv-reveal start transparent/offset. With JS off or
   failing, .nv-reveal never gets `is-visible` toggled either, but since the
   base (non-js-reveal) state is fully visible, nothing is ever stuck hidden. */
.nv-reveal { opacity: 1; transform: none; }
html.js-reveal .nv-reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--nv-reveal-i, 0) * 60ms);
}
html.js-reveal .nv-reveal.is-visible { opacity: 1; transform: none; }

/* ---- 2. Animated count-up on category badges — number itself is server-
   rendered and correct with no JS; health-concerns.js only re-counts it up
   from 0 on first scroll-into-view as a visual flourish. ---- */
.nv-hc-count-num { font-variant-numeric: tabular-nums; }

/* ---- 3. Scroll-progress bar fixed to the very top of the viewport. ---- */
#nv-hc-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 60;
    background: transparent;
    pointer-events: none;
}
#nv-hc-progress-bar {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #C63A27, #E98232);
    transition: width 0.12s linear;
}

/* ---- 4. Gradient shimmer sweep across a card on hover — a soft diagonal
   light pass, layered above the existing gradient-ring glow (::before),
   using ::after so the two never conflict. ---- */
.nv-hc-overview-card,
a.nv-hc-card { overflow: hidden; }
.nv-hc-overview-card::after,
a.nv-hc-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.5) 50%, transparent 60%);
    transform: translateX(-120%);
    pointer-events: none;
}
.dark .nv-hc-overview-card::after,
.dark a.nv-hc-card::after {
    background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.07) 50%, transparent 60%);
}
.nv-hc-overview-card:hover::after,
a.nv-hc-card:hover::after {
    transform: translateX(120%);
    transition: transform 0.65s ease;
}

/* ---- 7. Ambient glow-pulse on the category-card icon badges — subtle,
   continuous, and paused outright under reduced motion (rule at the bottom
   of this file). Condition-card icons stay static; this is reserved for the
   4 top-level category cards so it reads as "the main choices breathe a
   little", not noise across 10+ condition cards at once. ---- */
@keyframes nv-hc-icon-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(198, 58, 39, 0); }
    50% { box-shadow: 0 0 0 6px rgba(198, 58, 39, 0.08); }
}
.nv-orbit.nv-orbit--glow {
    animation: nv-hc-icon-glow 2.8s ease-in-out infinite;
    animation-delay: calc(var(--nv-reveal-i, 0) * 0.3s);
}
.nv-hc-overview-card:nth-child(4n+2) .nv-orbit.nv-orbit--glow { animation-name: nv-hc-icon-glow-orange; }
.nv-hc-overview-card:nth-child(4n+3) .nv-orbit.nv-orbit--glow { animation-name: nv-hc-icon-glow-green; }
@keyframes nv-hc-icon-glow-orange {
    0%, 100% { box-shadow: 0 0 0 0 rgba(233, 130, 50, 0); }
    50% { box-shadow: 0 0 0 6px rgba(233, 130, 50, 0.1); }
}
@keyframes nv-hc-icon-glow-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(36, 80, 29, 0); }
    50% { box-shadow: 0 0 0 6px rgba(36, 80, 29, 0.09); }
}

/* ---- 10. Dark-mode parity for all of the above — the shimmer already has
   its own dark branch above; the progress bar and glow rings use the same
   brand hexes in both themes on purpose (they're small/translucent enough
   not to need separate dark values), so only the reveal/transition timing
   (theme-agnostic) is left to confirm here. ---- */

/* ---- 5 & 6. Reduced-motion / accessibility: every animation above is
   switched off outright, cards are simply shown at full opacity, and the
   progress bar still fills (useful, non-decorative) but without the CSS
   transition easing. ---- */
@media (prefers-reduced-motion: reduce) {
    html.js-reveal .nv-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .nv-orbit.nv-orbit--glow { animation: none; }
    .nv-hc-overview-card::after,
    a.nv-hc-card::after { display: none; }
    #nv-hc-progress-bar { transition: none; }
}

/* =============================================================================
   Card & control design-polish pass (2026-11-30, requested follow-up) —
   deeper hover elevation, icon micro-scale, filter-pill lift, and a tidier
   search bar frame. Additive on top of everything above; no markup changes
   needed for any of this block. ============================================= */

/* ---- Deeper, warmer hover elevation on both card grids (was a flat
   translateY only; now pairs with a two-layer shadow so the lift actually
   reads as the card coming toward the viewer, not just sliding up). ---- */
.nv-hc-overview-card:hover,
a.nv-hc-card:hover {
    box-shadow: 0 4px 10px -6px rgba(45, 30, 20, 0.14), 0 22px 40px -20px rgba(45, 30, 20, 0.28);
    border-color: var(--nv-hc-accent, #C63A27);
}
.dark .nv-hc-overview-card:hover,
.dark a.nv-hc-card:hover {
    box-shadow: 0 4px 10px -6px rgba(0, 0, 0, 0.3), 0 22px 40px -20px rgba(0, 0, 0, 0.5);
}

/* ---- Icon badge micro-scale on card hover — the icon itself leans into
   the interaction instead of staying static while everything around it
   moves. Paired with the existing ambient glow on category cards. ---- */
.nv-orbit { transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1); }
.nv-hc-overview-card:hover .nv-orbit,
a.nv-hc-card:hover .nv-orbit { transform: scale(1.08) rotate(-3deg); }

/* ---- Condition-card title picks up the accent color on hover, so the
   whole card (icon, title, arrow) reads as one cohesive hover state rather
   than just the arrow chip reacting. ---- */
a.nv-hc-card:hover h3 { color: var(--nv-hc-accent, #C63A27); transition: color 0.2s ease; }

/* ---- Filter pills: subtle lift + shadow on hover/active, matching the
   card language instead of a flat color-only change. ---- */
.nv-hc-pill {
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.nv-hc-pill:hover { transform: translateY(-1px); }
.nv-hc-pill.is-active { box-shadow: 0 6px 14px -8px rgba(198, 58, 39, 0.45); }

/* ---- Search bar frame: soft ambient shadow at rest (previously flat),
   growing slightly on focus so the whole control feels responsive, not
   just the ring. ---- */
#nv-hc-search-input {
    box-shadow: 0 1px 2px rgba(45, 30, 20, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.dark #nv-hc-search-input { box-shadow: none; }

/* ---- Condition-group section headings get a short accent underline, a
   small flourish that ties each section heading back to the color-cycling
   card system below it instead of sitting as plain bold text. ---- */
.nv-cat-section > div > h2 {
    position: relative;
    padding-bottom: 10px;
}
.nv-cat-section > div > h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 44px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #C63A27, #E98232);
}

@media (prefers-reduced-motion: reduce) {
    .nv-orbit { transition: none; }
    .nv-hc-overview-card:hover .nv-orbit,
    a.nv-hc-card:hover .nv-orbit { transform: none; }
    .nv-hc-pill:hover { transform: none; }
}
