/* Content section styles - Documents & Tutorials */

/* Article typography */
.content-article {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--bs-body-color);
}

.content-article h1,
.content-article h2,
.content-article h3,
.content-article h4,
.content-article h5,
.content-article h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.content-article h2 {
    font-size: 1.6rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.content-article h3 {
    font-size: 1.3rem;
}

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

.content-article blockquote {
    border-left: 4px solid var(--bs-primary);
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: rgba(var(--bs-primary-rgb), 0.05);
    border-radius: 0 0.25rem 0.25rem 0;
    font-style: italic;
}

.content-article blockquote p:last-child {
    margin-bottom: 0;
}

.content-article img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

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

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

.content-article code {
    padding: 0.15rem 0.4rem;
    border-radius: 0.2rem;
    font-size: 0.9em;
}

.content-article pre {
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.content-article pre code {
    padding: 0;
}

.content-article table {
    width: 100%;
    margin: 1.5rem 0;
    border-collapse: collapse;
}

.content-article table th,
.content-article table td {
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--bs-border-color);
}

.content-article table th {
    background: rgba(var(--bs-primary-rgb), 0.05);
    font-weight: 600;
}

.content-article hr {
    margin: 2rem 0;
}

/* Card hover effect for listings */
.content-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    color: var(--bs-body-color);
}

a .content-card,
a .content-card .card-title,
a .content-card .card-text {
    color: inherit;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1) !important;
}

/* Fixed-dimension essay/article cards */
.content-card-fixed {
    height: 420px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Image area: fixed height, image fits without cropping or stretching */
.content-card-img-wrapper {
    height: 180px;
    flex-shrink: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color-translucent);
}

.content-card-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.content-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--bs-primary-rgb), 0.05);
}

/* Card body fills remaining space */
.content-card-fixed .card-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Title: max 2 lines */
.content-card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

/* Subtitle: max 1 line */
.content-card-subtitle {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Excerpt: fills remaining space, fades out */
.content-card-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
    margin-bottom: 0 !important;
}
