/**
 * Professional Project Cards - CSS
 * Houzez Theme Custom Styles
 * 
 * These styles provide a cohesive, modern look for project cards
 * that matches the overall theme while adding professional polish.
 */

/* ============================================
   CSS Variables for Easy Customization
   ============================================ */
:root {
    --project-card-radius: 12px;
    --project-card-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    --project-card-shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.12);
    --project-card-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --project-text-primary: #1a1a2e;
    --project-text-secondary: #666;
    --project-text-muted: #999;
    --project-border-light: #f0f0f0;
}

/* ============================================
   Base Card Styles
   ============================================ */
.project-card {
    background: #fff;
    border-radius: var(--project-card-radius);
    overflow: hidden;
    box-shadow: var(--project-card-shadow);
    transition: var(--project-card-transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    box-shadow: var(--project-card-shadow-hover);
    transform: translateY(-4px);
}

/* ============================================
   Image Section
   ============================================ */
.project-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.project-card__image-link {
    display: block;
    height: 100%;
}

.project-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-card__img {
    transform: scale(1.08);
}

/* ============================================
   Status Ribbon
   ============================================ */
.project-card__status {
    position: absolute;
    top: 16px;
    left: 0;
    padding: 6px 16px 6px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    border-radius: 0 4px 4px 0;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
}

.project-card__status--primary {
    background: linear-gradient(135deg, #0066cc, #004999);
}

.project-card__status--success {
    background: linear-gradient(135deg, #28a745, #1e7e34);
}

.project-card__status--danger {
    background: linear-gradient(135deg, #dc3545, #bd2130);
}

.project-card__status--secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
}

.project-card__status--warning {
    background: linear-gradient(135deg, #ffc107, #d39e00);
    color: #1a1a2e;
}

.project-card__status--info {
    background: linear-gradient(135deg, #17a2b8, #117a8b);
}

/* ============================================
   Featured Badge
   ============================================ */
.project-card__featured {
    position: absolute;
    top: 16px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: linear-gradient(135deg, #ffc107, #e0a800);
    border-radius: 4px;
    color: #1a1a2e;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.4);
}

.project-card__featured i {
    font-size: 12px;
}


@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ============================================
   Quick Actions
   ============================================ */
.project-card__actions {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.3s ease;
}

.project-card:hover .project-card__actions {
    opacity: 1;
    transform: translateY(0);
}

.project-card__action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--project-text-secondary);
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.project-card__action:hover {
    background: var(--houzez-primary-color, #0066cc);
    color: #fff;
    transform: scale(1.1);
}

.project-card__action.active {
    color: #e63946;
}

.project-card__action.active:hover {
    background: #e63946;
    color: #fff;
}

/* ============================================
   Category Tag
   ============================================ */
.project-card__category {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
}

/* ============================================
   Content Section
   ============================================ */
.project-card__content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
    position: relative;
}

/* ============================================
   Developer Badge
   ============================================ */
.project-card__developer {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--project-text-muted);
    margin-bottom: 8px;
}

.project-card__developer i {
    color: var(--houzez-primary-color, #0066cc);
    font-size: 14px;
}

.project-card__developer a {
    color: var(--project-text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.project-card__developer a:hover {
    color: var(--houzez-primary-color, #0066cc);
}

/* ============================================
   Title
   ============================================ */
.project-card__title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-card__title a {
    color: var(--project-text-primary);
    text-decoration: none;
    transition: color 0.2s;
}

.project-card__title a:hover {
    color: var(--houzez-primary-color, #0066cc);
}

/* ============================================
   Location
   ============================================ */
.project-card__location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--project-text-secondary);
    margin-bottom: 16px;
}

.project-card__location i {
    color: var(--project-text-muted);
    font-size: 14px;
    flex-shrink: 0;
}

.project-card__location span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   Stats Grid
   ============================================ */
.project-card__stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 16px 0;
    border-top: 1px solid var(--project-border-light);
    border-bottom: 1px solid var(--project-border-light);
    margin-bottom: 16px;
}

.project-card__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.project-card__stat i {
    font-size: 18px;
    color: var(--houzez-primary-color, #0066cc);
    margin-bottom: 4px;
}

.project-card__stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--project-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.project-card__stat-label {
    font-size: 10px;
    color: var(--project-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============================================
   Footer
   ============================================ */
.project-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
}

/* ============================================
   Price
   ============================================ */
.project-card__price {
    display: flex;
    flex-direction: column;
}

.project-card__price-label {
    font-size: 11px;
    color: var(--project-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.project-card__price-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--houzez-primary-color, #0066cc);
}

/* ============================================
   Button
   ============================================ */
.project-card__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: var(--houzez-primary-color, #0066cc);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.project-card__btn:hover {
    background: var(--houzez-primary-hover-color, #0055aa);
    color: #fff;
    transform: translateX(2px);
}

.project-card__btn i {
    font-size: 12px;
    transition: transform 0.2s;
}

.project-card__btn:hover i {
    transform: translateX(3px);
}

/* ============================================
   Grid Layouts
   ============================================ */
.projects-grid {
    display: grid;
    gap: 24px;
}

.projects-grid--2col {
    grid-template-columns: repeat(2, 1fr);
}

.projects-grid--3col {
    grid-template-columns: repeat(3, 1fr);
}

.projects-grid--4col {
    grid-template-columns: repeat(4, 1fr);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 1200px) {
    .projects-grid--4col {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {

    .projects-grid--4col,
    .projects-grid--3col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .project-card__stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .project-card__footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .project-card__btn {
        justify-content: center;
    }

    .project-card__actions {
        opacity: 1;
        transform: translateY(0);
    }

    .projects-grid--4col,
    .projects-grid--3col,
    .projects-grid--2col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .project-card__content {
        padding: 16px;
    }

    .project-card__title {
        font-size: 15px;
    }

    .project-card__price-value {
        font-size: 16px;
    }
}

/* ============================================
   Action Buttons Row (Property Card Style)
   ============================================ */
.project-card__buttons {
    display: flex !important;
    flex-wrap: nowrap !important;
    /* Force single row */
    flex-direction: row;
    align-items: center;
    gap: 6px;
    /* Use smaller gap */
    padding: 16px 0 0 0;
    border-top: 1px solid var(--project-border-light);
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.project-card__buttons .btn-item {
    position: static !important;
    min-width: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 4px;
    /* Smaller inner gap */
    padding: 10px 8px;
    /* Reduce horizontal padding */
    font-size: 13px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

/* View Details takes available space but can shrink */
.project-card__buttons .btn-details {
    flex: 1 1 auto;
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card__buttons .btn-details:hover {
    background: #0d0d15;
    color: #fff;
}

/* Icon-only buttons */
.project-card__buttons .btn-icon-only {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

/* Call Button */
.project-card__buttons .btn-call {
    background: transparent;
    border-color: var(--houzez-primary-color, #0066cc);
    color: var(--houzez-primary-color, #0066cc);
}

.project-card__buttons .btn-call:hover {
    background: var(--houzez-primary-color, #0066cc);
    color: #fff;
}

/* WhatsApp Button */
.project-card__buttons .btn-whatsapp {
    background: transparent;
    border-color: #25d366;
    color: #25d366;
}

.project-card__buttons .btn-whatsapp:hover {
    background: #25d366;
    color: #fff;
}

/* Email Button */
.project-card__buttons .btn-email {
    background: transparent;
    border-color: var(--project-text-secondary);
    color: var(--project-text-secondary);
}

.project-card__buttons .btn-email:hover {
    background: var(--project-text-secondary);
    color: #fff;
}

/* Button Icon only variant (for compact layouts) */
.project-card__buttons .btn-icon-only {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

.project-card__buttons .btn-icon-only i {
    font-size: 16px;
}

/* Mobile: Stack buttons if too narrow */
@media (max-width: 400px) {
    .project-card__buttons {
        flex-wrap: wrap;
    }

    .project-card__buttons .btn-item {
        flex: 1 1 calc(50% - 4px);
        min-width: 0;
    }

    .project-card__buttons .btn-item span {
        display: none;
    }
}

/* ============================================
   Card Variant: Minimal (V2)
   ============================================ */
.project-card--minimal {
    /* Minimal variant uses base styles with cleaner spacing */
    border-radius: 10px;
}

.project-card__meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--project-text-secondary);
    margin-bottom: 12px;
}

.project-card__meta i {
    color: var(--project-text-muted);
}

/* ============================================
   Card Variant: Overlay (V3)
   ============================================ */
.project-card--overlay {
    min-height: 320px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.project-card--overlay:hover {
    transform: scale(1.02);
}

.project-card__overlay-link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.project-card__labels-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    z-index: 2;
}

.project-card__overlay-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    z-index: 2;
}

.project-card__title--white,
.project-card__title--white a {
    color: #fff;
}

.project-card__location--light {
    color: rgba(255, 255, 255, 0.7);
}

.project-card__location--light i {
    color: rgba(255, 255, 255, 0.5);
}

.project-card__overlay-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

.project-card__overlay-stats i {
    margin-right: 4px;
}

.project-card__overlay-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-card__price--white {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.project-card__overlay-actions {
    display: flex;
    gap: 8px;
    pointer-events: auto;
}

.project-card__action-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    z-index: 3;
}

.project-card__action-btn--whatsapp {
    background: #25d366;
}

.project-card__action-btn--whatsapp:hover {
    background: #1da851;
    transform: scale(1.1);
}

.project-card__action-btn--call {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
}

.project-card__action-btn--call:hover {
    background: var(--houzez-primary-color, #0066cc);
    transform: scale(1.1);
}

/* ============================================
   Card Variant: Horizontal (V4)
   ============================================ */
.project-card--horizontal {
    flex-direction: row;
}

.project-card--horizontal:hover {
    transform: translateX(4px);
}

.project-card__image-col {
    flex: 0 0 35%;
    max-width: 35%;
    position: relative;
    overflow: hidden;
}

.project-card__image-col .project-card__img {
    width: 100%;
    height: 100%;
    min-height: 200px;
    object-fit: cover;
}

.project-card__content-col {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.project-card__labels {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1;
}

.project-card__stats--inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.project-card__stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 12px;
    color: var(--project-text-secondary);
}

.project-card__stat-badge i {
    font-size: 14px;
    color: var(--project-text-muted);
}

.project-card__buttons--compact {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.btn-details {
    background: transparent;
    border-color: var(--project-text-secondary);
    color: var(--project-text-secondary);
}

.btn-details:hover {
    background: var(--project-text-secondary);
    color: #fff;
}

.btn-details--dark {
    background: #1a1a2e;
    border-color: #1a1a2e;
    color: #fff;
    flex: 1;
    border-radius: 25px;
    padding: 10px 20px;
}

.btn-details--dark:hover {
    background: #0d0d15;
    border-color: #0d0d15;
}

/* Responsive: Stack horizontal card on mobile */
@media (max-width: 768px) {
    .project-card--horizontal {
        flex-direction: column;
    }

    .project-card__image-col {
        flex: 0 0 auto;
        max-width: 100%;
    }

    .project-card__image-col .project-card__img {
        min-height: 180px;
    }
}

/* ============================================
   Card Variant: Compact (V5)
   ============================================ */
.project-card--compact {
    flex-direction: row;
    padding: 12px;
    gap: 12px;
    align-items: center;
}

.project-card--compact:hover {
    transform: translateY(-2px);
}

.project-card__thumb {
    flex: 0 0 90px;
    width: 90px;
    height: 70px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.project-card__thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card__placeholder {
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--project-text-muted);
}

.project-card__status--pill {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 2px 8px;
    font-size: 9px;
    border-radius: 10px;
}

.project-card__compact-content {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.project-card__compact-main {
    min-width: 0;
}

.project-card__title--compact {
    font-size: 14px;
    margin-bottom: 4px;
}

.project-card__title--compact a {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-card__meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--project-text-muted);
}

.project-card__meta-item {
    display: flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

.project-card__meta-item i {
    font-size: 12px;
}

.project-card__price--compact {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.project-card__compact-actions {
    display: flex;
    gap: 4px;
}

.project-card__compact-btn {
    padding: 4px 10px;
    font-size: 11px;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent;
    border: 1px solid var(--project-border-light);
    color: var(--project-text-secondary);
}

.project-card__compact-btn:hover {
    background: #f5f5f5;
}

.project-card__compact-btn--whatsapp {
    color: #25d366;
    border-color: #25d366;
}

.project-card__compact-btn--whatsapp:hover {
    background: #25d366;
    color: #fff;
}

.project-card__compact-btn--call {
    color: var(--houzez-primary-color, #0066cc);
    border-color: var(--houzez-primary-color, #0066cc);
}

.project-card__compact-btn--call:hover {
    background: var(--houzez-primary-color, #0066cc);
    color: #fff;
}

/* ============================================
   Card Variant: Detailed (V6)
   ============================================ */
.project-card--detailed .project-card__image {
    position: relative;
}

.project-card__image-count {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    z-index: 1;
}

.project-card__developer-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.project-card__developer-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-card__developer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.project-card__developer-name {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.project-card__date {
    font-size: 12px;
    color: var(--project-text-muted);
    margin-bottom: 12px;
}

.project-card__footer-actions {
    display: flex;
    gap: 8px;
}

.project-card__action {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.project-card__action--whatsapp {
    background: #25d366;
    color: #fff;
}

.project-card__action--whatsapp:hover {
    background: #1da851;
    transform: scale(1.1);
}

.project-card__action--call {
    background: var(--houzez-primary-color, #0066cc);
    color: #fff;
}

.project-card__action--call:hover {
    background: var(--houzez-primary-hover-color, #0055aa);
    transform: scale(1.1);
}

.project-card__action.add-favorite-js {
    background: transparent;
    border: 1px solid #ddd;
    color: var(--project-text-muted);
}

.project-card__action.add-favorite-js:hover,
.project-card__action.add-favorite-js.active {
    border-color: #e63946;
    color: #e63946;
}

/* ============================================
   Card Variant: Modern Rounded (V7)
   ============================================ */
.project-card--modern {
    border-radius: 20px;
}

.project-card--modern:hover {
    transform: translateY(-5px);
}

.project-card__image--rounded {
    border-radius: 0;
}

.project-card__header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.project-card__title-wrap {
    min-width: 0;
    flex: 1;
}

.project-card__price--large {
    font-size: 18px;
    font-weight: 700;
    color: var(--project-text-primary);
    white-space: nowrap;
}

.project-card__features {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--project-border-light);
    margin-bottom: 16px;
}

.project-card__feature {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--project-text-secondary);
}

.project-card__feature i {
    color: var(--project-text-muted);
    font-size: 16px;
}

.btn-favorite {
    background: transparent;
    border-color: #ddd;
    color: var(--project-text-muted);
}

.btn-favorite:hover,
.btn-favorite.active {
    border-color: #e63946;
    color: #e63946;
}

/* ============================================
   RTL Support
   ============================================ */
[dir="rtl"] .project-card__status {
    left: auto;
    right: 0;
    border-radius: 4px 0 0 4px;
}

[dir="rtl"] .project-card--horizontal:hover {
    transform: translateX(-4px);
}

[dir="rtl"] .project-card__labels {
    left: auto;
    right: 12px;
}

/* ============================================
   Projects Listing Page Grid Fixes
   ============================================ */

/* Ensure the projects grid uses full width */
.projects-listing-wrap {
    width: 100%;
}

.projects-listing-wrap .container,
.projects-listing-wrap .container-fluid {
    max-width: 80% !important;
    width: 80% !important;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* Ensure Bootstrap row uses proper width */
.projects-grid-view.row {
    margin-left: -12px;
    margin-right: -12px;
    width: calc(100% + 24px);
    display: flex;
    flex-wrap: wrap;
}

/* Ensure project card column items fill their space */
.projects-grid-view .project-card-item {
    padding-left: 12px;
    padding-right: 12px;
    padding-top: 12px;
    padding-bottom: 12px;
    margin-bottom: 0;
    display: flex;
}

/* Remove bottom padding from last row items */
.projects-grid-view {
    margin-bottom: -12px;
    /* Offset the bottom padding of last row */
}

/* Cards should fill column width */
.projects-grid-view .project-card-item .project-card {
    width: 100%;
    flex: 1;
}

/* Remove any max-width restrictions on the cards within grid */
.projects-grid-view .project-card-item article.project-card {
    max-width: none;
    width: 100%;
}

/* Fix Bootstrap column width issues */
.projects-grid-view .col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.projects-grid-view .col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.projects-grid-view .col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.projects-grid-view .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

/* Responsive adjustments */
@media (min-width: 992px) {
    .projects-grid-view .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .projects-grid-view .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .projects-grid-view .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 991.98px) and (min-width: 768px) {
    .projects-grid-view .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 767.98px) {
    .projects-grid-view .project-card-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Ensure container fits content width properly */
.projects-listing-wrap .bt-content-wrap {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    /* FIX: Override any 70% width restriction */
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* FIX: Ensure cards stay left-aligned in partial rows */
.projects-grid-view .project-card-item {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
    /* Remove 400px max-width restriction */
}

/* FIX: Remove max-width restriction on container */
.projects-listing-wrap .container-fluid {
    max-width: 100% !important;
}