/* --------------------------------------------------------------------------
Advanced Effects & Utilities (Phase 4 - Supplements)
Gradient overlays, focus rings, and premium effects
-------------------------------------------------------------------------- */

/* ===== GRADIENT OVERLAYS ===== */

/* Subtle gradient overlay on images */
.card-thumbnail::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.1) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover .card-thumbnail::after {
  opacity: 1;
}

/* ===== FOCUS RING UTILITIES ===== */

/* Premium focus ring */
.focus-ring {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ===== HOVER LIFT EFFECT ===== */

.hover-lift {
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ===== UNDERLINE EFFECTS ===== */

/* Animated underline for links */
.link-underline {
  position: relative;
  text-decoration: none;
}

.link-underline::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-underline:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* ===== GLOW EFFECTS ===== */

/* Subtle glow on focus */
.glow-on-focus:focus {
  box-shadow: 0 0 0 4px rgba(15, 133, 119, 0.1);
  outline: 2px solid var(--color-primary);
  outline-offset: 0;
}

/* Glow on hover for cards */
.card.glow-on-hover:hover {
  box-shadow: 0 0 20px rgba(15, 133, 119, 0.15);
}

/* ===== TEXT EFFECTS ===== */

/* Text with background animation */
.highlight-on-hover {
  background: linear-gradient(
    120deg,
    transparent,
    rgba(15, 133, 119, 0.15),
    transparent
  );
  background-size: 200% 100%;
  background-position: 200% 0;
  transition: background-position 0.5s ease;
}

.highlight-on-hover:hover {
  background-position: -200% 0;
}

/* ===== TRANSFORM EFFECTS ===== */

/* Subtle scale on hover */
.scale-on-hover {
  transition: transform 0.2s ease;
}

.scale-on-hover:hover {
  transform: scale(1.02);
}

/* Rotate on hover (subtle) */
.rotate-on-hover {
  transition: transform 0.3s ease;
}

.rotate-on-hover:hover {
  transform: rotate(2deg);
}

/* ===== OPACITY EFFECTS ===== */

/* Fade in effect */
.fade-in-on-hover {
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.fade-in-on-hover:hover {
  opacity: 1;
}

/* ===== BORDER EFFECTS ===== */

/* Border animation on hover */
.border-animate {
  position: relative;
  border: 2px solid var(--color-border);
  transition: all 0.3s ease;
}

.border-animate::before {
  content: "";
  position: absolute;
  top: 0;
  left: -2px;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

.border-animate::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: -2px;
  width: 0;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease 0.1s;
}

.border-animate:hover::before {
  width: calc(100% + 4px);
}

.border-animate:hover::after {
  width: calc(100% + 4px);
}

/* ===== SHADOW EFFECTS ===== */

/* Dynamic shadow */
.shadow-hover {
  transition: box-shadow 0.3s ease;
}

.shadow-hover:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

/* ===== COLOR TRANSITIONS ===== */

/* Smooth color transition */
.color-transition {
  transition:
    color 0.3s ease,
    background-color 0.3s ease,
    border-color 0.3s ease;
}

/* ===== ICON ANIMATIONS ===== */

/* Arrow animation */
.arrow-animate {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.arrow-animate::after {
  content: "→";
  transition:
    transform 0.2s ease,
    margin-left 0.2s ease;
}

.arrow-animate:hover::after {
  transform: translateX(2px);
  margin-left: 0.25em;
}

/* ===== BACKDROP EFFECTS ===== */

/* Frosted glass effect */
.glass {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== CLIP-PATH EFFECTS ===== */

/* Diagonal clip on hover */
.clip-on-hover {
  transition: clip-path 0.4s ease;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}

.clip-on-hover:hover {
  clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%);
}

/* ===== TRANSITION MODIFIERS ===== */

.fast {
  transition-duration: 0.15s;
}
.base {
  transition-duration: 0.2s;
}
.slow {
  transition-duration: 0.3s;
}
.slower {
  transition-duration: 0.5s;
}

/* Easing functions */
.ease-in {
  transition-timing-function: cubic-bezier(0.4, 0, 1, 1);
}
.ease-out {
  transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
.ease-in-out {
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== VISIBILITY UTILITIES ===== */

/* Smooth visibility toggle */
.fade-show {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

.fade-hide {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}

/* ===== SPINNER ANIMATION ===== */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner {
  animation: spin 1s linear infinite;
}

/* ===== FLOATING ANIMATION ===== */

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* ===== WIGGLE ANIMATION ===== */

@keyframes wiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-1deg);
  }
  75% {
    transform: rotate(1deg);
  }
}

.wiggle {
  animation: wiggle 0.5s ease-in-out;
}

.wiggle:hover {
  animation: wiggle 0.5s ease-in-out infinite;
}
