/**
 * Open Source Contributions Section Styles
 * Design harmonized with Projects section
 */

/* Open Source Section */
.opensource.section {
    padding: 60px 0;
}

.opensource-heading {
    text-align: center;
    margin-bottom: 40px;
}

.opensource-heading h3 {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-black-700);
    margin: 0;
}

/* Open Source Items Grid - Matches Projects 3-column layout */
.opensource-items {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.opensource-item {
    width: 100%;
}

/* Card Styling - Matches Projects cards exactly */
.opensource-item-inner {
    background: var(--bg-black-100);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(48, 46, 77, 0.15);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.opensource-item-inner:hover {
    box-shadow: 0 0 20px rgba(48, 46, 77, 0.15);
}

/* Logo Section - Matches Projects image container */
.opensource-logo {
    position: relative;
    overflow: hidden;
    height: 200px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-black-100);
}

.opensource-logo a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opensource-logo img {
    max-width: 60%;
    max-height: 60%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.opensource-item-inner:hover .opensource-logo img {
    transform: scale(1.1);
}

.opensource-logo.text-logo {
    background: var(--bg-black-100);
}

.opensource-logo.text-logo i {
    font-size: 4rem;
    color: var(--skin-color);
    transition: transform 0.3s ease;
}

.opensource-item-inner:hover .opensource-logo.text-logo i {
    transform: scale(1.1);
}

/* Contribution Info - Matches Projects info section */
.opensource-info {
    padding: 25px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    flex: 1;
    text-align: center;
}

.opensource-info h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-black-900);
    margin-bottom: 20px;
    min-height: 46px;
    line-height: 1.3;
}

.contribution-description {
    color: var(--text-black-700);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    min-height: 65px;
}

/* Contribution Meta - Centered */
.contribution-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    justify-content: center;
    min-height: 35px;
}

.pr-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.pr-badge {
    background: var(--bg-black-50);
    color: var(--text-black-700);
}

.status-badge.merged {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.status-badge.closed {
    background: rgba(251, 146, 60, 0.15);
    color: #fb923c;
}

.status-badge i {
    font-size: 0.75rem;
}

/* PR Note - Additional context */
.pr-note {
    color: var(--text-black-600);
    font-size: 0.75rem;
    line-height: 1.5;
    margin-bottom: 0;
    padding: 8px 12px;
    background: var(--bg-black-50);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    min-height: auto;
}

.pr-note i {
    font-size: 0.7rem;
    color: var(--skin-color);
}

/* View PR Button - Matches portfolio links style */
.view-pr-btn {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--bg-black-50);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0 0 0;
    color: var(--text-black-900);
    text-decoration: none;
    font-weight: 500;
    font-size: 20px;
    transition: color 0.3s ease;
}

.view-pr-btn:hover {
    color: var(--skin-color);
}

.view-pr-btn i {
    font-size: 0.85rem;
}

/* Skeleton for Open Source */
.skeleton-card.skeleton-opensource {
    height: 380px;
}

/* Responsive Design - Matches Projects breakpoints */
@media (max-width: 1199px) {
    .opensource-items {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

@media (max-width: 991px) {
    .opensource-items {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .opensource-logo {
        height: 100px;
    }

    .opensource-info h4 {
        font-size: 1.3rem;
    }
}

@media (max-width: 767px) {
    .opensource-items {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .opensource-heading h3 {
        font-size: 1.2rem;
    }

    .opensource-info h4 {
        font-size: 1.2rem;
    }

    .opensource-logo {
        height: 90px;
    }

    .contribution-description {
        font-size: 0.9rem;
    }

    .skeleton-card.skeleton-opensource {
        height: 350px;
    }
}