/*
 * Digitale Kwaliteit - Main Stylesheet
 * Shared custom CSS for all pages
 */

/* Base Styles */
body {
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Accessibility - Focus Styles */
:focus-visible {
  outline: 2px solid #000;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Glass Card Effect */
.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Animation Delays */
.delay-100 {
  transition-delay: 0.1s;
}

.delay-200 {
  transition-delay: 0.2s;
}

.delay-300 {
  transition-delay: 0.3s;
}

/* Success Icon Animation */
.success-icon-anim {
  animation: popIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: scale(0.5);
}

@keyframes popIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Background Grid Pattern */
.bg-grid-pattern {
  background-size: 40px 40px;
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px);
}

/* 3D Transform Utilities */
.rotate-x-0 {
  --tw-rotate-x: 0deg;
  transform: translate3d(var(--tw-translate-x, 0), var(--tw-translate-y, 0), var(--tw-translate-z, 0))
             rotateX(var(--tw-rotate-x, 0))
             rotateY(var(--tw-rotate-y, 0))
             rotateZ(var(--tw-rotate-z, 0))
             skewX(var(--tw-skew-x, 0))
             skewY(var(--tw-skew-y, 0))
             scaleX(var(--tw-scale-x, 1))
             scaleY(var(--tw-scale-y, 1)) !important;
}

.rotate-y-0 {
  --tw-rotate-y: 0deg;
  transform: translate3d(var(--tw-translate-x, 0), var(--tw-translate-y, 0), var(--tw-translate-z, 0))
             rotateX(var(--tw-rotate-x, 0))
             rotateY(var(--tw-rotate-y, 0))
             rotateZ(var(--tw-rotate-z, 0))
             skewX(var(--tw-skew-x, 0))
             skewY(var(--tw-skew-y, 0))
             scaleX(var(--tw-scale-x, 1))
             scaleY(var(--tw-scale-y, 1)) !important;
}

/* Form Autofill Styling */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: #111827;
  -webkit-box-shadow: 0 0 0px 1000px #ffffff inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #ffffff;
}

::-webkit-scrollbar-thumb {
  background: #e5e7eb;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d1d5db;
}

/* Typography Refinements for Article Pages */
article h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
}

article p + p {
  margin-top: 1rem;
}

article ul {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ========================================
   Body Content Links - WCAG Compliant
   Underline voor link herkenning
   ======================================== */

/* Add underline to all body/main content links */
main a,
footer a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: text-decoration-thickness 0.2s ease;
}

/* Thicker underline on hover */
main a:hover,
footer a:hover {
  text-decoration-thickness: 2px;
}

/* Focus state for keyboard navigation */
main a:focus,
footer a:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Exception: Footer social media icon links (icon-only, no text) */
footer a[aria-label] {
  text-decoration: none !important;
}

/* Exception: Button-styled links should not get underline */
a[class*="bg-"],
a[class*="rounded-full"] {
  text-decoration: none !important;
}
