/* Gallery page (/gallery). Loaded by app/Views/gallery_page.php */
:root {
    --g-teal: #0b7770;
    --g-deep: #073f43;
    --g-ink: #13253a;
}

* {
    box-sizing: border-box;
}

body.gallery-page {
    margin: 0;
    background: #f2f7f8;
    color: var(--g-ink);
    font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

.gp-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px clamp(16px, 4vw, 32px);
    background: var(--g-deep);
}

.gp-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}

.gp-brand img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    flex: none;
}

.gp-brand span {
    display: grid;
    line-height: 1.15;
    min-width: 0;
}

.gp-brand strong {
    font-size: 1.05rem;
}

.gp-brand small {
    font-size: .7rem;
    opacity: .8;
}

.gp-back {
    position: fixed;
    top: 84px;
    left: clamp(12px, 3vw, 28px);
    z-index: 50;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 99px;
    border: 1px solid rgba(11,119,112,.25);
    background: #fff;
    color: var(--g-teal);
    text-decoration: none;
    font-weight: 700;
    font-size: .92rem;
    white-space: nowrap;
    box-shadow: 0 8px 22px rgba(7,63,67,.28);
    transition: transform .15s ease, box-shadow .15s ease;
}

.gp-back:hover, .gp-back:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(7,63,67,.36);
    outline: none;
}

.gp-hero {
    padding: 42px clamp(16px, 4vw, 32px) 54px;
    text-align: center;
    color: #fff;
    background: linear-gradient(135deg, var(--g-teal) 0%, var(--g-deep) 100%);
}

.gp-hero h1 {
    margin: 0 0 8px;
    font-size: clamp(1.9rem, 5vw, 2.8rem);
}

.gp-hero p {
    margin: 0;
    opacity: .88;
    font-size: 1.02rem;
}

.gp-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 22px clamp(14px, 3vw, 28px) 56px;
}

.gp-count {
    margin: 0 0 14px;
    color: #62788e;
    font-size: .9rem;
}

.gp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
    gap: 14px;
}

.gp-item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    background: #dfe9ee;
    cursor: zoom-in;
    aspect-ratio: 4 / 3;
    position: relative;
    box-shadow: 0 8px 22px rgba(16,35,52,.12);
    transition: transform .2s ease, box-shadow .2s ease;
}

.gp-item:hover, .gp-item:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(16,35,52,.2);
    outline: none;
}

.gp-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gp-item figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px 14px 12px;
    color: #fff;
    font-weight: 700;
    font-size: .92rem;
    text-align: left;
    background: linear-gradient(180deg, transparent, rgba(4,14,23,.72));
    opacity: 0;
    transition: opacity .2s ease;
}

.gp-item:hover figcaption, .gp-item:focus-visible figcaption {
    opacity: 1;
}

@media (hover: none) {
    .gp-item figcaption {
        opacity: 1;
    }
}

.gp-empty {
    padding: 60px 20px;
    text-align: center;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(16,35,52,.08);
}

.gp-empty h2 {
    margin: 0 0 6px;
}

.gp-cta {
    margin: 34px 0 0;
    padding: 26px;
    border-radius: 18px;
    text-align: center;
    background: #fff;
    box-shadow: 0 8px 22px rgba(16,35,52,.08);
}

.gp-cta h2 {
    margin: 0 0 6px;
    font-size: 1.3rem;
}

.gp-cta p {
    margin: 0 0 16px;
    color: #62788e;
}

.gp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 26px;
    border-radius: 14px;
    background: linear-gradient(135deg, #1fa879, #0b7770);
    color: #fff;
    font-weight: 800;
    text-decoration: none;
}

.gp-foot {
    padding: 22px 16px 30px;
    text-align: center;
    color: #62788e;
    font-size: .84rem;
    border-top: 1px solid #e3ecf0;
    background: #fff;
}

.gp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(5,14,22,.92);
}

.gp-lightbox[hidden] {
    display: none;
}

.gp-lb-figure {
    margin: 0;
    max-width: min(1100px, 100%);
    max-height: 100%;
    display: grid;
    gap: 10px;
    justify-items: center;
}

.gp-lb-figure img {
    max-width: 100%;
    max-height: calc(100vh - 120px);
    border-radius: 12px;
    object-fit: contain;
}

.gp-lb-figure figcaption {
    color: #fff;
    text-align: center;
    font-weight: 600;
}

.gp-lb-btn {
    position: absolute;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.16);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.gp-lb-btn:hover {
    background: rgba(255,255,255,.3);
}

.gp-lb-close {
    top: 16px;
    right: 16px;
}

.gp-lb-prev {
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.gp-lb-next {
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.gp-lb-count {
    position: absolute;
    top: 24px;
    left: 20px;
    color: rgba(255,255,255,.8);
    font-size: .9rem;
}

@media (max-width: 560px) {
    .gp-back {
        top: 78px;
        padding: 9px 15px;
        font-size: .86rem;
    }

    .gp-brand small {
        display: none;
    }

    .gp-lb-prev {
        left: 6px;
    }

    .gp-lb-next {
        right: 6px;
    }
}
