/* ============================================================
   CHIQBY — Gallery Image Page Styles  (gallery-img.css)
   Brand: Red (#e3000e), Gold (#ffd700), Dark (#111)
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
    --gi-red: #e3000e;
    --gi-red-dark: #a30000;
    --gi-gold: #ffd700;
    --gi-dark: #111111;
    --gi-dark2: #1e1e1e;
    --gi-light: #f7f7f7;
    --gi-white: #ffffff;
    --gi-gray: #666666;
    --gi-border: #e8e8e8;
    --gi-radius: 14px;
    --gi-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --gi-transition: all 0.36s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ============================================================
   HERO
   ============================================================ */
.gi-hero {
    position: relative;
    background: linear-gradient(135deg, #3a0000 0%, #a30000 45%, #e3000e 100%);
    min-height: 380px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-bottom: 0;
}

.gi-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(227, 0, 14, 0.18) 0%, transparent 55%),
        radial-gradient(circle at 80% 20%, rgba(255, 215, 0, 0.07) 0%, transparent 50%);
    pointer-events: none;
}

/* subtle dot-grid texture */
.gi-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
}

.gi-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.gi-hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 110px 15px 90px;
}

.gi-hero__breadcrumb {
    margin-bottom: 18px;
}

.gi-hero__breadcrumb .breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.gi-hero__breadcrumb .breadcrumb-item,
.gi-hero__breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.55);
    font-family: 'Roboto', sans-serif;
    font-size: 0.85rem;
}

.gi-hero__breadcrumb .breadcrumb-item a:hover {
    color: var(--gi-gold);
}

.gi-hero__breadcrumb .breadcrumb-item.active {
    color: var(--gi-gold);
}

.gi-hero__breadcrumb .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.3);
}

.gi-hero__title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(2.6rem, 6vw, 4.5rem);
    font-weight: 700;
    color: var(--gi-white);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-bottom: 18px;
    animation: gi-fadeInUp 0.8s ease both;
}

.gi-hero__subtitle {
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.65);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.7;
    animation: gi-fadeInUp 0.9s ease 0.15s both;
}

.gi-hero__wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 3;
}

.gi-hero__wave svg {
    width: 100%;
    height: 100%;
}


/* ============================================================
   FILTER BAR
   ============================================================ */
.gi-filter-bar {
    background: var(--gi-white);
    padding: 30px 0;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.gi-filter__tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.gi-filter__btn {
    font-family: 'Oswald', sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 10px 26px;
    border-radius: 50px;
    border: 2px solid var(--gi-border);
    background: transparent;
    color: var(--gi-gray);
    cursor: pointer;
    transition: var(--gi-transition);
    outline: none;
}

.gi-filter__btn:hover {
    border-color: var(--gi-red);
    color: var(--gi-red);
    background: rgba(227, 0, 14, 0.05);
}

.gi-filter__btn--active {
    background: var(--gi-red);
    border-color: var(--gi-red);
    color: var(--gi-white);
    box-shadow: 0 6px 20px rgba(227, 0, 14, 0.3);
}

.gi-filter__btn--active:hover {
    background: var(--gi-red-dark);
    border-color: var(--gi-red-dark);
    color: var(--gi-white);
}


/* ============================================================
   GALLERY SECTION & GRID
   ============================================================ */
.gi-gallery {
    padding: 70px 0 100px;
    background: var(--gi-white);
}

.gi-grid {
    columns: 4 260px;
    column-gap: 18px;
}

.gi-item {
    break-inside: avoid;
    margin-bottom: 18px;
    border-radius: var(--gi-radius);
    overflow: hidden;
    position: relative;
    display: block;

    /* scroll reveal — hidden by default */
    opacity: 0;
    transform: translateY(28px) scale(0.97);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.35s ease;
}

.gi-item.gi-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.gi-item:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    z-index: 2;
}

.gi-item__link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--gi-radius);
    text-decoration: none;
}

.gi-item__img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.55s ease;
}

.gi-item:hover .gi-item__img {
    transform: scale(1.07);
}


/* Overlay */
.gi-item__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(17, 17, 17, 0.88) 0%,
            rgba(163, 0, 0, 0.40) 50%,
            transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gi-item:hover .gi-item__overlay {
    opacity: 1;
}

.gi-item__overlay-inner {
    width: 100%;
}

.gi-item__zoom-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--gi-red);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    margin: 0 auto 12px;
    transform: scale(0.7);
    transition: transform 0.35s ease 0.05s;
    box-shadow: 0 4px 18px rgba(227, 0, 14, 0.45);
}

.gi-item:hover .gi-item__zoom-icon {
    transform: scale(1);
}

.gi-item__caption {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin: 0 0 8px;
    line-height: 1.5;
}

.gi-item__tag {
    display: inline-block;
    font-family: 'Roboto', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gi-gold);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 30px;
    padding: 3px 12px;
}


/* ============================================================
   EMPTY STATE
   ============================================================ */
.gi-empty {
    text-align: center;
    padding: 80px 20px;
}

.gi-empty__icon {
    font-size: 4rem;
    color: var(--gi-border);
    margin-bottom: 24px;
}

.gi-empty__title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    color: var(--gi-dark);
    text-transform: uppercase;
    margin-bottom: 14px;
}

.gi-empty__text {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    color: var(--gi-gray);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.8;
}

.gi-empty__text code {
    background: #f0f0f0;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.9em;
    color: var(--gi-red);
}


/* ============================================================
   LIGHTBOX MODAL
   ============================================================ */
.gi-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gi-lightbox[hidden] {
    display: none;
}

.gi-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 8, 8, 0.94);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    cursor: pointer;
}

.gi-lightbox__wrap {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 92vw;
    max-height: 90vh;
}

.gi-lightbox__stage {
    text-align: center;
    max-width: 80vw;
}

.gi-lightbox__img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    transition: opacity 0.3s ease;
}

.gi-lightbox__caption {
    font-family: 'Roboto', sans-serif;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 14px;
    min-height: 1.4em;
}

.gi-lightbox__close {
    position: fixed;
    top: 22px;
    right: 26px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--gi-transition);
    z-index: 3;
}

.gi-lightbox__close:hover {
    background: var(--gi-red);
    border-color: var(--gi-red);
    transform: rotate(90deg);
}

.gi-lightbox__nav {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--gi-transition);
    flex-shrink: 0;
}

.gi-lightbox__nav:hover {
    background: var(--gi-red);
    border-color: var(--gi-red);
    transform: scale(1.1);
}

.gi-lightbox__nav[style*="display: none"] {
    visibility: hidden;
    pointer-events: none;
}


/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */
@keyframes gi-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1199px) {
    .gi-grid {
        columns: 3 220px;
    }
}

@media (max-width: 767px) {
    .gi-hero__content {
        padding: 90px 15px 70px;
    }

    .gi-filter-bar {
        padding: 20px 0;
    }

    .gi-filter__btn {
        padding: 8px 18px;
        font-size: 0.78rem;
    }

    .gi-gallery {
        padding: 50px 0 70px;
    }

    .gi-grid {
        columns: 2 150px;
        column-gap: 12px;
    }

    .gi-item {
        margin-bottom: 12px;
    }

    .gi-lightbox__wrap {
        flex-direction: column;
        gap: 14px;
    }

    .gi-lightbox__stage {
        max-width: 95vw;
    }

    .gi-lightbox__nav {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}

@media (max-width: 479px) {
    .gi-grid {
        columns: 1;
    }

    .gi-lightbox__nav {
        display: none;
    }
}