/**
 * Ecker Haubeneder - FAQ Accordion & Archive Styles
 * Inspired by VfGH accessibility & clean corporate design.
 */

.ecker-faq-wrapper,
.ecker-faq-archive-wrapper {
    margin: 2.5rem 0;
    width: 100%;
}

.ecker-faq-headline,
.ecker-faq-archive-main-headline {
    font-size: 1.75rem;
    font-weight: 700;
    color: #222222;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    position: relative;
}

.ecker-faq-headline::after,
.ecker-faq-archive-main-headline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #D40F14;
}

/* Category Blocks in Archive */
.ecker-faq-category-block {
    margin-bottom: 3.5rem;
    scroll-margin-top: 100px;
}

.ecker-faq-category-header {
    margin-bottom: 1.25rem;
}

.ecker-faq-category-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #222222;
    border-left: 4px solid #D40F14;
    padding-left: 14px;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ecker-faq-count-pill {
    font-size: 0.85rem;
    font-weight: 600;
    background-color: #f3f4f6;
    color: #6b7280;
    padding: 2px 10px;
    border-radius: 12px;
    vertical-align: middle;
}

.ecker-faq-category-desc {
    font-size: 1.05rem;
    color: #666666;
    margin-left: 18px;
    margin-bottom: 0;
}

/* Quick Jump Pills Nav */
.ecker-faq-archive-nav {
    margin-bottom: 2.5rem;
    padding: 1.25rem;
    background-color: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.ecker-faq-archive-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.ecker-faq-archive-pills li a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.ecker-faq-archive-pills li a:hover {
    background-color: #D40F14;
    border-color: #D40F14;
    color: #ffffff;
}

.ecker-faq-archive-pills li a .badge-count {
    font-size: 0.8rem;
    opacity: 0.85;
}

.ecker-faq-list {
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.ecker-faq-item {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s ease;
}

.ecker-faq-item:last-child {
    border-bottom: none;
}

.ecker-faq-item[open] {
    background-color: #fafafa;
}

.ecker-faq-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0.75rem;
    cursor: pointer;
    list-style: none;
    font-family: inherit;
    user-select: none;
    transition: color 0.2s ease;
}

.ecker-faq-summary::-webkit-details-marker {
    display: none;
}
.ecker-faq-summary::marker {
    display: none;
}

.ecker-faq-question {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.45;
    color: #2d3748;
    padding-right: 1.25rem;
    transition: color 0.2s ease;
}

.ecker-faq-item:hover .ecker-faq-question,
.ecker-faq-item[open] .ecker-faq-question {
    color: #D40F14;
}

.ecker-faq-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f3f4f6;
    color: #4b5563;
    transition: transform 0.25s ease, background-color 0.2s ease, color 0.2s ease;
}

.ecker-faq-svg {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.ecker-faq-item:hover .ecker-faq-icon {
    background-color: #fee2e2;
    color: #D40F14;
}

.ecker-faq-item[open] .ecker-faq-icon {
    background-color: #D40F14;
    color: #ffffff;
}

.ecker-faq-item[open] .ecker-faq-svg {
    transform: rotate(180deg);
}

.ecker-faq-content {
    padding: 0 1rem 1.5rem 1rem;
    animation: eckerFaqFadeIn 0.25s ease;
}

.ecker-faq-content-inner {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #4a5568;
}

.ecker-faq-content-inner p {
    margin-bottom: 1rem;
}

.ecker-faq-content-inner p:last-child {
    margin-bottom: 0;
}

.ecker-faq-content-inner ul,
.ecker-faq-content-inner ol {
    margin: 0.75rem 0 1rem 1.5rem;
    padding-left: 0.5rem;
}

.ecker-faq-content-inner li {
    margin-bottom: 0.5rem;
}

.ecker-faq-content-inner a {
    color: #D40F14;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.ecker-faq-content-inner a:hover {
    opacity: 0.8;
}

.ecker-faq-summary:focus-visible {
    outline: 2px solid #D40F14;
    outline-offset: 2px;
    border-radius: 4px;
}

@keyframes eckerFaqFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .ecker-faq-headline,
    .ecker-faq-archive-main-headline {
        font-size: 1.5rem;
    }
    .ecker-faq-category-title {
        font-size: 1.35rem;
    }
    .ecker-faq-question {
        font-size: 1.025rem;
    }
    .ecker-faq-summary {
        padding: 1rem 0.5rem;
    }
    .ecker-faq-content {
        padding: 0 0.5rem 1.25rem 0.5rem;
    }
}
