/**
 * News Cards Styles
 * Structure adapted from Nexthost (.nh_blog-item)
 * Styles adapted for Project Rules (colors, fonts, radius)
 */

.nh-news-card {
    background: #fff;
    border-radius: 8px;
    /* Project standard */
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    /* Consistent with Action Cards */
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nh-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(23, 55, 80, 0.15);
}

/* Image Wrapper */
.nh-news-card__img-wrapper {
    position: relative;
    width: 100%;
    padding-top: 50% !important;
    /* Aspect ratio placeholder 2:1 */
    overflow: hidden;
}

.nh-news-card__img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.nh-news-card:hover .nh-news-card__img-wrapper img {
    transform: scale(1.05);
    /* Subtle zoom */
}

/* Date Badge (Overlay) */
.nh-news-card__date {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #fff;
    color: #173750;
    font-size: 14px;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

/* Content Area */
.nh-news-card__content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Meta Data */
.nh-news-card__meta {
    margin-bottom: 8px;
    font-size: 12px;
    color: #6c757d;
    /* Neutral gray */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nh-news-card__meta span {
    display: inline-block;
    margin-right: 15px;
    position: relative;
}

/* Title */
.nh-news-card__title {
    margin: 0 0 12px 0;
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    color: #173750;
}

.nh-news-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.nh-news-card__title a:hover {
    color: #173750;
}

/* Description (Short) */
.nh-news-card__desc {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read More Button */
.nh-news-card__read-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #173750;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.02em;
    align-self: flex-start;
    padding: 6px 12px;
    border-radius: 24px;
    background: rgba(23, 55, 80, 0.08);
    border: 1px solid rgba(23, 55, 80, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.nh-news-card__read-more:hover {
    background: #173750;
    border-color: rgba(23, 55, 80, 0.22);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.10);
    text-decoration: none;
}

/* =========================================
   SMI (Media) Variant
   ========================================= */
.nh-news-card--smi {
    border: 1px solid #e1e8f0;
    background: #fff;
    border-radius: 14px;
    box-shadow: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.nh-news-card--smi:hover {
    border-color: #cdd9e6;
    transform: translateY(-3px);
    box-shadow: 0 14px 26px rgba(23, 55, 80, 0.12);
}

.nh-news-card--smi .nh-news-card__logo-wrapper {
    height: 80px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    /* Remove gray bg for premium feel */
    border-bottom: none;
    padding: 15px !important;
    position: relative;
    z-index: 2;
}

/* Grayscale filter for logos for cleaner look (optional, can remove if user dislikes) */
.nh-news-card--smi .nh-news-card__logo-wrapper img {
    filter: grayscale(100%);
    opacity: 0.8;
    transition: all 0.3s ease;
    max-height: 50px !important;
    /* Smaller logo */
    width: auto !important;
}

.nh-news-card--smi:hover .nh-news-card__logo-wrapper img {
    filter: grayscale(0%);
    opacity: 1;
}

.nh-news-card--smi .nh-news-card__content {
    justify-content: center;
    text-align: center;
    padding: 16px 20px 20px 20px !important;
    position: relative;
}

.nh-news-card--smi .nh-news-card__quote {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 14px !important;
    font-style: italic;
    color: #333;
    line-height: 1.6;
    margin-bottom: 0 !important;
    position: relative;
    z-index: 2;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    /* Allow a bit more text in 4-col */
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Background Quote Icon */
.nh-news-card--smi .nh-news-card__content::before {
    content: "“";
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: Georgia, serif;
    font-size: 100px;
    line-height: 1;
    color: #173750;
    opacity: 0.05;
    pointer-events: none;
    z-index: 1;
}

/* Remove old pseudo-elements */
.nh-news-card--smi .nh-news-card__quote::before,
.nh-news-card--smi .nh-news-card__quote::after {
    display: none;
}

/* =========================================
   Video Variant
   ========================================= */
.nh-news-card--video .nh-news-card__img-wrapper {
    position: relative;
    aspect-ratio: 16 / 9;
    width: 100%;
    overflow: hidden;
}

.nh-news-card--video .nh-news-card__img-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.nh-news-card--video .nh-news-card__img-wrapper [data-video-src] {
    position: absolute;
    inset: 0;
}

.nh-news-card--video .nh-video-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: pointer;
    display: block;
}

.nh-news-card--video .nh-video-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Override generic responsive-embed zero-height */
.nh-news-card--video .nh-news-card__img-wrapper.responsive-embed {
    padding-bottom: 0 !important;
    height: auto !important;
    min-height: 0;
}

.nh-news-card--video .nh-news-card__content {
    position: relative;
    width: 100%;
    padding: 16px 16px 18px 16px !important;
    background: #fff;
    z-index: 1;
    pointer-events: auto;
}

.nh-news-card--video .nh-news-card__date {
    display: none;
    /* Hide date for compactness */
}

.nh-news-card--video .nh-news-card__title {
    color: #173750 !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-weight: 600;
    text-shadow: none;
}

.nh-news-card--video .nh-news-card__play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(23, 55, 80, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.nh-news-card--video .nh-video-thumb .nh-news-card__play-overlay {
    opacity: 1;
    background: rgba(23, 55, 80, 0.22);
}

.nh-news-card--video:hover .nh-news-card__play-overlay {
    opacity: 1;
}

.nh-news-card--video .nh-news-card__play-icon {
    width: 60px;
    height: 60px;
    background: #173750;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nh-news-card--video:hover .nh-news-card__play-icon {
    transform: scale(1.1);
}


/* Adjust Grid for Cards */
.information__blocks {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* 4-column grid for SMI */
.information__blocks--smi {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 24px;
}

@media (max-width: 991.98px) {
    .information__blocks {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .information__blocks {
        grid-template-columns: 1fr;
    }
}
