/* ================== Project Card Layout Styles ================== */

/* Card Grid Container - Isotope Friendly */
.projects-card-grid {
    display: block; /* Removed grid for Isotope */
    /* Padding handles the spacing around the grid */
    padding: 20px 0;
    margin: 0 -15px; /* Offset margins */
}

/* Individual Project Card */
.project-card {
    display: flex;
    flex-direction: row;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Layout for Isotope */
    width: calc(33.333% - 30px);
    margin: 15px;
    float: left; /* Fallback */
    height: auto; /* Allow content to dictate height */
}

/* Ensure images load correctly for layout */
.project-card img {
    max-width: 100%;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    z-index: 2; /* Bring to front on hover */
}

/* Card Image Section */
.card-image {
    flex: 0 0 45%;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover .card-image img {
    transform: scale(1.05);
}

/* Card Content Section */
.card-content {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.card-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    line-height: 1.3;
}

.card-content p {
    font-size: 14px;
    color: #5a6c7d;
    margin: 0;
    line-height: 1.6;
    flex-grow: 1;
}

/* Button Styles for Cards */
.card-content .project-btn {
    align-self: flex-start;
    margin-top: 8px;
}

/* Filter Compatibility - Isotope handles display */
.gallery_container .project-card {
    /* display: flex; handled by .project-card rule */
}

/* Tablet Responsive - 2 columns */
@media (max-width: 1024px) {
    .projects-card-grid {
        /* Reset margins/grid logic if needed */
    }
    
    .project-card {
        width: calc(50% - 30px);
    }
    
    .card-content h3 {
        font-size: 18px;
    }
    
    .card-content p {
        font-size: 13px;
    }
}

/* Mobile Responsive - 1 column */
@media (max-width: 767px) {
    .projects-card-grid {
        margin: 0;
    }
    
    .project-card {
        width: 100%;
        margin: 10px 0;
        float: none;
        
        flex-direction: column;
        max-width: 100%;
    }
    
    .card-image {
        flex: 0 0 200px;
        width: 100%;
    }
    
    .card-content {
        padding: 20px;
    }
    
    .card-content h3 {
        font-size: 18px;
    }
    
    .card-content p {
        font-size: 13px;
    }
}

/* Small Mobile - Extra adjustments */
@media (max-width: 480px) {
    .card-image {
        flex: 0 0 180px;
    }
    
    .card-content {
        padding: 15px;
        gap: 10px;
    }
    
    .card-content h3 {
        font-size: 16px;
    }
    
    .card-content p {
        font-size: 12px;
    }
}

/* ================== End Project Card Layout Styles ================== */
