.ref-videos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
}

.ref-video-item {
    flex: 1 1 calc(33% - 20px);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ref-video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.ref-video-item h4 {
    font-size: 18px;
    margin: 10px;
    color: #333;
    text-align: center;
}

.ref-video-item img {
    width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid #eee;
}

.ref-video-item iframe,
.ref-video-item video {
    width: 100%;
    height: 200px;
    border: none;
    display: block;
}

.ref-video-item p {
    font-size: 14px;
    color: #555;
    padding: 10px;
    text-align: center;
}
/* 🎬 الميتابوكس */
.ref-video-metabox label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}
.ref-video-metabox .description {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* نسبة 16:9 */
    margin-bottom: 15px;
}
.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 5px;
}

/* 📄 صفحة الفيديو المفرد */
.ref-video-single-page {
    margin-bottom: 30px;
}
.video-container-main {
    margin-bottom: 20px;
}
.ref-video-single-page .video-container {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

/* 📁 شبكات التصنيفات */
.ref-videos-category-grid {
    display: grid;
    gap: 25px;
}
.ref-videos-category-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.ref-videos-category-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.ref-videos-category-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }
.ref-videos-category-grid.columns-5 { grid-template-columns: repeat(5, 1fr); }
.ref-videos-category-grid.columns-6 { grid-template-columns: repeat(6, 1fr); }

.video-category-item-inner:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.video-category-item-inner:hover .video-overlay { opacity: 1; }
.video-category-item-inner:hover .play-icon { transform: scale(1); }
.video-category-item-inner:hover .video-image { transform: scale(1.05); }

.watch-button:hover { background: #b71c1c !important; }
.video-title a:hover { color: #d32f2f !important; }

/* ✨ تأثيرات Hover للتصنيفات */
.category-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.category-card:hover .category-image img { transform: scale(1.05); }
.categories-cards .category-card:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 12px 35px rgba(211, 47, 47, 0.4); }
.categories-cards .category-card:hover span { background: #d32f2f !important; color: white !important; }
.category-list-item:hover { background: #f8f9fa; }
.category-list-item:hover h4 { color: #d32f2f; }

/* 📱 تصميم متجاوب */
@media (max-width: 1200px) {
    .categories-grid, .categories-cards { grid-template-columns: repeat(3, 1fr) !important; }
    .ref-videos-category-grid.columns-4 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px) {
    .ref-videos-category-grid.columns-3,
    .ref-videos-category-grid.columns-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .categories-grid, .categories-cards { grid-template-columns: repeat(2, 1fr) !important; }
    .ref-videos-category-grid.columns-2,
    .ref-videos-category-grid.columns-3,
    .ref-videos-category-grid.columns-4 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .categories-grid, .categories-cards { grid-template-columns: 1fr !important; }
    .category-list-item { padding: 15px 20px !important; }
}
