#education {
    padding: 60px 0;
}

/* Using the same .container class as work-experience.css so don't need to define it again */

#education h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #ddd;
}

.education-list {
    display: grid;
    grid-template-columns: 1fr; /* A single column */
    gap: 20px; /* Space between each education card */
}

.education-item {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 10px;
    transition: background 0.3s, transform 0.3s;
}

.education-item:hover {
    background: #222;
    transform: translateY(-5px);
}

.education-item h3 {
    font-size: 1.3rem;
    color: #ff004f;
    margin-bottom: 5px;
}

.education-item h4 {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 600;
    margin-bottom: 15px;
}

.education-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.education-info span {
    font-size: 1rem;
    color: #fff;
    font-style: italic;
}

.education-info p {
    font-size: 1rem;
    color: #aaa;
    margin: 0; /* Removing default paragraph margin */
}

/* --- Expandable Cards --- */

/* Makes the "visible" part of the card clickable  */
.education-visible {
    cursor: pointer;
    position: relative;
    padding-right: 30px;
}

/* Adding a '+' icon to show it's expandable in the top right of the card */
.education-visible::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 0;
    font-size: 2rem;
    color: #aaa;
    transition: transform 0.3s ease-out;
}

/* Initially hidden content */
.education-hidden {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out;
}

.education-hidden .modules-list {
    font-size: 1rem;
    color: #aaa;
    line-height: 1.7;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #222;
}

.education-hidden .modules-list b {
    color: #4743EF;
    font-weight: 600;
}

/* --- The "Active" State (When Clicked) --- */

/* Changing the icon from '+' to '−' */
.education-item.active .education-visible::after {
    content: '−';
    transform: translateY(0px);
}

/* Expanding the hidden content */
.education-item.active .education-hidden {
    max-height: 1100px; 
}

/* The following syntax will only run when screen size is less than 768px (Mobile screens) */
@media (max-width: 768px) {
    #education {
        padding-top: 40px;
    }

    #education h2 {
        font-size: 2.5rem;
        margin-bottom: 30px;
    }

    .education-item h3 {
        font-size: 1.1rem;
        line-height: 1.4;
    }

    .education-item h4 {
        font-size: 1rem;
    }

    .education-visible::after {
        font-size: 1.8rem;
    }

    .education-hidden .modules-list {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}