.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: 125px 0 35px;
    color: #1f2937;
    font-size: 1.5rem;
}
.portfolio-gallery h2:first-child {
    margin-top: 75px;
}

/* 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;
    }
}



/* -- Gallery - Tabs -- */

#gallery_section {
    padding: 85px 5%;
}
.gallery-outer-wrapper {
    max-width: 1550px;
    width: 100%;
    margin: 0 auto;
}
.gallery-nav-list {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    margin: 20px auto 50px;
    padding: 0;
    list-style: none;
    gap: 3%;
}
.gallery-nav-disabled::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    cursor: pointer;
}
.gallery-nav-item {
    width: calc(20% - (12% / 5));
    margin-block: 10px;
    z-index: 0;
}
.gallery-nav-button {
    position: relative;
    width: 100%;
    text-align: center;
    padding: 8px 12px;
    font-size: .8rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    background-color: #f6f8fa;
    border-radius: 25px;
    border: 2px solid #e6e8ea;
    overflow: hidden;
    z-index: 0;
    transition: color .25s, background-color .25s;
}
.gallery-nav-button::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 -60%;
    width: 100%;
    opacity: 0;
    background-color: var(--main-color);
    border-radius: 25px;
    z-index: -1;
    transition: left .25s, opacity .25s;
}
.gallery-nav-button:hover,
.gallery-nav-button:focus {
    background-color: #e6e8ea;
}
.gallery-nav-button-active {
    color: #fff;
}
.gallery-nav-button-active::after {
    left: 0;
    opacity: 1;
}

.gallery-wrapper {
    transition: opacity .25s;
}
.gallery-wrapper-fade-out {
    opacity: 0;
}
.gallery-content {
    display: none;
}
.gallery-content-visible {
    display: block;
}

.gallery-content h2 {
    font-size: 1.2rem;
    text-align: center;
    text-transform: uppercase;
    font-weight: 700;
}



/* -- Gallery - Main -- */

.gallery-noscript {
    font-size: .95rem;
    text-align: center;
}
.gallery-loader {
    display: block;
    margin: 50px auto -50px;
    border-radius: 50%;
    transition: opacity .4s;
    width: 20px;
    height: 20px;
    box-shadow: 20px 0 0 #e2e4e8, -20px 0 0 #e2e4e8, 0 20px 0 #e2e4e8, 0 -20px 0 var(--accent-color);
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

.gallery {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    margin: 20px auto 60px;
    padding: 0;
    transform: translateY(50px);
    opacity: 0;
    min-height: 500px;
    transition: transform .4s, opacity .4s;
}
.gallery-fade-in {
    transform: translateY(0);
    opacity: 1;
}
.gallery-fade-out {
    opacity: 0;
}
.gallery h2 {
    width: 100%;
    text-align: left;
    font-size: 1.8rem;
    text-transform: uppercase;
    color: #12141d;
    margin: 100px 0 20px;
    padding-left: 10px;
}
.gallery h2:first-child {
    margin-top: 20px;
}
.gallery-item {
    position: relative;
    width: 24%;
    height: 300px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px .5% 0;
    box-shadow: 0 4px 12px rgba(5, 5, 5, .15);
    border: 6px solid #fff;
    border-radius: 10px;
}
.gallery-item img {
    width: auto;
    height: 115%;
    transition: opacity .4s, transform .4s;
}
.gallery-item img.vertical-img {
    width: 115%;
    height: auto;
}
.gallery-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 45px;
    height: 45px;
    fill: #111;
    opacity: 0;
    transition: opacity .4s;
}
.gallery-item:hover .gallery-icon {
    opacity: 1;
}
.gallery-item:hover img {
    opacity: .6;
    transform: scale(1.05);
}
.gallery-label-before,
.gallery-label-after {
    position: absolute;
    top: 10px;
    left: 10px;
    text-transform: uppercase;
    background-color: rgba(0, 0, 0, .5);
    backdrop-filter: blur(5px);
    font-size: .95rem;
    color: #fff;
    padding: 5px 10px;
    font-weight: 600;
}

@media (max-width: 1200px) {
    .gallery-item {
        width: 32.3333333333%;
    }
}

@media (max-width: 981px) {
    .gallery-item {
        width: 49%;
    }
}

@media (max-width: 600px) {
    .gallery-nav-item {
        width: 100%;
    }
    .gallery-item,
    .gallery-item img {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .gallery-nav-item {
        width: 100%;
    }
}