/* =============================================
   Knowledge Base — Shared Styles
   knowledge/css/style.css
   ============================================= */

/* ===== LISTING PAGE: ARTICLE CARDS ===== */

.knowledge-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.knowledge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -12px rgba(15, 23, 42, 0.18) !important;
}

[data-bs-theme="dark"] .knowledge-card:hover {
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.45) !important;
}

.knowledge-card-image {
    height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.knowledge-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.14);
}

.knowledge-card-icon {
    font-size: 3.2rem;
    color: rgba(255, 255, 255, 0.92);
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.28));
}

/* Tags — shared between listing and detail */
.knowledge-tag {
    background-color: var(--hero-badge-bg);
    color: var(--bs-primary);
    border: 1px solid var(--hero-badge-border);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25em 0.75em;
    border-radius: 999px;
    letter-spacing: 0.02em;
    display: inline-block;
    white-space: nowrap;
}

[data-bs-theme="dark"] .knowledge-tag {
    background-color: rgba(96, 165, 250, 0.12);
    color: #93c5fd;
    border-color: rgba(147, 197, 253, 0.25);
}

/* ===== ARTICLE DETAIL: HERO ===== */

.article-hero {
    width: 100%;
    height: 320px;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 2rem;
}

@media (max-width: 575.98px) {
    .article-hero {
        height: 200px;
        border-radius: 10px;
    }
}

.article-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: inherit;
}

.article-hero-icon {
    font-size: 5.5rem;
    color: rgba(255, 255, 255, 0.92);
    filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.32));
    position: relative;
    z-index: 1;
}

/* ===== ARTICLE DETAIL: BREADCRUMB ===== */

.knowledge-breadcrumb {
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.knowledge-breadcrumb a {
    color: var(--bs-primary);
    text-decoration: none;
}

.knowledge-breadcrumb a:hover {
    text-decoration: underline;
}

.knowledge-breadcrumb .sep {
    opacity: 0.5;
}

/* ===== ARTICLE DETAIL: META + HEADER ===== */

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--bs-secondary-color);
    margin-bottom: 0.75rem;
}

.article-meta i {
    font-size: 0.8rem;
}

.article-h1 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 1rem;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 2rem;
}

/* ===== ARTICLE DETAIL: BODY CONTENT ===== */

.article-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: var(--bs-body-color);
}

.article-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--hero-badge-border);
}

.article-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: 0.6rem;
}

.article-content p {
    margin-bottom: 1.15rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.15rem;
    padding-left: 1.6rem;
}

.article-content li {
    margin-bottom: 0.45rem;
}

/* Inline callout / tip box */
.article-callout {
    background: var(--hero-badge-bg);
    border-left: 4px solid var(--bs-primary);
    border-radius: 0 10px 10px 0;
    padding: 1rem 1.25rem;
    margin: 1.75rem 0;
    font-size: 0.975rem;
}

.article-callout .callout-title {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bs-primary);
    margin-bottom: 0.35rem;
}

/* Inline image placeholder */
.article-img-placeholder {
    width: 100%;
    aspect-ratio: 16 / 7;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: #94a3b8;
    font-size: 2.5rem;
    margin: 1.75rem 0 0.5rem;
    overflow: hidden;
}

[data-bs-theme="dark"] .article-img-placeholder {
    background: linear-gradient(135deg, #1e293b, #334155);
    color: #475569;
}

.article-img-caption {
    text-align: center;
    font-size: 0.82rem;
    color: var(--bs-secondary-color);
    margin-bottom: 1.75rem;
    font-style: italic;
}

/* ===== FURTHER READING ===== */

.further-reading {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 2px solid var(--bs-border-color-subtle);
}

.further-reading-heading {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.further-reading-sub {
    font-size: 0.9rem;
    color: var(--bs-secondary-color);
    margin-bottom: 1.5rem;
}

.fr-card {
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.fr-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px -8px rgba(15, 23, 42, 0.15) !important;
    color: inherit;
}

[data-bs-theme="dark"] .fr-card:hover {
    box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.4) !important;
}

.fr-card-image {
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

.fr-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.12);
}

.fr-card-image i {
    font-size: 1.9rem;
    color: rgba(255, 255, 255, 0.95);
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.25));
}

.fr-card-body {
    padding: 0.75rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.fr-card-title {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fr-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: auto;
}

.fr-card-tag {
    font-size: 0.65rem;
    padding: 0.15em 0.55em;
    border-radius: 999px;
    background: var(--hero-badge-bg);
    color: var(--bs-primary);
    border: 1px solid var(--hero-badge-border);
    font-weight: 600;
}

[data-bs-theme="dark"] .fr-card-tag {
    background-color: rgba(96, 165, 250, 0.1);
    color: #93c5fd;
    border-color: rgba(147, 197, 253, 0.2);
}
