/*
Theme Name:   Somentra Child
Theme URI:    https://themeforest.net/user/greatives
Description:  Somentra Child Theme
Version:      2.1.0
Author:       Greatives Team
Author URI:   https://greatives.eu
Template:     impeka
*/

/* ==========================================================================
   PROGRAM CPT - SINGLE POST STYLES
   ========================================================================== */

/* 1. Navigation Bar & Breadcrumbs
   ========================================================================== */
.program-navigation-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    margin-top: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.program-breadcrumbs {
    font-size: 13px;
    color: #888;
    font-weight: 500;
}

.program-breadcrumbs a {
    color: #444;
    text-decoration: none;
    transition: color 0.3s ease;
}

.program-breadcrumbs a:hover { color: #218c53; }

.program-breadcrumbs .sep {
    margin: 0 8px;
    color: #ccc;
    font-size: 12px;
}

.program-breadcrumbs .current {
    color: #111;
    font-weight: 600;
}

.program-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #111;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.program-back-btn svg { transition: transform 0.3s ease; }
.program-back-btn:hover { color: #218c53; }
.program-back-btn:hover svg { transform: translateX(-4px); }

/* 2. Single Post Layout (main + sidebar)
   ========================================================================== */
.program-layout-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0;                   /* gap handled by the divider border */
    margin: 36px 0 70px 0;
    align-items: flex-start;
}

.program-main-content {
    flex: 1 1 60%;
    min-width: 0;
    padding-right: 48px;
    border-right: 1px solid #ebebeb;
}

.program-sidebar {
    flex: 0 0 260px;
    max-width: 260px;
    padding-left: 40px;
    position: sticky;
    top: 90px;
}

/* 3. Sidebar — minimal, no card/box
   ========================================================================== */
.program-info-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* Status badge — compact */
.program-status-wrapper { margin-bottom: 20px; }

.program-status-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 10px;
    border-radius: 3px;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    background-color: #222;
}

/* Sidebar section title */
.program-sidebar-title {
    font-size: 10px !important;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: #aaa;
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: none;
    font-weight: 700;
}

/* Info list — clean rows */
.program-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.program-info-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.program-info-list li:last-child {
    border-bottom: none;
}

.program-info-list small {
    color: #aaa;
    text-transform: uppercase;
    display: block;
    font-size: 10px;
    letter-spacing: 1px;
    margin-bottom: 3px;
    font-weight: 600;
}

.program-info-list strong,
.program-info-list span {
    display: block;
    font-size: 13px;
    color: #222;
    line-height: 1.5;
    font-weight: 600;
}

.program-info-list .program-end-date strong { color: #d63031; }

/* Remove old border-top separators — now using li border-bottom */
.program-info-list .program-funding,
.program-info-list .program-beneficiaries {
    padding-top: 0;
    border-top: none;
}

.program-info-list .program-funding strong {
    font-size: 16px;
    color: #218c53;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.program-info-list .program-beneficiaries span {
    font-size: 12px;
    color: #555;
    font-weight: 400;
    line-height: 1.6;
}

/* 4. Responsive - Single
   ========================================================================== */
@media (max-width: 900px) {
    .program-main-content {
        padding-right: 30px;
    }
    .program-sidebar {
        flex: 0 0 200px;
        max-width: 200px;
        padding-left: 28px;
    }
}

@media (max-width: 768px) {
    .program-navigation-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-top: 24px;
        padding-bottom: 16px;
    }
    .program-layout-wrapper {
        flex-direction: column;
        gap: 0;
        margin: 20px 0 40px 0;
    }
    /* On mobile: sidebar comes FIRST (above content) as a compact summary row */
    .program-sidebar {
        order: -1;
        flex: 1 1 100%;
        max-width: 100%;
        padding: 0 0 20px 0;
        border-bottom: 1px solid #ebebeb;
        margin-bottom: 24px;
        position: static;
    }
    .program-main-content {
        padding-right: 0;
        border-right: none;
        flex: 1 1 100%;
    }
    /* Mobile: info list as horizontal scroll row */
    .program-info-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
    }
    .program-info-list li {
        flex: 0 0 auto;
        padding: 6px 20px 6px 0;
        border-bottom: none;
        border-right: 1px solid #f0f0f0;
        margin-right: 20px;
    }
    .program-info-list li:last-child {
        border-right: none;
        margin-right: 0;
    }
    .program-info-list small { font-size: 9px; margin-bottom: 2px; }
    .program-info-list strong,
    .program-info-list span  { font-size: 12px; }
    .program-info-list .program-funding strong { font-size: 14px; }
    .program-status-wrapper { margin-bottom: 14px; }
}

/* ==========================================================================
   PROGRAM CPT - ARCHIVE / SHORTCODE STYLES
   ========================================================================== */

/* Filter Bar */
.pf-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid #ebebeb;
}

.pf-btn {
    display: inline-block;
    outline: 0;
    border: 0;
    cursor: pointer;
    background-color: white;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #2d3748;
    border: 1px solid #cbd5e0;
    line-height: 22px;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,.1), 0 1px 2px 0 rgba(0,0,0,.06);
    font-family: inherit;
    letter-spacing: 0.3px;
    transition: background-color .2s ease, color .2s ease,
                border-color .2s ease, box-shadow .2s ease;
}

.pf-btn:hover {
    background-color: #f7fafc;
    border-color: #a0aec0;
    box-shadow: 0 2px 6px 0 rgba(0,0,0,.12), 0 1px 3px 0 rgba(0,0,0,.08);
}

.pf-btn.pf-btn--active {
    background-color: #2d3748;
    color: #fff;
    border-color: #2d3748;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,.2), 0 1px 2px 0 rgba(0,0,0,.1);
}

@media (max-width: 767px) {
    .pf-bar { gap: 6px; margin-bottom: 24px; }
    .pf-btn { font-size: 11px; padding: 5px 12px; line-height: 20px; }
}

/* List layout — εικόνα αριστερά, κείμενο δεξιά */
.programs-archive-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 50px;
}

.program-list-item {
    display: flex;
    align-items: center;
    gap: 40px;
    padding: 40px 0;
    border-bottom: 1px solid #ebebeb;
    position: relative;
    /* Fade transition — layout stays intact during animation */
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.32s ease, transform 0.32s ease;
    will-change: opacity, transform;
}

/* Εικόνα αριστερά — σταθερό πλάτος */
.program-list-image {
    flex: 0 0 300px;
    position: relative;
    overflow: hidden;
    border-radius: 6px;
}
.program-list-image .grve-media {
    height: 100%;
    min-height: 200px;
}
.program-list-image .grve-thumbnail-wrapper {
    width: 100% !important;
    height: 100%;
}
.program-list-image .grve-thumbnail {
    padding-top: 0 !important;
    height: 100%;
    min-height: 200px;
}
.program-list-image .grve-thumbnail img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.program-list-image-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 6px;
}
.program-list-image-link .grve-media {
    height: 100%;
}

/* Hover zoom */
.program-list-image-link:hover .grve-thumbnail img {
    transform: scale(1.05);
}

/* Badge πάνω στην εικόνα */
.program-list-image .program-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
}

/* Κείμενο δεξιά */
.program-list-body {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

/* Τίτλος — μεγαλύτερος, bold */
.program-list-body .grve-title {
    margin: 0 0 14px 0;
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.3px;
}
.program-list-body .grve-title a {
    color: #111;
    text-decoration: none;
    transition: color 0.25s ease;
}
.program-list-body .grve-title a:hover {
    color: var(--grve-primary-1, #218c53);
}

/* Excerpt */
.program-list-body .grve-description {
    margin: 0 0 4px 0;
    color: #777;
    font-size: 0.95rem;
    line-height: 1.75;
}

/* Meta row — ημερομηνία + κουμπί */
.program-card-meta {
    border-top: 1px solid #ebebeb;
    padding-top: 14px;
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.88rem;
}

/* Meta info — ημερομηνία ανάρτησης + ημερομηνία προγράμματος */
.program-meta-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

.program-meta-posted {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #aaa;
    font-size: 0.82rem;
    letter-spacing: 0.3px;
}
.program-meta-posted svg {
    flex-shrink: 0;
    vertical-align: middle;
    color: #bbb;
}

.program-meta-date {
    font-size: 0.88rem;
    color: #888;
}
.program-meta-date strong {
    color: #555;
    font-weight: 600;
}

/* Status Badges */
.program-card-badge {
    font-size: 10px;
    padding: 4px 11px;
    border-radius: 3px;
    color: #fff;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    z-index: 10;
}
.status-open      { background-color: #2ecc71; }
.status-pending   { background-color: #f39c12; }
.status-completed { background-color: #e74c3c; }

/* Hidden state (JS filtering) — μόνο fade + translate, ΟΧΙ collapse layout */
/* Το JS προσθέτει .is-fading-out για fade-out και .js-hidden για display:none μετά */
.program-list-item.is-fading-out {
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}
/* Κατάσταση εμφάνισης (πριν το fade-in) */
.program-list-item.is-fading-in {
    opacity: 0;
    transform: translateY(10px);
}
/* Εντελώς κρυμμένο (μετά το fade-out) */
.program-list-item.js-hidden {
    display: none !important;
}
.program-list-item:first-child.is-fading-out,
.program-list-item:first-child.js-hidden {
    border-top-width: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .program-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 30px 0;
    }
    .program-list-image {
        flex: 0 0 auto;
        width: 100%;
    }
    .program-list-image .grve-thumbnail {
        min-height: 220px;
    }
    .program-list-body .grve-title {
        font-size: 1.3rem;
    }
}
@media (max-width: 480px) {
    .program-list-item { padding: 24px 0; gap: 16px; }
    .program-list-image .grve-thumbnail { min-height: 180px; }
    .program-list-body .grve-title { font-size: 1.15rem; }
}

/* ==========================================================================
   PROGRAM ARCHIVE — LOAD MORE BUTTON
   Mirror of .grve-isotope .grve-infinite-button-wrapper rules,
   scoped to .programs-archive-section so styling is identical to
   the portfolio/blog Load More without depending on .grve-isotope.
   ========================================================================== */

.programs-archive-section .grve-infinite-button-wrapper {
    text-align: center;
    margin-top: 50px;
}

.programs-archive-section .grve-infinite-button-wrapper .grve-infinite-button {
    display: inline-block;
    vertical-align: bottom;
    cursor: pointer;
    position: relative;
}

/* Animated underline — identical to theme */
.programs-archive-section .grve-infinite-button-wrapper .grve-infinite-button:after {
    content: '';
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    border-top-width: 0.143em;
    border-top-style: solid;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.25s cubic-bezier(0.785, 0.135, 0.15, 0.86);
}

.programs-archive-section .grve-infinite-button-wrapper .grve-infinite-button:hover:after {
    transform: scaleX(1);
    transform-origin: left center;
}

/* Loading pulse — re-uses the theme's grve_infinite_anim keyframe */
.programs-archive-section .grve-infinite-button-wrapper .grve-infinite-button.grve-is-loading {
    animation: grve_infinite_anim 0.4s infinite ease-in-out both;
    pointer-events: none;
}

/* Spinner dots container — matches .grve-infinite-page-load layout */
.programs-loadmore-spinner {
    text-align: center;
    margin-top: 24px;
    position: relative;
    width: 88px;
    height: 4px;
    margin-left: auto;
    margin-right: auto;
}