/* Portfolio Styles - For Both Projects and Services */


/* Container */

.wide-fist-project-portfolio-container,
.wide-fist-service-portfolio-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}


/* Category Tabs */

.wide-fist-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 15px;
}

.wide-fist-category-tab {
    padding: 12px 24px;
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Titillium Web", Sans-serif;
}

.wide-fist-category-tab:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #475569;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.wide-fist-category-tab.active {
    background: #35B63A;
    border-color: #35B63A;
    color: #ffffff;
    font-weight: 600;
}

.wide-fist-project-count,
.wide-fist-service-count {
    font-size: 13px;
    opacity: 0.8;
    font-weight: normal;
}

.wide-fist-category-tab.active .wide-fist-project-count,
.wide-fist-category-tab.active .wide-fist-service-count {
    opacity: 0.9;
}


/* Portfolio Wrapper */

.wide-fist-projects-wrapper,
.wide-fist-services-wrapper {
    min-height: 400px;
}


/* Grid */

.wide-fist-projects-grid,
.wide-fist-services-grid {
    display: none;
    animation: fadeIn 0.5s ease;
}

.wide-fist-projects-grid.active,
.wide-fist-services-grid.active {
    display: block;
}


/* Row */

.wide-fist-projects-row,
.wide-fist-services-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}


/* Card */

.wide-fist-project-card,
.wide-fist-service-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* Ensure consistent minimum height */
}

.wide-fist-project-card:hover,
.wide-fist-service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}


/* Image Container - Fixed Height with Consistent Aspect Ratio */

.wide-fist-project-image-container,
.wide-fist-service-image-container {
    position: relative;
    overflow: hidden;
    height: 280px;
    background-color: #f8fafc;
    /* Light background for empty images */
}


/* Ensure all images fill the container completely */

.wide-fist-project-image,
.wide-fist-service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* This ensures images fill the container */
    transition: transform 0.5s ease;
}

.wide-fist-project-card:hover .wide-fist-project-image,
.wide-fist-service-card:hover .wide-fist-service-image {
    transform: scale(1.05);
}


/* Add no-image indicator for containers without images */

.wide-fist-project-image-container:not(:has(.wide-fist-project-image[src])),
.wide-fist-service-image-container:not(:has(.wide-fist-service-image[src])) {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e2e8f0;
}

.wide-fist-project-image-container:not(:has(.wide-fist-project-image[src]))::before,
.wide-fist-service-image-container:not(:has(.wide-fist-service-image[src]))::before {
    content: "📷 No Image";
    font-family: "Titillium Web", Sans-serif;
    font-size: 16px;
    color: #64748b;
    font-weight: 500;
}


/* Style for broken images */

.wide-fist-project-image.error,
.wide-fist-service-image.error {
    display: none;
    /* Hide broken image */
}


/* Category Badge - Top Left Corner */

.wide-fist-project-category-badge,
.wide-fist-service-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #000000;
    padding: 4px 8px;
    border-radius: 4px;
    /* Reduced round corners */
    font-family: "Titillium Web", Sans-serif;
    font-size: 15px;
    font-weight: 500;
    text-transform: uppercase;
    line-height: 24px;
    color: #FFFFFF;
    z-index: 3;
    /* Higher than overlay */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* Make sure image links work even with broken images */

.wide-fist-project-image-link,
.wide-fist-service-image-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}


/* Overlay - Ensure it doesn't interfere */

.wide-fist-project-overlay,
.wide-fist-service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
    /* Below category badge */
}

.wide-fist-project-card:hover .wide-fist-project-overlay,
.wide-fist-service-card:hover .wide-fist-service-overlay {
    opacity: 1;
}

.wide-fist-view-project,
.wide-fist-view-service {
    color: #ffffff;
    background: #35B63A;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    font-family: "Titillium Web", Sans-serif;
}


/* Info Section - Simplified */

.wide-fist-project-info,
.wide-fist-service-info {
    padding: 5px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}


/* Title Only - No Description */

.wide-fist-project-title,
.wide-fist-service-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #35B63A;
    line-height: 1.4;
    font-family: "Titillium Web", Sans-serif;
    width: 100%;
}

.wide-fist-project-title a,
.wide-fist-service-title a {
    color: inherit;
    text-decoration: none !important;
    transition: color 0.2s;
    display: block;
    padding: 10px 0;
}

.wide-fist-project-title a:hover,
.wide-fist-service-title a:hover {
    color: #2a8f2d;
}


/* Remove Description Classes - No Description Needed */

.wide-fist-project-description,
.wide-fist-service-description {
    display: none !important;
}


/* Meta (Projects Only - Date Only) */

.wide-fist-project-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
    color: #94a3b8;
    font-family: "Titillium Web", Sans-serif;
    width: 100%;
    margin-top: 10px;
}

.wide-fist-project-date {
    font-size: 12px;
    font-weight: 500;
}


/* Image Fallback Styles */

.wide-fist-image-fallback {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.wide-fist-image-fallback-content {
    text-align: center;
    padding: 20px;
}

.wide-fist-image-fallback-icon {
    font-size: 48px;
    margin-bottom: 10px;
    display: block;
}

.wide-fist-image-fallback-text {
    font-family: "Titillium Web", Sans-serif;
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
}


/* No Items State */

.wide-fist-no-projects,
.wide-fist-no-services {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
    grid-column: 1 / -1;
}

.wide-fist-no-projects-icon,
.wide-fist-no-services-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.wide-fist-no-projects h3,
.wide-fist-no-services h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #1e293b;
    font-weight: 600;
    font-family: "Titillium Web", Sans-serif;
}

.wide-fist-no-projects p,
.wide-fist-no-services p {
    margin: 0;
    color: #64748b;
    font-size: 16px;
    font-family: "Titillium Web", Sans-serif;
}


/* Loading State */

.wide-fist-loading {
    text-align: center;
    padding: 40px;
}

.wide-fist-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f1f5f9;
    border-top-color: #35B63A;
    border-radius: 50%;
    animation: wideFistSpin 1s linear infinite;
}


/* Animations */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wideFistSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/* Responsive Design */

@media (max-width: 1024px) {
    .wide-fist-projects-row,
    .wide-fist-services-row {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
    .wide-fist-category-tab {
        padding: 10px 18px;
        font-size: 14px;
    }
    .wide-fist-project-image-container,
    .wide-fist-service-image-container {
        height: 250px;
    }
    .wide-fist-project-card,
    .wide-fist-service-card {
        min-height: 380px;
    }
}

@media (max-width: 768px) {
    .wide-fist-project-portfolio-container,
    .wide-fist-service-portfolio-container {
        padding: 15px;
    }
    .wide-fist-projects-row,
    .wide-fist-services-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .wide-fist-category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 10px;
        margin-bottom: 30px;
    }
    .wide-fist-category-tab {
        white-space: nowrap;
        flex-shrink: 0;
    }
    .wide-fist-project-image-container,
    .wide-fist-service-image-container {
        height: 220px;
    }
    .wide-fist-project-card,
    .wide-fist-service-card {
        min-height: 360px;
    }
    .wide-fist-project-category-badge,
    .wide-fist-service-category-badge {
        top: 10px;
        left: 10px;
        font-size: 14px;
        line-height: 20px;
    }
    .wide-fist-info {
        padding: 15px;
        min-height: 100px;
    }
}

@media (max-width: 480px) {
    .wide-fist-category-tab {
        padding: 8px 14px;
        font-size: 13px;
    }
    .wide-fist-project-info,
    .wide-fist-service-info {
        padding: 15px;
        min-height: 90px;
    }
    .wide-fist-project-title,
    .wide-fist-service-title {
        font-size: 16px;
    }
    .wide-fist-project-category-badge,
    .wide-fist-service-category-badge {
        font-size: 12px;
        line-height: 18px;
        padding: 3px 6px;
    }
    .wide-fist-project-image-container,
    .wide-fist-service-image-container {
        height: 200px;
    }
    .wide-fist-project-card,
    .wide-fist-service-card {
        min-height: 340px;
    }
}


/* Fix for grid layout when only one item */

.wide-fist-projects-row:has(.wide-fist-project-card:only-child),
.wide-fist-services-row:has(.wide-fist-service-card:only-child) {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
}


/* Ensure all cards have same height in grid */

.wide-fist-projects-row,
.wide-fist-services-row {
    align-items: stretch;
    /* Make all cards same height */
}