/* ==========================================================================
   mod_insentis — News Grid Tiles
   Self-contained CSS (works without template-specific styles)
   Matches insentis production design
   ========================================================================== */

.news-container {
    width: 100%;
    padding: 40px 20px;
}

.news-grid {
    display: grid;
    gap: 20px;
    max-width: 1320px;
    margin: 0 auto;
}

/* Responsive Grid */
@media (min-width: 1040px) {
    .news-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 900px) and (max-width: 1039px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 600px) and (max-width: 899px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 599px) {
    .news-grid {
        grid-template-columns: 1fr;
        max-width: 320px;
    }
}

/* Single Tile */
.news-item {
    position: relative;
    width: 100%;
    aspect-ratio: 320 / 500;
    max-width: 320px;
    margin: 0 auto;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
}

/* Background layers (stacked for cross-fade) */
.news-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.4s ease;
}

.news-background.bg-default {
    opacity: 1;
}

.news-background.bg-hover {
    opacity: 0;
}

.news-item.active .news-background.bg-default {
    opacity: 0;
}

.news-item.active .news-background.bg-hover {
    opacity: 1;
}

/* Content overlay */
.news-content {
    position: relative;
    height: 100%;
    padding: 25px;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

/* Category / Tag label */
.news-category {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 12px 0;
    transition: color 0.3s ease;
    padding-bottom: 0;
}

/* Headline */
.news-headline {
    margin: 0 0 15px 0;
    transition: color 0.3s ease;
    padding-bottom: 0;
}

.news-headline h3 {
    font-size: 22px;
    text-shadow: 1px 1px 2px #000;
    line-height: 1.1;
    margin: 0;
    color: #f7a600;
}

/* Intro text — expands from left to right */
.news-text {
    margin: 0;
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-width 0.5s ease, opacity 0.4s ease 0.1s;
    white-space: normal;
}

.news-text p {
    font-size: 18px;
    line-height: 1.4;
    margin: 0;
}

.news-text .news-teaser-heading {
    font-size: 16px;
    margin: 0 0 6px 0;
}

.news-item.active .news-text {
    max-width: 100%;
    opacity: 1;
}

/* Read more link */
.news-more {
    position: absolute;
    bottom: 5px;
    right: 25px;
    font-size: 16px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s ease 0.3s;
    pointer-events: none;
    text-decoration: none;
    display: inline-block;
    z-index: 10;
}

.news-item.active .news-more {
    opacity: 1;
    pointer-events: auto;
}

/* Text colors: dark background variant */
.news-item.dark-bg .news-category,
.news-item.dark-bg .news-category a {
    color: white;
}

.news-item.dark-bg .news-headline h3 {
    color: #f7a600;
}

.news-item.dark-bg .news-text,
.news-item.dark-bg .news-text p,
.news-item.dark-bg .news-more {
    color: white;
}

/* Text colors: light background variant */
.news-item.light-bg .news-category,
.news-item.light-bg .news-category a {
    color: black;
}

.news-item.light-bg .news-headline h3 {
    color: #f7a600;
}

.news-item.light-bg .news-text,
.news-item.light-bg .news-text p,
.news-item.light-bg .news-more {
    color: black;
}

/* Touch devices: no hover translate */
@media (max-width: 1024px) {
    .news-item:hover {
        transform: none;
    }
}
