/* ============================================================
   Project Showcase Grid
   ============================================================ */

.km-project-grid {
    display: grid;
    /* Mobile First: 1 column */
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 20px 0;
}

/* Tablet: 2 columns */
@media (min-width: 640px) {
    .km-project-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

/* Desktop: 3 columns */
@media (min-width: 1024px) {
    .km-project-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================================
   Project Card Layout
   ============================================================ */
.km-prj-card {
    border: 1px solid #2e438f17;
    padding: 12px;
    border-radius: 6px;
    box-shadow: none;
    /* User explicitly requested: không có */
    transition: box-shadow 0.4s ease, transform 0.4s ease;
    will-change: transform, box-shadow;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}



/* Link Wrapper covering the card */
.km-prj-link {
    text-decoration: none !important;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Image Container */
.km-prj-img {
    position: relative;
    width: 100%;
    /* Aspect ratio 4:5 = 125% padding-top, 3:4 = 133.3% */
    /* Let's go with 3:4 which is very popular for vertical cards -> 133.33% */
    padding-top: 133.33%;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.km-prj-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    border-radius: 6px;
}

/* Hover Effect: Zoom image & Drop shadow card */
.km-prj-card:hover {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
    /* long dropshadow */

}

.km-prj-card:hover .km-prj-img img {
    transform: scale(1.08);
    /* Zoom effect */
}

/* ============================================================
   Badge - Dự án nổi bật
   ============================================================ */
.km-prj-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(289.36deg, #ddb884 1.23%, #c2812a 97.63%);
    color: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 400;
    font-size: 13px;
    z-index: 2;
    /* above the image zoom */
    overflow: hidden;
}

/* Light continuous sweep animation */
.km-prj-sweep {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.4) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: km-sweep 3s infinite linear;
}

@keyframes km-sweep {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

/* ============================================================
   Card Content
   ============================================================ */
.km-prj-content {
    padding: 12px 0 0;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.km-prj-title {
    font-size: 16px;
    font-weight: 600;
    color: #334155;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.km-prj-info {
    font-size: 13px;
    color: #334155;
}

.km-prj-divider {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}

.km-prj-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

.km-prj-location {
    font-size: 13px;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
}

.km-prj-location i {
    color: #64748b;
    /* optional: slightly muted icon color, adjust if needed */
}

.km-prj-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.km-prj-logo img {
    height: 44px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
}

.km-no-projects {
    padding: 24px;
    text-align: center;
    color: #64748b;
}