/* Results Page Styles */

/* Recent Results Section */
.recent-results {
    padding: 80px 0;
    background: white;
}

.results-section {
    margin-bottom: 80px;
}

.results-section:last-child {
    margin-bottom: 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
    position: relative;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-radius: 2px;
}

.section-header p {
    font-size: 1.1rem;
    color: #6c757d;
    max-width: 500px;
    margin: 0 auto;
    font-weight: 400;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
    grid-auto-rows: 1fr;
    align-items: stretch;
}

.result-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #f8f9fa;
    width: 100%;
    height: 520px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.result-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px #dc3545;
    border-color: #dc3545;
}

/* Achievement Text Styling */
.achievement-text {
    background: linear-gradient(135deg, #dc3545 0%, #dc3545 100%);
    border-radius: 25px;
    padding: 8px 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 2px solid #fff;
    animation: badgePulse 2s ease-in-out infinite;
    margin: 0 auto 15px auto;
    max-width: fit-content;
    text-align: center;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.2;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.achievement-text::before {
    content: '🏆';
    font-size: 1.2rem;
    line-height: 1;
}

.result-image {
    height: 280px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
    flex-shrink: 0;
    flex-grow: 0;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform 0.3s ease;
}



.result-card:hover .result-image img {
    transform: scale(1.05);
}

.result-content {
    padding: 30px 25px;
    text-align: center;
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 240px;
}

.result-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    height: 20px;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.student-name {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
    line-height: 1.2;
    position: relative;
    padding-bottom: 15px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.student-name::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border-radius: 1px;
}

.score-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    height: 60px;
    flex-shrink: 0;
}

.score-info .score {
    font-size: 3rem;
    font-weight: 900;
    color: #dc3545;
    font-family: 'Inter', sans-serif;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    line-height: 1;
}

.score-info .total {
    font-size: 1.8rem;
    font-weight: 600;
    color: #6c757d;
    font-family: 'Inter', sans-serif;
    line-height: 1;
}

/* Statistics Section */
.statistics-section {
    padding: 80px 0;
    background: #8B1538;
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.stat-item {
    text-align: center;
    padding: 30px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3rem;
    color: #ffc107;
    margin-bottom: 20px;
}

.stat-content h3 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #ffc107;
    font-family: 'Inter', sans-serif;
}

.stat-content p {
    font-size: 1.1rem;
    color: #ffffff;
    margin: 0;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .section-header h2 {
        font-size: 2rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .result-card {
        height: 470px;
    }
    
    .result-image {
        height: 250px;
    }
    
    .result-content {
        min-height: 220px;
    }
    
    .student-name {
        font-size: 1.5rem;
        height: 50px;
    }
    
    .achievement-text {
        font-size: 0.95rem;
        padding: 7px 13px;
        max-width: 95%;
        margin: 0 auto 13px auto;
        line-height: 1.2;
    }
    
    .score-info {
        height: 50px;
    }
    
    .score-info .score {
        font-size: 2.5rem;
    }
    
    .score-info .total {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .stat-content h3 {
        font-size: 2rem;
    }
    
    .results-section {
        margin-bottom: 60px;
    }
}

@media (max-width: 480px) {
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .result-card {
        height: 450px;
    }
    
    .result-image {
        height: 200px;
    }
    
    .result-content {
        min-height: 250px;
        padding: 20px 20px;
    }
    
    .student-name {
        font-size: 1.3rem;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .achievement-text {
        font-size: 0.9rem;
        padding: 6px 12px;
        max-width: 90%;
        margin: 0 auto 15px auto;
        line-height: 1.1;
    }
    
    .score-info {
        height: 45px;
    }
    
    .score-info .score {
        font-size: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .results-section {
        margin-bottom: 50px;
    }
}

/* Animation for achievement cards */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-card {
    animation: fadeInUp 0.8s ease-out;
    animation-delay: calc(var(--animation-order) * 0.1s);
}

.stat-item {
    animation: fadeInUp 0.8s ease-out;
    animation-delay: calc(var(--animation-order) * 0.1s);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c82333;
}
