/* Portfolio Publish by Helal - front end */
.hpp-wrap { --hpp-accent: #d0021b; --hpp-card-bg: #fff5f6; --hpp-radius: 14px; --hpp-cols: 3; --hpp-cols-t: 2; --hpp-cols-m: 1; --hpp-aspect: 16/9; width: 100%; box-sizing: border-box; }
.hpp-wrap *, .hpp-wrap *::before, .hpp-wrap *::after { box-sizing: border-box; }

/* Filters */
.hpp-wrap .hpp-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; padding: 0; }
.hpp-wrap button.hpp-filter { appearance: none; -webkit-appearance: none; margin: 0; min-height: 0; padding: 11px 18px; border: 1px solid #ececec; border-radius: 4px; background: #fff; color: var(--hpp-accent); font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1; letter-spacing: 0; text-transform: none; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); transition: background .2s, color .2s, border-color .2s, transform .2s; }
.hpp-wrap button.hpp-filter:hover { transform: translateY(-1px); border-color: var(--hpp-accent); }
.hpp-wrap button.hpp-filter.is-active { background: var(--hpp-accent); border-color: var(--hpp-accent); color: #fff; }
.hpp-wrap button.hpp-filter:focus-visible { outline: 2px solid var(--hpp-accent); outline-offset: 2px; }

/* Grid */
.hpp-wrap .hpp-grid { display: grid; grid-template-columns: repeat(var(--hpp-cols), minmax(0, 1fr)); gap: 22px; transition: opacity .25s; }
.hpp-wrap.is-loading .hpp-grid { opacity: .4; pointer-events: none; }
.hpp-wrap .hpp-none { grid-column: 1 / -1; margin: 20px 0; text-align: center; color: #777; }

.hpp-wrap .hpp-card { display: block; padding: 14px 14px 12px; border: 1px solid rgba(0, 0, 0, .06); border-radius: var(--hpp-radius); background: var(--hpp-card-bg); cursor: pointer; transition: transform .25s, box-shadow .25s; -webkit-tap-highlight-color: transparent; }
.hpp-wrap .hpp-card:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(0, 0, 0, .12); }
.hpp-wrap .hpp-card:focus-visible { outline: 2px solid var(--hpp-accent); outline-offset: 2px; }

.hpp-wrap .hpp-thumb { position: relative; width: 100%; aspect-ratio: var(--hpp-aspect); overflow: hidden; border-radius: max(0px, calc(var(--hpp-radius) - 4px)); background: #15151a; }
.hpp-wrap .hpp-thumb img, .hpp-wrap .hpp-thumb video { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; object-fit: cover; display: block; transition: transform .5s; pointer-events: none; }
.hpp-wrap .hpp-card:hover .hpp-thumb img, .hpp-wrap .hpp-card:hover .hpp-thumb video { transform: scale(1.05); }
.hpp-wrap .hpp-noimg { position: absolute; inset: 0; background: linear-gradient(135deg, #2a2a33, #111); }

.hpp-wrap .hpp-play { position: absolute; left: 50%; top: 50%; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; backdrop-filter: blur(2px); transition: background .2s, transform .2s; }
.hpp-wrap .hpp-play svg { margin-left: 3px; }
.hpp-wrap .hpp-card:hover .hpp-play { background: var(--hpp-accent); transform: scale(1.08); }

.hpp-wrap .hpp-count { position: absolute; right: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 20px; background: rgba(0, 0, 0, .62); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; }

.hpp-wrap .hpp-title { margin: 14px 4px 6px; padding: 0; color: #111; font-size: 17px; font-weight: 700; line-height: 1.35; letter-spacing: 0; text-transform: none; }

/* Pagination */
.hpp-wrap .hpp-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 28px; }
.hpp-wrap .hpp-pager:empty { display: none; }
.hpp-wrap .hpp-pager button { appearance: none; -webkit-appearance: none; min-width: 40px; min-height: 0; margin: 0; padding: 11px 14px; border: 1px solid #e3e3e3; border-radius: 6px; background: #fff; color: #222; font-family: inherit; font-size: 14px; font-weight: 600; line-height: 1; text-transform: none; cursor: pointer; transition: all .2s; }
.hpp-wrap .hpp-pager button:hover:not(:disabled) { border-color: var(--hpp-accent); color: var(--hpp-accent); }
.hpp-wrap .hpp-pager button.is-active { background: var(--hpp-accent); border-color: var(--hpp-accent); color: #fff; }
.hpp-wrap .hpp-pager button:disabled { opacity: .4; cursor: default; }
.hpp-wrap .hpp-pager .hpp-more { padding: 13px 34px; background: var(--hpp-accent); border-color: var(--hpp-accent); color: #fff; }
.hpp-wrap .hpp-pager .hpp-more:hover { color: #fff; filter: brightness(.9); }
.hpp-wrap .hpp-dots { align-self: center; color: #888; }

@media (max-width: 1024px) {
	.hpp-wrap .hpp-grid { grid-template-columns: repeat(var(--hpp-cols-t), minmax(0, 1fr)); }
}
@media (max-width: 640px) {
	.hpp-wrap .hpp-grid { grid-template-columns: repeat(var(--hpp-cols-m), minmax(0, 1fr)); gap: 16px; }
	.hpp-wrap .hpp-title { font-size: 15px; }
	.hpp-wrap .hpp-play { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
}

/* ---------------- Lightbox ---------------- */
html.hpp-lock { overflow: hidden; }
.hpp-lb { --hpp-accent: #d0021b; position: fixed; inset: 0; z-index: 999999; display: none; align-items: center; justify-content: center; padding: 20px 0; font-family: inherit; }
.hpp-lb.is-open { display: flex; animation: hppFade .25s ease; }
.hpp-lb *, .hpp-lb *::before, .hpp-lb *::after { box-sizing: border-box; }
.hpp-lb-backdrop { position: absolute; inset: 0; background: rgba(8, 8, 12, .9); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.hpp-lb-box { position: relative; width: min(1100px, 94vw); max-height: 100%; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.hpp-lb-box::-webkit-scrollbar { display: none; }

.hpp-lb-stage { position: relative; height: min(64vh, 640px); overflow: hidden; border-radius: 14px; background: #000; box-shadow: 0 20px 60px rgba(0, 0, 0, .55); }
.hpp-lb-slide { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.hpp-lb-slide > * { animation-duration: .35s; animation-fill-mode: both; animation-timing-function: ease; }
.hpp-lb-slide img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.hpp-lb-slide video { display: block; width: 100%; height: 100%; background: #000; object-fit: contain; outline: 0; }
.hpp-lb-slide iframe { display: block; width: 100%; height: 100%; border: 0; background: #000; }
.hpp-in-next { animation-name: hppInNext; }
.hpp-in-prev { animation-name: hppInPrev; }
.hpp-in-fade { animation-name: hppFade; }

@keyframes hppInNext { from { opacity: 0; transform: translateX(70px); } to { opacity: 1; transform: none; } }
@keyframes hppInPrev { from { opacity: 0; transform: translateX(-70px); } to { opacity: 1; transform: none; } }
@keyframes hppFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hppProg { from { width: 0; } to { width: 100%; } }

.hpp-lb button { appearance: none; -webkit-appearance: none; margin: 0; padding: 0; border: 0; font-family: inherit; text-transform: none; letter-spacing: 0; cursor: pointer; }
.hpp-lb .hpp-lb-close { position: absolute; right: 18px; top: 14px; z-index: 5; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; font-size: 28px; line-height: 40px; text-align: center; transition: background .2s, transform .2s; }
.hpp-lb .hpp-lb-close:hover { background: var(--hpp-accent); transform: rotate(90deg); }
.hpp-lb .hpp-lb-nav { position: absolute; top: 50%; z-index: 4; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; background: rgba(0, 0, 0, .5); color: #fff; font-size: 30px; line-height: 44px; text-align: center; transition: background .2s, transform .2s; }
.hpp-lb .hpp-lb-nav:hover { background: var(--hpp-accent); }
.hpp-lb .hpp-lb-prev { left: 14px; }
.hpp-lb .hpp-lb-next { right: 14px; }
.hpp-lb.is-single .hpp-lb-nav, .hpp-lb.is-single .hpp-lb-thumbs, .hpp-lb.is-single .hpp-lb-count { display: none; }
.hpp-lb-count { position: absolute; left: 14px; top: 14px; z-index: 4; padding: 5px 11px; border-radius: 20px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; font-weight: 600; line-height: 1; }
.hpp-lb-progress { position: absolute; left: 0; bottom: 0; z-index: 4; display: block; width: 0; height: 3px; background: var(--hpp-accent); }

.hpp-lb-thumbs { display: flex; gap: 8px; margin-top: 12px; padding: 2px 2px 6px; overflow-x: auto; scrollbar-width: thin; }
.hpp-lb .hpp-lb-thumb { position: relative; flex: 0 0 auto; width: 84px; height: 54px; overflow: hidden; border-radius: 8px; background: #222; opacity: .5; outline: 2px solid transparent; outline-offset: -2px; transition: opacity .2s, outline-color .2s; }
.hpp-lb .hpp-lb-thumb:hover { opacity: .85; }
.hpp-lb .hpp-lb-thumb.is-active { opacity: 1; outline-color: var(--hpp-accent); }
.hpp-lb .hpp-lb-thumb img { display: block; width: 100%; height: 100%; margin: 0; object-fit: cover; }
.hpp-lb .hpp-lb-thumb i { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: rgba(0, 0, 0, .65); }
.hpp-lb .hpp-lb-thumb i::after { content: ""; position: absolute; left: 8px; top: 6px; border-left: 8px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }

.hpp-lb-info { padding: 14px 4px 4px; color: #fff; }
.hpp-lb-info .hpp-lb-title { margin: 0; color: #fff; font-size: 20px; font-weight: 700; line-height: 1.3; }
.hpp-lb-info .hpp-lb-desc { margin: 6px 0 0; color: rgba(255, 255, 255, .78); font-size: 14px; line-height: 1.6; white-space: pre-line; }
.hpp-lb-info .hpp-lb-desc:empty { display: none; }

@media (max-width: 640px) {
	.hpp-lb { padding: 56px 0 10px; align-items: flex-start; }
	.hpp-lb-box { width: 96vw; }
	.hpp-lb-stage { height: 46vh; border-radius: 10px; }
	.hpp-lb .hpp-lb-close { top: 8px; right: 10px; }
	.hpp-lb .hpp-lb-nav { width: 38px; height: 38px; margin-top: -19px; font-size: 24px; line-height: 35px; }
	.hpp-lb .hpp-lb-prev { left: 8px; }
	.hpp-lb .hpp-lb-next { right: 8px; }
	.hpp-lb .hpp-lb-thumb { width: 66px; height: 44px; }
	.hpp-lb-info .hpp-lb-title { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
	.hpp-wrap *, .hpp-lb * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
