:root {
    --pf-teal: #06938B;
    --pf-teal-hover: #057A73;
    --pf-accent: #06938B;
    --pf-dim: rgba(6, 147, 139, .08);
    --pf-border-t: rgba(6, 147, 139, .25);
    --pf-bg: #F8FAFC;
    --pf-bg2: #F1F5F9;
    --pf-card: #FFFFFF;
    --pf-text: #0F172A;
    --pf-sub: #475569;
    --pf-muted: #64748B;
    --pf-border: rgba(15, 23, 42, .08);
    --pf-link-bg: rgba(15, 23, 42, .04);
    --pf-ease: cubic-bezier(.23, 1, .32, 1);
}
html:not(.cf-light) {
    --pf-accent: #2DD4BF;
    --pf-dim: rgba(6, 147, 139, .14);
    --pf-border-t: rgba(45, 212, 191, .28);
    --pf-bg: #000000;
    --pf-bg2: #08090b;
    --pf-card: #0b0c0e;
    --pf-text: #F1F5F9;
    --pf-sub: #A3AEC2;
    --pf-muted: #8A94A6;
    --pf-border: rgba(255, 255, 255, .08);
    --pf-link-bg: rgba(255, 255, 255, .04);
}

.pf-page { background: var(--pf-bg); color: var(--pf-text); font-family: 'Poppins', sans-serif; padding-bottom: 64px; }
.pf-wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

.pf-hero { padding: 44px 0 8px; text-align: center; }
.pf-title { font-family: 'DM Serif Display', Georgia, serif; font-size: clamp(2.2rem, 4.6vw, 3.6rem); font-weight: 400; line-height: 1.1; letter-spacing: -.01em; margin: 0 0 12px; color: var(--pf-text); }
.pf-title em { font-style: italic; color: var(--pf-accent); }
.pf-sub { max-width: 540px; margin: 0 auto; font-size: .98rem; line-height: 1.75; color: var(--pf-sub); }

.pf-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 22px 0 6px; }
.pf-filter { height: 36px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--pf-border); background: transparent; color: var(--pf-muted); font-family: inherit; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; white-space: nowrap; transition: all .2s; }
.pf-filter:hover { border-color: var(--pf-border-t); color: var(--pf-accent); }
.pf-filter.active { background: var(--pf-dim); border-color: var(--pf-teal); color: var(--pf-accent); }

.pf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding-top: 28px; }

.pf-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--pf-card); border: 1px solid var(--pf-border); border-radius: 18px; overflow: hidden; transition: border-color .4s, transform .4s var(--pf-ease), box-shadow .4s; }
.pf-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2.5px; z-index: 2; background: linear-gradient(90deg, transparent, var(--pf-teal), transparent); transform: translateX(-100%); transition: transform .6s ease; }
.pf-card:hover { border-color: var(--pf-border-t); transform: translateY(-6px); box-shadow: 0 22px 50px -18px rgba(15, 23, 42, .2); }
html:not(.cf-light) .pf-card:hover { box-shadow: 0 22px 50px -18px rgba(0, 0, 0, .8); }
.pf-card:hover::before { transform: translateX(0); }
.pf-card[hidden] { display: none; }

.pf-thumb { position: relative; display: block; width: 100%; height: 0; padding-top: 62.5%; border: 0; background: #F1F5F9; cursor: pointer; overflow: hidden; }
html:not(.cf-light) .pf-thumb { background-color: #111316; background-image: url('/assets/brand/images/port-banner-dark.jpg'); }
.pf-thumb { background-image: url('/assets/brand/images/port-banner.jpg'); background-size: cover; background-position: center; background-repeat: no-repeat; }
.pf-thumb-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(6, 147, 139, .28); opacity: 0; transition: opacity .3s; }
.pf-thumb-overlay i { width: 46px; height: 46px; border-radius: 50%; background: rgba(255, 255, 255, .95); color: var(--pf-teal); display: flex; align-items: center; justify-content: center; font-size: 17px; transform: scale(.7); transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.pf-card:hover .pf-thumb-overlay, .pf-thumb:focus-visible .pf-thumb-overlay { opacity: 1; }
.pf-card:hover .pf-thumb-overlay i { transform: scale(1); }

.pf-card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 16px 16px; }
.pf-card-title { margin: 0 0 6px; font-size: .98rem; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; color: var(--pf-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-card-desc { flex: 1; margin: 0 0 14px; font-size: .8rem; line-height: 1.6; color: var(--pf-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-card-link { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 40px; border-radius: 11px; border: 1px solid var(--pf-border); background: var(--pf-link-bg); color: var(--pf-sub); font-family: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; text-decoration: none !important; transition: all .25s; }
.pf-card-link i { font-size: 11px; transition: transform .25s; }
.pf-card-link:hover { background: var(--pf-teal); border-color: var(--pf-teal); color: #fff; }
.pf-card-link:hover i { transform: translate(2px, -2px); }

.pf-empty { margin-top: 28px; padding: 70px 20px; text-align: center; color: var(--pf-muted); border: 1px dashed var(--pf-border); border-radius: 20px; }
.pf-empty i { font-size: 36px; color: var(--pf-accent); margin-bottom: 12px; display: block; }

.pf-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, .82); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.pf-modal.open { opacity: 1; visibility: visible; }

.pf-thumb img { position: absolute; top: 12px; left: 12px; width: calc(100% - 24px); height: calc(100% - 24px); max-width: none; object-fit: contain; object-position: center; display: block; transition: transform .6s ease; }
.pf-card:hover .pf-thumb img { transform: scale(1.05); }

.pf-modal-box { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 640px; max-height: min(640px, 84vh); border-radius: 24px; overflow: hidden; background: var(--pf-card); border: 1px solid var(--pf-border); box-shadow: 0 40px 100px rgba(0, 0, 0, .5); transform: scale(.95); transition: transform .3s ease; }
.pf-modal.open .pf-modal-box { transform: scale(1); }
.pf-modal-handle { display: none; }
.pf-modal-head { flex-shrink: 0; display: flex; align-items: center; gap: 16px; padding: 22px 22px 18px; border-bottom: 1px solid var(--pf-border); background: var(--pf-card); }
.pf-modal-thumb { position: relative; width: 76px; height: 76px; flex-shrink: 0; border-radius: 16px; overflow: hidden; background: var(--pf-bg2); border: 1px solid var(--pf-border); }
.pf-modal-thumb img { position: absolute; top: 6px; left: 6px; width: calc(100% - 12px); height: calc(100% - 12px); max-width: none; object-fit: contain; display: block; }
.pf-modal-headtext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pf-modal-title { margin: 0; font-family: 'DM Serif Display', Georgia, serif; font-size: 1.7rem; font-weight: 400; line-height: 1.15; color: var(--pf-text); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pf-modal-cat { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px; border-radius: 999px; background: var(--pf-dim); color: var(--pf-accent); font-size: .74rem; font-weight: 600; }
.pf-modal-cat span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-modal-close { flex-shrink: 0; align-self: flex-start; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--pf-teal); color: #fff; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .2s, transform .3s; }
.pf-modal-close:hover { background: var(--pf-teal-hover); transform: rotate(90deg); }
.pf-modal-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 22px 8px; scrollbar-width: thin; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pf-modal-desc { margin: 0 0 14px; font-size: .96rem; font-weight: 600; line-height: 1.65; color: var(--pf-text); white-space: pre-line; overflow-wrap: anywhere; }
.pf-modal-details { margin: 0 0 12px; font-size: .88rem; line-height: 1.8; color: var(--pf-muted); white-space: pre-line; overflow-wrap: anywhere; }
.pf-modal-foot { flex-shrink: 0; padding: 14px 22px 22px; border-top: 1px solid var(--pf-border); background: var(--pf-card); }
.pf-modal-btn { display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px; border-radius: 13px; background: var(--pf-teal); color: #fff !important; font-size: .9rem; font-weight: 700; text-decoration: none !important; position: relative; overflow: hidden; transition: background .25s, transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.pf-modal-btn::before { content: ''; position: absolute; top: 0; left: -100%; width: 60%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent); transition: left .5s ease; }
.pf-modal-btn:hover { background: var(--pf-teal-hover); transform: translateY(-2px); }
.pf-modal-btn:hover::before { left: 140%; }
.pf-modal-btn i { font-size: 12px; }
[hidden] { display: none !important; }

html.pf-lock, html.pf-lock body { overflow: hidden; }

.cf-js .pf-reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.cf-js .pf-reveal.visible { opacity: 1; transform: none; }

@media (max-width: 1100px) {
    .pf-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .pf-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    .pf-wrap { padding: 0 14px; }
    .pf-page { padding-bottom: 44px; }
    .pf-hero { padding: 30px 0 4px; }
    .pf-title { font-size: 2.2rem; }
    .pf-sub { font-size: .88rem; }
    .pf-filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; margin: 0 -14px; padding: 18px 14px 4px; scrollbar-width: none; }
    .pf-filters::-webkit-scrollbar { display: none; }
    .pf-filter { height: 32px; padding: 0 14px; font-size: 10.5px; }
    .pf-grid { gap: 12px; padding-top: 20px; }
    .pf-card { border-radius: 14px; }
    .pf-card-body { padding: 11px 11px 12px; }
    .pf-card-title { font-size: .86rem; margin-bottom: 4px; }
    .pf-card-desc { font-size: .72rem; line-height: 1.5; margin-bottom: 10px; }
    .pf-card-link { height: 34px; font-size: 11px; border-radius: 9px; gap: 6px; }
    .pf-card-link i { font-size: 9.5px; }
    .pf-thumb-overlay i { width: 38px; height: 38px; font-size: 14px; }
}
@media (max-width: 640px) {
    .pf-modal { align-items: flex-end; padding: 0; }
    .pf-modal-box { max-width: none; max-height: none; height: 80vh; height: 80dvh; border-radius: 22px 22px 0 0; border-bottom: 0; transform: translateY(100%); transition: transform .38s cubic-bezier(.22, 1, .36, 1); }
    .pf-modal.open .pf-modal-box { transform: translateY(0); }
    .pf-modal-handle { display: block; position: absolute; top: 7px; left: 50%; z-index: 4; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: var(--pf-border); }
    html:not(.cf-light) .pf-modal-handle { background: rgba(255, 255, 255, .2); }
    .pf-modal-head { gap: 12px; padding: 22px 16px 14px; }
    .pf-modal-thumb { width: 60px; height: 60px; border-radius: 14px; }
    .pf-modal-title { font-size: 1.35rem; }
    .pf-modal-cat { display: none !important; }
    .pf-modal-headtext { justify-content: center; }
    .pf-modal-close { align-self: center; }
    .pf-modal-close { width: 34px; height: 34px; font-size: 14px; }
    .pf-modal-scroll { padding: 16px 16px 6px; }
    .pf-modal-desc { font-size: .9rem; line-height: 1.6; }
    .pf-modal-details { font-size: .84rem; line-height: 1.7; }
    .pf-modal-foot { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); }
    .pf-modal-btn { height: 48px; }
    .pf-thumb img { top: 8px; left: 8px; width: calc(100% - 16px); height: calc(100% - 16px); }
    .pf-card-link { font-size: clamp(9.5px, 2.8vw, 11px); gap: 5px; padding: 0 6px; white-space: nowrap; }
    .pf-card-link i { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
    .cf-js .pf-reveal { opacity: 1; transform: none; transition: none; }
}