/* Blog list (frame 10), blog detail (frame 11), blog submit/edit (frames 15/15a), search page (frame 21). */

.blog-grid { gap: 48px 24px; }
.blog-card__title { padding: 0 8px; }

/* ---- Detail ------------------------------------------------------------------------------- */
.blog-status { margin-top: 24px; }
.post { display: grid; grid-template-columns: minmax(0, 870px) minmax(0, 424px); justify-content: space-between; gap: 24px; margin-top: 32px; align-items: start; }
.post__main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }

.slider { position: relative; border-radius: var(--radius); overflow: hidden; background: #eee; }
.slider__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; aspect-ratio: 870 / 600; }
.slider__track::-webkit-scrollbar { display: none; }
.slider__track:focus-visible { outline-offset: -4px; }
.slider__slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; }
.slider__slide img { width: 100%; height: 100%; object-fit: cover; }
.slider__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; display: grid; place-items: center; box-shadow: 0 4px 14px rgba(0, 0, 0, .15); transition: background-color .15s; }
@media (hover: hover) and (pointer: fine) { .slider__arrow:hover { background: var(--c-primary-soft); } }
.slider__arrow:disabled { opacity: .45; cursor: default; }
.slider__arrow--prev { left: 24px; }
.slider__arrow--next { right: 24px; }
.slider__arrow img { filter: brightness(0); }
.slider__count { position: absolute; right: 16px; bottom: 14px; padding: 2px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 12px; font-weight: 700; }

.post__meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.post__stats { display: flex; gap: 20px; flex-wrap: wrap; font-size: 14px; }
.post__actions { display: flex; align-items: center; gap: 12px; }
.post__actions form { display: contents; }
.chip { border: 0; cursor: pointer; }
.chip--danger { background: #fdecec; color: var(--c-danger); }
.post__title { font-size: 32px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.post__body { color: #555; font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.post__body > * + * { margin-top: 1em; }
.post__body h2 { font-size: 22px; color: #000; margin-top: 1.4em; }
.post__body h3 { font-size: 18px; color: #000; margin-top: 1.3em; }
.post__body ul, .post__body ol { padding-left: 22px; }
.post__body blockquote { margin: 1em 0; padding: 12px 20px; border-left: 3px solid var(--c-primary); background: var(--c-primary-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.post__body a { color: var(--c-primary); text-decoration: underline; }
.post__body strong, .post__body b { color: #000; }

/* Author card (states frame: hover turns green) */
.author-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 24px; border-radius: var(--radius); background: var(--c-primary-soft); text-align: center; aspect-ratio: 424 / 600; transition: background-color .2s, color .2s; }
.author-card__avatar { width: 150px; height: 150px; margin-bottom: 20px; }
.author-card .avatar--fallback { background: #fff; }
.author-card__name { font-size: 32px; font-weight: 700; line-height: 1.15; }
.author-card__name::after { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; }
.author-card__subs { font-weight: 700; color: var(--c-muted); font-size: 20px; transition: color .2s; }
.author-card__follow { position: relative; z-index: 1; padding: 4px 14px; }
.author-card__follow[aria-pressed="true"] { background: #000; }
.author-card__more { position: relative; z-index: 1; margin-top: auto; padding: 8px; }
@media (hover: hover) and (pointer: fine) { .author-card:hover, .author-card:focus-within { background: var(--c-primary); color: #fff; } }
@media (hover: hover) and (pointer: fine) { .author-card:hover .author-card__subs, .author-card:focus-within .author-card__subs { color: #fff; } }
@media (hover: hover) and (pointer: fine) { .author-card:hover .author-card__more img, .author-card:focus-within .author-card__more img { filter: brightness(0) invert(1); } }
@media (hover: hover) and (pointer: fine) { .author-card:hover .author-card__follow, .author-card:focus-within .author-card__follow { background: #fff; color: var(--c-primary); } }

.post-related { margin-top: 96px; }
.post-related__title { text-align: center; font-size: 18px; font-weight: 700; margin-bottom: 48px; }

/* ---- Submit / edit form -------------------------------------------------------------------- */
.submit { display: grid; grid-template-columns: minmax(0, 870px) minmax(0, 424px); justify-content: space-between; gap: 24px; align-items: start; }
.submit__main { display: grid; gap: 32px; min-width: 0; }
.submit__aside { position: sticky; top: 112px; display: grid; gap: 20px; }
.submit .field > label, .submit .field__label { justify-content: flex-start; gap: 4px; }
.submit__req {color: var(--c-danger); font-size: 15px; }
.submit-panel { border-radius: var(--radius); overflow: hidden; background: var(--c-primary-soft); }
.submit-panel__head { background: #000; color: #fff; font-size: 15px; font-weight: 700; padding: 22px 40px; border-radius: var(--radius); }
.submit-panel__body { display: grid; gap: 36px; padding: 36px 40px 40px; font-size: 15px; }
.submit-panel .check { font-size: 15px; }
.submit-panel .check strong { color: #000; }
.submit__seo { border: 1.5px solid var(--c-primary-line); border-radius: var(--radius); padding: 20px 24px; display: grid; gap: 20px; }
.submit__seo summary { cursor: pointer; font-weight: 700; }
.submit__seo[open] summary { margin-bottom: 16px; }
.submit__seo .field + .field { margin-top: 16px; }
.submit__delete { margin-top: 32px; }

.upload { min-height: 240px; display: flex; align-items: center; justify-content: space-around; gap: 24px; flex-wrap: wrap; border-color: #444; }
.upload__drop { display: grid; justify-items: center; gap: 24px; font-weight: 600; font-size: 15px; }
.upload__or { font-size: 15px; }
.upload__btn { pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .dropzone:hover .upload__btn { background: var(--c-primary); color: #fff; } }

.thumbs { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; }
.thumbs:empty { display: none; }
.thumb { position: relative; width: 120px; height: 120px; border-radius: var(--radius-sm); overflow: hidden; background: #eee; }
.thumb > img { width: 100%; height: 100%; object-fit: cover; transition: opacity .15s, filter .15s; }
.thumb:first-child::before { content: "Üz qabığı"; position: absolute; left: 6px; bottom: 6px; z-index: 1; padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; font-weight: 700; }
.thumb__remove { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; background: var(--c-danger); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.thumb__remove img { filter: brightness(0) invert(1); }
.thumb__remove input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.thumb__remove:has(input:focus-visible) { outline: 3px solid var(--c-primary); outline-offset: 2px; }
.thumb:has(input:not(:checked)) > img { opacity: .3; filter: grayscale(1); }
.thumb:has(input:not(:checked)) .thumb__remove { background: var(--c-success); }
.thumb:has(input:not(:checked))::after { content: "Silinəcək"; position: absolute; inset: auto 0 40%; text-align: center; font-size: 12px; font-weight: 800; color: var(--c-danger); }
.thumb--new p { position: absolute; inset: auto 0 0; padding: 2px 6px; background: rgba(255, 255, 255, .85); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.editor { border: 1.5px solid var(--c-primary-line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.editor:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 4px rgba(48, 141, 128, .15); }
.editor__bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--c-primary-line); background: #f5f9f8; }
.editor__bar button { min-width: 36px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none; font-size: 14px; font-weight: 700; color: var(--c-primary); }
@media (hover: hover) and (pointer: fine) { .editor__bar button:hover { background: var(--c-primary-soft); } }
.editor__area { border: 0; border-radius: 0; min-height: 320px; }
.editor__area:focus { box-shadow: none; }

/* ---- Search page --------------------------------------------------------------------------- */
.search-jump { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: -16px 0 40px; }
.search-jump a { display: inline-flex; gap: 8px; align-items: center; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--c-primary-line); color: var(--c-primary); font-weight: 700; font-size: 14px; }
@media (hover: hover) and (pointer: fine) { .search-jump a:hover { background: var(--c-primary-soft); } }
.search-jump span { color: var(--c-muted); }
.search-section { margin-top: 56px; scroll-margin-top: 110px; }
.search-section .center { margin-top: 32px; }
.member-grid .member-card { padding: 32px 16px 24px; }
.member-grid .member-card .avatar { width: 120px; height: 120px; }

/* ---- Responsive ---------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  .post, .submit { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); }
}
@media (max-width: 960px) {
  .post, .submit { grid-template-columns: 1fr; }
  .author-card { aspect-ratio: auto; display: grid; grid-template-columns: auto 1fr auto; text-align: left; align-items: center; gap: 4px 16px; padding: 20px; }
  .author-card__avatar { grid-row: span 3; width: 72px; height: 72px; margin: 0; }
  .author-card__follow { justify-self: start; }
  .author-card__more { grid-column: 3; grid-row: 1 / span 3; margin: 0; }
  .submit__aside { position: static; }
  .post-related { margin-top: 64px; }
}
@media (max-width: 560px) {
  .post__title { font-size: 22px; }
  .slider__arrow--prev { left: 12px; }
  .slider__arrow--next { right: 12px; }
  .submit-panel__head { padding: 18px 24px; }
  .submit-panel__body { padding: 24px; gap: 24px; }
  .upload { flex-direction: column; justify-content: center; padding: 32px 16px; }
  .thumb { width: calc((100% - 24px) / 3); height: auto; aspect-ratio: 1; }
}
