.education {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.education-timeline {
    position: relative;
    margin: 40px 0 70px;
}

.education-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 32px; 
    width: 2px;
    height: 100%;
    background-color: #e0e0e0;
    z-index: 1;
}

.education-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px; /* Reduced from 50px */
}

.education-item:last-child {
    margin-bottom: 0;
}

.education-icon {
    position: relative;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #0066cc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 30px;
    z-index: 2;
}

.education-icon i {
    color: #fff;
    font-size: 24px;
}

.education-content {
    background-color: #fff;
    padding: 20px; /* Reduced from 25px */
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    flex: 1;
    max-width: calc(100% - 80px); /* Limit max width to create smaller windows */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.education-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.education-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}

.education-place {
    font-weight: 500;
    color: #0066cc;
    margin-bottom: 5px;
}

.education-duration {
    color: #666;
    margin-bottom: 5px;
    font-size: 14px;
}

.education-details {
    color: #555;
}

/* Certifications */
.certifications-title {
    margin-top: 70px;
}

.certifications-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 35px 0 60px; /* Slightly reduced margins */
}

.certification-item {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px; /* Reduced from 25px */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.certification-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.certification-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(0, 102, 204, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
}

.certification-icon i {
    color: #0066cc;
    font-size: 20px;
}

.certification-content h3 {
    font-size: 18px;
    margin-bottom: 5px;
    color: #333;
}

.certification-details {
    color: #666;
    font-size: 14px;
}

/* Projects */
.projects-title {
    margin-top: 70px;
}

.projects-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 35px 0; /* Slightly reduced margins */
}

.project-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 20px; /* Reduced from 25px */
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    color: #333;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.project-card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: rgba(0, 102, 204, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    transition: background-color 0.3s ease;
}

.project-card:hover .project-card-icon {
    background-color: rgba(0, 102, 204, 0.2);
}

.project-card-icon i {
    color: #0066cc;
    font-size: 30px;
}

.project-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.view-project {
    margin-top: auto;
    color: #0066cc;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.view-project i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.project-card:hover .view-project i {
    transform: translateX(5px);
}

/* Back arrow button */
.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.back-arrow {
    color: #0066cc;
    font-size: 24px;
    margin-left: 15px;
    margin-right: 20px;
    transition: transform 0.3s ease;
    cursor: pointer;
    width: 32px; /* Aligns with timeline icons */
    text-align: center;
}

.back-arrow:hover {
    transform: translateX(-5px);
}

.section-title {
    flex: 1;
    text-align: center;
    margin-bottom: 0; /* Override default margin */
}

/* Responsive styles */
@media (max-width: 768px) {
    .education-timeline::before {
        left: 32px;
    }

    .education-item {
        flex-direction: column;
    }

    .education-icon {
        margin-bottom: 15px;
    }

    .certifications-container,
    .projects-container {
        grid-template-columns: 1fr;
    }
}