/* ==========================================================================
   PACKAGE INDEX PAGE — SAFE ISOLATED STYLES
   ========================================================================== */

.rw-package-index {
  position: relative;
}

/* ================== Category Title ================== */
.rw-package-index .rw-category-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 60px 0 25px;
  color: #0b2447;
  font-family: "Poppins", sans-serif;
  position: relative;
  padding-left: 12px;
}

.rw-package-index .rw-category-title::before {
  content: "";
  position: absolute;
  width: 6px;
  height: 24px;
  background: linear-gradient(45deg, #00a8ff, #00ff95);
  left: 0;
  top: 6px;
  border-radius: 4px;
}

/* ================== GRID ================== */
.rw-package-index .rw-package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-bottom: 50px;
}

/* ================== CARD ================== */
.rw-package-index .rw-card-entry {
  background: #ffffff;
  border-radius: 18px;
  padding: 22px;
  text-decoration: none;
  display: block;
  color: #000;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
}

/* ICON SECTION */
.rw-package-index .rw-card-icon {
  font-size: 34px;
  margin-bottom: 10px;
  color: #00a8ff;
}

/* Example Icons (Emoji-based for simplicity — can be replaced with SVG later) */
.rw-icon-static     { content: "🧱"; }
.rw-icon-dynamic    { content: "⚙️"; }
.rw-icon-blog       { content: "📝"; }
.rw-icon-ecom       { content: "🛒"; }
.rw-icon-landing    { content: "🚀"; }
.rw-icon-custom     { content: "💼"; }

/* Inject icon at top using ::before */
.rw-package-index .rw-card-entry[data-icon]:before {
  content: attr(data-icon);
  font-size: 34px;
  display: block;
  margin-bottom: 12px;
  color: #00a8ff;
}

/* Card Hover */
.rw-package-index .rw-card-entry:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(0, 150, 255, 0.18);
  border-color: rgba(0, 150, 255, 0.3);
}

/* ================== MOST POPULAR BADGE ================== */
.rw-package-index .rw-badge-popular {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(45deg, #ff9900, #ff5e00);
  padding: 5px 11px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(255,100,0,0.25);
  z-index: 5;
}

/* ================== Animated Gradient Border ================== */
.rw-package-index .rw-card-entry::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 2px;
  background: linear-gradient(120deg, rgba(0,168,255,0.6), rgba(0,255,149,0.6), rgba(0,168,255,0.6));
  background-size: 300% 300%;
  animation: borderMove 4s linear 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.3s ease;
}

.rw-package-index .rw-card-entry:hover::after {
  opacity: 1;
}

@keyframes borderMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ================== Fade-in Animation ================== */
.rw-package-index .rw-fade-in {
  opacity: 0;
  transform: translateY(12px);
  animation: rwFade 0.45s ease forwards;
}

@keyframes rwFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================== Floating Compare Button ================== */
.rw-compare-floating-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: linear-gradient(45deg, #00a8ff, #00ff95);
  padding: 14px 22px;
  color: #fff;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(0,168,255,0.4);
  z-index: 9999;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.rw-compare-floating-btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(0,255,149,0.45);
}

/* ================== Mobile ================== */
@media (max-width: 600px) {
  .rw-package-index .rw-category-title {
    font-size: 1.5rem;
    margin-top: 40px;
  }

  .rw-package-index .rw-card-entry {
    padding: 18px;
  }

  .rw-package-index .rw-card-entry h3 {
    font-size: 1.2rem;
  }

  .rw-package-index .rw-package-price {
    font-size: 1.2rem;
  }

  .rw-compare-floating-btn {
    bottom: 20px;
    right: 20px;
    padding: 12px 18px;
    font-size: 0.9rem;
  }
}
