/* Faraz Divi Child — blog design system (mobile-first, WCAG 2.2 AA contrast) */

:root {
	--faz-ink: #16202c;        /* body text, 15.3:1 on white */
	--faz-muted: #4d5b6b;      /* secondary text, 7.4:1 */
	--faz-brand: #0b5fa5;      /* links, 6.4:1 on white */
	--faz-brand-dark: #083e6b;   /* hover links */
	--faz-line: #e3e8ee;
	--faz-card: #f6f8fa;
	--faz-radius: 12px;
	--faz-shadow: 0 1px 2px rgba(22,32,44,.06), 0 8px 24px rgba(22,32,44,.07);
	--faz-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reading progress bar ---------- */
.faz-progress {
	position: fixed; top: 0; left: 0; right: 0; height: 3px;
	background: transparent; z-index: 99999;
}
.faz-progress__bar {
	height: 100%; width: 0; background: #0b5fa5;
	transition: width .08s linear;
}

/* ---------- Typography scale ---------- */
body .et_pb_post .entry-content {
	font-family: var(--faz-font);
	color: var(--faz-ink);
	font-size: 17px; line-height: 1.75;
}
@media (min-width: 768px) {
	body .et_pb_post .entry-content { font-size: 18px; }
}
.et_pb_post .entry-content h2 {
	font-size: 1.5em; line-height: 1.3; margin: 1.6em 0 .6em;
	color: var(--faz-ink); font-weight: 700;
}
.et_pb_post .entry-content h3 { font-size: 1.22em; margin: 1.4em 0 .5em; }
.et_pb_post .entry-content p { margin: 0 0 1.15em; }
.et_pb_post .entry-content a { color: var(--faz-brand); text-decoration: underline; text-underline-offset: 3px; }
.et_pb_post .entry-content a:hover { color: #083e6b; }

/* ---------- Accessible focus everywhere ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, .faz-toc a:focus-visible {
	outline: 3px solid #0b5fa5; outline-offset: 2px; border-radius: 4px;
}

/* ---------- TOC ---------- */
.faz-toc {
	background: var(--faz-card);
	border: 1px solid var(--faz-line);
	border-radius: var(--faz-radius);
	padding: 18px 20px 16px;
	margin: 0 0 28px;
	max-width: 640px;
}
.faz-toc__title {
	font-family: var(--faz-font); font-size: 12px; font-weight: 700;
	letter-spacing: .08em; text-transform: uppercase;
	color: var(--faz-muted); margin: 0 0 8px;
}
.faz-toc ol { margin: 0; padding-left: 20px; }
.faz-toc li { margin: 6px 0; }
.faz-toc a {
	font-family: var(--faz-font); font-size: 15px; color: var(--faz-brand);
	text-decoration: none; display: inline-block; min-height: 24px;
}
.faz-toc a:hover { text-decoration: underline; }
.faz-toc a.is-active { font-weight: 700; color: #083e6b; }

/* ---------- Share row ---------- */
.faz-share {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	margin: 32px 0 0; padding-top: 18px;
	border-top: 1px solid var(--faz-line);
}
.faz-share__label {
	font-family: var(--faz-font); font-size: 13px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .06em; color: var(--faz-muted);
}
.faz-share ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.faz-share__link {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 44px; min-width: 44px; padding: 10px 16px;
	font-family: var(--faz-font); font-size: 14px; font-weight: 600;
	color: var(--faz-ink); background: #fff;
	border: 1px solid var(--faz-line); border-radius: 999px;
	text-decoration: none; cursor: pointer;
}
.faz-share__link:hover { border-color: #0b5fa5; color: #0b5fa5; }
.faz-share__copy.is-done { border-color: #1a7f37; color: #1a7f37; }

/* ---------- Related posts ---------- */
.faz-related {
	margin: 40px 0 8px; padding-top: 24px; border-top: 1px solid var(--faz-line);
}
.faz-related__title {
	font-family: var(--faz-font); font-size: 22px; font-weight: 700;
	color: var(--faz-ink); margin: 0 0 16px;
}
.faz-related__grid {
	display: grid; grid-template-columns: 1fr; gap: 14px;
}
@media (min-width: 700px) { .faz-related__grid { grid-template-columns: repeat(3, 1fr); } }
.faz-card {
	background: #fff; border: 1px solid var(--faz-line);
	border-radius: var(--faz-radius); padding: 18px;
	box-shadow: var(--faz-shadow);
	display: flex; flex-direction: column; gap: 8px;
}
.faz-card__cat {
	font-family: var(--faz-font); font-size: 12px; font-weight: 700;
	letter-spacing: .06em; text-transform: uppercase;
	color: #0b5fa5; text-decoration: none; align-self: flex-start;
}
.faz-card__cat:hover { text-decoration: underline; }
.faz-card__title { font-family: var(--faz-font); font-size: 17px; font-weight: 700; margin: 0; line-height: 1.35; }
.faz-card__title a { color: var(--faz-ink); text-decoration: none; }
.faz-card__title a:hover { color: #0b5fa5; }
.faz-card__meta { font-family: var(--faz-font); font-size: 13.5px; color: var(--faz-muted); margin: 0; line-height: 1.5; }

/* ---------- Blog index: category pill nav + search ---------- */
.faz-catnav {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	margin: 0 0 24px;
}
.faz-catnav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.faz-catnav__pill {
	display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px;
	font-family: var(--faz-font); font-size: 14px; font-weight: 600;
	color: var(--faz-ink); background: #fff;
	border: 1px solid var(--faz-line); border-radius: 999px; text-decoration: none;
}
.faz-catnav__pill:hover { border-color: #0b5fa5; color: #0b5fa5; }
.faz-catnav__search { margin-left: auto; }
.faz-catnav__search input[type="search"] {
	font-family: var(--faz-font); font-size: 15px; color: var(--faz-ink);
	min-height: 44px; padding: 10px 14px;
	border: 1px solid #c9d3de; border-radius: 999px; min-width: 210px; background: #fff;
}

/* ---------- Blog index cards (Divi blog module output) ---------- */
.et_pb_blog_grid .et_pb_post, #left-area .et_pb_post {
	border: 1px solid var(--faz-line); border-radius: var(--faz-radius);
	box-shadow: var(--faz-shadow); padding: 20px; background: #fff;
}
.et_pb_blog_grid .et_pb_post h2 a, .et_pb_post .entry-title a {
	color: var(--faz-ink); text-decoration: none;
}
.et_pb_blog_grid .et_pb_post h2 a:hover, .et_pb_post .entry-title a:hover { color: #0b5fa5; }
.et_pb_post .post-meta { font-family: var(--faz-font); font-size: 13px; color: var(--faz-muted); }
.et_pb_post .post-meta a { color: #0b5fa5; }

/* ---------- Archive / search / author headings ---------- */
.faz-archive {
	margin: 0 0 28px; padding: 22px 24px;
	background: var(--faz-card); border: 1px solid var(--faz-line);
	border-radius: var(--faz-radius);
}
.faz-archive__eyebrow {
	font-family: var(--faz-font); font-size: 12px; font-weight: 700;
	letter-spacing: .08em; text-transform: uppercase;
	color: #0b5fa5; margin: 0 0 6px;
}
.faz-archive__title {
	font-family: var(--faz-font); font-size: 26px; font-weight: 700;
	color: var(--faz-ink); margin: 0; line-height: 1.25;
}
.faz-archive__desc { font-family: var(--faz-font); font-size: 15px; color: var(--faz-muted); margin: 8px 0 0; }

/* ---------- CTA band ---------- */
.faz-cta { margin-top: 40px; }
.faz-cta__inner {
	background: #0b2a44; color: #f2f6fa;
	border-radius: 16px; padding: 32px 26px; text-align: center;
}
@media (min-width: 768px) { .faz-cta__inner { padding: 44px 48px; } }
.faz-cta__title { font-family: var(--faz-font); font-size: 24px; font-weight: 700; margin: 0 0 10px; color: #ffffff; }
.faz-cta__text { font-family: var(--faz-font); font-size: 16px; line-height: 1.6; margin: 0 auto 18px; max-width: 560px; color: #d7e3ee; }
.faz-cta__btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin: 0; }
.faz-btn {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 48px; padding: 12px 28px;
	font-family: var(--faz-font); font-size: 15px; font-weight: 700;
	background: #ffffff; color: #0b2a44;
	border-radius: 999px; text-decoration: none;
}
.faz-btn--ghost { background: transparent; color: #ffffff; border: 2px solid #ffffff; }
.faz-btn:hover { background: #d7e3ee; color: #08223a; }
.faz-btn--ghost:hover { background: rgba(255,255,255,.12); color: #ffffff; }

/* ---------- Author box (plugin output) polish ---------- */
.et_pb_author_box .faz-author, .et_pb_author_box { font-family: var(--faz-font); }

/* ---------- Blog index: replace Salvattore masonry with a clean grid ----------
   Divi's grid blog module wraps posts in .et_pb_salvattore_content > .column.size-1of3
   and positions them with JS, which makes columns cascade instead of aligning in rows.
   display:contents on the column wrappers promotes each .et_pb_post to a direct grid
   child, so rows align and cards in the same row share a height. */
.et_pb_blog_grid .et_pb_salvattore_content {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 32px 28px !important;
  align-items: stretch !important;
}
.et_pb_blog_grid .et_pb_salvattore_content > .column {
  display: contents !important;
}
.et_pb_blog_grid .et_pb_post {
  width: auto !important;
  max-width: none !important;
  float: none !important;
  margin: 0 !important;
  clear: none !important;
  display: flex !important;
  flex-direction: column;
  height: 100%;
}
.et_pb_blog_grid .et_pb_post .et_pb_image_container { margin: 0 !important; }
.et_pb_blog_grid .et_pb_post .et_pb_image_container img {
  width: 100% !important;
  height: auto !important;
  display: block;
}
.et_pb_blog_grid .et_pb_post .post-content { flex: 1 1 auto; display: flex; flex-direction: column; }
.et_pb_blog_grid .et_pb_post .more-link { margin-top: auto !important; }
@media (max-width: 980px) {
  .et_pb_blog_grid .et_pb_salvattore_content { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}
@media (max-width: 640px) {
  .et_pb_blog_grid .et_pb_salvattore_content { grid-template-columns: 1fr !important; gap: 22px !important; }
}
