/* ===== IMAGE & VISUAL ANIMATIONS ===== */

/* Hero Ken Burns */
.heroSlide.active {
  animation: heroKenBurns 9s ease-out forwards;
}
@keyframes heroKenBurns {
  0%   { background-size: 100%; background-position: center center; }
  100% { background-size: 115%; background-position: 58% 38%; }
}

.heroContent .heroTitle,
.heroContent .heroSubtitle,
.heroContent .heroActions {
  animation: heroTextIn 1s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.heroSlide.active .heroTitle    { animation-delay: 0.15s; }
.heroSlide.active .heroSubtitle { animation-delay: 0.35s; }
.heroSlide.active .heroActions  { animation-delay: 0.55s; }
@keyframes heroTextIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Extended scroll-reveal variants */
[data-aos] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.85s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.85s ease;
}
[data-aos].aos-visible { opacity: 1; transform: none; filter: none; }

[data-aos="fade-up"]    { transform: translateY(40px); }
[data-aos="fade-down"]  { transform: translateY(-40px); }
[data-aos="fade-left"]  { transform: translateX(-50px); }
[data-aos="fade-right"] { transform: translateX(50px); }

[data-aos="img-left"] {
  transform: translateX(-70px) scale(0.9) rotateY(8deg);
  transform-origin: right center;
}
[data-aos="img-right"] {
  transform: translateX(70px) scale(0.9) rotateY(-8deg);
  transform-origin: left center;
}
[data-aos="img-zoom"] {
  transform: scale(0.82);
  filter: blur(6px);
}
[data-aos="img-flip"] {
  transform: perspective(900px) rotateY(-18deg) scale(0.9);
  transform-origin: left center;
}

[data-aos-delay="1"] { transition-delay: 0.1s; }
[data-aos-delay="2"] { transition-delay: 0.2s; }
[data-aos-delay="3"] { transition-delay: 0.3s; }
[data-aos-delay="4"] { transition-delay: 0.4s; }

/* Image frame — glow border + shine */
.imgFrame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
}
.imgFrame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, var(--primary), var(--accent), #8b5cf6, var(--primary));
  background-size: 300% 300%;
  animation: borderFlow 5s ease infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 3;
  pointer-events: none;
}
.imgFrame.aos-visible::before,
.imgFrame:hover::before { opacity: 1; }

.imgFrame::after {
  content: '';
  position: absolute;
  top: 0; left: -120%;
  width: 60%; height: 100%;
  background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,0.22) 50%, transparent 80%);
  transform: skewX(-18deg);
  animation: imgShine 5s ease-in-out infinite;
  z-index: 4;
  pointer-events: none;
}
@keyframes imgShine {
  0%, 75% { left: -120%; }
  100%    { left: 140%; }
}
@keyframes borderFlow {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

/* Photo / detail images */
.aboutImage,
.detailImage,
.whyImage,
.aboutPageImage,
.chairmanPhoto {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  transform-style: preserve-3d;
  will-change: transform;
}
.aboutImage img,
.detailImage img,
.whyImage img,
.aboutPageImage img,
.chairmanPhoto img {
  width: 100%;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}
.aboutImage:hover img,
.detailImage:hover img,
.whyImage:hover img,
.aboutPageImage:hover img,
.chairmanPhoto:hover img {
  transform: scale(1.06);
}

.aboutImage { height: 420px; }
.aboutImage img { height: 100%; object-fit: cover; }
.detailImage img { height: 380px; object-fit: cover; }
.whyImage img { height: 400px; object-fit: cover; }

/* Screenshot product images */
.detailImage--screenshot {
  background: linear-gradient(145deg, #0a1628 0%, #0d2040 50%, #0a1628 100%);
  box-shadow: 0 20px 60px rgba(0, 102, 204, 0.2), 0 0 0 1px rgba(0, 180, 216, 0.15);
  animation: screenshotGlow 4s ease-in-out infinite alternate;
}
.detailImage--screenshot img {
  object-fit: contain;
  padding: 0.5rem;
  animation: screenshotFloat 7s ease-in-out infinite;
}
.detailImage--screenshot .scanBeam {
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.9), transparent);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.6);
  animation: scanBeam 4s ease-in-out infinite;
  z-index: 2;
  pointer-events: none;
}
@keyframes screenshotFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes screenshotGlow {
  0%   { box-shadow: 0 20px 60px rgba(0, 102, 204, 0.15), 0 0 0 1px rgba(0, 180, 216, 0.1); }
  100% { box-shadow: 0 28px 70px rgba(0, 102, 204, 0.35), 0 0 30px rgba(0, 180, 216, 0.2); }
}
@keyframes scanBeam {
  0%   { top: 8%; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 92%; opacity: 0; }
}

/* 3D tilt wrapper */
.imgTilt {
  transition: transform 0.12s ease-out;
  border-radius: var(--radius-lg);
  transform-style: preserve-3d;
}
.imgTilt .detailImage { box-shadow: var(--shadow-lg); }

/* ===== PRODUCT CARD — ANIMATED CSS ICONS ===== */
.productIconAnim {
  width: 72px; height: 72px; border-radius: 16px;
  background: linear-gradient(145deg, var(--primary-light) 0%, #fff 100%);
  border: 1px solid rgba(0, 102, 204, 0.15);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.4s ease;
}
.productIconAnim::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(0, 180, 216, 0.2), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s;
}
.productCard:hover .productIconAnim {
  transform: scale(1.08) rotate(-2deg);
  box-shadow: 0 12px 28px rgba(0, 102, 204, 0.2);
}
.productCard:hover .productIconAnim::before { opacity: 1; }

.pia { position: relative; width: 44px; height: 44px; }

/* PACS — stacked archive discs */
.pia-archive .pia-disc {
  position: absolute; left: 50%; transform: translateX(-50%);
  width: 32px; height: 8px; border-radius: 50%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0.85;
}
.pia-disc--1 { bottom: 6px; animation: discPulse 2s ease-in-out infinite; }
.pia-disc--2 { bottom: 16px; animation: discPulse 2s ease-in-out 0.3s infinite; width: 28px; }
.pia-disc--3 { bottom: 26px; animation: discPulse 2s ease-in-out 0.6s infinite; width: 24px; }
.pia-core {
  position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
  animation: coreGlow 2s ease-in-out infinite;
}
@keyframes discPulse {
  0%, 100% { opacity: 0.6; transform: translateX(-50%) scaleX(1); }
  50%      { opacity: 1; transform: translateX(-50%) scaleX(1.08); }
}
@keyframes coreGlow {
  0%, 100% { box-shadow: 0 0 8px var(--accent); }
  50%      { box-shadow: 0 0 16px var(--accent), 0 0 24px rgba(0, 180, 216, 0.4); }
}

/* RIS — clipboard */
.pia-ris .pia-clip {
  position: absolute; inset: 4px 8px 4px 8px;
  border: 2px solid var(--primary); border-radius: 4px;
  background: rgba(255,255,255,0.9);
}
.pia-ris .pia-clip::before {
  content: ''; position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  width: 14px; height: 8px; background: var(--primary); border-radius: 3px 3px 0 0;
}
.pia-line {
  position: absolute; left: 14px; height: 2px; border-radius: 1px;
  background: var(--accent); transform-origin: left;
  animation: lineDraw 2.5s ease-in-out infinite;
}
.pia-line--1 { top: 16px; width: 18px; }
.pia-line--2 { top: 22px; width: 14px; animation-delay: 0.4s; }
.pia-line--3 { top: 28px; width: 20px; animation-delay: 0.8s; }
.pia-check {
  position: absolute; bottom: 10px; right: 10px;
  width: 10px; height: 6px;
  border-left: 2px solid #22c55e; border-bottom: 2px solid #22c55e;
  transform: rotate(-45deg);
  animation: checkPop 2.5s ease-in-out infinite;
}
@keyframes lineDraw {
  0%, 100% { transform: scaleX(0.3); opacity: 0.4; }
  50%      { transform: scaleX(1); opacity: 1; }
}
@keyframes checkPop {
  0%, 60%, 100% { transform: rotate(-45deg) scale(0.8); opacity: 0.5; }
  75%           { transform: rotate(-45deg) scale(1.1); opacity: 1; }
}

/* Teleradiology — globe + signals */
.pia-telerad .pia-globe {
  position: absolute; inset: 6px;
  border: 2px solid var(--primary); border-radius: 50%;
  background: linear-gradient(135deg, rgba(0,102,204,0.1), rgba(0,180,216,0.2));
}
.pia-telerad .pia-globe::before,
.pia-telerad .pia-globe::after {
  content: ''; position: absolute; border: 1px solid rgba(0,102,204,0.35); border-radius: 50%;
}
.pia-telerad .pia-globe::before { inset: 6px 2px; }
.pia-telerad .pia-globe::after  { inset: 2px 10px; }
.pia-ring {
  position: absolute; border: 2px solid var(--accent); border-radius: 50%;
  opacity: 0; animation: signalRing 2.5s ease-out infinite;
}
.pia-ring--1 { inset: -4px; }
.pia-ring--2 { inset: -4px; animation-delay: 1.25s; }
.pia-signal {
  position: absolute; top: 50%; right: -2px; transform: translateY(-50%);
  width: 0; height: 0;
  border: 5px solid transparent; border-left-color: var(--accent);
  animation: signalBlink 1.5s ease-in-out infinite;
}
@keyframes signalRing {
  0%   { transform: scale(0.8); opacity: 0.8; }
  100% { transform: scale(1.4); opacity: 0; }
}
@keyframes signalBlink {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

/* DICOM Viewer — scan screen */
.pia-viewer .pia-screen {
  position: absolute; inset: 4px;
  border: 2px solid var(--primary); border-radius: 4px;
  background: #0a1628;
  overflow: hidden;
}
.pia-cross { position: absolute; background: rgba(0, 212, 255, 0.5); }
.pia-cross--h { left: 8px; right: 8px; top: 50%; height: 1px; margin-top: -0.5px; }
.pia-cross--v { top: 8px; bottom: 8px; left: 50%; width: 1px; margin-left: -0.5px; }
.pia-scan {
  position: absolute; left: 6px; right: 6px; height: 2px;
  background: linear-gradient(90deg, transparent, #00d4ff, transparent);
  box-shadow: 0 0 8px #00d4ff;
  animation: viewerScan 2.5s ease-in-out infinite;
}
@keyframes viewerScan {
  0%   { top: 8px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: calc(100% - 10px); opacity: 0; }
}

/* MedDream — monitor + 3D cube */
.pia-meddream .pia-monitor {
  position: absolute; top: 4px; left: 6px; right: 6px; height: 26px;
  border: 2px solid var(--primary); border-radius: 3px;
  background: #0a1628;
}
.pia-stand {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 4px; background: var(--primary); border-radius: 0 0 2px 2px;
}
.pia-stand::after {
  content: ''; position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%);
  width: 22px; height: 3px; background: var(--primary); border-radius: 2px;
}
.pia-cube {
  position: absolute; top: 10px; left: 50%;
  width: 12px; height: 12px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  transform: translateX(-50%) rotate(45deg);
  animation: cubeSpin 4s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(0, 180, 216, 0.5);
}
@keyframes cubeSpin {
  0%, 100% { transform: translateX(-50%) rotate(45deg) scale(1); }
  50%      { transform: translateX(-50%) rotate(225deg) scale(1.1); }
}

/* DICOM Router — nodes + data flow */
.pia-router .pia-node {
  position: absolute; width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 8px rgba(0, 102, 204, 0.5);
}
.pia-node--a { top: 4px; left: 50%; transform: translateX(-50%); animation: nodePulse 2s ease-in-out infinite; }
.pia-node--b { bottom: 8px; left: 6px; animation: nodePulse 2s ease-in-out 0.5s infinite; }
.pia-node--c { bottom: 8px; right: 6px; animation: nodePulse 2s ease-in-out 1s infinite; }
.pia-flow {
  position: absolute; height: 2px; background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 1px; transform-origin: left center;
  animation: dataFlow 1.8s ease-in-out infinite;
}
.pia-flow--1 { top: 14px; left: 22px; width: 14px; transform: rotate(55deg); }
.pia-flow--2 { top: 14px; right: 22px; width: 14px; transform: rotate(-55deg); transform-origin: right center; background: linear-gradient(270deg, var(--accent), transparent); animation-delay: 0.6s; }
@keyframes nodePulse {
  0%, 100% { transform: translateX(-50%) scale(1); box-shadow: 0 0 6px rgba(0,102,204,0.4); }
  50%      { transform: translateX(-50%) scale(1.15); box-shadow: 0 0 14px rgba(0,180,216,0.7); }
}
.pia-node--b, .pia-node--c { animation-name: nodePulseSide; }
@keyframes nodePulseSide {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}
@keyframes dataFlow {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

/* Per-product accent tints on hover */
.productIconAnim--pacs:hover    { border-color: rgba(0, 102, 204, 0.35); }
.productIconAnim--ris:hover     { border-color: rgba(34, 197, 94, 0.35); }
.productIconAnim--telerad:hover { border-color: rgba(0, 180, 216, 0.45); }
.productIconAnim--viewer:hover  { border-color: rgba(0, 212, 255, 0.45); }
.productIconAnim--meddream:hover{ border-color: rgba(139, 92, 246, 0.35); }
.productIconAnim--router:hover  { border-color: rgba(0, 102, 204, 0.4); }

@media (prefers-reduced-motion: reduce) {
  .pia-disc, .pia-core, .pia-line, .pia-check, .pia-ring, .pia-signal,
  .pia-scan, .pia-cube, .pia-node, .pia-flow { animation: none !important; }
}


/* Blog cards */
.blogImg img { width: 100%; height: 100%; object-fit: cover; }
.blogImg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.25), transparent);
  opacity: 0;
  transition: opacity 0.5s;
}
.blogCard:hover .blogImg::after { opacity: 1; }
.blogImg img { transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); }
.blogCard:hover .blogImg img { transform: scale(1.1); }

/* Team & profile photos */
.teamPhoto,
.chairmanPhoto {
  overflow: hidden;
}
.teamPhoto img,
.chairmanPhoto img {
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.teamCard:hover .teamPhoto img,
.chairmanPhoto:hover img {
  transform: scale(1.08);
}
.chairmanPhoto::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 102, 204, 0.5), transparent 50%);
  opacity: 0;
  transition: opacity 0.5s;
  pointer-events: none;
}
.chairmanPhoto:hover::after { opacity: 1; }

/* About badge pulse */
.aboutBadge {
  animation: badgePulse 3s ease-in-out infinite;
}
@keyframes badgePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 8px 24px rgba(0, 102, 204, 0.3); }
  50%      { transform: scale(1.04); box-shadow: 0 12px 32px rgba(0, 102, 204, 0.45); }
}

/* Parallax layer */
.imgParallax { will-change: transform; }

/* Pillar cards entrance */
.pillarsGrid .pillarCard {
  animation: pillarIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}
.pillarsGrid .pillarCard:nth-child(1) { animation-delay: 0.05s; }
.pillarsGrid .pillarCard:nth-child(2) { animation-delay: 0.15s; }
.pillarsGrid .pillarCard:nth-child(3) { animation-delay: 0.25s; }
.pillarsGrid .pillarCard:nth-child(4) { animation-delay: 0.35s; }
.pillarsGrid .pillarCard:nth-child(5) { animation-delay: 0.45s; }
@keyframes pillarIn {
  from { opacity: 0; transform: translateY(24px) scale(0.95); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .heroSlide.active,
  .detailImage--screenshot,
  .detailImage--screenshot img,
  .aboutBadge,
  .pillarCard,
  .imgFrame::after { animation: none !important; }
  [data-aos] { opacity: 1 !important; transform: none !important; filter: none !important; }
}
