/**
 * Property Category Cards Styles
 * Modern card-based navigation for property types
 */

/* Category Cards Section */
.property-category-cards {
    padding: 100px 0;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .property-category-cards {
        padding: 60px 0;
    }
}

.property-category-cards::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 10% 20%, rgba(235, 55, 41, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(126, 20, 22, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.category-cards-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    position: relative;
    z-index: 1;
}

@media (max-width: 1200px) {
    .category-cards-container {
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .category-cards-container {
        padding: 0 20px;
    }
}

/* Section Header */
.category-cards-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 15px;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    font-weight: 300;
}

/* Category Cards Wrapper */
.category-cards-wrapper {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* Parent Category Group */
.category-parent-group {
    position: relative;
}

.category-parent-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #eb3729;
    position: relative;
}

.category-parent-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background: #eb3729;
}

.parent-category-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.parent-category-title::before {
    content: '';
    width: 6px;
    height: 30px;
    background: linear-gradient(135deg, #eb3729 0%, #7e1416 100%);
    border-radius: 3px;
}

/* Category Cards Grid */
.category-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Category Card */
.category-card {
    position: relative;
    display: block;
    background: #ffffff;
    border-radius: 16px;
    padding: 25px 20px;
    text-decoration: none;
    color: inherit;
    border: 2px solid #f0f0f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    cursor: pointer;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(235, 55, 41, 0.05) 0%, rgba(126, 20, 22, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.category-card:hover {
    transform: translateY(-10px);
    border-color: #eb3729;
    box-shadow: 0 20px 40px rgba(235, 55, 41, 0.15);
}

.category-card:hover::before {
    opacity: 1;
}

.category-card:hover .card-background {
    opacity: 1;
    transform: scale(1.1);
}

.category-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
    color: #eb3729;
}

.category-card:hover .card-title {
    color: #eb3729;
}

.category-card:hover .card-arrow {
    transform: translateX(8px);
    opacity: 1;
}

.category-card:hover .card-hover-effect {
    opacity: 1;
}

/* Card Background */
.card-background {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(235, 55, 41, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: all 0.6s ease;
    z-index: 0;
}

/* Card Content */
.card-content {
    position: relative;
    z-index: 2;
    text-align: center;
    width: 100%;
}

/* Card Icon */
.card-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    color: #1a1a2e;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

/* Card Title */
.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

/* Card Count */
.card-count {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.category-card:hover .card-count {
    color: #7e1416;
}

/* Card Arrow */
.card-arrow {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(235, 55, 41, 0.1);
    border-radius: 50%;
    color: #eb3729;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.card-arrow svg {
    width: 20px;
    height: 20px;
}

/* Card Hover Effect */
.card-hover-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(235, 55, 41, 0.02) 0%, rgba(126, 20, 22, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    border-radius: 20px;
}

/* Specific Card Styles */
.category-card[data-category="warehouse"]:hover {
    border-color: #eb3729;
}

.category-card[data-category="commercial"]:hover {
    border-color: #eb3729;
}

.category-card[data-category="land"]:hover {
    border-color: #eb3729;
}

.category-card[data-category="rented"]:hover {
    border-color: #eb3729;
}

/* Parent Group Visual Indicators */
.category-parent-group[data-parent="residential"] .category-card {
    border-left: 4px solid transparent;
}

.category-parent-group[data-parent="residential"] .category-card:hover {
    border-left-color: #eb3729;
    background: linear-gradient(90deg, rgba(235, 55, 41, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

.category-parent-group[data-parent="commercial"] .category-card {
    border-right: 4px solid transparent;
}

.category-parent-group[data-parent="commercial"] .category-card:hover {
    border-right-color: #eb3729;
    background: linear-gradient(270deg, rgba(235, 55, 41, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .category-cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .property-category-cards {
        padding: 60px 20px;
    }
    
    .category-cards-header {
        margin-bottom: 40px;
    }
    
    .category-cards-wrapper {
        gap: 40px;
    }
    
    .category-parent-header {
        margin-bottom: 20px;
    }
    
    .parent-category-title {
        font-size: 1.5rem;
    }
    
    .category-cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .category-card {
        min-height: 280px;
        padding: 35px 25px;
    }
    
    .card-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .property-category-cards {
        padding: 40px 15px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 0.95rem;
    }
    
    .category-card {
        min-height: 250px;
        padding: 30px 20px;
        border-radius: 16px;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .card-title {
        font-size: 1.2rem;
    }
}

/* Recommended Properties on Single Property Page */
.single-property-recommended {
    padding: 60px 0 40px;
    background: #f8f9fa;
}

.recommended-properties-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

@media (max-width: 1200px) {
    .recommended-properties-container {
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .recommended-properties-container {
        padding: 0 20px;
    }
}

.single-property-recommended .category-cards-header,
.single-property-recommended .category-cards-wrapper,
.single-property-recommended .category-parent-header {
    display: block;
}

.single-property-recommended .property-card-meta,
.single-property-recommended .property-card-price,
.single-property-recommended .property-card-excerpt,
.single-property-recommended .property-card-overlay { display: none; }

/* Animation on Scroll */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card {
    animation: fadeInUp 0.6s ease-out backwards;
}

.category-card:nth-child(1) {
    animation-delay: 0.1s;
}

.category-card:nth-child(2) {
    animation-delay: 0.2s;
}

.category-card:nth-child(3) {
    animation-delay: 0.3s;
}

.category-card:nth-child(4) {
    animation-delay: 0.4s;
}

