/* === Base === */
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html { scroll-behavior: smooth; }
a { transition: color 0.2s ease; }
img { image-rendering: auto; }

/* === Force heading font (Plus Jakarta Sans) === */
h1, h2, h3, h4, h5, h6,
.wp-block-heading,
.wp-block-post-title,
.wp-block-site-title,
.wp-block-query-title {
  font-family: "Plus Jakarta Sans", "DM Sans", sans-serif !important;
}

/* === Hide duplicate H1 in content === */
.wp-block-post-content > .wp-block-heading:first-child { display: none; }
.entry-content > h1:first-child, .entry-content > .wp-block-heading:first-child { display: none; }

/* === Featured images === */
.wp-block-post-featured-image { overflow: hidden; border-radius: 16px; }
.wp-block-post-featured-image img { transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94); will-change: transform; }
.wp-block-post-featured-image a:hover img { transform: scale(1.04); }

/* === Single post hero === */
.single-featured-image .wp-block-post-featured-image img { box-shadow: 0 20px 60px -12px rgba(15,23,42,0.2); }
.single-category-pill a { display: inline-block; background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); color: #4338CA !important; padding: 5px 16px; border-radius: 100px; font-size: 0.6875rem !important; font-weight: 700 !important; letter-spacing: 0.1em; text-transform: uppercase; transition: all 0.25s ease; text-decoration: none !important; }
.single-category-pill a:hover { background: linear-gradient(135deg, #4338CA 0%, #6366F1 100%); color: #ffffff !important; transform: translateY(-1px); }
.single-meta { border-top: 1px solid #E2E8F0; padding-top: 20px; }
.single-meta .wp-block-post-author__avatar img { border-radius: 50%; border: 2px solid #E2E8F0; }

/* === Breadcrumb === */
.single-breadcrumb a { text-decoration: none !important; transition: color 0.2s ease; }
.single-breadcrumb a:hover { color: var(--wp--preset--color--accent, #2563EB) !important; }

/* === Post content typography === */
.wp-block-post-content { font-family: "DM Sans", sans-serif; }
.wp-block-post-content a { color: #2563EB; text-decoration: underline; text-decoration-color: #BFDBFE; text-underline-offset: 3px; text-decoration-thickness: 2px; transition: all 0.2s ease; }
.wp-block-post-content a:hover { text-decoration-color: #2563EB; }

.wp-block-post-content h2 { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.035em; margin-top: 3rem; margin-bottom: 1rem; color: #0F172A; line-height: 1.15; padding-bottom: 0.75rem; border-bottom: 3px solid; border-image: linear-gradient(90deg, #2563EB, #7C3AED) 1; }
.wp-block-post-content h3 { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; margin-top: 2.5rem; margin-bottom: 0.75rem; color: #0F172A; line-height: 1.25; padding-left: 16px; border-left: 3px solid #2563EB; }
.wp-block-post-content h4 { font-size: 1.125rem; font-weight: 700; margin-top: 2rem; margin-bottom: 0.5rem; color: #1E293B; }

.wp-block-post-content p { font-size: 1.0625rem; line-height: 1.8; margin-bottom: 1.5rem; color: #374151; }
.wp-block-post-content strong { color: #0F172A; font-weight: 700; }

/* === Blockquotes === */
.wp-block-post-content blockquote,
.wp-block-post-content .wp-block-quote {
  border: none; border-left: 4px solid; border-image: linear-gradient(180deg, #2563EB, #7C3AED) 1;
  padding: 28px 32px; margin: 2.5rem 0;
  background: linear-gradient(135deg, #F8FAFC 0%, #EFF6FF 100%);
  border-radius: 0 16px 16px 0; position: relative;
}
.wp-block-post-content blockquote::before,
.wp-block-post-content .wp-block-quote::before {
  content: "\201C"; position: absolute; top: -8px; left: 20px;
  font-size: 4rem; color: #C7D2FE; font-family: Georgia, serif; line-height: 1;
}
.wp-block-post-content blockquote p,
.wp-block-post-content .wp-block-quote p {
  font-size: 1.0625rem; font-style: italic; color: #334155; line-height: 1.75; margin-bottom: 0;
}

/* === Lists === */
.wp-block-post-content ul { list-style: none; padding-left: 0; }
.wp-block-post-content ul li { position: relative; padding-left: 1.5rem; margin-bottom: 0.625rem; font-size: 1.0625rem; line-height: 1.8; color: #374151; }
.wp-block-post-content ul li::before { content: ""; position: absolute; left: 0; top: 0.65em; width: 6px; height: 6px; border-radius: 50%; background: linear-gradient(135deg, #2563EB, #7C3AED); }
.wp-block-post-content ol { font-size: 1.0625rem; line-height: 1.8; padding-left: 1.75rem; }
.wp-block-post-content ol li { margin-bottom: 0.625rem; color: #374151; padding-left: 0.25rem; }
.wp-block-post-content ol li::marker { color: #2563EB; font-weight: 700; }

/* === HR / Separators === */
.wp-block-post-content hr,
.wp-block-post-content .wp-block-separator {
  border: none; height: 3px;
  background: linear-gradient(90deg, #2563EB 0%, #7C3AED 50%, #EC4899 100%);
  border-radius: 3px; margin: 2.5rem 0; opacity: 0.35;
}

/* === Code === */
.wp-block-post-content code { background: #F1F5F9; color: #7C3AED; padding: 3px 8px; border-radius: 6px; font-size: 0.9em; font-weight: 500; }

/* === Tables === */
.wp-block-post-content table { border-collapse: separate; border-spacing: 0; width: 100%; border-radius: 12px; overflow: hidden; border: 1px solid #E2E8F0; margin: 2rem 0; }
.wp-block-post-content th { background: #F8FAFC; font-weight: 600; color: #0F172A; text-align: left; padding: 12px 16px; font-size: 0.875rem; border-bottom: 2px solid #E2E8F0; }
.wp-block-post-content td { padding: 12px 16px; border-bottom: 1px solid #F1F5F9; font-size: 0.9375rem; color: #475569; }
.wp-block-post-content tr:hover td { background: #F8FAFC; }
.wp-block-post-content tr:last-child td { border-bottom: none; }

/* === Tags === */
.single-tags a { display: inline-block; background: #F1F5F9; color: #475569 !important; padding: 5px 14px; border-radius: 100px; font-size: 0.8125rem; margin: 0 6px 6px 0; transition: all 0.2s ease; text-decoration: none !important; font-weight: 500; }
.single-tags a:hover { background: #E0E7FF; color: #4338CA !important; transform: translateY(-1px); }

/* === Author card === */
.single-author-card { transition: box-shadow 0.3s ease, transform 0.3s ease; }
.single-author-card:hover { box-shadow: 0 4px 20px rgba(15,23,42,0.06); transform: translateY(-1px); }
.single-author-card .wp-block-post-author__avatar img { border-radius: 50%; border: 3px solid #E0E7FF; }
.single-author-card .wp-block-post-author__name { font-weight: 700; color: #0F172A; }
.single-author-card .wp-block-post-author__bio { color: #64748B; font-size: 0.9rem; line-height: 1.6; }

/* === Related posts === */
.single-related { background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #1E293B 100%) !important; }
.related-post-card { transition: transform 0.3s ease, box-shadow 0.3s ease; overflow: hidden; }
.related-post-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(0,0,0,0.35); }
.related-post-card .wp-block-post-featured-image { margin: 0; }

/* === Dark sections gradient (generic) === */
.has-background[style*="background-color:#1E1B4B"] { background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 40%, #312E81 70%, #4C1D95 100%) !important; }

/* === Header === */
.wp-block-group.alignfull.has-background[style*="background-color:#2563EB"] { background: linear-gradient(90deg, #2563EB 0%, #7C3AED 50%, #EC4899 100%) !important; }
.wp-block-site-title a { text-decoration: none !important; }
.wp-block-navigation a { text-decoration: none !important; transition: color 0.2s ease; }

/* === Equal height cards in query loops === */
.wp-block-post-template { align-items: stretch; }
.wp-block-post-template > .wp-block-post { display: flex; flex-direction: column; }
.wp-block-post-template > .wp-block-post > .home-post-card,
.wp-block-post-template > .wp-block-post > .archive-card,
.wp-block-post-template > .wp-block-post > .related-post-card { display: flex; flex-direction: column; flex: 1; }
.home-post-card > .wp-block-group:last-child,
.archive-card > .wp-block-group:last-child,
.related-post-card > .wp-block-group:last-child { display: flex; flex-direction: column; flex: 1; }
.home-post-card .wp-block-post-date,
.archive-card .wp-block-post-date,
.related-post-card .wp-block-post-date { margin-top: auto; }

/* === Home cards === */
.home-post-card { transition: transform 0.3s ease, box-shadow 0.3s ease; overflow: hidden; }
.home-post-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(15,23,42,0.14); }
.home-category-pill a { display: inline-block; background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); color: #4338CA !important; padding: 3px 10px; border-radius: 100px; font-size: 0.6875rem !important; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none !important; transition: all 0.25s ease; }
.home-category-pill a:hover { background: #4338CA; color: #fff !important; }

/* === Home hero === */
.home-hero .wp-block-post-featured-image img { box-shadow: 0 20px 60px -12px rgba(15,23,42,0.15); }

/* === Archive cards === */
.archive-card { transition: transform 0.3s ease, box-shadow 0.3s ease; overflow: hidden; }
.archive-card:hover { transform: translateY(-6px); box-shadow: 0 16px 48px rgba(15,23,42,0.14); }

/* === Buttons === */
.wp-block-button__link { transition: all 0.3s ease !important; }
.wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(37,99,235,0.35); }

/* === Newsletter / CTA section === */
.home-cta { background: linear-gradient(135deg, #0F172A 0%, #1E1B4B 50%, #312E81 100%) !important; }

/* === Footer === */
.wp-block-categories-list { list-style: none !important; padding-left: 0 !important; }
.wp-block-categories-list li { padding: 4px 0; }
.wp-block-categories-list a { text-decoration: none !important; }

/* === Footer tag pills === */
.footer-tags { line-height: 2.2; }
.footer-tags a { display: inline-block; background: rgba(255,255,255,0.06); color: #94A3B8 !important; padding: 4px 12px; border-radius: 100px; font-size: 0.8125rem !important; font-weight: 500; text-decoration: none !important; transition: all 0.2s ease; margin: 0 4px 6px 0; border: 1px solid rgba(255,255,255,0.08); }
.footer-tags a:hover { background: rgba(99,102,241,0.15); color: #A5B4FC !important; border-color: rgba(99,102,241,0.3); }

/* === Pagination === */
.wp-block-query-pagination { gap: 8px; }
.wp-block-query-pagination-numbers .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 10px; font-weight: 600; font-size: 0.875rem; transition: all 0.2s ease; color: #475569; background: #F1F5F9; text-decoration: none; }
.wp-block-query-pagination-numbers .page-numbers:hover { background: #E0E7FF; color: #4338CA; }
.wp-block-query-pagination-numbers .page-numbers.current { background: #2563EB; color: #ffffff; }
.wp-block-query-pagination-previous a,
.wp-block-query-pagination-next a { font-weight: 600; text-decoration: none; color: #2563EB; transition: color 0.2s ease; }
.wp-block-query-pagination-previous a:hover,
.wp-block-query-pagination-next a:hover { color: #7C3AED; }

/* === Author + date alignment === */
.wp-block-post-author { display: flex; align-items: center; flex-wrap: nowrap; gap: 10px; }
.wp-block-post-author__avatar { display: flex; align-items: center; flex-shrink: 0; }
.wp-block-post-author__avatar img { border-radius: 50% !important; }
.wp-block-post-author__content { display: flex; align-items: center; }

/* === Post excerpt === */
.wp-block-post-excerpt__excerpt { color: #64748B; }

/* === Selection === */
::selection { background: #C7D2FE; color: #1E1B4B; }

/* === Focus styles (a11y) === */
a:focus-visible, button:focus-visible, .wp-block-button__link:focus-visible {
  outline: 2px solid #2563EB; outline-offset: 2px; border-radius: 4px;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .home-hero .wp-block-columns { gap: 2rem !important; }
}

@media (max-width: 768px) {
  .wp-block-post-content h2 { font-size: 1.5rem; margin-top: 2.5rem; }
  .wp-block-post-content h3 { font-size: 1.25rem; }
  .related-post-card, .home-post-card, .archive-card { margin-bottom: 1rem; }
  .home-hero .wp-block-columns { flex-direction: column !important; }
  .home-hero .wp-block-column { flex-basis: 100% !important; }
  .single-author-card { flex-direction: column !important; align-items: flex-start !important; }
  .wp-block-post-content blockquote,
  .wp-block-post-content .wp-block-quote { padding: 20px 24px; margin: 2rem 0; }
  .wp-block-post-content blockquote::before,
  .wp-block-post-content .wp-block-quote::before { font-size: 3rem; top: -4px; left: 16px; }
}

@media (max-width: 480px) {
  .wp-block-post-content h2 { font-size: 1.375rem; margin-top: 2rem; padding-bottom: 0.5rem; }
  .wp-block-post-content h3 { font-size: 1.125rem; padding-left: 12px; }
  .wp-block-post-content p { font-size: 1rem; line-height: 1.75; }
  .wp-block-post-content ul li,
  .wp-block-post-content ol li { font-size: 1rem; }
  .single-meta { flex-wrap: wrap !important; }
}

/* ============================
   32. Hide tag separators (commas)
   ============================ */
.taxonomy-post_tag .wp-block-post-terms__separator {
  display: none;
}

/* ============================
   33. Reset post-content link styles inside cards
   ============================ */
.wp-block-post-content .home-post-card a,
.wp-block-post-content .home-post-card a:visited {
  text-decoration: none !important;
  color: inherit !important;
  text-decoration-color: transparent !important;
  text-decoration-thickness: 0 !important;
}
.wp-block-post-content .home-post-card .wp-block-post-title a {
  color: var(--wp--preset--color--heading, #0F172A) !important;
}
.wp-block-post-content .home-post-card .wp-block-post-title a:hover {
  color: var(--wp--preset--color--accent, #2563EB) !important;
}
.wp-block-post-content .home-category-pill a {
  color: #4338CA !important;
}

/* ============================
   34. Hide list bullets on post-template inside post-content
   ============================ */
.wp-block-post-content .wp-block-post-template li::before {
  display: none !important;
  content: none !important;
}
.wp-block-post-content .wp-block-post-template li {
  padding-left: 0 !important;
}

/* ============================
   35. Nav links black + Blog intro less padding
   ============================ */
.wp-block-navigation a {
  color: #0F172A !important;
}
.wp-block-navigation a:hover {
  color: #2563EB !important;
}

/* ============================
   36. Remove h2 border-bottom inside query sections on blog page
   ============================ */
.wp-block-post-content > .wp-block-group h2.wp-block-heading {
  border-bottom: none !important;
  border-image: none !important;
  padding-bottom: 0 !important;
}

/* ============================
   37. Prevent horizontal overflow on mobile
   ============================ */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}
.wp-site-blocks,
.entry-content,
.wp-block-post-content,
.wp-block-group.alignfull {
  overflow-x: hidden;
}
