/*=====================================================*/
/*  AI POWERED ERP — hub overview page styles          */
/*  Depends on assets/css/ai/common.css                */
/*=====================================================*/

/*----------------------------*/
/* JOURNEY CHAPTERS           */
/*----------------------------*/
/* Each chapter is its own framed panel. Cream ground so the white page cards
   inside it still read as cards. */
.aip-chapter {
  padding: 48px 44px;
  background: var(--ai-cream);
  border: 1px solid var(--ai-line);
  border-radius: 20px;
}

.aip-chapter + .aip-chapter {
  margin-top: 28px;
}

/* Beyond ERP carries its own ink panel, so it needs no frame around it. */
.aip-chapter--beyond {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
}

/* Centred like every other section head on the hub. */
.aip-chapter__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 34px;
  text-align: center;
}

.aip-chapter__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 760px;
}

.aip-chapter__title h3 {
  margin: 0;
  font-family: var(--ai-heading);
  font-size: clamp(23px, 2.6vw, 30px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ai-ink);
}

.aip-chapter__title p {
  margin: 0;
  max-width: 640px;
  font-size: 16px;
  line-height: 1.6 !important;
  color: var(--ai-muted);
}

/* Chapter destination link, sitting under that chapter's page cards. */
.aip-chapter__cta {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.aip-chapter__cta .ai-btn {
  white-space: nowrap;
}

/*----------------------------*/
/* PAGE LINK CARDS            */
/*----------------------------*/
.aip-page-card {
  gap: 12px;
  padding: 24px;
}

/* Colour + hover transition come from .ai-card in common.css */
.aip-page-card h4 {
  margin: 0;
  font-family: var(--ai-heading);
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: var(--ai-ink);
}

.aip-page-card p {
  font-size: 14px;
}

.aip-page-card__more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  font-family: var(--ai-heading);
  font-size: 13px;
  font-weight: 700;
  color: var(--ai-primary-deep);
}

.aip-page-card__more i,
.aip-page-card__more svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.6;
  transition: transform 0.25s ease;
}

.aip-page-card:hover .aip-page-card__more i,
.aip-page-card:hover .aip-page-card__more svg {
  transform: translateX(4px);
}

/*----------------------------*/
/* BEYOND ERP FEATURE BLOCK   */
/*----------------------------*/
.aip-beyond {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 0;
  background: var(--ai-ink);
  border-radius: 20px;
  overflow: hidden;
}

.aip-beyond__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 52px 56px;
}

.aip-beyond__copy h3 {
  margin: 0;
  font-family: var(--ai-heading);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #FFF;
}

.aip-beyond__copy p {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.7 !important;
  color: rgba(255, 255, 255, 0.72);
}

/* The chapter kicker sits on the ink panel here, so use the brighter primary
   the dark sections already use. */
.aip-beyond__copy .ai-kicker {
  color: var(--ai-primary);
}

.aip-beyond__visual {
  position: relative;
  align-self: stretch;
  min-height: 340px;
}

.aip-beyond__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.aip-beyond__chip {
  position: absolute;
  left: 22px;
  bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 15px;
  background: rgba(20, 20, 20, 0.88);
  border: 1px solid rgba(var(--ai-primary-rgb), 0.5);
  border-radius: 10px;
  color: #FFF;
  font-family: var(--ai-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.aip-beyond__chip i,
.aip-beyond__chip svg {
  width: 15px;
  height: 15px;
  color: var(--ai-primary);
  stroke-width: 2.4;
}

/*----------------------------*/
/* WHY AI POWERED ERP         */
/*----------------------------*/
.aip-why {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: 64px;
}

.aip-why__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.aip-why__copy h2 {
  margin: 0;
  font-family: var(--ai-heading);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ai-ink);
}

.aip-why__copy>p {
  margin: 0;
  font-size: 17px;
  line-height: 1.7 !important;
  color: var(--ai-muted);
}

.aip-why__closer {
  padding: 18px 22px;
  border-left: 3px solid var(--ai-primary);
  background: var(--ai-cream);
  border-radius: 0 12px 12px 0;
  font-size: 16px !important;
  color: var(--ai-ink-soft) !important;
  margin-top: 25px !important;
}

.aip-why__media {
  position: relative;
  margin: 0;
}

.aip-why__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 7 / 8;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--ai-line);
  box-shadow: 0 30px 60px rgba(20, 20, 20, 0.12);
}

.aip-why__media figcaption {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--ai-line);
  border-radius: 12px;
  font-family: var(--ai-heading);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.45;
  color: var(--ai-ink);
}

.aip-why__media figcaption i,
.aip-why__media figcaption svg {
  width: 20px;
  height: 20px;
  color: var(--ai-primary);
  stroke-width: 2.2;
  flex-shrink: 0;
}

/*----------------------------*/
/* RESPONSIVE                 */
/*----------------------------*/
@media (max-width: 1023px) {
  .aip-chapter__pages.ai-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .aip-beyond {
    grid-template-columns: 1fr;
  }

  .aip-beyond__visual {
    min-height: 260px;
    order: -1;
  }

  .aip-why {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .aip-why__media {
    max-width: 560px;
  }
}

@media (max-width: 767px) {
  .aip-chapter {
    padding: 34px 22px;
  }

  .aip-chapter--beyond {
    padding: 0;
  }

  .aip-chapter__pages.ai-grid--4 {
    grid-template-columns: 1fr;
  }

  .aip-beyond__copy {
    padding: 36px 28px;
  }
}