/* =========================================================
   Özgür Motor ve Generatör — Galeri (resim + video)
   Lacivert / mavi / turkuaz premium tema
   ========================================================= */

:root {
    --g-navy:    #173B63;
    --g-navy-2:  #0E294A;
    --g-accent:  #2F6FB5;
    --g-teal:    #38BDF8;
    --g-border:  rgba(23, 59, 99, 0.10);
    --g-shadow:  0 14px 36px rgba(11, 34, 57, 0.12);
}

/* ---------- Hero ---------- */
.g-hero {
    position: relative;
    padding: 92px 0 56px;
    background:
        radial-gradient(1200px 420px at 12% -10%, rgba(56, 189, 248, 0.16), transparent 60%),
        linear-gradient(135deg, #0B2341 0%, #143A63 55%, #1C4C82 100%);
    color: #EAF4FF;
    overflow: hidden;
}
.g-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(900px 300px at 90% 120%, rgba(47, 111, 181, 0.30), transparent 60%);
    pointer-events: none;
}
.g-hero .container { position: relative; z-index: 2; }
.g-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #9FD7FF;
    padding: 7px 14px;
    border: 1px solid rgba(159, 215, 255, 0.30);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
}
.g-hero h1 {
    margin: 18px 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.08;
}
.g-hero p {
    max-width: 680px;
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
    color: rgba(234, 244, 255, 0.86);
}

/* ---------- Section ---------- */
.g-section { padding: 48px 0 80px; background: #F6F9FC; }
.g-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 22px;
}
.g-count {
    font-size: 14px;
    color: #4A5C72;
    font-weight: 600;
}
.g-count strong { color: var(--g-navy); }

/* ---------- Masonry grid (resim) ---------- */
.g-masonry {
    columns: 4 280px;
    column-gap: 16px;
}
.g-item {
    position: relative;
    display: block;
    width: 100%;
    margin: 0 0 16px;
    break-inside: avoid;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--g-border);
    box-shadow: 0 4px 16px rgba(11, 34, 57, 0.06);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
    cursor: zoom-in;
    opacity: 0;
    transform: translateY(10px);
    animation: gFadeIn 0.45s ease forwards;
}
@keyframes gFadeIn { to { opacity: 1; transform: translateY(0); } }
.g-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--g-shadow);
}
.g-item img {
    display: block;
    width: 100%;
    height: auto;
    background: linear-gradient(135deg, #E9EFF6, #F4F8FC);
}
.g-item::after {
    content: "\f62c"; /* bootstrap-icons zoom-in */
    font-family: "bootstrap-icons";
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    font-size: 17px;
    color: #fff;
    background: linear-gradient(135deg, var(--g-accent), var(--g-teal));
    border-radius: 11px;
    opacity: 0;
    transform: translateY(6px) scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
    box-shadow: 0 8px 20px rgba(15, 43, 74, 0.30);
}
.g-item:hover::after { opacity: 1; transform: translateY(0) scale(1); }

/* ---------- Load more ---------- */
.g-more-wrap { text-align: center; margin-top: 34px; }
.g-btn-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: linear-gradient(135deg, var(--g-navy) 0%, var(--g-accent) 100%);
    box-shadow: 0 12px 26px rgba(23, 59, 99, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}
.g-btn-more:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(23, 59, 99, 0.34); }
.g-btn-more:disabled { opacity: 0.6; cursor: default; transform: none; }
.g-btn-more .spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gSpin 0.7s linear infinite;
    display: none;
}
.g-btn-more.loading .spinner { display: inline-block; }
@keyframes gSpin { to { transform: rotate(360deg); } }
.g-end-note { margin-top: 22px; text-align: center; color: #7488a0; font-size: 14px; }

/* ---------- Lightbox ---------- */
.g-lightbox {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(7, 18, 33, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.g-lightbox.open { display: flex; opacity: 1; }
.g-lb-stage {
    position: relative;
    max-width: 92vw;
    max-height: 86vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.g-lb-img {
    max-width: 92vw;
    max-height: 86vh;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    background: #0B2341;
}
.g-lb-cap {
    position: absolute;
    left: 0; right: 0; bottom: -34px;
    text-align: center;
    color: rgba(234,244,255,0.85);
    font-size: 14px;
}
.g-lb-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 54px; height: 54px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    transition: background 0.2s ease, transform 0.2s ease;
}
.g-lb-btn:hover { background: rgba(56,189,248,0.30); }
.g-lb-prev { left: 18px; }
.g-lb-next { right: 18px; }
.g-lb-close {
    position: fixed;
    top: 20px; right: 22px;
    width: 48px; height: 48px;
    transform: none;
    font-size: 20px;
}
.g-lb-counter {
    position: fixed;
    top: 28px; left: 24px;
    color: rgba(234,244,255,0.80);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

/* ---------- Video grid ---------- */
.g-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 22px;
}
.g-video-card {
    background: #fff;
    border: 1px solid var(--g-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(11, 34, 57, 0.06);
    transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.g-video-card:hover { transform: translateY(-5px); box-shadow: var(--g-shadow); }
.g-video-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #0B2341;
    cursor: pointer;
    border: 0;
    width: 100%;
    padding: 0;
}
.g-video-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}
.g-video-thumb .play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, rgba(7,18,33,0) 40%, rgba(7,18,33,0.55) 100%);
    transition: background 0.25s ease;
}
.g-video-thumb:hover .play { background: rgba(7,18,33,0.35); }
.g-video-thumb .play i {
    width: 64px; height: 64px;
    display: grid;
    place-items: center;
    font-size: 26px;
    color: #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--g-accent), var(--g-teal));
    box-shadow: 0 12px 28px rgba(15, 43, 74, 0.45);
    transform: scale(0.94);
    transition: transform 0.25s ease;
}
.g-video-thumb:hover .play i { transform: scale(1.06); }
.g-video-body { padding: 16px 18px 18px; }
.g-video-title {
    font-size: 15.5px;
    font-weight: 700;
    color: var(--g-navy);
    line-height: 1.35;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.g-video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    color: #6a7d93;
}
.g-video-meta .yt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--g-accent);
    font-weight: 600;
    text-decoration: none;
}
.g-video-meta .yt:hover { color: var(--g-navy); }

/* ---------- Video modal ---------- */
.g-vmodal {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(7, 18, 33, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.g-vmodal.open { display: flex; }
.g-vmodal-inner {
    position: relative;
    width: min(960px, 96vw);
}
.g-vmodal-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.g-vmodal-frame iframe { width: 100%; height: 100%; border: 0; }
.g-vmodal-close {
    position: absolute;
    top: -52px; right: 0;
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.10);
    color: #fff;
    font-size: 18px;
    border-radius: 50%;
    cursor: pointer;
}
.g-vmodal-close:hover { background: rgba(56,189,248,0.30); }

/* ---------- Empty / error state ---------- */
.g-empty {
    text-align: center;
    padding: 60px 20px;
    color: #5a6e85;
}
.g-empty i { font-size: 42px; color: var(--g-accent); }
.g-empty h3 { margin: 14px 0 6px; color: var(--g-navy); font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .g-masonry { columns: 3 240px; }
}
@media (max-width: 680px) {
    .g-masonry { columns: 2 150px; column-gap: 12px; }
    .g-item { margin-bottom: 12px; border-radius: 13px; }
    .g-hero { padding: 78px 0 44px; }
    .g-lb-btn { width: 46px; height: 46px; font-size: 19px; }
    .g-lb-prev { left: 8px; } .g-lb-next { right: 8px; }
}
@media (max-width: 420px) {
    .g-masonry { columns: 2 130px; }
}
