/* ============================================================
   PMA SOLUTIONS — BLOG (listing + article)
   Reuses the site design tokens (--color-dark, --color-accent,
   --font-display, --font-body). Layout inspired by a clean
   editorial blog: centered article column, prominent byline.
   ============================================================ */

/* ---------- shared ---------- */
.blog-cat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
}
.blog-cat::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ---------- LISTING ---------- */
.blog-list { padding: 56px 0 88px; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
/* Tablet and phone: two cards side by side, compact card content */
@media (max-width: 900px) {
  .blog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

.bcard {
  display: flex;
  flex-direction: column;
  background: var(--color-white, #fff);
  border: 1px solid var(--color-gray-100, #e9ecef);
  border-radius: var(--radius-lg, 20px);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.bcard:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(26, 43, 60, 0.12);
}
.bcard__media { aspect-ratio: 16 / 9; overflow: hidden; background: #0f1926; }
.bcard__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bcard__body { padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.bcard__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1.25;
  color: var(--color-dark);
  margin: 0;
}
.bcard__excerpt { font-size: 0.98rem; line-height: 1.6; color: #55606c; margin: 0; flex: 1; }
.bcard__meta {
  display: flex; align-items: center; gap: 10px;
  margin-top: 6px; padding-top: 16px;
  border-top: 1px solid var(--color-gray-100, #eef1f4);
  font-size: 0.85rem; color: #6b7682;
}
.bcard__meta img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.bcard__meta strong { color: var(--color-dark); font-weight: 600; }
.bcard__meta .dot { opacity: 0.5; }

/* ---------- ARTICLE ---------- */
.post { padding: 8px 0 40px; }
.post__head { max-width: 820px; margin: 0 auto; text-align: center; }
.post__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--color-dark);
  margin: 16px 0 0;
}
.post__byline {
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 12px;
  margin: 26px 0 0;
}
.post__byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.post__byline-who { text-align: left; line-height: 1.3; }
.post__byline-name { font-weight: 600; color: var(--color-dark); }
.post__byline-role { font-size: 0.85rem; color: #6b7682; }
.post__byline-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.88rem; color: #6b7682;
  padding-left: 14px; margin-left: 2px;
  border-left: 1px solid var(--color-gray-100, #e3e7eb);
}
.post__byline-meta .dot { opacity: 0.5; }
@media (max-width: 560px) {
  .post__byline-meta { border-left: 0; padding-left: 0; margin-left: 0; width: 100%; justify-content: center; }
}

.post__hero {
  max-width: 1000px; margin: 36px auto 0;
  border-radius: var(--radius-lg, 20px); overflow: hidden;
  box-shadow: 0 20px 50px rgba(26, 43, 60, 0.16);
  background: #0f1926;
}
.post__hero img { width: 100%; height: auto; display: block; }

.post__body { max-width: 720px; margin: 44px auto 0; }
.post__body p {
  font-family: var(--font-body);
  font-size: 1.12rem; line-height: 1.78; color: #2c3742;
  margin: 0 0 22px;
}
.post__body h2 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.7rem; line-height: 1.25;
  color: var(--color-dark);
  margin: 40px 0 16px;
}
.post__body ul { margin: 0 0 22px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.post__body ul li {
  position: relative; padding-left: 30px;
  font-size: 1.1rem; line-height: 1.7; color: #2c3742;
}
.post__body ul li::before {
  content: ""; position: absolute; left: 4px; top: 11px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--color-accent);
}
.post__body strong { color: var(--color-dark); font-weight: 700; }
.post__body a { color: var(--color-accent); font-weight: 600; text-decoration: none; }
.post__body a:hover { text-decoration: underline; }

/* end-of-post CTA */
.post__cta {
  max-width: 720px; margin: 48px auto 0;
  background: var(--color-dark);
  border-radius: var(--radius-lg, 20px);
  padding: 40px 36px;
  text-align: center;
  color: #fff;
}
.post__cta h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; margin: 0 0 10px; color: #fff; }
.post__cta p { color: rgba(255,255,255,0.82); margin: 0 0 22px; line-height: 1.6; }

.post__back { max-width: 720px; margin: 36px auto 0; }
.post__back a { color: #6b7682; font-weight: 600; text-decoration: none; font-size: 0.95rem; }
.post__back a:hover { color: var(--color-accent); }

@media (max-width: 700px) {
  .post__body p, .post__body ul li { font-size: 1.05rem; }
  .post__hero { margin-top: 26px; border-radius: 14px; }
}

/* author bio box (end of article — strengthens E-E-A-T) */
.post__author {
  max-width: 720px; margin: 56px auto 0;
  display: flex; gap: 26px; align-items: flex-start;
  background:
    radial-gradient(130% 150% at 0% 0%, rgba(56, 182, 255, 0.10), transparent 55%),
    linear-gradient(180deg, #ffffff, #f6f9fb);
  border: 1px solid #e6ebf0;
  border-radius: 22px;
  padding: 32px 34px;
  box-shadow: 0 16px 40px rgba(26, 43, 60, 0.07);
}
.post__author-avatar { flex-shrink: 0; }
.post__author-avatar img {
  width: 92px; height: 92px; border-radius: 50%; object-fit: cover; display: block;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--color-accent), 0 10px 22px rgba(26, 43, 60, 0.16);
}
.post__author-eyebrow {
  display: inline-block; font-family: var(--font-body);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--color-accent); margin-bottom: 7px;
}
.post__author-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: 1.5rem; line-height: 1.1; color: var(--color-dark); margin: 0 0 3px;
}
.post__author-role { font-size: 0.92rem; font-weight: 600; color: #6b7682; margin-bottom: 13px; }
.post__author p { margin: 0 0 18px; font-size: 1rem; line-height: 1.65; color: #4b5662; }
.post__author-links { display: flex; flex-wrap: wrap; gap: 10px; }
.post__author-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  text-decoration: none; padding: 9px 18px; border-radius: 100px;
  background: var(--color-dark); color: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.post__author-link:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(26, 43, 60, 0.18); }
.post__author-link--ghost { background: transparent; color: var(--color-dark); border: 1px solid #d8dde2; box-shadow: none; }
.post__author-link--ghost:hover { border-color: var(--color-accent); color: var(--color-accent); box-shadow: none; }
@media (max-width: 560px) {
  .post__author { flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 30px 24px; }
  .post__author-links { justify-content: center; }
}

/* ============================================================
   Breadcrumb on the blog ARTICLE sits on a light/white background
   (not a dark image hero like the case/service pages), so the
   default white breadcrumb text is invisible. Make it dark.
   Scoped to .post = ONLY the blog article page.
   ============================================================ */
.post .case-breadcrumb { text-shadow: none; }
.post .case-breadcrumb a { color: #5b6670; text-shadow: none; }
.post .case-breadcrumb a:hover { color: var(--color-accent); }
.post .case-breadcrumb span { color: #aeb6be; text-shadow: none; }
.post .case-breadcrumb [aria-current] { color: var(--color-dark); font-weight: 500; }

/* ============================================================
   Long-form article extras: subheads (h3), data tables,
   FAQ block and inline callout. Used by guide-style posts
   (e.g. Meta Ads in Spain). Scoped under .post__body.
   ============================================================ */
.post__body h3 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.28rem; line-height: 1.3;
  color: var(--color-dark);
  margin: 30px 0 12px;
}

/* data table (budget tiers etc.) */
.post__table-wrap {
  max-width: 720px; margin: 0 auto 26px;
  overflow-x: auto;
  border: 1px solid #e6ebf0; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(26, 43, 60, 0.06);
}
.post__table-wrap table {
  width: 100%; border-collapse: collapse;
  font-family: var(--font-body); font-size: 1rem;
}
.post__table-wrap thead th {
  background: #f6f9fb; color: var(--color-dark);
  font-weight: 700; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.03em;
  text-align: left; padding: 13px 16px;
  border-bottom: 1px solid #e6ebf0;
}
.post__table-wrap tbody td {
  padding: 13px 16px; color: #2c3742; line-height: 1.5;
  border-bottom: 1px solid #eef2f5; vertical-align: top;
}
.post__table-wrap tbody tr:last-child td { border-bottom: 0; }
.post__table-wrap tbody td:first-child { font-weight: 600; color: var(--color-dark); white-space: nowrap; }

/* inline callout (case-study nudge inside the body) */
.post__note {
  max-width: 720px; margin: 30px auto;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(56, 182, 255, 0.10), transparent 60%),
    #f8fbfd;
  border: 1px solid #e1e8ee; border-left: 3px solid var(--color-accent);
  border-radius: 14px; padding: 22px 26px;
}
.post__note p { margin: 0; font-size: 1.05rem; line-height: 1.65; color: #2c3742; }

/* FAQ accordion (collapsible per question) */
.post__faq { max-width: 720px; margin: 10px auto 0; }
.post__faq-item { border-top: 1px solid #e6ebf0; }
.post__faq-item:first-of-type { border-top: 0; }
.post__faq-item > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 22px 2px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.18rem; line-height: 1.3;
  color: var(--color-dark);
  transition: color 0.18s ease;
}
.post__faq-item > summary:hover { color: var(--color-accent); }
.post__faq-item > summary::-webkit-details-marker { display: none; }
.post__faq-item > summary::after {
  content: ""; flex: 0 0 auto; width: 11px; height: 11px; margin-right: 6px;
  border-right: 2.5px solid var(--color-accent); border-bottom: 2.5px solid var(--color-accent);
  transform: rotate(45deg); transition: transform 0.22s ease;
}
.post__faq-item[open] > summary::after { transform: rotate(-135deg); }
.post__faq-item > p {
  margin: -4px 0 24px; padding-right: 26px;
  font-family: var(--font-body); font-size: 1.08rem; line-height: 1.7; color: #2c3742;
}

@media (max-width: 700px) {
  .post__table-wrap table { font-size: 0.94rem; }
  .post__table-wrap thead th, .post__table-wrap tbody td { padding: 11px 12px; }
}

/* ============================================================
   Related articles ("Keep reading") under each post.
   Three cards side by side on desktop, two side by side on
   phones (the third wraps below). Dark cards to match the
   site-wide dark blocks.
   ============================================================ */
.post__related { max-width: 1000px; margin: 56px auto 0; }
.post__related-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--color-dark);
  margin: 0 0 18px;
}
.post__related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.rcard {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  border-radius: 16px;
  overflow: hidden;
  background:
    radial-gradient(130% 130% at 0% 0%, rgba(56, 182, 255, 0.05), transparent 52%),
    linear-gradient(165deg, #202427 0%, #15181a 100%);
  border: 1px solid rgba(244, 241, 234, 0.10);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.rcard:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(10, 15, 20, 0.3); }
.rcard__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0f1926; }
.rcard__media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.rcard:hover .rcard__media img { transform: scale(1.04); }
.rcard__body { display: flex; flex-direction: column; gap: 7px; padding: 14px 16px 17px; }
.rcard__cat {
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #9bd7ff;
}
.rcard__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.3;
  color: #f4f1ea;
}
@media (max-width: 700px) {
  .post__related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .rcard__body { padding: 11px 12px 13px; gap: 5px; }
  .rcard__cat { font-size: 0.62rem; }
  .rcard__title { font-size: 0.86rem; }
}

/* Compact listing cards on phones (two side by side). At the end of the
   file so these win over the base .bcard rules above. */
@media (max-width: 600px) {
  .bcard__body { padding: 13px 13px 15px; gap: 8px; }
  .blog-cat { font-size: 0.64rem; }
  .bcard__title { font-size: 0.92rem; line-height: 1.25; }
  .bcard__excerpt {
    font-size: 0.74rem; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
  .bcard__meta { gap: 6px; margin-top: 2px; padding-top: 10px; font-size: 0.68rem; flex-wrap: wrap; }
  .bcard__meta img { width: 22px; height: 22px; }
}
