/* ===== AI / Classic search mode switch ===== */
.ai-search-switch-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0 25px;
}

.ai-search-switch {
    position: relative;
    display: flex;
    width: 340px;
    max-width: 100%;
    background: #eef1f8;
    border-radius: 999px;
    padding: 4px;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.08);
}

.ai-search-switch__thumb {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    border-radius: 999px;
    background: linear-gradient(135deg, #5b6472, #3a4250);
    transition: transform .35s cubic-bezier(.4,0,.2,1), background .35s ease, box-shadow .35s ease;
    z-index: 1;
}

.ai-search-switch[data-mode="ai"] .ai-search-switch__thumb {
    transform: translateX(100%);
    background: linear-gradient(135deg, #9055f8, #f23db5 55%, #ffa25f);
    animation: aiSearchGlow 2.2s ease-in-out infinite;
}

@keyframes aiSearchGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(244,114,198,.3), 0 0 3px rgba(163,123,249,.35); }
    50%      { box-shadow: 0 0 22px rgba(244,114,198,.5), 0 0 8px rgba(163,123,249,.5); }
}

.ai-search-switch__option {
    position: relative;
    z-index: 2;
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: #6b7280;
    cursor: pointer;
    border-radius: 999px;
    transition: color .3s ease;
    white-space: nowrap;
}

.ai-search-switch__option:focus { outline: none; }

.ai-search-switch[data-mode="classic"] .ai-search-switch__option--classic,
.ai-search-switch[data-mode="ai"] .ai-search-switch__option--ai {
    color: #fff;
}

.ai-search-switch__sparkle {
    display: inline-block;
    animation: aiSparklePulse 1.6s ease-in-out infinite;
}

@keyframes aiSparklePulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50%      { transform: scale(1.3) rotate(15deg); opacity: .75; }
}

.ai-search-switch__new-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 5px;
    font-size: 8px;
    font-weight: 800;
    border-radius: 999px;
    background: #fff;
    color: #f23db5;
    vertical-align: 2px;
}

.ai-search-switch[data-mode="classic"] .ai-search-switch__new-tag { display: none; }

.ai-search-switch__caption {
    margin-top: 8px;
    font-size: 12px;
    color: #8a8f98;
    text-align: center;
    min-height: 16px;
}

.ai-search-switch__caption-text { display: none; }

.ai-search-switch[data-mode="classic"] ~ .ai-search-switch__caption .ai-search-switch__caption-text--classic,
.ai-search-switch[data-mode="ai"] ~ .ai-search-switch__caption .ai-search-switch__caption-text--ai {
    display: inline;
}

/* "AI Suggested" per-card badge - layered on top of the site's existing bundle ribbon style */
.ai-suggested-badge {
    background: linear-gradient(135deg, #9055f8, #f23db5 55%, #ffa25f) !important;
    animation: aiSearchGlow 2.2s ease-in-out infinite;
}

/* ===== "Ask anything" style keyword box (AI mode) / plain field (Classic mode) ===== */
#keywordFieldWrapper {
    transition: max-width .25s ease, margin .25s ease;
}

#keywordFieldWrapper.keyword-field-wrapper--hero {
    float: none !important;
    width: 100% !important;
    max-width: 720px;
    margin: 0 auto;
}

.ai-search-hero-heading {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    color: #33363d;
    margin-bottom: 14px;
}

.ai-search-box {
    display: flex;
    align-items: center;
    transition: all .25s ease;
}

.ai-search-box__input {
    flex: 1;
    border: none !important;
    outline: none;
    box-shadow: none !important;
    background: transparent !important;
    margin: 0 !important;
}

.ai-search-box__submit {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease;
}

/* AI mode: big centered "Ask anything" pill, matches the ChatGPT-style reference */
/* Same look as the home page AI search (home-search.css): white fill with a gradient ring */
.ai-search-box--hero {
    padding: 4px 4px 4px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(#fff, #fff) padding-box, linear-gradient(105deg, #f168ad 0%, #ae55e8 48%, #6a5ef0 100%) border-box;
    box-shadow: 0 8px 30px rgba(0,0,0,.12);
}

.ai-search-box--hero:focus-within {
    box-shadow: 0 8px 30px rgba(0,0,0,.12), 0 0 0 4px rgba(185,122,236,.25);
}

.ai-search-box--hero .ai-search-box__icon {
    display: flex;
    flex: 0 0 auto;
    margin-right: 12px;
}

    .ai-search-box--hero .ai-search-box__icon svg {
        width: 22px;
        height: 22px;
        fill: #ae55e8;
    }

.ai-search-box--hero .ai-search-box__input {
    min-width: 0;
    height: 48px !important;
    padding: 0 !important;
    color: #202123;
    font-size: 16px !important;
}

.ai-search-box--hero .ai-search-box__submit {
    width: 48px;
    height: 48px;
    margin-left: 8px;
    border-radius: 50%;
    background: linear-gradient(105deg, #f168ad 0%, #ae55e8 48%, #6a5ef0 100%);
    color: #fff;
    font-size: 18px;
}

    .ai-search-box--hero .ai-search-box__submit i {
        color: #fff;
    }

@media only screen and (max-width: 767px) {
    .ai-search-box--hero {
        padding-left: 14px;
    }

        .ai-search-box--hero .ai-search-box__icon svg {
            width: 18px;
            height: 18px;
        }

    .ai-search-box--hero .ai-search-box__input {
        height: 42px !important;
        font-size: 14px !important;
    }

    .ai-search-box--hero .ai-search-box__submit {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }
}

.ai-search-box--hero .ai-search-box__submit:hover {
    transform: scale(1.06);
    box-shadow: 0 0 16px rgba(243,131,188,.45);
}

/* ===== Search result count + active filter chips ===== */
.search-result-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

    .search-result-heading .search-result-count {
        line-height: 1.2;
    }

    .search-result-heading .search-result-for {
        color: #6b7280;
        font-size: 15px;
    }

.active-filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .active-filter-chips .active-filter-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin: 0;
        padding: 5px 6px 5px 14px;
        border: 1px solid #c9dbe9;
        border-radius: 999px;
        background: #eef4f9;
        color: #184b71;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.3;
        list-style: none;
    }

    .active-filter-chips .active-filter-remove {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 22px;
        height: 22px;
        margin: 0;
        padding: 0;
        border: none;
        border-radius: 50%;
        background: #d6e4ef;
        color: #184b71;
        font-size: 16px;
        line-height: 1;
        cursor: pointer;
        transition: background-color 0.15s ease, color 0.15s ease;
    }

        .active-filter-chips .active-filter-remove:hover,
        .active-filter-chips .active-filter-remove:focus {
            background: #184b71;
            color: #fff;
            outline: none;
        }

/* ===== Results page redesign ===== */
#divWebinars .search-result-wrapper {
    gap: 24px;
    align-items: flex-start;
}

/* --- Filter sidebar --- */
#divWebinars .filter-section {
    flex: 0 0 260px;
    padding: 4px 16px 16px;
    border: 1px solid #e5e9f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(16, 24, 40, 0.04);
}

    #divWebinars .filter-section .filter-section-criteria > .row {
        margin-bottom: 12px;
    }

    #divWebinars .filter-section .bg-blue-ciq {
        border-radius: 8px;
        padding: 10px 14px;
    }

        #divWebinars .filter-section .bg-blue-ciq label {
            font-size: 15px !important;
            font-weight: 600;
            cursor: pointer;
        }

    #divWebinars .filter-section .search-result-filter-checkbox {
        padding: 10px 4px 0 6px;
    }

        #divWebinars .filter-section .search-result-filter-checkbox p {
            margin: 0 0 8px;
        }

        #divWebinars .filter-section .search-result-filter-checkbox label span {
            color: #374151 !important;
            font-size: 14px;
            line-height: 1.4;
        }

    #divWebinars .filter-section #reset-search {
        color: #184b71;
    }

        #divWebinars .filter-section #reset-search:hover {
            color: #ee6331;
        }

/* --- Results heading --- */
#divWebinars .courses-by-list {
    flex: 1 1 auto;
    min-width: 0;
}

#divWebinars .search-result-heading .search-result-count {
    color: #184b71;
    font-size: 22px;
}

#divWebinars .search-result-ai-note {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid #eadcfb;
    border-radius: 8px;
    background: #faf6ff;
    color: #5b4a74;
    font-size: 13px;
    line-height: 1.5;
}

/* --- Result cards --- */
.result-card-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.result-card {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid #e5e9f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(16, 24, 40, 0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

    .result-card:hover {
        border-color: #cfd8e3;
        box-shadow: 0 10px 28px rgba(16, 24, 40, 0.1);
        transform: translateY(-2px);
    }

.result-card__media {
    position: relative;
    flex: 0 0 240px;
    min-height: 170px;
    background: linear-gradient(135deg, #e8eff6 0%, #f4f7fb 100%);
}

    .result-card__media img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Shown when the training image is missing */
    .result-card__media--empty:after {
        content: "\f03d";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        color: #b6c4d4;
        font-family: FontAwesome;
        font-size: 40px;
    }

.result-card__type {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.result-card__type--live {
    background: #e7f6ec;
    color: #1e7a46;
}

.result-card__type--recorded {
    background: #e8f0f7;
    color: #184b71;
}

.result-card__type--seminar {
    background: #fff1e3;
    color: #b45309;
}

.result-card__type--free {
    background: #e3f6f3;
    color: #0f766e;
}

.result-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    padding: 18px 20px;
}

.result-card__ai-match {
    align-self: flex-start;
    margin-bottom: 8px;
    padding: 2px 10px;
    border-radius: 999px;
    background: linear-gradient(105deg, #f168ad 0%, #ae55e8 48%, #6a5ef0 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.result-card .result-card__title {
    margin: 0 0 8px !important;
    font-size: 19px !important;
    font-weight: 600;
    line-height: 1.35 !important;
}

    .result-card .result-card__title a {
        color: #1f2937 !important;
    }

        .result-card .result-card__title a:hover {
            color: #184b71 !important;
            text-decoration: underline;
        }

.result-card .result-card__desc {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 14px !important;
    color: #4b5563 !important;
    font-size: 15px;
    line-height: 1.6;
    text-align: left !important;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.result-card .result-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: auto 0 0 !important;
    padding: 0;
    list-style: none;
}

    .result-card .result-card__meta li {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        max-width: 100%;
        margin: 0;
        color: #374151;
        font-size: 14.5px;
        font-weight: 600;
        line-height: 1.4;
        white-space: nowrap;
        list-style: none;
    }

        /* Reset the site-wide i.fa.fa-user rule (float, width 6%, margin-top 10px) */
        .result-card .result-card__meta li i.fa {
            flex: 0 0 auto;
            float: none;
            width: auto;
            margin: 0;
            color: #6b7a8c;
            font-size: 15px;
            line-height: 1;
            vertical-align: middle;
        }

        .result-card .result-card__meta li a {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            min-width: 0;
            max-width: 100%;
            color: #184b71;
            line-height: 1.4;
        }

            /* Long speaker names get "..." instead of wrapping under the icon */
            .result-card .result-card__meta li a span {
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .result-card .result-card__meta li a:hover {
                text-decoration: underline;
            }

.result-card__action {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    padding: 18px 20px 18px 0;
}

.result-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    background: #ee6331;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s ease;
}

    .result-card__cta:hover {
        background: #d9541f;
    }

/* --- Pagination --- */
#divWebinars ul.pagination li.active {
    border-radius: 6px;
    background: #184b71;
}

#divWebinars ul.pagination li a {
    border-radius: 6px;
}

/* --- No results --- */
.search-empty {
    max-width: 560px;
    margin: 30px auto;
    padding: 36px 24px;
    border: 1px solid #e5e9f0;
    border-radius: 12px;
    background: #fff;
    text-align: center;
}

.search-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: #eef3f8;
    color: #184b71;
    font-size: 26px;
}

.search-empty .search-empty__title {
    margin: 0 0 8px !important;
    color: #1f2937;
    font-size: 22px !important;
    font-weight: 600;
}

.search-empty .search-empty__text {
    margin: 0 0 22px !important;
    color: #5b6472 !important;
    font-size: 15px;
    text-align: center !important;
}

.search-empty__feedback {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px dashed #d5dde6;
    color: #4b5563;
    font-size: 14px;
}

.search-empty__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    background: #ee6331;
    color: #fff !important;
    font-weight: 600;
}

    .search-empty__button:hover {
        background: #d9541f;
    }

/* --- Tablet and mobile --- */
@media only screen and (max-width: 991px) {
    .result-card__action {
        display: none;
    }

    .result-card .result-card__desc {
        -webkit-line-clamp: 4;
    }

    /* No "View details" button here, so make the title look like the link it is */
    .result-card .result-card__title a {
        color: #184b71 !important;
        text-decoration: underline !important;
        text-decoration-color: rgba(24, 75, 113, 0.6) !important;
        text-decoration-thickness: 1px;
        text-underline-offset: 4px;
    }

        .result-card .result-card__title a:after {
            content: "\f105";
            display: inline-block;
            margin-left: 6px;
            font-family: FontAwesome;
            font-size: 0.9em;
        }
}

@media only screen and (max-width: 767px) {
    #divWebinars .filter-section {
        flex: none;
        margin-bottom: 16px;
    }

    .result-card {
        flex-direction: column;
    }

    .result-card__media {
        flex: none;
        height: 180px;
        min-height: 0;
    }

    .result-card__body {
        padding: 16px;
    }

    .result-card .result-card__title {
        font-size: 17px !important;
    }

    /* Narrow cards fit fewer characters per line, so allow more lines */
    .result-card .result-card__desc {
        -webkit-line-clamp: 6;
    }
}
