/*
Theme Name: Hello Elementor Blog Child
Theme URI: https://elementor.com/
Description: A lightweight child theme for Hello Elementor that adds a styled blog listing (card grid) and a clean, readable single-post layout. Works with Elementor Free. Change the accent colour in one line near the top of the CSS variables below.
Author: Built for you
Template: hello-elementor
Version: 1.1.0
Text Domain: hello-elementor-blog-child
*/

/* =========================================================
   THEME TOKENS — change these to re-skin the whole blog
   ========================================================= */
:root {
  --blog-accent: #3056d3;   /* links, category labels, buttons — change this to your brand colour */
  --blog-accent-ink: #1e3aa8;
  --blog-ink: #16181d;      /* main text */
  --blog-muted: #6b7280;    /* dates, meta */
  --blog-line: #e7e8ec;     /* borders, dividers */
  --blog-card: #ffffff;     /* card background */
  --blog-bg: #fbfbfc;       /* page background behind cards */
  --blog-radius: 14px;
  --blog-maxw: 1120px;      /* listing width */
  --blog-read: 720px;       /* article reading width */
  --blog-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --blog-serif: Georgia, "Iowan Old Style", "Source Serif Pro", "Times New Roman", serif;
}

/* =========================================================
   SHARED WRAPPER
   ========================================================= */
.blog-wrap {
  max-width: var(--blog-maxw);
  margin: 0 auto;
  padding: 56px 24px 80px;
  font-family: var(--blog-sans);
  color: var(--blog-ink);
  background: var(--blog-bg);
}
.blog-wrap a { color: var(--blog-accent); }

/* =========================================================
   LISTING HEADER
   ========================================================= */
.blog-head {
  margin-bottom: 40px;
  border-bottom: 1px solid var(--blog-line);
  padding-bottom: 24px;
}
.blog-head__eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blog-accent);
  font-weight: 600;
  margin: 0 0 8px;
}
.blog-head__title {
  font-family: var(--blog-sans);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--blog-ink);
}

/* =========================================================
   POST GRID + CARDS
   ========================================================= */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.post-card {
  background: var(--blog-card);
  border: 1px solid var(--blog-line);
  border-radius: var(--blog-radius);
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(20, 24, 29, 0.10);
  border-color: #d8dae0;
}
.post-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}
.post-card__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef0f4;
}
.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card__thumb img { transform: scale(1.04); }
.post-card__body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card__meta {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blog-muted);
  margin-bottom: 12px;
}
.post-card__meta .cat { color: var(--blog-accent); font-weight: 600; }
.post-card__title {
  font-size: 1.28rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
  color: var(--blog-ink);
}
.post-card__excerpt {
  font-size: 0.96rem;
  line-height: 1.6;
  color: #4b4f57;
  margin: 0 0 18px;
}
.post-card__more {
  margin-top: auto;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--blog-accent);
}

/* Empty state */
.blog-empty {
  padding: 60px 0;
  color: var(--blog-muted);
  font-size: 1.05rem;
}

/* =========================================================
   PAGINATION
   ========================================================= */
.blog-wrap .pagination {
  margin-top: 48px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.blog-wrap .pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--blog-line);
  border-radius: 10px;
  text-decoration: none;
  color: var(--blog-ink);
  font-size: 0.9rem;
  background: var(--blog-card);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.blog-wrap .pagination .page-numbers:hover {
  border-color: var(--blog-accent);
  color: var(--blog-accent);
}
.blog-wrap .pagination .page-numbers.current {
  background: var(--blog-accent);
  border-color: var(--blog-accent);
  color: #fff;
}

/* =========================================================
   SINGLE POST
   ========================================================= */
.single-wrap {
  max-width: var(--blog-read);
  margin: 0 auto;
  padding: 56px 24px 90px;
  font-family: var(--blog-sans);
  color: var(--blog-ink);
}
.post__back {
  display: inline-block;
  margin-bottom: 28px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--blog-muted);
  text-decoration: none;
}
.post__back:hover { color: var(--blog-accent); }
.post__meta {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blog-muted);
  margin-bottom: 14px;
}
.post__meta .cat { color: var(--blog-accent); font-weight: 600; }
.post__title {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
}
.post__hero {
  margin: 32px 0 8px;
  border-radius: var(--blog-radius);
  overflow: hidden;
}
.post__hero img { width: 100%; height: auto; display: block; }

/* Article body — serif for comfortable long-form reading */
.post__content {
  font-family: var(--blog-serif);
  font-size: 1.15rem;
  line-height: 1.75;
  color: #24272e;
  margin-top: 36px;
}
.post__content > * { margin-top: 0; margin-bottom: 1.35em; }
.post__content h2 {
  font-family: var(--blog-sans);
  font-size: 1.6rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-top: 1.8em;
  color: var(--blog-ink);
}
.post__content h3 {
  font-family: var(--blog-sans);
  font-size: 1.28rem;
  margin-top: 1.6em;
  color: var(--blog-ink);
}
.post__content a { color: var(--blog-accent); text-underline-offset: 2px; }
.post__content img { max-width: 100%; height: auto; border-radius: 10px; }
.post__content blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--blog-accent);
  color: #3a3e46;
  font-style: italic;
}
.post__content ul, .post__content ol { padding-left: 1.3em; }
.post__content li { margin-bottom: 0.5em; }
.post__content pre {
  background: #16181d;
  color: #f4f5f7;
  padding: 18px 20px;
  border-radius: 10px;
  overflow-x: auto;
  font-size: 0.92rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.post__content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}
.post__content :not(pre) > code {
  background: #f0f1f4;
  padding: 2px 6px;
  border-radius: 5px;
}
.post__footer {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--blog-line);
}
.post__tags a {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--blog-muted);
  background: #f1f2f5;
  padding: 5px 12px;
  border-radius: 999px;
  margin: 0 6px 6px 0;
  text-decoration: none;
}
.post__tags a:hover { color: var(--blog-accent); }

/* =========================================================
   FOCUS + MOTION + RESPONSIVE
   ========================================================= */
.post-card__link:focus-visible,
.blog-wrap a:focus-visible,
.single-wrap a:focus-visible {
  outline: 2px solid var(--blog-accent);
  outline-offset: 3px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .post-card,
  .post-card__thumb img { transition: none; }
  .post-card:hover { transform: none; }
  .post-card:hover .post-card__thumb img { transform: none; }
}
@media (max-width: 600px) {
  .blog-wrap { padding: 36px 18px 60px; }
  .single-wrap { padding: 36px 18px 64px; }
  .post-grid { gap: 20px; }
}

/* =========================================================
   SITE HEADER — styles Hello's default header
   (covers both the classic and the newer "dynamic" header)
   ========================================================= */
#site-header.site-header {
  background: var(--blog-card);
  border-bottom: 1px solid var(--blog-line);
  font-family: var(--blog-sans);
}
#site-header .header-inner,
#site-header.site-header:not(.dynamic-header) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  max-width: var(--blog-maxw);
  margin: 0 auto;
  padding: 18px 24px;
}
#site-header .site-branding { display: flex; flex-direction: column; gap: 2px; }
#site-header .site-title { margin: 0; }
#site-header .site-title a {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--blog-ink);
  text-decoration: none;
}
#site-header .site-title a:hover { color: var(--blog-accent); }
#site-header .site-description { margin: 0; font-size: 0.85rem; color: var(--blog-muted); }
#site-header .site-logo img { max-height: 48px; width: auto; display: block; }

/* nav menu (wp_nav_menu output) */
#site-header .site-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
#site-header .site-navigation li { margin: 0; }
#site-header .site-navigation a {
  display: block;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--blog-ink);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
#site-header .site-navigation a:hover { background: #f1f2f5; color: var(--blog-accent); }
#site-header .site-navigation .current-menu-item > a,
#site-header .site-navigation .current_page_item > a { color: var(--blog-accent); }

/* mobile hamburger (only present in the dynamic header) */
#site-header .site-navigation-toggle-holder { display: none; }
#site-header .site-navigation-toggle {
  background: none;
  border: 1px solid var(--blog-line);
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
#site-header .site-navigation-toggle-icon { position: relative; width: 20px; height: 2px; background: var(--blog-ink); display: block; }
#site-header .site-navigation-toggle-icon::before,
#site-header .site-navigation-toggle-icon::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: var(--blog-ink);
}
#site-header .site-navigation-toggle-icon::before { top: -6px; }
#site-header .site-navigation-toggle-icon::after { top: 6px; }
#site-header .site-navigation-dropdown ul { list-style: none; margin: 0; padding: 8px; }
#site-header .site-navigation-dropdown a {
  display: block; padding: 10px 14px; border-radius: 8px;
  color: var(--blog-ink); text-decoration: none;
}
#site-header .site-navigation-dropdown a:hover { background: #f1f2f5; color: var(--blog-accent); }

@media (max-width: 768px) {
  #site-header.dynamic-header .site-navigation { display: none; }
  #site-header.dynamic-header .site-navigation-toggle-holder { display: block; }
}

/* =========================================================
   SITE FOOTER — styles Hello's default footer
   ========================================================= */
#site-footer.site-footer {
  background: #16181d;
  color: #c8ccd4;
  font-family: var(--blog-sans);
  margin-top: 64px;
}
#site-footer .footer-inner,
#site-footer.site-footer:not(.dynamic-footer) {
  max-width: var(--blog-maxw);
  margin: 0 auto;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}
#site-footer .site-branding { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#site-footer .site-title a { color: #fff; font-weight: 700; text-decoration: none; font-size: 1.15rem; }
#site-footer .site-description { margin: 0; color: #9aa0ab; font-size: 0.9rem; }
#site-footer .site-logo img { max-height: 40px; width: auto; }
#site-footer .site-navigation ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px;
}
#site-footer .site-navigation a { color: #c8ccd4; text-decoration: none; font-size: 0.92rem; }
#site-footer .site-navigation a:hover { color: #fff; }
#site-footer .copyright p { margin: 0; color: #8b909b; font-size: 0.85rem; }
