/* ════════════════════════════════════════
   FIZJOEVIDENCE — CENTRUM POMOCY I FAQ
   ════════════════════════════════════════ */

.fe-faq-page-shell {
    box-sizing: border-box;
    width: 100%;
    min-height: 70vh;
    padding-bottom: clamp(3rem, 6vw, 5rem);
    color: var(--fe-text-strong, #0f172a);
    font-family: var(--fe-font-sans, system-ui, -apple-system, sans-serif);
}

.fe-faq-container {
    box-sizing: border-box;
    margin-inline: auto;
    max-width: var(--fe-page-max-width, 1320px);
    padding-inline: clamp(1rem, 3vw, 2.5rem);
    width: 100%;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */

.fe-faq-hero {
    background: linear-gradient(180deg, var(--fe-surface, #fffdf9) 0%, var(--fe-section-bg, #f8f5f0) 100%);
    border-bottom: 1px solid var(--fe-border, #e2e8f0);
    padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.5rem, 3.5vw, 2.5rem);
    text-align: left;
}

.fe-faq-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--fe-surface-sunken, #f1f5f9);
    border: 1px solid var(--fe-border, #e2e8f0);
    color: var(--fe-brand-primary, #9d4300);
    font-size: 0.8rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.fe-faq-hero__badge svg {
    width: 15px;
    height: 15px;
}

.fe-faq-hero__title {
    margin: 0 0 10px;
    font-size: clamp(1.8rem, 3.8vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--fe-text-strong, #0f172a);
}

.fe-faq-hero__lead {
    margin: 0 0 24px;
    font-size: clamp(0.95rem, 1.4vw, 1.1rem);
    line-height: 1.6;
    color: var(--fe-text-muted, #475569);
    max-width: 780px;
}

/* ── Wyszukiwarka FAQ ─────────────────────────────────────────────────────── */

.fe-faq-search-wrap {
    margin-bottom: 24px;
    max-width: 680px;
}

.fe-faq-search-box {
    display: flex;
    align-items: center;
    background: var(--fe-surface-card, #ffffff);
    border: 1.5px solid var(--fe-border, #cbd5e1);
    border-radius: var(--fe-radius-md, 14px);
    padding: 4px 10px 4px 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fe-faq-search-box:focus-within {
    border-color: var(--fe-brand-primary, #9d4300);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--fe-brand-primary, #9d4300) 15%, transparent);
}

.fe-faq-search-icon {
    display: flex;
    align-items: center;
    color: var(--fe-brand-primary, #9d4300);
    margin-right: 10px;
    flex-shrink: 0;
}

.fe-faq-search-icon svg {
    width: 18px;
    height: 18px;
}

.fe-faq-search-input {
    flex: 1;
    min-width: 0;
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 10px 0;
    font-family: inherit;
    font-size: 1rem;
    color: var(--fe-text-strong, #0f172a);
}

.fe-faq-search-input::placeholder {
    color: var(--fe-text-muted, #94a3b8);
}

.fe-faq-search-clear {
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--fe-text-muted, #64748b);
    transition: background 0.15s ease, color 0.15s ease;
}

.fe-faq-search-clear:hover {
    background: var(--fe-surface-sunken, #f1f5f9);
    color: var(--fe-text-strong, #0f172a);
}

.fe-faq-search-clear svg {
    width: 16px;
    height: 16px;
}

/* ── Pasek zakładek i sterowania ─────────────────────────────────────────── */

.fe-faq-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
}

.fe-faq-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.fe-faq-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--fe-border, #cbd5e1);
    background: var(--fe-surface-card, #ffffff);
    color: var(--fe-text, #334155);
    font-family: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fe-faq-tab:hover {
    background: var(--fe-surface-hover, #f1f5f9);
    border-color: var(--fe-brand-primary, #9d4300);
    color: var(--fe-brand-primary, #9d4300);
}

.fe-faq-tab.is-active {
    background: var(--fe-brand-primary, #9d4300);
    border-color: var(--fe-brand-primary, #9d4300);
    color: #ffffff;
}

.fe-faq-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1px 7px;
    border-radius: 999px;
    background: color-mix(in srgb, currentColor 14%, transparent);
    font-size: 0.74rem;
    font-weight: 750;
}

.fe-faq-btn-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    border: 1px solid var(--fe-border, #cbd5e1);
    background: var(--fe-surface-card, #ffffff);
    color: var(--fe-text-muted, #475569);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

.fe-faq-btn-toggle:hover {
    background: var(--fe-surface-hover, #f1f5f9);
    color: var(--fe-text-strong, #0f172a);
    border-color: var(--fe-border-strong, #94a3b8);
}

.fe-faq-btn-toggle svg {
    width: 14px;
    height: 14px;
}

/* ── Sekcje pytań ─────────────────────────────────────────────────────────── */

.fe-faq-content {
    padding-top: clamp(2rem, 4vw, 3rem);
}

.fe-faq-group {
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.fe-faq-group.is-hidden {
    display: none !important;
}

.fe-faq-group__header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--fe-border, #e2e8f0);
}

.fe-faq-group__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--fe-brand-primary, #9d4300) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--fe-brand-primary, #9d4300) 22%, transparent);
    color: var(--fe-brand-primary, #9d4300);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.fe-faq-group__icon svg {
    width: 20px;
    height: 20px;
}

.fe-faq-group__title {
    margin: 0 0 4px;
    font-size: clamp(1.3rem, 2.2vw, 1.65rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--fe-text-strong, #0f172a);
}

.fe-faq-group__desc {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--fe-text-muted, #64748b);
}

/* ── Lista akordeonów ────────────────────────────────────────────────────── */

.fe-faq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fe-faq-item {
    background: var(--fe-surface-card, #ffffff);
    border: 1px solid var(--fe-border, #e2e8f0);
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.fe-faq-item.is-hidden {
    display: none !important;
}

.fe-faq-item:hover {
    border-color: color-mix(in srgb, var(--fe-brand-primary, #9d4300) 40%, var(--fe-border, #e2e8f0));
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.fe-faq-item[open] {
    border-color: color-mix(in srgb, var(--fe-brand-primary, #9d4300) 50%, var(--fe-border, #e2e8f0));
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.05);
}

.fe-faq-item__summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.fe-faq-item__summary::-webkit-details-marker {
    display: none;
}

.fe-faq-item__summary:focus-visible {
    outline: 2px solid var(--fe-brand-primary, #9d4300);
    outline-offset: -2px;
}

.fe-faq-item__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--fe-surface-sunken, #f1f5f9);
    border: 1px solid var(--fe-border, #e2e8f0);
    color: var(--fe-text-muted, #64748b);
    font-size: 0.78rem;
    font-weight: 800;
    flex-shrink: 0;
}

.fe-faq-item[open] .fe-faq-item__num {
    background: var(--fe-brand-primary, #9d4300);
    border-color: var(--fe-brand-primary, #9d4300);
    color: #ffffff;
}

.fe-faq-item__question {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--fe-text-strong, #0f172a);
}

.fe-faq-item[open] .fe-faq-item__question {
    color: var(--fe-brand-primary, #9d4300);
}

.fe-faq-item__chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--fe-surface-sunken, #f8fafc);
    color: var(--fe-text-muted, #64748b);
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.fe-faq-item__chevron svg {
    width: 16px;
    height: 16px;
}

.fe-faq-item[open] .fe-faq-item__chevron {
    transform: rotate(180deg);
    background: color-mix(in srgb, var(--fe-brand-primary, #9d4300) 12%, transparent);
    color: var(--fe-brand-primary, #9d4300);
}

.fe-faq-item__body {
    padding: 0 20px 20px calc(20px + 28px + 14px);
    border-top: 1px solid transparent;
}

.fe-faq-item[open] .fe-faq-item__body {
    border-top-color: color-mix(in srgb, var(--fe-border, #e2e8f0) 65%, transparent);
    padding-top: 14px;
}

.fe-faq-item__content p {
    margin: 0 0 12px;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--fe-text, #334155);
}

.fe-faq-item__content p:last-child {
    margin-bottom: 0;
}


/* ── Stan pusty wyszukiwania ─────────────────────────────────────────────── */

.fe-faq-empty {
    text-align: center;
    padding: clamp(2.5rem, 5vw, 4rem) 20px;
    background: var(--fe-surface-card, #ffffff);
    border: 1px dashed var(--fe-border, #cbd5e1);
    border-radius: 16px;
    margin-bottom: 2rem;
}

.fe-faq-empty__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--fe-surface-sunken, #f1f5f9);
    color: var(--fe-text-muted, #64748b);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.fe-faq-empty__icon svg {
    width: 28px;
    height: 28px;
}

.fe-faq-empty h3 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: 750;
    color: var(--fe-text-strong, #0f172a);
}

.fe-faq-empty p {
    margin: 0 0 18px;
    font-size: 0.95rem;
    color: var(--fe-text-muted, #64748b);
    max-width: 480px;
    margin-inline: auto;
}

.fe-faq-btn-reset {
    display: inline-flex;
    align-items: center;
    padding: 9px 18px;
    border-radius: 999px;
    background: var(--fe-brand-primary, #9d4300);
    border: none;
    color: #ffffff;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.fe-faq-btn-reset:hover {
    opacity: 0.9;
}

/* ── Karta kontaktu na dole ──────────────────────────────────────────────── */

.fe-faq-contact-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    padding: clamp(20px, 3.5vw, 32px);
    background: linear-gradient(135deg, color-mix(in srgb, var(--fe-brand-primary, #9d4300) 8%, var(--fe-surface-card, #ffffff)) 0%, var(--fe-surface-card, #ffffff) 100%);
    border: 1.5px solid color-mix(in srgb, var(--fe-brand-primary, #9d4300) 25%, var(--fe-border, #e2e8f0));
    border-radius: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    margin-top: clamp(2.5rem, 5vw, 4rem);
}

.fe-faq-contact-card__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--fe-brand-primary, #9d4300);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fe-faq-contact-card__icon svg {
    width: 26px;
    height: 26px;
}

.fe-faq-contact-card__content h3 {
    margin: 0 0 6px;
    font-size: clamp(1.15rem, 2vw, 1.35rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--fe-text-strong, #0f172a);
}

.fe-faq-contact-card__content p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--fe-text, #475569);
    max-width: 620px;
}

.fe-faq-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    background: var(--fe-brand-primary, #9d4300);
    color: #ffffff !important;
    font-weight: 750;
    font-size: 0.92rem;
    text-decoration: none;
    white-space: nowrap;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.fe-faq-contact-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.fe-faq-contact-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.15s ease;
}

.fe-faq-contact-btn:hover svg {
    transform: translateX(3px);
}

/* ── Dark Mode ────────────────────────────────────────────────────────────── */

html[data-fe-theme="dark"] .fe-faq-hero {
    background: linear-gradient(180deg, #181a1d 0%, #121417 100%);
    border-bottom-color: #2a2e35;
}

html[data-fe-theme="dark"] .fe-faq-hero__badge {
    background: #1f2329;
    border-color: #2f3540;
    color: #f97316;
}

html[data-fe-theme="dark"] .fe-faq-hero__title {
    color: #f8fafc;
}

html[data-fe-theme="dark"] .fe-faq-hero__lead {
    color: #94a3b8;
}

html[data-fe-theme="dark"] .fe-faq-search-box {
    background: #1a1d22;
    border-color: #333a44;
}

html[data-fe-theme="dark"] .fe-faq-search-box:focus-within {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

html[data-fe-theme="dark"] .fe-faq-search-input {
    color: #f8fafc;
}

html[data-fe-theme="dark"] .fe-faq-search-input::placeholder {
    color: #64748b;
}

html[data-fe-theme="dark"] .fe-faq-tab,
html[data-fe-theme="dark"] .fe-faq-btn-toggle {
    background: #1a1d22;
    border-color: #2f3540;
    color: #cbd5e1;
}

html[data-fe-theme="dark"] .fe-faq-tab:hover,
html[data-fe-theme="dark"] .fe-faq-btn-toggle:hover {
    background: #242931;
    color: #f8fafc;
    border-color: #475569;
}

html[data-fe-theme="dark"] .fe-faq-tab.is-active {
    background: #f97316;
    border-color: #f97316;
    color: #0f172a;
}

html[data-fe-theme="dark"] .fe-faq-group__header {
    border-bottom-color: #2a2e35;
}

html[data-fe-theme="dark"] .fe-faq-group__icon {
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.28);
    color: #f97316;
}

html[data-fe-theme="dark"] .fe-faq-group__title {
    color: #f8fafc;
}

html[data-fe-theme="dark"] .fe-faq-group__desc {
    color: #94a3b8;
}

html[data-fe-theme="dark"] .fe-faq-item {
    background: #181a1d;
    border-color: #272b32;
}

html[data-fe-theme="dark"] .fe-faq-item:hover {
    border-color: #3b424e;
}

html[data-fe-theme="dark"] .fe-faq-item[open] {
    border-color: rgba(249, 115, 22, 0.4);
}

html[data-fe-theme="dark"] .fe-faq-item__num {
    background: #20242b;
    border-color: #2f3540;
    color: #94a3b8;
}

html[data-fe-theme="dark"] .fe-faq-item[open] .fe-faq-item__num {
    background: #f97316;
    border-color: #f97316;
    color: #0f172a;
}

html[data-fe-theme="dark"] .fe-faq-item__question {
    color: #f1f5f9;
}

html[data-fe-theme="dark"] .fe-faq-item[open] .fe-faq-item__question {
    color: #fb923c;
}

html[data-fe-theme="dark"] .fe-faq-item__chevron {
    background: #20242b;
    color: #94a3b8;
}

html[data-fe-theme="dark"] .fe-faq-item[open] .fe-faq-item__chevron {
    background: rgba(249, 115, 22, 0.16);
    color: #f97316;
}

html[data-fe-theme="dark"] .fe-faq-item__body {
    border-top-color: #262a31;
}

html[data-fe-theme="dark"] .fe-faq-item__content p {
    color: #cbd5e1;
}


html[data-fe-theme="dark"] .fe-faq-empty {
    background: #181a1d;
    border-color: #2f3540;
}

html[data-fe-theme="dark"] .fe-faq-empty__icon {
    background: #20242b;
    color: #94a3b8;
}

html[data-fe-theme="dark"] .fe-faq-empty h3 {
    color: #f8fafc;
}

html[data-fe-theme="dark"] .fe-faq-empty p {
    color: #94a3b8;
}

html[data-fe-theme="dark"] .fe-faq-contact-card {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.08) 0%, #181a1d 100%);
    border-color: rgba(249, 115, 22, 0.28);
}

html[data-fe-theme="dark"] .fe-faq-contact-card__content h3 {
    color: #f8fafc;
}

html[data-fe-theme="dark"] .fe-faq-contact-card__content p {
    color: #94a3b8;
}

html[data-fe-theme="dark"] .fe-faq-contact-btn {
    background: #f97316;
    color: #0f172a !important;
}

/* ── RWD / Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 860px) {
    .fe-faq-contact-card {
        grid-template-columns: 1fr;
        gap: 16px;
        text-align: left;
    }

    .fe-faq-contact-card__icon {
        margin-bottom: 4px;
    }

    .fe-faq-contact-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .fe-faq-item__summary {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 10px;
        padding: 14px 14px;
    }

    .fe-faq-item__question {
        font-size: 0.98rem;
    }

    .fe-faq-item__body {
        padding: 0 14px 16px 14px;
    }

    .fe-faq-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .fe-faq-toggle-all {
        align-self: flex-start;
    }
}
