/* News card component */
.news-card.card {
    border-radius: 0;
    border: 1px solid #d0d0d0;
}

.news-card {
    overflow: hidden;
    color: inherit;
}

.news-card:hover .card-title {
    text-decoration: underline;
}

.news-card-label {
    text-transform: uppercase;
    color: #737373;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    min-height: 1.1em;
    display: block;
}

.news-card-large {
    background-color: #f7f7f7;
}

.news-card-large .card-body {
    padding: 1.25rem;
}

.news-card-large .card-title {
    font-size: 1.4rem;
}

.news-card-large .card-text {
    font-size: 0.875rem;
}

.news-card-large-img {
    height: 200px;
    background-color: #cceefb;
}

.news-card-large-img img.news-card-custom-img {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

.news-card-large-img img.news-card-fallback-img {
    object-fit: contain;
    max-height: 100%;
    max-width: 100%;
}

.news-card-read-more {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.8rem;
}

.news-card .tag-list .badge {
    font-size: 0.7rem;
}

/* Admin actions (edit/delete) sit at the top-right of the card, above the stretched-link overlay */
.news-card .news-card-admin-actions {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 2;
    display: flex;
    gap: 0.25rem;
}

.news-card .news-card-admin-actions .btn {
    line-height: 1;
    background-color: #e9ecef;
    border-color: #ced4da;
    color: #495057;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
}

.news-card .news-card-admin-actions .btn:hover,
.news-card .news-card-admin-actions .btn:focus {
    background-color: #adb5bd;
    border-color: #6c757d;
    color: #212529;
}

/* Suppress the card-hover-lift scale effect when admin actions are present so the card stays in place */
.news-card.card-hover-lift:has(.news-card-admin-actions):hover {
    scale: 100%;
}

/* Featured (full-width horizontal) card */
.news-card-featured {
    background-color: #f7f7f7;
}

.news-card-featured-img {
    position: relative;
    background-color: #cceefb;
    min-height: 320px;
}

.news-card-featured-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.news-card-featured-img img.news-card-custom-img {
    object-fit: cover;
}

.news-card-featured-img img.news-card-fallback-img {
    object-fit: contain;
}

.news-card-featured .card-body {
    justify-content: space-evenly;
    padding: 2rem;
}

.news-card-featured .card-title {
    font-size: 2rem;
}

.news-card-featured .card-text {
    font-size: 0.95rem;
}

.news-card-compact .card-title {
    font-size: 1.05rem;
}

.news-card-compact-img {
    position: relative;
    background-color: #cceefb;
}

.news-card-compact-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.news-card-compact-img img.news-card-custom-img {
    object-fit: cover;
}

.news-card-compact-img img.news-card-fallback-img {
    object-fit: contain;
}


/* Status tags (top-left of card, shown as inline pills) */
.news-card-status-tags {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 1;
    display: flex;
    gap: 0.25rem;
    pointer-events: none;
}

.news-card-status-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    border-radius: 0.2rem;
}

.news-card-compact .news-card-status-tag {
    padding: 0.1rem 0.35rem;
    font-size: 0.55rem;
}

.news-card-status-tag-premium {
    background-color: var(--premium-pink);
}

.news-card-status-tag-archived {
    background-color: #6c757d;
}

.news-card-status-tag-scheduled {
    background-color: #17a2b8;
}

.news-card-tag-label {
    background-color: #cceffc;
}

/* Published date on cards */
.news-card-date {
    font-size: 0.75rem;
    color: #737373;
}

/* News preview section (TODO: [CSP-1713] Remove) */
.news-preview-section {
    padding: 0 4rem 2.5rem;
}

.news-preview-section h2.news-preview-heading {
    color: #1b8bca;
}


.line-clamp-3 {
    display: -webkit-box;
    min-height: calc(1.5em * 3);
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* This is all set for two line max title */
.news-card .card-title a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    min-height: calc(1.4em * 2);
}


/* Responsive: collapse compact card image on small viewports */
@media (max-width: 575.98px) {
    .news-card-compact .col-4 {
        display: none;
    }
    .news-card-compact .col-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    .news-preview-section {
        padding: 0 15px 30px 15px;
    }
}
