/* =========================================================
   RED SWITCH - REFINED RED GLOWING CURSOR & AMBIENT AURA
   (Optimized for Crisp White, Cream & Dark Surfaces)
========================================================= */

@media (hover: hover) and (pointer: fine) {
  html.has-custom-cursor,
  html.has-custom-cursor body,
  html.has-custom-cursor a,
  html.has-custom-cursor button,
  html.has-custom-cursor input,
  html.has-custom-cursor textarea,
  html.has-custom-cursor select,
  html.has-custom-cursor [role="button"],
  html.has-custom-cursor label {
    cursor: none !important;
  }

  /* Compact Black Arrow with Refined Red Glowing Border */
  .custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    pointer-events: none !important;
    z-index: 999999;
    opacity: 0;
    transition: opacity 0.25s ease;
    will-change: left, top;
  }

  .custom-cursor.visible {
    opacity: 1;
  }

  .custom-cursor .cursor-svg {
    width: 18px;
    height: 18px;
    display: block;
    overflow: visible;
    transform-origin: 2px 2px;
    transition: transform 0.18s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.18s ease;
    filter: drop-shadow(0 0 4px rgba(255, 0, 51, 0.65)) drop-shadow(0 2px 8px rgba(220, 9, 21, 0.35));
  }

  /* Hover Scale-up Animation on Links & Interactive Elements */
  .custom-cursor.active .cursor-svg,
  .custom-cursor.cursor-hover .cursor-svg {
    transform: scale(1.12);
    filter: drop-shadow(0 0 6px rgba(255, 0, 51, 0.8)) drop-shadow(0 2px 12px rgba(220, 9, 21, 0.45));
  }

  /* Refined Ambient Red Glow (No Dark Blending Mud) */
  .cursor-ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 0, 51, 0.12) 0%, rgba(220, 9, 21, 0.05) 45%, transparent 70%);
    filter: blur(14px);
    -webkit-filter: blur(14px);
    pointer-events: none !important;
    z-index: 99998;
    opacity: 0;
    transform: translate3d(-500px, -500px, 0);
    transition: opacity 0.35s ease, width 0.3s ease, height 0.3s ease, background 0.3s ease;
    will-change: transform;
  }

  .cursor-ambient-glow.visible {
    opacity: 1;
  }

  .cursor-ambient-glow.hovering,
  .cursor-ambient-glow.active {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255, 0, 51, 0.18) 0%, rgba(220, 9, 21, 0.08) 50%, transparent 70%);
  }

  /* Refined Red Border & Soft Shadow on Cards, Buttons, and Containers */
  .service-card,
  .metric-card,
  .team-card,
  .option-card,
  .layered-bounding-box,
  .book-btn {
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.35s ease;
  }

  .service-card:hover,
  .metric-card:hover,
  .team-card:hover,
  .layered-bounding-box:hover {
    border-color: #DC0915 !important;
    box-shadow: 0 12px 30px rgba(220, 9, 21, 0.12) !important;
  }

  .book-btn:hover,
  .submit-btn:hover {
    box-shadow: 0 8px 24px rgba(220, 9, 21, 0.28), 0 0 14px rgba(255, 0, 51, 0.22) !important;
    border-color: #DC0915 !important;
  }
}

/* Mobile & Touchscreen Safeguards: Standard Native Behavior */
@media (hover: none) or (pointer: coarse) or (max-width: 768px) {
  html, body, a, button, input, textarea, select {
    cursor: auto !important;
  }

  .custom-cursor,
  .cursor-ambient-glow {
    display: none !important;
  }
}
