/* Container */
.hcm-space-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: inherit;
    padding: 20px 0;
}

/* Header */
.hcm-space-header {
    text-align: center;
    margin-bottom: 30px;
}

.hcm-space-header h2 {
    color: #c8102e; /* Màu đỏ cờ */
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 10px;
}

.hcm-divider {
    width: 80px;
    height: 4px;
    background-color: #ffd700; /* Màu vàng sao */
    margin: 0 auto 15px auto;
}

/* Filters */
.hcm-space-filters {
    text-align: center;
    margin-bottom: 30px;
}

.hcm-filter-btn {
    background: transparent;
    border: 2px solid #c8102e;
    color: #c8102e;
    padding: 8px 20px;
    margin: 0 5px 10px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.hcm-filter-btn:hover,
.hcm-filter-btn.active {
    background: #c8102e;
    color: #fff;
}

/* Grid */
.hcm-space-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.hcm-space-item {
    width: calc(33.333% - 14px); /* 3 items per row */
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: none; /* Ẩn mặc định, JS sẽ hiển thị 'all' */
}

.hcm-space-item.show {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hcm-space-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.hcm-item-image {
    width: 100%;
    padding-top: 66.66%; /* Tỉ lệ 3:2 */
    background-size: cover;
    background-position: center;
    position: relative;
}

.hcm-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.6);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.hcm-space-item:hover .hcm-play-icon {
    background: #c8102e;
}

.hcm-item-info {
    padding: 15px;
    background: #fff;
    text-align: center;
}

.hcm-item-info h3 {
    margin: 0;
    font-size: 16px;
    color: #c8102e;
    line-height: 1.4;
    font-weight: bold;
}

.hcm-no-data {
    text-align: center;
    width: 100%;
    color: #666;
    font-style: italic;
}

/* Lightbox */
.hcm-lightbox {
    display: none; 
    position: fixed; 
    z-index: 999999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
    background-color: rgba(0,0,0,0.9); 
}

.hcm-lightbox-content {
    position: relative;
    margin: 0 auto;
    width: 90%;
    max-width: 1000px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hcm-lightbox-close {
    color: #fff;
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2;
}

.hcm-lightbox-close:hover {
    color: #ffd700;
}

#hcm-lightbox-media {
    width: 100%;
    display: flex;
    justify-content: center;
}

#hcm-lightbox-media img {
    max-width: 100%;
    max-height: 80vh;
    border: 3px solid #ffd700;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

#hcm-lightbox-media iframe {
    width: 100%;
    height: 60vh;
    max-width: 800px;
    border: 3px solid #ffd700;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

#hcm-lightbox-caption {
    margin-top: 15px;
    color: #fff;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .hcm-space-item {
        width: calc(50% - 10px);
    }
}

@media (max-width: 480px) {
    .hcm-space-item {
        width: 100%;
    }
    #hcm-lightbox-media iframe {
        height: 30vh;
    }
}
