/* Gallery page v2 (gallery.php). Scoped to #gallery-page. */
#gallery-page { --bg:#0b1730; --line:rgba(147,185,255,.2); --muted:#a9c1e6;
    background:radial-gradient(900px 480px at 15% 0,rgba(37,99,235,.22),transparent 60%),var(--bg);
    color:#fff; min-height:100vh; padding-bottom:96px; font-family:Arial,Helvetica,sans-serif; }
#gallery-page *, #gallery-page *::before, #gallery-page *::after { box-sizing:border-box; }
#gallery-page .gl-wrap { width:100%; max-width:1320px; margin:0 auto; padding:0 24px; }
#gallery-page .gl-sr { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

/* ---- header ---- */
#gallery-page .gl-hero { padding:150px 0 34px; border-bottom:1px solid var(--line); background:linear-gradient(180deg,rgba(6,22,52,.55),transparent); }
#gallery-page .gl-crumbs { display:flex; gap:10px; align-items:center; margin-bottom:18px; font-size:13.5px; color:var(--muted); }
#gallery-page .gl-crumbs a { color:#cfe0ff; text-decoration:none; } #gallery-page .gl-crumbs a:hover { color:#fff; text-decoration:underline; }
#gallery-page .gl-hero h1 { margin:0 0 10px; font-size:clamp(36px,5vw,60px); font-weight:800; letter-spacing:-.035em; line-height:1.05; }
#gallery-page .gl-sub { margin:0 0 28px; max-width:62ch; color:var(--muted); font-size:clamp(16px,1.6vw,19px); line-height:1.6; }

/* filter bar */
#gallery-page .gl-bar { display:grid; grid-template-columns:minmax(0,1fr) 260px auto; gap:12px; padding:12px; border:1px solid var(--line); border-radius:18px; background:rgba(255,255,255,.06); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); }
#gallery-page .gl-bar__search { position:relative; }
#gallery-page .gl-bar__search svg { position:absolute; left:16px; top:50%; transform:translateY(-50%); width:19px; height:19px; fill:none; stroke:#8fa8d0; stroke-width:2; stroke-linecap:round; pointer-events:none; }
#gallery-page .gl-bar input, #gallery-page .gl-bar select {
    width:100%; height:50px; border-radius:12px; border:1px solid rgba(255,255,255,.18); background:#0e2147; color:#fff; font:inherit; font-size:15px; outline:none;
    transition:border-color .2s, box-shadow .2s;
}
#gallery-page .gl-bar input { padding:0 16px 0 46px; } #gallery-page .gl-bar select { padding:0 14px; cursor:pointer; }
#gallery-page .gl-bar input::placeholder { color:#8fa8d0; }
#gallery-page .gl-bar input:focus, #gallery-page .gl-bar select:focus { border-color:#60a5fa; box-shadow:0 0 0 3px rgba(96,165,250,.2); }
#gallery-page .gl-clear { height:50px; padding:0 22px; border-radius:12px; border:1px solid rgba(255,255,255,.22); background:rgba(255,255,255,.08); color:#fff; font:inherit; font-size:14.5px; font-weight:700; cursor:pointer; white-space:nowrap; }
#gallery-page .gl-clear:hover { background:rgba(255,255,255,.16); }

#gallery-page .gl-count { margin:30px 0 20px; color:var(--muted); font-size:14.5px; }
#gallery-page .gl-count strong { color:#fff; }

/* ---- cards ---- */
#gallery-page #gallery-items-container { display:grid; grid-template-columns:repeat(auto-fill,minmax(340px,1fr)); gap:24px; align-items:start; }
#gallery-page #gallery-items-container > p { grid-column:1/-1; text-align:center; padding:70px 0; color:var(--muted); }
#gallery-page .gl-card {
    display:flex; flex-direction:column; overflow:hidden; border:1px solid var(--line); border-radius:22px;
    background:linear-gradient(170deg,rgba(24,44,82,.85),rgba(13,27,54,.9)); box-shadow:0 16px 40px rgba(0,0,0,.26);
    transition:transform .3s, border-color .3s, box-shadow .3s;
}
#gallery-page .gl-card:hover { transform:translateY(-5px); border-color:rgba(96,165,250,.6); box-shadow:0 28px 60px rgba(0,0,0,.4); }
#gallery-page .gl-media { position:relative; aspect-ratio:4/3; background:#0c1a35; overflow:hidden; }
#gallery-page .gl-media a { display:block; width:100%; height:100%; }
#gallery-page .gl-media img { display:block; width:100%; height:100%; object-fit:cover; transition:transform .6s cubic-bezier(.2,.7,.2,1); }
#gallery-page .gl-card:hover .gl-media img { transform:scale(1.05); }
#gallery-page .gl-media::after { content:""; position:absolute; left:0; right:0; bottom:0; height:40%; pointer-events:none; background:linear-gradient(180deg,transparent,rgba(8,18,40,.6)); }
#gallery-page .gl-media iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }
#gallery-page .gl-media--video::after { display:none; }
#gallery-page .gl-badge {
    position:absolute; z-index:2; right:14px; bottom:14px; display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:999px;
    background:rgba(8,18,40,.7); border:1px solid rgba(255,255,255,.22); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px);
    color:#fff; font-size:12.5px; font-weight:700; pointer-events:none;
}
#gallery-page .gl-badge svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
#gallery-page .gl-thumbs { display:grid; grid-template-columns:repeat(4,1fr); gap:6px; padding:6px 6px 0; }
#gallery-page .gl-thumb { position:relative; display:block; aspect-ratio:1; border-radius:10px; overflow:hidden; background:#0c1a35; }
#gallery-page .gl-thumb img { width:100%; height:100%; object-fit:cover; display:block; transition:opacity .2s, transform .4s; }
#gallery-page .gl-thumb:hover img { opacity:.85; transform:scale(1.06); }
#gallery-page .gl-more { position:absolute; inset:0; display:grid; place-items:center; background:rgba(8,18,40,.68); color:#fff; font-size:18px; font-weight:800; }
#gallery-page .gl-body { padding:20px 22px 24px; }
#gallery-page .gl-tag { display:inline-block; margin:0 0 10px; padding:4px 11px; border-radius:999px; background:rgba(255,193,7,.14); border:1px solid rgba(255,193,7,.4); color:#ffd45a; font-size:11px; font-weight:800; letter-spacing:.1em; text-transform:uppercase; }
#gallery-page .gl-body h3 { margin:0 0 8px; font-size:20px; font-weight:800; line-height:1.25; letter-spacing:-.015em; color:#fff; }
#gallery-page .gl-body p { margin:0; color:#b6c9e8; font-size:15px; line-height:1.65; display:-webkit-box; -webkit-line-clamp:4; -webkit-box-orient:vertical; overflow:hidden; }

#gallery-page .gl-body p.gl-desc.is-open { display:block; -webkit-line-clamp:none; overflow:visible; }
#gallery-page .gl-readmore { display:inline-flex; align-items:center; gap:6px; margin:12px 0 0; padding:6px 0; background:none; border:0; color:#ffc107; font:inherit; font-size:14px; font-weight:700; cursor:pointer; }
#gallery-page .gl-readmore[hidden] { display:none; }
#gallery-page .gl-readmore:hover { text-decoration:underline; }
#gallery-page .gl-readmore::after { content:""; width:7px; height:7px; border-right:2px solid currentColor; border-bottom:2px solid currentColor; transform:rotate(45deg) translateY(-2px); transition:transform .2s; }
#gallery-page .gl-readmore[aria-expanded="true"]::after { transform:rotate(-135deg) translateY(-2px); }

#gallery-page a:focus-visible, #gallery-page button:focus-visible { outline:3px solid #93b9ff; outline-offset:3px; }

@media (max-width:860px) {
    #gallery-page .gl-hero { padding:128px 0 28px; }
    #gallery-page .gl-bar { grid-template-columns:1fr 1fr; }
    #gallery-page .gl-bar__search { grid-column:1/-1; }
    #gallery-page #gallery-items-container { grid-template-columns:repeat(auto-fill,minmax(280px,1fr)); }
}
@media (max-width:560px) {
    #gallery-page .gl-wrap { padding:0 16px; }
    #gallery-page .gl-bar { grid-template-columns:1fr; }
    #gallery-page #gallery-items-container { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce) { #gallery-page .gl-card:hover { transform:none; } #gallery-page * { transition:none !important; } }
