/* ===== PROJECTS / STUDENT GALLERY SECTION ===== */

.projects {
    background: #F7FAFC;
    position: relative;
}

/* ── Active filter banner ─────────────────────────────────────────────────── */
.active-filter {
    background: linear-gradient(135deg, #102A43, #1E5AA8);
    color: #fff;
    padding: 14px 24px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
    box-shadow: 0 6px 20px rgba(16,42,67,0.2);
    animation: slideInDown 0.4s ease;
}
@keyframes slideInDown {
    from { opacity:0; transform:translateY(-24px); }
    to   { opacity:1; transform:translateY(0); }
}
.filter-label { font-size: 12px; opacity: 0.8; text-transform: uppercase; letter-spacing: 1.2px; }
.filter-value { font-weight: 700; font-size: 15px; }
.clear-filter {
    background: rgba(255,255,255,0.18);
    border: none; color: #fff;
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 13px;
    transition: background 0.2s;
}
.clear-filter:hover { background: rgba(255,255,255,0.32); }

/* ── Filter buttons ───────────────────────────────────────────────────────── */
.projects-filter {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 48px;
}
.filter-btn {
    padding: 10px 22px;
    background: #fff;
    border: 1.5px solid #E4E4E7;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.22s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #3F3F46;
    display: flex;
    align-items: center;
    gap: 7px;
}
.filter-btn:hover {
    border-color: #1E5AA8;
    color: #1E5AA8;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(30,90,168,0.14);
}
.filter-btn.active {
    background: linear-gradient(135deg, #102A43, #1E5AA8);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 6px 20px rgba(16,42,67,0.28);
}

/* ── Projects grid ────────────────────────────────────────────────────────── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 8px;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
.project-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(16,42,67,0.07);
    border: 1px solid #E4E4E7;
    display: flex;
    flex-direction: column;
    transition: transform 0.26s ease, box-shadow 0.26s ease, border-color 0.26s ease;
    cursor: pointer;
    opacity: 0;
    transform: translateY(28px);
    animation: cardAppear 0.55s ease forwards;
    position: relative;
}
.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #102A43, #1E5AA8, #C8962A);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.26s ease;
    z-index: 3;
}
.project-card:hover { transform: translateY(-8px); box-shadow: 0 20px 48px rgba(16,42,67,0.14); border-color: rgba(30,90,168,0.2); }
.project-card:hover::before { transform: scaleX(1); }
.project-card.hidden { display: none; }

@keyframes cardAppear {
    to { opacity: 1; transform: translateY(0); }
}

/* ── Gallery image area ───────────────────────────────────────────────────── */
.pg-image {
    position: relative;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

/* When a real photo is used */
.pg-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}
.project-card:hover .pg-photo { transform: scale(1.06); }

/* Gradient overlay (darkens bottom for readability) */
.pg-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(0,0,0,0.05) 0%,
        rgba(0,0,0,0.0)  40%,
        rgba(0,0,0,0.38) 100%);
    pointer-events: none;
    z-index: 1;
}

/* Icon container (when no real image) */
.pg-icon-wrap {
    width: 88px;
    height: 88px;
    background: rgba(255,255,255,0.14);
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 24px;
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}
.project-card:hover .pg-icon-wrap { transform: scale(1.1) translateY(-4px); }

/* Badges overlaid on image */
.pg-badges {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 2;
}
.pg-cat-badge {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 50px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
}
.pg-cat-engineering { background: rgba(22,163,74,0.55); }
.pg-cat-robotics    { background: rgba(30,90,168,0.55); }
.pg-cat-coding      { background: rgba(124,58,237,0.55); }
.pg-cat-science     { background: rgba(8,145,178,0.55); }
.pg-cat-art         { background: rgba(219,39,119,0.55); }
.pg-cat-mathematics { background: rgba(16,42,67,0.55); }

.pg-award-badge {
    width: 32px;
    height: 32px;
    background: rgba(200,150,42,0.85);
    border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    backdrop-filter: blur(6px);
}

/* ── Card body ────────────────────────────────────────────────────────────── */
.pg-body {
    padding: 20px 22px 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pg-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #102A43;
    margin: 0 0 9px;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

.pg-desc {
    font-size: 13.5px;
    color: #71717A;
    line-height: 1.7;
    flex: 1;
    margin-bottom: 14px;
}

.pg-award {
    font-size: 12px;
    font-weight: 700;
    color: #C8962A;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
    padding: 7px 12px;
    background: rgba(200,150,42,0.08);
    border-radius: 8px;
    border-left: 3px solid #C8962A;
}
.pg-award i { font-size: 11px; }

/* ── Card footer: student ─────────────────────────────────────────────────── */
.pg-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid #F4F4F5;
    margin-top: auto;
}

.pg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #102A43, #1E5AA8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    flex-shrink: 0;
}

.pg-student-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.pg-student-name {
    font-size: 13px;
    font-weight: 700;
    color: #102A43;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pg-student-age {
    font-size: 11.5px;
    color: #71717A;
}

/* ── No results ───────────────────────────────────────────────────────────── */
.no-results {
    text-align: center;
    padding: 64px 20px;
    background: #fff;
    border-radius: 20px;
    border: 1px solid #E4E4E7;
    margin-top: 20px;
}
.no-results i { font-size: 52px; color: #D4D4D8; margin-bottom: 16px; display: block; }
.no-results h3 { font-size: 22px; color: #102A43; margin-bottom: 8px; }
.no-results p  { color: #71717A; font-size: 15px; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .projects-grid { grid-template-columns: 1fr; gap: 20px; }
    .pg-image { height: 190px; }
    .filter-btn { padding: 9px 18px; font-size: 12px; }
}
@media (max-width: 480px) {
    .projects-filter { flex-direction: column; align-items: stretch; }
    .filter-btn { justify-content: center; }
    .pg-body { padding: 16px 18px 14px; }
}
