/* ===================================================
   APRIX Global — Enhanced Interactive CSS v2
   =================================================== */

/* ─── Page loader ─── */
#page-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 20px;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-logo {
  font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: var(--white);
  animation: fadeInUp 0.6s ease;
}
.loader-logo span { color: var(--gold); }
.loader-bar {
  width: 200px; height: 2px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden;
}
.loader-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px; animation: loaderFill 1.6s ease forwards;
}
@keyframes loaderFill { from { width: 0; } to { width: 100%; } }

/* ─── Reading progress bar ─── */
#progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; z-index: 1001;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  width: 0%; transition: width 0.1s linear;
}

/* ─── Custom cursor ─── */
.cursor-dot {
  width: 8px; height: 8px; background: var(--gold); border-radius: 50%;
  position: fixed; pointer-events: none; z-index: 9998; transform: translate(-50%,-50%);
  transition: transform 0.1s ease; mix-blend-mode: difference;
}
.cursor-ring {
  width: 36px; height: 36px; border: 1.5px solid rgba(201,168,76,0.5); border-radius: 50%;
  position: fixed; pointer-events: none; z-index: 9997; transform: translate(-50%,-50%);
  transition: all 0.15s ease;
}
.cursor-ring.hovered { transform: translate(-50%,-50%) scale(1.6); border-color: var(--gold); }
@media (max-width: 768px) { .cursor-dot, .cursor-ring { display: none; } }

/* ─── Hero Particles Canvas ─── */
#particles-canvas {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.5;
}

/* ─── Hero enhanced ─── */
.hero-content { position: relative; z-index: 3; padding-top: 110px; }
.hero-video-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  transform: scale(1.06); transition: transform 12s ease;
  will-change: transform;
}
.hero-gradient-overlay {
  position: absolute; inset: 0; z-index: 2;
  background: linear-gradient(
    135deg,
    rgba(5,13,26,0.93) 0%,
    rgba(10,25,49,0.72) 45%,
    rgba(5,13,26,0.85) 100%
  );
}

/* Typewriter cursor */
.typer { display: inline; }
.typer-cursor {
  display: inline-block; width: 3px; height: 0.9em; background: var(--gold);
  margin-left: 3px; vertical-align: middle; animation: blink 1s step-end infinite;
}
@keyframes blink { 0%,100%{opacity:1;} 50%{opacity:0;} }

/* ─── Glassmorphism cards ─── */
.glass-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
}

/* ─── 3D Tilt service cards ─── */
.tilt-card {
  transform-style: preserve-3d;
  transition: transform 0.15s ease, box-shadow 0.3s ease;
  will-change: transform;
}
.tilt-card:hover { box-shadow: 0 30px 70px rgba(0,0,0,0.2), 0 0 0 1px rgba(201,168,76,0.15); }
.tilt-inner { transform: translateZ(20px); }

/* ─── Enhanced service card with image ─── */
.service-card-v2 {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.06);
  transition: var(--transition);
  cursor: pointer;
}
.service-card-v2:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.service-card-v2-img {
  width: 100%; height: 200px; object-fit: cover;
  transition: transform 0.6s ease;
}
.service-card-v2:hover .service-card-v2-img { transform: scale(1.07); }
.service-card-v2-img-wrap { overflow: hidden; position: relative; }
.service-card-v2-img-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,25,49,0.5) 0%, transparent 50%);
  opacity: 0; transition: opacity 0.3s;
}
.service-card-v2:hover .service-card-v2-img-wrap::after { opacity: 1; }
.service-card-v2-body { padding: 28px 24px; }
.service-card-v2-body h3 { font-size: 1.08rem; margin-bottom: 10px; color: var(--navy); }
.service-card-v2-body p { font-size: 0.875rem; color: var(--gray-dark); line-height: 1.75; }
.service-card-v2-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 14px; color: var(--gold); font-size: 0.82rem; font-weight: 600;
  transition: gap 0.2s;
}
.service-card-v2:hover .service-card-v2-link { gap: 10px; }

/* ─── Portfolio grid enhanced ─── */
.portfolio-item-v2 {
  position: relative; border-radius: 12px; overflow: hidden;
  cursor: pointer; background: var(--navy);
}
.portfolio-item-v2 img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4,0,0.2,1), filter 0.4s ease;
  filter: brightness(0.85);
}
.portfolio-item-v2:hover img { transform: scale(1.1); filter: brightness(0.65); }
.portfolio-overlay-v2 {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px;
  background: linear-gradient(to top, rgba(5,13,26,0.92) 0%, rgba(5,13,26,0.2) 50%, transparent 100%);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.portfolio-item-v2:hover .portfolio-overlay-v2 { opacity: 1; transform: translateY(0); }
.portfolio-overlay-v2 h4 { color: #fff; font-size: 1rem; margin-bottom: 4px; }
.portfolio-overlay-v2 span { color: var(--gold); font-size: 0.78rem; font-weight: 500; }
.portfolio-zoom-icon {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; background: var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-deep); font-size: 0.85rem;
  transform: scale(0); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.portfolio-item-v2:hover .portfolio-zoom-icon { transform: scale(1); }

/* ─── Stats with ring animation ─── */
.stat-ring-wrap {
  position: relative; width: 120px; height: 120px; margin: 0 auto 20px;
}
.stat-ring-wrap svg { transform: rotate(-90deg); }
.stat-ring-bg { fill: none; stroke: rgba(255,255,255,0.07); stroke-width: 4; }
.stat-ring-fill {
  fill: none; stroke: var(--gold); stroke-width: 4;
  stroke-linecap: round; stroke-dasharray: 314; stroke-dashoffset: 314;
  transition: stroke-dashoffset 2s cubic-bezier(0.4,0,0.2,1);
}
.stat-ring-fill.animated { stroke-dashoffset: 0; }
.stat-ring-text {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--gold);
}

/* ─── Timeline ─── */
.timeline-v2 { position: relative; padding: 0 0 0 48px; }
.timeline-v2::before {
  content: ''; position: absolute; left: 16px; top: 0; bottom: 0; width: 2px;
  background: linear-gradient(to bottom, var(--gold), rgba(201,168,76,0.1));
}
.timeline-item {
  position: relative; margin-bottom: 40px;
  opacity: 0; transform: translateX(-20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.timeline-item.visible { opacity: 1; transform: translateX(0); }
.timeline-dot {
  position: absolute; left: -40px; top: 4px;
  width: 14px; height: 14px; background: var(--gold); border-radius: 50%;
  border: 3px solid var(--navy-deep); box-shadow: 0 0 0 3px rgba(201,168,76,0.2);
  transition: box-shadow 0.3s;
}
.timeline-item:hover .timeline-dot { box-shadow: 0 0 0 6px rgba(201,168,76,0.2); }
.timeline-year {
  font-size: 0.75rem; font-weight: 700; color: var(--gold); letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 6px;
}
.timeline-title { font-size: 1rem; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.timeline-desc { font-size: 0.875rem; color: var(--gray-dark); line-height: 1.7; }

/* ─── Testimonials slider ─── */
.testimonial-slider { position: relative; overflow: hidden; }
.testimonial-track {
  display: flex; transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.testimonial-slide { min-width: 100%; }
.testimonial-dots { display: flex; gap: 8px; justify-content: center; margin-top: 28px; }
.testimonial-dot {
  width: 8px; height: 8px; border-radius: 100px; background: rgba(255,255,255,0.2);
  cursor: pointer; transition: all 0.3s;
}
.testimonial-dot.active { background: var(--gold); width: 24px; }

/* ─── Tab switcher ─── */
.tab-nav { display: flex; gap: 0; border-bottom: 1px solid rgba(10,25,49,0.1); margin-bottom: 40px; flex-wrap: wrap; }
.tab-btn {
  padding: 12px 24px; font-size: 0.88rem; font-weight: 600; color: var(--gray-dark);
  background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color 0.25s, border-color 0.25s;
}
.tab-btn.active, .tab-btn:hover { color: var(--navy); border-bottom-color: var(--gold); }
.tab-pane { display: none; animation: fadeIn 0.4s ease; }
.tab-pane.active { display: block; }

/* ─── Before/After image comparison ─── */
.comparison-wrap {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  user-select: none; cursor: ew-resize;
}
.comparison-img { width: 100%; display: block; }
.comparison-clip { position: absolute; inset: 0; overflow: hidden; width: 50%; }
.comparison-clip img { width: 200%; max-width: none; }
.comparison-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 3px;
  background: var(--gold); cursor: ew-resize;
  transform: translateX(-50%);
}
.comparison-handle::before, .comparison-handle::after {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%);
  width: 40px; height: 40px; background: var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.comparison-handle::before { top: 50%; transform: translate(-50%,-50%); }

/* ─── Marquee ticker ─── */
.marquee-wrap {
  overflow: hidden; background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  padding: 14px 0;
}
.marquee-track {
  display: flex; gap: 60px; white-space: nowrap;
  animation: marquee 28s linear infinite;
  width: max-content;
}
.marquee-track:hover { animation-play-state: paused; }
.marquee-item {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 0.85rem; font-weight: 700; color: var(--navy-deep);
  letter-spacing: 0.05em; text-transform: uppercase;
}
.marquee-item i { font-size: 0.9rem; opacity: 0.6; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ─── Floating image card ─── */
.float-image-card {
  position: relative;
}
.float-image-card img { border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.float-badge-card {
  position: absolute; bottom: -20px; right: -20px;
  background: var(--white); border-radius: var(--radius-lg); padding: 18px 22px;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(201,168,76,0.15);
  min-width: 160px;
}
.float-badge-card .badge-num {
  font-family: var(--font-heading); font-size: 2rem; font-weight: 800; color: var(--navy); line-height: 1;
}
.float-badge-card .badge-label { font-size: 0.78rem; color: var(--gray-dark); margin-top: 4px; }
.float-badge-card-2 {
  position: absolute; top: -16px; left: -16px;
  background: var(--navy); border-radius: var(--radius-md); padding: 14px 18px;
  box-shadow: var(--shadow-lg); min-width: 140px;
}
.float-badge-card-2 .badge-num { color: var(--gold); }
.float-badge-card-2 .badge-label { color: rgba(255,255,255,0.6); }

/* ─── Ripple effect ─── */
.ripple { position: relative; overflow: hidden; }
.ripple-wave {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.25); transform: scale(0);
  animation: rippleAnim 0.6s linear;
  pointer-events: none;
}
@keyframes rippleAnim { to { transform: scale(4); opacity: 0; } }

/* ─── Magnetic button ─── */
.btn-magnetic { transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1); }

/* ─── Section background textures ─── */
.bg-dots {
  background-color: var(--off-white);
  background-image: radial-gradient(rgba(10,25,49,0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}
.bg-grid {
  background-color: var(--navy-deep);
  background-image: linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ─── Glowing highlight on hover ─── */
.glow-on-hover {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.glow-on-hover:hover {
  box-shadow: 0 0 30px rgba(201,168,76,0.3), 0 20px 50px rgba(0,0,0,0.15);
  transform: translateY(-4px);
}

/* ─── Image grid mosaic ─── */
.mosaic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 200px 200px;
  gap: 12px; border-radius: var(--radius-xl); overflow: hidden;
}
.mosaic-grid .mosaic-tall { grid-row: span 2; }
.mosaic-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.mosaic-grid img:hover { transform: scale(1.05); }
.mosaic-grid div { overflow: hidden; }

/* ─── Expertise bars ─── */
.expertise-bar { margin-bottom: 22px; }
.expertise-label { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 0.88rem; font-weight: 600; color: var(--navy); }
.expertise-track { height: 6px; background: rgba(10,25,49,0.08); border-radius: 100px; overflow: hidden; }
.expertise-fill {
  height: 100%; border-radius: 100px; width: 0%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light));
  transition: width 1.8s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Enhanced hero stats ─── */
.hero-stat-v2 {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(10px); border-radius: 12px; padding: 16px 22px;
}
.hero-stat-v2 .stat-icon { width: 40px; height: 40px; background: rgba(201,168,76,0.15); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--gold); font-size: 1.1rem; flex-shrink: 0; }
.hero-stat-v2 .stat-num-v2 { font-family: var(--font-heading); font-size: 1.6rem; font-weight: 800; color: var(--gold); line-height: 1; }
.hero-stat-v2 .stat-label-v2 { font-size: 0.72rem; color: rgba(255,255,255,0.55); text-transform: uppercase; letter-spacing: 0.07em; font-weight: 500; margin-top: 2px; }

/* ─── Animated border gradient ─── */
.animated-border {
  position: relative;
}
.animated-border::before {
  content: ''; position: absolute; inset: -2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold-dark), var(--gold));
  background-size: 300% 100%;
  border-radius: calc(var(--radius-lg) + 2px);
  z-index: -1;
  animation: borderGlow 4s linear infinite;
  opacity: 0; transition: opacity 0.3s;
}
.animated-border:hover::before { opacity: 1; }
@keyframes borderGlow { 0%{background-position:0%} 100%{background-position:300%} }

/* ─── Video play overlay card ─── */
.video-card {
  position: relative; border-radius: var(--radius-xl); overflow: hidden; cursor: pointer;
}
.video-card img { width: 100%; display: block; transition: transform 0.5s ease; }
.video-card:hover img { transform: scale(1.04); }
.video-play-btn {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(5,13,26,0.35);
  transition: background 0.3s;
}
.video-card:hover .video-play-btn { background: rgba(5,13,26,0.55); }
.play-circle {
  width: 72px; height: 72px; background: var(--gold); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--navy-deep);
  transform: scale(1); transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 0 0 0 rgba(201,168,76,0.4);
  animation: playPulse 2.5s infinite;
}
.video-card:hover .play-circle { transform: scale(1.12); }
@keyframes playPulse {
  0%   { box-shadow: 0 0 0 0 rgba(201,168,76,0.5); }
  70%  { box-shadow: 0 0 0 20px rgba(201,168,76,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,168,76,0); }
}

/* ─── Scroll reveal stagger ─── */
.stagger-child { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.stagger-child.visible { opacity: 1; transform: translateY(0); }
.stagger-child:nth-child(1) { transition-delay: 0.05s; }
.stagger-child:nth-child(2) { transition-delay: 0.12s; }
.stagger-child:nth-child(3) { transition-delay: 0.19s; }
.stagger-child:nth-child(4) { transition-delay: 0.26s; }
.stagger-child:nth-child(5) { transition-delay: 0.33s; }
.stagger-child:nth-child(6) { transition-delay: 0.40s; }

/* ─── Hover tooltip ─── */
.has-tooltip { position: relative; }
.tooltip-text {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--navy-deep); color: var(--white); font-size: 0.75rem; padding: 6px 12px;
  border-radius: 6px; white-space: nowrap; pointer-events: none;
  opacity: 0; transition: opacity 0.2s;
}
.tooltip-text::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--navy-deep);
}
.has-tooltip:hover .tooltip-text { opacity: 1; }

/* ─── Counter odometer style ─── */
.odometer { font-variant-numeric: tabular-nums; }

/* ─── Pull Quote ─── */
.pull-quote {
  border-left: 4px solid var(--gold);
  padding: 20px 28px;
  margin: 28px 0;
  background: rgba(201,168,76,0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.pull-quote p { font-family: var(--font-heading); font-size: 1.15rem; color: var(--navy); font-style: italic; line-height: 1.7; }

/* ─── FAQ Accordion ─── */
.faq-item {
  border: 1px solid rgba(10,25,49,0.1);
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--white);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.faq-item:hover {
  border-color: rgba(201,168,76,0.35);
  box-shadow: 0 6px 24px rgba(10,25,49,0.07);
}
.faq-item.open {
  border-color: rgba(201,168,76,0.5);
  box-shadow: 0 8px 32px rgba(201,168,76,0.12);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.5;
  transition: background 0.2s ease;
}
.faq-question:hover { background: rgba(201,168,76,0.04); }
.faq-item.open .faq-question { background: rgba(201,168,76,0.05); color: var(--navy); }

.faq-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(10,25,49,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
  font-size: 0.72rem;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.faq-item.open .faq-icon {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-deep);
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4,0,0.2,1), padding 0.3s ease;
}
.faq-answer p {
  padding: 0 24px 20px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--gray-dark);
  line-height: 1.8;
  border-top: 1px solid rgba(10,25,49,0.06);
  padding-top: 16px;
}
.faq-item.open .faq-answer { max-height: 400px; }

/* Dark variant — for navy backgrounds */
.faq-item.faq-dark {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
.faq-item.faq-dark:hover {
  border-color: rgba(201,168,76,0.3);
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
}
.faq-item.faq-dark.open {
  border-color: rgba(201,168,76,0.45);
  background: rgba(255,255,255,0.06);
}
.faq-question.faq-question-dark { color: rgba(255,255,255,0.9); }
.faq-question.faq-question-dark:hover { background: rgba(255,255,255,0.04); }
.faq-item.faq-dark.open .faq-question.faq-question-dark { background: rgba(201,168,76,0.06); color: var(--white); }
.faq-item.faq-dark .faq-icon {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
}
.faq-item.faq-dark.open .faq-icon { background: var(--gold); border-color: var(--gold); color: var(--navy-deep); }
.faq-answer.faq-answer-dark p {
  color: rgba(255,255,255,0.65);
  border-top-color: rgba(255,255,255,0.07);
}
.faq-answer.faq-answer-dark p strong { color: rgba(255,255,255,0.9); }

/* Responsive FAQ grid */
@media (max-width: 768px) {
  .faq-grid { grid-template-columns: 1fr !important; }
}

