/*
 * Reuses the real sitewide tokens defined in WordPress's own Additional
 * CSS (--im-blue/--im-blue-dark/--im-blue-soft/--im-text), with fallback
 * values here only so this file still renders sanely if ever previewed
 * without that stylesheet loaded. Do not reintroduce a separate palette
 * — that's exactly the drift this plugin's sibling (the donation plugin)
 * had before it was corrected to match.
 */
.cx-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 40px 24px 70px;
    font-family: 'IRANYekanXVF', Tahoma, sans-serif;
    color: var(--im-text, #283A50);
}

/*
 * The theme's Elementor kit defines bare `.elementor-kit-930016 h1/h2/a`
 * rules (56px black h1, etc.) that are MORE specific than a lone class
 * selector like `.cx-h1` (two selector parts vs. one), so they silently win
 * the cascade regardless of load order. Every element these plugin pages
 * render lives inside .cx-wrap, so prefixing with it is free, always-true
 * extra specificity — not a hack tied to one page.
 */
.cx-wrap .cx-breadcrumb {
    font-size: 13px;
    line-height: 1.9;
    color: var(--im-text, #283A50);
    margin-bottom: 18px;
    overflow-wrap: anywhere;
}
.cx-wrap .cx-breadcrumb a { color: var(--im-blue, #2E5AA7); text-decoration: none; }
.cx-wrap .cx-breadcrumb a:hover { text-decoration: underline; }
.cx-bc-sep { margin: 0 6px; opacity: .6; }
.cx-bc-current { color: var(--im-text, #283A50); font-weight: 600; }

.cx-wrap .cx-h1 { font-size: 30px; color: var(--im-blue-dark, #183B70); margin: 0 0 24px; line-height: 1.5; }
.cx-badge { display: inline-block; font-size: 12px; padding: 3px 10px; border-radius: 999px; background: var(--im-blue-soft, #F5F8FC); color: var(--im-blue-dark, #183B70); margin-left: 8px; }
.cx-meta-row { font-size: 13px; color: var(--im-text, #283A50); opacity: .85; margin-bottom: 20px; }

.cx-card { background: #fff; border: 1px solid #e5e9ef; border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; }
.cx-wrap .cx-section-title { font-size: 18px; color: var(--im-blue-dark, #183B70); margin: 32px 0 14px; }

.cx-phase-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eef1f5; }
.cx-phase-row:last-child { border-bottom: none; }
.cx-phase-title { flex: 1; min-width: 0; }
.cx-phase-bar { flex: 1; height: 8px; background: #eef1f5; border-radius: 99px; overflow: hidden; min-width: 80px; }
.cx-phase-bar-fill { display: block; height: 100%; background: var(--im-blue, #2E5AA7); }
.cx-phase-pct { width: 44px; text-align: left; font-size: 12px; color: var(--im-text, #283A50); }
.cx-phase-status { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #eef1f5; color: var(--im-text, #283A50); }
.cx-phase-status.done { background: #e4f3e8; color: #1f6d3a; }
.cx-phase-status.active { background: var(--im-blue-soft, #F5F8FC); color: var(--im-blue-dark, #183B70); }

.cx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.cx-wrap .cx-tile {
    display: block; text-decoration: none; color: inherit; background: #fff;
    border: 1px solid #e5e9ef; border-radius: 14px; overflow: hidden;
    box-shadow: 0 1px 2px rgba(24, 59, 112, .05);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cx-wrap .cx-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(24, 59, 112, .14); border-color: #d6e0ee; }
.cx-tile img { width: 100%; height: 170px; object-fit: cover; display: block; }
.cx-tile-noimg {
    width: 100%; height: 170px; display: flex; align-items: center; justify-content: center;
    background: var(--im-blue-soft, #F5F8FC); color: var(--im-blue, #2E5AA7);
}
.cx-tile-body { padding: 16px 18px; }
.cx-tile-title { font-size: 15.5px; font-weight: 600; color: var(--im-blue-dark, #183B70); margin: 0 0 6px; line-height: 1.6; }
.cx-tile-meta { font-size: 12.5px; color: var(--im-text, #283A50); opacity: .8; }

.cx-chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cx-wrap .cx-chip { font-size: 12px; padding: 5px 12px; border-radius: 999px; background: var(--im-blue-soft, #F5F8FC); color: var(--im-blue-dark, #183B70); text-decoration: none; }
.cx-wrap .cx-chip:hover { background: var(--im-blue, #2E5AA7); color: #fff; }

.cx-gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 22px; }
.cx-gallery-item { display: block; }
.cx-gallery-media {
    display: block; border-radius: 14px; overflow: hidden; border: 1px solid #e5e9ef;
    box-shadow: 0 1px 2px rgba(24, 59, 112, .05);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.cx-gallery-media:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(24, 59, 112, .14); border-color: #d6e0ee; }
.cx-gallery-media img, video.cx-gallery-media { width: 100%; height: 260px; object-fit: cover; display: block; background: #000; }
.cx-wrap .cx-gallery-project-link { display: block; margin-top: 10px; font-size: 13px; color: var(--im-blue, #2E5AA7); text-decoration: none; }
.cx-wrap .cx-gallery-project-link:hover { text-decoration: underline; }

.cx-filter-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 36px; padding: 16px 18px; background: var(--im-blue-soft, #F5F8FC); border-radius: 12px; }
.cx-filter-form select, .cx-filter-form input[type="text"] {
    font-family: inherit; font-size: 15px; padding: 11px 14px; border: 1px solid #d9e1eb; border-radius: 10px; background: #fff; color: var(--im-text, #283A50);
}
.cx-filter-submit {
    font-family: inherit; font-size: 15px; font-weight: 600; padding: 11px 24px; border: none; border-radius: 10px;
    background: var(--im-blue, #2E5AA7); color: #fff; cursor: pointer; transition: background-color .15s ease;
}
.cx-filter-submit:hover { background: var(--im-blue-dark, #183B70); }
.cx-wrap .cx-filter-clear { font-size: 13.5px; color: var(--im-text, #283A50); opacity: .75; text-decoration: none; }
.cx-wrap .cx-filter-clear:hover { text-decoration: underline; }

.cx-input { font-family: inherit; font-size: 14px; padding: 8px 10px; border: 1px solid #d9e1eb; border-radius: 8px; color: var(--im-text, #283A50); }

.cx-comment-list { list-style: none; margin: 0; padding: 0; }
.cx-comment { padding: 12px 0; border-bottom: 1px solid #eef1f5; }
.cx-comment:last-child { border-bottom: none; }
.cx-comment-official { background: var(--im-blue-soft, #F5F8FC); border-radius: 10px; padding: 12px 14px; border-bottom: none; }
.cx-comment-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 13px; }
.cx-comment-date { color: var(--im-text, #283A50); opacity: .6; font-size: 12px; }
.cx-badge-official { background: var(--im-blue, #2E5AA7); color: #fff; }
.cx-comment-body { font-size: 14px; line-height: 1.9; }
.cx-comment-replies { margin-top: 10px; margin-right: 24px; }

@media (max-width: 600px) {
    .cx-wrap { padding: 24px 16px 48px; }
    .cx-wrap .cx-h1 { font-size: 22px; margin-bottom: 18px; }
    .cx-filter-form { flex-direction: column; align-items: stretch; padding: 14px; }
}
