/* Container */
.apm-portfolio-grid {
    width: 100%;
}

/* Filters */
.apm-filters {
    margin-bottom: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.apm-filter-button {
font-style: normal;
    font-weight: 300;
    font-size: var(--global-kb-font-size-sm, 0.9rem);
    line-height: 1.1em;
    font-family: 'Open Sans';
    cursor: pointer;
        color: var(--global-palette3, #1A202C);
    background: none;
        box-shadow: none
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.apm-filter-button:hover {

        background: #000;
    color: #fff;

}

.apm-filter-button.is-active {
font-weight:400;
    background:none;
   color: #000;
}

/* Masonry grid */
.apm-grid {
    margin: 0 -0.75rem;
}

.apm-grid::after {
    content: "";
    display: block;
    clear: both;
}
.apm-item h3 { font-size: 16px; font-weight: 400;    color: #000;}
.apm-item-excerpt p {font-size:12px;   color: #000;}
.apm-item h3:before {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(-15px);
    pointer-events: none;
    content: "";
    width: 30px;
    height: 30px;
    position: absolute;
    z-index: 150;
    left: calc(50% - 15px);
    background: url(/wow/wp-content/uploads/2025/12/buttons1.png) #aaad 50% 50%;
    background-size: contain;
    top: -10px;
    border: 2px solid #fff;
    border-radius: 50%;
    display: inline-block;
}}

.apm-item p {font-size:12px; color:#000;}
/* Sizer + items */
.apm-grid-sizer,
.apm-item {
    width: 100%;
}

/* Desktop: 4 columns */
@media (min-width: 1024px) {
    .apm-grid-sizer,
    .apm-item {
        width: 25%;
    }
}

/* Tablet: 3 columns */
@media (min-width: 640px) and (max-width: 1023px) {
    .apm-grid-sizer,
    .apm-item {
        width: 50%;
    }
}

/* GRID SPACING gutters */
.apm-grid {
    margin: -6px;
    position: relative;
}
.apm-item {
    padding: 6px;
    position: relative;
    z-index: 1;
}

/* ITEM LINK Ã¢â‚¬â€ ALLOW OVERFLOW */
.apm-item-link {
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    overflow: visible !important;   
    z-index: 1;
}

/* IMAGE WRAPPER  MUST allow overflow */
.apm-image-wrap {
    position: relative;
    overflow: visible !important;
}

/* IMAGE  lifts upward */
.apm-item-image {
    display: block;
    width: 100%;
    height: auto;
    transform: translateY(0);
    transition: transform 0.35s;
}

/* CONTENT PANEL positioned below item, can float upward */
.apm-content-wrap {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0px;           
    height: 100px;
    padding: 10px 12px;
    background: #fff;
    opacity: 0;
    transform: translateY(0);
    transition: opacity 0.25s ease, bottom 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    z-index: 10;
    text-align:center;
}

@media (hover: hover) and (pointer: fine) {
    .apm-item:hover {
        z-index: 999 !important;  
    }
    .apm-item-link:hover .apm-item-image {
        transform: translateY(-60px); 
    }
    .apm-item-link:hover .apm-content-wrap {
        bottom: 0;
        opacity: 1;
        transform: translateY(50px);
    }
}

/* TOUCH devices: no hover */
@media (hover: none) and (pointer: coarse) {
    .apm-content-wrap {
        display: none;
    }
}

/* KEYBOARD TAB FOCUS â€” identical behavior to hover */
.apm-item-link:focus,
.apm-item-link:focus-visible {
    outline: none; /* optional: hides default blue outline */
}

.apm-item:focus-within {
    z-index: 999 !important;  /* lift above neighbors */
}

.apm-item-link:focus .apm-item-image,
.apm-item-link:focus-visible .apm-item-image {
    transform: translateY(-70px); /* same as hover */
}

.apm-item-link:focus .apm-content-wrap,
.apm-item-link:focus-visible .apm-content-wrap {
    bottom: 0;
    opacity: 1;
    transform: translateY(50px); /* same as hover */
}

/* FORCE filtering to hide items again */
.apm-grid .apm-item.apm-item--hidden {
    display: none !important;
}

.apm-item-image {
    display: block;
    width: 100%;
    height: auto;
    box-shadow: 0 -8px 0 0 #fff;  
}

/* Start hidden for animation */
.apm-item {
    opacity: 1;
    transition: opacity 0.2s ease;
}

.apm-item.apm-fading-out {
    opacity: 0;
}

.apm-item.apm-fading-in {
    opacity: 1;
}

/* Hide items until Masonry has finished laying out */
.apm-item.is-loading-item {
    visibility: hidden;
    opacity: 0;
}

.apm-item.is-loaded-item {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.25s ease;
}
.apm-item.pre-masonry {
    display: none;
}
.apm-item.post-masonry {
    display: block;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.apm-item.post-masonry.apm-visible {
    opacity: 1;
}



/* Spinner container */
.apm-loading-spinner {
    position: absolute;
    top: 20vh;
    left: 50%;
    transform: translate(-50%, -50%);
    
    width: 48px;
    height: 48px;
    border: 4px solid #ddd;
    border-top-color: #333;
    border-radius: 50%;
    animation: apm-spin 0.8s linear infinite;

    z-index: 9999;

    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* Hide the spinner after load */
.apm-loading-done .apm-loading-spinner {
    opacity: 0;
    visibility: hidden;
}

/* Masonry’s pre-layout phase */
.apm-portfolio-grid {
    position: relative;
}

/* Keyframes */
@keyframes apm-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

