/* 
 * COMPONENT: PROJECT CARD
 * Standard card design used in Projects and Home page.
 */

.project-card,
.blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(139, 109, 49, 0.1);
    /* Subtle gold boundary glow */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    will-change: transform, box-shadow;
    overflow: hidden;
    border-radius: 12px;
    position: relative;
}

.project-card:hover,
.blog-card:hover {
    box-shadow: 0 12px 30px rgba(139, 109, 49, 0.2);
    /* Stronger gold glow on hover */
    border-color: #8b6d31;
    /* Gold border on hover */
    transform: none !important;
    /* Eliminate vertical jump */
}

/* Image Wrapper */
.project-card .card-img-wrapper,
.blog-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
    background-color: #f0f0f0;
    padding-top: 100%;
    /* Square or near-square for projects */
}

/* CLS Prevention & Aspect Ratio Enforcement */
.project-card .card-img-wrapper::before,
.blog-card .card-img-wrapper::before {
    content: "";
    display: block;
    padding-top: 100%;
    /* Default fallback */
}

/* Grid-6 Override (Standard) */
.grid-6 .project-card .card-img-wrapper::before,
.grid-6 .blog-card .card-img-wrapper::before {
    padding-top: 150% !important;
    /* Force 2:3 Aspect Ratio (200x300) */
}

.project-card .card-img-wrapper img,
.project-card .card-img-wrapper picture img,
.blog-card .card-img-wrapper img,
.blog-card .card-img-wrapper picture img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.project-card:hover .card-img-wrapper img,
.blog-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

/* Content Overlay */
.project-card .card-content,
.blog-card .card-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    /* Dark overlay */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center Vertically */
    align-items: center;
    /* Center Horizontally */
    text-align: center;
    opacity: 1;
    transition: background 0.3s ease;
    z-index: 2;
    padding: 20px;
}

.project-card:hover .card-content,
.blog-card:hover .card-content {
    background: rgba(0, 0, 0, 0.6);
    /* Darker on hover */
}

/* Typography */
.project-card .card-title,
.blog-card .card-title {
    color: #fff !important;
    font-size: 1.4rem;
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    font-weight: 600;
    line-height: 1.3;
}

.project-card .card-category,
.blog-card .card-category {
    color: rgba(255, 255, 255, 0.9);
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 600;
}

.project-card .card-location,
.blog-card .card-location {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 500;
}

/* Visibility Animation */
.project-card,
.blog-card {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.project-card.hidden,
.blog-card.hidden {
    display: none;
}

.project-card.visible-item,
.blog-card.visible-item {
    animation: fadeInItem 0.5s forwards;
}

@keyframes fadeInItem {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}