/* ==========================================================================
   WK Components — flexbox-only component styles
   Override the tokens below in your theme to restyle everything.
   ========================================================================== */

.wk {
  --wk-accent: #5a9a2c;
  --wk-accent-dark: #477c21;
  --wk-dark: #16222e;
  --wk-text: #3a4047;
  --wk-muted: #6b7280;
  --wk-line: #e3e6e1;
  --wk-alt: #f4f6f2;
  --wk-white: #ffffff;
  --wk-radius: 3px;
  --wk-gap: 1.5rem;
  --wk-max: 1140px;

  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  padding: 4rem 1.25rem;
  color: var(--wk-text);
  font-family: inherit;
  line-height: 1.6;
}
.wk *, .wk *::before, .wk *::after { box-sizing: border-box; }
.wk img { display: block; max-width: 100%; height: auto; }
.wk h2, .wk h3, .wk h4 { margin: 0 0 .5em; line-height: 1.25; color: var(--wk-dark); }
.wk h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
.wk h3 { font-size: 1.15rem; }
.wk h4 { font-size: 1rem; }
.wk p { margin: 0 0 1em; }
.wk a { color: var(--wk-accent); }

.wk--alt  { background: var(--wk-alt); }
.wk--dark { background: var(--wk-dark); color: #c9d1d9; }
.wk--dark h2, .wk--dark h3, .wk--dark h4 { color: var(--wk-white); }
.wk--green { background: var(--wk-accent); color: var(--wk-white); }
.wk--green h2, .wk--green h3 { color: var(--wk-white); }
.wk--flush { padding: 0; }

/* Inner width wrapper */
.wk__inner {
  display: flex;
  flex-direction: column;
  gap: var(--wk-gap);
  width: 100%;
  max-width: var(--wk-max);
}

/* Section heading */
.wk__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 640px;
  margin: 0 auto 1rem;
}
.wk__head p { color: var(--wk-muted); margin: 0; }
.wk__rule { width: 48px; height: 3px; background: var(--wk-accent); border: 0; margin: .25rem 0 1rem; }
.wk__head .wk__rule { margin-left: auto; margin-right: auto; }

/* Generic flex row that wraps */
.wk-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wk-gap);
  width: 100%;
}
.wk-row--center { align-items: center; }
.wk-row--nogap { gap: 0; }
.wk-col { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; }
.wk-col--2 { flex: 2 1 380px; }
.wk-col--narrow { flex: 0 1 260px; }

/* Items: basis controls columns, wraps down to 1 on small screens */
.wk-i2 { flex: 1 1 calc(50% - var(--wk-gap)); min-width: 260px; }
.wk-i3 { flex: 1 1 calc(33.333% - var(--wk-gap)); min-width: 220px; }
.wk-i4 { flex: 1 1 calc(25% - var(--wk-gap)); min-width: 200px; }

/* Buttons */
.wk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  padding: .65rem 1.4rem;
  background: var(--wk-accent);
  color: var(--wk-white) !important;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  border: 2px solid var(--wk-accent);
  border-radius: var(--wk-radius);
}
.wk-btn:hover { background: var(--wk-accent-dark); border-color: var(--wk-accent-dark); }
.wk-btn--ghost { background: transparent; border-color: currentColor; color: var(--wk-white) !important; }
.wk-btn--white { background: var(--wk-white); border-color: var(--wk-white); color: var(--wk-accent) !important; }
.wk-btn--sm { padding: .4rem .9rem; font-size: .8rem; }
.wk a:focus-visible, .wk label:focus-visible, .wk summary:focus-visible,
.wk input:focus-visible + label { outline: 3px solid var(--wk-accent); outline-offset: 2px; }

/* Icon bubble */
.wk-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  color: var(--wk-dark);
}
.wk-icon svg { width: 1.75rem; height: 1.75rem; }
.wk-icon--round { border-radius: 50%; background: var(--wk-accent); color: var(--wk-white); width: 2.75rem; height: 2.75rem; }
.wk-icon--round svg { width: 1.25rem; height: 1.25rem; }

/* Cards */
.wk-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.75rem 1.25rem;
  background: var(--wk-white);
  border: 1px solid var(--wk-line);
}
.wk-card p { font-size: .875rem; color: var(--wk-muted); margin: 0; }

/* Figures with caption */
.wk-fig { display: flex; flex-direction: column; margin: 0; }
.wk-fig img { width: 100%; object-fit: cover; }
.wk-fig figcaption { padding: .5rem 0 0; font-size: .85rem; text-align: center; color: var(--wk-text); }

/* Visually hidden radio inputs used for CSS-only state */
.wk-state { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }

/* --------------------------------------------------------------------------
   Filter (gallery / portfolio) — radios: .wk-f-0 (all) … .wk-f-5
   Items carry .wk-c-1 … .wk-c-5
   -------------------------------------------------------------------------- */
.wk-filter { display: flex; flex-direction: column; gap: var(--wk-gap); position: relative; }
.wk-filter__nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; }
.wk-filter__nav label {
  cursor: pointer;
  padding: .35rem .8rem;
  font-size: .85rem;
  border-radius: var(--wk-radius);
}
.wk-filter__nav label:hover { color: var(--wk-accent); }
.wk-filter__items { display: flex; flex-wrap: wrap; gap: var(--wk-gap); }

.wk-f-0:checked ~ .wk-filter__nav label:nth-of-type(1),
.wk-f-1:checked ~ .wk-filter__nav label:nth-of-type(2),
.wk-f-2:checked ~ .wk-filter__nav label:nth-of-type(3),
.wk-f-3:checked ~ .wk-filter__nav label:nth-of-type(4),
.wk-f-4:checked ~ .wk-filter__nav label:nth-of-type(5),
.wk-f-5:checked ~ .wk-filter__nav label:nth-of-type(6) { background: var(--wk-dark); color: var(--wk-white); }

.wk-f-1:checked ~ .wk-filter__items > :not(.wk-c-1),
.wk-f-2:checked ~ .wk-filter__items > :not(.wk-c-2),
.wk-f-3:checked ~ .wk-filter__items > :not(.wk-c-3),
.wk-f-4:checked ~ .wk-filter__items > :not(.wk-c-4),
.wk-f-5:checked ~ .wk-filter__items > :not(.wk-c-5) { display: none; }

/* --------------------------------------------------------------------------
   Tabs — radios .wk-t-1 … .wk-t-5 ; panels .wk-p-1 … .wk-p-5
   -------------------------------------------------------------------------- */
.wk-tabs { display: flex; flex-direction: column; position: relative; background: var(--wk-white); border: 1px solid var(--wk-line); }
.wk-tabs__nav { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--wk-line); }
.wk-tabs__nav label {
  cursor: pointer;
  padding: .7rem 1.1rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--wk-muted);
  border-right: 1px solid var(--wk-line);
}
.wk-tabs__panels { display: flex; flex-direction: column; padding: 1.25rem; font-size: .9rem; }
.wk-tabs__panel { display: none; }
.wk-t-1:checked ~ .wk-tabs__panels .wk-p-1,
.wk-t-2:checked ~ .wk-tabs__panels .wk-p-2,
.wk-t-3:checked ~ .wk-tabs__panels .wk-p-3,
.wk-t-4:checked ~ .wk-tabs__panels .wk-p-4,
.wk-t-5:checked ~ .wk-tabs__panels .wk-p-5 { display: block; }
.wk-t-1:checked ~ .wk-tabs__nav label:nth-of-type(1),
.wk-t-2:checked ~ .wk-tabs__nav label:nth-of-type(2),
.wk-t-3:checked ~ .wk-tabs__nav label:nth-of-type(3),
.wk-t-4:checked ~ .wk-tabs__nav label:nth-of-type(4),
.wk-t-5:checked ~ .wk-tabs__nav label:nth-of-type(5) { background: var(--wk-accent); color: var(--wk-white); }

/* --------------------------------------------------------------------------
   Accordion (native <details>)
   -------------------------------------------------------------------------- */
.wk-acc { display: flex; flex-direction: column; gap: .5rem; }
.wk-acc details { background: var(--wk-white); border: 1px solid var(--wk-line); }
.wk-acc summary {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: .9rem;
  color: var(--wk-dark);
  list-style: none;
}
.wk-acc summary::-webkit-details-marker { display: none; }
.wk-acc summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  color: var(--wk-accent);
  border: 1px solid var(--wk-accent);
  font-weight: 700;
  line-height: 1;
}
.wk-acc details[open] summary::before { content: "\2212"; background: var(--wk-accent); color: var(--wk-white); }
.wk-acc details[open] summary { color: var(--wk-accent); }
.wk-acc__body { padding: 0 1rem 1rem 2.85rem; font-size: .875rem; color: var(--wk-muted); }
.wk-acc__body ul { margin: .5rem 0; padding-left: 1.1rem; }

/* ==========================================================================
   Component-specific
   ========================================================================== */

/* 1. Services grid */
.wk-services-grid .wk-card { gap: .5rem; }

/* 3 / 18. Split image + coloured panel */
.wk-split { display: flex; flex-wrap: wrap; width: 100%; }
.wk-split__media { flex: 1 1 340px; min-height: 260px; display: flex; }
.wk-split__media img { width: 100%; height: 100%; object-fit: cover; }
.wk-split__body { flex: 1 1 340px; display: flex; flex-direction: column; justify-content: center; padding: clamp(1.5rem, 4vw, 3.5rem); font-size: .9rem; }

/* 4 / 20 / 21. Team */
.wk-member { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .15rem; }
.wk-member img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; margin-bottom: .6rem; }
.wk-member strong { color: var(--wk-dark); font-size: .95rem; }
.wk-member span { font-size: .8rem; color: var(--wk-muted); }
.wk--dark .wk-member strong { color: var(--wk-white); }
.wk--dark .wk-member span { color: #9aa5b1; }

/* 5 / 25. Posts */
.wk-post { display: flex; flex-direction: column; gap: .5rem; }
.wk-post img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.wk-post__meta { font-size: .78rem; color: var(--wk-muted); }
.wk-post h3 { margin: 0; }
.wk-post p { font-size: .875rem; margin: 0; }
.wk-post__more { font-size: .8rem; font-weight: 600; text-decoration: none; border-bottom: 1px solid currentColor; align-self: flex-start; }

/* 6. Footer widgets */
.wk-footer-widgets ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; font-size: .85rem; }
.wk-footer-widgets a { color: #c9d1d9; text-decoration: none; }
.wk-footer-widgets a:hover { color: var(--wk-white); }
.wk-mini-post { display: flex; gap: .65rem; align-items: flex-start; }
.wk-mini-post img { width: 56px; height: 56px; object-fit: cover; flex: 0 0 auto; }
.wk-mini-post small { display: block; color: #8b96a3; font-size: .75rem; }
.wk-socials { display: flex; gap: .4rem; margin-top: 1rem; }
.wk-socials a { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border: 1px solid #3a4a5a; border-radius: 50%; font-size: .75rem; }
.wk-search { display: flex; margin-top: .75rem; }
.wk-search input { flex: 1 1 auto; min-width: 0; padding: .5rem .6rem; border: 1px solid #3a4a5a; background: transparent; color: var(--wk-white); }
.wk-search button { padding: .5rem .8rem; border: 0; background: var(--wk-accent); color: var(--wk-white); cursor: pointer; }

/* 9 / 14. Icon features list */
.wk-feature { display: flex; gap: .85rem; align-items: flex-start; }
.wk-feature h4 { margin-bottom: .2rem; }
.wk-feature p { font-size: .85rem; color: var(--wk-muted); margin: 0; }

/* 10. Tabs + person */
.wk-person { display: flex; align-items: flex-end; justify-content: center; }
.wk-person img { max-height: 460px; width: auto; object-fit: contain; }

/* 11. Timeline */
.wk-timeline { display: flex; flex-direction: column; position: relative; max-width: 820px; margin: 0 auto; width: 100%; }
.wk-timeline::before { content: ""; position: absolute; left: 1.4rem; top: .5rem; bottom: 2rem; width: 2px; background: var(--wk-line); }
.wk-timeline__item { display: flex; gap: 1.25rem; align-items: flex-start; padding-bottom: 2rem; position: relative; }
.wk-timeline__year {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  background: var(--wk-accent);
  color: var(--wk-white);
  font-size: .72rem;
  font-weight: 700;
  box-shadow: 0 0 0 5px var(--wk-alt);
}
.wk-timeline__item:last-child { padding-bottom: 0; }
.wk-timeline__item p { font-size: .875rem; color: var(--wk-muted); margin: 0; }

/* 12. Radial "why choose" */
.wk-radial { display: flex; flex-wrap: wrap; gap: var(--wk-gap); align-items: center; }
.wk-radial__side { flex: 1 1 240px; display: flex; flex-direction: column; gap: 2.5rem; }
.wk-radial__side--right { text-align: right; }
.wk-radial__center { flex: 1 1 260px; display: flex; justify-content: center; }
.wk-radial__center img { max-width: 320px; width: 100%; }
.wk-radial__item { display: flex; flex-direction: column; }
.wk-radial__item img { width: 120px; align-self: flex-start; margin-bottom: .5rem; }
.wk-radial__side--right .wk-radial__item img { align-self: flex-end; }
.wk-radial__item p { font-size: .85rem; color: var(--wk-muted); margin: 0; }
.wk-radial__side--right .wk__rule { margin-left: auto; }
@media (max-width: 760px) {
  .wk-radial__side--right { text-align: left; }
  .wk-radial__side--right .wk-radial__item img { align-self: flex-start; }
  .wk-radial__side--right .wk__rule { margin-left: 0; }
  .wk-radial__center { order: -1; }
}

/* 13. Before / after (CSS-only: drag the handle at the bottom-right of the "before" pane) */
.wk-ba { position: relative; display: flex; width: 100%; overflow: hidden; }
.wk-ba__after { width: 100%; }
.wk-ba__after img, .wk-ba__before img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.wk-ba__before {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 50%;
  min-width: 2rem;
  max-width: 100%;
  overflow: hidden;
  resize: horizontal;
  border-right: 3px solid var(--wk-white);
}
.wk-ba__before img { width: auto; height: 100%; max-width: none; }
.wk-ba__tag { position: absolute; top: .6rem; padding: .15rem .5rem; font-size: .75rem; color: var(--wk-white); background: rgba(0,0,0,.45); pointer-events: none; }
.wk-ba__tag--before { left: .6rem; }
.wk-ba__tag--after { right: .6rem; }

/* 16. CTA bar */
.wk-cta { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .75rem; }
.wk-cta__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.25rem; }
.wk-cta__phone { font-size: 1.15rem; font-weight: 700; color: var(--wk-white); text-decoration: none; }

/* 17. Carousel (scroll-snap, swipe / scroll; arrows jump to ends) */
.wk-carousel { display: flex; flex-direction: column; gap: 1rem; }
.wk-carousel__track {
  display: flex;
  gap: var(--wk-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: .5rem;
}
.wk-carousel__slide { flex: 0 0 calc(25% - var(--wk-gap) * .75); min-width: 220px; scroll-snap-align: start; position: relative; }
.wk-carousel__slide img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.wk-carousel__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: .5rem; background: rgba(22,34,46,.8); color: var(--wk-white); text-align: center; font-size: .85rem; }
.wk-carousel__nav { display: flex; justify-content: center; gap: .4rem; }
.wk-carousel__nav a { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border: 1px solid var(--wk-line); color: var(--wk-dark); text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .wk-carousel__track { scroll-behavior: auto; } }

/* 19. Checklist */
.wk-check { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; font-size: .875rem; }
.wk-check li { display: flex; gap: .5rem; align-items: center; }
.wk-check li::before { content: ""; width: .5rem; height: .5rem; background: var(--wk-accent); border-radius: 50%; flex: 0 0 auto; }

/* 21. Team section heading with green quote */
.wk-team-head { display: flex; flex-wrap: wrap; gap: var(--wk-gap); align-items: center; }
.wk-team-head h2 { flex: 0 1 220px; color: var(--wk-accent); margin: 0; }
.wk-team-head blockquote { flex: 1 1 320px; margin: 0; padding: 1rem 1.25rem; background: var(--wk-accent); color: var(--wk-white); font-style: italic; font-size: .9rem; }

/* 23. Masonry (two flex columns) */
.wk-masonry { display: flex; flex-wrap: wrap; gap: var(--wk-gap); }
.wk-masonry__col { flex: 1 1 280px; display: flex; flex-direction: column; gap: var(--wk-gap); }
.wk-masonry .wk-filter__items { flex-wrap: wrap; }

/* 24. Project detail */
.wk-meta { display: flex; flex-direction: column; margin: 0; background: var(--wk-alt); padding: 1rem 1.25rem; font-size: .85rem; }
.wk-meta div { display: flex; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--wk-line); }
.wk-meta div:last-child { border-bottom: 0; }
.wk-meta dt { flex: 0 0 5.5rem; font-weight: 600; color: var(--wk-dark); }
.wk-meta dd { margin: 0; flex: 1 1 auto; }

/* 26. Careers */
.wk-careers h2 { color: var(--wk-accent); }
.wk-acc__body h4 { color: var(--wk-accent); margin: .75rem 0 .25rem; font-size: .85rem; }

/* Masonry filtering works per figure (columns stay in place) */
.wk-f-1:checked ~ .wk-masonry figure:not([data-cat="1"]),
.wk-f-2:checked ~ .wk-masonry figure:not([data-cat="2"]),
.wk-f-3:checked ~ .wk-masonry figure:not([data-cat="3"]),
.wk-f-4:checked ~ .wk-masonry figure:not([data-cat="4"]),
.wk-f-5:checked ~ .wk-masonry figure:not([data-cat="5"]) { display: none; }
