/* ============================================================
   IB-S Projects Page — Filter system + Project grid
   File: wp-content/novamira-sandbox/ibs-projects.css
   ============================================================ */

/* ── Wrapper ─────────────────────────────────────────────── */
.ibs-projects-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 48px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Filter bar ──────────────────────────────────────────── */
.ibs-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 32px;
    margin-bottom: 36px;
    padding: 20px 24px;
    background: #f4f6f9;
    border-radius: 8px;
    border: 1px solid #e0e4e8;
    align-items: center;
}

.ibs-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ibs-filter-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #7a8a99;
    margin-right: 4px;
    white-space: nowrap;
}

.ibs-filter-btn {
    display: inline-block;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    border: 1.5px solid #c8d0d9;
    border-radius: 20px;
    background: #ffffff;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.18s ease;
    line-height: 1.4;
    white-space: nowrap;
}

.ibs-filter-btn:hover {
    border-color: #5c8727;
    color: #5c8727;
    background: #f0f7e6;
}

.ibs-filter-btn.active {
    background: #5c8727;
    border-color: #5c8727;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(92,135,39,0.25);
}

/* ── Project grid ────────────────────────────────────────── */
.ibs-projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

/* ── Project card ────────────────────────────────────────── */
.ibs-proj-card {
    background: #ffffff;
    border: 1px solid #e0e4e8;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.ibs-proj-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.10);
    transform: translateY(-2px);
}

/* Card thumbnail */
.ibs-proj-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

/* Card body */
.ibs-proj-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Badges row */
.ibs-proj-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.ibs-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Scope badges */
.ibs-badge.scope-nacional {
    background: #e8f4fd;
    color: #1a6fa8;
    border: 1px solid #b3d7f0;
}
.ibs-badge.scope-internacional {
    background: #fdf0e8;
    color: #b05a17;
    border: 1px solid #f0c89a;
}

/* Status badges */
.ibs-badge.status-ativo {
    background: #edf7e6;
    color: #3d6e1f;
    border: 1px solid #b6dcaa;
}
.ibs-badge.status-concluido {
    background: #f3f0fa;
    color: #5b42a5;
    border: 1px solid #c8bde8;
}

/* Project title */
.ibs-proj-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a2535;
    margin: 0 0 10px;
    line-height: 1.35;
}

.ibs-proj-title a {
    color: inherit;
    text-decoration: none;
}

.ibs-proj-title a:hover {
    color: #5c8727;
}

/* Excerpt */
.ibs-proj-excerpt {
    font-size: 13.5px;
    color: #536070;
    line-height: 1.55;
    margin: 0 0 14px;
    flex: 1;
}

/* Meta row (period, funding) */
.ibs-proj-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-bottom: 16px;
    font-size: 12px;
    color: #7a8a99;
}

.ibs-proj-period,
.ibs-proj-funding {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* CTA link */
.ibs-proj-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    color: #5c8727;
    text-decoration: none;
    letter-spacing: 0.02em;
    margin-top: auto;
    transition: gap 0.15s;
}

.ibs-proj-link:hover {
    color: #3d6e1f;
    text-decoration: underline;
}

/* No results message */
.ibs-no-results {
    text-align: center;
    padding: 48px 24px;
    color: #7a8a99;
    font-size: 15px;
    grid-column: 1 / -1;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 680px) {
    .ibs-filter-bar {
        flex-direction: column;
        gap: 14px;
        padding: 16px;
    }

    .ibs-projects-grid {
        grid-template-columns: 1fr;
    }

    .ibs-proj-thumb img {
        height: 200px;
    }
}

/* ── Page header (Projects page title area) ──────────────── */
.ibs-page-header {
    background: #3a4d5c;
    color: #ffffff;
    padding: 48px 24px 40px;
    text-align: center;
    margin-bottom: 0;
}

.ibs-page-header h1 {
    font-size: 36px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 12px;
}

.ibs-page-header p {
    font-size: 16px;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* =============================================================
   Hero section text fix — force white text on dark background
   Targets pages 2223 (EN) and 3423 (PT) hero section
   Needed because programmatic Divi 5 blocks may get
   et_pb_bg_layout_light even on dark-background sections
   ============================================================= */
.page-id-2223 .et_pb_section_0 .et_pb_text_inner h1,
.page-id-2223 .et_pb_section_0 .et_pb_text_inner p,
.page-id-3423 .et_pb_section_0 .et_pb_text_inner h1,
.page-id-3423 .et_pb_section_0 .et_pb_text_inner p {
    color: #ffffff !important;
}

.page-id-2223 .et_pb_section_0,
.page-id-3423 .et_pb_section_0 {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
}
