/* Dapper Dans Yard Care demo - shared component styles beyond Tailwind utilities */

:root {
  --brand-green: #166534;
  --brand-green-deep: #0A3D22;
  --brand-amber: #D97706;
  --brand-amber-deep: #B45309;
  --card-border: rgba(22, 101, 52, 0.12);
  --card-border-hover: rgba(22, 101, 52, 0.28);
}

html { scroll-behavior: smooth; }

/* Nav link with animated brand-amber underline on hover */
.nav-link {
  position: relative;
  padding: 4px 2px;
  color: #334155;
  transition: color 0.2s ease-in-out;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--brand-amber);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 2px;
}
.nav-link:hover {
  color: var(--brand-amber-deep);
}
.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}
.nav-link--active {
  color: var(--brand-green);
  font-weight: 600;
}
.nav-link--active::after {
  transform: scaleX(1);
  background: var(--brand-green);
}

/* Light-theme card (MD Figma light variant) */
.md-card {
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 32px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.25s ease-out,
              border-color 0.25s ease-out;
}
.md-card:hover {
  border-color: var(--card-border-hover);
  box-shadow: 0 10px 28px rgba(22, 101, 52, 0.12);
  transform: translateY(-2px);
}
.md-card--accent {
  border-color: rgba(217, 119, 6, 0.30);
  box-shadow: 0 8px 24px rgba(217, 119, 6, 0.08);
}

/* Before/After slider */
.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e5e7eb;
  user-select: none;
  touch-action: pan-y;
  cursor: ew-resize;
}
.ba-slider img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}
.ba-after-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  clip-path: inset(0 50% 0 0);
  will-change: clip-path;
}
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: #FFFFFF;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(22, 101, 52, 0.25), 0 2px 8px rgba(0,0,0,0.25);
  pointer-events: none;
}
.ba-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  background: #FFFFFF;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25), 0 0 0 2px var(--brand-amber);
  background-image:
    linear-gradient(45deg, transparent 45%, var(--brand-amber) 45%, var(--brand-amber) 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, var(--brand-amber) 45%, var(--brand-amber) 55%, transparent 55%);
  background-size: 12px 12px;
  background-repeat: no-repeat;
  background-position: 10px center, 22px center;
}
.ba-label {
  position: absolute;
  top: 12px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  color: #FFFFFF;
  z-index: 2;
}
.ba-label--before { left: 12px; background: rgba(10, 61, 34, 0.85); }
.ba-label--after  { right: 12px; background: rgba(180, 83, 9, 0.92); }

@media (max-width: 480px) {
  .ba-handle::after { width: 36px; height: 36px; }
}

/* Review card avatar */
.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #FFFFFF;
  flex-shrink: 0;
  font-size: 15px;
}
