/* ==========================================================================
   Upskill Cad – inner page components
   Shared by every page except the home sections in style.css.
   Section spacing is set per section with custom properties:
     --pt / --pb  top & bottom padding (percent of width, like the reference)
     --gap        space between the section's direct children
   ========================================================================== */

/* ---------- Sections ---------- */
.section {
  display: flex;
  flex-direction: column;
  gap: var(--gap, 40px);
  padding: var(--pt, 6%) var(--gutter) var(--pb, 6%);
}
.section--light { background: var(--light); }
.section--clip { overflow: hidden; }
.section--start { align-items: flex-start; }
.section--article { padding-inline: 12%; }

/* ---------- Typography helpers ---------- */
.h-xl { font-size: 4.8rem; font-weight: 800; line-height: 1.3; }
.h-lg { font-size: 4rem; font-weight: 800; line-height: 1.3; }
.h-lg--loose { line-height: 1.4; }
.h-md { font-size: 2.4rem; font-weight: 800; line-height: 1.4; }
.h-sm { font-size: 2rem; font-weight: 800; line-height: 1.4; }
.h-xs { font-size: 1.6rem; font-weight: 700; line-height: 1.4; }
.h-xs--heavy { font-weight: 800; }
.text { font-size: 1.6rem; font-weight: 500; line-height: 1.4; }
.text-center { text-align: center; }
.c-primary { color: var(--primary); }
.c-navy { color: var(--navy); }

.stack { display: flex; flex-direction: column; gap: var(--stack-gap, 10px); }
.stack--0 { --stack-gap: 0px; }
.stack--8 { --stack-gap: 8px; }
.stack--20 { --stack-gap: 20px; }

/* ---------- Page hero ---------- */
.page-hero { --pt: 0px; --pb: 3%; overflow: hidden; }

.page-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}
.page-title { font-size: 4.8rem; font-weight: 800; line-height: 1.3; color: var(--secondary); }
.page-lead { max-width: 70%; font-size: 1.6rem; font-weight: 500; line-height: 1.4; }
.page-lead--narrow { max-width: 62%; }
.page-lead--wide { max-width: 90%; }
.page-lead--full { max-width: none; }
.page-lead--bold { font-weight: 700; }

/* ---------- Banner slider ---------- */
.banner-slider {
  position: relative;
  height: 450px;
  border-radius: 24px;
  overflow: hidden;
  background: var(--light);
}
.banner-slider .slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity var(--speed, 1000ms) ease;
}
.banner-slider .slide.is-active { opacity: 1; }
.banner-slider .slide:only-child { opacity: 1; }
.banner-slider img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Sliding variant (used where the reference slides instead of fading) */
.banner-slider[data-effect="slide"] .slides {
  display: flex;
  height: 100%;
  transition: transform var(--speed, 500ms) ease;
}
.banner-slider[data-effect="slide"] .slide {
  position: relative;
  flex: 0 0 100%;
  opacity: 1;
}

/* ---------- Event info bar (resource person / venue / date) ---------- */
.info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 30px var(--info-inset, 0px) 0;
}
.info-bar--inset { --info-inset: 10px; }
.info-item {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--primary);
}
.info-item:nth-child(2) { justify-content: center; }
.info-item:last-child { justify-content: flex-end; }
.info-item img { flex: none; width: 24px; height: 24px; object-fit: contain; }

/* Compact chip version (Art of Spine Surgery) */
.meta-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(655px, 100%);
  padding: 8px 16px;
  border-radius: 16px;
  background: var(--light);
}
.meta-chip .info-item { flex: 0 1 auto; }

/* ---------- Event / blog card grid ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.event-card { overflow: hidden; }
.event-card .program-meta { grid-template-columns: 69% 1fr; }
.event-card .program-body {
  height: auto;
  justify-content: flex-start;
  gap: 10px;
}
.event-card .program-faculty { margin-top: 30px; }
.event-card .btn-outline { margin-top: 4px; }

.blog-card .blog-media {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: 230px;
  padding: 20px 12px 12px;
  border-radius: 12px;
  overflow: hidden;
  background: url("../assets/img/blog-1.png") center / cover no-repeat;
}
.blog-card .blog-media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, #ffffff 0%, #040404 100%);
  opacity: 0.7;
}
.blog-card .chip { border-radius: 24px; }
.blog-date {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1;
  color: var(--primary);
}
.blog-date img { width: 22px; height: 24px; object-fit: contain; }
.blog-card .program-body { height: auto; justify-content: flex-start; gap: 10px; }
.blog-card .program-body p { font-size: 1.6rem; font-weight: 500; line-height: 1.4; }
.blog-card .btn-outline { margin-top: 15px; }

/* Frosted label */
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 24px;
  border-radius: 40px;
  background: rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(80px);
  backdrop-filter: blur(80px);
  font-size: 1.4rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--light);
}

/* ---------- Split rows: media + text side by side ----------
   Column proportions come from --m / --t (flex-grow of each side). */
.split {
  display: flex;
  align-items: var(--align, center);
  gap: 40px;
}
.split > * { min-width: 0; }
.split__media { flex: var(--m, 1) 1 0; }
.split__body { flex: var(--t, 1) 1 0; }
.split--stretch { --align: stretch; }
.split--narrow { width: 90%; }
.split--end { margin-left: auto; }
.split__media img {
  display: block;
  width: 100%;
  height: var(--h, 320px);
  object-fit: cover;
  border-radius: var(--r, 12px);
}
.split__bg {
  min-height: var(--h, 360px);
  border-radius: 24px;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

/* Article sub-points: bold label + paragraph */
.point { display: flex; flex-direction: column; }
.point--8 { gap: 8px; }

/* ---------- About: overlapping image pairs ---------- */
.media-stack { position: relative; }
.media-stack .stack-main {
  display: block;
  width: 100%;
  max-width: 472px;
  height: auto;
  border-radius: 12px;
}
.media-stack .stack-float {
  position: absolute;
  z-index: 2;
  display: block;
  width: 31.5%;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}
.media-stack--mission .stack-float { left: 67.7%; top: 28%; aspect-ratio: 191 / 143; }
.media-stack--vision .stack-main { max-width: none; }
.media-stack--vision .stack-float {
  left: 40%;
  top: 22%;
  width: 53%;
  border: 3px solid #fff;
}

/* ---------- About: why-it-matters cards ---------- */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.why-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 44px 24px;
  border-radius: 40px;
  background: var(--light);
}
.why-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  margin-bottom: 40px;
  padding: 12px 14px;
  border-radius: 400px;
  background: #fff;
  overflow: hidden;
}
.why-icon img { width: 34px; height: 38px; object-fit: contain; }

/* ---------- Course highlights ---------- */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--hl-gap, 30px 20px);
  width: 100%;
}
.highlight-grid--wide { --hl-gap: 40px; }
.highlight {
  display: flex;
  gap: 10px;
  padding: var(--hl-pad, 0px) 0;
}
.highlight-grid--wide .highlight { --hl-pad: 16px; }
.highlight img { flex: none; width: 26px; height: 28px; object-fit: contain; }
.highlight-grid--wide .highlight img { width: 29px; height: 30px; }
.highlight h3,
.highlight p { font-size: 1.6rem; font-weight: 500; line-height: 1.4; }
.highlight > div { display: flex; flex-direction: column; gap: 2px; }

/* ---------- Gallery ---------- */
.gallery { display: flex; flex-direction: column; gap: 15px; padding-inline: 4px; }
.gallery-row { display: flex; gap: 15px; }
.gallery-row figure {
  flex: var(--w, 1) 1 0;
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
}
.gallery-row a {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}
.gallery-row img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #f5f5f5;
  border-radius: 12px;
  transition: transform 0.6s ease;
}
.gallery-row figure:hover img { transform: scale(1.04); }

/* ---------- Data table ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th,
.data-table td {
  padding: 16px;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: left;
  vertical-align: top;
}
.data-table th { color: var(--primary); }
.data-table td { color: var(--secondary); }
.data-table--white td { background: #fff; }
.table-scroll { width: 100%; overflow-x: auto; }

/* ---------- Bullet list with the reference's bullet icon ---------- */
.icon-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.icon-list li {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-bottom: 8px;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.4;
}
.icon-list li::before {
  content: "";
  flex: none;
  width: 12.5px;
  height: 12px;
  background: url("../assets/icons/list-bullet.svg") center / contain no-repeat;
}
.icon-list strong { font-weight: 800; }

.dot-list { margin: 0; padding-left: 20px; font-size: 1.6rem; font-weight: 500; line-height: 1.4; }
.steps { margin: 0; padding-left: 27px; }
.steps li { margin-bottom: 46px; font-size: 1.6rem; font-weight: 500; line-height: 24px; color: #333; }
.steps li:last-child { margin-bottom: 0; }
.steps strong { font-weight: 800; color: var(--secondary); }

/* ---------- FAQ accordion ---------- */
.faq-box {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: var(--faq-pad, 40px 30px);
  border-radius: 40px;
  box-shadow: 1px 1px 24px rgba(0, 0, 0, 0.12);
}
.faq-box--tight { --faq-pad: 30px; }
.faq-box .section-title { text-align: center; }

.faq-item {
  margin-bottom: 20px;
  border: 0.8px solid #e6e6e6;
  border-radius: 16px;
}
.faq-item:last-child { margin-bottom: 0; }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.4;
  color: #1f2124;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg { flex: none; width: 14px; height: 16px; }
.faq-item .i-minus { display: none; }
.faq-item[open] .i-plus { display: none; }
.faq-item[open] .i-minus { display: block; }
.faq-answer {
  overflow: hidden;
  padding: 0 16px 16px;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--secondary);
}

/* ---------- Tabs ---------- */
.tabs { display: flex; flex-direction: column; gap: 40px; }
.tabs-head { display: flex; flex-wrap: wrap; gap: 20px; }
.tab-btn {
  padding: 15px 30px;
  border: 0.8px solid var(--primary);
  border-radius: 40px;
  background: #fff;
  font-family: inherit;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--secondary);
  cursor: pointer;
  transition: background 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.tab-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab-btn[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tab-panel[hidden] { display: none; }
.tab-panel.is-entering { animation: fadeIn 0.4s ease; }

/* Underline variant (Redefining Surgical Mastery) */
.tabs--underline { gap: 54px; }
.tabs--underline .tabs-head { flex-wrap: nowrap; justify-content: space-between; gap: 40px; }
.tabs--underline .tab-btn {
  flex: 0 1 21.3%;
  padding: 20px;
  border: 0;
  border-bottom: 2.4px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--secondary);
  text-align: center;
}
.tabs--underline .tab-btn:hover { background: transparent; color: var(--secondary); border-bottom: 3px solid var(--primary); }
.tabs--underline .tab-btn[aria-selected="true"] { background: transparent; color: var(--secondary); border-bottom-color: var(--primary); }

/* Single pill tab (MISS Adoption Ladder) */
.tabs--solo .tab-btn:hover { box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.2); }

/* Panel rows inside the long tab articles */
.pillar-row { padding: 25px 0 50px; }
.pillar-row--flat { padding-top: 0; }

/* ---------- Testimonials ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.testimonial {
  display: flex;
  flex-direction: column;
  padding: 40px;
  border-radius: 40px;
  background: #fff;
}
.testimonial blockquote {
  min-height: 170px;
  margin: 0;
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.4;
}
.testimonial-person { display: flex; align-items: center; gap: 7px; }
.testimonial-person img {
  flex: none;
  width: 60px;
  height: 60px;
  border-radius: 400px;
  object-fit: cover;
}
.testimonial-person h4 { font-size: 2.2rem; font-weight: 500; line-height: 1; }
.testimonial-person span { font-size: 1.4rem; font-weight: 500; line-height: 1.4; }
.testimonial-person > div { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Subscribe split (Past Events) ---------- */
.subscribe-split { flex-direction: row; gap: 40px; }
.subscribe-split .split__body { flex: 587 1 0; }
.subscribe-split .split__media { flex: 627 1 0; }
.subscribe-split h2 { line-height: 1.2; margin-bottom: 18px; }
.subscribe-split .subscribe-form input { flex-basis: 60%; border-radius: 40px; }
.subscribe-split .split__media img { height: 338px; border-radius: 20px; }

/* ---------- Contact ---------- */
.contact-banner {
  min-height: 450px;
  border-radius: 24px;
  background: url("../assets/img/contact-banner.jpg") center / cover no-repeat;
}
.contact-grid { flex-direction: row; justify-content: space-between; align-items: flex-start; }
.contact-grid > * { flex: 1 1 0; min-width: 0; }

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 20px;
  margin-top: 24px;
}
.contact-form .field { display: flex; flex-direction: column; gap: 10px; }
.contact-form .field--full { grid-column: 1 / -1; }
.contact-form label { font-size: 1.6rem; font-weight: 700; line-height: 1.4; color: rgba(0, 0, 0, 0.85); }
.contact-form label span { color: #d63637; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: #f7f7f7;
  font-family: inherit;
  font-size: 1.6rem;
  color: var(--secondary);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form textarea { height: 120px; padding: 12px 16px; resize: vertical; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #8a8a8a; opacity: 1; }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.contact-form [aria-invalid="true"] { border-color: #d63637; box-shadow: 0 0 0 1px #d63637; }
.contact-form .btn-submit { justify-self: start; height: auto; padding: 10px 34px 12px; }
.contact-form .form-message { grid-column: 1 / -1; }

.contact-info { display: flex; flex-direction: column; gap: 30px; }
.contact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 48px;
  padding: 12px;
  border-radius: 16px;
  background: #fff;
}
.contact-card .icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-height: 46px;
  padding: 12px;
  border-radius: 16px;
  background: var(--light);
}
.contact-card .icon-box img { width: 22px; height: auto; max-height: 27px; }
.contact-detail { padding-left: 80px; font-size: 1.6rem; font-weight: 500; line-height: 1.4; }
.contact-detail a { text-decoration: none; }
.contact-detail a:hover { text-decoration: underline; }

/* ---------- Blog feature ---------- */
.blog-feature {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  min-height: 450px;
  padding: 40px;
  border-radius: 24px;
  overflow: hidden;
  background: url("../assets/img/blog-1.png") center / cover no-repeat;
  color: var(--light);
}
.blog-feature::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #ffffff 0%, #040404 100%);
  opacity: 0.7;
}
.blog-feature > * { position: relative; }
.blog-feature-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
}
.blog-feature-foot h2 { font-size: 4rem; font-weight: 800; line-height: 1.3; }
.blog-feature-foot p { font-size: 1.6rem; font-weight: 500; line-height: 1.4; }

/* ---------- MISS Adoption Ladder ---------- */
.pbl-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  min-height: 450px;
  padding: 4% 2%;
  border-radius: 24px;
  background: #fdf7f2;
}
.pbl-box img { display: block; width: 100%; max-width: 722px; height: auto; margin: 0 auto; }

/* ---------- Deformity continuum ---------- */
.roadmap-image {
  display: block;
  width: 80%;
  height: 450px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 24px;
}

/* ---------- Art of Spine Surgery ---------- */
.resource-person { display: flex; flex-direction: column; gap: 15px; }
.resource-person .person { display: flex; align-items: flex-start; gap: 12px; }
.resource-person .avatar {
  flex: none;
  width: 50px;
  min-height: 56px;
  border-radius: 600px;
  background: var(--light);
}
.resource-person .avatar img { display: block; width: 50px; height: 50px; }
.resource-person h4 { font-size: 1.6rem; font-weight: 700; line-height: 1.4; }
.resource-person .role { font-size: 1.4rem; font-weight: 500; line-height: 1.4; }
.btn-download {
  display: block;
  width: 100%;
  padding: 8px 24px;
  border: 0.8px solid var(--primary);
  border-radius: 40px;
  background: var(--light);
  font-size: 1.6rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--primary);
  text-align: center;
  text-decoration: none;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.4s;
}
.btn-download:hover,
.btn-download:focus-visible { background: var(--primary); color: #fff; }

/* ---------- Empty page ---------- */
.empty-page { min-height: 314px; }

/* ---------- Extra entrance animation used on inner pages ---------- */
.fadeInLeft { animation-name: fadeInLeft; }
@keyframes fadeInLeft {
  from { opacity: 0; transform: translate3d(-100%, 0, 0); }
  to { opacity: 1; transform: none; }
}

/* ==========================================================================
   Tablet (≤ 1024px)
   ========================================================================== */
@media (max-width: 1024px) {
  .section { padding-inline: 4%; }
  .section--article { padding-inline: 6%; }

  .page-title { font-size: 4.5rem; }
  .h-xl { font-size: 4.5rem; }
  .page-lead,
  .page-lead--narrow { max-width: 90%; }

  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .highlight-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }

  .info-bar { flex-wrap: wrap; justify-content: flex-start; }
  .info-item,
  .info-item:nth-child(2),
  .info-item:last-child { justify-content: flex-start; }

  .split--narrow { width: 100%; }
  .tabs--underline .tabs-head { flex-wrap: wrap; justify-content: flex-start; gap: 10px 20px; }
  .tabs--underline .tab-btn { flex: 1 1 40%; }
}

/* ==========================================================================
   Mobile (≤ 767px)
   ========================================================================== */
@media (max-width: 767px) {
  .page-title,
  .h-xl { font-size: 4.2rem; }
  .h-lg { font-size: 3.2rem; }
  .page-lead,
  .page-lead--narrow,
  .page-lead--wide { max-width: none; }

  .banner-slider,
  .contact-banner,
  .blog-feature { min-height: 0; height: 260px; }
  .blog-feature { height: auto; min-height: 360px; padding: 24px; }
  .blog-feature-foot { flex-direction: column; align-items: flex-start; }
  .blog-feature-foot h2 { font-size: 3rem; }

  .card-grid,
  .why-grid,
  .highlight-grid,
  .testimonial-grid { grid-template-columns: 1fr; }

  .split,
  .contact-grid,
  .subscribe-split { flex-direction: column; align-items: stretch; }
  .split > *,
  .subscribe-split > * { flex: none; width: 100%; }
  .split__media img { height: auto; aspect-ratio: 16 / 10; }
  .split__bg { min-height: 260px; }

  .media-stack--mission .stack-main { max-width: 78%; }

  .gallery-row { flex-wrap: wrap; }
  .gallery-row figure { flex: 1 1 100%; height: 220px; }

  .contact-form { grid-template-columns: 1fr; }
  .contact-detail { padding-left: 0; }

  .meta-chip { flex-direction: column; align-items: flex-start; gap: 8px; }
  .roadmap-image { width: 100%; height: auto; }
  .tabs--underline .tab-btn { flex: 1 1 100%; text-align: left; }
  .faq-box { padding: 30px 16px; }
}
