/* ══════════════════════════════════════════════════════
   Results Section — Department Carousels
   ══════════════════════════════════════════════════════ */

/* ── Section wrapper ── */
.results-section {
    padding: 6rem 0 2rem;
}

.results-section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.results-section-pretitle {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .3125rem .875rem;
    border: 1px solid rgba(105, 54, 245, .25);
    border-radius: 50rem;
    background: rgba(105, 54, 245, .06);
    font-size: .8125rem;
    font-weight: 600;
    color: var(--si-primary, #6936f5);
    margin-bottom: 1rem;
}

.results-section-title {
    max-width: 640px;
    margin: 0 auto;
}

/* ── Department block ── */
.results-department {
    padding: 1.75rem 0;
}

.results-department-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.results-department-title {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0;
}

.results-department-title i {
    color: var(--si-primary, #6936f5);
    font-size: 1.25rem;
}

.results-department-nav {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.results-department-nav .btn {
    width: 2rem;
    height: 2rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--si-border-color, rgba(0,0,0,.12));
    background: transparent;
    color: var(--si-body-color, #333);
    font-size: 1rem;
    transition: all .2s ease;
}

.results-department-nav .btn:hover {
    background: var(--si-primary, #6936f5);
    border-color: var(--si-primary, #6936f5);
    color: #fff;
}

/* ── Result card ── */
.result-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: .75rem;
    border: 1px solid var(--si-border-color, rgba(0,0,0,.08));
    background: var(--si-body-bg, #fff);
    overflow: hidden;
    transition: box-shadow .25s ease, transform .25s ease;
}

.result-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,.10);
    transform: translateY(-2px);
}

/* ── Card image ── */
.result-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--si-secondary, #f5f4f8);
}

.result-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.result-card:hover .result-card-image img {
    transform: scale(1.05);
}

/* ── Video hover preview ── */
.result-card-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
    background: transparent;
}

.result-card-video.is-playing {
    opacity: 1;
}

/* Hide the img zoom when video is playing */
.result-card.has-video:hover .result-card-image img {
    transform: scale(1);
}

/* ── Video loading progress bar (feature-tabs style) ── */
.result-card-video-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, #060649, rgba(99, 102, 241, 0.7));
    z-index: 3;
    opacity: 0;
    border-radius: 0 2px 2px 0;
    transition: none;
}

.result-card-video-progress.is-loading {
    opacity: 1;
    animation: videoProgressLoad 2s linear infinite;
}

.result-card-video-progress.is-loaded {
    opacity: 0;
    width: 100% !important;
    transition: opacity .3s ease .1s;
    animation: none;
}

@keyframes videoProgressLoad {
    0%   { width: 0; }
    100% { width: 100%; }
}

/* ── Card body ── */
.result-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1rem 1.125rem 1.125rem;
    gap: .625rem;
}

/* ── Rating ── */
.result-rating {
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--si-body-color, #333);
}

.result-rating-stars {
    display: inline-flex;
    gap: 1px;
}

.result-rating-stars i {
    color: #f5a623;
    font-size: .875rem;
}

.result-rating-stars .star-empty i,
.result-rating-stars .star-empty {
    color: #d1d5db;
}

.result-rating-value {
    margin-left: .25rem;
    font-weight: 700;
}

/* ── Card text ── */
.result-card-name {
    font-size: .9375rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    color: var(--si-heading-color, #0b0f19);
}

.result-card-desc {
    font-size: .8125rem;
    line-height: 1.55;
    color: var(--si-body-color, #585c68);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Result-type chip ── */
.result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .375rem;
    margin-top: auto;
}

.result-type-chip {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .25rem .75rem;
    border-radius: 50rem;
    background: #fff;
    font-size: .6875rem;
    font-weight: 600;
    color: var(--si-body-color, #585c68);
    white-space: nowrap;
    border: 1px solid var(--si-border-color, rgba(0,0,0,.1));
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.result-type-chip .ti {
    font-size: .8125rem;
    line-height: 1;
}

.result-card:hover .result-type-chip {
    background: rgba(105, 54, 245, .06);
    color: var(--si-primary, #6936f5);
    border-color: rgba(105, 54, 245, .15);
}

/* ── Price (Fiverr-style "From €X") ── */
.result-price {
    margin-top: .75rem;
    padding-top: .625rem;
    border-top: 1px solid var(--si-border-color, rgba(0,0,0,.06));
    font-size: .8125rem;
    font-weight: 700;
    color: var(--si-heading-color, #33354d);
    letter-spacing: .01em;
}

/* ── Connection logos ── */
.result-connections {
    display: flex;
    align-items: center;
    gap: .375rem;
    margin-top: .5rem;
    margin-bottom: .25rem;
}

.result-connection-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    border-radius: 4px;
    opacity: .8;
    transition: opacity .2s ease;
}

.result-card:hover .result-connection-icon {
    opacity: 1;
}

/* ── Swiper overrides for results ── */
.results-swiper .swiper-slide {
    height: auto;
}

.results-swiper .swiper-pagination {
    display: none;
}

/* ── Responsive ── */
@media (max-width: 767.98px) {
    .results-section {
        padding: 2rem 0 1.5rem;
    }

    .results-section-header {
        margin-bottom: 1.5rem;
    }

    .results-department {
        padding: 1.25rem 0;
    }

    .results-department-header {
        margin-bottom: 1rem;
    }

    .results-department-title {
        font-size: 1rem;
    }

    .result-card-body {
        padding: .875rem 1rem 1rem;
    }
}

/* ── Card as link reset ── */
a.result-card {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

a.result-card:hover {
    color: inherit;
}

/* ══════════════════════════════════════════════════════
   Result Detail Page
   ══════════════════════════════════════════════════════ */

.result-detail-section {
    padding: 2rem 0 4rem;
}

/* Back link */
.result-detail-back {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--si-body-color, #585c68);
    text-decoration: none;
    transition: color .2s ease;
    padding: .5rem 0;
}

.result-detail-back:hover {
    color: var(--si-primary, #6936f5);
}

.result-detail-back i {
    font-size: 1rem;
}

/* Department badge */
.result-detail-badge {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    padding: .375rem .875rem;
    border-radius: 50rem;
    background: var(--si-secondary, #f5f4f8);
    font-size: .8125rem;
    font-weight: 600;
    color: var(--si-heading-color, #0b0f19);
    margin-bottom: 1.25rem;
    border: 1px solid var(--si-border-color, rgba(0,0,0,.08));
}

.result-detail-badge i {
    color: var(--si-primary, #6936f5);
    font-size: 1rem;
}

/* Title */
.result-detail-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.02em;
    color: var(--si-heading-color, #0b0f19);
    margin-bottom: 1.25rem;
}

/* Description */
.result-detail-desc {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--si-body-color, #585c68);
    margin-bottom: 2rem;
    max-width: 480px;
}

/* Form card */
.result-detail-form-card {
    background: var(--si-body-bg, #fff);
    border: 1px solid var(--si-border-color, rgba(0,0,0,.08));
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 24px rgba(0,0,0,.04);
}

.result-detail-form-label {
    display: block;
    font-size: .875rem;
    font-weight: 600;
    color: var(--si-heading-color, #0b0f19);
    margin-bottom: .75rem;
}

.result-detail-form {
    display: flex;
    gap: .75rem;
    align-items: stretch;
}

.result-detail-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.result-detail-input-wrapper i {
    position: absolute;
    left: .875rem;
    font-size: 1.125rem;
    color: var(--si-body-color, #999);
    pointer-events: none;
}

.result-detail-input {
    width: 100%;
    padding: .625rem .875rem .625rem 2.5rem;
    border: 1px solid var(--si-border-color, rgba(0,0,0,.12));
    border-radius: .5rem;
    font-size: .9375rem;
    color: var(--si-heading-color, #0b0f19);
    background: var(--si-body-bg, #fff);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.result-detail-input:focus {
    outline: none;
    border-color: var(--si-primary, #6936f5);
    box-shadow: 0 0 0 3px rgba(105, 54, 245, .12);
}

.result-detail-input::placeholder {
    color: #adb0b8;
}

.result-detail-generate-btn {
    white-space: nowrap;
    padding: .625rem 1.5rem;
    font-weight: 600;
    border-radius: .5rem;
    display: inline-flex;
    align-items: center;
    gap: .25rem;
}

.result-detail-form-hint {
    display: flex;
    align-items: center;
    gap: .375rem;
    font-size: .75rem;
    color: var(--si-body-color, #999);
    margin: .75rem 0 0;
}

.result-detail-form-hint i {
    font-size: .875rem;
}

/* Features grid */
.result-detail-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem 2rem;
}

.result-detail-feature {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .875rem;
    line-height: 1.5;
    color: var(--si-heading-color, #0b0f19);
}

.result-detail-feature i {
    color: var(--si-primary, #6936f5);
    font-size: 1.125rem;
    flex-shrink: 0;
    margin-top: .1rem;
}

/* Detail image */
.result-detail-image {
    border-radius: 1rem;
    overflow: hidden;
    background: linear-gradient(135deg, #e8d5f5 0%, #f0c4d8 50%, #d5c4f0 100%);
    padding: 2rem;
}

.result-detail-image img {
    width: 100%;
    height: auto;
    border-radius: .75rem;
    display: block;
    object-fit: cover;
}

/* ── Detail page responsive ── */
@media (max-width: 991.98px) {
    .result-detail-title {
        font-size: 2rem;
    }

    .result-detail-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .result-detail-section {
        padding: 1.5rem 0 3rem;
    }

    .result-detail-title {
        font-size: 1.75rem;
    }

    .result-detail-form {
        flex-direction: column;
    }

    .result-detail-desc {
        max-width: 100%;
    }
}
