/* SE News Layout — (C) 2026 SE24 Media */

.senl {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 1fr;
    gap: 4px;
    min-height: var(--senl-min-h, 560px);
}

.senl-item {
    position: relative;
    overflow: hidden;
    background: #1a1a1a;
    min-height: 220px;
}

.senl-hero {
    grid-column: span 2;
    grid-row: span 2;
}

/* --- Media: never squash an image. The container clips, the image covers. --- */
.senl-media {
    position: absolute;
    inset: 0;
}

.senl-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}

.senl-item:hover .senl-img {
    transform: scale(1.04);
}

.senl-noimg {
    background: linear-gradient(135deg, #20242b, #343a45);
}

/* --- YouTube cover-fit: iframe sized to fill the tile like object-fit cover --- */
.senl-video {
    overflow: hidden;
}

.senl-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 0;
    width: 100%;
    height: 100%;
}

.senl-video[data-senl-mode="autoplay"] iframe {
    pointer-events: none; /* background video; whole tile links to the article */
}

.senl-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.senl-play:hover {
    background: var(--senl-accent, #FF8BBF);
    transform: translate(-50%, -50%) scale(1.08);
}

/* --- Overlay --- */
.senl-overlay {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    padding: 22px 24px 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82) 0%, rgba(0, 0, 0, 0.45) 55%, rgba(0, 0, 0, 0) 100%);
    color: #fff;
    pointer-events: none;
}

.senl-overlay a,
.senl-overlay .senl-cat {
    pointer-events: auto;
}

.senl-cat {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding-bottom: 4px;
    margin-bottom: 10px;
    border-bottom: 3px solid var(--senl-accent, #FF8BBF);
}

.senl-title {
    margin: 0 0 6px;
    font-size: var(--senl-tile-size, clamp(1.05rem, 1.6vw, 1.45rem));
    font-weight: 800;
    line-height: var(--senl-tile-lh, 1.08);
    letter-spacing: var(--senl-tile-spacing, 0.01em);
    text-transform: uppercase;
}

.senl-hero .senl-title {
    font-size: var(--senl-hero-size, clamp(1.5rem, 2.6vw, 2.4rem));
    line-height: var(--senl-hero-lh, 1.08);
    letter-spacing: var(--senl-hero-spacing, 0.01em);
}

.senl-title a {
    color: var(--senl-tile-color, #fff);
    text-decoration: none;
}

.senl-hero .senl-title a {
    color: var(--senl-hero-color, #fff);
}

.senl-title a::after {
    /* Stretch the link over the whole tile */
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.senl-title a:hover,
.senl-title a:focus {
    color: inherit;
    opacity: 0.95;
    text-decoration: none;
}

.senl-date {
    display: block;
    font-size: 0.92rem;
    opacity: 0.85;
}

.senl-intro {
    margin: 12px 0 0;
    font-size: 0.98rem;
    line-height: 1.45;
    opacity: 0.92;
    max-width: 60ch;
}

/* Keep the play button clickable above the stretched link */
.senl-play {
    z-index: 4;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .senl {
        grid-template-columns: repeat(2, 1fr);
    }

    .senl-hero {
        grid-column: span 2;
        grid-row: span 1;
        min-height: 360px;
    }
}

@media (max-width: 640px) {
    .senl {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .senl-hero {
        grid-column: span 1;
        min-height: 300px;
    }

    .senl-item {
        min-height: 240px;
    }

    .senl-overlay {
        padding: 16px 18px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .senl-img,
    .senl-play {
        transition: none;
    }

    .senl-item:hover .senl-img {
        transform: none;
    }
}
