/**
 * Project Card Size Fixes
 * Ensures all project cards have uniform sizes
 */

/* Ensure consistent card heights in grid */
.row.g-4 > [class*="col-"] {
    display: flex;
}

.row.g-4 > [class*="col-"] > .card,
.row.g-4 > [class*="col-"] > a > .card {
    height: 100%;
}

/* Project card structure */
.project-card {
    min-height: 420px;
}

/* Fixed image container */
.project-card .card-img-wrapper {
    height: 220px;
    overflow: hidden;
    position: relative;
    background: var(--bg-tertiary);
}

.project-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card body with consistent spacing */
.project-card .card-body {
    min-height: 200px;
}

/* Ensure title takes exactly 2 lines */
.project-card .project-title {
    height: 2.8em;
    line-height: 1.4;
}

/* Ensure description takes exactly 3 lines */
.project-card .project-description {
    height: 4.2em;
    line-height: 1.4;
}

/* Meta section always at bottom */
.project-card .project-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .project-card {
        min-height: 380px;
    }
    
    .project-card .card-img-wrapper {
        height: 180px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .project-card {
        min-height: 400px;
    }
    
    .project-card .card-img-wrapper {
        height: 200px;
    }
}

/* Grid layout fixes */
.projects-grid .row {
    display: flex;
    flex-wrap: wrap;
}

.projects-grid .row > div {
    display: flex;
    margin-bottom: 1.5rem;
}

/* Category card consistency */
.category-card {
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Stat card consistency */
.stat-card {
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Testimonial card consistency */
.testimonial-card {
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

.testimonial-text {
    flex-grow: 1;
}
