/* Project Card Cutoff Fix
 * Resolves issues with project cards being cut off on the right side in carousel page 2
 * Specifically fixes:
 * 1. Repository status icon (lock/unlock) visibility
 * 2. Project type labels being cut off
 * 3. Image overflow on hover
 */

/* Fix for repository status icon visibility */
.repo-status {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10; /* Increase z-index to ensure visibility */
    overflow: visible !important; /* Ensure no clipping occurs */
    transform-origin: center center;
}

/* Ensure project type labels don't get cut off */
.project-type {
    position: relative;
    z-index: 5;
    white-space: nowrap;
    overflow: visible !important;
    max-width: none !important;
    display: inline-block !important;
}

/* Make sure the project title container doesn't clip its contents */
.project-title {
    overflow: visible !important;
    white-space: nowrap;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    z-index: 5;
}

/* Fix image overflow on hover for all project cards */
.project-screenshot {
    overflow: hidden !important; /* Prevent image overflow */
    position: relative;
}

.project-screenshot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

/* Controlled hover effect that stays within bounds */
.project-card:hover .project-screenshot img {
    transform: scale(1.05);
}

/* Ensure project cards maintain proper boundaries */
.project-card {
    overflow: hidden; /* Prevent any content from spilling out */
    position: relative;
    border-radius: 12px;
}

/* Add padding to project card to ensure content isn't too close to edges */
.project-content {
    padding: 20px;
    position: relative;
    z-index: 4;
    overflow: visible; /* Allow text to be fully visible */
}

/* Ensure project cards maintain proper size in carousel */
.projects-page .project-card {
    width: 100%;
    box-sizing: border-box;
}

/* Specific fixes for page 2 cards */
.projects-page:nth-child(2) .project-card {
    transform-origin: center center; /* Ensure transforms are centered */
    overflow: hidden; /* Prevent overflow on page 2 specifically */
}

/* When cards are hovered, ensure they don't break layout */
.projects-page:nth-child(2) .project-card:hover {
    z-index: 10; /* Ensure hovered cards appear above others but not too high */
}

/* Fix for open button positioning */
.project-screenshot .open-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    transition: all 0.3s ease;
}
