/* R&D Innovation Center page */
.saixi-rd-page {
  --rd-blue: #2d85dc;
  --rd-ink: #102c52;
  --rd-copy: #3f454d;
  background: #f7faff;
}

.rd-main {
  min-height: auto;
  background: #f7faff url('../images/rdisbg.png') center top / cover no-repeat;
  overflow: hidden;
}

/* Multi-device Container Adaptation for rd-shell */
.rd-shell {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: clamp(36px, 5vw, 76px);
  align-items: center;
  padding-top: 72px;
  padding-bottom: 80px;
}

/* Left Gallery Slider */
.rd-gallery {
  width: 100%;
  height: 692px;
  align-self: center;
  overflow: hidden;
}

.rd-gallery-track {
  align-items: stretch;
}

.rd-gallery-card {
  position: relative;
  height: 208px;
  margin: 0;
  overflow: hidden;
  border-radius: 15px;
  background: transparent;
  box-shadow: 0 10px 24px rgba(53, 112, 172, .08);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.rd-gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px rgba(45, 133, 220, .18);
}

.rd-gallery-card.swiper-slide {
  flex-shrink: 0;
}

.rd-gallery-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.rd-gallery-card:hover img {
  transform: scale(1.06);
}

.rd-gallery-card:first-child img { object-position: center 48%; }
.rd-gallery-card:nth-child(2) img { object-position: center 40%; }
.rd-gallery-card:nth-child(3) img { object-position: center 42%; }

/* Right Content Area (rd-content) */
.rd-content {
  min-width: 0;
  width: 100%;
  max-width: 860px;
  margin-left: auto;
}

.rd-heading {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 28px;
}

.rd-heading-icon {
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  display: grid;
  place-items: center;
  border: 1px solid #9bc9f7;
  border-radius: 50%;
  color: var(--rd-blue);
  font-size: 26px;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 5px 12px rgba(64, 133, 210, .12);
}

.rd-kicker {
  margin: 0 0 14px;
  color: var(--rd-blue);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .01em;
}

.rd-heading-rule {
  display: block;
  width: 52px;
  height: 3px;
  background: var(--rd-blue);
}

.rd-title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 24px;
}

.rd-title-row h1 {
  margin: 0;
  color: var(--rd-ink);
  font-size: clamp(32px, 3.2vw, 48px);
  line-height: 1.12;
  font-weight: 800;
}

.rd-title-row p {
  margin: 0;
  color: #34383e;
  font-size: 17px;
  white-space: nowrap;
}

.rd-lead {
  max-width: 820px;
  margin: 36px 0 42px;
  color: var(--rd-copy);
  font-size: clamp(16px, 1.35vw, 18px);
  line-height: 1.8;
}

.rd-lead span {
  color: #559be2;
  font-weight: 700;
}

.rd-capabilities {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 3.5vw, 54px);
  row-gap: 36px;
}

.rd-capability {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.rd-capability-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1.5px solid #68a8ef;
  border-radius: 50%;
  color: #287fce;
  font-size: 28px;
  background: rgba(255, 255, 255, .35);
  transition: all 0.3s ease;
}

.rd-capability:hover .rd-capability-icon {
  background: var(--rd-blue);
  color: #ffffff;
  border-color: var(--rd-blue);
  transform: scale(1.06);
}

.rd-capability h2 {
  margin: 4px 0 8px;
  color: var(--rd-blue);
  font-size: 17px;
  line-height: 1.3;
  font-weight: 800;
  white-space: nowrap;
}

.rd-capability p {
  margin: 0;
  color: var(--rd-copy);
  font-size: 13.5px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.rd-controls {
  display: flex;
  gap: 16px;
  margin-top: 48px;
}

.rd-control {
  width: 54px;
  height: 54px;
  border: 1px solid #4e96e1;
  border-radius: 6px;
  color: #347fc5;
  background: rgba(255, 255, 255, .3);
  font-size: 21px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.rd-control:hover,
.rd-control:focus-visible {
  color: #fff;
  background: var(--rd-blue);
  border-color: var(--rd-blue);
  box-shadow: 0 6px 18px rgba(45, 133, 220, 0.25);
  outline: none;
}

/* Breakpoint Adaptation */
@media (max-width: 1400px) {
  .rd-shell {
    grid-template-columns: 350px minmax(0, 1fr);
    gap: 48px;
  }
}

@media (max-width: 1180px) {
  .rd-shell {
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 36px;
    padding-top: 56px;
    padding-bottom: 64px;
  }

  .rd-gallery {
    height: 580px;
  }

  .rd-gallery-card {
    height: 175px;
  }

  .rd-capabilities {
    column-gap: 28px;
    row-gap: 30px;
  }

  .rd-capability {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 14px;
  }

  .rd-capability-icon {
    width: 62px;
    height: 62px;
    font-size: 24px;
  }
}

@media (max-width: 992px) {
  .rd-shell {
    grid-template-columns: 1fr;
    gap: 44px;
    padding-top: 48px;
    padding-bottom: 60px;
  }

  .rd-gallery {
    height: 420px;
  }

  .rd-gallery-card {
    height: 195px;
  }
}

@media (max-width: 640px) {
  .rd-controls{
    display: none;
  }
  .rd-shell {
    padding-top: 40px;
    padding-bottom: 52px;
  }

  .rd-gallery {
    height: 380px;
  }

  .rd-gallery-card {
    height: 180px;
  }

  .rd-heading {
    gap: 16px;
    margin-bottom: 22px;
  }

  .rd-heading-icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    font-size: 20px;
  }

  .rd-kicker {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .rd-title-row {
    gap: 10px;
  }

  .rd-title-row h1 {
    font-size: 28px;
  }

  .rd-title-row p {
    font-size: 14px;
    white-space: normal;
  }

  .rd-lead {
    margin: 24px 0 28px;
    font-size: 15px;
  }

  .rd-capabilities {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .rd-capability {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
  }

  .rd-capability-icon {
    width: 54px;
    height: 54px;
    font-size: 22px;
  }

  .rd-capability h2 {
    font-size: 16px;
    white-space: normal;
  }

  .rd-capability p {
    font-size: 13px;
  }
}

/* =====================================================
   R&D INNOVATION PAGE ANIMATION SYSTEM
   ===================================================== */

/* 1. Icon Pulse Animation */
.rd-heading-icon {
  animation: flaskPulse 3.5s ease-in-out infinite;
}

@keyframes flaskPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 5px 12px rgba(64, 133, 210, .12);
  }
  50% {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(45, 133, 220, .3);
  }
}

/* 2. Capability Cards Interactive Micro-Animations */
.rd-capability {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.rd-capability:hover {
  transform: translateY(-4px);
}

.rd-capability-icon {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, color 0.3s ease;
}

.rd-capability:hover .rd-capability-icon {
  transform: scale(1.15) rotate(10deg);
  background: var(--rd-blue);
  color: #ffffff;
}

/* 3. Dynamic Entrance Animations (Slower & Silky Smooth) */
[data-animate="tilt-up"] {
  opacity: 0;
  transform: perspective(1000px) rotateX(16deg) translateY(40px);
  transition: opacity 1.6s cubic-bezier(0.16, 1, 0.3, 1), transform 1.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-animate="tilt-up"].is-visible {
  opacity: 1;
  transform: perspective(1000px) rotateX(0deg) translateY(0);
}

[data-animate="slide-elastic"] {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 1.75s cubic-bezier(0.16, 1, 0.3, 1), transform 1.75s cubic-bezier(0.25, 1.25, 0.5, 1);
  will-change: opacity, transform;
}

[data-animate="slide-elastic"].is-visible {
  opacity: 1;
  transform: translateX(0);
}

[data-animate="pop-in"] {
  opacity: 0;
  transform: scale(0.85) translateY(24px);
  transition: opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1), transform 1.5s cubic-bezier(0.25, 1.35, 0.5, 1);
  will-change: opacity, transform;
}

[data-animate="pop-in"].is-visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

[data-animate="fade-up"] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.6s cubic-bezier(0.16, 1, 0.3, 1), transform 1.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-animate="fade-up"].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Delays - Slower Sequence */
.delay-1 { transition-delay: 0.18s !important; }
.delay-2 { transition-delay: 0.36s !important; }
.delay-3 { transition-delay: 0.54s !important; }
.delay-4 { transition-delay: 0.72s !important; }
.delay-5 { transition-delay: 0.90s !important; }
.delay-6 { transition-delay: 1.08s !important; }
