/* Home Page Filter Plugin Styles */

.hpf-filter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Category Navigation */
.hpf-category-nav {
    margin-bottom: 30px;
    text-align: center;
}

.hpf-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hpf-category-item {
    margin: 0;
}

.hpf-category-link {
    display: inline-block;
    padding: 8px 16px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.hpf-category-link:hover,
.hpf-category-item.active .hpf-category-link {
    background: #007cba;
    color: white;
}

/* Items Grid */
.hpf-items-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

/* Individual Item */
.hpf-item {
    position: relative;
    height: 200px;
    perspective: 1000px;
}

.hpf-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.hpf-item:hover .hpf-item-inner {
    transform: rotateY(180deg);
}

/* Front and Back faces */
.hpf-item-front,
.hpf-item-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    overflow: hidden;
}

.hpf-item-front {
    background: #fff;
    border: 1px solid #ddd;
}

.hpf-item-back {
    background: #007cba;
    color: white;
    transform: rotateY(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Item Image */
.hpf-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* Item Content */
.hpf-item-content {
    text-align: center;
}

.hpf-item-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: bold;
}

.hpf-item-description {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 15px;
}

.hpf-item-button {
    display: inline-block;
    padding: 8px 16px;
    background: white;
    color: #007cba;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.hpf-item-button:hover {
    background: #f0f0f0;
    color: #007cba;
}

/* Loading Indicator */
.hpf-loading {
    text-align: center;
    padding: 40px;
}

.hpf-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hpf-items-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hpf-items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hpf-item {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .hpf-items-grid {
        grid-template-columns: 1fr;
    }
    
    .hpf-item {
        height: 200px;
    }
}

/* Smooth transitions for all interactive elements */
.hpf-item,
.hpf-category-link,
.hpf-item-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effects for better UX */
.hpf-item:hover {
    transform: translateY(-5px);
}

.hpf-category-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hpf-item-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Touch device support */
.hpf-item-inner.touch-hover {
    transform: rotateY(180deg);
}

/* Ensure proper spacing for small screens */
@media (max-width: 480px) {
    .hpf-filter-container {
        padding: 10px;
    }
    
    .hpf-category-nav {
        margin-bottom: 20px;
    }
    
    .hpf-category-link {
        padding: 6px 12px;
        font-size: 14px;
    }
    
    .hpf-items-grid {
        gap: 10px;
    }
}
