.testimonials {
    background: var(--second-bg-color);
}

.testimonials-box {
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.testimonials .heading {
    margin-bottom: 3rem;
}

.testimonial-item {
    min-height: 400px;
    max-width: 400px;
    background: rgba(139, 92, 246, 0.05);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    margin: 0 1rem;
    padding: 2.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.2rem;
    color: white;
    transition: 0.3s ease-in-out;
    position: relative;
}

/* Project image wrapper with matching blurred background and contained image */
.project-image {
    width: 100%;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    display: block;
    margin-bottom: 1rem;
}

.project-image::before {
    content: "";
    position: absolute;
    inset: 0;
    /* use the same image as the element background and blur it */
    background-image: inherit;
    background-size: cover;
    background-position: center;
    filter: blur(20px) saturate(120%);
    transform: scale(1.08);
    z-index: 0;
}

.project-image img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain; /* ensures the whole image is visible */
    border-radius: 8px;
    border: 4px solid var(--main-color);
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
    background: transparent;
}


.wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.testimonial-item:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--main-color);
    transform: translateY(-8px);
}

/* Small GitHub repo button in the top-right of the card */
.project-link {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 8px;
    background: rgba(0,0,0,0.35);
    color: white;
    border: 1px solid rgba(255,255,255,0.06);
    text-decoration: none;
    transition: 0.2s ease-in-out;
}

.project-link i { font-size: 1.4rem; }

.project-link:hover {
    transform: translateY(-3px);
    background: rgba(139,92,246,0.12);
    color: white;
}

/* Per-project frame colors to better match each image */
.project-coca .project-image img { border-color: #c0392b; box-shadow: 0 8px 24px rgba(192,57,43,0.18); }
.project-coca .project-link { border-color: rgba(192,57,43,0.25); }

.project-flutter .project-image img { border-color: #0288d1; box-shadow: 0 8px 24px rgba(2,136,209,0.16); }
.project-flutter .project-link { border-color: rgba(2,136,209,0.25); }

.project-iot .project-image img { border-color: #2ecc71; box-shadow: 0 8px 24px rgba(46,204,113,0.14); }
.project-iot .project-link { border-color: rgba(46,204,113,0.2); }

.testimonial-item h2 {
    font-size: 2.2rem;
    font-weight: 600;
}

.testimonial-item p {
    font-size: 1.4rem;
    line-height: 1.6;
    opacity: 0.9;
}

#star {
    color: gold;
    font-size: 2rem;
}
