/* CreateIT RAIC Projekti — thin layer on top of the shared LB design system.
   Only the pieces LB doesn't have. Uses the LB --lb-* tokens throughout so the
   RAIC section reads as one visual language with LB projekti. */

/* ── Status dot: Aktuālie keeps the default blue dot; Īstenotie → navy ─────── */
.lb-card-status.raic-statuss-istenotie::before { background: var(--lb-text); }

/* ── Archive hero breadcrumb — same treatment as the LB archive ─────────────
   Collapse the Enfold title bar to zero height + transparent, and shift the
   breadcrumb 30px down so it overflows onto the hero image below (identical to
   the LB pattern, which is body-scoped to lb_projekts and so doesn't reach us). */
body.post-type-archive-raic_projekts .title_container {
    position: relative;
    z-index: 10;
    background: transparent !important;
    box-shadow: none !important;
    border-top: none !important;
    border-bottom: none !important;
}
body.post-type-archive-raic_projekts .title_container .container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
    position: relative;
    top: 30px;
    background-color: transparent !important;
}
/* White breadcrumb ONLY when the hero text is light (dark bg image). For a
   light image or no image, the default dark breadcrumb colour applies. */
body.post-type-archive-raic_projekts .lb-hero-has-bg .breadcrumb,
body.post-type-archive-raic_projekts .lb-hero-has-bg .breadcrumb a {
    color: #ffffff;
}
body.post-type-archive-raic_projekts .lb-hero-has-bg .breadcrumb a:hover {
    color: var(--lb-accent-soft);
}

/* ── Filter tabs (Visi / Aktuālie / Īstenotie) ─────────────────────────────── */
.raic-filter-bar {
    display: -webkit-flex;
    display: flex;
    -webkit-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-justify-content: center;
    justify-content: center;
    gap: 10px 28px;
    margin: 0 0 36px;
    padding: 0;
}
#top .main_color a.raic-filter-tab,
#top a.raic-filter-tab {
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: var(--lb-text-soft) !important;
    text-decoration: none !important;
    border: 0 !important;
    padding: 4px 0;
    -webkit-transition: color 0.15s ease;
    transition: color 0.15s ease;
}
#top .main_color a.raic-filter-tab:hover,
#top a.raic-filter-tab:hover { color: var(--lb-accent) !important; }
#top .main_color a.raic-filter-tab.is-active,
#top a.raic-filter-tab.is-active {
    color: var(--lb-text) !important;
    font-weight: 700;
    box-shadow: inset 0 -2px 0 0 var(--lb-accent);
}
/* Suppress the theme's content-link arrow on the tabs */
#top .raic-filter-tab::after { content: none !important; display: none !important; }

/* ── Single: meta row (status badge + logo) ────────────────────────────────── */
.raic-single .raic-meta-row {
    display: -webkit-flex;
    display: flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 18px;
    margin: 0 0 24px;
    flex-wrap: wrap;
}
.raic-single .raic-status-badge {
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    gap: 8px;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--lb-text);
}
.raic-single .raic-status-badge::before {
    content: '';
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--lb-accent);
    flex-shrink: 0;
}
.raic-single .raic-status-badge.raic-statuss-istenotie::before { background: var(--lb-text); }
.raic-single .raic-logo img {
    display: block;
    max-height: 40px;
    width: auto;
    border: none !important;
}

/* ── Single: main image — narrower than the text column, centered, with the
   status badge overlaid (same as the grid cards). Click → theme lightbox. ─── */
.raic-single .raic-hero {
    max-width: 620px;   /* narrower than the ~1210px content column */
    margin: 4px 0 36px; /* left-aligned within the content column */
    padding: 0;
}
#top .main_color a.raic-hero-link,
#top a.raic-hero-link {
    display: block;
    position: relative;    /* anchor for the status badge + zoom overlays */
    overflow: hidden;
    line-height: 0;
    background: #E5E7EB;
    border: none !important;
    cursor: zoom-in;
    text-decoration: none !important;
}
.raic-single .raic-hero-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border: none !important;
    -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.raic-hero-link:hover .raic-hero-img { -webkit-transform: scale(1.03); transform: scale(1.03); }
/* Zoom affordance, bottom-right (status badge sits bottom-left) */
.raic-single .raic-hero-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: -webkit-inline-flex;
    display: inline-flex;
    -webkit-align-items: center;
    align-items: center;
    -webkit-justify-content: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: var(--lb-bg);
    background: rgba(var(--lb-text-rgb), 0.72);
    border-radius: 50%;
    line-height: 0;
    opacity: 0;
    -webkit-transform: translateY(4px);
    transform: translateY(4px);
    -webkit-transition: opacity 0.2s ease, -webkit-transform 0.2s ease;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
.raic-hero-link:hover .raic-hero-zoom { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); }
/* Program logo — left-aligned below the image (matches the image alignment) */
.raic-single .raic-hero-logo {
    display: block;
    text-align: left;
    margin: 14px 0 0;
}
.raic-single .raic-hero-logo img {
    display: inline-block;
    max-height: 46px;
    width: auto;
    border: none !important;
}
/* No-image fallback: status + logo centered */
.raic-single .raic-meta-row {
    display: -webkit-flex;
    display: flex;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-align-items: center;
    align-items: center;
    gap: 18px;
    margin: 0 0 32px;
    flex-wrap: wrap;
}

/* ── Narrative headings — same navy as the paragraph text ──────────────────
   The content comes from the_content() inside Enfold's .main_color wrapper, so
   Enfold's `.main_color h3` (#231F20, near-black) ties the shared
   `.lb-detail-body h3` rule on specificity and wins on source order. Re-assert
   the paragraph's navy (--lb-text) with a higher-specificity, RAIC-scoped rule. */
#top .main_color .raic-single .lb-detail-body h2,
#top .main_color .raic-single .lb-detail-body h3,
#top .main_color .raic-single .lb-detail-body h4,
#top .main_color .raic-single .lb-detail-body h5,
#top .main_color .raic-single .lb-detail-body h6 {
    color: var(--lb-text);
}

/* ── Projektu aktualitātes strip (Jaunumi-like cards) ──────────────────────── */
.raic-single .raic-news {
    margin: 40px 0 8px;
    padding-top: 18px;
    border-top: 1px solid var(--lb-line);
}
/* Match the "Projektu aktualitātes" heading to the narrative section headings on
   the same page (.lb-detail-body h2/h3 → 20px / -0.01em). The shared
   .lb-section-heading component is 18px; align it to the 20px scale used here so
   all section titles on the project page read consistently. */
#top #wrap_all .raic-single .raic-news .lb-section-heading {
    font-size: 20px !important;
    letter-spacing: -0.01em !important;
    line-height: 1.3 !important;
}
.raic-single .raic-news-grid {
    display: -webkit-grid;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 28px 24px;
    margin-top: 6px;
}
#top .main_color a.raic-news-card,
#top a.raic-news-card {
    display: block;
    text-decoration: none !important;
    border: 0 !important;
    color: var(--lb-text) !important;
}
.raic-news-thumb {
    display: block;
    overflow: hidden;
    background: #E5E7EB;
    aspect-ratio: 3 / 2;
    line-height: 0;
    margin-bottom: 12px;
}
.raic-news-thumb img,
.raic-news-thumb--empty {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-transition: -webkit-transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.raic-news-card:hover .raic-news-thumb img { -webkit-transform: scale(1.04); transform: scale(1.04); }
.raic-news-title {
    display: block;
    font-family: Apkaimes, 'HelveticaNeue', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--lb-text);
    -webkit-transition: color 0.15s ease;
    transition: color 0.15s ease;
}
.raic-news-card:hover .raic-news-title { color: var(--lb-accent); }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media only screen and (max-width: 767px) {
    .raic-single .raic-hero-img { aspect-ratio: 16 / 10; }
    .raic-single .raic-news-grid { gap: 22px 18px; }
}
