/* plugins/portfolio/public/assets/css/home-section.css */
/* Shared by the homepage section and /portfolio: video cards, horizontal row, lightbox. */

/* ---------- Card ---------- */
.pf-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.pf-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    border-radius: 20px;
    background:
        radial-gradient(circle at 30% 25%, rgba(var(--accent-rgb), 0.45), transparent 60%),
        linear-gradient(170deg, #3a2c27, #1b1c22);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.pf-16x9 .pf-thumb { aspect-ratio: 16 / 9; }
.pf-1x1 .pf-thumb  { aspect-ratio: 1 / 1; }
.pf-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}
.pf-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.35));
    pointer-events: none;
}
.pf-thumb .play-icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 50%;
    width: 56px;
    height: 56px;
    transform: translate(-50%, -50%);
    opacity: 0.92;
}
.pf-thumb .play-icon::after { border-width: 10px 0 10px 16px; }
.pf-tag {
    position: absolute;
    z-index: 2;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.pf-prov {
    position: absolute;
    z-index: 2;
    left: 12px;
    bottom: 12px;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
}
.pf-card:hover .pf-thumb, .pf-card:focus-visible .pf-thumb { transform: translateY(-4px); box-shadow: var(--shadow); }
.pf-card:hover .pf-thumb img { transform: scale(1.04); }
.pf-card:hover .play-icon { transform: translate(-50%, -50%) scale(1.08); }
.pf-card:focus-visible { outline: none; }
.pf-card:focus-visible .pf-thumb { outline: 3px solid var(--accent); outline-offset: 3px; }

.pf-meta { display: flex; align-items: center; gap: 10px; padding: 0 4px; min-width: 0; }
.pf-brand-logo { height: 26px; width: auto; max-width: 72px; object-fit: contain; flex-shrink: 0; }
.pf-text { display: flex; flex-direction: column; min-width: 0; }
.pf-title { font-weight: 600; font-size: 0.95rem; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pf-brand { font-size: 0.82rem; color: var(--text-muted); }

/* ---------- Homepage row ---------- */
.pf-home-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.pf-home-head .section-head { margin-bottom: 28px; }
.pf-home-head .btn { margin-bottom: 32px; }
.pf-row-wrap { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pf-row-wrap::-webkit-scrollbar { display: none; }
.pf-row { display: flex; gap: 18px; padding-bottom: 12px; }
.pf-row .pf-card { flex: 0 0 220px; scroll-snap-align: start; }
.pf-row .pf-16x9 { flex-basis: 390px; }
.pf-row .pf-1x1 { flex-basis: 260px; }

/* ---------- Lightbox ---------- */
.pf-lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(12, 12, 16, 0.86);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.2s var(--ease);
}
.pf-lightbox.open { opacity: 1; }
.pf-lightbox-frame {
    position: relative;
    width: min(92vw, calc(88vh * 9 / 16));
    aspect-ratio: 9 / 16;
    border-radius: 18px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.pf-lightbox-frame.is-16x9 { width: min(92vw, calc(80vh * 16 / 9), 1100px); aspect-ratio: 16 / 9; }
.pf-lightbox-frame.is-1x1  { width: min(92vw, 80vh); aspect-ratio: 1 / 1; }
.pf-lightbox-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pf-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    cursor: pointer;
    font-size: 0;
}
.pf-lightbox-close::before, .pf-lightbox-close::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 2px;
    background: currentColor;
}
.pf-lightbox-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.pf-lightbox-close::after  { transform: translate(-50%, -50%) rotate(-45deg); }
.pf-lightbox-title { position: absolute; left: 24px; right: 80px; top: 26px; margin: 0; color: #fff; font-weight: 600; font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.pf-lock { overflow: hidden; }

@media (max-width: 640px) {
    .pf-row .pf-card { flex-basis: 64vw; }
    .pf-row .pf-16x9 { flex-basis: 86vw; }
    .pf-home-head { flex-direction: column; align-items: flex-start; gap: 0; }
    .pf-home-head .btn { margin: -12px 0 24px; }
    .pf-lightbox { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .pf-thumb, .pf-thumb img, .pf-lightbox { transition: none; }
}

/* Instagram embed in the lightbox: has its own header/footer, so not a pure 9:16 frame */
.pf-lightbox-frame.is-ig { width: min(92vw, 420px); height: min(86vh, 760px); aspect-ratio: auto; background: #fff; }

/* Cards are links to the video page (/videos/<slug>); a click still opens the lightbox */
a.pf-card { text-decoration: none; }

/* Homepage strip: logos of brands that gave permission (plugins/portfolio/public/brand-strip.php) */
.brand-strip { padding: 30px 0 6px; }
.brand-strip-title { margin: 0 0 18px; text-align: center; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }
.brand-strip-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 18px 44px; margin: 0; padding: 0; list-style: none; }
.brand-strip-list img { display: block; width: auto; height: auto; max-width: 140px; max-height: 44px; object-fit: contain; filter: grayscale(1); opacity: 0.72; transition: filter 0.25s var(--ease), opacity 0.25s var(--ease); }
.brand-strip-list a { display: block; border-radius: 6px; }
.brand-strip-list a:hover img, .brand-strip-list a:focus-visible img { filter: none; opacity: 1; }
.brand-strip-list a:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
@media (max-width: 640px) {
    .brand-strip-list { gap: 14px 28px; }
    .brand-strip-list img { max-width: 104px; max-height: 34px; }
}

/* Instagram reel of the connected account: plain video instead of the embed */
.pf-lightbox-frame video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
