/*
+ news
*/
.categoryViewList.news,
.newsArticle {
    margin: 3rem 0;
}

/* News Category Item Styles */
.catItemView.news {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
}

.catItemView.news:last-child {
    margin-bottom: 0;
}

/* News Item Image Styling */
.catItemView.news .catItemImage {
    margin-bottom: 1rem;
}

.catItemView.news .catItemImage a {
    display: block;
    width: 100%;
    aspect-ratio: 4/3; /* 4/3 aspect ratio */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.catItemView.news .catItemImage a:hover {
    transform: scale(1.02);
}

/* Hide the actual img tag since we're using background images */
.catItemView.news .catItemImage img {
    display: none;
}

/* Content spacing */
.catItemView.news .catItemTitle {
    margin-bottom: 0.75rem;
    margin-top: 0;
}

.catItemView.news .date_tags {
    margin-bottom: 1rem;
}

.catItemView.news .catItemDateCreated {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.catItemView.news .itemTags {
    margin-bottom: 0.5rem;
}

.catItemView.news .itemTags .badge {
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
}

.catItemView.news .catItemIntroText {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.catItemView.news .k2ReadMore {
    display: inline-block;
    margin-bottom: 1rem;
}

/* Border line styling */
.catItemView.news .borderline {
    height: 1px;
    background-color: #e0e0e0;
    margin: 1.5rem 0 0 0;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    
    .catItemView.news .catItemImage {
        margin-bottom: 0;
    }
    
    /* When image and content are side by side */
    .catItemView.news.hasItemImage .col-md-4 {
        padding-right: 1.5rem;
    }
    
    .catItemView.news.hasItemImage .col-md-8 {
        padding-left: 1.5rem;
    }
}

@media (max-width: 767px) {
    .catItemView.news .catItemImage a {
        aspect-ratio: 16/9; /* More suitable aspect ratio for mobile */
        margin-bottom: 1rem;
    }
}

/* Additional spacing for news container */
.k2ItemsBlock .row {
    margin-bottom: 0;
}

/* Ensure proper spacing in single column layout */
.catItemView.news > .row > .col-xs-12 {
    padding-left: 15px;
    padding-right: 15px;
}

/* +++++++++++++++++++++++++++++++++++++ ITEM */
/* News Article Styles */
.newsArticle {
    padding: 2rem 0;
    max-width: 100%;
}

.newsArticle .row {
    margin-left: 0;
    margin-right: 0;
}

/* Left align the main title */
.newsArticle .itemTitle {
    text-align: left;
}

/* Title underline */
.newsArticle .line {
    width: 60px;
    height: 3px;
    background-color: #007bff;
    margin: 1rem 0 2rem 0;
}

/* Image styling */
.newsArticle .itemImage {
    text-align: center;
    margin: 2rem 0;
}

.newsArticle .itemImage img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.newsArticle .itemImage img:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.newsArticle .img_caption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    text-align: center;
}

/* Date and tags section */
.newsArticle .date_tags {
    margin: 1.5rem 0;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.newsArticle .itemDateCreated {
    color: #555;
    font-size: 0.95rem;
}

.newsArticle .itemDateCreated i {
    margin-right: 0.5rem;
    color: #007bff;
}

.newsArticle .itemTags {
    margin-top: 0.5rem;
}

.newsArticle .itemTags i {
    margin-right: 0.5rem;
    color: #007bff;
}

.newsArticle .itemTags .badge {
    margin-right: 0.5rem;
    margin-bottom: 0.25rem;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 20px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.newsArticle .itemTags .badge:hover {
    background-color: #0056b3 !important;
    transform: translateY(-1px);
}

/* Attachments styling */
.newsArticle .itemAttachmentsBlock {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.newsArticle .itemAttachmentsBlock h4 {
    margin-bottom: 1rem;
    color: #495057;
    font-size: 1.1rem;
}

.newsArticle .itemAttachmentsBlock div {
    margin-bottom: 0.5rem;
}

.newsArticle .itemAttachmentsBlock a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.newsArticle .itemAttachmentsBlock a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Clear fix */
.newsArticle .clr {
    clear: both;
    height: 0;
    margin: 1rem 0;
}

/* Media section styling */
.newsArticle .itemImageGallery {
    margin: 2rem 0;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.newsArticle .itemVideoBlock {
    margin: 2rem 0;
    text-align: center;
    width: 100%;
}

.newsArticle .itemVideoEmbedded,
.newsArticle .itemVideo {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.newsArticle .itemVideoEmbedded iframe {
    border-radius: 8px;
    width: 100%;
    height: auto;
    aspect-ratio: 16/9;
}

.newsArticle .itemVideo {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 767px) {
    .newsArticle {
        padding: 1rem 0;
    }
    
    .newsArticle .line {
        width: 40px;
        margin: 0.75rem 0 1.5rem 0;
    }
    
    .newsArticle .itemImage {
        margin: 1.5rem 0;
    }
    
    .newsArticle .date_tags {
        padding: 0.75rem;
        margin: 1rem 0;
    }
    
    .newsArticle .itemAttachmentsBlock {
        padding: 1rem;
        margin: 1.5rem 0;
    }

}

@media (min-width: 768px) and (max-width: 991px) {
    .newsArticle .itemImage img {
        max-width: 100%;
    }
    
    .newsArticle .date_tags {
        max-width: 90%;
    }
}

@media (min-width: 992px) {
    .newsArticle .itemImage img {
        max-width: 100%;
    }
    
    .newsArticle .line {
        width: 80px;
    }
}

/* Print styles */
@media print {
    .newsArticle .back_overview {
        display: none;
    }
    
    .newsArticle .itemImage img {
        max-width: 100%;
        box-shadow: none;
    }
    
    .newsArticle .date_tags {
        background-color: transparent;
        border: 1px solid #ccc;
    }
}

.newsArticle .itemTags .badge:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

/* Animation for elements */
.newsArticle .itemImage,
.newsArticle .date_tags,
.newsArticle .itemAttachmentsBlock {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
