/**
 * Project Card Styles
 * Enhanced styles for project listing cards matching 3sbrokers design
 */

/* Project Card Container */
.project-item-listing-wrap {
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    height: 100%;
}

.project-item-listing-wrap:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.project-item-wrap-v6 {
    height: 100%;
}

.project-item-wrap-v6 .d-flex {
    flex-direction: column;
    height: 100%;
}

/* Project Image - Compact height for 3 columns */
.project-item-header {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.project-item-header .listing-thumb img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-item-listing-wrap:hover .project-item-header .listing-thumb img {
    transform: scale(1.05);
}

/* Featured Label */
.project-featured-label {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Project Body - Compact padding */
.project-item-listing-wrap .item-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title-label-wrap {
    margin-bottom: 10px;
}

.project-title.item-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
    color: #1a1a2e;
    /* Limit to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-title.item-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.project-title.item-title a:hover {
    color: var(--houzez-primary-color, #00aeff);
}

.project-location.item-address {
    font-size: 12px;
    color: #888;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    /* Limit to 1 line */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-location.item-address i {
    color: var(--houzez-primary-color, #00aeff);
    flex-shrink: 0;
}

/* Project Overview Stats - Compact */
.project-overview-wrap {
    flex-grow: 1;
    margin-bottom: 8px;
}

.project-info-item {
    margin-bottom: 0;
    padding: 4px 0;
    border-bottom: 1px solid #f5f5f5;
}

.project-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.project-info-item dt {
    font-size: 12px;
    font-weight: 400;
    color: #999;
    margin-bottom: 0;
}

.project-info-item dd {
    font-size: 12px;
    text-align: right;
    max-width: 55%;
    color: #333;
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-price {
    color: var(--houzez-primary-color, #00aeff) !important;
    font-weight: 700 !important;
    font-size: 13px !important;
}

/* Developer Badge */
.project-developer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    color: #555;
    margin-bottom: 12px;
}

.project-developer-badge i {
    color: var(--houzez-primary-color, #00aeff);
}

.project-developer-badge a {
    color: inherit;
    font-weight: 500;
}

.project-developer-badge a:hover {
    color: var(--houzez-primary-color, #00aeff);
}

/* Brochure Button */
.project-brochure-wrap {
    margin-top: auto;
}

.project-brochure-btn {
    font-size: 12px;
    padding: 10px 15px;
    border-radius: 6px;
    border: 2px solid var(--houzez-primary-color, #00aeff);
    color: var(--houzez-primary-color, #00aeff);
    background: transparent;
    transition: all 0.2s ease;
    font-weight: 500;
}

.project-brochure-btn:hover {
    background-color: var(--houzez-primary-color, #00aeff);
    border-color: var(--houzez-primary-color, #00aeff);
    color: #fff;
}

/* Contact Buttons */
.project-contact-buttons {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f2f5;
}

.project-whatsapp-btn {
    background-color: #25D366;
    border-color: #25D366;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    color: #fff;
    transition: all 0.2s ease;
}

.project-whatsapp-btn:hover {
    background-color: #128C7E;
    border-color: #128C7E;
    color: #fff;
    transform: scale(1.1);
}

.project-phone-btn {
    background-color: var(--houzez-primary-color, #00aeff);
    border-color: var(--houzez-primary-color, #00aeff);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0;
    color: #fff;
    transition: all 0.2s ease;
}

.project-phone-btn:hover {
    opacity: 0.85;
    transform: scale(1.1);
    color: #fff;
}

/* Grid Layout for Projects */
.projects-grid-view .col,
.developer-projects-grid .col {
    margin-bottom: 0;
}

/* Projects Archive - Force 3 columns full width */
.projects-archive .container {
    max-width: 1320px;
}

.projects-archive .projects-grid-view {
    margin: 0 -12px 30px -12px;
    display: flex !important;
    flex-wrap: wrap !important;
    width: calc(100% + 24px);
}

.projects-archive .projects-grid-view>.col {
    flex: 0 0 33.333333% !important;
    max-width: 33.333333% !important;
    width: 33.333333% !important;
    padding: 0 12px;
    margin-bottom: 24px;
}

@media (max-width: 991px) {
    .projects-archive .projects-grid-view>.col {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
}

@media (max-width: 575px) {
    .projects-archive .projects-grid-view>.col {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Developer Page - Force 3 columns */
.developer-projects-grid {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.developer-projects-grid>.col {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 12px;
    margin-bottom: 24px;
}

@media (max-width: 991px) {
    .developer-projects-grid>.col {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 575px) {
    .developer-projects-grid>.col {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Load More Button */
#load-more-projects {
    padding: 12px 40px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

#load-more-projects:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 174, 255, 0.3);
}

.projects-count-info {
    font-size: 13px;
}

/* Status Labels */
.project-status-label {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.project-status-off-plan {
    background-color: #e3f2fd;
    color: #1976d2;
}

.project-status-ready {
    background-color: #e8f5e9;
    color: #388e3c;
}

.project-status-under-construction {
    background-color: #fff3e0;
    color: #f57c00;
}

/* Hover Effect for Cards */
.card.hover-effect {
    transition: all 0.3s ease;
}

.card.hover-effect:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .project-item-header .listing-thumb img {
        height: 180px;
    }
}

@media (max-width: 767px) {
    .project-item-header .listing-thumb img {
        height: 200px;
    }

    .project-item-listing-wrap .item-body {
        padding: 15px;
    }

    .project-title.item-title {
        font-size: 16px;
    }
}