/* css/pages/results.css — Results / Success Stories gallery */

:root {
    --primary: #8b5cf6;
    --secondary: #0ea5e9;
    --dark-bg: #0a0e17;
    --card-bg: #111827;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --success: #10b981;
    --shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    --radius-lg: 16px;
    --radius-md: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* These four are required by the shared css/cursor.css (custom cursor
       dot/ring colors) — without them the cursor renders fully transparent
       on this page, since cursor.css expects every page to define them. */
    --primary-trust-blue: #2762a1;
    --accent-purple: #b16be0;
    --glow-pink: #ff6bcb;
    --glow-blue: #6dd5ed;
    --clarity-white: #f8f9ff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
}

.results-page {
    padding: 140px 0 80px;
    position: relative;
    z-index: 1;
}

.results-page .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ─── Header ─── */
.results-header {
    text-align: center;
    margin-bottom: 3rem;
}

.results-header .breadcrumb {
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 1280px;
}

.results-header .breadcrumb a {
    color: var(--secondary);
    text-decoration: none;
}

.results-title {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--secondary), var(--primary), #ff6bcb);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shimmerText 4s ease-in-out infinite alternate;
    margin-bottom: 1rem;
}

@keyframes shimmerText {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 100% center;
    }
}

.results-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 640px;
    margin: 0 auto;
}

/* ─── Stats bar (computed live from real entries — see js/pages/results.js) ─── */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stat-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--secondary), var(--primary));
}

.stat-number {
    font-size: 2.4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: block;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ─── Filters ─── */
.results-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.65rem 1.4rem;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover {
    border-color: var(--secondary);
    color: var(--text-primary);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    border-color: transparent;
    color: white;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.3);
}

/* ─── Gallery Grid ─── */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    opacity: 0;
    transform: translateY(40px) scale(0.96);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.result-card.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.result-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(139, 92, 246, 0.35);
    border-color: rgba(139, 92, 246, 0.5);
}

.result-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 5;
    background: rgba(10, 14, 23, 0.85);
    backdrop-filter: blur(6px);
    color: var(--secondary);
    border: 1px solid rgba(14, 165, 233, 0.4);
}

/* ─── Before/After comparison slider ─── */
.comparison-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 4;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
    touch-action: pan-y;
}

.comparison-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.comparison-before {
    z-index: 1;
}

.comparison-after {
    z-index: 2;
    clip-path: inset(0 50% 0 0);
    will-change: clip-path;
}

.comparison-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    background: white;
    z-index: 3;
    transform: translateX(-50%);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

.comparison-handle::after {
    content: '\f337';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: white;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.comparison-label {
    position: absolute;
    bottom: 12px;
    z-index: 4;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.25rem 0.7rem;
    border-radius: 50px;
    background: rgba(10, 14, 23, 0.75);
    backdrop-filter: blur(4px);
    pointer-events: none;
}

.comparison-label.before-label {
    left: 12px;
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.4);
}

.comparison-label.after-label {
    right: 12px;
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.comparison-hint {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 5;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(10, 14, 23, 0.6);
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    opacity: 1;
    transition: opacity 0.4s ease;
}

.result-card:hover .comparison-hint,
.comparison-wrap.dragged .comparison-hint {
    opacity: 0;
}

/* ─── Video card ─── */
.video-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 5 / 4;
    overflow: hidden;
    background: #000;
    cursor: pointer;
}

.video-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.4s ease;
}

.result-card:hover .video-wrap img {
    transform: scale(1.08);
    filter: brightness(0.6);
}

.play-btn-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.4rem;
    z-index: 3;
    animation: playPulse 2.5s ease-in-out infinite;
}

@keyframes playPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4);
    }

    50% {
        box-shadow: 0 0 0 16px rgba(255, 255, 255, 0);
    }
}

/* ─── Card content ─── */
.result-content {
    padding: 1.25rem 1.5rem 1.5rem;
    position: relative;
}

.result-content .course-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.result-content .result-name {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}

.result-content .result-grade {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
}

.result-content .result-caption {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ─── Load more ─── */
.load-more-wrap {
    text-align: center;
    margin-top: 1rem;
}

.load-more-btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
    transition: var(--transition);
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.45);
}

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--text-muted);
}

/* ─── Lightbox ─── */
.results-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(5, 7, 12, 0.92);
    backdrop-filter: blur(6px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.results-lightbox.open {
    display: flex;
    opacity: 1;
}

.results-lightbox video,
.results-lightbox img {
    max-width: min(900px, 92vw);
    max-height: 85vh;
    border-radius: var(--radius-md);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lightbox-close {
    position: absolute;
    top: 24px;
    right: 30px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* ─── CTA ─── */
.results-cta {
    text-align: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    margin-top: 2rem;
}

.results-cta h2 {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.results-cta p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.results-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 2rem;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.3);
    transition: var(--transition);
}

.results-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(14, 165, 233, 0.45);
}

@media (max-width: 768px) {
    .results-page {
        padding: 120px 0 60px;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Homepage results teaser (compact, links to results.html) ─── */
.results-teaser-section {
    padding: 4rem 0;
}

.results-teaser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
    max-width: 1100px;
    margin: 2.5rem auto;
}

.results-teaser-grid .result-card {
    margin: 0;
}

.results-teaser-cta {
    text-align: center;
    margin-top: 1rem;
}
