:root{

/* =========================
   GALLERY THEME (ELECTRIC)
========================= */

/* =========================
   GALLERY - GARDENER SYSTEM
========================= */

--bg:
linear-gradient(
180deg,
#0a120d 0%,
#0b1510 50%,
#0a110c 100%
);

--text:rgba(245,245,245,0.88);

/* ACCENT */
--accent:#9fd8b0;
--accent-soft:#bfe9cc;

/* layout */
--wrap:1100px;

--grid-gap:14px;
--cols:4;

--radius:14px;

/* cards */
--card-bg:
linear-gradient(
180deg,
rgba(255,255,255,0.03),
rgba(255,255,255,0.015)
);

--card-border:rgba(159,216,176,0.14);
--card-border-hover:rgba(159,216,176,0.30);

--shadow:0 20px 60px rgba(0,0,0,0.45);
--shadow-hover:0 30px 80px rgba(0,0,0,0.55);

/* hover overlay */
--hover-overlay:
linear-gradient(
to top,
rgba(0,0,0,0.35),
rgba(159,216,176,0.16)
);

/* NAV */
--nav-size:50px;
--nav-font-size:22px;

--nav-bg:rgba(159,216,176,0.06);
--nav-border:rgba(159,216,176,0.18);
--nav-color:rgba(245,245,245,0.88);

--nav-hover-bg:rgba(159,216,176,0.14);
--nav-hover-border:rgba(159,216,176,0.30);
--nav-hover-color:#ffffff;

--nav-radius:12px;
--nav-transition:.2s ease;

/* LIGHTBOX NAV */
--lightbox-nav-bg:rgba(159,216,176,0.35);
--lightbox-nav-border:rgba(159,216,176,0.55);
--lightbox-nav-color:rgba(255,255,255,1);

--lightbox-nav-hover-bg:rgba(159,216,176,0.60);
--lightbox-nav-hover-border:rgba(159,216,176,0.85);

/* BACK BUTTON */
--back-bg:rgba(159,216,176,0.06);
--back-border:rgba(159,216,176,0.18);
--back-color:rgba(245,245,245,0.88);

--back-hover-bg:rgba(159,216,176,0.14);
--back-hover-border:rgba(159,216,176,0.30);
--back-hover-color:#ffffff;

/* transition */
--transition:0.35s ease;

}

/* =========================
   BASE
========================= */
html, body {
 
    background: linear-gradient(
        180deg,
        #0a120d 0%,
        #0b1510 50%,
        #0a110c 100%
    ) !important;
}

body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:Arial, sans-serif;
}

.wrap{
    width:min(var(--wrap), 92%);
    margin:0 auto;
    padding:100px 0;
}

h1{
    font-size:34px;
    font-weight:900;
    margin-bottom:40px;
}

/* =========================
   GRID
========================= */

.gallery-grid{
    display:grid;
    grid-template-columns:repeat(var(--cols), 1fr);
    gap:var(--grid-gap);
}

.gallery-item{
    aspect-ratio:4/3;
    overflow:hidden;
    border-radius:var(--radius);
    cursor:pointer;
    background:#111;
    position:relative;
}

.gallery-item img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:.3s ease;
    filter:contrast(1.05) brightness(0.9);
}

.gallery-item:hover img{
    transform:scale(1.05);
}

/* FIX CLICK BUG */
.gallery-item::after{
    content:"";
    position:absolute;
    inset:0;
    background:var(--hover-overlay);
    opacity:0;
    transition:.3s ease;
    pointer-events:none;
}

.gallery-item:hover::after{
    opacity:1;
}

/* =========================
   BACK BUTTON
========================= */

.back-home{
    display:flex;
    justify-content:center;
    margin-top:50px;
}

.back-home a{
    padding:12px 18px;
    border-radius:12px;
    text-decoration:none;

    color:var(--back-color);
    background:var(--back-bg);
    border:1px solid var(--back-border);

    transition:var(--transition);
}

.back-home a:hover{
    transform:translateY(-2px);
    background:var(--back-hover-bg);
    border-color:var(--back-hover-border);
    color:var(--back-hover-color);
}

/* =========================
   LIGHTBOX
========================= */

.lightbox{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.92);
    display:none;
    align-items:center;
    justify-content:center;
    z-index:9999;
}

.lightbox-inner{
    position:relative;
    max-width:90%;
}

.lightbox-inner img{
    max-width:100%;
    max-height:85vh;
    border-radius:12px;
}

/* CLOSE */
.close{
    position: absolute;
    top: 15px;
    right: 15px;

    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 26px;
    font-weight: 600;

    cursor: pointer;

    color: #fff;

    background: rgba(118, 118, 118, 0.962);
    border-radius: 8px;

    z-index: 9999;

    transition: 0.2s ease;
}

.close:hover{
    background: rgba(0,0,0,0.85);
    transform: scale(1.05);
}

/* =========================
   LIGHTBOX NAV ARROWS (FIXED)
========================= */

.lightbox .nav{
    position:absolute;
    top:50%;
    transform:translateY(-50%);

    width:var(--nav-size);
    height:var(--nav-size);

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:var(--nav-font-size);

    background:var(--lightbox-nav-bg);
    border:1px solid var(--lightbox-nav-border);
    color:var(--lightbox-nav-color);

    border-radius:var(--nav-radius);

    cursor:pointer;
    transition:var(--nav-transition);
}

.lightbox .nav:hover{
    background:var(--lightbox-nav-hover-bg);
    border-color:var(--lightbox-nav-hover-border);
    color:#fff;
}

.lightbox .prev{ left:20px; }
.lightbox .next{ right:20px; }

/* =========================
   MOBILE
========================= */

@media(max-width:700px){

    .gallery-grid{
        grid-template-columns:repeat(2, 1fr);
    }

    .lightbox .prev{ left:10px; }
    .lightbox .next{ right:10px; }

    h1{ font-size:26px; }
}