/*
Theme Name: AI Momentum
Theme URI: https://ai-momentum.ai/
Author: Oxford Digital Marketing
Description: An independent WordPress block theme for AI Momentum. Cream + ink with a signature lime accent, Mona Sans type, and a library of on-brand block patterns. Full Site Editing.
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 7.4
Version: 1.0.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-momentum
*/

/* ------------------------------------------------------------------
   Supplemental styles. Tokens live in theme.json; this file only
   adds things theme.json can't express (e.g. font-stretch on
   display headings) plus a few brand utility classes used by patterns.
   ------------------------------------------------------------------ */

/* Display headings use Mona Sans' NARROW width. theme.json sets the
   family + weight; font-stretch must come from CSS. */
h1, h2, h3,
.wp-block-post-title,
.am-display {
  font-stretch: 75%;
}

/* The signature 4px lime accent bar (add class .am-accent-top to any group). */
.am-accent-top { border-top: 4px solid var(--wp--preset--color--lime); }

/* Eyebrow label */
.am-eyebrow {
  font-size: var(--wp--preset--font-size--x-small);
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

/* Lime icon tile (wrap an icon/emoji-free SVG or dashicon). */
.am-tile {
  width: 52px; height: 52px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--wp--preset--color--lime); color: var(--wp--preset--color--ink);
}

/* Buttons: secondary + ghost variants (primary lime is the theme.json default). */
.wp-block-button.is-style-dark  .wp-block-button__link { background: var(--wp--preset--color--ink);  color: #fff; }
.wp-block-button.is-style-blue  .wp-block-button__link { background: var(--wp--preset--color--blue); color: #fff; }
.wp-block-button.is-style-ghost .wp-block-button__link {
  background: transparent; color: var(--wp--preset--color--ink);
  border: 1.5px solid var(--wp--preset--color--ink);
}
.wp-block-button.is-style-ghost .wp-block-button__link:hover { background: var(--wp--preset--color--ink); color: #fff; }

/* Card radius helper for query-loop / pattern cards */
.am-card { border-radius: 20px; }

/* Query Loop list spacing */
.am-tagged-list .wp-block-post-template { gap: var(--wp--preset--spacing--50); }

/* Navigation link hover — underline effect matching the live site */
.wp-block-navigation-item__content:hover,
.wp-block-navigation-item__content:focus {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* WordPress generates .has-border-color { color: ...!important } from any colour slug
   named "border". It also adds .has-border-color as a structural class on any block
   that has border styling enabled. Blocks using borders structurally do NOT have
   .has-text-color alongside, so :not(.has-text-color) safely targets only the conflict. */
.has-border-color:not(.has-text-color) {
  color: inherit !important;
}

/* Ollie utility classes — used in page content built with the Ollie theme.
   These must match the class names stored in post_content. */
.ollie-row-stack > .wp-block-buttons,
.ollie-no-shrink { flex-shrink: 0; }

.wp-block-group.ollie-sticky-top {
  top: calc(20px + var(--wp-admin--admin-bar--position-offset, 0px));
}

.ollie-avatar-row { align-items: center; }

@media (max-width: 781px) {
  .ollie-row-stack {
    flex-direction: column;
    align-items: flex-start !important;
  }
  .ollie-row-stack > * { flex-basis: 100% !important; }
}

/* ── aimg_article card list ─────────────────────────────────────────────────
   Styles the query loop on the Start Here page. Applied via the
   .aimg-card-stack class on the wp:query block wrapper.
   ────────────────────────────────────────────────────────────────────────── */
.aimg-card-stack .wp-block-post-template {
  display: flex !important;
  flex-direction: column;
  gap: 12px;
}

.aimg-card-stack .wp-block-post {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 22px 26px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--wp--preset--color--border);
  transition: all 0.25s ease;
  /* stretches the title link to cover the whole card */
  position: relative;
  cursor: pointer;
}

.aimg-card-stack .wp-block-post:hover {
  border-color: var(--wp--preset--color--blue);
  box-shadow: 0 2px 16px rgba(1,117,173,0.07);
  transform: translateY(-1px);
}

/* Coloured dot — blue for Foundations, orange for Practical Skills */
.aimg-card-stack .wp-block-post::before {
  content: '';
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 7px;
  background: var(--wp--preset--color--blue);
}

.aimg-practical-skills .wp-block-post::before {
  background: var(--wp--preset--color--orange);
}

.aimg-card-stack .wp-block-post-title {
  font-size: var(--wp--preset--font-size--base) !important;
  font-weight: 600;
  margin: 0 0 4px !important;
  line-height: 1.35;
}

.aimg-card-stack .wp-block-post-title a {
  color: var(--wp--preset--color--ink);
  text-decoration: none;
}

/* Stretched link — the ::after covers the entire card surface */
.aimg-card-stack .wp-block-post-title a::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
}

.aimg-card-stack .wp-block-post-excerpt p,
.aimg-card-stack .wp-block-post-excerpt__excerpt {
  font-size: var(--wp--preset--font-size--small) !important;
  color: var(--wp--preset--color--ink-soft);
  margin: 0 !important;
  line-height: 1.5;
}

/* Hide the "read more" link the excerpt block adds by default */
.aimg-card-stack .wp-block-post-excerpt__more-link { display: none; }

/* Lime badge paragraph style.
   width: fit-content shrinks the element to text width.
   The margin-left calc replicates the constrained layout's centering offset
   so the badge left edge aligns with the content column, not the viewport edge. */
p.is-style-aimg-lime-badge {
  width: fit-content !important;
  margin-left: calc((100% - var(--wp--style--global--content-size)) / 2) !important;
  margin-right: auto !important;
  background: var(--wp--preset--color--lime);
  color: var(--wp--preset--color--ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 4px;
}
