﻿/* ============================================================
   GPS FEATURES — feature-card CSS + Scroll Up/Down
   Drop this into your existing stylesheet
   ============================================================ */

/* ── Variables (add to your :root if you have one) ──────────── */

:root {
  --fc-bg:         #0f1318;
  --fc-border:     rgba(255, 255, 255, 0.07);
  --fc-accent:     #00e5ff;
  --fc-accent2:    #0057ff;
  --fc-text:       #e8edf5;
  --fc-muted:      #5c6878;
  --fc-radius:     14px;
  --fc-ease:       cubic-bezier(0.22, 1, 0.36, 1);
}

/* ── Scroll Progress Bar (fixed top) ────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--fc-accent2), var(--fc-accent));
  z-index: 9999;
  border-radius: 0 3px 3px 0;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ── Scroll Up / Down Buttons (fixed bottom-right) ───────────── */
.scroll-btn-group {
  display: none;
  position: fixed;
  bottom: 32px;
  right: 28px;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
}

.scroll-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 255, 0.22);
  background: rgba(10, 13, 18, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--fc-accent);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity      0.35s var(--fc-ease),
    background   0.35s var(--fc-ease),
    border-color 0.35s var(--fc-ease),
    transform    0.25s var(--fc-ease),
    box-shadow   0.35s var(--fc-ease);
  position: relative;
}

.scroll-btn.visible {
  opacity: 1;
  pointer-events: all;
}

.scroll-btn:hover {
  background: rgba(0, 229, 255, 0.1);
  border-color: var(--fc-accent);
  transform: scale(1.12);
  box-shadow:
    0 0 22px rgba(0, 229, 255, 0.28),
    0 4px 20px rgba(0, 0, 0, 0.5);
}

.scroll-btn:active {
  transform: scale(0.92);
}

/* Side tooltip on scroll buttons */
.scroll-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.2);
  color: var(--fc-accent);
  font-size: 0.67rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: 6px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.scroll-btn[data-tip]:hover::after {
  opacity: 1;
}

/* Pulse ring on scroll-to-top */
@keyframes fc-pulseRing {
  0%   { box-shadow: 0 0 0 0   rgba(0, 229, 255, 0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(0, 229, 255, 0);   }
  100% { box-shadow: 0 0 0 0   rgba(0, 229, 255, 0);    }
}
#btn-scroll-top.visible {
  animation: fc-pulseRing 2.2s ease-out infinite;
}

/* ── Feature Card ─────────────────────────────────────────────── */
.feature-card {
  position: relative;
  background: linear-gradient(135deg, #e7f5ff, #ffffff);
  border: 1px solid #74c0fc;
  /* border: 1px solid var(--fc-border); */
  border-radius: var(--fc-radius);
  padding: 28px 20px 24px;
  text-align: center;
  overflow: hidden;
  cursor: default;
  box-shadow: 2px;

  /* entrance start state — JS adds .fc-visible to animate in */
  opacity: 0;
  transform: translateY(30px);

  transition:
    border-color 0.35s var(--fc-ease),
    transform    0.35s var(--fc-ease),
    box-shadow   0.35s var(--fc-ease);
}

/* ── Top accent line ── */
.feature-card::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 58%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--fc-accent), transparent);
  border-radius: 0 0 4px 4px;
  transition: transform 0.35s var(--fc-ease);
}

/* ── Inner glow ── */
.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(191, 185, 185, 0.07) 0%, transparent 65%);
  opacity: 0;
  transition: opacity 0.35s var(--fc-ease);
  pointer-events: none;
}

/* ── Hover ── */
.feature-card:hover {
  border-color: rgba(0, 229, 255, 0.32);
  transform: translateY(-6px);
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 229, 255, 0.08);
}
.feature-card:hover::before { transform: translateX(-50%) scaleX(1); }
.feature-card:hover::after  { opacity: 1; }

.feature-card:hover i {
  color: var(--fc-accent);
  transform: scale(1.18) rotate(-4deg);
}
.feature-card:hover h6 { color: rgb(11, 158, 216); }

/* ── Clicked / active card ── */
.feature-card.fc-active {
  border-color: rgba(0, 229, 255, 0.55) !important;
  box-shadow:
    0 0 0 2px rgba(0, 229, 255, 0.14),
    0 20px 48px rgba(208, 204, 204, 0.5) !important;
}
.feature-card.fc-active i  { color: var(--fc-accent); }
.feature-card.fc-active h6 { color: var(--fc-text); }

/* ── Icon ── */
.feature-card i {
  display: block;
  font-size: 2rem;
  color: var(--fc-muted);
  margin-bottom: 14px;
  line-height: 1;
  position: relative;
  z-index: 1;
  transition:
    color     0.35s var(--fc-ease),
    transform 0.35s var(--fc-ease);
}

/* ── Label ── */
.feature-card h6 {
  font-family: "Poppins", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fc-muted);
  margin: 0;
  line-height: 1.4;
  position: relative;
  z-index: 1;
  transition: color 0.35s var(--fc-ease);
}

/* ── Tooltip (shown on hover) ── */
.fc-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: rgba(168, 183, 229, 0.92);
  border: 1px solid rgba(0, 229, 255, 0.18);
  color: var(--fc-text);
  font-size: 0.7rem;
  line-height: 1.5;
  white-space: nowrap;
  padding: 6px 12px;
  border-radius: 8px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.22s, transform 0.22s;
  z-index: 99;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.fc-tooltip::after {
  content: '';
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(0, 229, 255, 0.18);
}
.feature-card:hover .fc-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Ripple click effect ── */
@keyframes fc-ripple {
  0%   { transform: scale(0);   opacity: 0.4; }
  100% { transform: scale(3.5); opacity: 0;   }
}
.fc-ripple-el {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--fc-accent);
  pointer-events: none;
  transform: scale(0);
  opacity: 0;
  animation: fc-ripple 0.65s ease-out forwards;
}

/* ── Scroll entrance animation ── */
@keyframes fc-cardIn {
  to { opacity: 1; transform: translateY(0); }
}
.feature-card.fc-visible {
  animation: fc-cardIn 0.55s var(--fc-ease) forwards;
}

/* ── Responsive ── */
@media (max-width: 576px) {
  .feature-card    { padding: 22px 14px 18px; }
  .feature-card i  { font-size: 1.7rem; }
  .feature-card h6 { font-size: 0.72rem; }
  .scroll-btn-group { bottom: 20px; right: 16px; }
}


/* ============================================================
   PASTE THIS HTML just before your closing </body> tag:

   <div id="scroll-progress"></div>

   <div class="scroll-btn-group">
     <button class="scroll-btn" id="btn-scroll-top"
             data-tip="Scroll Top" aria-label="Scroll to top">
       <i class="bi bi-chevron-up"></i>
     </button>
     <button class="scroll-btn visible" id="btn-scroll-bottom"
             data-tip="Scroll Down" aria-label="Scroll down">
       <i class="bi bi-chevron-down"></i>
     </button>
   </div>

   ============================================================ */