/* =====================================================
   CEUJust4U — Dynamic Course Filter & Grid v1.2.1
   ===================================================== */

/* ── Filter Sidebar ──────────────────────────────── */
.ceu-filter-sidebar { font-family: 'Montserrat', sans-serif; }

.ceu-filter-section {
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ececec;
}
.ceu-filter-section:last-of-type { border-bottom: none; padding-bottom: 0; }

/* H4 titles: NO color/font overrides — Elementor theme styles apply */
.ceu-filter-section h4 { margin: 0 0 12px 0; }

/* Search input */
.ceu-filter-search {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d0d0d0;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s;
}
.ceu-filter-search:focus { border-color: #702382; }
.ceu-filter-search::placeholder { color: #aaa; }

/* Select dropdowns */
.ceu-filter-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #d0d0d0;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #333;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23702382' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
    transition: border-color 0.2s;
}
.ceu-filter-select:focus { border-color: #702382; }

/* ── Dual Range Slider ───────────────────────────── */
.ceu-range-slider { padding: 4px 0 0; }

.ceu-range-wrap {
    position: relative;
    height: 36px;
    display: flex;
    align-items: center;
}

.ceu-range-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
}

.ceu-range-fill {
    position: absolute;
    height: 100%;
    background: #702382;
    border-radius: 2px;
}

.ceu-range-input {
    position: absolute;
    width: 100%;
    height: 0;
    background: transparent;
    -webkit-appearance: none;
    pointer-events: none;
    outline: none;
}

.ceu-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #702382;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 2px 6px rgba(112,35,130,0.35);
    transition: transform 0.15s;
}
.ceu-range-input::-webkit-slider-thumb:hover { transform: scale(1.15); }

.ceu-range-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #702382;
    cursor: pointer;
    pointer-events: auto;
    border: none;
    box-shadow: 0 2px 6px rgba(112,35,130,0.35);
}

.ceu-range-labels {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    margin-top: 10px;
    font-family: 'Montserrat', sans-serif;
}

/* Clear button */
.ceu-clear-filters {
    display: block;
    width: 100%;
    margin-top: 18px;
    padding: 9px 16px;
    background: transparent;
    color: #702382;
    border: 1.5px solid #702382;
    border-radius: 50px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-align: center;
}
.ceu-clear-filters:hover { background: #702382; color: #fff; }

/* ── Grid Header ─────────────────────────────────── */
.ceu-grid-header { display: flex; justify-content: flex-end; margin-bottom: 16px; min-height: 22px; }
.ceu-result-count { font-family: 'Montserrat', sans-serif; font-size: 13px; color: #999; }

/* ── Course Grid ─────────────────────────────────── */
.ceu-course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 26px;
    transition: opacity 0.25s;
}
.ceu-course-grid.ceu-loading { opacity: 0.45; pointer-events: none; }

/* ── Course Card ─────────────────────────────────── */
.ceu-course-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 22px rgba(0,0,0,0.09);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.22s, box-shadow 0.22s;
}
.ceu-course-card:hover { transform: translateY(-4px); box-shadow: 0 10px 32px rgba(0,0,0,0.14); }

.ceu-card-image { position: relative; width: 100%; aspect-ratio: 16/9; overflow: hidden; background: #f0f0f0; }
.ceu-card-image a { display: block; width: 100%; height: 100%; }
.ceu-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.ceu-course-card:hover .ceu-card-image img { transform: scale(1.04); }

.ceu-hours-badge {
    position: absolute; top: 12px; left: 12px;
    background: #00ACB1; color: #fff;
    font-family: 'Montserrat', sans-serif; font-size: 10.5px; font-weight: 400;
    padding: 5px 13px; border-radius: 50px; letter-spacing: 0.6px; white-space: nowrap;
    pointer-events: none;
}

.ceu-card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }

.ceu-card-title { margin: 0 0 10px 0; font-size: 17px; font-weight: 700; line-height: 1.3; }
.ceu-card-title a { color: #702382; text-decoration: none; transition: color 0.2s; }
.ceu-card-title a:hover { color: #00ACB1; }

.ceu-card-excerpt {
    color: #666; font-size: 13.5px; line-height: 1.65; margin: 0 0 18px 0;
    text-align: justify; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

.ceu-card-price { font-family: 'Montserrat', sans-serif; font-size: 22px; font-weight: 700; color: #702382; text-align: center; margin: 0 0 14px 0; }
.ceu-card-price .woocommerce-Price-amount, .ceu-card-price .woocommerce-Price-currencySymbol { color: #702382; }

.ceu-no-results { text-align: center; padding: 50px 20px; color: #999; font-family: 'Montserrat', sans-serif; font-size: 15px; grid-column: 1/-1; }

/* ── Suppress browser default track bevel/shadow ── */
.ceu-range-input::-webkit-slider-runnable-track {
    -webkit-appearance: none;
    background: transparent;
    border: none;
    box-shadow: none;
    height: 0;
}
.ceu-range-input::-moz-range-track {
    background: transparent;
    border: none;
    box-shadow: none;
    height: 0;
}
.ceu-range-input::-ms-track {
    background: transparent;
    border: none;
    box-shadow: none;
    height: 4px;
    color: transparent;
}

/* ── Range input complete bevel fix ── */
.ceu-range-input {
    appearance: none !important;
    -webkit-appearance: none !important;
    border: none !important;
    background: transparent !important;
    height: 0 !important;
    outline: none !important;
}
.ceu-range-input::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    margin-top: -10px;
}
.ceu-range-input::-webkit-slider-runnable-track {
    -webkit-appearance: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    height: 0 !important;
}
