/* ============================================================
   Minimalist Glass Dashboard Aesthetic
   ------------------------------------------------------------
   Sections:
     1. Global / Layout
     2. Typography / Headers
     3. Service Cards
     4. Icons
     5. Text
     6. Inputs
     7. Actions / Footer Icons
     8. Animations
   ============================================================ */

/* ------------------------------------------------------------
   1. GLOBAL / LAYOUT
------------------------------------------------------------ */
body {
  background: radial-gradient(circle at 30% 20%, #101216 0%, #0d0f12 100%);
  color: #e6e6eb;
  -webkit-font-smoothing: antialiased;
}

#page_wrapper {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

/* prevent hover effects from clipping */
div {
  overflow: visible !important;
}

/* ------------------------------------------------------------
   2. TYPOGRAPHY / HEADERS
------------------------------------------------------------ */
.header .title {
  background: linear-gradient(90deg, #6366f1, #a855f7, #38bdf8);
  background-size: 200% auto;
  -webkit-text-fill-color: transparent;
  animation: shimmer 8s ease infinite;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.service-group-name {
  position: relative;
  font-weight: 600;
  color: #e5e7eb;
  letter-spacing: 0.03em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.service-group-name::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 25%;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  border-radius: 2px;
  opacity: 0.6;
}

/* ------------------------------------------------------------
   3. SERVICE CARDS
------------------------------------------------------------ */
.service-card {
  position: relative;
  z-index: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  transform-origin: center;
  will-change: transform;
  transition: transform 0.3s ease, box-shadow 0.25s ease;
  min-height: 80px;
}

.service-card:hover {
  transform: scale(1.08);
  z-index: 20;
}

/* Glass layer */
.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(40, 42, 53, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(16px) saturate(180%);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover::before {
  background: rgba(50, 54, 65, 0.45);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.45);
}

/* ------------------------------------------------------------
   4. ICONS
------------------------------------------------------------ */
.service-icon img,
.service-icon svg {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.35));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.service-card:hover .service-icon img,
.service-card:hover .service-icon svg {
  transform: scale(1.12);
  filter: drop-shadow(0 3px 10px rgba(99, 102, 241, 0.45));
}

/* ------------------------------------------------------------
   5. TEXT
------------------------------------------------------------ */
.service-name {
  color: #f9fafb;
  font-weight: 500;
  transition: color 0.25s ease;
}

.service-description {
  color: rgba(229, 231, 235, 0.65);
  transition: color 0.25s ease;
}

.service-card:hover .service-name {
  color: #c7d2fe;
}

.service-card:hover .service-description {
  color: rgba(255, 255, 255, 0.85);
}

/* ------------------------------------------------------------
   6. INPUTS
------------------------------------------------------------ */
input[type="text"],
.information-widget-search input {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  transition: background 0.25s ease;
}

input[type="text"]:focus {
  background: rgba(255, 255, 255, 0.12);
}

/* ------------------------------------------------------------
   7. ACTIONS / FOOTER ICONS
------------------------------------------------------------ */
#revalidate svg {
  transition: transform 0.25s ease, color 0.25s ease;
}

#revalidate svg:hover {
  transform: rotate(180deg);
  color: #818cf8;
}

/* ------------------------------------------------------------
   8. ANIMATIONS
------------------------------------------------------------ */
@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes shimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 100% center; }
}

/* Card train exit: dip, slide upward, fade out near the top */
@keyframes h-train-exit {
  0%   { transform: translateY(0);     opacity: 1; }
  12%  { transform: translateY(8px);   opacity: 1; }
  100% { transform: translateY(var(--tunnelY)); opacity: 0; }
}

.h-train-exit .service-card {
  animation: h-train-exit 0.3s cubic-bezier(.3,.8,.35,1) both;
  animation-delay: calc((var(--total, 1) - var(--i, 0)) * 70ms);
}

/* Card train enter */
@keyframes h-train-enter {
  0%   { transform: translateY(-140%); opacity: 0; }
  45%  { transform: translateY(12px);  opacity: 1; }
  100% { transform: translateY(0);     opacity: 1; }
}

.h-train-enter .service-card {
  animation: h-train-enter 0.3s cubic-bezier(.2,.6,.3,1) both;
  animation-delay: calc(var(--i, 0) * 70ms);
}

/* Keep panel renderable while exit anim runs */
.h-hold-open {
  display: block !important;
  height: auto !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1;
  transition: none !important;
}
