/* Gallery Cards & Lightbox Styles */

.gallery-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 8, 92, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 8, 92, 0.12);
    border-color: #cbd5e1;
}

.gallery-card-media {
    position: relative;
    width: 100%;
    height: 230px;
    overflow: hidden;
    background-color: #f1f5f9;
}

.gallery-card-media img.gallery-img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
}

.gallery-card:hover .gallery-card-media img.gallery-img-cover {
    transform: scale(1.04);
}

/* Portrait Image Presentation with Soft Blurred Background (No Black Sidebars) */
.gallery-card-media.is-portrait {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #e2e8f0;
}

.gallery-card-media.is-portrait .gallery-img-blur-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(16px) brightness(0.92);
    transform: scale(1.2);
    z-index: 1;
    pointer-events: none;
}

.gallery-card-media.is-portrait .gallery-img-contain {
    position: relative;
    z-index: 2;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: 100%;
    object-fit: contain;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.14);
    transition: transform 0.35s ease;
}

.gallery-card:hover .gallery-card-media.is-portrait .gallery-img-contain {
    transform: scale(1.03);
}

.gallery-card-zoom-hint {
    position: absolute;
    bottom: 0.65rem;
    right: 0.65rem;
    z-index: 3;
    width: 34px;
    height: 34px;
    border-radius: 9999px;
    background: rgba(0, 8, 92, 0.82);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.25s ease, background-color 0.25s ease;
}

.gallery-card:hover .gallery-card-zoom-hint {
    opacity: 1;
}

.gallery-card-zoom-hint:hover {
    background: #ff304f;
}

.gallery-card-body {
    padding: 1.125rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.gallery-card-category {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ff304f;
    background-color: rgba(255, 48, 79, 0.08);
    padding: 0.2rem 0.55rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.gallery-card-title {
    font-size: 1.08rem;
    font-weight: 700;
    color: #00085c;
    line-height: 1.35;
    margin-bottom: 0.4rem;
}

.gallery-card-desc {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
}

/* Modal Lightbox */
#gg-screen {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 8, 92, 0.93);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

#gg-screen.active {
    display: flex;
    opacity: 1;
}

.gg-modal-content {
    position: relative;
    max-width: 960px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gg-modal-content img {
    max-width: 100%;
    max-height: 72vh;
    width: auto;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
    object-fit: contain;
    background: #0f172a;
}

.gg-modal-caption {
    margin-top: 1rem;
    color: #ffffff;
    max-width: 680px;
    padding: 0 1rem;
}

.gg-modal-caption h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.gg-modal-caption p {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.5;
}

.gg-close {
    position: fixed;
    top: 18px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 28px;
    line-height: 1;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background-color 0.2s;
    user-select: none;
    z-index: 10001;
}

.gg-close:hover {
    transform: scale(1.08);
    background-color: #ff304f;
    border-color: #ff304f;
}

.gg-prev, .gg-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 26px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    z-index: 10001;
}

.gg-prev:hover, .gg-next:hover {
    background-color: #ff304f;
    border-color: #ff304f;
    transform: translateY(-50%) scale(1.08);
}

.gg-prev { left: 16px; }
.gg-next { right: 16px; }

@media (max-width: 640px) {
    .gg-prev, .gg-next {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }
    .gg-prev { left: 8px; }
    .gg-next { right: 8px; }
    .gg-close {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 24px;
    }
}
