/*
Theme Name: AIForYourMoney Guides
Theme URI: https://aiformoney.example/
Author: AIForYourMoney
Description: A calm, practical main posts experience for AIForYourMoney.
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: aiformoney-guides
*/

:root {
  --ink: #17201c;
  --muted: #59635e;
  --soft: #eef4f1;
  --paper: #fbfcfa;
  --line: #d9e2dc;
  --accent: #2f6f5e;
  --accent-dark: #214d42;
  --white: #ffffff;
  --shadow: 0 22px 60px rgba(30, 42, 37, 0.13);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(251, 252, 250, 0.91);
  border-bottom: 1px solid rgba(217, 226, 220, 0.85);
  backdrop-filter: blur(18px);
}

.nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
  font-weight: 800;
  font-size: 1.04rem;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  font-weight: 900;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--muted);
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--ink);
}

.hero {
  min-height: calc(100svh - 66px);
  display: grid;
  align-items: stretch;
  background:
    linear-gradient(90deg, rgba(17, 28, 24, 0.86) 0%, rgba(17, 28, 24, 0.74) 34%, rgba(17, 28, 24, 0.24) 63%, rgba(17, 28, 24, 0.1) 100%),
    url("https://aiforyourmoney.com/wp-content/themes/aiformoney-guides/assets/hero-money-desk.svg") center / cover;
  color: var(--white);
}

.hero-inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(52px, 7vw, 92px) 22px 38px;
  display: grid;
  grid-template-columns: minmax(0, 0.94fr) minmax(280px, 0.56fr);
  gap: 48px;
  align-items: end;
}

.hero-copy {
  max-width: 680px;
  animation: rise-in 760ms ease both;
}

.eyebrow {
  margin: 0 0 15px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3.1rem, 8vw, 6.7rem);
  line-height: 0.92;
  letter-spacing: 0;
  max-width: 740px;
}

.hero-copy p {
  margin: 23px 0 30px;
  max-width: 610px;
  color: rgba(255, 255, 255, 0.87);
  font-size: clamp(1.04rem, 2vw, 1.25rem);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.13);
  color: var(--white);
  font-weight: 760;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button.primary {
  background: var(--white);
  color: var(--accent-dark);
  border-color: var(--white);
}

.button:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.2);
}

.button.primary:hover {
  background: #f5f7f4;
}

.post-card img,
.list-item img {
  width: 100%;
  display: block;
  object-fit: cover;
  background: #e3ebe6;
}

.read-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-dark);
  font-weight: 800;
}

.read-link::after {
  content: "→";
  transition: transform 180ms ease;
}

.read-link:hover::after {
  transform: translateX(3px);
}

main {
  overflow: hidden;
}

.section {
  padding: clamp(44px, 7vw, 78px) 22px;
}

.section.soft {
  background: var(--soft);
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(250px, 0.45fr);
  gap: 34px;
  align-items: end;
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1;
  letter-spacing: 0;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 410px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.post-card {
  background: var(--white);
  border: 1px solid rgba(217, 226, 220, 0.92);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(30, 42, 37, 0.05);
  transition: transform 190ms ease, box-shadow 190ms ease, border-color 190ms ease;
}

.post-card:hover {
  transform: translateY(-5px);
  border-color: rgba(47, 111, 94, 0.36);
  box-shadow: 0 18px 42px rgba(30, 42, 37, 0.1);
}

.post-card img {
  height: 205px;
}

.post-body {
  padding: 19px;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 11px;
}

.category {
  color: var(--accent-dark);
  font-weight: 820;
}

.post-body h3 {
  margin: 0;
  font-size: 1.21rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.post-body p {
  margin: 12px 0 17px;
  color: var(--muted);
  font-size: 0.95rem;
}

.empty {
  display: none;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 28px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.52);
}

.empty.show {
  display: block;
}

.rail {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(280px, 0.45fr);
  gap: 42px;
  align-items: start;
}

.list {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.list-item {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 17px;
  background: var(--paper);
  transition: background 160ms ease;
}

.list-item:hover {
  background: var(--white);
}

.list-item img {
  width: 120px;
  height: 82px;
  border-radius: 6px;
}

.list-item h3 {
  margin: 0 0 7px;
  font-size: 1.05rem;
  line-height: 1.22;
  letter-spacing: 0;
}

.list-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.side-note {
  position: sticky;
  top: 94px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--accent-dark);
  color: var(--white);
}

.side-note h2 {
  margin: 0 0 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  line-height: 1.02;
  letter-spacing: 0;
}

.side-note p {
  margin: 0 0 20px;
  color: rgba(255, 255, 255, 0.82);
}

.rule-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-list li {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 10px;
  align-items: start;
  color: rgba(255, 255, 255, 0.9);
}

.check {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
  color: #d7fff1;
  font-weight: 900;
  line-height: 1;
}

.site-footer {
  padding: 28px 22px 34px;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.article-shell {
  background:
    linear-gradient(180deg, #eef4f1 0%, #fbfcfa 380px);
}

.article-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(42px, 7vw, 82px) 22px 28px;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(280px, 0.48fr);
  gap: clamp(28px, 5vw, 58px);
  align-items: end;
}

.article-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 34px;
  margin: 0 0 18px;
  padding: 0 12px;
  border: 1px solid rgba(47, 111, 94, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-title {
  margin: 0;
  max-width: 860px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.55rem, 6vw, 5.4rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.article-dek {
  max-width: 700px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 0.92rem;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(217, 226, 220, 0.9);
}

.article-aside {
  padding: 23px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid rgba(217, 226, 220, 0.92);
  box-shadow: 0 18px 44px rgba(30, 42, 37, 0.09);
}

.article-aside h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.article-aside p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 0.94rem;
}

.article-checks {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink);
  font-size: 0.94rem;
}

.article-checks li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 9px;
}

.article-checks .check {
  width: 22px;
  height: 22px;
  background: var(--soft);
  color: var(--accent-dark);
  font-size: 0.84rem;
}

.article-featured-image {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
}

.article-featured-image img {
  width: 100%;
  max-height: 560px;
  display: block;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(30, 42, 37, 0.13);
}

.article-layout {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(36px, 6vw, 70px) 22px;
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(240px, 300px);
  gap: clamp(34px, 6vw, 72px);
  align-items: start;
}

.article-content {
  min-width: 0;
  color: #23302b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 1.8vw, 1.22rem);
  line-height: 1.76;
}

.article-content > *:first-child {
  margin-top: 0;
}

.article-content p,
.article-content ul,
.article-content ol,
.article-content table,
.article-content blockquote {
  margin-top: 0;
  margin-bottom: 1.3em;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 1.65em 0 0.52em;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.18;
  letter-spacing: 0;
}

.article-content h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.article-content h3 {
  font-size: clamp(1.3rem, 2vw, 1.55rem);
}

.article-content a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.article-content ul,
.article-content ol {
  padding-left: 1.25em;
}

.article-content li + li {
  margin-top: 0.42em;
}

.article-content blockquote {
  margin-left: 0;
  padding: 20px 22px;
  border-left: 4px solid var(--accent);
  background: var(--soft);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--ink);
  font-style: normal;
}

.article-content table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.98rem;
  line-height: 1.45;
}

.article-content th,
.article-content td {
  padding: 13px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.article-content th {
  background: var(--soft);
  color: var(--ink);
}

.article-sidebar {
  position: sticky;
  top: 94px;
  display: grid;
  gap: 18px;
}

.reader-note {
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
}

.reader-note h2 {
  margin: 0 0 10px;
  font-size: 1rem;
  letter-spacing: 0;
}

.reader-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.article-nav {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px clamp(36px, 6vw, 64px);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.article-nav a {
  display: block;
  min-height: 118px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.article-nav a:hover {
  transform: translateY(-3px);
  border-color: rgba(47, 111, 94, 0.36);
  box-shadow: 0 14px 32px rgba(30, 42, 37, 0.08);
}

.article-nav span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.article-nav strong {
  display: block;
  font-size: 1.07rem;
  line-height: 1.25;
}

.related-guides {
  padding-top: 0;
}

.related-guides .posts-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-shell {
  background:
    linear-gradient(180deg, #eef4f1 0%, #fbfcfa 340px);
}

.page-hero {
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(42px, 7vw, 82px) 22px 30px;
}

.page-title {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.7rem, 7vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.page-dek {
  max-width: 680px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.2rem);
}

.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 22px clamp(50px, 8vw, 86px);
  color: #23302b;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 1.8vw, 1.2rem);
  line-height: 1.76;
}

.page-content > *:first-child {
  margin-top: 0;
}

.page-content h2,
.page-content h3 {
  margin: 1.65em 0 0.52em;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.18;
  letter-spacing: 0;
}

.page-content h2 {
  font-size: clamp(1.65rem, 3vw, 2.25rem);
}

.page-content h3 {
  font-size: clamp(1.3rem, 2vw, 1.55rem);
}

.page-content a {
  color: var(--accent-dark);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.page-content ul,
.page-content ol {
  padding-left: 1.25em;
}

.page-content li + li {
  margin-top: 0.42em;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

.footer-branding {
  display: flex;
  gap: 12px 18px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--accent-dark);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 920px) {
  .nav {
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .hero-inner,
  .article-hero,
  .article-layout,
  .section-head,
  .rail {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .posts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-note {
    position: static;
  }

  .article-sidebar {
    position: static;
  }

  .article-nav {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    background:
      linear-gradient(180deg, rgba(17, 28, 24, 0.9) 0%, rgba(17, 28, 24, 0.72) 62%, rgba(17, 28, 24, 0.38) 100%),
      url("https://aiforyourmoney.com/wp-content/themes/aiformoney-guides/assets/hero-money-desk.svg") center / cover;
  }

  .hero-inner {
    padding-top: 42px;
    gap: 34px;
  }

  h1 {
    font-size: clamp(2.85rem, 17vw, 4.5rem);
  }

  .posts-grid {
    grid-template-columns: 1fr;
  }

  .list-item {
    grid-template-columns: 88px 1fr;
    gap: 13px;
  }

  .list-item img {
    width: 88px;
    height: 74px;
  }

  .list-item .read-link {
    grid-column: 2;
  }

  .article-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}
