/* ==========================================================================
   Blog — listing, single, category, cards, pagination, search, categories
   Migrated from blog/index.vue, blog/[slug].vue, blog/category/[slug].vue
   ========================================================================== */

/* --- Blog wrapper --- */
.zoriana-blog {
    --space: 24px;
    --space-lg: 40px;
    --card-radius: 16px;
    --card-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 14px 32px rgba(0, 0, 0, 0.10);
    --border: 1px solid rgba(0, 0, 0, 0.06);
    --bg: #fff;
    --muted: #6b7280;
    --accent: #2563eb;
    max-width: 1200px;
    margin-inline: auto;
    padding: var(--space-lg) 1rem;
}

.zoriana-blog__header { margin-bottom: var(--space-lg); }

.zoriana-blog__title {
    font-size: clamp(1.6rem, 2.2vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.zoriana-blog__empty {
    color: var(--muted);
    text-align: center;
    margin: var(--space) 0;
}

.zoriana-blog__error { color: #dc2626; }

/* --- Grid --- */
.zoriana-blog__grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space);
}

@media (max-width: 1024px) { .zoriana-blog__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .zoriana-blog__grid { grid-template-columns: 1fr; } }

/* --- Post card --- */
.post-card {
    background: var(--bg, #fff);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease;
    will-change: transform;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.1);
}

.post-card__link {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.post-card__image-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #f3f4f6;
}

.post-card__image-wrap--placeholder {
    background: linear-gradient(135deg, #eef2f7 0%, #f7fafc 100%);
}

.post-card__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card__title {
    padding: 16px 16px 6px;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
}

.post-card__excerpt {
    padding: 0 16px 8px;
    color: #6b7280;
}

.post-card__excerpt p { margin: 0 0 0.6em; }
.post-card__excerpt img,
.post-card__excerpt iframe { display: none !important; }

.post-card__cta {
    margin: 8px 16px 16px;
    align-self: end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-weight: 600;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    transition: background .2s ease, transform .2s ease;
}

.post-card:hover .post-card__cta {
    background: rgba(37, 99, 235, 0.15);
    transform: translateX(2px);
}

/* --- Pagination --- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.pagination__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
    text-decoration: none;
    color: #111827;
    font-weight: 600;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.pagination__button:hover {
    border-color: rgba(0, 0, 0, 0.16);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
    color: #111827;
}

.pagination__button--disabled {
    opacity: .45;
    cursor: not-allowed;
    border-style: dashed;
}

.pagination__status {
    font-weight: 500;
    color: #6b7280;
}

/* --- Categories nav --- */
.cats { margin: 12px 0 24px; }

.cats__grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

@media (max-width: 1024px) { .cats__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .cats__grid { grid-template-columns: 1fr; } }

.cats__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
    transition: transform .2s ease, box-shadow .2s ease;
}

.cats__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, .10);
    color: inherit;
}

.cats__name { font-weight: 700; }

.cats__count {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    font-weight: 600;
    font-size: .875rem;
}

/* --- Search --- */
.blog-search { margin: 16px 0 40px; }

.blog-search__label {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0; border: 0;
    clip: rect(0 0 0 0); overflow: hidden;
}

.blog-search__field {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.blog-search__input {
    flex: 1 1 auto;
    padding: 12px 14px;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
}

.blog-search__input:focus {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .15);
    border-color: rgba(37, 99, 235, .5);
}

.blog-search__submit {
    flex: 0 0 auto;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 12px;
    padding: 10px 14px;
    background: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.blog-search__submit:hover {
    border-color: rgba(0, 0, 0, .2);
    box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
}

/* ==========================================================================
   Single post
   ========================================================================== */

.single-post-wrapper {
    --space: 24px;
    --space-lg: 40px;
    --radius: 16px;
    --muted: #6b7280;
    --accent: #EC4400;
    --border: 1px solid rgba(0, 0, 0, 0.06);
    --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    max-width: 1100px;
    margin-inline: auto;
    padding: var(--space-lg) 1rem;
}

.single-post-wrapper__header { margin-bottom: var(--space-lg); }

.single-post-wrapper__header-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space);
    align-items: stretch;
}

@media (max-width: 900px) {
    .single-post-wrapper__header-grid { grid-template-columns: 1fr; }
}

.single-post-wrapper__content {
    padding: 0 23px 23px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: var(--border);
    border-radius: var(--radius);
    min-height: 320px;
}

.single-post-wrapper__date {
    font-size: 0.95rem;
    color: var(--muted);
    margin-top: 18px;
}

.single-post-wrapper__title {
    font-size: clamp(1.8rem, 2.5vw, 2.4rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: auto 0;
    line-height: 1.2;
}

.single-post-wrapper__categories {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px dashed rgba(0, 0, 0, 0.08);
    list-style: none;
    padding-left: 0;
}

.single-post-wrapper__category-link {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    transition: background .2s ease;
}

.single-post-wrapper__category-link:hover {
    background: rgba(37, 99, 235, 0.15);
}

.single-post-wrapper__image-wrap {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.single-post-wrapper__image { max-width: 100%; height: auto; }

/* Body */
.single-post-wrapper__body {
    background: #fff;
    border: var(--border);
    border-radius: var(--radius);
    padding: clamp(18px, 2.5vw, 28px);
    margin-bottom: var(--space-lg);
    text-align: justify;
    line-height: 1.75;
    color: #1f2937;
}

.single-post-wrapper__body img {
    border-radius: 12px;
    height: auto;
    max-width: 100%;
}

/* Latest posts within single */
.single-post-wrapper__latest-title {
    font-size: clamp(1.4rem, 2vw, 1.8rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.posts-grid {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

@media (max-width: 1024px) { .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .posts-grid { grid-template-columns: 1fr; } }

/* Article content styling (from WP editor) */
.single-post-wrapper__body h2,
.single-post-wrapper__body h3,
.single-post-wrapper__body h4 {
    margin: 1.5em 0 0.5em;
    line-height: 1.3;
}

.single-post-wrapper__body p { margin: 0 0 1em; }



.single-post-wrapper__body blockquote {
    margin: 1em 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(124, 58, 237, .06), rgba(6, 182, 212, .06));
    border: 1px dashed rgba(124, 58, 237, .25);
    font-style: italic;
}


.single-post-wrapper__body figure img {
    max-height: 700px;
    padding: 20px 10px;
    border-radius: 50px;
}

@media (max-width: 560px) {
    .single-post-wrapper__body figure img { max-height: 350px; }
}

/* ==========================================================================
   Article content styles (used in WP editor post content)
   Migrated from blog/[slug].vue <style>
   ========================================================================== */

.single-post-wrapper__body {
    --ink: #1f2937;
    --muted: #6b7280;
    --accent: #EC4400;
    --accent-2: #EC4400;
    --soft: #f3f4f6;
}

/* .article root — wraps WP editor content inside single-post-wrapper__body */
.single-post-wrapper__body .article,
.single-post-wrapper__body article.article {
    max-width: 980px;
    line-height: 1.75;
    color: var(--ink, #1f2937);
}

.article__toc {
    background: linear-gradient(135deg, rgba(124, 58, 237, .08), rgba(6, 182, 212, .08));
    border: 1px solid rgba(124, 58, 237, .18);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: clamp(18px, 3vw, 28px);
}

.article__toc-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 10px;
    letter-spacing: .2px;
    text-transform: uppercase;
    color: var(--accent);
}

.article__toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.article__toc-link {
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    transition: transform .15s ease, color .2s ease;
}

.article__toc-link::before {
    content: "\27F6";
    font-size: .95rem;
    color: var(--accent);
    transform: translateY(1px);
}

.article__toc-link:hover,
.article__toc-link:focus-visible {
    color: var(--accent);
    transform: translateX(2px);
    outline: none;
}

.article__title {
    font-size: clamp(1.6rem, 2.6vw, 2.25rem);
    margin: 8px 0 12px;
    font-weight: 800;
    letter-spacing: .2px;
    line-height: 1.25;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.article__lead {
    color: var(--muted);
    margin: 0 0 18px;
    text-align: justify;
    text-justify: inter-word;
}

.article__section {
    margin: clamp(22px, 5vw, 42px) 0;
    padding-top: 8px;
}

.article__heading {
    position: relative;
    font-size: clamp(1.25rem, 2.2vw, 1.6rem);
    margin: 0 0 12px;
    font-weight: 800;
}

.article__heading--accent {
    padding-bottom: 6px;
}

.article__heading--accent::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 86px;
    height: 6px;
    border-radius: 10px;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    opacity: .35;
}

.article__paragraph {
    margin: 0 0 12px;
    text-align: justify;
    text-justify: inter-word;
}

.article__callout {
    background: var(--soft);
    border-left: 4px solid var(--accent);
    padding: 12px 14px;
    border-radius: 10px;
    margin: 14px 0;
    font-size: .98rem;
}

.article__list {
    margin: 10px 0 12px 0;
    padding-left: 1.2rem;
}

.article__list--check > li {
    list-style: none;
    position: relative;
    padding-left: 1.4rem;
    margin: 8px 0;
    text-align: justify;
}

.article__list--check > li::before {
    content: "\2726";
    position: absolute;
    left: 0;
    top: 0;
    transform: translateY(2px);
    color: var(--accent);
    font-size: .9rem;
}

.article__quote {
    margin: 14px 0;
    padding: 14px 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(124, 58, 237, .06), rgba(6, 182, 212, .06));
    border: 1px dashed rgba(124, 58, 237, .25);
    font-style: italic;
}

.article__em {
    font-weight: 700;
    text-decoration: underline dotted;
    text-underline-offset: 4px;
}

.article__accent {
    color: var(--accent);
    font-weight: 700;
}

.article__summary {
    border-top: 1px solid #e5e7eb;
    margin-top: 28px;
    padding-top: 18px;
}

.article__footnote {
    font-size: .9rem;
    color: var(--muted);
    margin-top: 10px;
}

.article__figure img {
    max-height: 700px;
    padding: 20px 10px;
    border-radius: 50px;
}

/* FAQ */
.article__faq { margin: 1rem 0; }

.article__faq-item {
    margin-bottom: 1.5rem;
}

.article__faq-item .article__heading {
    font-size: 1.1rem;
}

.article__faq-item .article__paragraph {
    color: var(--muted);
}

@media (max-width: 560px) {
    .article__toc-list { grid-template-columns: 1fr; }
    .article__title { text-align: left; }
    .article__heading { text-align: left; }
    .article__figure img { max-height: 350px; }
}




/* ===== QUIZ / ANKIETA ===== */
.article__quiz-wrap .article__quiz-msg {
  display: none;
}

.article__quiz {
  margin: 20px 0;
}

.article__quiz-question {
  margin-bottom: 22px;
  padding: 16px 18px;
  background: var(--soft, #f3f4f6);
  border-radius: 12px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.article__quiz-question .article__paragraph {
  margin-bottom: 10px;
  text-align: left;
}

.article__quiz-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin: 6px 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s ease;
  font-size: .97rem;
  text-align: left;
}

.article__quiz-label:hover {
  background: rgba(236, 68, 0, .06);
}

.article__quiz-label input[type="radio"] {
  accent-color: var(--accent, #EC4400);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.article__quiz-label input[type="radio"]:disabled {
  cursor: default;
  opacity: .6;
}

.article__quiz-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent, #EC4400), #d63d00);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  margin-top: 8px;
}

.article__quiz-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236, 68, 0, .3);
}

.article__quiz-result {
  margin: 20px 0;
  padding: 20px 22px;
  background: linear-gradient(135deg, rgba(236, 68, 0, .06), rgba(214, 61, 0, .04));
  border: 1px solid rgba(236, 68, 0, .15);
  border-radius: 14px;
}

.article__quiz-score {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.article__quiz-score-bar {
  flex: 1;
  height: 10px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.article__quiz-score-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #eab308, #ef4444);
  border-radius: 999px;
  transition: width .6s ease;
}

.article__quiz-score-label {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent, #EC4400);
  min-width: 40px;
}

.article__quiz-message {
  margin: 0;
  line-height: 1.6;
}

.article__quiz-warning {
  color: #dc2626;
  font-weight: 600;
  margin: 0;
}

/* Accessibility niceties */
a:focus-visible {
  outline: 3px solid rgba(6, 182, 212, .5);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Small screens tweaks */
@media (max-width: 560px) {
  .article {
    padding: 14px 0px 40px;
  }

  .article__toc-list {
    grid-template-columns: 1fr;
  }

  .article__title {
    text-align: left;
  }

  .article__heading {
    text-align: left;
  }

  .article__figure img {
    max-height: 350px;
  }

  .article__quiz-question {
    margin-bottom: 16px;
    padding: 12px 12px;
  }

  .article__quiz-question .article__paragraph {
    font-size: .93rem;
    word-break: break-word;
  }

  .article__quiz-label {
    padding: 8px 10px;
    gap: 8px;
    font-size: .9rem;
    margin: 4px 0;
  }

  .article__quiz-button {
    width: 100%;
    padding: 12px 20px;
    font-size: .95rem;
  }
}
