/* Jobbi News — article + index styles. Loaded after /guides/guide.css. */

/* ── Article hero ───────────────────────────────────────────── */
.article-hero-img {
    width: 100%;
    height: 360px;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f7;
    margin-bottom: 0;
    position: relative;       /* anchor for the overlaid photo credit */
}
.article-hero-video {
    width: 100%;
    max-height: 420px;
    overflow: hidden;
    background: #000;
    position: relative;       /* anchor for the overlaid photo credit */
}
.article-hero-video .article-hero-vid {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}
@media (max-width: 720px) {
    .article-hero-img { height: 220px; }
}

/* ── Article page layout ────────────────────────────────────── */
.article-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}
.article-image-credit {
    position: absolute;
    bottom: 10px;
    left: 14px;
    margin: 0;
    padding: 4px 9px;
    font-size: 11px;
    line-height: 1.35;
    color: rgba(255,255,255,0.92);
    background: rgba(0,0,0,0.42);
    border-radius: 4px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    max-width: calc(100% - 28px);
    text-shadow: 0 1px 2px rgba(0,0,0,0.45);
    z-index: 2;
}
.article-image-credit a {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: rgba(255,255,255,0.5);
    text-underline-offset: 2px;
}
.article-image-credit a:hover {
    text-decoration-color: rgba(255,255,255,0.95);
}
@media (max-width: 720px) {
    .article-image-credit {
        bottom: 8px;
        left: 10px;
        font-size: 10px;
        padding: 3px 7px;
    }
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.article-breadcrumb {
    font-size: 13px;
    color: #86868b;
    margin-bottom: 20px;
}
.article-breadcrumb a {
    color: #6c5ce7;
    text-decoration: none;
}
.article-breadcrumb a:hover { text-decoration: underline; }
.breadcrumb-sep {
    margin: 0 6px;
    color: #c7c7cc;
}
.breadcrumb-current {
    color: #1d1d1f;
    font-weight: 500;
}

/* ── Headline + deck ────────────────────────────────────────── */
.article-headline {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: #1d1d1f;
    margin: 0 0 14px;
    line-height: 1.15;
}
.article-deck {
    font-size: 18px;
    color: #3a3a3c;
    line-height: 1.55;
    font-weight: 400;
    margin: 0 0 24px;
}
@media (max-width: 720px) {
    .article-headline { font-size: 26px; }
    .article-deck { font-size: 16px; }
}

/* ── Byline ─────────────────────────────────────────────────── */
.article-byline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 0;
    margin-bottom: 24px;
    border-top: 1px solid #e5e5e7;
    border-bottom: 1px solid #e5e5e7;
    font-size: 13px;
    color: #6e6e73;
}
.byline-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.byline-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}
.byline-author {
    color: #1d1d1f !important;
    font-weight: 600;
    text-decoration: none !important;
}
.byline-author:hover { color: #6c5ce7 !important; }
.byline-author-title {
    font-size: 11px;
    color: #86868b;
    font-weight: 500;
}
.byline-desk {
    color: #1d1d1f;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
}
.byline-dot {
    color: #c7c7cc;
}
.byline-date,
.byline-readtime {
    color: #86868b;
}

/* ── Share bar ──────────────────────────────────────────────── */
.article-share {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}
.share-label {
    font-size: 12px;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-right: 4px;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #f5f5f7;
    color: #1d1d1f !important;
    border: 1px solid #e5e5e7;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none !important;
    font-family: inherit;
}
.share-btn:hover {
    background: #ebebef;
    border-color: #d2d2d7;
}

/* ── Article body — overrides guide.css for richer prose ─────── */
.article-body { margin: 0 0 40px; }
.article-body p {
    font-size: 16px;
    line-height: 1.7;
    color: #1d1d1f;
    margin-bottom: 20px;
}
.article-body h2 {
    font-size: 22px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 36px 0 14px;
    letter-spacing: -0.3px;
}
.article-body h3 {
    font-size: 17px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 28px 0 10px;
}
.article-body ul,
.article-body ol {
    margin: 0 0 20px 24px;
    font-size: 16px;
    line-height: 1.7;
    color: #1d1d1f;
}
.article-body li { margin-bottom: 8px; }
.article-body a {
    color: #6c5ce7;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
.article-body a:hover { text-decoration-thickness: 2px; }
.article-body blockquote {
    border-left: 3px solid #6c5ce7;
    padding: 4px 20px;
    margin: 24px 0;
    color: #3a3a3c;
    font-style: italic;
    font-size: 18px;
    line-height: 1.5;
}
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
}
.article-body figure {
    margin: 24px 0;
}
.article-body figcaption {
    font-size: 13px;
    color: #86868b;
    text-align: center;
    margin-top: 8px;
    line-height: 1.4;
}
.article-body code {
    background: #f5f5f7;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 14px;
}
.article-body pre {
    background: #1d1d1f;
    color: #f5f5f7;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 24px 0;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
}
.article-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}
.article-body iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 8px;
    margin: 24px 0;
}

/* ── Tables in article bodies — roundups, comparisons, data tables ── */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 14.5px;
    line-height: 1.55;
    background: #fff;
    border: 1px solid #e5e5e7;
}
.article-body thead {
    background: #f5f5f7;
}
.article-body th {
    text-align: left;
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #1d1d1f;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e5e7;
    white-space: nowrap;
}
.article-body td {
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f3;
    color: #1d1d1f;
    vertical-align: top;
}
.article-body tbody tr:last-child td {
    border-bottom: none;
}
.article-body tbody tr:hover td {
    background: #faf9ff;       /* faint purple tint */
}
.article-body tbody td:first-child {
    font-weight: 600;
    white-space: nowrap;       /* keep company / first-col names on one line */
}
.article-body table a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}
/* Mobile: horizontal-scroll the table so wide layouts don't break the page */
@media (max-width: 720px) {
    .article-body table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 13px;
    }
    .article-body th, .article-body td {
        padding: 10px 12px;
    }
}

/* ── Related stories sidebar ─────────────────────────────────── */
.related-stories {
    margin: 48px 0 0;
    padding-top: 32px;
    border-top: 1px solid #e5e5e7;
}
.related-stories h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #86868b;
    margin: 0 0 20px;
    font-weight: 700;
}
.related-stories ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}

/* ── Article card (used in /news/ index + Related) ──────────── */
.article-card {
    list-style: none;
}
.card-link {
    display: block;
    color: inherit;
    text-decoration: none !important;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 120ms ease;
}
.card-link:hover { transform: translateY(-2px); }
.card-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: #f5f5f7;
}
.card-body {
    padding: 12px 4px;
}
.card-title {
    font-size: 16px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0 0 6px;
    line-height: 1.3;
}
.card-link:hover .card-title { color: #6c5ce7; }
.card-excerpt {
    font-size: 13px;
    color: #6e6e73;
    margin: 0 0 8px;
    line-height: 1.5;
}
.card-date {
    font-size: 12px;
    color: #86868b;
}

/* ── Featured row: hero (left, 2/3) + 3 side cards (right, 1/3) ─── */
.featured-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 16px 24px;
    margin: 0 0 36px;
}

.featured-card {
    grid-column: 1;
    grid-row: 1 / -1;
    display: block;
    color: inherit !important;
    text-decoration: none !important;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e5e7;
}
/* No shadow / lift on hover — clean color change only */
.featured-card:hover { background: #fff; }
.featured-thumb {
    width: 100%;
    aspect-ratio: 1.91 / 1;
    background-size: cover;
    background-position: center;
    background-color: #f5f5f7;
}
.featured-thumb-empty {
    background: linear-gradient(135deg, #6c5ce7 0%, #3d3270 100%);
}
.featured-body { padding: 24px; }
.featured-badge {
    display: inline-block;
    background: #6c5ce7;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}
.featured-title {
    font-size: 28px;
    font-weight: 800;
    color: #1d1d1f;
    margin: 0 0 12px;
    letter-spacing: -0.5px;
    line-height: 1.2;
}
.featured-card:hover .featured-title { color: #6c5ce7; }
.featured-excerpt {
    font-size: 15px;
    color: #6e6e73;
    line-height: 1.55;
    margin: 0 0 14px;
}
.featured-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #86868b;
}
.featured-author { color: #1d1d1f; font-weight: 600; }
.featured-dot { color: #c7c7cc; }

/* Side cards — horizontal layout on desktop (thumb left, text right).
   Compact natural height lets the FEATURED card drive the row height,
   so 3 stacked side cards fit cleanly without stretching the featured. */
.featured-side-card {
    display: grid;
    grid-template-columns: 40% 1fr;
    color: inherit !important;
    text-decoration: none !important;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e5e7;
    min-height: 0;
}
.featured-side-card:hover { background: #fff; }
.featured-side-thumb {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;       /* fill the grid cell, ignore intrinsic ratio */
    background-size: cover;
    background-position: center;
    background-color: #f5f5f7;
    min-width: 0;
    min-height: 0;
}
.featured-side-thumb-empty {
    background: linear-gradient(135deg, #6c5ce7 0%, #3d3270 100%);
}
.featured-side-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    min-height: 0;
}
.featured-side-title {
    font-size: 14px;
    font-weight: 700;
    color: #1d1d1f;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.featured-side-card:hover .featured-side-title { color: #6c5ce7; }
.featured-side-date {
    font-size: 12px;
    color: #86868b;
}

/* "Latest" header above the secondary grid */
.news-section-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #86868b;
    font-weight: 700;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e7;
}

/* ── Mobile: collapse featured-row into a swipeable carousel ──────
   Featured + 3 side cards become equal square tiles that scroll
   horizontally with snap-to-card. Image fills each tile and the
   title sits in a gradient overlay at the bottom. */
@media (max-width: 720px) {
    .featured-row {
        display: flex;
        grid-template-columns: none;
        grid-template-rows: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 12px;
        margin: 0 -24px 28px;
        padding: 4px 24px 12px;
        scrollbar-width: none;
    }
    .featured-row::-webkit-scrollbar { display: none; }
    .featured-card,
    .featured-side-card {
        flex: 0 0 86%;
        grid-column: auto;
        grid-row: auto;
        grid-template-columns: none;     /* override desktop horizontal layout */
        aspect-ratio: 1 / 1;
        scroll-snap-align: center;
        position: relative;
        margin: 0;
        display: block;                  /* image-fill + overlay on mobile */
    }
    .featured-card .featured-thumb,
    .featured-side-card .featured-side-thumb {
        aspect-ratio: auto;
        height: 100%;
        position: absolute;
        inset: 0;
    }
    .featured-card .featured-body,
    .featured-side-card .featured-side-body {
        position: absolute;
        inset: auto 0 0 0;
        background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 55%, transparent 100%);
        color: #fff;
        padding: 16px 14px 14px;
    }
    .featured-card .featured-title,
    .featured-side-card .featured-side-title {
        color: #fff !important;
        font-size: 16px;
        line-height: 1.25;
        margin: 0;
    }
    .featured-card .featured-title { font-size: 18px; }
    .featured-card .featured-excerpt,
    .featured-card .featured-meta { display: none; }
    .featured-card .featured-badge {
        background: #fff;
        color: #6c5ce7;
        margin-bottom: 8px;
    }
    .featured-side-card .featured-side-date {
        color: rgba(255,255,255,0.8);
    }
}

/* ── AdSense slots (silent until ADSENSE_ENABLED is flipped) ─────── */
.ad-unit {
    margin: 32px 0;
    text-align: center;
}
.ad-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #c7c7cc;
    margin-bottom: 6px;
}
.ad-banner {
    margin: 24px 0 36px;
    padding: 12px 0;
    border-top: 1px solid #f0f0f3;
    border-bottom: 1px solid #f0f0f3;
}
.ad-rectangle {
    margin: 36px auto 24px;
    max-width: 720px;
}

/* ── Header alignment override ────────────────────────────────────────
   Override guide.css's .site-header-inner (900px) to match the homepage's
   1200px container. This pulls the logo over to the same left edge as the
   news index body content, so they line up exactly. */
.site-header-inner { max-width: 1200px !important; }

/* ── /news/ index page — matches HOMEPAGE width (1200px container) ─── */
.news-index {
    max-width: 1200px;       /* same as .header-inner on the homepage */
    margin: 0 auto;
    padding: 48px 24px 64px;
}
.news-index-header {
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e5e5e7;
}
.news-index-header h1 {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.8px;
    color: #1d1d1f;
    margin: 0 0 8px;
    line-height: 1.15;
}
.news-index-lead {
    font-size: 16px;
    color: #6e6e73;
    margin: 0;
    line-height: 1.55;
    max-width: 720px;        /* keep lead readable on a wide container */
}
.article-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* 3 across at desktop */
    gap: 32px 28px;
}
.no-articles {
    color: #86868b;
    font-size: 15px;
    padding: 48px 0;
    text-align: center;
}
@media (max-width: 960px) {
    .article-grid { grid-template-columns: repeat(2, 1fr); gap: 28px 24px; }
}
@media (max-width: 640px) {
    .news-index-header h1 { font-size: 28px; }
    .article-grid { grid-template-columns: 1fr; gap: 24px; }
}

