/* ==========================================================================
   Bet Calculator Betmentor — pages.css
   Article, legal, about, contact, 404, blog listing headers.
   ========================================================================== */

/* ---- page hero (interior pages) ---- */
.page-hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(760px 340px at 88% -30%, rgba(35,174,109,.2), transparent 62%),
    radial-gradient(560px 300px at 6% 120%, rgba(255,168,0,.09), transparent 62%),
    var(--ink);
  color: var(--text-soft); padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--border);
}
.page-hero__title { font-size: var(--step-5); color: #fff; margin: .4rem 0 .5rem; }
.page-hero__lead { color: var(--text-soft); font-size: var(--step-1); max-width: 62ch; margin: 0; }

/* ---- article ---- */
.article { padding: var(--sp-6) 0 var(--sp-7); }
.article__wrap { display: grid; grid-template-columns: minmax(0, 1fr); }
.article__body { max-width: 720px; margin-inline: auto; width: 100%; }
.article__header { max-width: 760px; margin: 0 auto var(--sp-4); }

/* ---- two-column post layout with a sticky sidebar ---- */
/* align-items:start keeps each column its own height so the aside can travel */
.article__layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--sp-5); align-items: start;
  max-width: 1120px; margin-inline: auto;
}
.article__main { min-width: 0; }
.article__layout .article__body { max-width: none; margin-inline: 0; }

.article__aside {
  position: sticky; top: 96px;
  display: grid; gap: var(--sp-3); min-width: 0;
}

.widget {
  background: var(--surface); border: 1px solid var(--border-2);
  border-radius: var(--r-lg); padding: 1.25rem;
}
.widget__title {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .12em;
  font-family: var(--font-mono); font-weight: 600; color: var(--emerald-l);
  margin: 0 0 .9rem; padding-bottom: .6rem; border-bottom: 1px solid var(--border);
}

/* tool promo */
.widget--tool {
  background:
    radial-gradient(130% 110% at 0% 0%, rgba(35,174,109,.16), transparent 62%),
    linear-gradient(158deg, #1B2A25, #142019);
  border-color: rgba(35,174,109,.34); text-align: center;
}
.widget--tool .widget__title { border-bottom: none; padding-bottom: 0; margin-bottom: .5rem; }
.widget__ic {
  width: 48px; height: 48px; margin: 0 auto .8rem; border-radius: 13px;
  display: grid; place-items: center; color: var(--emerald-l);
  background: rgba(35,174,109,.18); border: 1px solid rgba(35,174,109,.32);
}
.widget__ic svg { width: 24px; height: 24px; }
.widget__text { font-size: .88rem; color: var(--text-soft); margin: 0 0 1rem; line-height: 1.6; }

/* related list */
.rel-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; }
.rel-list li { margin: 0; }
.rel-item__link {
  display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: .75rem; align-items: center;
  padding: .5rem; border-radius: var(--r-md); color: inherit;
  transition: background var(--t-fast), transform var(--t-fast);
}
.rel-item__link:hover { background: rgba(35,174,109,.1); text-decoration: none; transform: translateX(3px); }
.rel-item__media {
  display: block; border-radius: 9px; overflow: hidden; aspect-ratio: 3 / 2;
  background: var(--deep); border: 1px solid var(--border);
}
.rel-item__media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-med); }
.rel-item__link:hover .rel-item__media img { transform: scale(1.08); }
.rel-item__text { display: block; min-width: 0; }
.rel-item__chip {
  display: block; font-family: var(--font-mono); font-size: .62rem;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .15rem;
}
.rel-item__title {
  display: block; font-family: var(--font-display); font-weight: 600;
  font-size: .87rem; line-height: 1.35; color: var(--text);
  transition: color var(--t-fast);
}
.rel-item__link:hover .rel-item__title { color: var(--emerald-l); }

.widget__more {
  display: inline-flex; align-items: center; gap: .4rem; margin-top: .9rem;
  font-family: var(--font-display); font-weight: 600; font-size: .85rem;
  color: var(--emerald-l); transition: gap var(--t-fast);
}
.widget__more:hover { text-decoration: none; gap: .7rem; }
.widget__more svg { width: 15px; height: 15px; }
.article__cat { margin-bottom: .8rem; }
.article__title { font-size: var(--step-5); margin: 0 0 .6rem; }
.article__meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; color: var(--muted); font-size: .87rem; font-family: var(--font-mono); margin-bottom: 1.4rem; }
.article__meta .dot { color: var(--border-2); }
.article__figure { max-width: 900px; margin: 0 auto var(--sp-5); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--border-2); }
.article__figure img { width: 100%; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.article__body h2 { font-size: var(--step-3); margin: 1.8em 0 .5em; color: #fff; }
.article__body h3 { font-size: var(--step-1); margin: 1.4em 0 .4em; color: var(--emerald-l); }
.article__body p, .article__body li { font-size: 1.05rem; line-height: 1.8; color: var(--text-soft); }
.article__body ul, .article__body ol { padding-left: 1.3em; }
.article__body a { color: var(--emerald-l); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(63,208,138,.4); text-underline-offset: 3px; transition: text-decoration-color var(--t-fast); }
.article__body a:hover { text-decoration-color: var(--emerald-l); }

/* ---- share / author box ---- */
.author-box {
  max-width: 720px; margin: var(--sp-5) auto 0; display: flex; gap: 1rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-lg); padding: 1.2rem;
}
.author-box__avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  background: linear-gradient(140deg, var(--emerald), var(--emerald-d)); color: #04140b;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800;
}
.author-box__name { font-weight: 700; margin: 0; color: var(--white); }
.author-box__role { color: var(--muted); font-size: .86rem; margin: 0; }

/* ---- related posts ---- */
.related { background: var(--ink-3); }
.related .card-grid { grid-template-columns: repeat(3, 1fr); }

/* ---- blog toolbar / filter ---- */
.blog-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: var(--sp-5); }
.blog-filter__btn {
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  border-radius: var(--r-pill); padding: .5rem 1rem; font-weight: 600; font-size: .88rem; cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
  font-family: var(--font-display);
}
.blog-filter__btn:hover { border-color: var(--emerald); color: var(--emerald-l); transform: translateY(-2px); }
.blog-filter__btn.is-active { background: var(--emerald); color: #04140b; border-color: var(--emerald); }

/* ---- legal / prose pages ---- */
.prose { max-width: 780px; margin-inline: auto; }
.prose h2 { font-size: var(--step-2); margin: 1.6em 0 .5em; color: #fff; }
.prose h3 { font-size: var(--step-1); margin: 1.3em 0 .4em; color: var(--emerald-l); }
.prose p, .prose li { font-size: 1.02rem; line-height: 1.8; color: var(--text-soft); }
.prose ul { padding-left: 1.3em; }
.prose ul li::marker { color: var(--emerald); }
.prose__updated { color: var(--muted); font-family: var(--font-mono); font-size: .84rem; margin-bottom: 1.5rem; }
.prose a { color: var(--emerald-l); text-decoration: underline; text-underline-offset: 3px; }

/* ---- contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); align-items: start; }
.contact-card { background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-lg); padding: var(--sp-5); }
.form-field { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.1rem; }
.form-field label { font-weight: 600; font-size: .92rem; color: var(--text); }
.form-field input, .form-field textarea {
  padding: .8rem .9rem; border: 1.5px solid var(--border-2); border-radius: var(--r-sm);
  font-family: var(--font-body); font-size: .98rem; background: var(--ink); color: var(--text);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-field input::placeholder, .form-field textarea::placeholder { color: #7E948A; }
.form-field input:hover, .form-field textarea:hover { border-color: rgba(35,174,109,.45); }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--emerald); box-shadow: var(--ring); }
.form-field textarea { resize: vertical; min-height: 130px; }
.form-error { color: var(--red-soft); font-size: .82rem; min-height: 1em; }
.form-status { margin-top: .5rem; font-weight: 600; }
.form-status.ok { color: var(--emerald-l); }
.contact-info { display: grid; gap: 1.2rem; }
.contact-info__item { display: flex; gap: .9rem; }
.contact-info__ic {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  background: rgba(35,174,109,.16); border: 1px solid rgba(35,174,109,.28);
  color: var(--emerald-l); display: grid; place-items: center;
}
.contact-info__ic svg { width: 22px; height: 22px; }
.contact-info h3 { margin: 0 0 .15rem; font-size: 1.02rem; }
.contact-info p { margin: 0; color: var(--text-soft); font-size: .94rem; }

/* ---- 404 ---- */
.err {
  min-height: 62vh; display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(640px 320px at 50% -10%, rgba(35,174,109,.2), transparent 62%),
    var(--ink);
  color: var(--text-soft); padding: var(--sp-7) 0;
}
.err__code { font-family: var(--font-display); font-weight: 800; font-size: clamp(4rem, 16vw, 9rem); color: var(--emerald-l); line-height: 1; letter-spacing: -.04em; }
.err__title { color: #fff; font-size: var(--step-4); margin: .2rem 0 .6rem; }
.err__text { color: var(--text-soft); max-width: 46ch; margin: 0 auto 1.6rem; }
.err__links { display: flex; flex-wrap: wrap; gap: .7rem; justify-content: center; }

@media (max-width: 1000px) {
  /* sidebar drops under the article and stops sticking */
  .article__layout { grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); max-width: 760px; }
  .article__aside { position: static; top: auto; }
}

@media (max-width: 760px) {
  .related .card-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .article__body p, .article__body li { font-size: 1rem; }
}
