/* تم إنشاء الملف: style.css لـ OmniGrid Categories Pro */

.omnigrid-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 20px 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* شريط البحث المباشر */
.omnigrid-search-bar {
    position: relative;
    max-width: 600px;
    margin: 0 auto 30px auto;
    display: flex;
    align-items: center;
}

.omnigrid-search-bar .search-icon {
    position: absolute;
    right: 20px;
    color: #999;
}

.omnigrid-search-bar input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    border-radius: 30px;
    border: 2px solid #eaeaea;
    background: #fbfbfb;
    font-size: 16px;
    outline: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.omnigrid-search-bar input:focus {
    border-color: var(--og-accent, #e67e22);
    background: #ffffff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

/* حاوية الشبكة */
.omnigrid-container {
    display: grid;
    gap: 20px;
    width: 100%;
}

/* النمط الكلاسيكي */
.layout-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-auto-rows: 240px;
}

/* نمط البينتو المتطور (Bento Box) */
.layout-bento {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-auto-rows: 220px;
}

.layout-bento .omnigrid-item:nth-child(4n - 3) {
    grid-column: span 2;
    grid-row: span 2;
}

.layout-bento .omnigrid-item:nth-child(6n) {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .layout-bento .omnigrid-item {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }
}

/* تصميم البطاقات المتطور */
.omnigrid-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    text-decoration: none !important;
    background: #111;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.4s ease, opacity 0.3s ease, box-shadow 0.4s ease;
}

.omnigrid-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.omnigrid-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.omnigrid-item:hover .omnigrid-img {
    transform: scale(1.15);
}

/* طبقة التظليل الذكية المتدرجة */
.omnigrid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,var(--og-opacity, 0.4)) 50%, rgba(0,0,0,0.1) 100%);
    z-index: 2;
    transition: background 0.4s ease;
}

.omnigrid-item:hover .omnigrid-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,var(--og-opacity, 0.4)) 60%, rgba(0,0,0,0.2) 100%);
}

/* النصوص والمحتوى */
.omnigrid-content {
    position: relative;
    z-index: 3;
    padding: 25px;
    text-align: right;
    transform: translateY(10px);
    transition: transform 0.4s ease;
}

.omnigrid-item:hover .omnigrid-content {
    transform: translateY(0);
}

.omnigrid-content h3 {
    color: var(--og-text, #ffffff);
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.3;
    text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.omnigrid-content span {
    display: inline-block;
    background: var(--og-accent, #e67e22);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.omnigrid-item:hover .omnigrid-content span {
    opacity: 1;
}