/* /faq. Depends on home.css for design tokens, .home-container, .home-button,
   .home-eyebrow, reveal/menu behaviour and the shared header/footer. Every
   rule here is scoped under a .faq-* class so it cannot leak onto the
   homepage, /sluzby, /case-studies, /o-nas, /kontakt or /blog. */

/* ---------- Hero ---------- */
.faq-hero { position: relative; overflow: hidden; padding: 48px 0 80px; border-bottom: 1px solid var(--home-line); background: var(--home-black); }
.faq-hero__grid-bg { position: absolute; inset: 0; opacity: .38; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-position: center; background-size: 52px 52px; -webkit-mask-image: radial-gradient(ellipse 78% 68% at 74% 40%, #000, transparent 75%); mask-image: radial-gradient(ellipse 78% 68% at 74% 40%, #000, transparent 75%); }

.faq-breadcrumb { position: relative; z-index: 2; padding-top: 8px; margin-bottom: 24px; }
.faq-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; }
.faq-breadcrumb li { display: flex; align-items: center; color: var(--text-3-dark); font-size: 13px; }
.faq-breadcrumb li + li::before { margin: 0 8px; color: #4a4f54; content: '›'; }
.faq-breadcrumb a { color: #8b9197; font-weight: 500; transition: color .25s var(--home-ease); }
.faq-breadcrumb a:hover { color: #fff; }
.faq-breadcrumb li[aria-current] span { color: #c9cdd1; font-weight: 600; }

.faq-hero__layout { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 48px; }
.faq-hero__copy h1 { max-width: 540px; margin: 0 0 20px; color: #f7f7f4; font-size: var(--fs-h1); font-weight: 640; letter-spacing: var(--ls-heading); line-height: var(--lh-display); }
.faq-hero__copy h1 .accent-dot { color: var(--home-red); }
.faq-hero__lead { max-width: 440px; margin: 0 0 24px; color: #b5b9be; font-size: 16px; font-weight: 400; line-height: 1.68; }
.faq-hero__points { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 0; padding: 0; list-style: none; }
.faq-hero__points li { display: flex; align-items: center; gap: 8px; color: #9aa0a6; font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.faq-hero__points i { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: var(--home-red); box-shadow: 0 0 7px rgba(240,32,44,.7); }

.has-home-motion:not(.home-loaded) .faq-hero__copy > * { transform: translateY(8px); }
.has-home-motion .faq-hero__copy > * { transition: opacity .3s var(--home-ease), transform .3s var(--home-ease); }
.has-home-motion .faq-hero__copy > *:nth-child(2) { transition-delay: .06s; }
.has-home-motion .faq-hero__copy > *:nth-child(3) { transition-delay: .12s; }
.has-home-motion .faq-hero__copy > *:nth-child(4) { transition-delay: .18s; }
.has-home-motion.home-loaded .faq-hero__copy > * { opacity: 1; transform: translateY(0); }

/* ---------- Hero visual: FAQ / search interface ---------- */
.faq-hero__visual { position: relative; height: 400px; }
.has-home-motion:not(.home-loaded) .faq-hero__visual { opacity: 0; }
.has-home-motion .faq-hero__visual { transition: opacity .7s .1s var(--home-ease); }
.has-home-motion.home-loaded .faq-hero__visual { opacity: 1; }
.faq-hero__visual::before { position: absolute; inset: -8%; z-index: 0; background: radial-gradient(ellipse 58% 58% at 50% 50%, rgba(240,32,44,.12), transparent 72%); content: ''; pointer-events: none; }

.faq-visual__panel { position: absolute; top: 50%; left: 50%; z-index: 2; width: 300px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: linear-gradient(165deg, rgba(24,28,33,.98), rgba(11,14,18,.99)); box-shadow: 0 30px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.03); transform: translate(-50%, -50%); }
.faq-visual__bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 15px; border-bottom: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.02); }
.faq-visual__bar span { color: #e2e3e3; font: 700 11px/1 var(--font-sans); letter-spacing: .08em; }
.faq-visual__status { width: 6px; height: 6px; border-radius: 50%; background: #2bc875; box-shadow: 0 0 7px rgba(43,200,117,.8); animation: faq-status-pulse 2.2s ease-in-out infinite; }
@keyframes faq-status-pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }

.faq-visual__search { display: flex; align-items: center; gap: 8px; margin: 12px 14px; padding: 9px 11px; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; background: rgba(255,255,255,.03); }
.faq-visual__search i { width: 12px; height: 12px; flex: 0 0 auto; border: 1.5px solid #7d838a; border-radius: 50%; }
.faq-visual__search i::after { display: block; width: 5px; height: 1.5px; margin: 9px 0 0 9px; background: #7d838a; content: ''; transform: rotate(45deg); }
.faq-visual__search span { color: #7d838a; font-size: 11.5px; }
.faq-visual__caret { width: 1.5px; height: 12px; background: var(--home-red); animation: faq-caret-blink 1.1s step-end infinite; }
@keyframes faq-caret-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

.faq-visual__rows { display: flex; flex-direction: column; gap: 3px; margin: 0 0 14px; padding: 0 10px; list-style: none; }
.faq-visual__rows li { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 6px; opacity: 0; transform: translateY(6px); transition: opacity .5s var(--home-ease), transform .5s var(--home-ease), background .3s var(--home-ease); }
.home-loaded .faq-visual__rows li { opacity: 1; transform: translateY(0); transition-delay: calc(.5s + var(--d, 0) * .12s); }
.faq-visual__rows li[data-delay="0"] { --d: 0; } .faq-visual__rows li[data-delay="1"] { --d: 1; } .faq-visual__rows li[data-delay="2"] { --d: 2; } .faq-visual__rows li[data-delay="3"] { --d: 3; }
.faq-visual__rows li i { width: 5px; height: 5px; flex: 0 0 auto; border-radius: 50%; background: #4b4f54; }
.faq-visual__rows li span { flex: 1 1 auto; height: 7px; border-radius: 4px; background: rgba(255,255,255,.14); }
.faq-visual__rows li.is-active { background: rgba(240,32,44,.1); }
.faq-visual__rows li.is-active i { background: var(--home-red); box-shadow: 0 0 6px rgba(240,32,44,.8); }
.faq-visual__rows li.is-active span { background: rgba(240,32,44,.35); max-width: 46%; }
.faq-visual__rows li p { flex-basis: 100%; margin: 6px 0 0 15px; color: #c7cace; font-size: 10.5px; line-height: 1.5; }

.faq-visual__lines { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; }
.faq-edge { fill: none; stroke: rgba(240,32,44,.3); stroke-width: 1.4; stroke-dasharray: 260; stroke-dashoffset: 260; }
.home-loaded .faq-edge { animation: faq-edge-draw 1.1s var(--home-ease) forwards; animation-delay: calc(.5s + var(--d, 0) * .12s); }
.faq-edge[data-delay="0"] { --d: 0; } .faq-edge[data-delay="1"] { --d: 1; } .faq-edge[data-delay="2"] { --d: 2; } .faq-edge[data-delay="3"] { --d: 3; } .faq-edge[data-delay="4"] { --d: 4; }
@keyframes faq-edge-draw { to { stroke-dashoffset: 0; } }

.faq-visual__nodes { position: absolute; inset: 0; z-index: 3; }
.faq-node { position: absolute; display: flex; align-items: center; gap: 8px; padding: 9px 13px; border: 0; border-radius: 6px; background: rgba(19,23,28,.94); box-shadow: 0 16px 32px rgba(0,0,0,.42); color: #e2e3e3; font: 650 10.5px/1 var(--font-sans); letter-spacing: .05em; white-space: nowrap; cursor: pointer; opacity: 0; transform: translate(-50%, -50%) scale(.6); transition: opacity .5s var(--home-ease), transform .5s var(--home-ease), border-color .3s var(--home-ease), box-shadow .3s var(--home-ease); }
.faq-node { border: 1px solid rgba(255,255,255,.16); }
.home-loaded .faq-node { opacity: 1; transform: translate(-50%, -50%) scale(1); transition-delay: calc(1.05s + var(--d, 0) * .1s); }
.faq-node[data-delay="0"] { --d: 0; } .faq-node[data-delay="1"] { --d: 1; } .faq-node[data-delay="2"] { --d: 2; } .faq-node[data-delay="3"] { --d: 3; } .faq-node[data-delay="4"] { --d: 4; }
.faq-node i { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--home-red); box-shadow: 0 0 8px rgba(240,32,44,.85); }
.faq-node:hover, .faq-node.is-focused { border-color: rgba(240,32,44,.55); box-shadow: 0 18px 36px rgba(0,0,0,.5); }

/* ---------- Main section: search + filters + layout ---------- */
.faq-main { --eyebrow: var(--red-ink); background: var(--home-paper); color: var(--home-ink); }
/* .home-button--ghost is designed for dark sections (white border/text); on
   this page's light section it needs a readable light-mode variant. */
.faq-main .home-button--ghost { border-color: #cfd1d1; background: #fff; color: var(--home-ink); }
.faq-main .home-button--ghost:hover { border-color: #b7b9b9; background: #f6f6f4; color: var(--home-ink); }
.faq-main__inner { padding: 48px 0 0; }

.faq-search { position: relative; max-width: 620px; margin: 0 0 24px; }
.faq-search__input { width: 100%; height: 54px; padding: 0 48px; border: 1px solid #cfd1d1; border-radius: var(--radius-md); background: #fff; color: var(--home-ink); font-family: inherit; font-size: 16px; outline: 0; transition: border-color .25s var(--home-ease), box-shadow .25s var(--home-ease); }
.faq-search__input::placeholder { color: #969ba0; }
.faq-search__input:focus { border-color: var(--home-red); box-shadow: 0 0 0 3px rgba(240,32,44,.12); }
.faq-search__input::-webkit-search-cancel-button { display: none; }
.faq-search__icon { position: absolute; top: 50%; left: 17px; width: 15px; height: 15px; border: 1.6px solid #8b9094; border-radius: 50%; transform: translateY(-58%); pointer-events: none; }
.faq-search__icon::after { position: absolute; right: -6px; bottom: -6px; width: 7px; height: 1.6px; background: #8b9094; content: ''; transform: rotate(45deg); }
.faq-search__clear { position: absolute; top: 50%; right: 8px; padding: 8px 12px; border: 1px solid #d6d7d7; border-radius: var(--radius-md); background: #fff; color: #62676c; font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transform: translateY(-50%); transition: border-color .25s var(--home-ease), color .25s var(--home-ease); }
.faq-search__clear:hover { border-color: var(--home-red); color: var(--home-red); }

.faq-filters { display: flex; flex-wrap: nowrap; gap: 12px; margin: 0 0 20px; padding-bottom: 4px; overflow-x: auto; scrollbar-width: none; }
.faq-filters::-webkit-scrollbar { display: none; }
.faq-filters__tab { flex: 0 0 auto; min-height: 40px; padding: 8px 16px; border: 1px solid #d3d5d5; border-radius: var(--radius-pill); background: #fff; color: #4c4f53; font-family: inherit; font-size: 14px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap; cursor: pointer; transition: border-color .25s var(--home-ease), color .25s var(--home-ease), background .25s var(--home-ease); }
.faq-filters__tab em { margin-left: 8px; color: var(--text-3); font-size: 12px; font-style: normal; font-weight: 700; }
.faq-filters__tab:hover { border-color: #b7b9b9; color: var(--home-ink); }
.faq-filters__tab.is-active { border-color: var(--home-red); background: rgba(240,32,44,.06); color: var(--red-ink); }
.faq-filters__tab.is-active em { color: var(--red-ink); }

.faq-results-count { margin: 0 0 24px; color: var(--text-3); font: 700 12px/1 var(--font-sans); letter-spacing: .07em; text-transform: uppercase; }

/* ---------- Layout: sidebar + list ---------- */
.faq-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); align-items: start; gap: 48px; padding-bottom: 96px; }

.faq-sidebar__inner { position: sticky; top: 108px; }
.faq-sidebar__block { margin-bottom: 32px; }
.faq-sidebar__block h2 { margin: 0 0 16px; color: var(--home-ink); font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.faq-sidebar__block h2 .accent-dot { color: var(--home-red); }

.faq-cat-list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.faq-cat-list a { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: var(--radius-sm); color: #4c4f53; font-size: 15px; font-weight: 600; text-decoration: none; transition: background .25s var(--home-ease), color .25s var(--home-ease); }
.faq-cat-list a:hover { background: rgba(0,0,0,.03); color: var(--home-ink); }
.faq-cat-list a.is-active { background: rgba(240,32,44,.08); color: var(--red-ink); }
.faq-cat-list span { flex: 1 1 auto; }
.faq-cat-list em { flex: 0 0 auto; color: var(--text-3); font-size: 13px; font-style: normal; font-weight: 700; }
.faq-cat-list a.is-active em { color: var(--red-ink); }

.faq-sidebar__contact { padding: 20px; border: 1px solid #dcdddc; border-radius: var(--radius-md); background: #fff; }
.faq-sidebar__contact i { display: grid; width: 32px; height: 32px; margin-bottom: 12px; place-items: center; border: 1px solid #c8cbcc; border-radius: var(--radius-md); background: #f8f8f6; color: var(--home-red); font-size: 16px; font-style: normal; font-weight: 700; }
.faq-sidebar__contact h2 { margin: 0 0 8px; font-size: 17px; }
.faq-sidebar__contact p { margin: 0 0 16px; color: #62676c; font-size: 15px; line-height: 1.55; }
.faq-sidebar__contact .home-button { min-height: 44px; padding: 0 var(--space-4); font-size: 14px; }

/* ---------- FAQ accordion ---------- */
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid #dfe0df; }
.faq-item:first-child { border-top: 1px solid #dfe0df; }
.faq-item.home-reveal { opacity: 1; transform: none; transition: none; }
.faq-item.is-highlighted .faq-item__trigger { background: rgba(240,32,44,.06); }

.faq-item__row { margin: 0; font-size: inherit; font-weight: inherit; }
.faq-item__trigger { display: flex; width: 100%; align-items: center; gap: 20px; padding: 24px 8px; border: 0; background: none; color: var(--home-ink); font-family: inherit; text-align: left; cursor: pointer; transition: background .3s var(--home-ease); }
.faq-item__trigger:hover { background: rgba(0,0,0,.015); }
.faq-item__trigger:focus-visible { outline: 2px solid var(--home-red); outline-offset: -2px; }
.faq-item__num { flex: 0 0 auto; color: var(--text-3); font: 700 13px/1 var(--font-sans); }
.faq-item__question { flex: 1 1 auto; font-size: 17px; font-weight: 650; letter-spacing: -.01em; line-height: 1.4; }
.faq-item__icon { position: relative; width: 18px; height: 18px; flex: 0 0 auto; color: var(--home-ink); }
.faq-item__icon::before, .faq-item__icon::after { position: absolute; top: 50%; left: 50%; background: currentColor; content: ''; transform: translate(-50%, -50%); transition: transform .3s var(--home-ease), opacity .3s var(--home-ease); }
.faq-item__icon::before { width: 13px; height: 1.6px; }
.faq-item__icon::after { width: 1.6px; height: 13px; }
.faq-item.is-open .faq-item__trigger { color: var(--home-red); }
.faq-item.is-open .faq-item__icon { color: var(--home-red); }
.faq-item.is-open .faq-item__icon::after { opacity: 0; transform: translate(-50%, -50%) rotate(90deg); }

.faq-item__panel { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .3s var(--home-ease), opacity .32s var(--home-ease); }
.faq-item.is-open .faq-item__panel { grid-template-rows: 1fr; opacity: 1; }
.faq-item__panel > .faq-item__answer { min-height: 0; overflow: hidden; }
.faq-item__answer { padding: 0 8px 24px 40px; color: #52565b; font-size: 16px; line-height: 1.72; }
.faq-item__answer p:first-child { margin-top: 0; }
.faq-item__answer p:last-child { margin-bottom: 0; }

/* ---------- Empty state ---------- */
.faq-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; padding: 48px 8px; }
.faq-empty[hidden] { display: none; }
.faq-empty p { margin: 0; color: #52565b; font-size: 16px; line-height: 1.6; }
.faq-empty__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- CTA ---------- */
.faq-cta { position: relative; overflow: hidden; padding: var(--section-y) 0; background: var(--home-black); }
.faq-cta__bg { position: absolute; inset: 0; opacity: .5; background-image: linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px); background-size: 52px 52px; -webkit-mask-image: radial-gradient(ellipse 70% 100% at 85% 50%, #000, transparent 75%); mask-image: radial-gradient(ellipse 70% 100% at 85% 50%, #000, transparent 75%); }
.faq-cta__layout { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.faq-cta__copy h2 { max-width: 420px; margin: 0 0 12px; color: #f7f7f4; font-size: var(--fs-h3); font-weight: 640; letter-spacing: var(--ls-heading); line-height: var(--lh-heading); }
.faq-cta__copy p { max-width: 400px; margin: 0; color: #b5b9be; font-size: 15px; line-height: 1.6; }
.faq-cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
	.faq-layout { grid-template-columns: 210px minmax(0, 1fr); gap: 40px; }
}

@media (max-width: 1024px) {
	.faq-hero__layout { grid-template-columns: 1fr; gap: 40px; }
	.faq-hero__visual { height: 320px; }
	.faq-layout { grid-template-columns: 1fr; }
	.faq-sidebar__inner { position: static; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; align-items: start; }
}

@media (max-width: 768px) {
	.faq-hero { padding: 40px 0 64px; }
	.faq-main__inner { padding-top: 40px; }
	.faq-search__input { height: 50px; font-size: 16px; }
	.faq-sidebar__inner { grid-template-columns: 1fr; }
	.faq-item__question { font-size: 16px; }
	.faq-item__answer { padding-left: 32px; }

	/* Simplified mobile hero visual: just the compact search/answer panel —
	   the topic-node network is decorative clutter at this width. */
	.faq-hero__visual { height: 230px; }
	.faq-visual__nodes, .faq-visual__lines { display: none; }
	.faq-visual__panel { width: 90%; max-width: 320px; }
}

@media (max-width: 520px) {
	.faq-cta__layout { flex-direction: column; align-items: flex-start; }
	.faq-cta__actions .home-button { width: 100%; text-align: center; }
	.faq-hero__points { gap: 8px 20px; }
	.faq-item__trigger { gap: 12px; padding: 20px 4px; }
	.faq-item__num { display: none; }
	.faq-item__answer { padding-left: 4px; }
}

@media (prefers-reduced-motion: reduce) {
	.faq-visual__status, .faq-visual__caret { animation: none; }
	.faq-node, .faq-visual__rows li, .faq-edge { transition: none; animation: none; opacity: 1; transform: none; stroke-dashoffset: 0; }
}
