/**
 * FAQ public pages — layout, breadcrumbs, sidebars, site theming (#2BC5D4).
 */

:root {
    --faq-accent: #2BC5D4;
    --faq-accent-hover: #24a8b5;
    --faq-accent-soft: rgba(43, 197, 212, 0.08);
    --faq-accent-border: rgba(43, 197, 212, 0.2);
    --faq-text: #111827;
    --faq-text-muted: #6b7280;
    --faq-border: #e5e7eb;
}

.max-w-6xl {
    max-width: 72rem;
}

@media (width >= 48rem) {
    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .md\:col-span-1 {
        grid-column: span 1 / span 1;
    }

    .md\:col-span-3 {
        grid-column: span 3 / span 3;
    }
}

@media (width >= 64rem) {
    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}

/* Page shell */
.faq-page {
    max-width: 80rem;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

@media (width >= 640px) {
    .faq-page {
        padding: 2.5rem 1.5rem 3.5rem;
    }
}

@media (width >= 1024px) {
    .faq-page {
        padding: 3rem 2rem 4rem;
    }
}

/* Breadcrumb */
.faq-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.375rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    margin-bottom: 1.75rem;
    padding-top: 0.25rem;
}

.faq-breadcrumb-link {
    color: var(--faq-text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.faq-breadcrumb-link:hover {
    color: var(--faq-accent);
}

.faq-breadcrumb-sep {
    color: #d1d5db;
    user-select: none;
    font-weight: 400;
}

.faq-breadcrumb-current {
    color: var(--faq-text);
    font-weight: 600;
    min-width: 0;
}

/* Page title */
.faq-page-title {
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 700;
    color: var(--faq-text);
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--faq-accent);
}

@media (width >= 640px) {
    .faq-page-title {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
}

/* FAQ list cards */
.faq-list-card {
    display: block;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid var(--faq-border);
    border-radius: 0.75rem;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.faq-list-card:hover {
    border-color: var(--faq-accent);
    box-shadow: 0 4px 14px rgba(43, 197, 212, 0.12);
    transform: translateY(-1px);
}

.faq-list-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--faq-text);
    margin-bottom: 0.25rem;
    transition: color 0.2s ease;
}

.faq-list-card:hover .faq-list-card-title {
    color: var(--faq-accent);
}

.faq-list-card-desc {
    font-size: 0.875rem;
    color: var(--faq-text-muted);
    line-height: 1.5;
}

/* Category sidebar */
.faq-sidebar-sticky {
    position: sticky;
    top: 5.5rem;
}

.faq-sidebar-card {
    background: #fff;
    border: 1px solid var(--faq-border);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.faq-sidebar-card-header {
    padding: 1rem 1.25rem;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-bottom: 1px solid #f3f4f6;
}

.faq-sidebar-card-header h3 {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--faq-text-muted);
    margin: 0;
}

.faq-sidebar-nav {
    padding: 0.75rem;
    list-style: none;
    margin: 0;
}

.faq-sidebar-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    margin-bottom: 0.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.35;
    color: #374151;
    background: #f9fafb;
    border: 1px solid transparent;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-sidebar-item:last-child {
    margin-bottom: 0;
}

.faq-sidebar-item:hover {
    background: var(--faq-accent-soft);
    color: var(--faq-accent);
    border-color: var(--faq-accent-border);
}

.faq-sidebar-item.is-active {
    background: var(--faq-accent);
    color: #fff;
    border-color: var(--faq-accent);
    box-shadow: 0 2px 8px rgba(43, 197, 212, 0.3);
    pointer-events: none;
}

.faq-sidebar-item-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.faq-sidebar-count {
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    background: #fff;
    color: var(--faq-text-muted);
    border: 1px solid #e5e7eb;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.faq-sidebar-item:hover .faq-sidebar-count {
    color: var(--faq-accent);
    border-color: var(--faq-accent-border);
}

.faq-sidebar-item.is-active .faq-sidebar-count {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    border-color: transparent;
}

/* Show page aside links */
.faq-aside-card {
    background: #fff;
    border: 1px solid var(--faq-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.faq-aside-card + .faq-aside-card {
    margin-top: 1.5rem;
}

.faq-aside-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--faq-text-muted);
    margin: 0 0 0.75rem;
    padding-bottom: 0.625rem;
    border-bottom: 1px solid var(--faq-accent-border);
}

.faq-aside-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.faq-aside-list li + li {
    margin-top: 0.125rem;
}

.faq-aside-link {
    display: block;
    padding: 0.5rem 0.75rem;
    margin: 0 -0.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #4b5563;
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.faq-aside-link:hover {
    background: var(--faq-accent-soft);
    color: var(--faq-accent);
    border-left-color: var(--faq-accent);
}

.faq-aside-empty {
    font-size: 0.875rem;
    color: #9ca3af;
    padding: 0.25rem 0.75rem;
}

/* Article */
.faq-article {
    background: #fff;
    border: 1px solid var(--faq-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

@media (width >= 640px) {
    .faq-article {
        padding: 2rem;
    }
}

.faq-article-title {
    font-size: 1.875rem;
    line-height: 2.25rem;
    font-weight: 700;
    color: var(--faq-text);
    margin-bottom: 1.5rem;
}

.faq-article-body {
    color: #374151;
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 2rem;
}

/* Prev / next nav cards */
.faq-nav-card {
    display: block;
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--faq-border);
    background: #fff;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-nav-card:hover {
    border-color: var(--faq-accent);
    box-shadow: 0 4px 12px rgba(43, 197, 212, 0.1);
}

.faq-nav-card-label {
    display: block;
    font-size: 0.875rem;
    color: var(--faq-text-muted);
    margin-bottom: 0.25rem;
}

.faq-nav-card-title {
    display: block;
    font-weight: 600;
    color: var(--faq-text);
    transition: color 0.2s ease;
}

.faq-nav-card:hover .faq-nav-card-title {
    color: var(--faq-accent);
}

.faq-nav-card.is-disabled {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #f3f4f6;
    background: #f9fafb;
    color: #9ca3af;
}

/* Buttons & pagination */
.faq-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    background: var(--faq-accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    border: none;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(43, 197, 212, 0.25);
}

.faq-btn-primary:hover {
    background: var(--faq-accent-hover);
    box-shadow: 0 4px 12px rgba(43, 197, 212, 0.35);
}

.faq-pagination {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (width >= 640px) {
    .faq-pagination {
        flex-direction: row;
    }
}

.faq-pagination-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    border: none;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.25;
}

.faq-pagination-btn.is-active {
    background: var(--faq-accent);
    color: #fff;
}

.faq-pagination-btn.is-link {
    background: var(--faq-accent);
    color: #fff;
}

.faq-pagination-btn.is-link:hover {
    background: var(--faq-accent-hover);
}

.faq-pagination-btn.is-page {
    background: #fff;
    border: 1px solid #d1d5db;
    color: #374151;
}

.faq-pagination-btn.is-page:hover {
    border-color: var(--faq-accent);
    color: var(--faq-accent);
}

.faq-pagination-btn.is-disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: default;
}

.faq-pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.group:hover .group-hover\:text-\[\#2BC5D4\] {
    color: var(--faq-accent);
}
