/* Badges Page Specific Styles */

/* Universal Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box; /* Include padding/border in element width calculations */
}

/* Body Base Styles */
body {
    font-family: 'Open Sans', -apple-system, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
}

/* Main Container */
.badges-container {
    max-width: 1200px;
    margin: 0 auto; /* Center horizontally */
    padding: 0 2rem;
}

/* Page Title */
h1 {
    margin-top: 10rem; /* Clear fixed navigation */
    font-size: 3rem;
    font-weight: 800;
    text-align: center;
    
    /* Gradient text effect */
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    margin-bottom: 1rem;
    animation: fadeInDown 0.6s ease;
}

/* Page Subtitle */
.subtitle {
    text-align: center;
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    animation: fadeInUp 0.6s ease;
}

/* Badge Progress Bar Styles */
.badge-progress {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #b1b1b158;
}

.progress-bar-container {
    background: #e0e7ff;
    height: 20px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    border-radius: 10px;
    transition: width 0.5s ease;
    position: relative;
}

/* Animated shimmer effect on progress bar */
.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 600;
}

/* Badge Name and Description */
.badge-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: rgb(1, 9, 67);
    margin-bottom: 0.5rem;
}

.badge-description {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Entrance Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Badge Statistics Section */
.badge-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap; /* Wrap on smaller screens */
    animation: fadeIn 0.8s ease;
}

/* Individual Statistic Box */
.stat-box {
    background: white;
    padding: 2rem 3rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden; /* Contains animated ::before element */
}

/* Shimmer effect on hover */
.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; /* Start off-screen left */
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.5s;
}

.stat-box:hover::before {
    left: 100%; /* Sweep across to off-screen right */
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.15);
}

/* Statistic Number Display */
.stat-number {
    font-size: 3rem;
    font-weight: 700;
    
    /* Gradient text */
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 600;
}

/* Filter Section Container */
.filter-section {
    margin-bottom: 3rem;
}

/* Filter Buttons Container */
.filter-buttons-horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    padding: 1.5rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* Individual Filter Button */
.filter-btn {
    padding: 0.75rem 1.5rem;
    background: #f1f5f9;
    border: 2px solid transparent; /* Reserve space to prevent layout shift */
    border-radius: 25px; /* Pill shape */
    font-size: 0.95rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
}

.filter-btn:hover {
    background: #e0e7ff;
    color: #2563eb;
    transform: translateY(-2px);
}

/* Active/Selected Filter Button */
.filter-btn.active {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

/* Badges Grid Layout - responsive without media queries */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Auto-responsive grid */
    gap: 2rem;
    margin-bottom: 4rem;
    animation: fadeIn 1s ease;
}

/* Badge Card Container */
.badge-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy animation */
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Gradient overlay for hover effect */
.badge-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), rgba(59, 130, 246, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.badge-card:hover::before {
    opacity: 1;
}

.badge-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.2);
}

/* Earned Badge Special Styling */
.badge-card.earned {
    background: linear-gradient(135deg, #fff 0%, #e0e7ff 100%);
}

/* Locked Badge Styling */
.badge-card.locked {
    opacity: 0.7;
}

.badge-card.locked .badge-icon {
    filter: grayscale(1); /* Remove color from locked badges */
}

/* Status Labels */
.earned-badge, .locked-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.earned-badge {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    animation: pulse 2s ease-in-out infinite;
}

/* Pulsing animation for earned badges */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.locked-badge {
    background: #94a3b8;
    color: white;
}

/* Badge Category Label */
.badge-category {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.4rem 1rem;
    border-radius: 15px;
    z-index: 10;
    position: relative;
}

/* Category Colors */
.category-participation {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
}

.category-leadership {
    color: #8b5cf6;
    background: rgba(139, 92, 246, 0.1);
}

.category-impact {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.category-milestone {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

/* Badge Icon Container */
.badge-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    border-radius: 50%; /* Perfect circle */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    z-index: 5;
    transition: transform 0.3s ease;
    padding: 15px;
}

/* Badge Icon Image Styling */
.badge-icon img {
    width: 60%;
    height: 60%;
    object-fit: contain; /* Maintain aspect ratio */
    transition: transform 0.3s ease;
}

/* Badge Icon SVG Styling */
.badge-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}