/* Galerija kategorija — stranice i kartice na početnoj */

/* Header u normalnom toku — sadržaj ispod topbara i nav menija */
.gallery-category-page header.main-header{
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 1300px !important;
    margin: 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
}

.gallery-category-page header.main-header .header-sticky{
    position: relative;
}

.gallery-category-page header.main-header .header-sticky.active{
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    max-width: 1300px;
    margin: 0 auto;
    z-index: 200;
}

.gallery-category-page .page-gallery{
    margin-top: 0 !important;
    padding: 2rem 0 110px;
}

.page-gallery .section-title.section-title-center h3,
.page-gallery .section-title.section-title-center h1,
.page-gallery .section-title.section-title-center h2{
    display: block;
    width: 100%;
}

.page-gallery .section-title.section-title-center h3{
    padding-left: 0;
}

.page-gallery .section-title.section-title-center h3::before{
    display: none;
}

.page-gallery .section-title.section-title-center h1,
.page-gallery .section-title.section-title-center h2{
    margin-top: 0.15rem;
}

.gallery-breadcrumb{
    display: none;
}

.gallery-breadcrumb a{
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.2s ease;
}

.gallery-breadcrumb a:hover{
    color: var(--accent-color);
}

.gallery-breadcrumb .sep{
    opacity: 0.45;
}

.gallery-category-nav{
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    margin: 0 0 2.25rem;
}

.gallery-category-nav a{
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.2rem;
    border-radius: 100px;
    border: 1px solid var(--divider-color);
    background: var(--secondary-color);
    color: var(--primary-color);
    font-size: 0.92rem;
    font-weight: 700;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.gallery-category-nav a:hover{
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-1px);
}

.gallery-category-nav a.is-active{
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.gallery-meta-bar{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
    padding: 1rem 1.25rem;
    border-radius: 20px;
    background: var(--secondary-color);
    border: 1px solid var(--divider-color);
}

.gallery-meta-bar p{
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-color);
}

.gallery-meta-bar strong{
    color: var(--primary-color);
}

#page-gallery-grid .photo-gallery{
    height: calc(100% - 24px);
    margin-bottom: 24px;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid var(--divider-color);
    background: var(--secondary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#page-gallery-grid .photo-gallery:hover{
    transform: translateY(-4px);
    box-shadow: 0 16px 40px #6e5f8714;
}

#page-gallery-grid .photo-gallery a{
    display: block;
    cursor: zoom-in;
}

.gallery-loading{
    text-align: center;
    padding: 2rem;
    color: var(--text-color);
}

#page-gallery-grid .photo-gallery figure{
    margin: 0;
    border-radius: 30px;
    overflow: hidden;
}

#page-gallery-grid .gallery-item{
    contain-intrinsic-size: 400px 332px;
}

#page-gallery-grid .photo-gallery img{
    width: 100%;
    aspect-ratio: 1 / 0.82;
    object-fit: cover;
    border-radius: 30px;
    transition: transform 0.45s ease;
}

#page-gallery-grid .photo-gallery:hover img{
    transform: scale(1.04);
}

.gallery-lightbox-sources{
    position: fixed;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
}

.gallery-lightbox-sources a,
.gallery-lightbox-sources img{
    display: block;
    width: 1px;
    height: 1px;
}

/* Lightbox — uvećanje i listanje svih slika u kategoriji */
.mfp-gallery-lightbox.mfp-bg{
    background: #4A3F58;
    opacity: 0.94;
}

.mfp-gallery-lightbox img.mfp-img{
    padding: 12px 0;
    max-height: calc(100vh - 48px);
    width: auto;
    max-width: calc(100vw - 120px);
    height: auto;
    display: block;
    margin: 0 auto;
    opacity: 1;
    visibility: visible;
    background: none !important;
    object-fit: contain;
}

@media (min-width: 992px){
    .mfp-gallery-lightbox .mfp-container{
        padding-left: 70px;
        padding-right: 70px;
    }

    .mfp-gallery-lightbox img.mfp-img{
        padding: 16px 0;
        max-height: calc(100vh - 40px) !important;
        max-width: calc(100vw - 180px) !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain;
    }

    .mfp-gallery-lightbox .mfp-figure:after{
        top: 16px;
        bottom: 16px;
    }
}

.mfp-gallery-lightbox .mfp-figure{
    display: block;
}

.mfp-gallery-lightbox.mfp-loading .mfp-figure{
    display: block;
}

.mfp-gallery-lightbox .mfp-figure:after{
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

.mfp-gallery-lightbox .mfp-arrow{
    opacity: 0.85;
}

.mfp-gallery-lightbox .mfp-arrow:hover,
.mfp-gallery-lightbox .mfp-arrow:focus{
    opacity: 1;
}

.mfp-gallery-lightbox .mfp-counter{
    top: auto;
    bottom: 18px;
    right: 50%;
    transform: translateX(50%);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: rgba(74, 63, 88, 0.78);
    padding: 0.4rem 0.9rem;
    border-radius: 100px;
}

.mfp-gallery-lightbox .mfp-title{
    text-align: center;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.92rem;
    padding-top: 0.75rem;
}

.mfp-gallery-lightbox .mfp-close{
    color: #fff;
    opacity: 0.85;
}

.mfp-gallery-lightbox .mfp-close:hover{
    opacity: 1;
}

.gallery-pagination-nav{
    margin-top: 2rem;
}

.gallery-pagination-list{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gallery-pagination-link{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.85rem;
    border-radius: 100px;
    border: 1px solid var(--divider-color);
    background: var(--secondary-color);
    color: var(--primary-color);
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gallery-pagination-link:hover{
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.gallery-pagination-link.is-active{
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    pointer-events: none;
}

.gallery-pagination-link.is-disabled{
    opacity: 0.35;
    cursor: not-allowed;
}

.gallery-pagination-ellipsis span{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 44px;
    color: var(--text-color);
    opacity: 0.6;
}

.gallery-page-cta{
    margin-top: 3rem;
    text-align: center;
}

.gallery-page-cta p{
    max-width: 36rem;
    margin: 0 auto 1.25rem;
}

.gallery-error{
    text-align: center;
    padding: 2rem;
    border-radius: 20px;
    background: var(--secondary-color);
    border: 1px solid var(--divider-color);
}

/* Kartice kategorija na početnoj */
.gallery-categories-section{
    padding-bottom: 40px;
}

.gallery-categories-grid{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.gallery-category-card{
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid var(--divider-color);
    background: var(--secondary-color);
    text-decoration: none;
    min-height: 280px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-category-card:hover{
    transform: translateY(-5px);
    box-shadow: 0 18px 45px #6e5f8718;
}

.gallery-category-card img{
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.gallery-category-card:hover img{
    transform: scale(1.05);
}

.gallery-category-card-body{
    padding: 1.1rem 1.25rem 1.25rem;
}

.gallery-category-card-body h3{
    margin: 0 0 0.35rem;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.gallery-category-card-body p{
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    color: var(--text-color);
    opacity: 0.88;
}

.gallery-category-card-count{
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.65rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--accent-color);
}

.offer-card-list a{
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.offer-card-list a:hover{
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

.offer-card--accent .offer-card-list a:hover,
.offer-card--dark .offer-card-list a:hover{
    color: #fff;
    border-bottom-color: #fff;
}

@media (max-width: 1199px){
    .gallery-categories-grid{
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px){
    .gallery-category-page .page-gallery{
        padding: 32px 0 80px;
    }

    .gallery-categories-grid{
        grid-template-columns: 1fr;
    }

    .gallery-category-card{
        min-height: 0;
    }

    .gallery-meta-bar{
        flex-direction: column;
        align-items: flex-start;
    }

    .gallery-category-nav a{
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }
}
