/* ==========================================================================
   Advice Sub-Page template — MBA ACT
   Workplace Relations + (phase-08) Building Compliance / WHS / Fee for Service.
   Five sections: header, content, services (10 cards), testimonial, CTA.
   ========================================================================== */

/* Sections (other than header) keep their bounded padding */
.advice-content,
.advice-services,
.advice-testimonial,
.advice-cta {
  padding: 112px 80px;             /* Figma desktop layout 112×80 */
}

@media (max-width: 768px) {
  .advice-content,
  .advice-services,
  .advice-testimonial,
  .advice-cta {
    padding: 50px 20px;            /* Figma mobile */
  }
}

/* Advice sub-page templates remove the outer .site-main padding/max-width so
   the header banner can be edge-to-edge per Figma 10330:68354 (desktop) /
   10541:12625 (mobile). Same pattern as body.home and post-type-archive
   newsroom. */
body.page-template-template-advice-subpage .site-main {
  max-width: none;
  padding: 0;
}

/* Page banner now lives in banners.css as `.page-banner` (shared with
   Newsroom archive). The advice template uses `template-parts/page-banner.php`
   to render it — no advice-header CSS needed here anymore. */

/* --- 2. Content Block — Figma 10330:68367 -------------------------------- */
.advice-content__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 496px 1fr;     /* Figma Content Box 496 wide */
  gap: 64px;                            /* Figma layout_1SXJVA */
  align-items: stretch;
}

.advice-content__box {
  display: flex;
  flex-direction: column;
  gap: 24px;                            /* Figma layout_3YZXU1 */
}

/* Tagline with tangerine 1-px underline + downward hook at right end —
   same SVG hook pattern as .home-section-tagline (home.css). Self-contained
   here because home.css isn't loaded on the advice template. */
.advice-content__tagline {
  position: relative;
  margin: 0;
  display: block;
  width: fit-content;
  font-family: var(--font-family);
  font-weight: var(--font-weight-bold);
  font-size: 16px;                     /* Figma Heading/Tagline */
  line-height: 1.3;                    /* 130% */
  letter-spacing: 0.05em;
  color: var(--color-tangerine);
  text-transform: uppercase;
  padding-bottom: 14px;                /* room for line + hook */
}

.advice-content__tagline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 8px;                          /* leave 8 px gap for the hook */
  bottom: 7px;
  height: 1px;
  background-color: currentColor;
}

.advice-content__tagline::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 9px;
  height: 7px;
  background-image: url('../images/tagline-hook.svg');
  background-repeat: no-repeat;
  color: currentColor;                 /* SVG uses stroke=currentColor */
}

.advice-content__heading-wrap {
  margin-top: 12px;                     /* Figma Content gap 36 - tagline gap 24 = 12 */
}

.advice-content__heading {
  margin: 0;
  font-size: 48px;                      /* Figma Heading/H2 */
  font-weight: 400;                     /* 55 Roman */
  line-height: 1.2;                     /* 120% */
  letter-spacing: -0.01em;
  color: var(--color-navy-darkest);     /* #03060C */
}

.advice-content__heading-accent {
  color: var(--color-tangerine);        /* "Workplace Relations" tangerine */
}

.advice-content__copy {
  display: flex;
  flex-direction: column;
  gap: 18px;                            /* Figma layout_XD67YV */
}

.advice-content__copy p {
  margin: 0;
  font-size: 16px;                      /* Figma Text/Regular/Normal */
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-navy-darkest);
}

/* Figma 10330:68380 — 82×82 top-right "corner cut". Real clip-path cut so
   the section bg (white) shows through — same pattern as Home hero + FAA
   (Pastel R5 #2 + R4-WR #2). Supersedes the previous SVG-mask::after
   technique that filled the corner with bg-color, removing the need to
   keep mask fill in sync with section bg. Border-radius removed
   (superseded by clip-path; remaining three corners stay square). */
.advice-content__image {
  position: relative;
  margin: 0;
  min-height: 400px;
  clip-path: var(--corner-cut-clip); /* QA R3 #11 — rounded non-cut corners; 82px diagonal via shared --corner-cut-clip */
}

.advice-content__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 1024px) {
  .advice-content__inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .advice-content__image {
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .advice-content__heading {
    font-size: 34px;                    /* Figma mobile H2 */
    /* Lock to Figma 402px frame inner width so "Our / Workplace Relations /
       Advisory Services" stays 3 lines on wider phones (iPhone Pro Max 430). */
    max-width: 370px;
  }
}

/* --- 3. Services Block — Figma 10330:68381 ------------------------------- */
.advice-services {
  background-color: var(--color-navy-lightest); /* #E6E7E9 — Figma fill_W4ERNF */
}

.advice-services__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 48px;                            /* Figma layout_JVVJJ3 */
}

/* Intro row: heading + copy LEFT, primary CTA RIGHT (justify-between) */
.advice-services__intro {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
}

.advice-services__intro-text {
  display: flex;
  flex-direction: column;
  gap: 22px;                            /* Figma layout_H175Z5 */
  max-width: 760px;
}

.advice-services__heading {
  margin: 0;
  font-size: 48px;                      /* Figma Heading/H2 */
  font-weight: 400;                     /* 55 Roman */
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-navy-darkest);
}

.advice-services__heading-accent {
  color: var(--color-tangerine);        /* "Services" tangerine */
}

.advice-services__copy {
  margin: 0;
  font-size: 20px;                      /* Figma Text/Large/Bold */
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-navy-darkest);
}

.advice-services__cta {
  flex-shrink: 0;
}

.advice-services__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);  /* Figma layout_SY4Q1P — 4 per row */
  gap: 24px;                              /* Figma row + col gap */
}

/* Service card — Figma Card with Colour XSmall (10503:9830).
   White bg, 1px gray stroke, shadow medium, 4-px radius, 6-px coloured strip
   at the bottom. Body padding 24, gap 18 between Content Top and (potential)
   Actions. Inside: icon (30×30) + Content (heading + description). */
.advice-service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--color-white);
  border: 1px solid var(--color-navy-lightest);  /* Figma fill_W4ERNF */
  border-radius: 4px;
  box-shadow: 0 3px 16px -4px rgba(0, 0, 0, 0.09);
  overflow: hidden;
}

.advice-service-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;                            /* Figma layout_CM3IQR (Content Top gap) */
  padding: 24px;                        /* Figma layout_91U36K */
  flex: 1;
}

.advice-service-card__icon {
  font-size: 30px;                      /* Figma layout_YWEUKL 30×30 */
  line-height: 1;
  color: var(--color-tangerine);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
}

.advice-service-card__text {
  display: flex;
  flex-direction: column;
  gap: 16px;                            /* Figma layout_CHDMBZ */
}

.advice-service-card__title {
  margin: 0;
  /* Figma 10515:6715 Text/Medium/Bold = 16/700/130%. Was 18 — visibly bigger
     than mockup which is why card titles compressed to fewer lines. */
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-navy);             /* Figma fill_TB1YVF #0B1628 */
}

.advice-service-card__desc {
  margin: 0;
  font-size: 14px;                      /* Figma Text/Small/Normal */
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-navy);
}

.advice-service-card__strip {
  display: block;
  height: 6px;                          /* Figma layout_2Z90SB */
  background-color: var(--strip-color, var(--color-accent-light-orange));
}

@media (max-width: 1024px) {
  .advice-services__intro {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  .advice-services__heading {
    font-size: 36px;
  }
  .advice-services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 568px) {
  .advice-services__heading {
    font-size: 34px;                    /* Figma mobile H2 */
  }
  .advice-services__copy {
    font-size: 18px;                    /* Figma mobile Text/Large/Bold */
  }
  .advice-services__grid {
    grid-template-columns: 1fr;
  }
}

/* --- 4. Testimonial Block — Figma 10330:68405 ---------------------------- */
.advice-testimonial {
  padding: 112px 64px;                  /* Figma layout_4TIQO6 */
  background-color: var(--color-white);
}

.advice-testimonial__inner {
  max-width: 1280px;                    /* Figma layout_NQMN8S */
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;                            /* Figma layout_NQMN8S */
  align-items: stretch;
}

.advice-testimonial__intro {
  display: flex;
  flex-direction: column;
  gap: 32px;                            /* Figma layout_QS94OI Content Box gap */
}

.advice-testimonial__heading {
  margin: 0;
  font-size: 48px;                      /* Figma Heading/H2 */
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-navy-darkest);     /* "What our" navy */
}

.advice-testimonial__heading-accent {
  color: var(--color-tangerine);        /* "clients say" tangerine */
}

.advice-testimonial__copy {
  margin: 0;
  font-size: 18px;                      /* Figma Text/Medium/Normal */
  font-weight: 400;
  line-height: 1.5;                     /* 150% */
  color: var(--color-navy-darkest);
}

.advice-testimonial__slider {
  display: flex;
  flex-direction: column;
  gap: 16px;                            /* Figma layout_CL959M — card↔arrows */
}

.advice-testimonial__list {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  /* Stack every slide in the same grid cell so the list takes the height of
     the tallest slide. Switching between slides therefore doesn't reflow the
     page (no "jump"). */
  display: grid;
}

.advice-testimonial__slide {
  grid-column: 1;
  grid-row: 1;
  visibility: hidden;
  opacity: 0;
  transition: opacity 200ms;
  pointer-events: none;
}

.advice-testimonial__slide.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.advice-testimonial__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;                            /* Figma layout_BJLWQP */
  padding: 32px;                        /* Figma layout_YXCQ5D */
  background-color: var(--color-white);
  border: 1px solid var(--color-tangerine); /* Figma stroke fill_2J0XTK */
  border-radius: 2px;
}

.advice-testimonial__quote-mark {
  /* Figma 10515:6910 — custom SVG (two paths filled #E6E7E9). Pulled from
     Figma directly to assets/images/advice-quote-mark.svg. */
  display: block;
  width: 92px;
  height: 92px;
}

.advice-testimonial__quote {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 18px;                      /* Figma desktop Text/Medium/Normal */
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-navy-darkest);
  font-style: normal;
}

.advice-testimonial__quote p {
  margin: 0;
}

/* Figma 10330:68427 layout_VXR6FD — Bottom row: dots LEFT + arrows RIGHT,
   space-between. Wraps the two existing controls. */
.advice-testimonial__controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.advice-testimonial__dots {
  display: flex;
  gap: 8px;
}

/* Prev/Next chevron arrows — Figma node 10303:38758 (Arrows / XSmall / Navy).
   26×26 box with chevron icon centered, navy on white, hover invert. */
.advice-testimonial__arrows {
  display: flex;
  gap: 8px;
}

.advice-testimonial__arrow {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  padding: 0;
  color: var(--color-navy);
  cursor: pointer;
  transition: color 0.2s ease;
}

.advice-testimonial__arrow:hover {
  color: var(--color-tangerine);
}

.advice-testimonial__arrow .material-symbols-outlined {
  font-size: 24px;
  line-height: 1;
}

.advice-testimonial__dot {
  width: 8px;                           /* Figma layout_U4H2UX */
  height: 8px;
  padding: 0;
  background-color: var(--color-neutral-light);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 150ms;
}

.advice-testimonial__dot.is-active {
  background-color: var(--color-navy-darkest); /* Figma fill_SGPZ3N #0B1628 */
}

.advice-testimonial__dot:hover {
  background-color: var(--color-navy);
}

@media (max-width: 1024px) {
  .advice-testimonial__inner {
    grid-template-columns: 1fr;
    gap: 36px;                          /* Figma mobile layout_3MECSJ */
  }
  .advice-testimonial__heading {
    font-size: 36px;
  }
}

@media (max-width: 768px) {
  .advice-testimonial {
    padding: 50px 20px;                 /* Figma mobile layout_MFSTIP */
  }
  .advice-testimonial__intro {
    gap: 22px;                          /* Figma mobile layout_T77K5R */
  }
  .advice-testimonial__heading {
    font-size: 34px;                    /* Figma mobile H2 */
  }
  .advice-testimonial__copy {
    font-size: 16px;                    /* Figma mobile Text/Medium/Normal */
  }
  .advice-testimonial__quote {
    font-size: 16px;                    /* Figma mobile Text/Medium/Normal */
  }
}

/* --- 5. Colour CTA Block — Figma 10330:68430 ----------------------------- */
.advice-cta {
  padding: 48px 80px 112px;             /* Figma layout_OCGM88 */
  background-color: var(--color-white);
}

@media (max-width: 768px) {
  .advice-cta {
    padding: 50px 20px;                 /* Figma mobile */
  }
}

.advice-cta__card {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px;                        /* Figma layout_2S5SKO */
  background-color: var(--color-tangerine); /* #FF6600 */
  border-radius: 4px;
  color: var(--color-white);
  overflow: hidden;
}

@media (max-width: 768px) {
  .advice-cta__card {
    padding: 32px;                      /* tighter on mobile */
  }
}

.advice-cta__content {
  position: relative;
  z-index: 1;
  max-width: 659px;                     /* Figma layout_VFSACG */
  display: flex;
  flex-direction: column;
  gap: 46px;                            /* Figma Content Wrapper gap */
}

.advice-cta__heading {
  margin: 0;
  font-size: 48px;                      /* Figma Heading/H2 */
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--color-white);
}

@media (max-width: 768px) {
  .advice-cta__heading {
    font-size: 34px;
  }
}

.advice-cta__advisor {
  display: flex;
  flex-direction: column;
  gap: 24px;                            /* Figma layout_YKQAGK */
}

.advice-cta__advisor-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.advice-cta__advisor-name {
  font-size: 32px;                      /* Figma Heading/H4 */
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--color-white);
}

.advice-cta__advisor-role {
  font-size: 16px;                      /* Figma Heading/Tagline */
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.advice-cta__buttons {
  display: flex;
  flex-direction: row;
  gap: 16px;                            /* Figma layout_MZ6OXJ */
  flex-wrap: wrap;
}

.advice-cta__btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;                            /* Figma layout_EWR4ZH */
  padding: 8px 20px;                    /* Figma button padding */
  border: 2px solid var(--color-white);
  border-radius: 2px;
  background: transparent;
  color: var(--color-white);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;                     /* 150% */
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.advice-cta__btn:hover {
  background-color: var(--color-white);
  color: var(--color-tangerine);
}

.advice-cta__btn .material-symbols-outlined {
  font-size: 24px;                      /* Figma 24×24 */
  line-height: 1;
}

/* Watermark — MBA Logo Stacked white SVG behind content per Figma.
   Card is max-width: 1280; Figma watermark x:800 width:498 → ends at 1298 →
   overflows card right by 18 px. y:30.7 from top. Figma node 10330:68432
   has no opacity declared (defaults to 1.0 — pure white on tangerine). */
/* Pastel R4-WR #3 — Figma 10330:68432: frame 498×498, `angle: 45deg`.
   The exported SVG already bakes the rotation into its paths, so we
   render axis-aligned and size to match Figma's rendered AABB rather
   than the unrotated frame size. Final values are user-tuned by direct
   visual comparison with the WR CTA Figma reference: 700×700 at
   top:-80 right:-125. Card overflow:hidden crops the right edge + the
   bottom past card edges → "tucked into corner, bottom hidden" per
   Pastel, with the M monogram visibly emerging behind Melissa's photo. */
.advice-cta__watermark {
  position: absolute;
  top: -80px;
  right: -125px;
  width: 700px;
  height: 700px;
  background-image: url('../images/mba-logo-stacked-white.svg');
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
  z-index: 0;
}

/* Advisor photo — Figma layout_O5PLS1: absolute 422×422 at x:848 y:13.7
   in the 1280-wide card. Anchor to bottom-right so the photo is always
   flush with the card's bottom regardless of card height (in Figma the
   exact y:13.7 + 422 just kisses the bottom; on our wider cards top-anchor
   leaves a gap at the bottom). */
.advice-cta__photo {
  position: absolute;
  bottom: 0;                            /* flush with card bottom */
  right: 10px;                          /* Figma x:848 + 422 = 1270 → 10 px from card right edge */
  width: 422px;
  height: 422px;
  z-index: 1;                           /* above watermark */
  pointer-events: none;
}

.advice-cta__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

/* Progressive watermark + photo scaling between desktop (≥1281) and tablet
   (≤1024). As the card narrows, the 700×700 white watermark creeps into the
   white heading text zone. Same fix pattern as .home-content-card__card::after:
   shrink watermark, scale photo, add right gutter — in ~100px viewport steps.
   Anchors preserved verbatim:
     ≥1281: 700×700 top:-80 right:-125 — Figma desktop
     ≤1024: 470×470 top:-52 right:-84  — tablet (see below) */

@media (min-width: 1201px) and (max-width: 1280px) {
  .advice-cta__card {
    padding: 56px 390px 56px 56px;        /* right gutter for photo */
  }
  .advice-cta__content {
    max-width: none;                      /* bounded by gutter */
  }
  .advice-cta__watermark {
    width: 630px;
    height: 630px;
    top: -72px;
    right: -112px;
  }
  .advice-cta__photo {
    width: 385px;
    height: 385px;
    right: 12px;
  }
}

@media (min-width: 1101px) and (max-width: 1200px) {
  .advice-cta__card {
    padding: 48px 355px 48px 48px;
  }
  .advice-cta__content {
    max-width: none;
  }
  .advice-cta__heading {
    font-size: 40px;
  }
  .advice-cta__watermark {
    width: 560px;
    height: 560px;
    top: -63px;
    right: -100px;
  }
  .advice-cta__photo {
    width: 350px;
    height: 350px;
    right: 14px;
  }
}

@media (min-width: 1025px) and (max-width: 1100px) {
  .advice-cta__card {
    padding: 40px 330px 40px 40px;
  }
  .advice-cta__content {
    max-width: none;
    gap: 32px;
  }
  .advice-cta__heading {
    font-size: 38px;
  }
  .advice-cta__advisor-name {
    font-size: 28px;
  }
  .advice-cta__watermark {
    width: 500px;
    height: 500px;
    top: -56px;
    right: -90px;
  }
  .advice-cta__photo {
    width: 315px;
    height: 315px;
    right: 15px;
  }
}

/* Pastel WR #22 — keep the desktop side-by-side composition (content left,
   logo + photo right) through tablet; the stacked layout below now triggers at
   768 (mobile only) instead of 1024. Pastel WR #19 — in the 769–1024 band the
   card narrows, so the watermark and photo are scaled down and the card reserves
   a right gutter, keeping the white logo and photo clear of the heading text.
   No tablet Figma frame exists (Adam: "our mistake in the Figma") — values
   derived per roadmap/mobile-derivation-catalog.md (watermark outer-edge shrink,
   horizontal padding halved). */
@media (max-width: 1024px) and (min-width: 769px) {
  .advice-cta {
    padding: 48px 40px 80px;            /* halve horizontal so the tablet card keeps width */
  }
  .advice-cta__card {
    padding: 40px 320px 40px 40px;      /* right gutter reserves space for the photo */
  }
  .advice-cta__content {
    max-width: none;                    /* bounded by the card's right gutter, not 659px */
    gap: 32px;
  }
  .advice-cta__heading {
    font-size: 36px;                    /* between desktop 48 and mobile 34 */
  }
  .advice-cta__advisor-name {
    font-size: 26px;
  }
  .advice-cta__watermark {
    width: 470px;
    height: 470px;
    top: -52px;
    right: -84px;                       /* stays tucked top-right, behind photo */
  }
  .advice-cta__photo {
    width: 300px;
    height: 300px;
    right: 16px;
  }
}

@media (max-width: 768px) {
  /* Mobile WR CTA — Figma node 10515:6859.
     Card padding 24 (was 64), heading 34, advisor name 24, buttons stretch
     full-width in a column. Watermark + photo stay visible per Figma but
     reposition below the content (they sit in the bottom empty portion of
     the card on mobile, not floating to the right). */
  .advice-cta__card {
    padding: 24px;                      /* Figma layout_T9ZH4L */
    min-height: 752px;                  /* fits photo at y:376 + 352 + 24 padding */
  }
  .advice-cta__heading {
    font-size: 34px;                    /* Figma mobile Heading/H2 */
  }
  .advice-cta__advisor-name {
    font-size: 24px;                    /* Figma mobile Heading/H4 */
  }
  .advice-cta__buttons {
    flex-direction: column;             /* Figma layout_81SX2S — column stack */
    align-items: stretch;
    gap: 16px;
  }
  .advice-cta__btn {
    justify-content: center;
    width: 100%;                        /* alignSelf: stretch in Figma */
  }
  .advice-cta__watermark {
    /* User-tuned mobile/tablet anchor — bottom-left, slightly past card
       bottom (cropped via card overflow:hidden). Sized larger than Figma
       frame for AABB-correct rendering, matching the same approach as
       desktop. */
    bottom: -75px;
    top: auto;
    right: auto;
    left: 0;
    width: 446px;
    height: 446px;
  }
  .advice-cta__photo {
    /* Press flush with bottom of card so no orange space hangs below. */
    bottom: 0;
    top: auto;
    right: auto;
    left: 29px;
    width: 352px;
    height: 352px;
  }
}
