/* ============================================================
   ARIO — 17 COURSE
   Course detail page — hero · info grid · syllabus · buy card
   ============================================================ */

body:has(.course-page) {
  background: #ffffff !important;
  background-attachment: initial !important;
}
body:has(.course-page)::before,
body:has(.course-page)::after {
  display: none !important;
  content: none !important;
}

/* ============================================================
   PAGE WRAPPER + COLOR THEMES
   ============================================================ */
.course-page {
  --c1: #3b82f6;
  --c2: #1d4ed8;
  --cr: 59, 130, 246;
  background: #ffffff;
  min-height: calc(100vh - 96px);
}

.course-page-blue     { --c1: #3b82f6; --c2: #1d4ed8; --cr: 59, 130, 246; }
.course-page-indigo   { --c1: #6366f1; --c2: #4338ca; --cr: 99, 102, 241; }
.course-page-violet   { --c1: #8b5cf6; --c2: #6d28d9; --cr: 139, 92, 246; }
.course-page-pink     { --c1: #ec4899; --c2: #be185d; --cr: 236, 72, 153; }
.course-page-cyan     { --c1: #06b6d4; --c2: #0891b2; --cr: 6, 182, 212; }
.course-page-amber    { --c1: #f59e0b; --c2: #d97706; --cr: 245, 158, 11; }
.course-page-green    { --c1: #10b981; --c2: #059669; --cr: 16, 185, 129; }

/* ============================================================
   HERO
   ============================================================ */
.course-hero {
  position: relative;
  padding: 4.5rem 1.5rem 3rem;
  text-align: center;
  background: #ffffff;
}

.course-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Title — navy → blue → navy */
.course-hero-title {
  font-family: var(--font-fa);
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -.02em;
  margin: 0 0 .9rem;
  background: linear-gradient(90deg,
    #0a0f1e 0%,
    #0f172a 20%,
    #1e3a8a 35%,
    #2563eb 45%,
    #3b82f6 50%,
    #2563eb 55%,
    #1e3a8a 65%,
    #0f172a 80%,
    #0a0f1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: none;
}

/* Subtitle */
.course-hero-sub {
  font-family: var(--font-fa);
  font-size: 1.02rem;
  line-height: 2;
  color: var(--text-soft);
  font-weight: 600;
  margin: 0 0 2.4rem;
  max-width: 60ch;
}

/* ============================================================
   Course Info Grid
   ============================================================ */
.course-hero-info {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .7rem;
  width: 100%;
  max-width: 900px;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(var(--cr), .15);
}

.course-hero-info-item {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .85rem .9rem;
  border-radius: 14px;
  background: #ffffff;
  border: 1.5px solid rgba(var(--cr), .15);
  text-align: right;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1),
              border-color .3s,
              box-shadow .3s;
  min-width: 0;
}

.course-hero-info-item:hover {
  transform: translateY(-3px);
  border-color: rgba(var(--cr), .4);
  box-shadow: 0 12px 28px rgba(var(--cr), .12);
}

/* ---------- Pro SVG sticker ---------- */
.course-hero-info-icon {
  position: relative;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  border: none;
  color: currentColor;
}

.ci-svg {
  width: 30px;
  height: 30px;
  display: block;
  transition: transform .4s cubic-bezier(.34, 1.3, .5, 1);
  transform-origin: center;
  vertical-align: middle;
}

.course-hero-info-item:hover .ci-svg {
  transform: scale(1.15) rotate(-6deg);
}

/* Icon colors + animations */
.ci-blue { color: #3b82f6; }
.ci-blue .ci-svg {
  filter: drop-shadow(0 0 4px rgba(59, 130, 246, .55)) drop-shadow(0 0 10px rgba(59, 130, 246, .3));
  animation: ciPulse 2.8s ease-in-out infinite;
}

.ci-violet { color: #8b5cf6; }
.ci-violet .ci-svg {
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, .55)) drop-shadow(0 0 10px rgba(139, 92, 246, .3));
  animation: ciFloat 3.4s ease-in-out infinite;
}

.ci-amber { color: #f59e0b; }
.ci-amber .ci-svg {
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, .55)) drop-shadow(0 0 10px rgba(245, 158, 11, .3));
  animation: ciWave 3.2s ease-in-out infinite;
  transform-origin: 70% 70%;
}

.ci-green { color: #10b981; }
.ci-green .ci-svg {
  filter: drop-shadow(0 0 4px rgba(16, 185, 129, .55)) drop-shadow(0 0 10px rgba(16, 185, 129, .3));
  animation: ciHeartbeat 2.8s ease-in-out infinite;
}

.ci-cyan { color: #06b6d4; }
.ci-cyan .ci-svg {
  filter: drop-shadow(0 0 4px rgba(6, 182, 212, .55)) drop-shadow(0 0 10px rgba(6, 182, 212, .3));
  animation: ciPulse 3s ease-in-out infinite;
}

.ci-pink { color: #ec4899; }
.ci-pink .ci-svg {
  filter: drop-shadow(0 0 4px rgba(236, 72, 153, .55)) drop-shadow(0 0 10px rgba(236, 72, 153, .3));
  animation: ciWave 2.6s ease-in-out infinite;
  transform-origin: 70% 70%;
}

.ci-indigo { color: #6366f1; }
.ci-indigo .ci-svg {
  filter: drop-shadow(0 0 4px rgba(99, 102, 241, .55)) drop-shadow(0 0 10px rgba(99, 102, 241, .3));
  animation: ciFloat 3.6s ease-in-out infinite;
}

.ci-teal { color: #14b8a6; }
.ci-teal .ci-svg {
  filter: drop-shadow(0 0 4px rgba(20, 184, 166, .55)) drop-shadow(0 0 10px rgba(20, 184, 166, .3));
  animation: ciSpin 22s linear infinite;
}

@keyframes ciPulse {
  0%, 100% { transform: scale(1);    opacity: 1;   }
  50%      { transform: scale(1.10); opacity: .92; }
}
@keyframes ciFloat {
  0%, 100% { transform: translateY(0)    rotate(0deg); }
  50%      { transform: translateY(-3px) rotate(2deg); }
}
@keyframes ciWave {
  0%, 100%      { transform: rotate(0deg); }
  15%, 45%, 75% { transform: rotate(14deg); }
  30%, 60%, 90% { transform: rotate(-8deg); }
}
@keyframes ciHeartbeat {
  0%, 100% { transform: scale(1);    }
  20%      { transform: scale(1.10); }
  40%      { transform: scale(.98);  }
  60%      { transform: scale(1.06); }
  80%      { transform: scale(.99);  }
}
@keyframes ciSpin {
  to { transform: rotate(360deg); }
}

/* Label & value */
.course-hero-info-body {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.course-hero-info-lbl {
  font-family: var(--font-fa);
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-soft);
  line-height: 1.3;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-hero-info-val {
  font-family: var(--font-fa);
  font-size: .86rem;
  font-weight: 900;
  color: rgba(var(--cr), 1);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   BODY
   ============================================================ */
.course-body-wrap {
  padding: 1rem 2rem 5rem;
  max-width: 1200px;
  margin-inline: auto;
  background: #ffffff;
}

.course-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 2rem;
  align-items: start;
}

.course-main {
  padding: 2rem 1.8rem;
  background: #ffffff;
  border: 1.5px solid rgba(var(--cr), .12);
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
  min-width: 0;
}

.course-section-title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-fa);
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--ink-900);
  margin: 0 0 1.1rem;
  padding-bottom: .75rem;
  border-bottom: 1.5px dashed rgba(var(--cr), .2);
}
.course-section-title:not(:first-child) { margin-top: 2rem; }
.course-section-title svg { color: var(--c1); flex-shrink: 0; }

.course-desc {
  font-family: var(--font-fa);
  font-size: .96rem;
  line-height: 2.15;
  color: #475569;
  font-weight: 500;
  margin: 0;
  text-align: justify;
}

/* ---------- Syllabus ---------- */
.course-topics { display: flex; flex-direction: column; gap: .55rem; }

.course-topic {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: .9rem;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: rgba(var(--cr), .04);
  border: 1.5px solid rgba(var(--cr), .12);
  transition: all .25s cubic-bezier(.4, 0, .2, 1);
}
.course-topic:hover {
  transform: translateX(-3px);
  background: rgba(var(--cr), .08);
  border-color: rgba(var(--cr), .4);
  box-shadow: 0 8px 20px rgba(var(--cr), .12);
}

.course-topic-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-family: var(--font-fa);
  font-size: .85rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 6px 14px rgba(var(--cr), .3);
  flex-shrink: 0;
}

.course-topic-title {
  font-family: var(--font-fa);
  font-size: .93rem;
  font-weight: 700;
  color: var(--ink-800);
  line-height: 1.6;
  min-width: 0;
}

.course-topic-sessions {
  font-family: var(--font-fa);
  font-size: .74rem;
  font-weight: 800;
  color: rgba(var(--cr), 1);
  padding: .25rem .7rem;
  border-radius: 100px;
  background: rgba(var(--cr), .1);
  border: 1px solid rgba(var(--cr), .2);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---------- Outcomes ---------- */
.course-outcomes-list-full {
  display: grid;
  gap: .55rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.course-outcomes-list-full li {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .8rem 1rem;
  border-radius: 12px;
  background: rgba(16, 185, 129, .04);
  border: 1px solid rgba(16, 185, 129, .15);
  font-family: var(--font-fa);
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink-800);
  transition: transform .22s, border-color .22s, background .22s;
}
.course-outcomes-list-full li:hover {
  transform: translateX(-3px);
  background: rgba(16, 185, 129, .08);
  border-color: rgba(16, 185, 129, .4);
}
.course-outcome-check {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  box-shadow: 0 4px 10px rgba(16, 185, 129, .3);
}

/* ============================================================
   BUY CARD
   ============================================================ */
.course-side {
  position: sticky;
  top: 110px;
  min-width: 0;
}

.course-buy-card {
  position: relative;
  padding: 1.6rem 1.4rem 1.5rem;
  border-radius: 22px;
  background: #ffffff;
  border: 1.5px solid rgba(var(--cr), .22);
  box-shadow:
    0 20px 50px rgba(var(--cr), .1),
    0 0 0 1px rgba(255, 255, 255, .6) inset;
  overflow: hidden;
  isolation: isolate;
  text-align: center;
}

/* Top gradient accent line */
.course-buy-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c1), var(--c2), var(--c1));
  background-size: 200% 100%;
  animation: courseBuyAccent 5s linear infinite;
  z-index: 4;
}
@keyframes courseBuyAccent {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* Price box */
.course-buy-price {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: 1rem 1rem;
  margin-bottom: 1.2rem;
  border-radius: 14px;
  background: rgba(var(--cr), .04);
  border: 1.5px solid rgba(var(--cr), .2);
  text-align: center;
}
.course-buy-price-label {
  font-family: var(--font-fa);
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-soft);
}
.course-buy-price-num {
  font-family: var(--font-fa);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -.01em;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: coursePriceShine 5s linear infinite;
}
@keyframes coursePriceShine { to { background-position: 200% center; } }

/* Buy button */
.course-buy-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: 1rem 1.4rem;
  border-radius: 14px;
  font-family: var(--font-fa);
  font-size: .98rem;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  background-size: 200% 200%;
  box-shadow:
    0 14px 30px rgba(var(--cr), .4),
    inset 0 1px 0 rgba(255, 255, 255, .25);
  position: relative;
  overflow: hidden;
  transition: transform .3s cubic-bezier(.4, 0, .2, 1), box-shadow .3s;
  animation: courseBuyBtnGradient 4s ease infinite;
}
@keyframes courseBuyBtnGradient {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.course-buy-btn::before {
  content: '';
  position: absolute;
  top: 0; left: -110%;
  width: 55%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-20deg);
  animation: courseBuyShine 3.2s ease-in-out infinite;
}
@keyframes courseBuyShine {
  0%        { left: -110%; }
  55%, 100% { left: 160%; }
}
.course-buy-btn svg { position: relative; z-index: 1; transition: transform .3s; }
.course-buy-btn span { position: relative; z-index: 1; }
.course-buy-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 20px 40px rgba(var(--cr), .55),
    0 0 30px rgba(var(--cr), .3),
    inset 0 1px 0 rgba(255, 255, 255, .35);
}
.course-buy-btn:hover svg { transform: translateX(-4px); }

/* Support link */
.course-support-btn {
  display: block;
  margin-top: .9rem;
  padding: .75rem 1rem;
  text-align: center;
  border-radius: 12px;
  font-family: var(--font-fa);
  font-size: .82rem;
  font-weight: 700;
  color: var(--text-soft);
  text-decoration: none;
  background: rgba(15, 23, 42, .03);
  border: 1.5px dashed rgba(15, 23, 42, .12);
  transition: all .25s;
}
.course-support-btn:hover {
  color: var(--blue-700);
  background: rgba(59, 130, 246, .06);
  border-color: rgba(59, 130, 246, .35);
}

/* ============================================================
   ✅ INSTRUCTORS — under buy button
   ============================================================ */
.course-buy-instructors {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1.5px dashed rgba(var(--cr), .2);
  text-align: right;
}

.course-buy-instructors-head {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-fa);
  font-size: .8rem;
  font-weight: 800;
  color: var(--text-soft);
  margin-bottom: .8rem;
  padding-inline-start: .15rem;
}

.course-buy-instructors-head svg {
  color: var(--c1);
  flex-shrink: 0;
}

.course-buy-instructors-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.course-buy-instructor {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .65rem;
  border-radius: 12px;
  background: rgba(var(--cr), .04);
  border: 1px solid rgba(var(--cr), .12);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1),
              border-color .25s,
              background .25s;
}

.course-buy-instructor:hover {
  transform: translateX(-3px);
  background: rgba(var(--cr), .08);
  border-color: rgba(var(--cr), .35);
}

.course-buy-instructor-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: var(--font-fa);
  font-size: .95rem;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2));
  box-shadow: 0 4px 10px rgba(var(--cr), .25);
  position: relative;
}

.course-buy-instructor-avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .75);
  pointer-events: none;
}

.course-buy-instructor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* Avatar fallback colors (when no photo) */
.course-buy-instructor-avatar-blue   { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.course-buy-instructor-avatar-violet { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.course-buy-instructor-avatar-cyan   { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.course-buy-instructor-avatar-pink   { background: linear-gradient(135deg, #ec4899, #be185d); }
.course-buy-instructor-avatar-amber  { background: linear-gradient(135deg, #f59e0b, #d97706); }
.course-buy-instructor-avatar-green  { background: linear-gradient(135deg, #10b981, #059669); }

.course-buy-instructor-name {
  font-family: var(--font-fa);
  font-size: .86rem;
  font-weight: 800;
  color: var(--ink-800);
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .course-hero-info { grid-template-columns: repeat(2, 1fr); }
  .course-body-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .course-side      { position: static; }
}

@media (max-width: 640px) {
  .course-hero { padding: 3rem 1rem 2.5rem; }
  .course-hero-title { font-size: 1.7rem; }
  .course-hero-sub   { font-size: .92rem; line-height: 1.95; margin-bottom: 1.8rem; }

  .course-hero-info {
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
    padding-top: 1.2rem;
  }
  .course-hero-info-item {
    padding: .7rem .7rem;
    gap: .55rem;
    border-radius: 12px;
  }
  .course-hero-info-icon { width: 30px; height: 30px; }
  .ci-svg                { width: 24px; height: 24px; }
  .course-hero-info-lbl  { font-size: .6rem; }
  .course-hero-info-val  { font-size: .76rem; }

  .course-body-wrap { padding: .5rem 1rem 3rem; }
  .course-main {
    padding: 1.4rem 1.2rem;
    border-radius: 18px;
  }
  .course-section-title { font-size: 1rem; margin-bottom: .9rem; }
  .course-desc          { font-size: .88rem; line-height: 2; }
  .course-topic {
    grid-template-columns: 34px 1fr auto;
    gap: .7rem;
    padding: .7rem .85rem;
  }
  .course-topic-num     { width: 30px; height: 30px; border-radius: 9px; font-size: .78rem; }
  .course-topic-title   { font-size: .85rem; }
  .course-topic-sessions { font-size: .68rem; padding: .2rem .55rem; }
  .course-outcomes-list-full li { padding: .7rem .85rem; font-size: .84rem; }

  .course-buy-card { padding: 1.3rem 1.2rem 1.3rem; border-radius: 18px; }
  .course-buy-price-num { font-size: 1.2rem; }
  .course-buy-btn       { padding: .9rem 1.2rem; font-size: .92rem; }

  .course-buy-instructor { padding: .45rem .55rem; gap: .55rem; }
  .course-buy-instructor-avatar { width: 32px; height: 32px; font-size: .85rem; }
  .course-buy-instructor-name   { font-size: .82rem; }
}

@media (max-width: 400px) {
  .course-hero-info { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .ci-svg,
  .course-buy-btn,
  .course-buy-card::before,
  .course-buy-btn::before { animation: none !important; }
}