/*
Theme Name: PortHub
Template: pixfort
Description: porthub.ai · dark, video-style news layout on the Pixfort theme (porthub#1 M8, SPEC §4). Child of the licensed Pixfort package of the group stacks.
Version: 1.0.0
Author: DMS LOGISTICS
Text Domain: porthub
*/
:root {
  --ph-bg: #0f0f0f; --ph-card: #1f1f1f; --ph-card-hover: #272727; --ph-text: #f1f1f1; --ph-muted: #aaaaaa;
  --ph-line: #303030; --ph-accent: #3ea6ff; --ph-live: #ff4e45; --ph-chip: #272727; --ph-chip-on: #f1f1f1;
  color-scheme: dark;
}
html, body, body.pix-body, #page, .site, .site-content { background: var(--ph-bg) !important; color: var(--ph-text); }
body, body button, body input, body textarea, body h1, body h2, body h3, body p, body li, body a { font-family: Roboto, "Segoe UI", -apple-system, Helvetica, Arial, sans-serif !important; }
body h1, body h2, body h3 { color: var(--ph-text) !important; }
.pix-loading-progress, #pix-page-loading-progress, .pix-page-loading-progress { display: none !important; }
a { color: var(--ph-accent); }
.pix-page-loading-bg, .pix-loading-circ-path { display: none !important; }

/* top bar (logo · search · chips) */
.ph-top { position: sticky; top: 0; z-index: 50; background: rgba(15,15,15,.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ph-line); }
.ph-top__row { display: flex; align-items: center; gap: 16px; padding: 10px 24px; }
.ph-logo { display: flex; align-items: center; gap: 8px; color: var(--ph-text) !important; text-decoration: none !important; font-weight: 700; font-size: 20px; letter-spacing: -.3px; white-space: nowrap; }
.ph-logo__mark { display: inline-grid; place-items: center; width: 30px; height: 22px; border-radius: 6px; background: var(--ph-live); color: #fff; font-size: 12px; }
.ph-logo__tld { color: var(--ph-muted); font-weight: 400; }
.ph-search { flex: 1; min-width: 0; max-width: 560px; margin: 0 auto; display: flex; }
.ph-search input { flex: 1; min-width: 0; background: #121212; color: var(--ph-text); border: 1px solid var(--ph-line); border-radius: 40px 0 0 40px; padding: 8px 16px; font-size: 15px; }
.ph-search button { font-size: 18px; background: #222; color: var(--ph-text); border: 1px solid var(--ph-line); border-left: 0; border-radius: 0 40px 40px 0; padding: 0 18px; cursor: pointer; }
.ph-top__links { display: flex; gap: 14px; font-size: 14px; white-space: nowrap; }
.ph-top__links a { color: var(--ph-muted); text-decoration: none; }
.ph-chips { display: flex; gap: 10px; overflow-x: auto; padding: 10px 24px 12px; scrollbar-width: none; }
.ph-chips::-webkit-scrollbar { display: none; }
.ph-chip { flex: 0 0 auto; background: var(--ph-chip); color: var(--ph-text) !important; text-decoration: none !important; border-radius: 8px; padding: 6px 12px; font-size: 14px; font-weight: 500; }
.ph-chip:hover { background: #3a3a3a; }
.ph-chip.is-on { background: var(--ph-chip-on); color: #0f0f0f !important; }

/* page frame */
.ph-main { max-width: 1760px; margin: 0 auto; padding: 24px 24px 48px; }
.ph-head { margin: 4px 0 20px; }
.ph-head h1 { font-size: 28px; line-height: 1.2; margin: 0 0 6px; color: var(--ph-text); }
.ph-head p { margin: 0; color: var(--ph-muted); max-width: 900px; }
.ph-live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ph-muted); }
.ph-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ph-live); box-shadow: 0 0 0 3px rgba(255,78,69,.25); }

/* the video-card grid: 4 columns at 1440, 2 on tablet, 1 on phone */
.ph-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 16px; }
@media (max-width: 1100px) { .ph-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ph-grid { grid-template-columns: 1fr; gap: 28px; } }
.ph-card { display: block; color: var(--ph-text) !important; text-decoration: none !important; }
.ph-card__thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--ph-card); }
.ph-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.ph-card__thumb .ph-visual { width: 100%; height: 100%; transition: transform .2s; }
.ph-card:hover .ph-card__thumb img, .ph-card:hover .ph-visual { transform: scale(1.03); }
.ph-badge { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.82); color: #fff; font-size: 12px; font-weight: 600; padding: 2px 6px; border-radius: 4px; }
.ph-badge--kind { left: 8px; right: auto; background: var(--ph-live); }
.ph-card__body { display: flex; gap: 12px; padding-top: 12px; }
.ph-avatar { flex: 0 0 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #0f0f0f; }
.ph-card__title { color: var(--ph-text) !important; font-size: 16px; line-height: 22px; font-weight: 600; margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ph-text); }
.ph-card__meta { font-size: 14px; color: var(--ph-muted); line-height: 20px; }
.ph-empty { background: var(--ph-card); border-radius: 12px; padding: 32px; color: var(--ph-muted); }

/* generated topic visual (SPEC D8: our own visual when no licensed image) */
.ph-visual { display: grid; place-items: center; position: relative; font-weight: 700; color: rgba(255,255,255,.92); text-transform: uppercase; letter-spacing: 2px; font-size: 14px; }
.ph-visual svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .35; }
.ph-visual span { position: relative; }

/* watch page */
.ph-watch { display: grid; grid-template-columns: minmax(0, 1fr) 402px; gap: 24px; }
@media (max-width: 1000px) { .ph-watch { grid-template-columns: 1fr; } }
.ph-player { aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--ph-card); }
.ph-player img, .ph-player .ph-visual { width: 100%; height: 100%; object-fit: cover; }
.ph-watch h1 { font-size: 22px; line-height: 30px; margin: 14px 0 8px; color: var(--ph-text); }
.ph-meta { color: var(--ph-muted); font-size: 14px; margin-bottom: 14px; }
.ph-meta a { color: var(--ph-text); }
.ph-desc { background: var(--ph-card); border-radius: 12px; padding: 16px 18px; color: var(--ph-text); line-height: 1.65; font-size: 16px; }
.ph-desc p { color: var(--ph-text); }
.ph-desc h2, .ph-desc h3 { color: var(--ph-text); }
.ph-sources { margin-top: 16px; background: var(--ph-card); border-radius: 12px; padding: 14px 18px; font-size: 14px; }
.ph-sources h2 { font-size: 15px; margin: 0 0 6px; color: var(--ph-text); }
.ph-upnext h2 { font-size: 16px; margin: 0 0 12px; color: var(--ph-text); }
.ph-mini { display: grid; grid-template-columns: 168px 1fr; gap: 8px; margin-bottom: 10px; color: var(--ph-text) !important; text-decoration: none !important; }
.ph-mini .ph-card__thumb { border-radius: 8px; }
.ph-mini__title { font-size: 14px; line-height: 20px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ph-mini__meta { font-size: 12px; color: var(--ph-muted); }

/* galaxy CTA block (M12) */
.ph-cta { margin: 28px 0 0; border-radius: 16px; padding: 22px 22px; background: linear-gradient(135deg, #14213d, #0f3460); border: 1px solid rgba(62,166,255,.35); }
.ph-cta__kicker { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: #9ecbff; margin: 0 0 6px; }
.ph-cta__pitch { font-size: 18px; line-height: 1.4; color: #fff; margin: 0 0 14px; font-weight: 600; }
.ph-cta__btn { display: inline-block; background: #3ea6ff; color: #0f0f0f !important; font-weight: 700; padding: 10px 18px; border-radius: 40px; text-decoration: none !important; }
.ph-cta__also { margin-left: 14px; color: #cfe6ff !important; font-size: 14px; }

/* plain pages (About, legal, contact) */
.ph-page { max-width: 860px; margin: 0 auto; }
.ph-page .ph-desc { padding: 24px 28px; }
.ph-page .ph-desc a { color: var(--ph-accent); }
.ph-page input, .ph-page textarea { background: #121212; color: var(--ph-text); border: 1px solid var(--ph-line); border-radius: 8px; padding: 8px 12px; width: 100%; }
.ph-page .wpcf7-submit { width: auto; background: var(--ph-accent); color: #0f0f0f; border: 0; font-weight: 700; border-radius: 40px; padding: 10px 22px; }
.ph-cities { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .ph-cities { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ph-cities { grid-template-columns: 1fr; } }

/* footer */
.ph-foot { border-top: 1px solid var(--ph-line); color: var(--ph-muted); font-size: 13px; padding: 24px; text-align: center; }
.ph-foot a { color: var(--ph-muted); margin: 0 8px; }
.ph-foot__sig { color: var(--ph-text); margin-bottom: 8px; }
.pagination, .nav-links { margin-top: 32px; text-align: center; }
.nav-links a, .nav-links span { display: inline-block; padding: 6px 12px; margin: 0 2px; border-radius: 8px; background: var(--ph-chip); color: var(--ph-text); text-decoration: none; }

@media (max-width: 600px) {
  .ph-top__row { padding: 8px 16px; gap: 10px; }
  .ph-top__links { display: none; }
  .ph-search input { padding: 6px 12px; font-size: 14px; }
  .ph-search button { padding: 0 12px; }
  .ph-chips { padding: 8px 16px 10px; }
  .ph-main { padding: 16px 16px 40px; }
  .ph-head h1 { font-size: 22px; }
  .ph-logo { font-size: 18px; }
  .ph-mini { grid-template-columns: 140px 1fr; }
}
