/* Article detail page styles */

.artikel-meta-line {
    color: var(--color-text-secondary, #666);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Article two-column layout: remove all spacing so border reaches header/footer */
.kolonner:has(.artikel-sidebar-sticky) {
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    margin-bottom: 0;
}

/* Article heading sizes — smaller than default */
.kolonner:has(.artikel-sidebar-sticky) h1 {
    font-size: 1.75rem;
    line-height: 1.2;
    margin-bottom: 2.5rem;
}

.kolonner:has(.artikel-sidebar-sticky) h2 {
    font-size: 1.3rem;
    line-height: 1.3;
}

.kolonner:has(.artikel-sidebar-sticky) .kolonner-inner {
    align-items: stretch;
}

/* Left column gets vertical padding for content spacing */
.kolonner:has(.artikel-sidebar-sticky) > .kolonner-inner > .kolonne:first-child {
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-xl);
}

/* Right sidebar: border runs full height from header to footer */
.kolonne:has(.artikel-sidebar-sticky) {
    border-left: 1px solid var(--color-border, #e0e0e0);
    padding-left: 2rem;
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-xl);
}

/* Make the .tekst wrapper fill the full column height so sticky has room */
.kolonne:has(.artikel-sidebar-sticky) > .tekst {
    flex: 1;
}

/* Sticky sidebar — content follows scroll, stays visible */
.artikel-sidebar-sticky {
    position: sticky;
    top: 130px; /* just below the sticky header (min-height: 120px) */
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 1rem;
}

/* Sidebar search */
.sidebar-search-form {
    display: flex;
    gap: 0;
}

.sidebar-search-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border, #e0e0e0);
    border-right: none;
    border-radius: var(--button-radius) 0 0 var(--button-radius);
    font-size: 0.9rem;
    outline: none;
}

.sidebar-search-input:focus {
    border-color: var(--color-primary, #2a7ae2);
}

.sidebar-search-btn {
    padding: 0.5rem 1rem;
    background: var(--button-bg);
    color: var(--button-color);
    border: none;
    border-radius: 0 var(--button-radius) var(--button-radius) 0;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-default);
}

.sidebar-search-btn:hover {
    background: var(--button-bg-hover);
    box-shadow: var(--button-shadow-hover);
}

/* Sidebar sections */
.artikel-sidebar-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border, #e0e0e0);
}

.artikel-sidebar-section:last-child {
    border-bottom: none;
}

.artikel-sidebar-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-text-primary, #333);
}

/* Recent articles list */
.artikel-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.artikel-recent-list li {
    padding: 0.4rem 0;
}

.artikel-recent-list a {
    color: var(--color-text-primary, #333);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.4;
    display: block;
}

.artikel-recent-list a:hover {
    color: var(--color-primary, #2a7ae2);
}

/* Category list */
.artikel-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.artikel-category-list li {
    padding: 0.3rem 0;
}

.artikel-category-list a {
    color: var(--color-text-primary, #333);
    text-decoration: none;
    font-size: 0.95rem;
}

.artikel-category-list a:hover {
    color: var(--color-primary, #2a7ae2);
}

/* ============================================================
   Course Listing Cards — horizontal cards for "Åbne kurser" articles
   ============================================================ */

.course-listing-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.course-listing-card {
    display: flex;
    gap: 1.5rem;
    background: var(--color-bg-white, #fff);
    border: 1px solid var(--color-border, #e0e0e0);
    border-radius: var(--radius-md, 8px);
    overflow: hidden;
    transition: box-shadow var(--transition-default, 0.2s ease),
                transform var(--transition-default, 0.2s ease);
}

.course-listing-card:hover {
    box-shadow: var(--shadow-card-hover, 0 4px 16px rgba(0, 0, 0, 0.12));
    transform: translateY(-2px);
}

/* Image area — composite overlay matching logb.dk style:
   course image as background, title in logb-blue top-left,
   instructor portrait (transparent bg) bottom-right */
.course-listing-card-image {
    flex: 0 0 280px;
    min-height: 200px;
    overflow: hidden;
    background: var(--color-bg-light, #f5f5f5);
    position: relative;
    display: block;
    text-decoration: none;
}

.course-listing-card-image .course-listing-card-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Fallback logo — center and scale down */
.course-listing-card-image .course-listing-card-bg[src*="lundogbendsen_logo"] {
    object-fit: contain;
    padding: 1.5rem;
}

/* Course name overlay — logb-blue, top-left */
.course-listing-card-overlay-title {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: 5rem;
    color: var(--color-logb-blue);
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
    pointer-events: none;
}

/* Instructor portrait — bottom-right, transparent background */
.course-listing-instructor-portrait {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 120px;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    object-position: bottom right;
    pointer-events: none;
}

.course-listing-card-body {
    flex: 1;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.course-listing-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    line-height: 1.3;
}

.course-listing-card-title a {
    color: var(--color-logb-blue);
    text-decoration: none;
}

.course-listing-card-title a:hover {
    color: var(--color-logb-blue-dark);
}

/* Meta fields — vertical stack, one field per line (matching logb.dk) */
.course-listing-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary, #555);
    margin-bottom: 0.75rem;
}

.course-listing-meta-item strong {
    color: var(--color-text-primary, #333);
    font-weight: 600;
}

/* Dates — vertical stack (matching logb.dk) */
.course-listing-dates {
    font-size: 0.9rem;
    color: var(--color-text-secondary, #666);
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.course-listing-dates-label {
    font-weight: 600;
    color: var(--color-text-primary, #333);
}

.course-listing-date {
    white-space: nowrap;
}

/* Responsive: stack vertically on small screens */
@media (max-width: 600px) {
    .course-listing-card {
        flex-direction: column;
    }

    .course-listing-card-image {
        flex: 0 0 auto;
        min-height: 180px;
        max-height: 220px;
    }

    .course-listing-card-overlay-title {
        font-size: 1.1rem;
    }

    .course-listing-instructor-portrait {
        width: 120px;
        max-height: 160px;
    }

    .course-listing-card-body {
        padding: 1rem;
    }
}

/* WordPress image alignment classes */
.alignleft {
    float: left;
    margin: 0.25rem 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0.25rem 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin: 1rem auto;
}

/* ============================================================
   Nyheder listing page — blog-style feed items
   ============================================================ */

/* Blog-style feed — vertical list with image, title, meta, excerpt.
   Applied via visning: "blog" on the feed block (e.g. nyheder listing page). */
.feed-inner--blog {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.feed-inner--blog .feed-item {
    padding-bottom: 2.5rem;
    border-bottom: 1px solid var(--color-border, #e0e0e0);
}

.feed-inner--blog .feed-item:last-child {
    border-bottom: none;
}

.feed-inner--blog .feed-item-billede {
    margin-bottom: 0.75rem;
}

.feed-inner--blog .feed-item-billede img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
}

.feed-inner--blog .feed-item-titel {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.25rem;
}

.feed-inner--blog .feed-item-titel a {
    color: var(--color-text-primary, #333);
    text-decoration: none;
}

.feed-inner--blog .feed-item-titel a:hover {
    color: var(--color-primary, #2a7ae2);
}

.feed-inner--blog .feed-item-meta {
    color: var(--color-text-secondary, #666);
    font-size: 0.85rem;
    margin: 0 0 0.75rem;
}

.feed-inner--blog .feed-item-uddrag {
    color: var(--color-text-secondary, #555);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

/* Newsletter signup */
.artikel-newsletter {
    text-align: center;
    padding-top: 1rem;
}

.artikel-newsletter .button {
    display: inline-block;
    width: 100%;
    text-align: center;
}

/* Blog-style pagination — styled button prev/next */
.feed-inner--blog + .pagination-container {
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.feed-inner--blog + .pagination-container .pagination {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.pagination-link.button {
    font-size: 0.95rem;
    padding: 10px 24px;
}

.pagination-prev {
    margin-right: auto;
}

.pagination-next {
    margin-left: auto;
}
