/**
 * CyberG's 5.0 Hackathon Contestants Style Sheet
 * Inspired by nccemerge.com.ng with modern CyberG's design aesthetics.
 */

/* Contestant Section Banner / Hero */
.contestants-hero-banner {
    position: relative;
    padding: 85px 0 65px;
    background: linear-gradient(135deg, rgba(26, 59, 181, 0.95) 0%, rgba(44, 81, 205, 0.94) 55%, rgba(88, 136, 220, 0.92) 100%), url('../assets/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    border-bottom: 1px solid rgba(223, 230, 251, 0.25);
    overflow: hidden;
}

.contestants-hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(223, 230, 251, 0.2) 0%, rgba(88, 136, 220, 0) 70%);
    filter: blur(80px);
    pointer-events: none;
}

.contestants-hero-banner::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: 15%;
    width: 500px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(44, 81, 205, 0) 70%);
    filter: blur(90px);
    pointer-events: none;
}

.contestants-page-title {
    font-size: 2.85rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-transform: uppercase;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.contestants-page-subtitle {
    color: #DFE6FB;
    font-size: 1.15rem;
    font-weight: 500;
    max-width: 650px;
    margin: 0 auto;
}

/* Search Bar (CyberG portal styled) */
.contestant-search-box {
    position: relative;
    max-width: 680px;
    margin: 32px auto 0;
}

.contestant-search-input {
    width: 100%;
    height: 60px;
    padding: 12px 140px 12px 55px;
    font-size: 1.05rem;
    color: #0f172a;
    background: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: 9999px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.18), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    transition: all 0.25s ease;
}

.contestant-search-input:focus {
    outline: none;
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.4), 0 12px 28px -5px rgba(0, 0, 0, 0.22);
    color: #0f172a;
}

.contestant-search-input::placeholder {
    color: #64748b;
    opacity: 1;
}

.contestant-search-icon {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    pointer-events: none;
}

.contestant-search-btn {
    position: absolute;
    right: 7px;
    top: 7px;
    bottom: 7px;
    padding: 0 28px;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 9999px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
    transition: all 0.2s ease;
}

.contestant-search-btn:hover {
    background: #1d4ed8;
    color: #ffffff;
    transform: scale(1.02);
}

/* Track Filter Pills */
.track-filter-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 25px;
}

.track-filter-pill {
    padding: 7px 18px;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
    text-decoration: none;
    cursor: pointer;
}

.track-filter-pill:hover,
.track-filter-pill.active {
    color: #ffffff;
    background: #5888DC;
    border-color: #5888DC;
    box-shadow: 0 4px 14px rgba(88, 136, 220, 0.35);
}

/* Light / Home Section Search Bar */
.home-contestant-search-box .contestant-search-input {
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.home-contestant-search-box .contestant-search-input:focus {
    background: #ffffff;
    border-color: #5888DC;
    color: #0f172a;
    box-shadow: 0 0 0 4px rgba(88, 136, 220, 0.2);
}

.home-contestant-search-box .contestant-search-input::placeholder {
    color: #94a3b8;
}

.home-contestant-search-box .contestant-search-icon {
    color: #94a3b8;
}

.home-track-pill {
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.home-track-pill:hover,
.home-track-pill.active {
    color: #ffffff;
    background: #5888DC;
    border-color: #5888DC;
}

/* Modern Contestant Card */
.single-contestant-item {
    transition: transform 0.25s ease;
}

.contestant-portfolio-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.04);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.contestant-portfolio-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px -6px rgba(15, 23, 42, 0.12), 0 6px 12px -2px rgba(15, 23, 42, 0.06);
    border-color: #cbd5e1;
}

.contestant-photo-container {
    width: 100%;
    height: 290px;
    background: #f8fafc;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #f1f5f9;
}

@media (max-width: 768px) {
    .contestant-photo-container {
        height: 220px;
    }
}

@media (max-width: 576px) {
    .contestant-photo-container {
        height: 185px;
    }
}

.contestant-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.contestant-portfolio-card:hover .contestant-photo-img {
    transform: scale(1.05);
}

/* Fallback protection: If CyberG logo is shown, never crop it */
.contestant-photo-img[src*="cyber-logo"] {
    object-fit: contain !important;
    padding: 36px !important;
    background: #ffffff !important;
}

.contestant-card-body {
    padding: 16px 14px 18px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: center;
    background: #ffffff;
}

.contestant-red-name {
    margin: 0 0 6px 0;
    line-height: 1.35;
}

.contestant-red-name a {
    color: #0284c7;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    transition: color 0.15s ease;
}

.contestant-portfolio-card:hover .contestant-red-name a {
    color: #0369a1;
}

.contestant-votes-display {
    display: none !important;
}

.contestant-votes-num {
    font-weight: 800;
    color: #0f172a;
    font-size: 1rem;
}

.heart-vote-btn {
    cursor: pointer;
    transition: transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.heart-vote-btn:hover {
    transform: scale(1.25);
}

.heart-vote-btn.voted i,
.heart-vote-btn:active i {
    fill: #e11d48;
}

.contestant-card-hr {
    border: 0;
    border-top: 1px solid #e5e7eb;
    margin: 14px 0 20px;
    opacity: 0.8;
}

/* Vote & Action Buttons */
.btn-contestant-vote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-weight: 700;
    font-size: 0.825rem;
    padding: 6px 14px;
    transition: all 0.2s ease;
    border: none;
}

.btn-contestant-vote.btn-vote {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
}

.btn-contestant-vote.btn-vote:hover {
    background: #ef4444;
    color: #ffffff;
    transform: scale(1.04);
}

.btn-contestant-vote.btn-voted {
    background: #ef4444;
    color: #ffffff;
    cursor: default;
}

/* Contestant Modal */
.contestant-modal-header-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.research-content-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    max-height: 380px;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #334155;
}
