@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=DM+Serif+Display&display=swap');

.ics-wrap *,
.ics-wrap *::before,
.ics-wrap *::after { box-sizing: border-box; margin: 0; padding: 0; }

.ics-wrap {
    font-family: 'DM Sans', system-ui, sans-serif;
    color: #1a1d23;
    position: relative;
}

/* ── Filter bar ── */
.ics-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    background: #f5f6f8;
    border: 1px solid #e2e5eb;
    border-radius: 10px;
    padding: 20px 22px;
    margin-bottom: 16px;
}
.ics-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1 1 200px;
}
.ics-lbl {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #6b7280;
}
.ics-sel-wrap { position: relative; }
.ics-sel {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 1.5px solid #e2e5eb;
    border-radius: 6px;
    padding: 10px 36px 10px 13px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    color: #1a1d23;
    cursor: pointer;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.ics-sel:hover,
.ics-sel:focus { border-color: #1557c0; box-shadow: 0 0 0 3px #e8eef9; }
.ics-arr {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #6b7280;
    pointer-events: none;
    line-height: 1;
}

/* ── Apply button ── */
.ics-btn {
    align-self: flex-end;
    background: #0a3d91;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 11px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, transform .15s, box-shadow .15s;
}
.ics-btn:hover {
    background: #1557c0;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(10,61,145,.3);
}
.ics-btn:active { transform: none; }

/* ── Active filter tag ── */
.ics-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e8eef9;
    border: 1px solid #b9ccef;
    color: #0a3d91;
    border-radius: 99px;
    padding: 5px 12px 5px 16px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 14px;
}
.ics-tag-x {
    background: none;
    border: none;
    cursor: pointer;
    color: #0a3d91;
    font-size: 13px;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 50%;
}
.ics-tag-x:hover { background: rgba(10,61,145,.12); }

/* ── Count ── */
.ics-count {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 20px;
}
.ics-count strong { color: #1a1d23; }

/* ── Grid ── */
.ics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ── Card ── */
.ics-card {
    background: #fff;
    border: 1px solid #e2e5eb;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(10,61,145,.07);
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.ics-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(10,61,145,.14);
    border-color: #c5d5f0;
}
.ics-card-img-link { display: block; }
.ics-card-img {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f5f6f8;
}
.ics-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s;
}
.ics-card:hover .ics-card-img img { transform: scale(1.05); }
.ics-card-img-ph { width: 100%; height: 100%; background: #e9edf5; }
.ics-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1;
}
.ics-card-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.ics-pill {
    background: #eef2fc;
    color: #2c57b8;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 99px;
}
.ics-card-title {
    font-family: 'DM Serif Display', Georgia, serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.35;
}
.ics-card-title a { color: #1a1d23; text-decoration: none; }
.ics-card-title a:hover { color: #0a3d91; }
.ics-card-exc {
    font-size: 13.5px;
    line-height: 1.65;
    color: #6b7280;
    flex: 1;
}
.ics-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 600;
    color: #0a3d91;
    text-decoration: none;
    margin-top: auto;
    transition: gap .15s;
}
.ics-cta:hover { gap: 9px; color: #1557c0; }

/* ── Loader ── */
.ics-loader {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9;
    border-radius: 10px;
}
.ics-spin {
    width: 36px; height: 36px;
    border: 3px solid #e8eef9;
    border-top-color: #0a3d91;
    border-radius: 50%;
    animation: icsspin .7s linear infinite;
}
@keyframes icsspin { to { transform: rotate(360deg); } }

/* ── Empty state ── */
.ics-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}
.ics-empty p { font-size: 15px; margin-bottom: 14px; }
.ics-reset-btn {
    background: none;
    border: 1.5px solid #e2e5eb;
    border-radius: 6px;
    padding: 9px 20px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
}
.ics-reset-btn:hover { border-color: #0a3d91; color: #0a3d91; background: #e8eef9; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .ics-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 580px) {
    .ics-grid { grid-template-columns: 1fr; }
    .ics-bar  { flex-direction: column; }
    .ics-btn  { width: 100%; }
}

/* Hide utility — used instead of inline style so Elementor can't strip it */
.ics-hide { display: none !important; }


/* Custom div-based dropdown (replaces <select> which Elementor hides) */
.ics-dd-wrap { position: relative; flex: 1 1 200px; }
.ics-dd {
    position: relative;
    background: #fff;
    border: 1.5px solid #e2e5eb;
    border-radius: 6px;
    padding: 10px 36px 10px 13px;
    font-size: 14px;
    font-weight: 500;
    color: #1a1d23;
    cursor: pointer;
    user-select: none;
}
.ics-dd:hover { border-color: #1557c0; box-shadow: 0 0 0 3px #e8eef9; }
.ics-dd-arrow { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-size: 18px; color: #6b7280; pointer-events: none; }
.ics-dd-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1.5px solid #e2e5eb;
    border-radius: 6px;
    z-index: 9999;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.ics-dd-item {
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    color: #1a1d23;
}
.ics-dd-item:hover { background: #e8eef9; color: #0a3d91; }
