.maincontent {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    border: none;
}  


/* Gallery Section*/
.portfolio-gallery {
    padding: 56px 20px;
    background: #fff;
}

.portfolio-gallery .gal-container {
    max-width: 1200px;
    margin: 0 auto;
}

.portfolio-gallery h2 {
    text-align: center;
    margin: 0 0 22px;
    color: #1f2937;
    font-size: 2rem;
}

/* Tabs (desktop) */
.gal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 16px;
}

.gal-tab {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #e6ebf0;
    background: #f7f9fb;
    color: #374151;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.gal-tab:hover {
    background: #eef6ff;
    border-color: #d6e9ff;
    color: var(--main-color);
    transform: translateY(-1px);
}

.gal-tab.active {
    background: var(--main-color);
    color: #fff;
    border-color: var(--main-color);
}

/* Mobile dropdown */
.gal-mobile-nav {
    display: none;
    margin-bottom: 12px;
}

.gal-select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e2e6ea;
    background: #f3f5f7;
    font-weight: 600;
    color: #1f2937;
}

/* Panes */
.gal-panes {
    position: relative;
}

.gal-pane {
    display: none;
    opacity: 0;
    transform: translateY(6px);
}

.gal-pane.active {
    display: block;
    animation: fadeUp .28s ease forwards;
}

.pane .r-main-wrapper {
    gap: 30px;
}

.pane img {
    max-width: 500px;
    margin-inline: auto;
    box-shadow: 0px 2px 5px 2px #00000021;
}

.pane-list-item {
    display: flex;
}

.pane-list-icon {
    margin-right: 8px;
}

.pane-list-icon svg {
    fill: var(--r-main-color);
    width: 30px;
    height: 30px;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grid */
.gal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 12px;
}

.g-item {
    margin: 0;
}

.g-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    border: 1px solid #e6ebf0;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.g-item img:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

/* Lightbox */
.gal-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
}

.gal-lightbox.open {
    display: block;
}

.glb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .65);
    opacity: 0;
    transition: opacity .18s ease;
}

.gal-lightbox.open .glb-backdrop {
    opacity: 1;
}

.glb-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, calc(-50% + 10px)) scale(.98);
    width: min(1000px, 94vw);
    height: min(84vh, 800px);
    background: #0b0b0b;
    border: 1px solid #1114;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
    opacity: 0;
    transition: transform .2s ease, opacity .2s ease;
    display: grid;
    place-items: center;
}

.gal-lightbox.open .glb-panel {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.glb-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.glb-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: 0;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
}

.glb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .33);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 28px;
    cursor: pointer;
    user-select: none;
}

.glb-nav svg {
    fill: #fff;
}

.glb-prev {
    left: 12px;
}

.glb-next {
    right: 12px;
}

.glb-nav:hover {
    background: rgba(255, 255, 255, .2);
}


@media (max-width: 960px) {
    .gal-tabs {
        display: none;
    }

.gal-mobile-nav {
	display: flex;
	gap: 8px;
	margin-block: 20px;
	align-items: center;
	justify-content: center;
}

.gal-mobile-nav p {
	width: fit-content;
	text-align: center;
}

    .gal-select {
        width: 40%;
    }


    .g-item img {
        height: 225px;
    }

    .layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .mobile-nav {
        display: block;
    }

    .side-nav {
        display: none;
    }
}