/* ===================== VARIABLES ===================== */
:root {
    --primary-color: #0f172a;
    --primary-light: #1e293b;
    --secondary-color: #3b82f6;
    --secondary-dark: #1e40af;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --text-dark: #0f172a;
    --text-medium: #334155;
    --text-light: #78909c;
    --bg-light: #f8fafc;
    --bg-lighter: #f1f5f9;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --border-light: #cbd5e1;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 10px 28px rgba(15, 23, 42, 0.12);
    --shadow-xl: 0 20px 40px rgba(15, 23, 42, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===================== PRESTASI PAGE ===================== */
.prestasi-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* ===================== HEADER SECTION ===================== */
.prestasi-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #3b82f6 100%);
    color: var(--bg-white);
    padding: 80px 20px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.prestasi-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.prestasi-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 10s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(25px);
    }
}

.prestasi-header .container {
    position: relative;
    z-index: 1;
}

.prestasi-title {
    font-size: 52px;
    font-weight: 800;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    letter-spacing: -1px;
    line-height: 1.2;
}

.prestasi-title i {
    font-size: 56px;
    animation: bounce 2.5s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-12px);
    }
}

.prestasi-subtitle {
    font-size: 18px;
    opacity: 0.9;
    font-weight: 400;
    max-width: 650px;
    margin: 0 auto;
    letter-spacing: 0.3px;
}

/* ===================== FILTER SECTION ===================== */
.prestasi-filter-section {
    padding: 40px 20px;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 80px;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.filter-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 900px;
    margin: 0 auto;
}

.filter-btn {
    padding: 11px 24px;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-medium);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background: rgba(59, 130, 246, 0.02);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--secondary-color);
    color: var(--bg-white);
    border-color: var(--secondary-color);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

/* ===================== CONTENT SECTION - GRID LAYOUT ===================== */
.prestasi-content-section {
    padding: 60px 20px;
}

/* Grid Container - Responsive */
.prestasi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===================== CARD STYLING - COMPACT ===================== */
.prestasi-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    height: 100%;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.prestasi-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-8px);
    border-color: var(--secondary-color);
}

/* ===================== IMAGE WRAPPER - COMPACT ===================== */
.prestasi-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    flex-shrink: 0;
}

.prestasi-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    filter: brightness(1);
}

.prestasi-card:hover .prestasi-image {
    transform: scale(1.1);
    filter: brightness(1.05);
}

.prestasi-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
    color: var(--secondary-color);
    font-size: 60px;
}

.prestasi-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(59, 130, 246, 0.4) 100%);
    display: flex;
    align-items: flex-end;
    padding: 16px;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(2px);
}

.prestasi-card:hover .prestasi-overlay {
    opacity: 1;
}

/* ===================== BADGE ===================== */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.badge-nasional {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
}

.badge-provinsi {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
}

.badge-kabupaten {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.badge-all {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

/* ===================== INFO SECTION - COMPACT ===================== */
.prestasi-info {
    padding: 18px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Badge Container */
.badge-container {
    margin-bottom: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    min-height: 24px;
}

/* Title - Compact */
.prestasi-judul {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
    line-height: 1.3;
    letter-spacing: -0.2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 38px;
}

/* ===================== SISWA DETAILS - COMPACT ===================== */
.prestasi-siswa {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 8px;
    border-left: 3px solid var(--accent-color);
    transition: var(--transition-fast);
}

.prestasi-siswa:hover {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.siswa-avatar {
    font-size: 32px;
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    flex-shrink: 0;
}

.siswa-details {
    flex: 1;
    min-width: 0;
}

.nama-siswa {
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    font-size: 14px;
    letter-spacing: -0.1px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kelas-siswa {
    color: var(--text-light);
    font-size: 12px;
    margin: 2px 0 0 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===================== DESKRIPSI - COMPACT ===================== */
.prestasi-deskripsi {
    color: var(--text-medium);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 36px;
}

/* ===================== FOOTER - COMPACT ===================== */
.prestasi-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    gap: 10px;
    flex-wrap: wrap;
}

.tahun-prestasi {
    color: var(--text-light);
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.btn-detail {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: var(--bg-white);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
    border: none;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.btn-detail:hover {
    transform: translateX(2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-detail:active {
    transform: translateX(1px);
}

/* ===================== EMPTY STATE ===================== */
.empty-state {
    text-align: center;
    padding: 100px 20px;
    color: var(--text-light);
    grid-column: 1 / -1;
}

.empty-icon {
    font-size: 96px;
    color: var(--border-color);
    margin-bottom: 24px;
    opacity: 0.6;
}

.empty-state h3 {
    font-size: 26px;
    color: var(--text-dark);
    margin-bottom: 12px;
    font-weight: 700;
}

.empty-state p {
    font-size: 16px;
    max-width: 450px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ===================== RESPONSIVE GRID ===================== */

/* Tablet - 2 Kolom */
@media (max-width: 1024px) {
    .prestasi-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 20px;
    }

    .prestasi-image-wrapper {
        height: 170px;
    }

    .prestasi-judul {
        font-size: 15px;
        min-height: 36px;
    }
}

/* Tablet - 2 Kolom */
@media (max-width: 768px) {
    .prestasi-title {
        font-size: 36px;
        gap: 12px;
    }

    .prestasi-title i {
        font-size: 40px;
    }

    .prestasi-subtitle {
        font-size: 16px;
    }

    .prestasi-header {
        padding: 50px 20px 40px;
    }

    .prestasi-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 18px;
    }

    .prestasi-image-wrapper {
        height: 160px;
    }

    .prestasi-info {
        padding: 16px 14px;
    }

    .prestasi-judul {
        font-size: 15px;
        margin-bottom: 9px;
        min-height: 36px;
    }

    .filter-group {
        gap: 10px;
    }

    .filter-btn {
        padding: 10px 18px;
        font-size: 13px;
    }

    .prestasi-footer {
        padding-top: 10px;
        gap: 8px;
    }

    .btn-detail {
        padding: 7px 14px;
        font-size: 11px;
    }

    .prestasi-content-section {
        padding: 40px 20px;
    }
}

/* Mobile - 1 Kolom */
@media (max-width: 640px) {
    .prestasi-header {
        padding: 40px 16px 32px;
    }

    .prestasi-title {
        font-size: 28px;
        gap: 10px;
    }

    .prestasi-title i {
        font-size: 32px;
    }

    .prestasi-subtitle {
        font-size: 15px;
    }

    .prestasi-filter-section {
        padding: 24px 16px;
        top: 56px;
    }

    .filter-btn {
        padding: 9px 14px;
        font-size: 12px;
        gap: 5px;
    }

    .prestasi-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .prestasi-image-wrapper {
        height: 200px;
    }

    .prestasi-info {
        padding: 16px 14px;
    }

    .prestasi-judul {
        font-size: 16px;
        margin-bottom: 10px;
        min-height: 40px;
    }

    .prestasi-deskripsi {
        font-size: 13px;
        margin-bottom: 12px;
        min-height: 36px;
    }

    .prestasi-content-section {
        padding: 30px 16px;
    }

    .tahun-prestasi {
        font-size: 11px;
    }

    .btn-detail {
        padding: 8px 14px;
        font-size: 12px;
        flex: 1;
        justify-content: center;
    }

    .prestasi-footer {
        padding-top: 12px;
        gap: 10px;
    }

    .prestasi-siswa {
        gap: 10px;
        padding: 12px;
        margin-bottom: 12px;
    }

    .siswa-avatar {
        font-size: 28px;
    }

    .nama-siswa {
        font-size: 13px;
    }

    .kelas-siswa {
        font-size: 11px;
    }

    .empty-state {
        padding: 60px 16px;
    }

    .empty-icon {
        font-size: 80px;
        margin-bottom: 20px;
    }

    .empty-state h3 {
        font-size: 22px;
    }

    .empty-state p {
        font-size: 14px;
    }
}

/* Extra Small Mobile */
@media (max-width: 380px) {
    .prestasi-title {
        font-size: 24px;
        gap: 8px;
    }

    .prestasi-title i {
        font-size: 28px;
    }

    .prestasi-grid {
        gap: 14px;
    }

    .prestasi-image-wrapper {
        height: 180px;
    }

    .prestasi-judul {
        font-size: 15px;
        -webkit-line-clamp: 1;
    }

    .badge {
        padding: 5px 10px;
        font-size: 9px;
    }

    .btn-detail {
        padding: 7px 12px;
        font-size: 11px;
    }
}