/* ===== EDUCATION SECTION ===== */
#education {
    padding: 100px 20px;
    text-align: center;
    overflow: hidden;
    position: relative;
}

/* Header */
.education-header {
    margin-bottom: 55px;
}

.education-header h1 {
    font-size: 2.9em;
    margin: 0;
    color: #0b5ed7;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.25);
    transition: all 0.9s ease;
}

/* Grid */
.education-grid {
    width: 100%;
    max-width: 1150px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Card */
.education-card {
    position: relative;
    padding: 32px 24px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(11, 94, 215, 0.08);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.45) inset;
    overflow: hidden;
    transition: transform 0.45s ease, box-shadow 0.45s ease, border-color 0.45s ease;
}

.education-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 55%);
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}

.education-card:hover::before {
    opacity: 1;
}

.education-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow:
        0 28px 55px rgba(11, 94, 215, 0.14),
        0 0 0 1px rgba(56, 189, 248, 0.12) inset;
    border-color: rgba(56, 189, 248, 0.22);
}

/* Year Badge */
.education-card .edu-year {
    position: absolute;
    top: 18px;
    right: 18px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #fff;
    font-size: 0.78em;
    font-weight: 700;
    padding: 7px 14px;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.22);
    letter-spacing: 0.4px;
}

/* Icon */
.education-card img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    margin-bottom: 18px;
    border-radius: 14px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, filter 0.6s ease, opacity 0.6s ease;
}

.education-card:hover img {
    transform: scale(1.08) rotate(4deg);
}

/* Text */
.education-card h2 {
    font-size: 1.22em;
    color: #0f172a;
    margin-bottom: 10px;
    line-height: 1.45;
}

.education-card h3 {
    font-size: 1em;
    color: #0b5ed7;
    margin-bottom: 12px;
    font-weight: 700;
}

.education-card p {
    color: #475569;
    font-size: 0.97em;
    line-height: 1.7;
    margin-bottom: 10px;
}

.education-card p:last-child {
    margin-bottom: 0;
}

/* ===== ANIMATION START STATE ===== */
.education-header h1 {
    opacity: 0;
    transform: translateY(40px);
}

.education-card {
    opacity: 0;
    transform: translateY(50px) scale(0.95);
}

.education-card img {
    filter: blur(8px) brightness(0.7);
    opacity: 0.75;
}

/* ===== ACTIVE ANIMATION STATE ===== */
#education.show .education-header h1 {
    opacity: 1;
    transform: translateY(0);
}

#education.show .education-card {
    opacity: 1;
    transform: translateY(0) scale(1);
}

#education.show .education-card img {
    filter: blur(0) brightness(1);
    opacity: 1;
}

/* Stagger animation */
#education.show .education-card:nth-child(1) {
    transition-delay: 0.15s;
}

#education.show .education-card:nth-child(2) {
    transition-delay: 0.30s;
}

#education.show .education-card:nth-child(3) {
    transition-delay: 0.45s;
}

#education.show .education-card:nth-child(4) {
    transition-delay: 0.60s;
}

#education.show .education-card:nth-child(5) {
    transition-delay: 0.75s;
}

/* Responsive */
@media (max-width: 768px) {
    #education {
        padding: 80px 16px;
    }

    .education-header h1 {
        font-size: 2.1em;
        letter-spacing: 1px;
    }

    .education-grid {
        gap: 20px;
    }

    .education-card {
        padding: 26px 18px;
        text-align: left;
    }

    .education-card .edu-year {
        position: static;
        display: inline-block;
        margin-bottom: 16px;
    }
}
