/* Atlas Biljaka: blog, članak, profil autora, komentari. Tokeni iz atlas.css. */

/* ---------- kartice tekstova ---------- */
.bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.bcard { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  overflow: hidden; text-decoration: none; color: var(--ink); transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s; }
.bcard:hover { transform: translateY(-5px); box-shadow: 0 2px 4px rgba(21, 48, 43, .05), 0 26px 50px rgba(21, 48, 43, .14); }
.bc-img { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); }
.bc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.bcard:hover .bc-img img { transform: scale(1.05); }
.bc-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1; }
.bc-cat { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-deep); }
.bc-body b, .feat-body b { font: 600 1.32rem/1.25 var(--serif); }
.bc-ex { color: var(--ink-soft); font-size: .93rem; }
.bc-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: auto; padding-top: 10px; font-size: .8rem; color: var(--muted); }
.bc-auth { color: var(--ink-soft); font-weight: 500; }
.stats { display: inline-flex; gap: 10px; }
.stats > span:empty { display: none; }
.stats > span::before { content: ""; display: inline-block; width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; background: currentColor;
  -webkit-mask: var(--ic) center / contain no-repeat; mask: var(--ic) center / contain no-repeat; opacity: .75; }
.s-views { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.s-likes { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 20.5s-7.5-4.6-9.3-9.4C1.4 7.6 3.6 4.5 6.9 4.5c2 0 3.7 1.1 5.1 3 1.4-1.9 3.1-3 5.1-3 3.3 0 5.5 3.1 4.2 6.6-1.8 4.8-9.3 9.4-9.3 9.4z'/%3E%3C/svg%3E"); }
.s-com { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20l1-4.6A8 8 0 1 1 21 12z'/%3E%3C/svg%3E"); }

/* ---------- početna bloga ---------- */
.bh-hero { padding: 64px var(--gutter) 30px; text-align: center; }
.bh-hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); margin: 12px 0 10px; }
.bh-hero p { color: var(--ink-soft); max-width: 34em; margin: 0 auto; font-size: 1.1rem; }
.feat { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); border-radius: 24px; overflow: hidden; background: var(--surface);
  box-shadow: var(--shadow); text-decoration: none; color: var(--ink); margin-top: 18px; transition: box-shadow .3s; }
.feat:hover { box-shadow: 0 2px 4px rgba(21, 48, 43, .05), 0 30px 60px rgba(21, 48, 43, .15); }
.feat-img { display: block; min-height: 380px; overflow: hidden; }
.feat-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.feat:hover .feat-img img { transform: scale(1.04); }
.feat-body .kicker { align-self: flex-start; }
.feat-body { display: flex; flex-direction: column; gap: 12px; padding: 38px 40px; justify-content: center; }
.feat-body b { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
.bh-list { padding-top: 56px; }
.bh-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.bh-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bh-chips .chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 15px; font: 500 .88rem var(--sans); color: var(--ink-soft); cursor: pointer; }
.bh-chips .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.bh-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); min-width: min(320px, 100%); }
.bh-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.bh-search svg { width: 18px; height: 18px; fill: none; stroke: var(--accent-deep); stroke-width: 2; }
.bh-search input { border: 0; outline: 0; background: none; font: 500 .95rem var(--sans); color: var(--ink); width: 100%; }
.bh-authors { padding-top: 64px; }
.bh-authors h2 { font-size: 1.8rem; margin-bottom: 16px; }
.auth-row { display: flex; flex-wrap: wrap; gap: 16px; }
.auth-chip { display: flex; align-items: center; gap: 14px; padding: 12px 22px 12px 12px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.auth-chip img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.auth-chip span { display: flex; flex-direction: column; }
.auth-chip b { font: 600 1.05rem var(--serif); }
.auth-chip i, .auth-chip small { color: var(--muted); font-size: .82rem; }

/* ---------- članak ---------- */
.post-hero { position: relative; min-height: min(560px, 70vh); display: flex; align-items: center; overflow: hidden; background: var(--ink); }
.ph-photo, .ph-tint { position: absolute; inset: 0; }
.ph-photo img { width: 100%; height: 100%; object-fit: cover; }
.ph-tint { background: linear-gradient(180deg, rgba(10, 40, 36, .05) 0%, rgba(10, 40, 36, .25) 45%, rgba(10, 40, 36, .72) 100%); }
.ph-inner { position: relative; width: 100%; padding-block: 56px; }
.ph-card { max-width: 860px; margin: 0 auto; text-align: center; padding: 30px 34px; border-radius: 24px;
  background: linear-gradient(160deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .74));
  border: 1px solid rgba(255, 255, 255, .7); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 30px 80px rgba(0, 0, 0, .25);
  backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); }
.ph-latin { display: inline-block; font-family: var(--serif); font-style: italic; font-size: 1.08rem; color: var(--accent-deep); }
.ph-card h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); line-height: 1.08; margin: 10px 0 18px; }
.ph-meta { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .88rem; color: var(--ink-soft, var(--ink)); }
.ph-auth { margin: 10px 0 16px; }
.ph-auth .byline span { align-items: center; }
.ph-auth .byline b { font-size: 1rem; }
.ph-read { display: inline-flex; align-items: center; }
.ph-read .s-views { margin-left: 12px; }
.byline { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.byline img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent-pale); }
.byline span { display: flex; flex-direction: column; line-height: 1.25; }
.byline b { font-weight: 600; }
.byline i { font-style: normal; font-size: .82rem; color: var(--accent-deep); }
.byline:hover b { color: var(--accent-deep); }

.post-wrap { display: grid; grid-template-columns: minmax(0, 840px); justify-content: center; padding-top: 46px; }
.post-main > .disclaimer { margin: 0 auto 28px; }
.prose { font-size: 1.1rem; line-height: 1.75; color: var(--ink); }
.prose p { margin: 0 0 1.15em; }
.prose h2, .prose h3 { font-family: var(--serif); line-height: 1.2; margin: 1.6em 0 .6em; }
.prose h2 { font-size: 1.7rem; } .prose h3 { font-size: 1.35rem; }
.prose a { color: var(--accent-deep); text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--accent); }
.prose blockquote { margin: 1.6em 0; padding: 4px 0 4px 26px; border-left: 3px solid var(--primrose); font-family: var(--serif); font-size: 1.22rem; color: var(--ink-soft); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .35em 0; }
.prose ol:last-child, .prose ol:last-of-type { font-size: .86rem; line-height: 1.55; color: var(--ink-soft); }
.pfig { margin: 1.8em 0; }
.pfig img { width: 100%; height: auto; border-radius: 16px; }
.post-plants { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 26px 0 0; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--accent-mist); }
.post-plants span { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-ink); margin-right: 6px; }
.post-plants a { font-weight: 600; color: var(--accent-deep); }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.tag { font-size: .84rem; padding: 5px 12px; border-radius: 999px; background: var(--paper-2); color: var(--ink-soft); text-decoration: none; border: 1px solid var(--line-soft); }
.tag:hover { border-color: var(--accent); color: var(--accent-ink); }
.origin { font-size: .88rem; color: var(--muted); margin: 18px 0 0; }
.origin a { color: var(--accent-deep); }

.post-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin: 34px 0 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.like-btn { display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 20px 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); font: 600 .95rem var(--sans); color: var(--ink); cursor: pointer; transition: transform .15s, border-color .2s, background .2s; }
.like-btn svg { width: 22px; height: 22px; fill: none; stroke: #c24d6b; stroke-width: 2; transition: fill .2s, transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.like-btn:hover { border-color: #e2a3b3; }
.like-btn:active { transform: scale(.96); }
.like-btn[aria-pressed="true"] { background: #fdf0f3; border-color: #f1c4cf; }
.like-btn[aria-pressed="true"] svg { fill: #d9506f; stroke: #d9506f; transform: scale(1.15); }
.like-n:empty { display: none; }
.share-btn { height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font: 500 .92rem var(--sans); color: var(--ink-soft); cursor: pointer; }
.post-actions .stats { margin-left: auto; }

.author-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 22px; margin-top: 34px; padding: 26px; border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); }
.ac-img img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent-pale); }
.author-card h3 { font-size: 1.45rem; margin: 6px 0 0; }
.author-card h3 a { color: inherit; text-decoration: none; }
.ac-title { color: var(--accent-deep); font-weight: 600; margin: 2px 0 10px; }
.author-card p { color: var(--ink-soft); margin: 0 0 10px; }
.ac-more { font-weight: 600; color: var(--accent-deep); text-decoration: none; }
.related { padding-top: 64px; }
.related h2 { font-size: 1.8rem; margin-bottom: 18px; }

/* ---------- komentari ---------- */
.comments { margin-top: 46px; }
.comments h2 { font-size: 1.6rem; }
.c-count { color: var(--muted); font-family: var(--sans); font-size: 1rem; font-weight: 500; }
.c-form { margin: 14px 0 22px; }
.c-form textarea { width: 100%; min-height: 96px; resize: vertical; padding: 14px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); font: 1rem/1.5 var(--sans); color: var(--ink); }
.c-form textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.c-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: .84rem; color: var(--muted); }
.c-me { display: flex; align-items: center; gap: 8px; }
.c-me img, .c-av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--accent-pale); }
.btn { height: 42px; padding: 0 20px; border-radius: 999px; border: 0; background: var(--accent); color: #fff; font: 600 .92rem var(--sans); cursor: pointer; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.c-login { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-radius: 16px; background: var(--accent-mist); color: var(--ink-soft); }
.c-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.c-list li { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; }
.c-list .c-av { width: 38px; height: 38px; display: grid; place-items: center; font-weight: 600; color: var(--accent-ink); }
.c-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; font-size: .86rem; color: var(--muted); }
.c-head b { color: var(--ink); font-size: .95rem; }
.c-body { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-del { border: 0; background: none; color: var(--muted); font-size: .8rem; cursor: pointer; text-decoration: underline; }
.c-empty { color: var(--muted); }
.c-offline { color: var(--muted); font-size: .9rem; }

/* ---------- profil autora ---------- */
.ap-hero { position: relative; }
.ap-banner { position: relative; height: clamp(150px, 18vw, 230px); overflow: hidden; isolation: isolate;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 22%, var(--paper)) 0%, var(--accent-mist) 42%, color-mix(in srgb, var(--primrose) 30%, var(--paper)) 100%); }
/* apstraktne mrlje (bez slika): tri meka kruga koji se sporo pomjeraju */
.ap-banner span { position: absolute; border-radius: 50%; filter: blur(42px); opacity: .7; animation: drift 18s ease-in-out infinite alternate; }
.ap-banner span:nth-child(1) { width: 46vw; height: 46vw; left: -8vw; top: -26vw; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.ap-banner span:nth-child(2) { width: 34vw; height: 34vw; right: 4vw; top: -14vw; background: color-mix(in srgb, var(--primrose) 70%, transparent); animation-delay: -6s; }
.ap-banner span:nth-child(3) { width: 28vw; height: 28vw; left: 38vw; top: 2vw; background: color-mix(in srgb, var(--accent-deep) 30%, transparent); animation-delay: -12s; }
@keyframes drift { to { transform: translate(3vw, 2vw) scale(1.08); } }
@media (prefers-reduced-motion: reduce) { .ap-banner span { animation: none; } }
.ap-head { display: grid; grid-template-columns: 168px minmax(0, 1fr); gap: 30px; align-items: start; position: relative; }
.ap-avatar { margin-top: -84px; }
.ap-id { padding-top: 18px; }
.ap-avatar img { width: 168px; height: 168px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 6px var(--paper), 0 0 0 9px var(--accent-pale), 0 24px 50px rgba(21, 48, 43, .2); }
.ap-id h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); margin: 8px 0 2px; }
.ap-title { font: italic 600 1.2rem var(--serif); color: var(--accent-deep); margin: 0; }
.ap-lead { color: var(--ink-soft); font-size: 1.08rem; margin: 10px 0 0; max-width: 36em; }
.ap-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-top: 40px; }
.ap-stats div { padding: 20px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); text-align: center; }
.ap-stats b { display: block; font: 600 2rem var(--serif); color: var(--accent-deep); font-variant-numeric: tabular-nums; }
.ap-stats span { font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ap-about { padding-top: 56px; max-width: calc(820px + 2 * var(--gutter)); margin-left: 0; }
.ap-about h2 { font-size: 1.8rem; }
.ap-bio p { font-size: 1.08rem; color: var(--ink-soft); }
.ap-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ap-links:empty { display: none; }
.ap-links a { font-size: .86rem; font-weight: 600; padding: 6px 13px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--accent-deep); text-decoration: none; }
.ap-edit:empty { display: none; }
.ap-edit { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ap-empty-hint { color: var(--muted); font-size: .9rem; }
/* uređivanje profila */
.pe { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(12, 30, 27, .45); backdrop-filter: blur(4px); padding: 16px; }
.pe-box { width: min(640px, 100%); max-height: 92vh; overflow: auto; padding: 28px; border-radius: 24px; background: var(--surface); box-shadow: 0 40px 90px rgba(0, 0, 0, .3); }
.pe-box h2 { font-size: 1.6rem; margin: 0 0 16px; }
.pe-box label { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 16px 0 6px; }
.pe-box input[type=text], .pe-box input[type=url], .pe-box input[type=email], .pe-box textarea { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); font: 1rem/1.5 var(--sans); color: var(--ink); }
.pe-box textarea { min-height: 200px; resize: vertical; }
.pe-box input:focus, .pe-box textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.pe-check { display: flex !important; align-items: center; gap: 10px; text-transform: none !important; letter-spacing: 0 !important; font-size: .95rem !important; color: var(--ink) !important; }
.pe-help { font-size: .82rem; color: var(--muted); margin: 6px 0 0; }
.pe-admin { margin-top: 22px; padding: 16px; border-radius: 16px; background: var(--accent-mist); }
.pe-admin h3 { font-size: 1.05rem; margin: 0 0 6px; }
.pe-eds { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pe-eds li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .92rem; }
.pe-row { display: flex; gap: 8px; }
.pe-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.pe-err { color: var(--danger); font-size: .9rem; }
.ap-bio p { font-size: 1.08rem; color: var(--ink-soft); }
.ap-posts { padding-top: 56px; }
.ap-posts h2 { font-size: 1.8rem; margin-bottom: 18px; }

@media (max-width: 900px) {
  .feat { grid-template-columns: minmax(0, 1fr); }
  .feat-img { min-height: 220px; aspect-ratio: 16 / 10; }
  .feat-body { padding: 24px; }
  .ap-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .ph-card { padding: 22px 20px; border-radius: 18px; }
  .ph-inner { padding-block: 36px; }
  .prose { font-size: 1.03rem; }
  .ap-head { grid-template-columns: minmax(0, 1fr); gap: 6px; justify-items: center; text-align: center; }
  .ap-avatar { margin-top: -66px; }
  .ap-id { padding-top: 0; }
  .ap-avatar img { width: 132px; height: 132px; }
  .ap-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .author-card { grid-template-columns: minmax(0, 1fr); text-align: left; }
  .post-actions .stats { margin-left: 0; }
  .bh-search { width: 100%; }
}
