/**
 * Frontend Styles for Realtime Tutorials CPT
 * 
 * Copied from original locked-card.html, unlocked-card.html, and locked-thumbnail.html
 * to ensure exact visual match with old system.
 */

/* ========================================
   CSS VARIABLES
   ======================================== */

:root {
  --ahr-brand: #1e8be5;
  --ahr-sub: #475569;
  --ahr-card: #ffffff;
}

/* ========================================
   OUTER CARD CONTAINER
   ======================================== */

.ahr-feed-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 20px 24px 24px 24px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.03);
  max-width: 960px;
  margin: 14px auto 28px auto;
  position: relative;
  overflow: visible;
  z-index: 10;
}

/* Main tutorial card: even padding on all sides (theme adds extra desc margin-bottom) */
.single-ahr_rt_tutorial .ahr-feed-card:not(.ahr-rt-attachments-card) {
  padding: 24px;
}

.single-ahr_rt_tutorial .ahr-feed-card:not(.ahr-rt-attachments-card) .lesson-description,
.single-ahr_rt_tutorial .ahr-feed-card:not(.ahr-rt-attachments-card) .ahr-unlocked-desc,
.single-ahr_rt_tutorial .ahr-feed-card:not(.ahr-rt-attachments-card) .ahr-locked-desc,
.single-ahr_rt_tutorial .ahr-feed-card:not(.ahr-rt-attachments-card) .ahr-locked-desc-wrap {
  margin-bottom: 0;
}

/* ========================================
   LOCKED TUTORIAL PILL BADGE
   ======================================== */

.ahr-feed-card .ahr-unlock-pill {
  position: absolute;
  top: -30px;
  right: 42px;
  background: #ff5c50;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 2px 14px 1px;
  border-radius: 10px 10px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 1;
}

.ahr-lock-icon {
  width: 12px;
  height: 12px;
  display: block;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}

/* Single locked tutorial: hide red "LOCKED TUTORIAL" badge */
.single-ahr_rt_tutorial .ahr-feed-card .ahr-unlock-pill {
  display: none !important;
}

/* ========================================
   DUMMY PLAYER (Locked Thumbnail)
   ======================================== */

.ahr-dummy-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  display: block;
}

.ahr-dp-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.96);
}

/* Play button */
.ahr-dp-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(110px, 18%);
  height: auto;
  display: block;
  opacity: 0.9;
  pointer-events: none;
  transition: transform .2s ease;
}

.ahr-dummy-player:focus .ahr-dp-play,
.ahr-dummy-player:hover .ahr-dp-play {
  transform: translate(-50%, -50%) scale(1.06);
}

/* Bottom-right gradient wedge */
.ahr-dp-corner {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 45%;
  height: 45%;
  pointer-events: none;
  background: radial-gradient(140% 140% at 100% 100%, rgba(0,0,0,.78) 0%, rgba(0,0,0,.62) 35%, rgba(0,0,0,0) 70%);
}

/* Gold lock icon */
.ahr-dp-lock {
  position: absolute;
  right: 45px;
  bottom: 40px;
  width: min(78px, 15%);
  height: auto;
  display: block;
}

/* Lock shake animation */
@keyframes ahrLockShake {
  0%   { transform: rotate(0deg); }
  10%  { transform: rotate(-8deg); }
  20%  { transform: rotate(8deg); }
  30%  { transform: rotate(-6deg); }
  40%  { transform: rotate(6deg); }
  50%  { transform: rotate(-4deg); }
  60%  { transform: rotate(4deg); }
  70%  { transform: rotate(-2deg); }
  80%  { transform: rotate(2deg); }
  100% { transform: rotate(0deg); }
}

/* Centered lock on single dummy player (keeps translate during shake) */
@keyframes ahrLockShakeCentered {
  0%   { transform: translate(-50%, -50%) rotate(0deg); }
  10%  { transform: translate(-50%, -50%) rotate(-8deg); }
  20%  { transform: translate(-50%, -50%) rotate(8deg); }
  30%  { transform: translate(-50%, -50%) rotate(-6deg); }
  40%  { transform: translate(-50%, -50%) rotate(6deg); }
  50%  { transform: translate(-50%, -50%) rotate(-4deg); }
  60%  { transform: translate(-50%, -50%) rotate(4deg); }
  70%  { transform: translate(-50%, -50%) rotate(-2deg); }
  80%  { transform: translate(-50%, -50%) rotate(2deg); }
  100% { transform: translate(-50%, -50%) rotate(0deg); }
}

.ahr-dp-lock.is-animating {
  animation: ahrLockShake 0.6s cubic-bezier(.36,.07,.19,.97);
}

/* Single locked tutorial: same white lock overlay as archive cards */
.single-ahr_rt_tutorial .ahr-dummy-player .ahr-dp-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.single-ahr_rt_tutorial .ahr-dummy-player .ahr-rt-card-lock-overlay {
  border-radius: inherit;
}

.single-ahr_rt_tutorial .ahr-dummy-player .ahr-rt-card-lock-icon {
  width: 52px;
  height: 52px;
}

.single-ahr_rt_tutorial .ahr-dummy-player .ahr-rt-card-lock-icon.is-animating {
  animation: ahrLockShake 0.6s cubic-bezier(.36,.07,.19,.97);
  transition: none;
}

/* Tablet adjustments for dummy player */
@media (max-width: 1024px) {
  .ahr-dp-corner { width: 50%; height: 50%; }
  .ahr-dp-play { width: min(96px, 17%); }
  .ahr-dp-lock { right: 28px; bottom: 28px; width: min(80px, 16%); }
}

/* Small tablets & large phones */
@media (max-width: 768px) {
  .ahr-dp-corner { width: 56%; height: 56%; }
  .ahr-dp-play { width: min(88px, 19%); }
  .ahr-dp-lock { right: 22px; bottom: 20px; width: min(60px, 18%); }
}

/* Phones */
@media (max-width: 480px) {
  .ahr-dp-corner { width: 62%; height: 62%; }
  .ahr-dp-play { width: min(72px, 22%); }
  .ahr-dp-lock { right: 16px; bottom: 14px; width: min(48px, 20%); }
}

/* Accessibility: disable motion if user prefers */
@media (prefers-reduced-motion: reduce) {
  .ahr-dp-play,
  .ahr-dp-lock {
    transition: none;
    animation: none;
    transform: none;
  }

}

/* ========================================
   LOCKED IFRAME FALLBACK (when no thumbnail)
   ======================================== */

.ahr-locked-iframe-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
}

.ahr-locked-iframe-wrapper iframe {
  pointer-events: none !important;
}

.ahr-locked-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   IFRAME PLAYER
   ======================================== */

.ahr-player {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  display: block;
  overflow: hidden;
}

/* Locked embeds - disable interaction */
.ahr-yt iframe {
  pointer-events: none !important;
}

/* Unlocked: let the iframe be clickable */
.ahr-feed-card .ahr-locked iframe.ahr-player,
.ahr-feed-card .ahr-locked .ahr-rt-yt-managed-player,
.ahr-feed-card .ahr-locked .ahr-rt-yt-managed-player iframe {
  pointer-events: auto !important;
  filter: none !important;
}

.ahr-rt-yt-managed-player {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  display: block;
  background: #0d0d0d;
}

.ahr-rt-yt-managed-player.is-ready {
  background: transparent;
}

.ahr-rt-yt-managed-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

.ahr-feed-card .ahr-locked .ahr-lock-overlay { 
  display: none !important; 
}

/* Archive cards: thin watch progress bar (flush between thumbnail and content) */
.ahr-rt-watch-bar {
  width: 100%;
  height: 5px;
  max-height: 5px;
  background: #e5e7eb;
  overflow: hidden;
}

.ahr-rt-watch-bar__fill {
  display: block;
  height: 100%;
  width: 0;
  max-width: 100%;
  background: #ff0000;
  transition: width 0.35s ease;
}

/* Archive cards: flush between thumbnail and white content */
.post-type-archive-ahr_rt_tutorial .ahr-rt-card-watch-bar-wrap,
.ahr-library-archive .ahr-rt-card-watch-bar-wrap {
  margin: 0;
  padding: 0;
  width: 100%;
  line-height: 0;
}

.post-type-archive-ahr_rt_tutorial .ahr-rt-watch-bar.ahr-rt-card-watch-bar,
.ahr-library-archive .ahr-rt-watch-bar.ahr-rt-card-watch-bar {
  border-radius: 0;
}

.post-type-archive-ahr_rt_tutorial .ahr-rt-watch-bar.ahr-rt-card-watch-bar .ahr-rt-watch-bar__fill,
.ahr-library-archive .ahr-rt-watch-bar.ahr-rt-card-watch-bar .ahr-rt-watch-bar__fill {
  border-radius: 0;
}

@media (max-width: 640px) {
  .post-type-archive-ahr_rt_tutorial .ahr-rt-watch-bar.ahr-rt-card-watch-bar,
  .ahr-library-archive .ahr-rt-watch-bar.ahr-rt-card-watch-bar {
    height: 3px;
    max-height: 3px;
  }
}

/* ========================================
   TITLE & DESCRIPTION
   ======================================== */

.lesson-heading {
  font-size: 24px;
  font-weight: 700;
  color: #0f172a;
  margin: 20px 0 8px;
  line-height: 1.3;
  background: #343434;
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  text-align: center;
}

.lesson-description {
  font-size: 15px !important;
  line-height: 1.6;
  color: #475569;
  margin-top: 8px;
}

.ahr-unlocked-desc {
  font-size: 15px !important;
}

/* Unlocked single: clipped description + Show more (legacy RT feed button style) */
.single-ahr_rt_tutorial .lesson-description.ahr-unlocked-desc .ahr-desc-toggle {
  all: unset;
  color: #1e8be5;
  cursor: pointer;
  font: inherit;
  display: inline;
}

.single-ahr_rt_tutorial .lesson-description.ahr-unlocked-desc .ahr-desc-toggle:hover {
  text-decoration: underline;
}

.single-ahr_rt_tutorial .lesson-description.ahr-unlocked-desc .ahr-desc-full {
  display: block;
}

/* Description clip: 350 chars desktop, 250 mobile (641px matches RT singles) */
.single-ahr_rt_tutorial .ahr-desc-short--mobile {
  display: none;
}

@media (max-width: 640px) {
  .single-ahr_rt_tutorial .ahr-desc-short--desktop {
    display: none;
  }

  .single-ahr_rt_tutorial .ahr-desc-short--mobile {
    display: inline;
  }
}

@media (min-width: 641px) {
  .single-ahr_rt_tutorial .ahr-desc-short--desktop {
    display: inline;
  }

  .single-ahr_rt_tutorial .ahr-rt-desc-clip--desktop-full .ahr-desc-toggle {
    display: none;
  }
}

/* Locked description: readable teaser with Patreon-style bottom fade */
.ahr-locked-desc-wrap {
  position: relative;
  max-height: 150px;
  overflow: hidden;
  margin-top: 8px;
}

.ahr-locked-desc {
  line-height: 1.6;
  padding: 0 12px;
  text-align: center;
  font-size: 15px !important;
  color: #475569;
}

.ahr-locked-desc-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.45) 15%,
    rgba(255, 255, 255, 0.65) 35%,
    rgba(255, 255, 255, 0.75) 45%,
    rgba(255, 255, 255, 0.92) 60%,
    rgba(255, 255, 255, 0.98) 80%,
    #ffffff 100%
  );
}

/* Locked single: no separator or gap between description and unlock buttons */
.single-ahr_rt_tutorial .ahr-separator-wrapper {
  display: none;
}

.single-ahr_rt_tutorial .ahr-locked-desc-wrap {
  margin-bottom: 0;
}

.single-ahr_rt_tutorial .ahr-unlock-options {
  margin-top: 0;
  margin-bottom: 10px;
}

/* ========================================
   RESOURCE FILE LIST
   ======================================== */

.ahr-post-resources {
  margin-top: 16px;
  margin-bottom: 22px;
  border-radius: 10px;
  padding: 12px 18px;
  display: flex;
  justify-content: center;
}

/* Single tutorial: progress card above video embed (inside main card) */
.single-ahr_rt_tutorial .ahr-rt-single-progress-card {
  --ahr-rt-prog-blue: #2ba1e9;
  /* Unfilled bar: low-saturation grey (desaturated from accent track tints) */
  --ahr-rt-prog-blue-track: #e8eaeb;
  --ahr-rt-prog-green: #109649;
  --ahr-rt-prog-green-track: #e7e9e8;
  --ahr-rt-prog-accent: var(--ahr-rt-prog-blue);
  --ahr-rt-prog-track: var(--ahr-rt-prog-blue-track);
  --ahr-rt-prog-reveal-duration: 0.32s;
  --ahr-rt-prog-reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
  margin: 0 0 20px;
  padding: 1.25rem 1.5rem;
  background: #fff;
  border-radius: 20px;
  box-sizing: border-box;
  max-height: 24rem;
  opacity: 1;
  overflow: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition:
    opacity var(--ahr-rt-prog-reveal-duration) var(--ahr-rt-prog-reveal-ease),
    transform var(--ahr-rt-prog-reveal-duration) var(--ahr-rt-prog-reveal-ease),
    max-height 0.38s var(--ahr-rt-prog-reveal-ease),
    margin-bottom 0.38s var(--ahr-rt-prog-reveal-ease),
    padding 0.38s var(--ahr-rt-prog-reveal-ease);
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card[data-awaiting-play="1"] {
  max-height: 0;
  opacity: 0;
  margin-bottom: 0;
  padding: 0;
  overflow: hidden;
  transform: translateY(-8px);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .single-ahr_rt_tutorial .ahr-rt-single-progress-card {
    transition: none;
  }
}

/* Desktop: no card fill; 5px side inset on progress block */
@media (min-width: 641px) {
  .single-ahr_rt_tutorial .ahr-rt-single-progress-card:not([data-awaiting-play="1"]) {
    background: transparent;
    padding: 0 5px;
    border-radius: 0;
  }
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card[data-completed="1"] {
  --ahr-rt-prog-accent: var(--ahr-rt-prog-green);
  --ahr-rt-prog-track: var(--ahr-rt-prog-green-track);
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__percent {
  font-family: "Poppins", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ahr-rt-prog-accent);
  line-height: 1.2;
  flex-shrink: 0;
  transition: color 0.25s ease;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__pill {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  line-height: 1.2;
  transition: background 0.25s ease, color 0.25s ease;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__pill--in-progress {
  color: #fff;
  background: var(--ahr-rt-prog-blue);
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__pill--completed {
  color: #fff;
  background: var(--ahr-rt-prog-green);
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-left: auto;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1rem 0.5rem 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.15s ease;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--complete {
  background: var(--ahr-rt-prog-green);
}

/* Mark Incomplete: normal + hover/active match Back to Tutorials (grey outline pill) */
.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--incomplete {
  background-color: var(--bb-secondary-button-background-regular, #dddddd);
  color: var(--bb-secondary-button-text-regular, #122b46);
  border: 1px solid var(--bb-secondary-button-border-regular, #dddddd);
  box-shadow: none;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--incomplete .ahr-rt-single-progress-card__toggle-label {
  opacity: 0.62;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--incomplete .ahr-rt-single-progress-card__toggle-icon {
  filter: brightness(0) saturate(100%);
  opacity: 0.55;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--incomplete:hover,
.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--incomplete:focus-visible {
  background-color: var(--bb-secondary-button-background-hover);
  color: var(--bb-secondary-button-text-hover);
  border: 1px solid var(--bb-secondary-button-border-hover);
  opacity: 1;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--incomplete:hover .ahr-rt-single-progress-card__toggle-label,
.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--incomplete:focus-visible .ahr-rt-single-progress-card__toggle-label,
.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--incomplete:hover .ahr-rt-single-progress-card__toggle-icon,
.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--incomplete:focus-visible .ahr-rt-single-progress-card__toggle-icon {
  opacity: 1;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--incomplete:hover .ahr-rt-single-progress-card__toggle-icon,
.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--incomplete:focus-visible .ahr-rt-single-progress-card__toggle-icon {
  filter: brightness(0) invert(1);
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--incomplete:active:not(:disabled) {
  background-color: var(--bb-secondary-button-background-regular, #dddddd);
  color: var(--bb-secondary-button-text-regular, #122b46);
  border: 1px solid var(--bb-secondary-button-border-regular, #dddddd);
  box-shadow: none;
  opacity: 1;
  transform: scale(0.98);
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--incomplete:active:not(:disabled) .ahr-rt-single-progress-card__toggle-label {
  opacity: 0.62;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--incomplete:active:not(:disabled) .ahr-rt-single-progress-card__toggle-icon {
  filter: brightness(0) saturate(100%);
  opacity: 0.55;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--incomplete:focus-visible {
  box-shadow: var(--bb-secondary-button-focus-shadow);
  outline: none;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--complete:hover,
.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--complete:focus-visible {
  opacity: 0.92;
  outline: none;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle--complete:active:not(:disabled) {
  transform: scale(0.98);
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle:disabled,
.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle.is-busy {
  opacity: 0.65;
  cursor: wait;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle-label {
  white-space: nowrap;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__bar-track {
  height: 6px;
  background: var(--ahr-rt-prog-track);
  border-radius: 999px;
  overflow: hidden;
  transition: background 0.25s ease;
}

.single-ahr_rt_tutorial .ahr-rt-single-progress-card__bar-fill {
  --ahr-rt-prog-scale: 0;
  width: 100%;
  height: 100%;
  background: var(--ahr-rt-prog-accent);
  border-radius: 999px;
  transform: scaleX(var(--ahr-rt-prog-scale));
  transform-origin: left center;
  will-change: transform;
  backface-visibility: hidden;
  transition: transform 1.35s cubic-bezier(0.22, 1, 0.36, 1), background 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
  .single-ahr_rt_tutorial .ahr-rt-single-progress-card__bar-fill {
    transition-duration: 0.01ms;
  }
}

@media (max-width: 640px) {
  .single-ahr_rt_tutorial .ahr-rt-single-progress-card {
    margin-top: 14px;
  }
}

@media (max-width: 640px) {
  .single-ahr_rt_tutorial .ahr-rt-single-progress-card__row {
    column-gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .single-ahr_rt_tutorial .ahr-rt-single-progress-card {
    padding: 1rem;
    border-radius: 16px;
  }

  .single-ahr_rt_tutorial .ahr-rt-single-progress-card__row {
    column-gap: 0.4rem;
  }

  .single-ahr_rt_tutorial .ahr-rt-single-progress-card__percent {
    font-size: 1.0625rem;
  }

  .single-ahr_rt_tutorial .ahr-rt-single-progress-card__pill {
    font-size: 0.625rem;
    padding: 0.3rem 0.55rem;
  }

  .single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle {
    font-size: 0.8125rem;
    padding: 0.45rem 0.85rem 0.45rem 0.75rem;
  }

  .single-ahr_rt_tutorial .ahr-rt-single-progress-card__toggle-icon {
    width: 16px;
    height: 16px;
  }
}

/* Single tutorial: author bar between main card and attachments */
.single-ahr_rt_tutorial .ahr-feed-card:not(.ahr-rt-attachments-card):has(+ .ahr-rt-author-bar) {
  margin-bottom: 0;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  margin: 24px 0 30px;
  padding: 0 20px 0 20px;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__end {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__end > .ahr-rt-author-bar__share {
  margin-left: 20px !important;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__favourite,
.single-ahr_rt_tutorial .ahr-rt-author-bar__share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0 !important;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 0;
  -webkit-tap-highlight-color: transparent;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__favourite:focus,
.single-ahr_rt_tutorial .ahr-rt-author-bar__favourite:focus-visible,
.single-ahr_rt_tutorial .ahr-rt-author-bar__share:focus,
.single-ahr_rt_tutorial .ahr-rt-author-bar__share:focus-visible {
  outline: none;
  box-shadow: none;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__favourite-icon {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__favourite-icon--empty {
  filter: brightness(0) saturate(100%) invert(41%) sepia(11%) saturate(879%) hue-rotate(169deg) brightness(92%) contrast(87%);
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__favourite-icon--filled {
  display: none;
  filter: invert(42%) sepia(93%) saturate(1352%) hue-rotate(346deg) brightness(101%) contrast(97%);
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__favourite.is-favourited .ahr-rt-author-bar__favourite-icon--empty {
  display: none;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__favourite.is-favourited .ahr-rt-author-bar__favourite-icon--filled {
  display: block;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__share-icon {
  display: block;
  width: 22px;
  height: 22px;
  background-color: #576c79;
  transition: background-color 0.2s ease;
  -webkit-mask-image: url("/wp-content/uploads/2026/05/share.svg");
  mask-image: url("/wp-content/uploads/2026/05/share.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__share:hover .ahr-rt-author-bar__share-icon,
.single-ahr_rt_tutorial .ahr-rt-author-bar__share:focus-visible .ahr-rt-author-bar__share-icon {
  background-color: #32a2e7;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__share.is-copied .ahr-rt-author-bar__share-icon {
  background-color: #32a2e7;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__end > .ahr-rt-author-bar__access {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 30px;
  width: 120px;
  height: 40px;
  box-sizing: border-box;
  padding: 0 10px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__access-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-color: #576c79;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__access-icon--locked {
  -webkit-mask-image: url("/wp-content/uploads/2025/11/lock.svg");
  mask-image: url("/wp-content/uploads/2025/11/lock.svg");
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__access-icon--unlocked {
  -webkit-mask-image: url("/wp-content/uploads/2026/05/lock-open.svg");
  mask-image: url("/wp-content/uploads/2026/05/lock-open.svg");
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__access-label {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: #475569;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__avatar-wrap {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__avatar,
.single-ahr_rt_tutorial .ahr-rt-author-bar__avatar-wrap > span.ahr-rt-author-bar__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  line-height: 0;
  background: #f1f5f9;
}

/* Override BuddyBoss .avatar { aspect-ratio: 1; object-fit: cover } — keep natural proportions inside the circle */
.single-ahr_rt_tutorial .ahr-rt-author-bar__avatar-img,
.single-ahr_rt_tutorial .ahr-rt-author-bar__avatar img.avatar {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  object-fit: contain;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__meta {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 43px;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__name-row {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__verified-wrap {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__verified-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__name {
  display: block;
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  color: #0f172a;
  text-decoration: none;
}

@media (min-width: 641px) {
  .single-ahr_rt_tutorial .ahr-rt-author-bar__name {
    display: inline-block;
    font-size: calc(0.9rem + 1px);
    line-height: 17px;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar__verified-icon {
    width: 17px;
    height: 17px;
    transform: translateY(1px);
  }
}

.single-ahr_rt_tutorial a.ahr-rt-author-bar__name:hover,
.single-ahr_rt_tutorial a.ahr-rt-author-bar__name:focus-visible {
  color: #1e8be5;
  text-decoration: none;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__posted {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
  color: #64748b;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__posted-icon {
  display: block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__date {
  color: inherit;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__posted-sep {
  display: none;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar__posted-at {
  display: inline;
}

/* Attachments: no white outer card; separator when directly below author bar */
.single-ahr_rt_tutorial .ahr-feed-card.ahr-rt-attachments-card {
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  margin-top: 0;
  margin-bottom: 40px;
  padding-left: 10px;
  padding-right: 10px;
  padding-bottom: 0;
  border: 0;
  box-sizing: border-box;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar:has(+ .ahr-feed-card.ahr-rt-attachments-card) {
  margin-bottom: 40px;
}

.single-ahr_rt_tutorial .ahr-rt-author-bar + .ahr-feed-card.ahr-rt-attachments-card {
  margin-top: 0;
  padding-top: 50px;
  border-top: 1px solid #e5e7eb;
}

.single-ahr_rt_tutorial .ahr-rt-attachments {
  margin-top: 0;
  margin-bottom: 0;
}

.single-ahr_rt_tutorial .ahr-rt-attachments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}

.single-ahr_rt_tutorial .ahr-rt-attachments-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.single-ahr_rt_tutorial .ahr-rt-attachments-view-pack {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #e8edf2;
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transform: translateY(-5px);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.single-ahr_rt_tutorial a.ahr-rt-attachments-view-pack:hover,
.single-ahr_rt_tutorial a.ahr-rt-attachments-view-pack:focus-visible {
  background: #dce3ea;
  color: #0f172a;
  text-decoration: none;
}

.single-ahr_rt_tutorial .ahr-rt-attachments-view-pack-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-color: #565656;
  mask-image: url("/wp-content/uploads/2025/12/eye.svg");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url("/wp-content/uploads/2025/12/eye.svg");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

.single-ahr_rt_tutorial a.ahr-rt-attachments-view-pack:hover .ahr-rt-attachments-view-pack-icon,
.single-ahr_rt_tutorial a.ahr-rt-attachments-view-pack:focus-visible .ahr-rt-attachments-view-pack-icon {
  background-color: #565656;
}

.single-ahr_rt_tutorial .ahr-rt-attachments-title {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  margin: 0 0 0 20px;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
}

@media (min-width: 641px) {
  .single-ahr_rt_tutorial .ahr-rt-attachments-title {
    margin-bottom: 12px;
  }
}

.single-ahr_rt_tutorial .ahr-rt-attachments-title-icon {
  display: inline-block;
  flex-shrink: 0;
  font-size: 24px;
  line-height: 1;
}

.single-ahr_rt_tutorial .ahr-rt-attachments-title-icon::before {
  content: "\e980";
  font-family: "bb-icons";
  font-weight: 300;
  font-style: normal;
  speak: never;
  display: inline-block;
  line-height: 1;
  margin: 0;
  vertical-align: baseline;
  color: currentColor;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.single-ahr_rt_tutorial .ahr-rt-attachments-download-all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #e8edf2;
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transform: translateY(-5px);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.single-ahr_rt_tutorial a.ahr-rt-attachments-download-all:hover,
.single-ahr_rt_tutorial a.ahr-rt-attachments-download-all:focus-visible {
  background: #dce3ea;
  color: #0f172a;
  text-decoration: none;
}

.single-ahr_rt_tutorial .ahr-rt-attachments-download-all.is-disabled {
  opacity: 0.65;
  cursor: default;
  pointer-events: none;
}

.single-ahr_rt_tutorial .ahr-rt-attachments-download-all-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background-color: #565656;
  mask-image: url("/wp-content/uploads/2026/05/download.svg");
  mask-size: contain;
  mask-repeat: no-repeat;
  mask-position: center;
  -webkit-mask-image: url("/wp-content/uploads/2026/05/download.svg");
  -webkit-mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
}

/* Tablet + laptop-sized desktops: shrink the 4 attachment file items (not the buttons). */
@media (min-width: 641px) and (max-width: 1399px) {
  .single-ahr_rt_tutorial .ahr-rt-attachments-card .ahr-post-resources .ahr-file {
    font-size: 14px;
    gap: 2px;
  }

  .single-ahr_rt_tutorial .ahr-rt-attachments-card .ahr-post-resources .ahr-file-icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    font-size: 22px;
  }

  .single-ahr_rt_tutorial .ahr-rt-attachments-card .ahr-post-resources .ahr-file-list {
    gap: 10px 16px;
  }

  .single-ahr_rt_tutorial .ahr-rt-attachments-card .ahr-post-resources .ahr-file-list li:not(:last-child)::after {
    height: 18px;
    margin-left: 10px;
  }
}

.single-ahr_rt_tutorial .ahr-rt-attachments-card .ahr-post-resources {
  background: #e7e7e7;
  border-radius: 18px;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.03);
  padding: 10px 22px;
  margin-top: 0;
  margin-bottom: 0;
  box-sizing: border-box;
}

.ahr-file-list {
  list-style: none;
  justify-content: center;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.ahr-file-list li {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.ahr-file-list li:not(:last-child)::after {
  content: "";
  display: block;
  width: 1px;
  height: 30px;
  margin-left: 14px;
  background: #cecfd3;
  flex-shrink: 0;
  align-self: center;
}

.ahr-file {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #000;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s ease;
}

.ahr-file:hover {
  color: #1e8be5;
}

.ahr-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  font-size: 22px;
  line-height: 1;
}

.ahr-file-icon::before {
  content: "\ee83";
  font-family: "bb-icons";
  font-weight: 300;
  font-style: normal;
  speak: never;
  display: block;
  width: 1em;
  height: 1em;
  line-height: 1;
  margin: 0;
  text-align: center;
  color: currentColor;
  opacity: 0.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.ahr-file:hover .ahr-file-icon::before,
.ahr-file:focus-visible .ahr-file-icon::before {
  content: "\ee7c";
  opacity: 1;
}

/* Disabled links for locked cards */
.ahr-disabled-links .ahr-file {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #000;
  font-weight: 500;
  cursor: default;
  pointer-events: none;
}

/* Blur resources on locked attachments card */
.single-ahr_rt_tutorial .ahr-rt-attachments-card--locked .ahr-post-resources {
  opacity: 0.5 !important;
}

/* Tags below the tutorial card (single template) */
.ahr-rt-tags-below {
  max-width: 960px;
  margin: 0 auto 1.5rem auto;
  padding: 0 18px;
  font-size: 14px;
  line-height: 1.5;
  color: #475569;
}

.ahr-rt-tags-below__label {
  margin-right: 0.35em;
  font-weight: 600;
  color: #334155;
}

.ahr-rt-tags-below__link {
  color: inherit;
  text-decoration: none;
  transition: text-decoration-color 0.15s ease;
}

.ahr-rt-tags-below__link:hover,
.ahr-rt-tags-below__link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Hidden on single tutorial pages (tags still used on archive/cards) */
.single-ahr_rt_tutorial .ahr-rt-tags-below {
  display: none;
}

/* ========================================
   SEPARATOR LINE
   ======================================== */

.ahr-separator-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 24px;
  margin-bottom: 24px;
}

.ahr-unlock-separator {
  border: none !important;
  border-top: 1px solid #e5e7eb !important;
  border-bottom: none !important;
  width: 90%;
  display: block;
  margin: 0;
  height: 0;
  background: none;
}

/* ========================================
   TWO-COLUMN UNLOCK OPTIONS
   ======================================== */

.ahr-unlock-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-top: 20px;
  position: relative;
}

.ahr-unlock-options::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    rgba(229, 231, 235, 0) 0%,
    rgba(229, 231, 235, 1) 14%,
    rgba(229, 231, 235, 1) 86%,
    rgba(229, 231, 235, 0) 100%
  );
  transform: translateX(-50%);
}

.ahr-unlock-option {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Ensure both columns have same styling */
.ahr-unlock-option.ahr-rt-actions {
  padding: 0 20px;
  gap: 16px;
}

/* ========================================
   UNLOCK BUTTONS
   ======================================== */

.ahr-note-btn {
  display: block;
  padding: 8px 18px !important;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  color: #ffffff;
  border: 1px solid #2ba1e9;
  text-decoration: none;
  transition: all .18s ease;
  text-align: center;
  background: #2ba1e9;
  cursor: pointer;
  box-sizing: border-box;
  width: 100%;
}

.ahr-note-btn:hover {
  background: #1e8be5;
  color: #fff;
  border-color: #1e8be5;
  transform: translateY(-1px);
}

.ahr-note-btn:active {
  transform: translateY(0);
}

.ahr-ref-btn {
  display: block;
  width: 100%;
}

/* Left button (membership) - filled blue */
.ahr-unlock-option .ahr-note-btn:not(.ahr-rt-unlock),
.ahr-unlock-option .ahr-unlock-membership-btn,
.ahr-unlock-option button.ahr-note-btn:not(.ahr-rt-unlock),
.ahr-unlock-option a.ahr-note-btn:not(.ahr-rt-unlock) {
  width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px !important;
  color: #ffffff !important;
  border: 1px solid #2ba1e9 !important;
  background: #2ba1e9 !important;
}

.ahr-unlock-option .ahr-note-btn:not(.ahr-rt-unlock):hover,
.ahr-unlock-option .ahr-unlock-membership-btn:hover,
.ahr-unlock-option button.ahr-note-btn:not(.ahr-rt-unlock):hover,
.ahr-unlock-option a.ahr-note-btn:not(.ahr-rt-unlock):hover {
  background: #1e8be5 !important;
  color: #fff !important;
  border-color: #1e8be5 !important;
}

/* Right button (buy) - white outline */
.ahr-unlock-option .ahr-rt-unlock,
.ahr-unlock-option .ahr-rt-buy {
  width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 40px !important;
  padding: 8px 18px !important;
  background: #ffffff !important;
  border: 1px solid #2ba1e9 !important;
  color: #2ba1e9 !important;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all .18s ease;
}

.ahr-unlock-option .ahr-rt-unlock:hover,
.ahr-unlock-option .ahr-rt-buy:hover {
  background: #2ba1e9 !important;
  color: #ffffff !important;
  border-color: #2ba1e9 !important;
  box-shadow: none !important;
  transform: translateY(-1px);
}

.ahr-unlock-option .ahr-rt-buy {
  gap: 6px;
}

/* ========================================
   SIDEBAR WIDGET CTA (More Tutorials/Packs)
   Uses same outline→fill styling as .ahr-rt-buy
   ======================================== */

.ahr-widget-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 16px;
}

a.ahr-widget-more-btn {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 30px !important;
  padding: 2px 15px !important;
  background: transparent !important;
  border: 1px solid #2ba1e9 !important;
  color: #2ba1e9 !important;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: all .18s ease;
  text-decoration: none !important;
}

a.ahr-widget-more-btn::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 8px;
  background-color: currentColor;
  -webkit-mask: url(/wp-content/uploads/2026/05/menu-dots.svg) no-repeat center / contain;
  mask: url(/wp-content/uploads/2026/05/menu-dots.svg) no-repeat center / contain;
}

a.ahr-widget-more-btn:hover,
a.ahr-widget-more-btn:focus-visible {
  background: #2ba1e9 !important;
  color: #ffffff !important;
  border-color: #2ba1e9 !important;
  box-shadow: none !important;
  transform: translateY(-1px);
  text-decoration: none !important;
}

a.ahr-widget-more-btn:active {
  transform: translateY(0);
}

.ahr-rt-buy__price {
  font-weight: 700;
}

.ahr-rt-buy__lifetime {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

/* ========================================
   BENEFITS LIST
   ======================================== */

.ahr-unlock-benefits {
  list-style: none;
  margin: 0;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ahr-unlock-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.35;
  color: #475569;
}

.ahr-benefit-check {
  flex-shrink: 0;
  width: auto;
  height: auto;
  margin-top: 2px;
  position: relative;
}

.ahr-benefit-check::after {
  content: '✔';
  color: #000;
  font-size: 12px;
  line-height: 1;
}

/* RT Actions container */
.ahr-rt-actions {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ahr-rt-unlock-msg {
  margin: 6px auto 4px;
  width: 100%;
  box-sizing: border-box;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

/* ========================================
   SIGN IN / REGISTER POPUP
   ======================================== */

.ahr-mp-auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  place-items: center;
  z-index: 9999;
}

.ahr-mp-auth-overlay[hidden] {
  display: none !important;
}

.ahr-mp-confirm-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px 32px 30px;
  width: min(92vw, 560px);
  box-shadow: 0 18px 40px rgba(0,0,0,.25);
  position: relative;
  text-align: center;
  animation: ahr-mp-pop-in .18s ease;
}

.ahr-mp-auth-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.15s ease;
  padding: 0;
}

.ahr-mp-auth-close:hover {
  color: #0f172a;
  background: none !important;
}

@keyframes ahr-mp-pop-in {
  from { transform: scale(.96); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.ahr-mp-confirm-title {
  font-weight: 700;
  font-size: 25px;
  color: #0f172a;
  margin-bottom: 16px;
}

.ahr-mp-confirm-text {
  font-size: 13px;
  line-height: 1.2;
  padding: 0 12px;
  color: #475569;
  margin-bottom: 25px;
}

.ahr-mp-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.ahr-mp-auth-signin,
.ahr-mp-auth-register {
  padding: 6px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.ahr-mp-auth-signin {
  background: #ffffff;
  border: 1px solid #32a2e7;
  color: #32a2e7;
  transition: all 0.18s ease;
}

.ahr-mp-auth-signin:hover {
  background: #228ad0;
  color: #ffffff;
}

.ahr-mp-auth-register {
  background: #32a2e7;
  border: none;
  color: #ffffff;
}

.ahr-mp-auth-register:hover {
  background: #228ad0;
  color: #ffffff;
}

/* ========================================
   TABLET ADJUSTMENTS (641px - 960px)
   ======================================== */

@media (max-width: 960px) and (min-width: 641px) {
  .ahr-feed-card .ahr-unlock-pill {
    position: absolute;
    top: -30px;
    right: 32px;
  }
  
  .ahr-unlock-options {
    gap: 16px;
  }
  
  .ahr-unlock-benefits li {
    font-size: 12px;
  }
}

/* ========================================
   UNLOCK BUTTON ANIMATIONS & LOADING STATES
   ======================================== */

/* Loading state for unlock button */
.ahr-rt-unlock.is-loading {
  position: relative;
  pointer-events: none;
  color: transparent !important;
}

.ahr-rt-unlock.is-loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid #2ba1e9;
  border-top-color: transparent;
  border-radius: 50%;
  animation: ahr-rt-spin 0.8s linear infinite;
}

@keyframes ahr-rt-spin {
  to { transform: rotate(360deg); }
}

/* Success state animation */
.ahr-rt-unlock.is-success {
  background: #28a745 !important;
  border-color: #28a745 !important;
  color: #fff !important;
  animation: ahr-rt-pulse 0.3s ease;
}

@keyframes ahr-rt-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Dummy player click animation (shake lock) */
.ahr-dummy-player:active .ahr-dp-lock {
  animation: ahrLockShake 0.6s cubic-bezier(.36,.07,.19,.97);
}

/* Touch-friendly: Ensure minimum tap targets (44x44px) */
.ahr-note-btn,
.ahr-rt-unlock,
.ahr-unlock-membership-btn {
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
}

.ahr-file {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 0;
}

/* ========================================
   MOBILE ADJUSTMENTS (640px and below)
   ======================================== */

@media (max-width: 640px) {
  .ahr-feed-card {
    padding: 20px 13px 24px 13px;
    margin: 40px auto 20px auto;
  }

  /* Single main tutorial block: full-width, no white card chrome */
  .single-ahr_rt_tutorial .ahr-feed-card:not(.ahr-rt-attachments-card) {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 20px 0;
    max-width: 100%;
  }

  .single-ahr_rt_tutorial .ahr-feed-card:not(.ahr-rt-attachments-card) .lesson-heading {
    padding-left: 0;
    padding-right: 0;
  }

  /* Author bar: left meta; share + fav on the right (lock badge hidden on phone) */
  .single-ahr_rt_tutorial .ahr-rt-author-bar {
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    margin: 32px 0 20px;
    padding: 0 12px;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar__main {
    flex: 1 1 auto;
    min-width: 0;
    gap: 12px;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar__avatar-wrap {
    width: 40px;
    height: 40px;
  }

  /* Author meta: smaller name + posted line on phone; 40px avatar */
  .single-ahr_rt_tutorial .ahr-rt-author-bar__meta {
    gap: 0;
    min-height: 40px;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar__name-row {
    gap: 3px;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar__verified-icon {
    width: 14px;
    height: 14px;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar__name {
    font-size: 0.8rem;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar__posted {
    font-size: 11px;
    gap: 3px;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar__posted-sep {
    display: inline;
    padding: 0 0.25em;
    line-height: 1;
    vertical-align: middle;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar__posted-at {
    display: none;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar__posted-icon {
    width: 11px;
    height: 11px;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar__end {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar__end > .ahr-rt-author-bar__access {
    display: none !important;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar__end > .ahr-rt-author-bar__share {
    margin-left: 0 !important;
    width: 44px;
    height: 44px;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar__favourite {
    width: 44px;
    height: 44px;
  }

  /* Tooltips overlapped author/attachments borders on phone — hide on share/fav */
  .single-ahr_rt_tutorial .ahr-rt-author-bar__favourite[data-bp-tooltip]::before,
  .single-ahr_rt_tutorial .ahr-rt-author-bar__favourite[data-bp-tooltip]::after,
  .single-ahr_rt_tutorial .ahr-rt-author-bar__share[data-bp-tooltip]::before,
  .single-ahr_rt_tutorial .ahr-rt-author-bar__share[data-bp-tooltip]::after {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  
  /* Ensure back button is touch-friendly */
  .ahr-rt-back-wrap .button {
    min-height: 44px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
  }
  
  .lesson-heading {
    font-size: 18px;
    padding: 8px 16px;
  }
  
  .lesson-description,
  .ahr-unlocked-desc {
    font-size: 12px !important;
  }

  .ahr-locked-desc-wrap {
    max-height: 150px;
  }

  .ahr-locked-desc {
    font-size: 12px !important;
  }

  /* ~5 lines of fade (12px × 1.6 line-height); solid #f7f7f7 at bottom edge */
  .ahr-locked-desc-fade {
    height: 120px;
    background: linear-gradient(
      to bottom,
      rgba(247, 247, 247, 0) 0%,
      rgba(247, 247, 247, 0.45) 15%,
      rgba(247, 247, 247, 0.65) 35%,
      rgba(247, 247, 247, 0.75) 45%,
      rgba(247, 247, 247, 0.92) 60%,
      rgba(247, 247, 247, 0.98) 80%,
      #f7f7f7 100%
    );
  }
  
  .ahr-post-resources {
    justify-content: flex-start;
    padding: 14px 16px;
    border-radius: 12px;
  }

  .single-ahr_rt_tutorial .ahr-rt-attachments-card .ahr-post-resources {
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 16px;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar:has(+ .ahr-feed-card.ahr-rt-attachments-card) {
    margin-bottom: 40px;
  }

  .single-ahr_rt_tutorial .ahr-rt-author-bar + .ahr-feed-card.ahr-rt-attachments-card {
    margin-top: 0;
    padding-top: 40px;
    border-top: 1px solid #e5e7eb;
  }

  .single-ahr_rt_tutorial .ahr-rt-attachments-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 0;
  }

  .single-ahr_rt_tutorial .ahr-rt-attachments-actions {
    display: flex;
    width: 100%;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .single-ahr_rt_tutorial .ahr-rt-attachments-title {
    font-size: 1.125rem;
    margin: 0 0 5px;
  }

  .single-ahr_rt_tutorial .ahr-rt-attachments-title-icon {
    font-size: 22px;
  }

  .single-ahr_rt_tutorial .ahr-rt-attachments-download-all {
    padding: 7px 12px;
    font-size: 12px;
    transform: none;
  }

  .single-ahr_rt_tutorial .ahr-rt-attachments-view-pack {
    padding: 7px 12px;
    font-size: 12px;
    transform: none;
  }

  .single-ahr_rt_tutorial .ahr-feed-card.ahr-rt-attachments-card {
    border-bottom: 1.5px solid #caced1;
    padding-bottom: 50px;
    margin-bottom: 20px;
    margin-top: 20px;
  }

  /* Sidebar: always visible below content on phone; hide collapse toggle */
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar .ahr-rt-sidebar-toggle-anchor {
    display: none !important;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-sidebar-widgets {
    transform: none !important;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.ahr-rt-sidebar-collapsed #secondary .ahr-rt-sidebar-widgets {
    transform: none !important;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.ahr-rt-sidebar-collapsed #secondary.ahr-rt-single-sidebar {
    max-height: none !important;
    pointer-events: auto !important;
    overflow: visible !important;
  }

  .ahr-rt-tags-below {
    padding: 0 14px;
    font-size: 13px;
    margin-bottom: 1.25rem;
  }
  
  .ahr-file-list {
    justify-content: flex-start !important;
    gap: 10px 16px !important;
  }
  
  .ahr-file-list li:not(:last-child)::after {
    height: 12px;
    margin-left: 10px;
  }
  
  .ahr-post-resources .ahr-file {
    font-size: 12px;
    gap: 2px;
  }
  
  .ahr-post-resources .ahr-file-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    font-size: 20px;
  }
  
  .ahr-post-resources .ahr-file-list {
    gap: 4px 20px !important;
  }

  /* Attachments: 2×2 grid with faded inner dividers (always 4 files on phone) */
  .single-ahr_rt_tutorial .ahr-rt-attachments-card .ahr-post-resources .ahr-file-list {
    position: relative;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 0 !important;
    width: 100%;
    margin: 0;
    padding: 0;
    justify-content: stretch;
    border: none;
    box-sizing: border-box;
  }

  .single-ahr_rt_tutorial .ahr-rt-attachments-card .ahr-post-resources .ahr-file-list::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 50%;
    width: 1px;
    transform: translateX(-50%);
    background: linear-gradient(
      to bottom,
      transparent 0%,
      #cecfd3 18%,
      #cecfd3 82%,
      transparent 100%
    );
    pointer-events: none;
    z-index: 1;
  }

  .single-ahr_rt_tutorial .ahr-rt-attachments-card .ahr-post-resources .ahr-file-list::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    top: 50%;
    height: 1px;
    transform: translateY(-50%);
    background: linear-gradient(
      to right,
      transparent 0%,
      #cecfd3 18%,
      #cecfd3 82%,
      transparent 100%
    );
    pointer-events: none;
    z-index: 1;
  }

  .single-ahr_rt_tutorial .ahr-rt-attachments-card .ahr-file-list li {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    min-width: 0;
    border: none;
    box-sizing: border-box;
  }

  .single-ahr_rt_tutorial .ahr-rt-attachments-card .ahr-file-list li::after {
    display: none !important;
  }

  .single-ahr_rt_tutorial .ahr-rt-attachments-card .ahr-post-resources .ahr-file {
    width: 100%;
    min-height: 44px;
    padding: 10px 8px;
    box-sizing: border-box;
    justify-content: center;
    text-align: center; 
  }
  
  /* Unlock options stack on mobile */
  .ahr-unlock-options {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-top: 16px;
  }

  .single-ahr_rt_tutorial .ahr-unlock-options {
    margin-top: 0;
  }
  
  .ahr-unlock-options::before {
    display: none;
  }
  
  .ahr-unlock-option {
    padding: 0;
    gap: 0;
    align-items: center;
  }
  
  .ahr-unlock-option:first-child {
    margin-bottom: -14px !important;
  }
  
  .ahr-unlock-benefits {
    display: none;
  }
  
  /* Reset padding for both columns on mobile */
  .ahr-unlock-option.ahr-rt-actions {
    padding: 0;
    gap: 0;
  }
  
  /* Decrease button width and center align on mobile */
  .ahr-unlock-option .ahr-note-btn:not(.ahr-rt-unlock),
  .ahr-unlock-option .ahr-unlock-membership-btn,
  .ahr-unlock-option button.ahr-note-btn:not(.ahr-rt-unlock),
  .ahr-unlock-option a.ahr-note-btn:not(.ahr-rt-unlock),
  .ahr-unlock-option .ahr-rt-unlock {
    width: 85% !important;
    margin: 0 auto !important;
  }
  
  /* Mobile popup adjustments */
  .ahr-mp-confirm-title {
    font-size: 22px;
  }
  
  .ahr-mp-auth-signin,
  .ahr-mp-auth-register {
    font-size: 14px !important;
    line-height: 1.3 !important;
    padding: 8px 24px !important;
  }
}

/* ========================================
   ARCHIVE PAGE
   ======================================== */

/* Archive container layout: CPT-Shared/library/assets/library-filters.css (.ahr-library-archive) */

/* RT archive only: full width + ref-pack padding; grid/filters match banner breakout on large screens */
.post-type-archive-ahr_rt_tutorial .ahr-rt-archive.ahr-library-archive {
  max-width: 100%;
  width: 100%;
  padding: 0 12px 40px;
  box-sizing: border-box;
}

@media (max-width: 960px) {
  .post-type-archive-ahr_rt_tutorial .ahr-rt-archive.ahr-library-archive {
    padding: 32px 12px;
  }
}

@media (max-width: 640px) {
  .post-type-archive-ahr_rt_tutorial .ahr-rt-archive.ahr-library-archive {
    padding: 24px 12px;
  }
}

/* Small desktop / laptops: keep comfortable gutters (avoid edge-hugging cards/banner). */
@media (min-width: 1025px) and (max-width: 1399px) {
  .post-type-archive-ahr_rt_tutorial .ahr-library-filters-wrap,
  .post-type-archive-ahr_rt_tutorial .ahr-rt-grid,
  .post-type-archive-ahr_rt_tutorial .ahr-library-load-more-wrap {
    width: 100%;
    margin-left: 0;
    max-width: 100%;
    box-sizing: border-box;
  }

  .post-type-archive-ahr_rt_tutorial .ahr-rt-archive.ahr-library-archive {
    padding-left: 20px;
    padding-right: 20px;
  }

  .post-type-archive-ahr_rt_tutorial .ahr-rt-card-title {
    font-size: 16px;
    margin-bottom: 6px;
  }

  .post-type-archive-ahr_rt_tutorial .ahr-rt-card-excerpt {
    font-size: 13px;
    line-height: 1.45;
  }
}

/* Big desktops: keep the current full-width breakout look. */
@media (min-width: 1400px) {
  .post-type-archive-ahr_rt_tutorial .ahr-library-filters-wrap,
  .post-type-archive-ahr_rt_tutorial .ahr-rt-grid,
  .post-type-archive-ahr_rt_tutorial .ahr-library-load-more-wrap {
    width: calc(100% + 80px);
    margin-left: -40px;
    max-width: 1200px;
    box-sizing: border-box;
  }
}

/* Archive filters: see CPT-Shared/library/assets/library-filters.css */

/* Grid Layout — 4 → 3 → 2 → 1 columns by viewport (full archive width) */
.ahr-rt-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
  max-width: 100%;
  margin-bottom: 32px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 1199px) {
  .ahr-rt-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 959px) {
  .ahr-rt-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

/* Tutorial Card */
.ahr-rt-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
}

.ahr-rt-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.ahr-rt-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Card Thumbnail */
.ahr-rt-card-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
  background: #f1f5f9;
  overflow: hidden;
}

.ahr-rt-card-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ahr-rt-card-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.ahr-rt-card-placeholder-icon {
  font-size: 48px;
  opacity: 0.3;
}

/* Card Content */
.ahr-rt-card-content {
  padding: 20px;
}

/* Bottom-right badge row: parts label (left) + price / unlocked (right) */
.ahr-rt-card-thumb-badges {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 8px;
  max-width: calc(100% - 20px);
  pointer-events: none;
}

/* Price pill — locked, purchasable */
.ahr-rt-card-thumb-badges .ahr-rt-card-price-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 36px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.35);
}

/* Unlocked badge — minimal circle */
.ahr-rt-card-thumb-badges .ahr-rt-card-unlocked-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #10a37f;
}

.ahr-rt-card-unlocked-badge__icon {
  display: block;
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  background-color: #fff;
  -webkit-mask-image: url("/wp-content/uploads/2026/05/lock-open.svg");
  mask-image: url("/wp-content/uploads/2026/05/lock-open.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.ahr-rt-guest-login-link {
  color: #2ba1e9;
  text-decoration: underline;
  font-weight: 600;
}

.ahr-rt-guest-login-link:hover {
  color: #1e8be5;
}

.ahr-rt-guest-checkout-text {
  margin-bottom: 0;
}

.ahr-rt-guest-checkout-text--login {
  margin-bottom: 12px;
}

.ahr-rt-guest-checkout-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #94a3b8;
}

.ahr-rt-guest-checkout-or::before,
.ahr-rt-guest-checkout-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.ahr-rt-guest-checkout-text--checkout {
  margin-bottom: 25px;
}

.ahr-rt-guest-checkout-actions {
  justify-content: center;
}

.ahr-rt-guest-checkout-actions .ahr-rt-guest-proceed {
  min-width: 220px;
}

.ahr-rt-card-title {
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  margin: 0 0 8px;
  line-height: 1.3;
}

.ahr-rt-card-excerpt {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* No Tutorials Message */
.ahr-rt-no-tutorials {
  text-align: center;
  padding: 60px 20px;
}

.ahr-rt-no-tutorials p {
  font-size: 16px;
  color: #64748b;
  margin: 0;
}

/* Pagination */
.ahr-rt-pagination {
  margin-top: 40px;
  text-align: center;
}

.ahr-rt-pagination .nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.ahr-rt-pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #e5e7eb;
  color: #475569;
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.ahr-rt-pagination .page-numbers:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #1e8be5;
}

.ahr-rt-pagination .page-numbers.current {
  background: #1e8be5;
  border-color: #1e8be5;
  color: #fff;
}

.ahr-rt-pagination .page-numbers.dots {
  border: none;
  background: transparent;
}

/* Lock Icon on Archive Cards */
.ahr-rt-card-lock-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.4);
  pointer-events: none;
  z-index: 3;
}

.ahr-rt-card-lock-icon {
  display: block;
  width: 32px;
  height: 32px;
  background-color: #fff;
  -webkit-mask-image: url("/wp-content/uploads/2025/11/lock.svg");
  mask-image: url("/wp-content/uploads/2025/11/lock.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  transition: transform 0.2s ease;
}

@media (hover: hover) {
  .ahr-rt-card[data-lock-status="locked"]:hover .ahr-rt-card-lock-icon {
    transform: scale(1.18);
  }
}

/* Play icon + dark overlay on hover (unlocked cards only) */
.ahr-rt-card[data-lock-status="unlocked"] .ahr-rt-card-thumbnail::before,
.ahr-rt-card[data-lock-status="unlocked"] .ahr-rt-card-thumbnail::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.ahr-rt-card[data-lock-status="unlocked"] .ahr-rt-card-thumbnail::before {
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.ahr-rt-card[data-lock-status="unlocked"] .ahr-rt-card-thumbnail::after {
  inset: auto;
  top: 50%;
  left: 50%;
  width: 52px;
  height: 52px;
  transform: translate(-50%, -50%);
  background-color: #fff;
  -webkit-mask-image: url("/wp-content/uploads/2026/05/play-icon.svg");
  mask-image: url("/wp-content/uploads/2026/05/play-icon.svg");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  z-index: 2;
}

@media (hover: hover) {
  .ahr-rt-card[data-lock-status="unlocked"]:hover .ahr-rt-card-thumbnail::before {
    opacity: 1;
  }

  .ahr-rt-card[data-lock-status="unlocked"]:hover .ahr-rt-card-thumbnail::after {
    opacity: 0.9;
  }
}

/* Tablet adjustments for archive */
@media (max-width: 960px) {
  .ahr-rt-archive-title {
    font-size: 28px;
  }
  
  .ahr-rt-archive-header {
    margin-bottom: 24px;
  }
}

/* Mobile adjustments for archive */
@media (max-width: 640px) {
  /* Banner: ~20px from screen edges; pull up ~20px vs shared banner mobile default */
  .post-type-archive-ahr_rt_tutorial .ahr-page-banner {
    width: calc(100vw - 40px);
    max-width: none;
    margin-left: calc(50% - 50vw + 20px);
    margin-right: 0;
    margin-top: -30px;
    box-sizing: border-box;
  }

  .post-type-archive-ahr_rt_tutorial .ahr-page-banner-text p {
    max-width: 90%;
  }

  .ahr-rt-archive-header {
    margin-bottom: 20px;
  }
  
  .ahr-rt-archive-title {
    font-size: 24px;
    margin-bottom: 8px;
  }
  
  .ahr-rt-archive-description {
    font-size: 14px;
  }
  
  .ahr-rt-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .ahr-rt-card-content {
    padding: 16px;
  }
  
  .ahr-rt-card-title {
    font-size: 16px;
  }
  
  .ahr-rt-card-excerpt {
    font-size: 13px;
  }
  
  /* No tutorials message */
  .ahr-rt-no-tutorials {
    padding: 40px 16px;
  }
  
  .ahr-rt-no-tutorials p {
    font-size: 14px;
  }
}

/* Extra small devices (375px and below) */
@media (max-width: 375px) {
  .ahr-rt-archive-title {
    font-size: 22px;
  }
  
  .ahr-rt-card-title {
    font-size: 15px;
  }
}

/* ========================================
   COMMENTS SECTION
   ======================================== */

/* Comments wrapper - ensures comments appear BELOW the card, not beside it */
.ahr-rt-comments-wrapper {
  max-width: 960px;
  margin: 0 auto 40px;
  padding: 0 24px;
}

/* Override any theme styles that might push comments to sidebar */
.ahr-rt-comments-wrapper .comments-area {
  width: 100%;
  max-width: 100%;
  float: none;
  clear: both;
}

/* Mobile adjustments for comments */
@media (max-width: 640px) {
  .ahr-rt-comments-wrapper {
    padding: 0 12px;
    margin-bottom: 24px;
  }
}

/* ========================================
   BUDDYBOSS THEME OVERRIDES
   ======================================== */

/* Full-width primary only when single has no sidebar widgets (archive always) */
.single-ahr_rt_tutorial:not(.ahr-rt-has-sidebar) #primary.content-area,
.post-type-archive-ahr_rt_tutorial #primary.content-area {
  max-width: 100%;
  width: 100%;
  flex: 1;
}

/* Full-width single column when no RT sidebar widgets (and archive always) */
.single-ahr_rt_tutorial:not(.ahr-rt-has-sidebar) .bb-grid.site-content-grid,
.post-type-archive-ahr_rt_tutorial .bb-grid.site-content-grid {
  display: block;
}

/* Two-column layout when single sidebar has widgets */
.single-ahr_rt_tutorial.ahr-rt-has-sidebar .bb-grid.site-content-grid {
  display: flex;
}

/* Ensure main content is centered */
.single-ahr_rt_tutorial .site-main,
.post-type-archive-ahr_rt_tutorial .site-main {
  max-width: 100%;
  margin: 0 auto;
}

/* ========================================
   SINGLE SIDEBAR LAYOUT (widget area active)
   ======================================== */

/* Match BuddyBoss page+sidebar flex row (primary grows full width when sidebar collapsed) */
.single-ahr_rt_tutorial.ahr-rt-has-sidebar #primary.content-area {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  width: auto;
}

/* Sidebar open: cap primary width (transitions in sync with sidebar wipe) */
.single-ahr_rt_tutorial.ahr-rt-has-sidebar:not(.ahr-rt-sidebar-collapsed) #primary.content-area {
  max-width: 900px;
}

/* Laptop-sized desktops: keep sidebar beside content by allowing the main column to shrink. */
@media (min-width: 1025px) and (max-width: 1399px) {
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar:not(.ahr-rt-sidebar-collapsed) #primary.content-area {
    max-width: none;
    flex: 1 1 0;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary.widget-area.sm-grid-1-1 {
    flex: 0 0 280px;
    max-width: 280px;
    width: 280px;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-sidebar-widgets {
    width: 280px;
  }
}

@media screen and (min-width: 800px) {
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary.widget-area.sm-grid-1-1 {
    flex: 0 0 300px;
    max-width: 300px;
    width: 300px;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    padding-left: 0;
    padding-right: 0;
    transition: flex-basis 0.3s ease, max-width 0.3s ease, width 0.3s ease;
  }

  /* Fixed 300px inner panel — wipes as one unit (no widget reflow stretch) */
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-sidebar-widgets {
    width: 300px;
    box-sizing: border-box;
    transition: transform 0.3s ease;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.sidebar-right #secondary .ahr-rt-sidebar-widgets {
    padding-left: 30px;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.sidebar-left #secondary .ahr-rt-sidebar-widgets {
    padding-right: 20px;
  }

  /* Gap between tutorial content and sidebar: matches Reference Pack singles */
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.sidebar-right #primary.content-area {
    position: relative;
    padding-right: 20px;
    box-sizing: border-box;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.sidebar-left #primary.content-area {
    padding-left: 20px;
    box-sizing: border-box;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.sidebar-left #secondary.widget-area.sm-grid-1-1 {
    position: relative;
  }

  /* Vertical rule — same 1px #e5e7eb as .ahr-feed-card borders; soft fade top/bottom */
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.sidebar-right #primary.content-area::after,
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.sidebar-left #secondary.widget-area.sm-grid-1-1::after {
    content: "";
    position: absolute;
    top: 100px;
    bottom: 100px;
    width: 0;
    background: none;
    pointer-events: none;
    z-index: 1;
    -webkit-mask-image: linear-gradient(
      180deg,
      transparent 0,
      #000 72px,
      #000 calc(100% - 72px),
      transparent 100%
    );
    mask-image: linear-gradient(
      180deg,
      transparent 0,
      #000 72px,
      #000 calc(100% - 72px),
      transparent 100%
    );
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.sidebar-right #primary.content-area::after {
    right: -5px;
    border-right: 1px solid #e5e7eb;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.sidebar-left #secondary.widget-area.sm-grid-1-1::after {
    right: 0;
    left: auto;
    border-right: 1px solid #e5e7eb;
  }
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .widget {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
}

/* Popular Tutorials widget title — matches .ahr-rt-attachments-title */
.single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-popular-widget-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0f172a;
  opacity: 0.8;
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-popular-widget-title-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  object-fit: contain;
  opacity: 0.8;
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar .ahr-rt-single-main {
  max-width: 960px;
  width: 100%;
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar .ahr-rt-single-main .ahr-rt-back-wrap {
  max-width: none;
  margin: 0 0 1.5rem 0;
}

.single-ahr_rt_tutorial .ahr-rt-single-toolbar + .ahr-feed-card,
.single-ahr_rt_tutorial .ahr-rt-single-main > .ahr-feed-card:first-of-type {
  margin-top: 0;
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar .ahr-rt-single-main .ahr-feed-card {
  margin-left: 0;
  margin-right: 0;
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar .ahr-rt-single-main .ahr-rt-tags-below {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
}

/* Default single: back link + tags aligned with centered card */
.single-ahr_rt_tutorial:not(.ahr-rt-has-sidebar) .ahr-rt-single-main .ahr-rt-back-wrap {
  max-width: 960px;
  margin: 0 auto 1.5rem auto;
}

/* ========================================
   SIDEBAR COLLAPSE TOGGLE (BuddyBoss-style slide-off)
   ======================================== */

/* Toggle lives on #primary so it never rides inside the collapsing sidebar column */
.single-ahr_rt_tutorial.ahr-rt-has-sidebar #primary.content-area {
  position: relative;
  transition: max-width 0.3s ease, padding 0.3s ease;
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar .ahr-rt-single-main {
  position: relative;
  transition: max-width 0.3s ease, margin 0.3s ease;
}

.ahr-rt-sidebar-toggle-anchor {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 30;
  height: 0;
  overflow: visible;
  transition: right 0.3s ease;
}

.ahr-rt-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  box-shadow: none;
}

.ahr-rt-sidebar-toggle:hover,
.ahr-rt-sidebar-toggle:focus,
.ahr-rt-sidebar-toggle:focus-visible,
.ahr-rt-sidebar-toggle:active {
  background: transparent;
  box-shadow: none;
  outline: none;
}

.ahr-rt-sidebar-toggle__icon {
  display: block;
  width: 18px;
  height: 18px;
  opacity: 0.4;
}

/* Sidebar panel slides off-screen (LearnDash / BuddyBoss lesson panel pattern) */
.single-ahr_rt_tutorial.ahr-rt-has-sidebar .bb-grid.site-content-grid {
  overflow-x: clip;
}

@media screen and (min-width: 800px) {
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #primary.content-area::after {
    transition: opacity 0.3s ease;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.ahr-rt-sidebar-collapsed #primary.content-area::after {
    opacity: 0;
  }

  /* Simple horizontal wipe — panel + column move together */
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.sidebar-right.ahr-rt-sidebar-collapsed #secondary .ahr-rt-sidebar-widgets {
    transform: translateX(100%);
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.sidebar-left.ahr-rt-sidebar-collapsed #secondary .ahr-rt-sidebar-widgets {
    transform: translateX(-100%);
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.ahr-rt-sidebar-collapsed #secondary.ahr-rt-single-sidebar {
    flex: 0 0 0;
    max-width: 0;
    width: 0;
    pointer-events: none;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.ahr-rt-sidebar-collapsed.sidebar-left #secondary.ahr-rt-single-sidebar::after {
    opacity: 0;
  }
}

/* Open: 10px inset from the right (closed stays at right: 0) */
.single-ahr_rt_tutorial.ahr-rt-has-sidebar:not(.ahr-rt-sidebar-collapsed) .ahr-rt-sidebar-toggle-anchor {
  right: 10px;
  left: auto;
}

/* Collapsed: primary at 100% width; center tutorial content inside */
.single-ahr_rt_tutorial.ahr-rt-has-sidebar.ahr-rt-sidebar-collapsed.sidebar-right #primary.content-area {
  padding-right: 0;
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar.ahr-rt-sidebar-collapsed.sidebar-left #primary.content-area {
  padding-left: 0;
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar.ahr-rt-sidebar-collapsed .ahr-rt-single-main {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

/* Direct back link only — not the one inside the multi-part toolbar (would center behind tabs). */
.single-ahr_rt_tutorial.ahr-rt-has-sidebar.ahr-rt-sidebar-collapsed .ahr-rt-single-main > .ahr-rt-back-wrap {
  max-width: none;
  margin-left: auto;
  margin-right: auto;
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar.ahr-rt-sidebar-collapsed .ahr-rt-sidebar-toggle-anchor {
  right: 0;
  left: auto;
}

@media (max-width: 799px) {
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary.ahr-rt-single-sidebar {
    overflow: hidden;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-sidebar-widgets {
    transition: transform 0.3s ease;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.ahr-rt-sidebar-collapsed #secondary .ahr-rt-sidebar-widgets {
    transform: translateX(100%);
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.ahr-rt-sidebar-collapsed #secondary.ahr-rt-single-sidebar {
    max-height: 0;
    pointer-events: none;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar .ahr-rt-sidebar-toggle-anchor {
    right: 0;
    left: auto;
  }
}

/* ========================================
   SUGGESTED TUTORIALS WIDGET (SIDEBAR)
   Mirrors Reference Packs suggested-widget responsive rules.
   ======================================== */

.single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list,
.single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card,
.single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card {
  margin: 0;
}

/* Sidebar + phone: show 4 cards (5–6 hidden); stacked band (641–1020px) overrides below */
.single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card:nth-child(n+5),
.single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card:nth-child(n+5) {
  display: none;
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card-title,
.single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card-title {
  font-size: 15px;
  margin-bottom: 3px;
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card-content,
.single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card-content {
  padding: 14px 16px;
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card-excerpt,
.single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card-excerpt {
  font-size: 13px;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card[data-lock-status="unlocked"] .ahr-rt-card-thumbnail::after,
.single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card[data-lock-status="unlocked"] .ahr-rt-card-thumbnail::after {
  width: 40px;
  height: 40px;
}

/* Suggested widget: below-content band (stacks ~below 1020px) — centered; 3 cols then 2 cols; phone stays 1 */
@media (min-width: 641px) and (max-width: 1020px) {
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar .ahr-rt-single-main {
    border-bottom: 1.5px solid #caced1;
    padding-bottom: 50px;
    margin-bottom: 20px;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary.ahr-rt-single-sidebar,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary.ahr-refpack-single-sidebar {
    margin-top: 0;
    padding-top: 0;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary.widget-area.sm-grid-1-1,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary.widget-area.sm-grid-1-1 {
    flex: 0 0 100%;
    max-width: 100%;
    width: 100%;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary.ahr-rt-single-sidebar,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary.ahr-refpack-single-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 100%;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-sidebar-widgets,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-refpack-sidebar-widgets {
    width: 100%;
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.sidebar-right #secondary .ahr-rt-sidebar-widgets,
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.sidebar-left #secondary .ahr-rt-sidebar-widgets,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar.sidebar-right #secondary .ahr-refpack-sidebar-widgets,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar.sidebar-left #secondary .ahr-refpack-sidebar-widgets {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .widget.ahr-rt-suggested-tutorials-widget,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .widget.ahr-rt-suggested-tutorials-widget {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list {
    display: grid;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    gap: 20px;
    align-items: stretch;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card:nth-child(n+5),
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card:nth-child(n+5) {
    display: block;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .widget.ahr-rt-suggested-tutorials-widget .ahr-widget-more-wrap,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .widget.ahr-rt-suggested-tutorials-widget .ahr-widget-more-wrap {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 641px) and (max-width: 799px) {
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-sidebar-widgets,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-refpack-sidebar-widgets,
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .widget.ahr-rt-suggested-tutorials-widget,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .widget.ahr-rt-suggested-tutorials-widget,
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list,
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .widget.ahr-rt-suggested-tutorials-widget .ahr-widget-more-wrap,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .widget.ahr-rt-suggested-tutorials-widget .ahr-widget-more-wrap {
    max-width: 640px;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 800px) and (max-width: 1020px) {
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-sidebar-widgets,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-refpack-sidebar-widgets,
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .widget.ahr-rt-suggested-tutorials-widget,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .widget.ahr-rt-suggested-tutorials-widget,
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list,
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .widget.ahr-rt-suggested-tutorials-widget .ahr-widget-more-wrap,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .widget.ahr-rt-suggested-tutorials-widget .ahr-widget-more-wrap {
    max-width: 960px;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Suggested widget: phone — hide toggle, center column (matches Reference Packs widget) */
@media (max-width: 640px) {
  .single-ahr_rt_tutorial.ahr-rt-has-sidebar .ahr-rt-sidebar-toggle-anchor {
    display: none !important;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-sidebar-widgets {
    transform: none !important;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.ahr-rt-sidebar-collapsed #secondary .ahr-rt-sidebar-widgets {
    transform: none !important;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar.ahr-rt-sidebar-collapsed #secondary.ahr-rt-single-sidebar {
    max-height: none !important;
    pointer-events: auto !important;
    overflow: visible !important;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary.ahr-rt-single-sidebar,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary.ahr-refpack-single-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-sidebar-widgets,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-refpack-sidebar-widgets {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .widget.ahr-rt-suggested-tutorials-widget,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .widget.ahr-rt-suggested-tutorials-widget {
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    align-items: center;
    gap: 26px;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card,
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card {
    width: 100%;
    max-width: 320px;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card:nth-child(n+5),
  .single-ahr_ref_pack.ahr-refpack-has-sidebar #secondary .ahr-rt-suggested-list .ahr-rt-card:nth-child(n+5) {
    display: none;
  }

  .single-ahr_rt_tutorial.ahr-rt-has-sidebar #secondary .ahr-rt-popular-widget-title-icon {
    width: 20px;
    height: 20px;
  }
}

/* ========================================
   BUDDYBOSS INTEGRATION - SINGLE PAGE
   ======================================== */

/* BuddyBoss Section Wrapper - matches feed card styling */
.ahr-rt-buddyboss-wrapper {
  max-width: 960px;
  margin: 0 auto 40px;
  padding: 0;
}

/* BuddyBoss Section Container - matches feed card */
.ahr-rt-buddyboss-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 20px 24px 24px 24px;
  box-shadow: 0 3px 14px rgba(0,0,0,0.03);
}

/*
 * BuddyBoss handles most activity UI without overrides here, including:
 * .activity-state, .activity-meta.action, .activity-comments,
 * .bp-like-button, .bp-comment-button
 */

/* Mobile adjustments */
@media (max-width: 640px) {
  .ahr-rt-buddyboss-wrapper {
    padding: 0 12px;
    margin-bottom: 24px;
  }
  
  .ahr-rt-buddyboss-section {
    padding: 16px;
    border-radius: 12px;
  }
}

/* ========================================
   BUDDYBOSS INTEGRATION - ARCHIVE PAGE
   ======================================== */

/* Card Stats Container */
.ahr-rt-card-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

/* Individual Stat */
.ahr-rt-stat {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
  font-size: 13px;
}

.ahr-rt-stat-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.ahr-rt-stat-likes .ahr-rt-stat-icon {
  color: #ef4444;
}

.ahr-rt-stat-comments .ahr-rt-stat-icon {
  color: #64748b;
}

.ahr-rt-stat-count {
  font-weight: 500;
}

/* Mobile Adjustments for Archive Stats */
@media (max-width: 640px) {
  .ahr-rt-card-stats {
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
  }
  
  .ahr-rt-stat {
    font-size: 12px;
  }
  
  .ahr-rt-stat-icon {
    width: 12px;
    height: 12px;
  }
}

/* ========================================
   MULTI-PART TUTORIAL — toolbar & switcher
   ======================================== */

.ahr-rt-single-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px 16px;
  margin: 0;
  max-width: 960px;
  width: 100%;
}

.ahr-rt-single-toolbar:has(.ahr-rt-parts-switcher) {
  display: block;
  position: relative;
  padding-bottom: 26px;
  width: 100%;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* Parts toolbar + main card share the same horizontal box (card-centered tabs). */
.single-ahr_rt_tutorial .ahr-rt-single-main > .ahr-rt-single-toolbar:has(.ahr-rt-parts-switcher) + .ahr-feed-card {
  width: 100%;
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.single-ahr_rt_tutorial.ahr-rt-has-sidebar .ahr-rt-single-main .ahr-rt-single-toolbar {
  max-width: 960px;
  margin-left: auto;
  margin-right: auto;
}

.single-ahr_rt_tutorial:not(.ahr-rt-has-sidebar) .ahr-rt-single-main .ahr-rt-single-toolbar {
  margin-left: auto;
  margin-right: auto;
}

.ahr-rt-single-toolbar .ahr-rt-back-wrap {
  margin: 0;
  justify-self: start;
  max-width: none;
}

.ahr-rt-back-label--short {
  display: none;
}

.ahr-rt-parts-btn-label--short {
  display: none;
}

.ahr-rt-parts-switcher {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 11;
  display: inline-flex;
  align-items: stretch;
  width: fit-content;
  min-height: 40px;
  height: 40px;
  min-width: 280px;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  border: none;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
}

.ahr-rt-parts-switcher--count-3 {
  min-width: 360px;
}

.ahr-rt-parts-switcher--count-4 {
  min-width: 440px;
}

.ahr-rt-parts-switcher-sep {
  display: block;
  width: 1px;
  align-self: stretch;
  background: rgba(51, 65, 85, 0.25);
}

.ahr-rt-parts-btn {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 0 18px;
  min-width: 0;
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1;
  color: #7a7a7a;
  background: #dddddd;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.ahr-rt-parts-btn-icon {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  object-fit: contain;
  filter: brightness(0);
  opacity: 0.45;
}

.ahr-rt-parts-btn.is-active {
  color: #fff;
  background: #2583be;
}

.ahr-rt-parts-btn.is-active .ahr-rt-parts-btn-icon {
  filter: brightness(0) invert(1);
  opacity: 1;
}

.ahr-rt-parts-btn:hover:not(:disabled):not(.is-active),
.ahr-rt-parts-btn:focus:not(:disabled):not(.is-active) {
  background: #c9c9c9;
  color: #7a7a7a;
}

.ahr-rt-parts-btn.is-active:hover:not(:disabled) {
  background: #1f6fa8;
  color: #fff;
}

.ahr-rt-parts-btn:focus-visible {
  outline: 2px solid #2583be;
  outline-offset: -2px;
  z-index: 1;
}

.ahr-rt-parts-btn.is-active:focus-visible {
  outline-color: #fff;
}

.ahr-rt-parts-btn:focus,
.ahr-rt-parts-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.ahr-rt-parts-switcher--locked,
.ahr-rt-parts-switcher--locked .ahr-rt-parts-btn {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Desktop: tighten vertical space above parts tabs (phone rules stay in 640px block). */
@media (min-width: 641px) {
  .single-ahr_rt_tutorial .ahr-rt-single-toolbar:has(.ahr-rt-parts-switcher) {
    margin-top: 5px;
    padding-bottom: 25px;
  }

  .single-ahr_rt_tutorial .ahr-rt-single-toolbar:has(.ahr-rt-parts-switcher) .ahr-rt-back-wrap {
    margin-bottom: 0;
  }
}

.ahr-rt-card-thumb-badges .ahr-rt-card-two-parts-badge {
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(15, 23, 42, 0.82);
  line-height: 1.3;
  white-space: nowrap;
}

/* Archive cards: completed pill — lower left on thumbnail (matches single-page green) */
.ahr-rt-card-thumbnail .ahr-rt-card-completed-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 4;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ahr-rt-prog-green, #109649);
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
}

@media (max-width: 640px) {
  .ahr-rt-single-toolbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ahr-rt-single-toolbar .ahr-rt-back-wrap {
    justify-self: stretch;
  }

  /* Multi-part: one row — Back left, rounded parts pill right */
  .ahr-rt-single-toolbar:has(.ahr-rt-parts-switcher) {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px 12px;
    position: static;
    padding-bottom: 0;
  }

  .ahr-rt-single-toolbar:has(.ahr-rt-parts-switcher) .ahr-rt-back-wrap {
    flex: 0 0 auto;
    justify-self: auto;
    margin: 0;
  }

  .ahr-rt-single-toolbar:has(.ahr-rt-parts-switcher) .ahr-rt-back-wrap .button {
    white-space: nowrap;
  }

  .ahr-rt-single-toolbar:has(.ahr-rt-parts-switcher) .ahr-rt-back-label--long {
    display: none;
  }

  .ahr-rt-single-toolbar:has(.ahr-rt-parts-switcher) .ahr-rt-back-label--short {
    display: inline;
  }

  /* 3–4 parts: compact P1, P2, … on phone; 2-part keeps full "Part 1" labels */
  .ahr-rt-parts-switcher--count-3 .ahr-rt-parts-btn-label--long,
  .ahr-rt-parts-switcher--count-4 .ahr-rt-parts-btn-label--long {
    display: none;
  }

  .ahr-rt-parts-switcher--count-3 .ahr-rt-parts-btn-label--short,
  .ahr-rt-parts-switcher--count-4 .ahr-rt-parts-btn-label--short {
    display: inline;
  }

  .ahr-rt-parts-switcher,
  .ahr-rt-parts-switcher--count-3,
  .ahr-rt-parts-switcher--count-4 {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    flex: 0 1 auto;
    width: fit-content;
    min-width: 0;
    max-width: calc(100% - 120px);
    height: 32px;
    min-height: 32px;
    margin-top: 0;
    margin-left: auto;
    margin-right: 0;
    border-radius: 999px;
  }

  .ahr-rt-parts-btn {
    flex: 0 1 auto;
    padding: 0 18px;
    font-size: 12px;
    gap: 6px;
  }

  .ahr-rt-parts-switcher--count-3 .ahr-rt-parts-btn {
    padding: 0 14px;
    font-size: 11px;
  }

  .ahr-rt-parts-switcher--count-4 .ahr-rt-parts-btn {
    padding: 0 11px;
    font-size: 11px;
  }

  .ahr-rt-parts-btn-icon {
    width: 14px;
    height: 14px;
  }
}
