/* property_cards.css - Global styles for property cards */

:root {
    --card-border-radius: 12px;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --card-hover-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --accent-teal: #00A699;
    --accent-red: #FF385C;
}

.property-card-global {
    background: #ffffff;
    border-radius: var(--card-border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.property-card-global:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover-shadow);
}

/* Image Section */
.card-image-box {
    position: relative;
    height: 240px;
    overflow: hidden;
}

/* Inner Slider Styles */
.card-inner-slider {
    width: 100%;
    height: 100%;
}

.card-inner-slider .swiper-slide {
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-inner-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-style: preserve-3d;
}

.property-card-global:hover .card-inner-slider .swiper-slide img {
    transform: scale(1.12);
}

/* Inner Navigation */
.card-inner-slider .swiper-button-next,
.card-inner-slider .swiper-button-prev {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    color: #333;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-inner-slider .swiper-button-next::after,
.card-inner-slider .swiper-button-prev::after {
    font-size: 0.75rem;
    font-weight: 900;
}

.property-card-global:hover .card-inner-slider .swiper-button-next,
.property-card-global:hover .card-inner-slider .swiper-button-prev {
    opacity: 1;
}

/* Badges */
.status-badge-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 15px;
}

.status-badge {
    background: var(--accent-red);
    color: #fff;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 700;
    position: relative;
    top: 22px;
    /* space for the strings */
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

/* The strings */
.status-badge::before,
.status-badge::after {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    width: 2px;
    height: 22px;
    background: #fff;
    z-index: 10;
}

.status-badge::before {
    transform-origin: top center;
    transform: rotate(35deg);
}

.status-badge::after {
    transform-origin: top center;
    transform: rotate(-35deg);
}

/* The holes (dots) */
.badge-dot {
    position: absolute;
    top: 3px;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    border: 1px solid inherit;
    /* Will be set by parent or specific class */
    z-index: 15;
}

.status-badge.status-rent .badge-dot {
    border-color: #00A699;
}

.status-badge.status-buy .badge-dot {
    border-color: #FFD700;
}

.status-badge.status-sell .badge-dot {
    border-color: #FF385C;
}

.badge-dot.left {
    left: calc(50% - 15px);
}

.badge-dot.right {
    right: calc(50% - 14px);
}

/* Status Specific Badge Colors */
.status-badge.status-rent {
    background: #00A699 !important;
}

.status-badge.status-buy {
    background: #FFD700 !important;
    color: #333 !important;
    /* Darker text for visibility on yellow */
}

.status-badge.status-sell {
    background: #FF385C !important;
}

/* Hover Actions */
.card-image-hover-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 15px;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.property-card-global:hover .card-image-hover-actions {
    opacity: 1;
    visibility: visible;
}

.action-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #fff;
    border: none;
    color: var(--accent-red);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--accent-red);
    color: #fff;
    transform: scale(1.1);
}

.type-badge {
    background: #fff;
    color: #444;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 5;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: 28px;
}

/* Redesigned Content Layout */
.card-body-global {
    padding: 20px;
    flex-grow: 1;
}

.card-title-global {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    line-height: 1.4;
    height: 2.5rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

.card-title-global a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title-global a:hover {
    color: var(--accent-teal);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: center;
}

.price-text {
    font-size: 1.0rem;
    font-weight: 700;
    color: var(--accent-teal);
    margin: 0;
}

.detail-item {
    font-size: 0.85rem;
    color: #555;
    text-align: right;
}

.detail-item .info-label {
    font-weight: 600;
    color: #888;
}

.location-text {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    grid-column: span 1;
}

.location-text i {
    color: var(--accent-red);
    font-size: 0.85rem;
}

.type-text {
    font-size: 0.85rem;
    color: #555;
    text-align: right;
}

/* Footer Section */
/* Footer Section - Redesigned as per reference image */
.card-footer-global {
    padding: 12px 15px;
    background: #006A50;
    /* Primary Green */
    display: flex;
    justify-content: space-around;
    align-items: center;
    border: none;
    margin-top: auto;
}

.feature-item-global {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.feature-item-global i {
    font-size: 1.1rem;
    color: #ffffff;
}

.feature-item-global span {
    font-weight: 600;
    color: #ffffff;
    margin-left: 0;
}

/* Alternating card footer colors using :nth-child on the wrapper div */
.col-lg-3:nth-of-type(4n+1) .card-footer-global,
.col-lg-3:nth-of-type(4n+3) .card-footer-global {
    background: #006A50;
    /* Green */
}

.col-lg-3:nth-of-type(4n+2) .card-footer-global,
.col-lg-3:nth-of-type(4n+4) .card-footer-global {
    background: #E8A317;
    /* Yellow */
}

/* Mobile/Tablet adjustments */
@media (max-width: 991px) {
    .col-md-6:nth-of-type(odd) .card-footer-global {
        background: #006A50;
    }

    .col-md-6:nth-of-type(even) .card-footer-global {
        background: #E8A317;
    }
}

/* For swiper slides */
.swiper-slide:nth-child(odd) .card-footer-global {
    background: #006A50;
}

.swiper-slide:nth-child(even) .card-footer-global {
    background: #E8A317;
}

@media (max-width: 1200px) {
    .card-title-global {
        font-size: 1.05rem;
    }
}

@media (max-width: 768px) {
    .card-image-box {
        height: 220px;
    }

    .card-body-global {
        padding: 10px 15px;
        /* Reduced from 15px */
    }

    .card-footer-global {
        padding: 10px 12px;
        /* Slightly more compact */
    }

    .card-title-global {
        font-size: 0.95rem;
        line-height: 1.35;
        height: auto;
        min-height: 2.6rem;
        max-height: 4rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}

@media (max-width: 480px) {
    .card-title-global {
        font-size: 0.9rem;
        line-height: 1.3;
        min-height: 2.4rem;
        max-height: 3.6rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}