/* ============================================================
   BLOG — Pixelee Design System
   ============================================================ */

/* -------- Blog Hero -------- */
.blog-hero {
  padding: clamp(5rem, 10vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
}

.blog-hero__eyebrow {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 1.1rem;
}

.blog-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--text-main);
  max-width: 680px;
  margin: 0 auto 1.25rem;
  letter-spacing: -0.02em;
}

.blog-hero__title span {
  color: var(--brand-blue);
}

.blog-hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.12rem);
  color: var(--text-soft);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.68;
}

/* -------- Posts Grid -------- */
.blog-section {
  padding: clamp(3rem, 6vw, 5rem) 0 clamp(4rem, 8vw, 7rem);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 960px) {
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 580px) {
  .blog-grid { grid-template-columns: 1fr; }
}

/* -------- Card -------- */
.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 0.4s var(--ease-out),
    box-shadow 0.4s var(--ease-out);
  animation: card-in 0.5s var(--ease-out) both;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.09);
}

.blog-card:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}

/* Card image */
.blog-card__image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #f2f2f2;
}

.blog-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}

.blog-card:hover .blog-card__image-wrap img {
  transform: scale(1.05);
}

.blog-card__image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--brand-blue) 0%, #2942c8 60%, #1a2778 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-card__image-placeholder span {
  font-size: 2.5rem;
  opacity: 0.25;
  color: #fff;
}

/* Card body */
.blog-card__body {
  padding: 1.5rem 1.5rem 1.75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.blog-card__tag {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--brand-blue);
  background: rgba(80, 111, 253, 0.08);
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}

.blog-card__date {
  font-size: 0.72rem;
  color: var(--text-soft);
  font-weight: 500;
}

.blog-card__title {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 0.7rem;
}

.blog-card__desc {
  font-size: 0.875rem;
  color: var(--text-soft);
  line-height: 1.65;
  margin-bottom: 1.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-main);
  margin-top: auto;
  transition: color 0.3s, gap 0.3s var(--ease-out);
  text-decoration: none;
}

.blog-card__link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease-out);
}

.blog-card:hover .blog-card__link {
  color: var(--brand-blue);
  gap: 0.7rem;
}

.blog-card:hover .blog-card__link svg {
  transform: translateX(4px);
}

/* -------- Empty / Loading -------- */
.blog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 0;
}

.blog-empty h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.blog-empty p {
  color: var(--text-soft);
}

/* -------- Skeleton shimmer -------- */
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.blog-card--skeleton {
  pointer-events: none;
}

.blog-card--skeleton .blog-card__image-wrap {
  background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}

.skel-line {
  border-radius: 4px;
  margin-bottom: 0.55rem;
  background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
}

.skel-line--xs   { height: 0.6em;  width: 30%; }
.skel-line--sm   { height: 0.7em;  width: 42%; }
.skel-line--md   { height: 0.85em; width: 65%; }
.skel-line--lg   { height: 0.85em; width: 92%; }
.skel-line--title { height: 1.4em;  width: 80%; margin-bottom: 0.75rem; }

/* -------- Card enter animation -------- */
@keyframes card-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   POST PAGE
   ============================================================ */

.post-page main {
  padding-bottom: 0;
}

/* ---- Reading progress bar (fixed top) ---- */
.post-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--brand-lime), var(--brand-blue));
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ---- Back button ---- */
.post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  padding: 2.25rem 0 0;
  text-decoration: none;
  transition: color 0.25s, gap 0.3s var(--ease-out);
}

.post-back svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s var(--ease-out);
}

.post-back:hover { color: var(--text-main); gap: 0.75rem; }
.post-back:hover svg { transform: translateX(-4px); }

/* ---- Post header ---- */
.post-header {
  padding: clamp(1.75rem, 3.5vw, 3rem) 0 0;
  max-width: 820px;
}

.post-header__meta {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.35rem;
  flex-wrap: wrap;
}

.post-header__tag {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-blue);
  background: rgba(80, 111, 253, 0.08);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
}

.post-header__date,
.post-header__author {
  font-size: 0.78rem;
  color: var(--text-soft);
  font-weight: 500;
}

.post-header__date::before,
.post-header__author::before {
  content: "·";
  margin-right: 0.7rem;
  opacity: 0.35;
}

.post-header__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 3.6rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 0;
}

/* Decorative separator below title */
.post-header__divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2rem 0 2.5rem;
}

.post-header__divider::before {
  content: "";
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-lime), var(--brand-blue));
  border-radius: 999px;
  flex-shrink: 0;
}

.post-header__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ---- Cover image ---- */
.post-cover {
  aspect-ratio: 21 / 9;
  border-radius: var(--radius-l);
  overflow: hidden;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
  background: linear-gradient(135deg, var(--brand-blue) 0%, #2236c4 50%, #1a2778 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.1);
}

.post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 768px) {
  .post-cover { aspect-ratio: 16 / 9; }
}

/* ---- Post two-column layout ---- */
.post-layout {
  display: grid;
  grid-template-columns: minmax(0, 720px) 240px;
  gap: clamp(2.5rem, 4vw, 3.75rem);
  align-items: start;
}

.post-layout__content {
  min-width: 0;
}

@media (max-width: 1040px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { display: none; }
}

/* ---- Post sidebar ---- */
.post-sidebar {
  position: sticky;
  top: 7.5rem;
}

.post-sidebar__inner {
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
}

.post-sidebar__inner::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-lime), var(--brand-blue));
}

.post-sidebar__header {
  padding: 1.4rem 1.5rem 1.3rem;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.015);
}

.post-sidebar__eyebrow {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 0.45rem;
}

.post-sidebar__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 0.35rem;
}

.post-sidebar__sub {
  font-size: 0.77rem;
  color: var(--text-soft);
  line-height: 1.55;
  margin: 0;
}

.post-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition:
    background 0.2s,
    color 0.2s,
    padding-left 0.3s var(--ease-out);
}

.post-sidebar__link:last-child { border-bottom: none; }

.post-sidebar__link svg:first-child {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.post-sidebar__link__arrow {
  margin-left: auto;
  width: 13px;
  height: 13px;
  opacity: 0;
  flex-shrink: 0;
  transition: opacity 0.2s, transform 0.3s var(--ease-out);
}

.post-sidebar__link:hover {
  padding-left: 1.6rem;
  background: rgba(0, 0, 0, 0.025);
}

.post-sidebar__link:hover .post-sidebar__link__arrow {
  opacity: 1;
  transform: translateX(3px);
}

.post-sidebar__link--ig:hover { color: #E1306C; }
.post-sidebar__link--li:hover { color: #0077B5; }
.post-sidebar__link--fb:hover { color: #1877F2; }
.post-sidebar__link--tt:hover { color: #010101; }
.post-sidebar__link--wa:hover { color: #25D366; }

/* ---- Post body typography ---- */
.post-body {
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
}

.post-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  margin: 2.75rem 0 0.9rem;
  padding-left: 1rem;
  border-left: 3px solid var(--brand-lime);
}

.post-body h3 {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.5vw, 1.35rem);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin: 2.25rem 0 0.75rem;
}

.post-body p {
  font-size: 1.04rem;
  line-height: 1.82;
  color: var(--text-soft);
  margin-bottom: 1.35rem;
}

.post-body ul,
.post-body ol {
  padding-left: 1.25rem;
  margin-bottom: 1.35rem;
}

.post-body li {
  font-size: 1.04rem;
  line-height: 1.78;
  color: var(--text-soft);
  margin-bottom: 0.5rem;
}

.post-body li::marker { color: var(--brand-blue); }

.post-body strong { color: var(--text-main); font-weight: 700; }
.post-body em     { font-style: italic; }

.post-body a {
  color: var(--brand-blue);
  text-decoration: underline;
  text-decoration-color: rgba(80, 111, 253, 0.3);
  transition: text-decoration-color 0.2s;
}
.post-body a:hover { text-decoration-color: var(--brand-blue); }

/* Blockquote — dark, impactful */
.post-body blockquote {
  position: relative;
  background: var(--brand-black);
  border-left: none;
  border-radius: var(--radius-m);
  padding: 1.75rem 2rem 1.75rem 2.5rem;
  margin: 2.5rem 0;
  overflow: hidden;
}

.post-body blockquote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--brand-lime), var(--brand-blue));
}

.post-body blockquote p {
  font-size: 1.08rem;
  font-style: italic;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  line-height: 1.7;
}

.post-body hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 3rem 0;
}

/* Inline CTA (at end of post content in JSON) */
.post-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 2.25rem 2.5rem;
  background: var(--brand-black);
  border-radius: var(--radius-l);
  margin: 3rem 0 0;
  overflow: hidden;
}

.post-cta::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--brand-lime), var(--brand-blue));
}

.post-cta__text h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
  line-height: 1.3;
}

.post-cta__text p {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.58);
  margin: 0;
  line-height: 1.55;
}

/* ---- Author card ---- */
.post-author {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.75rem 2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  margin: 3rem 0 1.5rem;
}

.post-author__avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--brand-black);
  color: var(--brand-lime);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.post-author__info { flex: 1; }

.post-author__name {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.3rem;
}

.post-author__role {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin-bottom: 0.5rem;
}

.post-author__bio {
  font-size: 0.88rem;
  color: var(--text-soft);
  line-height: 1.6;
  margin: 0;
}

/* ---- Post navigation bottom ---- */
.post-nav {
  display: flex;
  justify-content: flex-start;
  padding: 0.5rem 0 4rem;
}

/* ---- End CTA (static dark section) ---- */
.post-end-cta {
  background: var(--brand-black);
  padding: clamp(5rem, 9vw, 8rem) 0;
  text-align: center;
}

.post-end-cta__eyebrow {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brand-lime);
  margin-bottom: 1.1rem;
}

.post-end-cta__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.13;
  letter-spacing: -0.025em;
  max-width: 620px;
  margin: 0 auto 1rem;
}

.post-end-cta__sub {
  font-size: clamp(0.95rem, 2vw, 1.05rem);
  color: rgba(255, 255, 255, 0.55);
  max-width: 460px;
  margin: 0 auto 2.75rem;
  line-height: 1.68;
}

.post-end-cta__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Ghost button override on dark bg */
.post-end-cta .btn-ghost {
  border-color: rgba(255, 255, 255, 0.25);
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
}

.post-end-cta .btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.6);
  color: #fff;
}

/* ---- Post loading skeleton ---- */
.post-skeleton { padding: 2rem 0; }
.post-skeleton .skel-line { margin-bottom: 0.75rem; }

.post-skeleton__cover {
  aspect-ratio: 21 / 9;
  border-radius: var(--radius-l);
  background: linear-gradient(90deg, #f0f0f0 25%, #e6e6e6 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s infinite;
  margin: 2rem 0;
}

@media (max-width: 768px) {
  .post-skeleton__cover { aspect-ratio: 16 / 9; }
}

/* ---- Shared nav active state ---- */
.nav a[aria-current="page"] { color: var(--brand-blue); }
.nav a[aria-current="page"]::before {
  transform: scaleX(1) !important;
  background: var(--brand-blue);
}

/* ============================================================
   BLOG FILTERS (categorías)
   ============================================================ */

.blog-filters {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.blog-filter {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition:
    background 0.25s var(--ease-out),
    border-color 0.25s,
    color 0.25s,
    transform 0.2s var(--ease-out);
  white-space: nowrap;
}

.blog-filter:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  transform: translateY(-1px);
}

.blog-filter.is-active {
  background: var(--brand-black);
  border-color: var(--brand-black);
  color: #fff;
}

.blog-filter.is-active:hover {
  transform: translateY(-1px);
  color: #fff;
}

.blog-filter__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 0.78em;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.07);
  padding: 0 0.3em;
  transition: background 0.25s, color 0.25s;
}

.blog-filter.is-active .blog-filter__count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* Grid fade when filtering */
.blog-grid.is-filtering {
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.15s, transform 0.15s;
}

.blog-grid {
  transition: opacity 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}

/* ============================================================
   SOCIAL SHARE
   ============================================================ */

.post-share {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 0 0.5rem;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  flex-wrap: wrap;
}

.post-share__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  flex-shrink: 0;
}

.post-share__buttons {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  flex-wrap: wrap;
}

.post-share__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  height: 38px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text-soft);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition:
    background 0.25s var(--ease-out),
    border-color 0.25s,
    color 0.25s,
    transform 0.2s var(--ease-out);
  white-space: nowrap;
}

.post-share__btn svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.post-share__btn:hover    { transform: translateY(-2px); }

.post-share__btn--wa:hover {
  background: #25D366;
  border-color: #25D366;
  color: #fff;
}

.post-share__btn--fb:hover {
  background: #1877F2;
  border-color: #1877F2;
  color: #fff;
}

.post-share__btn--ig:hover {
  background: #E1306C;
  border-color: #E1306C;
  color: #fff;
}

.post-share__btn--tt:hover {
  background: #010101;
  border-color: #010101;
  color: #fff;
}

.post-share__btn--li:hover {
  background: #0077B5;
  border-color: #0077B5;
  color: #fff;
}

.post-share__btn--x:hover {
  background: #000;
  border-color: #000;
  color: #fff;
}

.post-share__btn--copy:hover {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}

.post-share__btn--copy.is-copied {
  background: var(--brand-lime);
  border-color: var(--brand-lime);
  color: var(--brand-black);
  transform: translateY(-2px);
}

@media (max-width: 580px) {
  .post-share { gap: 0.75rem; }
  .post-share__btn { font-size: 0.65rem; padding: 0 0.8rem; }
}
