/* ==================================
   १. Home Page Grid Gallery Design
   ================================== */
.arm-reels-block { padding: 20px 0; margin: 20px 0; overflow: hidden; }
.arm-reels-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #ddd; padding-bottom: 10px; margin-bottom: 15px; }
.arm-reels-header h2 { color: #2563eb; font-size: 24px; font-weight: bold; margin: 0; text-transform: uppercase; }
.arm-view-all { color: #666; text-decoration: none; font-size: 15px; font-weight: bold; transition: color 0.3s; display: flex; align-items: center; gap: 5px; }
.arm-view-all span { background: #0073aa; color: #fff; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.arm-view-all:hover { color: #000; }

.reels-gallery-wrapper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 15px; background: transparent !important; }
.reel-item { width: 100%; aspect-ratio: 9 / 16; position: relative; border-radius: 8px; overflow: hidden; cursor: pointer; transition: transform 0.3s; box-shadow: 0 4px 10px rgba(0,0,0,0.3); background: #111; }
.reel-item:hover { transform: scale(1.03); }
.reel-thumbnail { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-overlay { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0.4), transparent); padding: 30px 10px 10px; }
.reel-title { text-align:center; font-weight: 700; font-size: 14px; line-height: 1.4; color: #fff; text-shadow: 1px 1px 3px rgba(0,0,0,0.8); }

@media (max-width: 1024px) { .reels-gallery-wrapper { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px) { .reels-gallery-wrapper { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .reels-gallery-wrapper { grid-template-columns: repeat(2, 1fr); gap: 10px; } .reel-title { font-size: 12px; } }

/* ==================================
   २. OK Reels Style - Popup Modal (Full Screen Fix)
   ================================== */
#reel-popup-modal { 
    display: none; 
    position: fixed; 
    z-index: 99999999 !important; 
    left: 0; 
    top: 0; 
    right: 0;
    bottom: 0;
    width: 100%; 
    height: 100%; 
    background-color: #000000; 
    overflow: hidden;
}

.reel-modal-header { 
    position: absolute; 
    top: 0; 
    left: 0; 
    right: 0; 
    padding: 20px 40px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    z-index: 100000000; 
}

.reel-site-logo h2 { color: #fff; margin: 0; font-size: 24px; font-weight: bold; }
.reel-site-logo img { height: 40px; object-fit: contain; }

.reel-close-btn { 
    font-size: 40px; 
    color: #fff; 
    cursor: pointer; 
    line-height: 1; 
    font-family: Arial, sans-serif;
    transition: color 0.3s; 
}
.reel-close-btn:hover { color: #ff0050; }

.reel-modal-body { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    height: 100vh; 
    width: 100vw; 
}

.reel-video-container { 
    width: 100%; 
    max-width: 400px; 
    height: 90vh; 
    background: transparent; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    border-radius: 12px;
    overflow: hidden;
}

.reel-video-container iframe, 
.reel-video-container blockquote { 
    width: 100% !important; 
    height: 100% !important; 
    border: none; 
    border-radius: 12px;
}

@media (max-width: 600px) {
    .reel-modal-header { padding: 15px 20px; }
    .reel-video-container { max-width: 100%; height: 100vh; border-radius: 0; }
    .reel-video-container iframe { border-radius: 0; }
}

/* ==================================
   ३. Next / Prev Navigation Buttons
   ================================== */
.reel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000001;
    padding: 15px;
    user-select: none;
    transition: color 0.3s ease, transform 0.2s ease;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
}

.reel-nav-btn:hover {
    color: #ff0050;
    transform: translateY(-50%) scale(1.1);
}

.reel-prev-btn { left: calc(50% - 270px); } 
.reel-next-btn { right: calc(50% - 270px); }

@media (max-width: 768px) {
    .reel-prev-btn { left: 10px; font-size: 35px; padding: 10px; background: rgba(0,0,0,0.3); border-radius: 50%; }
    .reel-next-btn { right: 10px; font-size: 35px; padding: 10px; background: rgba(0,0,0,0.3); border-radius: 50%; }
}

/* ==================================
   ४. Full Page Category Filter & Grid (OK Reels Style)
   ================================== */
.arm-reels-page-wrapper { margin: 30px 0; }

.arm-reels-page-header { 
    display: flex; 
    align-items: center; 
    border-bottom: 2px solid #e5e7eb; 
    padding-bottom: 12px; 
    margin-bottom: 20px; 
    gap: 20px;
    flex-wrap: wrap; 
}

.arm-page-title { 
    color: #3b82f6; 
    font-size: 26px; 
    font-weight: 800; 
    margin: 0; 
    white-space: nowrap; 
}

.arm-category-filters { 
    display: flex; 
    gap: 12px; 
    overflow-x: auto; 
    scrollbar-width: none; 
    padding: 5px 0;
}
.arm-category-filters::-webkit-scrollbar { display: none; }

.arm-filter-btn { 
    background: #f1f5f9; 
    color: #475569; 
    padding: 6px 18px; 
    border-radius: 20px; 
    font-size: 14px; 
    cursor: pointer; 
    white-space: nowrap; 
    font-weight: 600; 
    border: 1px solid #e2e8f0; 
    transition: all 0.3s ease;
}

.arm-filter-btn.active, .arm-filter-btn:hover { 
    background: #e0f2fe; 
    color: #0284c7; 
    border-color: #bae6fd; 
}

/* यहाँ 5 Columns फिक्स गरिएको छ */
.reels-page-grid { 
    display: grid; 
    grid-template-columns: repeat(5, 1fr); 
    gap: 15px; 
}

/* पहिले 1024px हुँदा ल्यापटपमै 4 वटा हुन्थ्यो, अब ट्याब्लेटमा पुगेपछि मात्र 4 वटा हुन्छ */
@media (max-width: 900px) {
    .reels-page-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 768px) {
    .reels-page-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
    .reels-page-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ==================================
   ५. Pagination Design (Page 1, 2, 3...)
   ================================== */
.arm-pagination { margin-top: 40px; text-align: center; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.arm-pagination a, .arm-pagination span { display: inline-block; padding: 8px 16px; border: 1px solid #e2e8f0; border-radius: 8px; text-decoration: none; color: #3b82f6; font-weight: bold; background: #fff; transition: all 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.arm-pagination .current { background: #3b82f6; color: #fff; border-color: #3b82f6; }
.arm-pagination a:hover { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }