/* Main Layout wrapper */
.ngo-gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
    font-family: inherit;
}

/* Left Sidebar (Categories) */
.ngo-gallery-sidebar {
    width: 25%; /* Left side 25% */
    max-height: 500px;
    overflow-y: auto; /* Scrollable tabs */
    border-right: 1px solid #ddd;
    padding-right: 15px;
}
/* Scrollbar UI hide for clean look */
.ngo-gallery-sidebar::-webkit-scrollbar { width: 5px; }
.ngo-gallery-sidebar::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.ngo-gallery-tabs {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ngo-gallery-tabs li {
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f9f9f9;
    border: 1px solid #eee;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #333;
}
.ngo-gallery-tabs li:hover,
.ngo-gallery-tabs li.ngo-tab-active {
    background: #337ab7; /* Blue color */
    color: #fff;
    border-color: #337ab7;
}

/* Right Side (Images) */
.ngo-gallery-content {
    width: calc(75% - 20px); /* Right side 75% */
}

/* 4-Column Grid */
.ngo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 Images per row */
    gap: 15px;
}

.ngo-gallery-item {
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

/* Image Square Aspect Ratio Box */
.ngo-gallery-img-wrap {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Height equals width */
    background: #f4f4f4;
}

.ngo-gallery-img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Images crop ho jayengi taaki sab barabar dikhein */
    transition: transform 0.4s ease;
}
.ngo-gallery-item:hover .ngo-gallery-img-wrap img {
    transform: scale(1.1); /* Hover par zoom */
}

/* Text Overlay (Title) */
.ngo-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.ngo-gallery-item:hover .ngo-gallery-overlay {
    transform: translateY(0);
}

/* ====================================
   Responsive Media Queries 
   ==================================== */
@media (max-width: 1024px) {
    .ngo-gallery-grid { grid-template-columns: repeat(3, 1fr); } /* Tablet par 3 */
}
@media (max-width: 768px) {
    .ngo-gallery-container { flex-direction: column; }
    .ngo-gallery-sidebar { 
        width: 100%; 
        border-right: none; 
        border-bottom: 1px solid #ddd; 
        padding-right: 0; 
        padding-bottom: 15px; 
        max-height: 200px; /* Mobile par category height kam */
    }
    .ngo-gallery-content { width: 100%; }
    .ngo-gallery-grid { grid-template-columns: repeat(2, 1fr); } /* Mobile par 2 */
}
@media (max-width: 480px) {
    .ngo-gallery-grid { grid-template-columns: 1fr; } /* Chhote mobile par 1 */
}