/* ==========================================================================
   CU Medicine Subpage: Research & Innovation (research.css)
   ========================================================================== */
:root {
  --res-orange-dark: #c43818;
  --res-orange-mid: #dc4b26;
  --res-orange-light: #f27046;
}

.desktopHide {
	display:none !important;
}


.shared-bg2-wrapper {
  position: relative;
  overflow: hidden;
}

.parallax-bg2-layer {
  position: absolute;
  top: 10%;
  left: 0;
  width: 100%;
  height: 124%;
  background-image: url("../images/RnI_bg.jpg");
  background-position: top center;
  background-size: auto;
  background-repeat: no-repeat;
  will-change: transform;
  pointer-events: none;
  z-index: 0;
}

.shared-bg2-wrapper > section {
  position: relative;
  z-index: 1;
}

/* --- 1. Subpage Hero Banner --- */
.hero-banner {
  position: relative;
}

.sub-hero__visual {
  position: relative;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

.hero-banner-img {
  width: 100%;
  height: auto;
  display: block;
}

.sub-hero__overlay-box {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 48%;
  display: flex;
  align-items: center;
  padding-left: 16%;
  background: transparent;
  pointer-events: none;
}

.sub-hero__title {
  font-family: var(--font-primary1);
  padding-top: 50px;
  font-size: 48px;
  font-weight: 600;
  font-style: italic;
  line-height: 1.25;
  color: #ffffff;
  margin: 0;
  text-shadow: 0 2px 12px rgba(120, 28, 10, 0.3);
  animation: heroTitleFadeIn 1.25s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

@keyframes heroTitleFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1024px) {
  .sub-hero__overlay-box {
    padding-left: 8%;
  }
  .sub-hero__title {
    font-size: 32px;
  }
}

/* --- 2. 導言文字與多層科研核心數據 --- */
.section-res-intro {
  position: relative;
  padding: 40px 0 56px;
  background-image: url("../images/RnI_stats_bg_curve.png");
  background-repeat: no-repeat;
  background-position: center 220px;
  background-size: 100% auto;
}

.res-intro-text {
  margin: 0 auto 56px;
  font-size: 16px;
  line-height: 1.4;
  color: #000;
  font-weight: 100;
}

.res-intro-text p {
  margin-bottom: 16px;
}

.res-stats-showcase {
  display: flex;
  flex-direction: column;
  gap: 52px;
  max-width: 860px;
  margin: 0 auto;
}

.res-stats-row {
  display: grid;
  align-items: center;
  justify-items: center;
  gap: 28px 36px;
}

.res-stats-row--row1 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.res-stats-row--row2 {
  grid-template-columns: 1fr 1.65fr;
  width: 100%;
}

.res-stats-row--row3 {
  grid-template-columns: 1fr 1.65fr 1fr;
  width: 100%;
}

.res-stats-row--row4 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.res-stat-chart {
  width: 110px;
  margin-bottom: 5px;
}

.res-stat-num .currency-unit {
  font-size: 36px;
  font-weight: 700;
  margin-right: 3px;
}

.res-stat-num .num-unit {
  font-size: 36px;
  margin-left: 2px;
}

/* 排法 A：1:1:1 */
.res-stat-item--side {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.res-stat-item--side .res-stat-icon {
  height: 40px;
  width: auto;
  object-fit: contain;
  margin: 0;
  flex-shrink: 0;
  margin-top: -40px;
}

.res-stat-item--side .res-stat-num {
  font-size: 70px;
  font-weight: 700;
  font-style: italic;
  color: var(--res-orange-dark);
  line-height: 0.95;
  margin: 0;
  white-space: nowrap;
}

.res-stat-item--side .res-stat-desc {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  color: #4a4a4a;
  text-align: left;
  margin: 0;
}

/* 排法 B：1:1 br 1 */
.res-stat-item--inline {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 4px;
  align-items: center;
  justify-content: center;
  text-align: left;
}

.res-stat-item--inline .res-stat-icon {
  grid-column: 1;
  grid-row: 1;
  height: 40px;
  width: auto;
  object-fit: contain;
  margin: 0;
  margin-top: -40px;
}

.res-stat-item--inline .res-stat-num {
  grid-column: 2;
  grid-row: 1;
  font-size: 70px;
  font-weight: 700;
  font-style: italic;
  color: var(--res-orange-dark);
  line-height: 0.95;
  margin: 0;
}

.res-stat-item--inline .res-stat-desc {
  grid-column: 1 / -1;
  grid-row: 2;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: #4a4a4a;
  text-align: center;
  margin-top: 2px;
}

/* 3 個圓形百分比徽章 */
.res-circle-badges {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
}

.res-circle-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.circle-label {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: #4a4a4a;
}

.res-footnote {
  max-width: 820px;
  margin: 36px auto 0;
  text-align: right;
  font-size: 11.5px;
  color: #000;
}

/* --- 3. Major Awards and Honours Received in 2025 (7 張破格交錯卡片) --- */
.section-highlights {
  padding: 20px 0 64px;
}

.orange-pill-header {
  margin: 0 auto 56px;
  padding: 11px 32px;
  font-size: 34px;
  font-weight: 600;
  font-style: italic;
  text-align: center;
  color: #ffffff;
  background: linear-gradient(
    90deg,
    rgba(210, 76, 21, 0) 0%,
    rgba(210, 76, 21, 0.95) 22%,
    rgba(210, 76, 21, 0.95) 78%,
    rgba(210, 76, 21, 0) 100%
  );
}

.highlights-stack {
  display: flex;
  flex-direction: column;
  gap: 36px;
  margin: 0 auto;
}

.highlight-card {
  position: relative;
  display: grid;
  grid-template-columns: 0.15fr 1.85fr 1fr;
  align-items: start;
  min-height: 225px;
  padding: 0;
}

.highlight-card--reverse {
  grid-template-columns: 1fr 0.15fr 1.85fr;
}

.highlight-card--reverse.f2 {
  grid-template-columns: 1.45fr 0.15fr 1.85fr;
}

.highlight-card.f3 {
  grid-template-columns: 0.15fr 1.85fr 1.1fr;
}	

.highlight-card.f5 {
  grid-template-columns: 0.15fr 1.85fr 1.35fr;
}	

.highlight-card.f7 {
  grid-template-columns: 0.15fr 1.85fr 1.35fr;
}	

.highlight-card__content {
  padding: 22px 0px;
  z-index: 1;
}

.highlight-card--reverse .highlight-card__content {
  padding: 22px 20px 22px 10px;
}

.highlight-card__title {
  font-size: 25px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
}

.highlight-card__text {
  font-size: 16px;
  line-height: 1.25;
  margin: 0;
  font-weight: 100;
}

.highlight-card__media {
  position: relative;
  z-index: 2;
}

.highlight-card__media img {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

/* 淺藍漸變色帶 */
.highlight-card--blue {
  background: url(../images/RnI_content_bg1.png) repeat-y;
  color: #1f2d3d;
}

.highlight-card--blue .highlight-card__title {
  color: #ffffff;
  font-size: 25px;
}

/* 暖橙紅漸變色帶 */
.highlight-card--orange {
  background: url(../images/RnI_content_bg2.png) repeat-y right top;
  color: #ffffff;
}

.highlight-card--orange .highlight-card__title {
  color: #ffffff;
}

/* --- 4. 專題故事區塊 (01 - 08 共用樣式) --- */
.story-section {
  padding: 46px 0 60px;
}

.story-container {
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.RnI-figure--full img {	
  margin: auto;
}

.RnI-figure--full {	
  margin: 20px 0;
}

.story-photo-center img {
  margin: 0 auto;
}

.story-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  gap: 10px;
  margin-bottom: 24px;
}

.story-badge--orange {
  display: inline-flex;
  align-items: flex-end;
  background: none !important;
  min-width: auto;
  height: 42px;
  padding: 0 35px 2px 0;
  margin: 0;
  font-family: var(--font-primary1);
  font-size: 52px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
  color: #c2c6ca;
  position: relative;
  flex-shrink: 0;
}

.gray-stories-wrapper .story-badge--orange {
  color: #ffffff;
}

.story-badge--orange::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 7px;
  width: 18px;
  height: 69px;
  background-image: url("../images/Title_bullet1.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: bottom center;
}

.story-title--orange {
  font-family: var(--font-primary1);
  font-size: 32px;
  font-weight: 700;
  font-style: italic;
  line-height: 1.25;
  color: var(--res-orange-dark);
  text-align: left;
  margin: 0;
}

.story-body {
  margin-top: 20px;
  line-height: 1.5;
  font-weight: 100;
}

.btnInside {
  background-color: #40798c;
  border-radius: 20px;
  display: inline-block;
  padding: 2px 20px;
  font-size: 14px;
  margin-top: 20px;
  color: #fff;
}

/* --- 6. Section 06 - 08: 連續淺灰背景大區塊 --- */
.gray-stories-wrapper {
  background-color: #d1d6da;
  padding: 20px 0 40px;
  margin-top: 24px;
}

.story-section--in-gray {
  padding: 48px 0;
}

.story-body p {
  margin-bottom: 15px;
}

/* ==========================================================================
   核心科研數據：逐個項目交錯浮現動畫 (Staggered Reveal)
   ========================================================================== */
.res-stats-row .res-stat-item:nth-child(1) { transition-delay: 0s; }
.res-stats-row .res-stat-item:nth-child(2) { transition-delay: 0.15s; }
.res-stats-row .res-stat-item:nth-child(3) { transition-delay: 0.3s; }

.res-circle-badges .res-circle-badge:nth-child(1) { transition-delay: 0.15s; }
.res-circle-badges .res-circle-badge:nth-child(2) { transition-delay: 0.28s; }
.res-circle-badges .res-circle-badge:nth-child(3) { transition-delay: 0.41s; }

/* ==========================================================================
   響應式斷點 (Mobile RWD <= 767px - 精準還原 CUMED_FI25_web_mobile-3.jpg)
   ========================================================================== */
@media (max-width: 767px) {
	
	.mobileHide	 {
		display:none !important;
	}
	.desktopHide {
		display:block !important;
	}
	
	.ani-container {
		margin-left:-15px;
		margin-right:-15px;
	}
	
  /* 1. Subpage Hero Banner */
  .sub-hero__overlay-box {
    width: 65%;
    padding-left: 20px;
	display:none;
  }
  .sub-hero__title {
    font-size: 23px;
    padding-top: 20px;
    line-height: 1.22;
  }

  /* 2. 導言文字 + 4 層核心科研數據 (保持設計稿兩欄/三欄並排比例) */
  .section-res-intro {
    padding: 24px 0 36px;
    background-position: center 180px;
  }
  .res-intro-text {
    font-size: 14.5px;
    line-height: 1.48;
    margin-bottom: 32px;
  }
  .res-stats-showcase {
    gap: 26px;
  }
  .res-stats-row {
    gap: 16px 10px;
  }

  /* Row 1 & Row 4: 保持 2 欄並排 */
  .res-stats-row--row1,
  .res-stats-row--row4 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Row 2: 178 在上排置中，3 個圓環徽章在下排三欄並排 */
  .res-stats-row--row2 {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  /* Row 3: 保持 3 欄並排 (435 | HKD 180M | 407) */
  .res-stats-row--row3 {
    grid-template-columns: 0.85fr 1.3fr 0.85fr;
    gap: 8px;
  }

  /* 數據文字與圖標縮小比例 */
  .res-stat-item--side {
    gap: 5px;
  }
  .res-stat-item--side .res-stat-icon {
    height: 22px;
    margin-top: -18px;
  }
  .res-stat-item--side .res-stat-num {
    font-size: 32px;
  }
  .res-stat-item--side .res-stat-desc {
    font-size: 10.5px;
    line-height: 1.2;
  }

  .res-stat-item--inline {
    column-gap: 4px;
    row-gap: 2px;
  }
  .res-stat-item--inline .res-stat-icon {
    height: 20px;
    margin-top: -16px;
  }
  .res-stat-item--inline .res-stat-num {
    font-size: 28px;
    white-space: nowrap;
  }
  .res-stat-num .currency-unit {
    font-size: 15px;
    margin-right: 1px;
  }
  .res-stat-item--inline .res-stat-desc {
    font-size: 10px;
    line-height: 1.2;
  }

  /* 3 個圓形圖表徽章保持三欄並排 */
  .res-circle-badges {
    width: 100%;
    justify-content: space-around;
    gap: 8px;
  }
  .res-stat-chart {
    width: 66px;
  }
  .circle-label {
    font-size: 10px;
    line-height: 1.2;
  }

  .res-footnote {
    margin-top: 20px;
    font-size: 10.5px;
  }

  /* 3. Major Awards & Honours (7 張交錯卡片：保留左右並排構圖) */
  .section-highlights {
    padding: 12px 0 40px;
  }
  .orange-pill-header {
    font-size: 19px;
    padding: 8px 14px;
    margin-bottom: 28px;
  }
  .highlights-stack {
    gap: 0px;
  }
  .highlight-card,
  .highlight-card.f3,
  .highlight-card.f5,
  .highlight-card.f7 {
    grid-template-columns: 28px 1fr;
    min-height: auto;
    margin: 0 -15px;
    padding: 0 12px;
    align-items: start;
	margin-bottom:25px;
  }
  .highlight-card--reverse,
  .highlight-card--reverse.f2 {
    grid-template-columns: 28px 1fr;
    min-height: auto;
    margin: 0 -15px;
    padding: 0 12px;
    align-items: start;
	margin-bottom:25px;	
  }
  .highlight-card__num {
    width: 24px;
    margin-top: 12px;
  }
  .highlight-card__content {
    padding: 12px 8px 14px 4px;
  }
  .highlight-card--reverse .highlight-card__content {
    padding: 12px 4px 14px 8px;
  }
  .highlight-card__title,
  .highlight-card--blue .highlight-card__title {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 5px;
  }
  .highlight-card__text {
    font-size: 16px;
    line-height: 1.4;
  }
  .highlight-card__media {
    margin-top: 10px;
	display:none;
  }
  .btnInside {
    font-size: 11px;
    padding: 2px 14px;
    margin-top: 10px;
  }

  /* 4. 專題故事區塊 (01 - 08) */
  .story-section {
    padding: 28px 0 36px;
  }
  .story-header {
    gap: 8px;
    margin-bottom: 16px;
  }
  .story-badge--orange {
    min-width: auto;
    height: 28px;
    font-size: 28px;
    padding: 0 16px 2px 0;
  }
  .story-badge--orange::after {
    bottom: 2px;
    width: 12px;
    height: 40px;
  }
  .story-title--orange {
    font-size: 20px;
    line-height: 1.25;
  }
  .story-body {
    margin-top: 14px;
    font-size: 16px;
    line-height: 1.4;
  }
  .RnI-figure--full {
    margin: 16px 0;
  }

  /* 5. Section 06 - 08 淺灰大區塊 */
  .gray-stories-wrapper {
    padding: 12px 0 28px;
    margin-top: 16px;
  }
  .story-section--in-gray {
    padding: 28px 0;
  }
  .story-photo-center {
    margin-bottom: 16px;
  }

  /* 視差底圖尺寸自適應 */
  .parallax-bg2-layer {
    background-size: 140% auto;
  }
}