/* 
 * Advanced Portfolio Filter Styles
 */

/* Container for the HTML widget, helps center the menu. */
.sticky-glass-activator .elementor-widget-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

/* --- HIDE/SHOW ANIMATION --- */
.sticky-glass-activator.is-sticky {
    transition: transform 0.4s cubic-bezier(0.6, 0.04, 0.98, 0.335), opacity 0.3s ease-in-out;
    transform: translateY(0);
    opacity: 1;
}
.sticky-glass-activator.is-sticky.is-hiding {
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
}

/* --- ARROW ANIMATION --- */
.arrow-anim-svg-container {
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 100%;
    overflow: hidden;
}
.arrow-move-svg {
  display: block;
  width: 32px;
  height: 32px;
  animation: arrow-move-lr 2s ease-in-out infinite alternate;
}
@keyframes arrow-move-lr {
  0%   { transform: translateX(-150px); }
  100% { transform: translateX(150px); }
}

/* The main wrapper for the glass effect. ALWAYS VISIBLE. */
.liquidGlass-wrapper {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    cursor: default;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    border-radius: 0.2rem;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: scale(1.0);
    width: 100%;
    overflow: visible;
    max-height: 70px;
}
.sticky-glass-activator.is-sticky .liquidGlass-wrapper {
    animation: elastic-shrink-out 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}
.sticky-glass-activator.is-sticky .liquidGlass-wrapper:hover {
    animation: elastic-grow-in 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
}

/* --- The Original Glass Layers (Restored) --- */
.liquidGlass-effect {
    position: absolute;
    inset: 0;
    z-index: 0;
    border-radius: inherit;
    overflow: hidden;
    isolation: isolate;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    filter: url(#glass-distortion);
}
.liquidGlass-tint {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: none;
}
.liquidGlass-shine {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    overflow: hidden;
    box-shadow: inset 0.5px 0.5px 0.5px 0.5px rgb(0,0,0),
                inset -0.5px -0.5px 0.5px 0.5px rgb(0,0,0);
}
.liquidGlass-content {
    z-index: 3;
    width: 100%;
    overflow: visible;
}

/* === ADVANCED FILTER BAR STYLES === */
.portfolio-filter {
    display: flex;
    flex-direction: row;
    gap: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 8px 0;
    width: 100%;
    min-height: 48px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* Desktop only scrollbar - always visible when content overflows */
@media (hover: hover) {
    .portfolio-filter {
        overflow-x: scroll;
    }
    
    .portfolio-filter::-webkit-scrollbar {
        height: 3px;
        background: transparent;
    }
    
    .portfolio-filter::-webkit-scrollbar-track {
        background: transparent;
    }
    
    .portfolio-filter::-webkit-scrollbar-thumb {
        background: #000000;
        cursor: grab;
    }
    
    .portfolio-filter::-webkit-scrollbar-thumb:active {
        cursor: grabbing;
    }
}

/* Mobile/Tablet - hide scrollbar, use touch scrolling */
@media (hover: none) {
    .portfolio-filter {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .portfolio-filter::-webkit-scrollbar {
        display: none;
    }
}

.filter-button {
    position: relative;
    background-color: transparent !important;
    border: none;
    color: #333;
    font-family: var(--e-global-typography-1c54370-font-family), Serif;
    font-size: var(--e-global-typography-1c54370-font-size);
    font-weight: var(--e-global-typography-1c54370-font-weight);
    text-transform: var(--e-global-typography-1c54370-text-transform);
    line-height: var(--e-global-typography-1c54370-line-height);
    letter-spacing: var(--e-global-typography-1c54370-letter-spacing);
    padding: 0.2rem;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.filter-button:hover {
    transform: translateY(-3px);
    background-color: transparent !important;
}
.filter-button::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background-color: rgba(0, 0, 0, 0.4);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.filter-button:hover::after {
    transform: scaleX(1);
}
.filter-button.active::after {
    transform: scaleX(1);
    transition: none;
}

/* --- KEYFRAME ANIMATIONS FOR THE ELASTIC EFFECT --- */
@keyframes elastic-grow-in {
    0% { transform: scale(1.0); }
    60% { transform: scale(1.1); }
    80% { transform: scale(1.04); }
    100% { transform: scale(1.05); }
}
@keyframes elastic-shrink-out {
    0% { transform: scale(1.05); }
    50% { transform: scale(0.97); }
    80% { transform: scale(1.01); }
    100% { transform: scale(1.0); }
}

/* --- PORTFOLIO ITEM AND CONTAINER TRANSITIONS (from original portfolio_filters.css) --- */
.portfolio-item {
    opacity: 1;
    transform: translateY(0);
    will-change: transform, opacity;
}
.portfolio-item.hidden {
    opacity: 0;
    pointer-events: none;
}
.elementor-element {
    will-change: transform;
    backface-visibility: hidden;
}
.portfolio-list {
    min-height: 100vh;
    transition: min-height 0.3s cubic-bezier(0.4,0,0.2,1);
}
.customMarginPortfolio {
    transition: opacity 0.4s cubic-bezier(0.4,0,0.2,1), margin 0.3s cubic-bezier(0.4,0,0.2,1);
    opacity: 1;
}
.customMarginPortfolio[style*="display: none"] {
    opacity: 0;
}
/* --- SMALL MOBILE (500px and below) --- */
@media (max-width: 500px) {
	/* Portfolio filters mobile styles */
	.liquidGlass-wrapper {
		max-width: 350px;
		width: 100%;
		overflow: hidden;
		margin-left: auto;
		margin-right: auto;
		min-height: 68px;
	}
	.portfolio-filter {
		display: flex;
		flex-direction: row;
		gap: 18px;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 4px;
		margin-bottom: -4px;
		width: 100%;
		max-width: 350px;
		min-height: 48px;
		align-items: center;
		padding-left: 30px;
	}
	.filter-button {
		flex: 0 0 auto;
		white-space: nowrap;
	}
	.liquidGlass-wrapper .portfolio-filter {
		padding-left: 0;
		justify-content: flex-start;
	}
}
/* --- SMALL SCREENS (620px and below) --- */
@media (max-width: 620px) {
	/* Portfolio filters small screen styles */
	.liquidGlass-wrapper {
		width: calc(100vw - 40px);
		max-width: 800px;
		min-width: 350px;
		overflow: hidden;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 12px;
		min-height: 90px;
		justify-content: flex-start !important;
		padding-left: 0;
		padding-right: 0;
	}
	.portfolio-filter {
		display: flex;
		flex-direction: row;
		gap: 18px;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 8px;
		margin-bottom: -8px;
		width: 100%;
		min-height: 48px;
		align-items: center;
		padding-left: 0;
		padding-right: 30px;
		cursor: grab;
		user-select: none;
		justify-content: flex-start;
	}
	.portfolio-filter:active {
		cursor: grabbing;
	}

	.filter-button {
		flex: 0 0 auto;
		white-space: nowrap;
	}
	.liquidGlass-wrapper .portfolio-filter {
		padding-left: 20px;
		padding-right: 20px;
		justify-content: flex-start;
	}
	
	/* Show arrow animation on small screens */
	.arrow-anim-svg-container {
		display: flex;
	}
    #filterArrow {
        display: block !important;
    }
}
@media (max-width: 1024px) {
    #filterArrow {
        display: none;
    }
}