/* ─────────────────────────────────────────────────────────────
   Media tile — cardless, image-first preview component
   Used for news, originals (video), case studies, events.
   Designed to match the originals-card pattern from
   originals-gallery.css so the same visual treatment is consistent
   across homepage, single-news sidebar, and originals archive.

   Class structure mirrors .originals-card-* so existing originals
   markup keeps working alongside this. The .media-tile-* prefix is
   used for new usage outside the originals archive, with the same
   internal layout.
   ─────────────────────────────────────────────────────────────── */

.media-tile {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
    height: 100%;
}
.media-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: inherit;
}
.media-tile:focus-visible {
    outline: 2px solid var(--k-orange, #FE6C35);
    outline-offset: 2px;
}

.media-tile-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #ececec;
    overflow: hidden;
    transform: translateZ(0);
}

.media-tile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.media-tile:hover .media-tile-img {
    transform: scale(1.04);
}

.media-tile-placeholder {
    background: #ececec;
    width: 100%;
    height: 100%;
}

/* Top-right badge slot — used for video duration on originals,
   date on news, status on events, etc. */
.media-tile-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    line-height: 1.4;
    letter-spacing: 0.01em;
    z-index: 2;
}

/* Title bar with gradient fade so text stays legible over any image */
.media-tile-titlebar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    /* Top padding pushed up to give the 3-line clamp room before the
       gradient fades to fully transparent — keeps long titles legible
       all the way through. */
    padding: 3.25rem 0.9rem 0.85rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 35%, rgba(0, 0, 0, 0.9) 100%);
    color: #fff;
    z-index: 1;
    pointer-events: none;
}
.media-tile-topic {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--k-orange, #FE6C35);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
    line-height: 1.2;
}
.media-tile-title {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    margin: 0;
    /* 3-line clamp — news / events / case-study titles run long and were
       getting cut mid-headline at 2 lines. The gradient title bar is sized
       to absorb the extra line without changing the tile's outer height. */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@media (max-width: 575.98px) {
    .media-tile-title  { font-size: 0.95rem; }
    .media-tile-badge  { font-size: 0.68rem; }
}
@media (min-width: 1200px) {
    .media-tile-title  { font-size: 1rem; }
}

/* Section heading used above any media-tile grid — same visual
   weight on homepage, single-news sidebar, single-originals, single-events.
   Pinned at 1.4rem with !important because:
   - single-kurrantly-news.css forces h2 { font-size: 1.4rem !important }
   - originalsvideos.css sets h2 { font-size: 1.875em } (no !important)
   Without !important the originals single page renders this section header
   ~30px while the news single page renders it ~22px, which makes the same
   sections look mismatched across the site. 1.4rem matches the existing
   news single rule so this becomes the harmonized site-wide section size. */
.media-tile-section-heading {
    font-size: 1.4rem !important;
    font-weight: 700;
    color: var(--k-orange, #FE6C35);
    margin: 0 0 1rem;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

/* ─── Video extras (originals + event coverage that links to videos) ──
   Duration in top-right uses the same .media-tile-badge slot.
   Play button is a centered ring with a triangle, sized to match the
   originals archive's .originals-card-play for visual continuity. */
.media-tile-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: transparent;
    border: 2.5px solid #fff;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: transform 0.2s ease, background 0.2s ease;
    pointer-events: none;
}
.media-tile-play svg {
    width: 22px;
    height: 22px;
    margin-left: 3px;
}
.media-tile:hover .media-tile-play,
.media-tile:focus-visible .media-tile-play {
    transform: translate(-50%, -50%) scale(1.08);
    background: rgba(255, 255, 255, 0.15);
}
@media (max-width: 575.98px) {
    .media-tile-play { width: 48px; height: 48px; }
    .media-tile-play svg { width: 20px; height: 20px; }
}

/* ─── CTA tile (last item in any grid) ──────────────────────
   Same dimensions and rounding as a regular tile so the grid stays
   aligned, but uses a solid orange background instead of an image
   and centers an icon + label + arrow. Real anchor tag so it counts
   as an internal link for crawl/ranking signal. */
.media-tile-cta {
    background: var(--k-orange, #FE6C35);
    color: #fff;
}
.media-tile-cta:hover {
    background: #e65a26;
    color: #fff;
}
.media-tile-cta .media-tile-media {
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
}
.media-tile-cta-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    color: #fff;
}
.media-tile-cta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    line-height: 1;
    color: #fff;
    margin-bottom: 0.1rem;
    transition: transform 0.25s ease;
}
.media-tile-cta-icon .bi {
    display: inline-block;
    vertical-align: middle;
}
.media-tile-cta:hover .media-tile-cta-icon {
    transform: scale(1.08);
}
.media-tile-cta-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
}
.media-tile-cta-label {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}
.media-tile-cta-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    transition: transform 0.2s ease, background 0.2s ease;
}
.media-tile-cta-arrow svg {
    width: 18px;
    height: 18px;
}
.media-tile-cta:hover .media-tile-cta-arrow {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(3px);
}

/* ─── Event card (homepage "Upcoming industry events") ──────
   Two-column layout: prominent logo (96px square) on the left as the
   visual anchor, badges + title + dates + venue stacked on the right.
   Editor preference after Phase 3: events read better as a meta-card
   than as a full-bleed media tile because the source images are event
   logos / brand marks, not editorial photography. */
.event-card {
    border: 1px solid #ececec;
    border-radius: 10px;
    background: #fff;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.event-card:hover {
    border-color: #ffcfa9;
    box-shadow: 0 8px 22px -14px rgba(40, 50, 80, 0.18);
    transform: translateY(-2px);
}
.event-card-link {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.1rem;
    color: inherit;
    text-decoration: none;
    height: 100%;
}
.event-card-link:hover,
.event-card-link:focus {
    color: inherit;
    text-decoration: none;
}
.event-card-logo {
    flex-shrink: 0;
    width: 96px;
    height: 96px;
    border-radius: 10px;
    overflow: hidden;
    background: #f6f8fb;
    display: flex;
    align-items: center;
    justify-content: center;
}
.event-card-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}
.event-card-body {
    flex: 1 1 auto;
    min-width: 0;
}
.event-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.55rem;
}
.event-card-badge {
    background: #fff5f0;
    color: var(--k-orange, #FE6C35);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.22rem 0.55rem;
    border-radius: 50rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.event-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a2540;
    line-height: 1.3;
    margin: 0 0 0.55rem;
}
.event-card-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #5a6478;
    line-height: 1.4;
    margin-bottom: 0.2rem;
}
.event-card-meta svg {
    flex-shrink: 0;
    color: var(--k-orange, #FE6C35);
}
.event-card-meta:last-child {
    margin-bottom: 0;
}
/* On very narrow viewports the two-column gets cramped — drop to a
   stacked layout with the logo above the body. */
@media (max-width: 380px) {
    .event-card-link {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .event-card-logo {
        width: 80px;
        height: 80px;
    }
}

/* Mobile "view all" fallback button — for when the CTA tile is
   already in the row but mobile users benefit from a clearer
   anchor below the grid. Same orange treatment, wider hit area. */
.media-tile-mobile-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: var(--k-orange, #FE6C35);
    color: #fff;
    font-weight: 600;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.18s ease;
}
.media-tile-mobile-cta:hover,
.media-tile-mobile-cta:focus {
    background: #e65a26;
    color: #fff;
    text-decoration: none;
}
