/* ==========================================================================
   ZIVOX — dynamic content styles
   Appearance for admin-driven content (portfolio, blog, pricing, notices)
   ==========================================================================*/

/* ---------- Dynamic content states ---------- */
[data-dynamic] { min-height: 60px; }
[data-dynamic].is-loading { opacity: .85; }

.dyn-inline-icon { width: 1em; height: 1em; vertical-align: -0.14em; }

/* ---------- Portfolio ---------- */
.project-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.project-card .project-thumb {
  aspect-ratio: 16/10; width: 100%; object-fit: cover;
  background:
    linear-gradient(120deg, rgba(29,111,242,.12), rgba(139,92,246,.12));
  border-bottom: 1px solid var(--line);
}
.project-thumb-fallback {
  aspect-ratio: 16/10; display: grid; place-items: center;
  background: linear-gradient(120deg, rgba(29,111,242,.10), rgba(139,92,246,.10));
  border-bottom: 1px solid var(--line); color: var(--blue-600);
}
.project-thumb-fallback svg { width: 46px; height: 46px; opacity: .6; }
.project-card .project-body { padding: 20px 22px 24px; display: flex; flex-direction: column; flex: 1; }
.project-card h3 { font-size: 1.14rem; margin-bottom: .35rem; }
.project-card .project-desc { font-size: .94rem; color: var(--ink-500); flex: 1; }
.project-tech { display: flex; flex-wrap: wrap; gap: 6px; margin-top: .9rem; }
.project-tech span {
  font-size: .75rem; font-weight: 600; color: var(--ink-500);
  background: var(--surface-3); border: 1px solid var(--line);
  padding: .16rem .55rem; border-radius: var(--r-pill);
}
.project-client { font-size: .82rem; color: var(--ink-400); font-weight: 600; }
.project-date { font-size: .8rem; color: var(--ink-400); }

/* ---------- Blog ---------- */
.post-featured {
  display: grid; grid-template-columns: 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; margin-bottom: 30px; background: #fff; box-shadow: var(--shadow-xs);
}
@media (min-width: 800px) { .post-featured { grid-template-columns: 1.05fr 1fr; } }
.post-featured img, .post-featured .project-thumb-fallback { height: 100%; min-height: 230px; aspect-ratio: auto; }
.post-featured .post-featured-body { padding: 30px; display: flex; flex-direction: column; justify-content: center; }
.post-featured h2 { font-size: clamp(1.25rem, 2.4vw, 1.7rem); }
.blog-tag {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--violet-600); background: #f5f3ff;
  border: 1px solid #ede9fe; padding: .2rem .6rem; border-radius: var(--r-pill); margin-bottom: .6rem;
}
.post-card .post-cover-fallback {
  aspect-ratio: 16/9; display: grid; place-items: center;
  background: linear-gradient(120deg, rgba(29,111,242,.10), rgba(139,92,246,.10));
  border-bottom: 1px solid var(--line); color: var(--blue-600);
}
.post-card .post-cover-fallback svg { width: 34px; height: 34px; opacity: .55; }

/* Article layout */
.article-hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center;
  font-size: .88rem; color: var(--ink-400); margin-top: .7rem;
}
.article-hero-meta .author-chip {
  display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; color: var(--ink-700);
}
.article-cover {
  width: 100%; max-height: 460px; object-fit: cover;
  border-radius: var(--r-lg); margin: 1.6rem 0; border: 1px solid var(--line);
}
.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.article-nav { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; margin-top: 2rem; }
.article-nav a { font-weight: 600; font-size: .94rem; }

/* ---------- Pricing ---------- */
.price-card .price-badge-off {
  position: absolute; top: 14px; right: 14px; font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink-400);
  background: var(--surface-3); border: 1px solid var(--line);
  padding: .18rem .55rem; border-radius: var(--r-pill);
}
.price-card.is-disabled { opacity: .6; }
.price-cta { margin-top: auto; }
.price-desc { font-size: .92rem; color: var(--ink-500); margin-bottom: .8rem; }
.price-note { font-size: .82rem; color: var(--ink-400); margin-top: .8rem; }

/* ---------- Job listings ---------- */
.job-card { display: flex; flex-direction: column; }
.job-card h3 { margin-bottom: .3rem; }
.job-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85rem; color: var(--ink-500); margin-bottom: .8rem; }
.job-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.job-meta svg { width: 15px; height: 15px; color: var(--blue-600); }
.job-summary { font-size: .94rem; color: var(--ink-500); flex: 1; }
.job-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 1rem; }
.job-detail {
  border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff;
  padding: 26px; margin-top: 16px;
}
.job-detail h4 { margin: 1.3rem 0 .5rem; font-size: 1.02rem; }
.job-detail ul { margin-bottom: 0; }
.job-detail:first-of-type { margin-top: 0; }
.deadline-chip { font-size: .78rem; font-weight: 700; padding: .2rem .6rem; border-radius: var(--r-pill); }
.deadline-chip.soon { background: #fef2f2; color: #b91c1c; border: 1px solid #fee2e2; }
.deadline-chip.ok { background: #f0fdf4; color: #15803d; border: 1px solid #dcfce7; }

/* ---------- Notices / popups ---------- */
.notice-inline {
  border: 1px solid var(--line); border-left: 4px solid var(--blue-600);
  border-radius: var(--r); background: var(--surface-2);
  padding: 1rem 1.15rem; margin-bottom: 14px; display: flex; gap: 1rem;
  align-items: flex-start; justify-content: space-between; flex-wrap: wrap;
}
.notice-inline h3 { font-size: 1rem; margin-bottom: .25rem; }
.notice-inline p { font-size: .92rem; margin-bottom: 0; color: var(--ink-700); }
.notice-inline.type-maintenance { border-left-color: var(--warn); background: #fffbeb; }
.notice-inline.type-important { border-left-color: var(--danger); background: #fff5f5; }
.notice-inline.type-promotion { border-left-color: var(--violet-500); background: #faf8ff; }
.notice-inline.type-announcement { border-left-color: var(--blue-600); background: var(--blue-50); }
.notice-dismiss {
  background: none; border: 0; cursor: pointer; color: var(--ink-400);
  font-size: 1.1rem; line-height: 1; padding: .25rem .4rem; border-radius: var(--r-sm);
}
.notice-dismiss:hover { background: var(--line-soft); color: var(--ink-900); }

/* ---------- Services / solutions dynamic ---------- */
.service-card-dynamic { display: flex; flex-direction: column; }
.service-card-dynamic .card-icon { flex: none; }
.solution-points { list-style: none; padding: 0; margin: .7rem 0 0; }
.solution-points li { font-size: .88rem; color: var(--ink-500); padding-left: 1.2rem; position: relative; margin-bottom: .3rem; }
.solution-points li::before { content: ''; position: absolute; left: 0; top: .5em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-600); }

/* ---------- Filters / search bar ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-lg); margin-bottom: 24px;
}
.filter-bar input[type="search"] { min-width: 220px; flex: 1; }
.filter-bar select { min-width: 170px; }
.result-count { font-size: .86rem; color: var(--ink-400); font-weight: 600; }
.mark-highlight { background: #fef08a; border-radius: 3px; padding: 0 2px; }

/* ---------- Skeleton variants ---------- */
.skel-post { height: 300px; }
.skel-price { height: 360px; }
.skel-job { height: 220px; }

/* ---------- Small-screen adjustments ---------- */
@media (max-width: 520px) {
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar input[type="search"], .filter-bar select { width: 100%; min-width: 0; }
  .job-actions { flex-direction: column; align-items: stretch; }
  .job-actions .btn { width: 100%; }
}

/* ---------- Admin-authored rich content ---------- */
.rich-content h2 { font-size: 1.35rem; margin: 1.8rem 0 .6rem; }
.rich-content h3 { font-size: 1.12rem; margin: 1.5rem 0 .5rem; }
.rich-content h4 { font-size: 1rem; margin: 1.2rem 0 .4rem; }
.rich-content ul, .rich-content ol { margin: 0 0 1rem; }
.rich-content blockquote {
  margin: 1.2rem 0; padding: .8rem 1.1rem; border-left: 4px solid var(--blue-600);
  background: var(--blue-50); border-radius: 0 var(--r) var(--r) 0;
}
.rich-content pre {
  background: var(--navy-900); color: #e6edf7; padding: 1rem 1.1rem;
  border-radius: var(--r); overflow-x: auto; border: 0;
}
.rich-content code { background: var(--surface-3); padding: .12rem .35rem; border-radius: 5px; font-size: .88em; }
.rich-content pre code { background: none; padding: 0; color: inherit; }
.rich-content img { border-radius: var(--r); margin: 1.2rem 0; }
.rich-content a { text-decoration: underline; }
.rich-content table { min-width: 0; }
