/**
 * Bouw Template - CSS Design System
 * Zero JavaScript, Pure CSS Performance
 */

/* ============================================
   LAYOUT CONTRACT + PRIMITIVES
   ============================================ */

.section {
  padding-block: var(--bouw-space-lg);
  padding-inline: var(--bouw-responsive-gutter);
}

.section--sm {
  padding-block: var(--bouw-space-md);
}

.section--lg {
  padding-block: var(--bouw-space-xl);
}

.section--flush {
  padding-block: var(--bouw-space-sm);
}

.container {
  width: min(100%, var(--bouw-layout-content-width));
  margin-inline: auto;
  padding-inline: var(--bouw-responsive-gutter);
}

.container--wide {
  width: min(100%, var(--bouw-layout-wide-width));
}

.container--full {
  width: 100%;
  padding-inline: var(--bouw-responsive-gutter);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--bouw-space-md);
}

.stack--sm {
  gap: var(--bouw-space-sm);
}

.stack--lg {
  gap: var(--bouw-space-xl);
}

.grid {
  display: grid;
  gap: var(--bouw-space-md);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.content {
  max-width: 70ch;
  line-height: var(--bouw-line-height-normal);
}

.pattern-hero-01 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--bouw-space-lg);
  align-items: center;
}

.pattern-cta {
  background: var(--bouw-color-primary);
  color: var(--bouw-color-base);
  padding: var(--bouw-space-lg);
  border-radius: var(--bouw-radius-lg);
  text-align: center;
}

.pattern-card {
  background: var(--bouw-color-base);
  border-radius: var(--bouw-radius-md);
  padding: var(--bouw-space-md);
  box-shadow: var(--bouw-shadow-md);
  display: flex;
  flex-direction: column;
  gap: var(--bouw-space-sm);
}

/* ============================================
   P1-1: SECTION SPACING HIERARCHY
   Sacred three levels — vakkundig metselwerk.
   ============================================ */

/* Alternating section backgrounds */
.bouw-white { background: var(--bouw-color-base); }
.bouw-surface { background: var(--bouw-color-surface); }
.bouw-accent {
  background: var(--bouw-color-primary);
  color: var(--bouw-color-base);
}
.bouw-cta-break {
  background: var(--bouw-color-primary);
  color: var(--bouw-color-base);
}

/* Standardized section padding using the sacred gap */
.bouw-white,
.bouw-surface,
.bouw-accent,
.bouw-cta-break {
  padding-block: var(--bouw-section-gap);
}

/* Heading → content gap: consistent everywhere */
.bouw-white .wp-block-heading,
.bouw-surface .wp-block-heading,
.bouw-accent .wp-block-heading {
  margin-bottom: var(--bouw-heading-gap);
}

/* Subtitle paragraph right after heading */
.bouw-white .wp-block-heading + .wp-block-paragraph,
.bouw-surface .wp-block-heading + .wp-block-paragraph,
.bouw-accent .wp-block-heading + .wp-block-paragraph {
  margin-bottom: var(--bouw-heading-gap);
}

/* ============================================
   LAYOUT CLASSES
   ============================================ */
.bouw-container {
  width: 100%;
  max-width: var(--bouw-container-xl);
  margin-inline: auto;
  padding-inline: var(--bouw-space-lg);
}

.bouw-container-sm { max-width: var(--bouw-container-sm); }
.bouw-container-md { max-width: var(--bouw-container-md); }
.bouw-container-lg { max-width: var(--bouw-container-lg); }
.bouw-container-xl { max-width: var(--bouw-container-xl); }
.bouw-container-2xl { max-width: var(--bouw-container-2xl); }
.bouw-container-full { max-width: 100%; }

/* Section spacing */
.bouw-section {
  padding-block: var(--bouw-space-4xl);
}

.bouw-section-sm { padding-block: var(--bouw-space-2xl); }
.bouw-section-lg { padding-block: var(--bouw-space-5xl); }

/* ============================================
   GRID SYSTEM
   ============================================ */

.bouw-grid {
  display: grid;
  gap: var(--bouw-space-lg);
}

.bouw-grid-1 { grid-template-columns: 1fr; }
.bouw-grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr)); }
.bouw-grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.bouw-grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.bouw-grid-5 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.bouw-grid-6 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }

/* Responsive grid */
@container (min-width: 768px) {
  .bouw-grid-md-2 { grid-template-columns: repeat(2, 1fr); }
  .bouw-grid-md-3 { grid-template-columns: repeat(3, 1fr); }
  .bouw-grid-md-4 { grid-template-columns: repeat(4, 1fr); }
}

@container (min-width: 1024px) {
  .bouw-grid-lg-3 { grid-template-columns: repeat(3, 1fr); }
  .bouw-grid-lg-4 { grid-template-columns: repeat(4, 1fr); }
  .bouw-grid-lg-5 { grid-template-columns: repeat(5, 1fr); }
}

/* Flex utilities */
.bouw-flex { display: flex; }
.bouw-flex-col { flex-direction: column; }
.bouw-flex-wrap { flex-wrap: wrap; }
.bouw-items-center { align-items: center; }
.bouw-items-start { align-items: flex-start; }
.bouw-items-end { align-items: flex-end; }
.bouw-justify-center { justify-content: center; }
.bouw-justify-between { justify-content: space-between; }
.bouw-justify-around { justify-content: space-around; }
.bouw-gap-sm { gap: var(--bouw-space-sm); }
.bouw-gap-md { gap: var(--bouw-space-md); }
.bouw-gap-lg { gap: var(--bouw-space-lg); }
.bouw-gap-xl { gap: var(--bouw-space-xl); }

/* ============================================
   TYPOGRAPHY
   ============================================ */

.bouw-h1 {
  font-family: var(--bouw-font-heading);
  font-size: var(--bouw-text-5xl);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-block: var(--bouw-space-xl) var(--bouw-space-lg);
}

.bouw-h2 {
  font-family: var(--bouw-font-heading);
  font-size: var(--bouw-text-4xl);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-block: var(--bouw-space-lg) var(--bouw-space-md);
}

.bouw-h3 {
  font-family: var(--bouw-font-heading);
  font-size: var(--bouw-text-3xl);
  line-height: 1.3;
  font-weight: 600;
  margin-block: var(--bouw-space-md) var(--bouw-space-sm);
}

.bouw-h4 {
  font-family: var(--bouw-font-heading);
  font-size: var(--bouw-text-2xl);
  line-height: 1.4;
  font-weight: 600;
  margin-block: var(--bouw-space-md) var(--bouw-space-sm);
}

.bouw-h5 {
  font-family: var(--bouw-font-heading);
  font-size: var(--bouw-text-xl);
  line-height: 1.5;
  font-weight: 600;
  margin-block: var(--bouw-space-sm) var(--bouw-space-xs);
}

.bouw-h6 {
  font-family: var(--bouw-font-heading);
  font-size: var(--bouw-text-lg);
  line-height: 1.5;
  font-weight: 600;
  margin-block: var(--bouw-space-sm) var(--bouw-space-xs);
}

.bouw-lead {
  font-size: var(--bouw-text-lg);
  line-height: 1.7;
  color: var(--bouw-gray-700);
}

.bouw-text {
  font-family: var(--bouw-font-body);
  font-size: var(--bouw-text-base);
  line-height: 1.6;
}

.bouw-text-sm { font-size: var(--bouw-text-sm); }
.bouw-text-lg { font-size: var(--bouw-text-lg); }
.bouw-text-xl { font-size: var(--bouw-text-xl); }

.bouw-text-center { text-align: center; }
.bouw-text-left { text-align: left; }
.bouw-text-right { text-align: right; }

.bouw-font-bold { font-weight: 700; }
.bouw-font-semibold { font-weight: 600; }
.bouw-font-medium { font-weight: 500; }
.bouw-font-normal { font-weight: 400; }
.bouw-font-light { font-weight: 300; }

/* ============================================
   COMPONENTS - CARDS
   ============================================ */

.bouw-card {
  background: var(--bouw-white);
  border-radius: var(--bouw-radius-lg);
  box-shadow: var(--bouw-shadow-md);
  padding: var(--bouw-space-xl);
  transition: transform var(--bouw-transition-base),
              box-shadow var(--bouw-transition-base);
  container-type: inline-size;
}

.bouw-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--bouw-shadow-lg);
}

.bouw-card-header {
  margin-bottom: var(--bouw-space-lg);
  padding-bottom: var(--bouw-space-md);
  border-bottom: 1px solid var(--bouw-gray-200);
}

.bouw-card-body {
  margin-block: var(--bouw-space-md);
}

.bouw-card-footer {
  margin-top: var(--bouw-space-lg);
  padding-top: var(--bouw-space-md);
  border-top: 1px solid var(--bouw-gray-200);
}

/* ============================================
   COMPONENTS - BUTTONS
   ============================================ */

.bouw-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--bouw-space-sm);
  padding: var(--bouw-space-md) var(--bouw-space-xl);
  font-family: var(--bouw-font-body);
  font-size: var(--bouw-text-base);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border-radius: var(--bouw-radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--bouw-transition-base);
  position: relative;
  overflow: hidden;
}

.bouw-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width var(--bouw-transition-slow),
              height var(--bouw-transition-slow);
}

.bouw-btn:hover::before {
  width: 300px;
  height: 300px;
}

.bouw-btn-primary {
  background: var(--bouw-primary);
  color: var(--bouw-white);
}

.bouw-btn-primary:hover {
  background: var(--bouw-primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--bouw-shadow-md);
}

.bouw-btn-secondary {
  background: var(--bouw-secondary);
  color: var(--bouw-gray-900);
}

.bouw-btn-secondary:hover {
  background: var(--bouw-secondary-dark);
  transform: translateY(-1px);
  box-shadow: var(--bouw-shadow-md);
}

.bouw-btn-outline {
  background: transparent;
  color: var(--bouw-primary);
  border-color: var(--bouw-primary);
}

.bouw-btn-outline:hover {
  background: var(--bouw-primary);
  color: var(--bouw-white);
}

.bouw-btn-ghost {
  background: transparent;
  color: var(--bouw-gray-700);
}

.bouw-btn-ghost:hover {
  background: var(--bouw-gray-100);
}

.bouw-btn-sm {
  padding: var(--bouw-space-sm) var(--bouw-space-md);
  font-size: var(--bouw-text-sm);
}

.bouw-btn-lg {
  padding: var(--bouw-space-lg) var(--bouw-space-2xl);
  font-size: var(--bouw-text-lg);
}

.bouw-btn-full {
  width: 100%;
}

/* ============================================
   COMPONENTS - FORMS (CSS-Only)
   ============================================ */

.bouw-form {
  display: flex;
  flex-direction: column;
  gap: var(--bouw-space-lg);
}

.bouw-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--bouw-space-sm);
}

.bouw-form-label {
  font-size: var(--bouw-text-sm);
  font-weight: 600;
  color: var(--bouw-gray-700);
}

.bouw-form-input,
.bouw-form-select,
.bouw-form-textarea {
  padding: var(--bouw-space-md);
  font-size: var(--bouw-text-base);
  border: 2px solid var(--bouw-gray-300);
  border-radius: var(--bouw-radius-md);
  background: var(--bouw-white);
  transition: border-color var(--bouw-transition-base),
              box-shadow var(--bouw-transition-base);
}

.bouw-form-input:focus,
.bouw-form-select:focus,
.bouw-form-textarea:focus {
  outline: none;
  border-color: var(--bouw-primary);
  box-shadow: 0 0 0 3px rgba(46, 139, 87, 0.1);
}

/* Note: :valid / :invalid auto-coloring removed — was triggering orange/red
   on untouched required fields and felt aggressive. Only color on :focus.
   Explicit error state should be applied via .bouw-form-input--error class. */
.bouw-form-input--error {
  border-color: #dc2626;
}

.bouw-form-textarea {
  resize: vertical;
  min-height: 120px;
}

.bouw-form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--bouw-space-lg);
}

/* ============================================
   CSS-ONLY ACCORDION
   ============================================ */

.bouw-accordion {
  border: 1px solid var(--bouw-gray-200);
  border-radius: var(--bouw-radius-lg);
  overflow: hidden;
}

.bouw-accordion-item {
  border-bottom: 1px solid var(--bouw-gray-200);
}

.bouw-accordion-item:last-child {
  border-bottom: none;
}

.bouw-accordion-toggle {
  display: none;
}

.bouw-accordion-header {
  display: block;
  padding: var(--bouw-space-lg);
  font-size: var(--bouw-text-lg);
  font-weight: 600;
  cursor: pointer;
  background: var(--bouw-white);
  transition: background var(--bouw-transition-base);
  position: relative;
}

.bouw-accordion-header::after {
  content: '+';
  position: absolute;
  right: var(--bouw-space-lg);
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--bouw-text-xl);
  transition: transform var(--bouw-transition-base);
}

.bouw-accordion-header:hover {
  background: var(--bouw-gray-50);
}

.bouw-accordion-content {
  max-height: 0;
  overflow: hidden;
  padding: 0 var(--bouw-space-lg);
  background: var(--bouw-gray-50);
  transition: max-height var(--bouw-transition-slow),
              padding var(--bouw-transition-base);
}

.bouw-accordion-toggle:checked ~ .bouw-accordion-header::after {
  transform: translateY(-50%) rotate(45deg);
}

.bouw-accordion-toggle:checked ~ .bouw-accordion-content {
  max-height: 500px;
  padding: var(--bouw-space-lg);
}

/* ============================================
   CSS-ONLY TABS
   ============================================ */

.bouw-tabs {
  container-type: inline-size;
}

.bouw-tabs-nav {
  display: flex;
  gap: var(--bouw-space-sm);
  border-bottom: 2px solid var(--bouw-gray-200);
  overflow-x: auto;
  scrollbar-width: thin;
}

.bouw-tabs-nav::-webkit-scrollbar {
  height: 4px;
}

.bouw-tabs-nav::-webkit-scrollbar-track {
  background: var(--bouw-gray-100);
}

.bouw-tabs-nav::-webkit-scrollbar-thumb {
  background: var(--bouw-gray-400);
  border-radius: var(--bouw-radius-full);
}

.bouw-tab-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.bouw-tab-label {
  display: inline-block;
  padding: var(--bouw-space-md) var(--bouw-space-xl);
  cursor: pointer;
  font-weight: 600;
  color: var(--bouw-gray-600);
  border-bottom: 3px solid transparent;
  transition: all var(--bouw-transition-base);
  white-space: nowrap;
}

.bouw-tab-label:hover {
  color: var(--bouw-gray-800);
  background: var(--bouw-gray-50);
}

.bouw-tab-radio:checked + .bouw-tab-label {
  color: var(--bouw-primary);
  border-bottom-color: var(--bouw-primary);
}

.bouw-tab-content {
  display: none;
  padding: var(--bouw-space-xl) 0;
  animation: fadeIn var(--bouw-transition-base);
}

.bouw-tab-radio:checked ~ .bouw-tab-content {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tab specific selectors */
#bouw-tab1:checked ~ .bouw-tabs-content .bouw-tab-content[data-tab="1"],
#bouw-tab2:checked ~ .bouw-tabs-content .bouw-tab-content[data-tab="2"],
#bouw-tab3:checked ~ .bouw-tabs-content .bouw-tab-content[data-tab="3"],
#bouw-tab4:checked ~ .bouw-tabs-content .bouw-tab-content[data-tab="4"],
#bouw-tab5:checked ~ .bouw-tabs-content .bouw-tab-content[data-tab="5"] {
  display: block;
}

/* ============================================
   CSS-ONLY CAROUSEL
   ============================================ */

.bouw-carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--bouw-radius-lg);
}

.bouw-carousel-track {
  display: flex;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.bouw-carousel-track::-webkit-scrollbar {
  display: none;
}

.bouw-carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.bouw-carousel-nav {
  position: absolute;
  bottom: var(--bouw-space-lg);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--bouw-space-sm);
  z-index: 10;
}

.bouw-carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: var(--bouw-radius-full);
  background: var(--bouw-white);
  opacity: 0.5;
  transition: opacity var(--bouw-transition-base),
              transform var(--bouw-transition-base);
}

.bouw-carousel-dot:hover {
  opacity: 0.8;
  transform: scale(1.2);
}

/* CSS-only active state using :target */
.bouw-carousel-slide:target ~ .bouw-carousel-nav .bouw-carousel-dot {
  opacity: 1;
}

/* ============================================
   CSS-ONLY DROPDOWN
   ============================================ */

.bouw-dropdown {
  position: relative;
  display: inline-block;
}

.bouw-dropdown-toggle {
  cursor: pointer;
}

.bouw-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--bouw-white);
  border: 1px solid var(--bouw-gray-200);
  border-radius: var(--bouw-radius-md);
  box-shadow: var(--bouw-shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--bouw-transition-base);
  z-index: 100;
}

.bouw-dropdown:hover .bouw-dropdown-menu,
.bouw-dropdown:focus-within .bouw-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.bouw-dropdown-item {
  display: block;
  padding: var(--bouw-space-md) var(--bouw-space-lg);
  color: var(--bouw-gray-700);
  text-decoration: none;
  transition: background var(--bouw-transition-base);
}

.bouw-dropdown-item:hover {
  background: var(--bouw-gray-50);
}

/* ============================================
   CSS-ONLY MODAL (using :target)
   ============================================ */

.bouw-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--bouw-space-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--bouw-transition-base);
  z-index: 1000;
}

.bouw-modal:target {
  opacity: 1;
  visibility: visible;
}

.bouw-modal-content {
  background: var(--bouw-white);
  border-radius: var(--bouw-radius-xl);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--bouw-space-2xl);
  transform: scale(0.9);
  transition: transform var(--bouw-transition-base);
}

.bouw-modal:target .bouw-modal-content {
  transform: scale(1);
}

.bouw-modal-close {
  position: absolute;
  top: var(--bouw-space-lg);
  right: var(--bouw-space-lg);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bouw-gray-100);
  border-radius: var(--bouw-radius-full);
  text-decoration: none;
  color: var(--bouw-gray-700);
  transition: all var(--bouw-transition-base);
}

.bouw-modal-close:hover {
  background: var(--bouw-gray-200);
  transform: rotate(90deg);
}

/* ============================================
   CSS-ONLY TOOLTIPS
   ============================================ */

.bouw-tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.bouw-tooltip::before,
.bouw-tooltip::after {
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition: all var(--bouw-transition-base);
  pointer-events: none;
  z-index: 10;
}

.bouw-tooltip::before {
  content: attr(data-tooltip);
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--bouw-gray-900);
  color: var(--bouw-white);
  padding: var(--bouw-space-sm) var(--bouw-space-md);
  border-radius: var(--bouw-radius-md);
  font-size: var(--bouw-text-sm);
  white-space: nowrap;
}

.bouw-tooltip::after {
  content: '';
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  border: 4px solid transparent;
  border-top-color: var(--bouw-gray-900);
}

.bouw-tooltip:hover::before,
.bouw-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ============================================
   CSS-ONLY PROGRESS BARS
   ============================================ */

.bouw-progress {
  width: 100%;
  height: 20px;
  background: var(--bouw-gray-200);
  border-radius: var(--bouw-radius-full);
  overflow: hidden;
  position: relative;
}

.bouw-progress-bar {
  height: 100%;
  background: linear-gradient(90deg,
    var(--bouw-primary) 0%,
    var(--bouw-primary-light) 100%);
  border-radius: var(--bouw-radius-full);
  animation: progressSlide 2s ease-out;
  position: relative;
  overflow: hidden;
}

.bouw-progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent);
  animation: shimmer 2s infinite;
}

@keyframes progressSlide {
  from { width: 0; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.bouw-progress-bar[data-progress="25"] { width: 25%; }
.bouw-progress-bar[data-progress="50"] { width: 50%; }
.bouw-progress-bar[data-progress="75"] { width: 75%; }
.bouw-progress-bar[data-progress="100"] { width: 100%; }

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Display */
.bouw-hidden { display: none; }
.bouw-block { display: block; }
.bouw-inline-block { display: inline-block; }
.bouw-inline { display: inline; }

/* Position */
.bouw-relative { position: relative; }
.bouw-absolute { position: absolute; }
.bouw-fixed { position: fixed; }
.bouw-sticky { position: sticky; top: 0; }

/* Colors */
.bouw-bg-primary { background-color: var(--bouw-primary); }
.bouw-bg-secondary { background-color: var(--bouw-secondary); }
.bouw-bg-accent { background-color: var(--bouw-accent); }
.bouw-bg-white { background-color: var(--bouw-white); }
.bouw-bg-gray-50 { background-color: var(--bouw-gray-50); }
.bouw-bg-gray-100 { background-color: var(--bouw-gray-100); }
.bouw-bg-gray-900 { background-color: var(--bouw-gray-900); }

.bouw-text-primary { color: var(--bouw-primary); }
.bouw-text-secondary { color: var(--bouw-secondary); }
.bouw-text-accent { color: var(--bouw-accent); }
.bouw-text-white { color: var(--bouw-white); }
.bouw-text-gray-700 { color: var(--bouw-gray-700); }
.bouw-text-gray-900 { color: var(--bouw-gray-900); }

/* Spacing */
.bouw-m-0 { margin: 0; }
.bouw-m-auto { margin: auto; }
.bouw-mx-auto { margin-inline: auto; }
.bouw-my-auto { margin-block: auto; }

.bouw-p-0 { padding: 0; }
.bouw-p-sm { padding: var(--bouw-space-sm); }
.bouw-p-md { padding: var(--bouw-space-md); }
.bouw-p-lg { padding: var(--bouw-space-lg); }
.bouw-p-xl { padding: var(--bouw-space-xl); }
.bouw-p-2xl { padding: var(--bouw-space-2xl); }

.bouw-pt-sm { padding-top: var(--bouw-space-sm); }
.bouw-pt-md { padding-top: var(--bouw-space-md); }
.bouw-pt-lg { padding-top: var(--bouw-space-lg); }
.bouw-pt-xl { padding-top: var(--bouw-space-xl); }
.bouw-pt-2xl { padding-top: var(--bouw-space-2xl); }

.bouw-pb-sm { padding-bottom: var(--bouw-space-sm); }
.bouw-pb-md { padding-bottom: var(--bouw-space-md); }
.bouw-pb-lg { padding-bottom: var(--bouw-space-lg); }
.bouw-pb-xl { padding-bottom: var(--bouw-space-xl); }
.bouw-pb-2xl { padding-bottom: var(--bouw-space-2xl); }

/* Border */
.bouw-border { border: 1px solid var(--bouw-gray-200); }
.bouw-border-top { border-top: 1px solid var(--bouw-gray-200); }
.bouw-border-bottom { border-bottom: 1px solid var(--bouw-gray-200); }
.bouw-border-left { border-left: 1px solid var(--bouw-gray-200); }
.bouw-border-right { border-right: 1px solid var(--bouw-gray-200); }

.bouw-rounded-sm { border-radius: var(--bouw-radius-sm); }
.bouw-rounded-md { border-radius: var(--bouw-radius-md); }
.bouw-rounded-lg { border-radius: var(--bouw-radius-lg); }
.bouw-rounded-xl { border-radius: var(--bouw-radius-xl); }
.bouw-rounded-full { border-radius: var(--bouw-radius-full); }

/* Shadow */
.bouw-shadow-sm { box-shadow: var(--bouw-shadow-sm); }
.bouw-shadow-md { box-shadow: var(--bouw-shadow-md); }
.bouw-shadow-lg { box-shadow: var(--bouw-shadow-lg); }
.bouw-shadow-xl { box-shadow: var(--bouw-shadow-xl); }
.bouw-shadow-2xl { box-shadow: var(--bouw-shadow-2xl); }
.bouw-shadow-none { box-shadow: none; }

/* Width */
.bouw-w-full { width: 100%; }
.bouw-w-auto { width: auto; }
.bouw-max-w-full { max-width: 100%; }

/* Height */
.bouw-h-full { height: 100%; }
.bouw-h-auto { height: auto; }
.bouw-min-h-screen { min-height: 100vh; }

/* Overflow */
.bouw-overflow-hidden { overflow: hidden; }
.bouw-overflow-auto { overflow: auto; }
.bouw-overflow-x-auto { overflow-x: auto; }
.bouw-overflow-y-auto { overflow-y: auto; }

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 639px) {
  .bouw-hide-mobile { display: none; }
}

@media (min-width: 640px) and (max-width: 1023px) {
  .bouw-hide-tablet { display: none; }
}

@media (min-width: 1024px) {
  .bouw-hide-desktop { display: none; }
}

@media (min-width: 640px) {
  .bouw-show-tablet { display: block; }
}

@media (min-width: 1024px) {
  .bouw-show-desktop { display: block; }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInDown {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInLeft {
  from { transform: translateX(-20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.bouw-animate-fade { animation: fadeIn var(--bouw-transition-slow) ease-out; }
.bouw-animate-slide-up { animation: slideInUp var(--bouw-transition-slow) ease-out; }
.bouw-animate-slide-down { animation: slideInDown var(--bouw-transition-slow) ease-out; }
.bouw-animate-slide-left { animation: slideInLeft var(--bouw-transition-slow) ease-out; }
.bouw-animate-slide-right { animation: slideInRight var(--bouw-transition-slow) ease-out; }
.bouw-animate-pulse { animation: pulse 2s infinite; }

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .bouw-no-print { display: none !important; }

  .bouw-card {
    box-shadow: none;
    border: 1px solid var(--bouw-gray-300);
  }

  .bouw-btn {
    border: 1px solid currentColor;
  }
}
