/*
Theme Name: Stadtwerk
Author: Fabian Nagorny
Author URI: https://www.fabiannagorny.de
Description: Helles, serviceorientiertes Theme für Stadtwerke und Versorger – Mega-Menü, Hero-Slider, Service-Kacheln, Produktkarten und Kontakt-Footer in Grün und Orange.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stadtwerk
*/

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
  --green: #6bbc00;
  --green-dark: #54770f;
  --green-darker: #3f5a0b;
  --green-tint: #e6f5cc;
  --green-tint-2: #daeebf;
  --orange: #eb690b;
  --orange-dark: #c45508;
  --text: #333333;
  --text-muted: #747474;
  --heading: #212934;
  --bg: #ffffff;
  --bg-light: #f6f6f6;
  --line: #e5e4e3;
  --footer: #2b3138;
  --footer-bottom: #212934;

  --font: 'Carlito', Calibri, 'Segoe UI', Arial, sans-serif;

  /* Signature "leaf" corner: rounded top-left and bottom-right only. */
  --leaf: 14px 0;
  --leaf-lg: 28px 0;
  --radius: 6px;

  --container: 76rem;
  --gutter: 1.25rem;
  --header-h: 84px;
  --shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 10px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.14);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

svg.icon {
  flex: none;
  vertical-align: middle;
}

a {
  color: var(--green-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--orange);
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.6em;
  font-weight: 700;
  line-height: 1.2;
  color: var(--heading);
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.125rem); }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.2rem; }

p {
  margin: 0 0 1em;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: 52rem;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed !important;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1000;
  width: auto;
  height: auto;
  clip: auto;
  padding: 0.75rem 1.25rem;
  background: var(--green);
  color: #fff;
  font-weight: 700;
}

/* ==========================================================================
   Buttons & links
   ========================================================================== */

.btn,
.wp-block-button__link,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--leaf);
  font: 700 1.05rem/1.2 var(--font);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--small {
  padding: 0.5rem 1rem;
  font-size: 1rem;
}

.btn--green,
.wp-block-button__link,
input[type="submit"] {
  background: var(--green);
  color: #fff;
}

.btn--green:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover {
  background: var(--green-dark);
  color: #fff;
}

.btn--orange {
  background: var(--orange);
  color: #fff;
}

.btn--orange:hover {
  background: var(--orange-dark);
  color: #fff;
}

.btn--outline-light {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.btn--outline-light:hover {
  background: #fff;
  color: var(--footer);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 700;
  color: var(--green-dark);
  text-decoration: none;
}

.link-arrow .icon {
  transition: transform 0.2s var(--ease);
}

.link-arrow:hover .icon {
  transform: translateX(4px);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--heading);
  cursor: pointer;
}

.icon-btn:hover,
.icon-btn[aria-expanded="true"] {
  background: var(--green-tint);
  color: var(--green-dark);
}

/* ==========================================================================
   Top bar
   ========================================================================== */

.topbar {
  background: var(--bg-light);
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
  min-height: 38px;
}

.topbar__menu {
  display: flex;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topbar__menu a {
  color: var(--text);
  text-decoration: none;
}

.topbar__menu a:hover {
  color: var(--green-dark);
}

.topbar__hotline {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--orange);
  text-decoration: none;
}

.topbar__hotline span {
  color: var(--text);
}

/* ==========================================================================
   Header + mega menu
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
  transition: box-shadow 0.2s;
}

.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
}

.admin-bar .site-header {
  top: 32px;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex: none;
  color: var(--heading);
  text-decoration: none;
}

.brand:hover {
  color: var(--heading);
}

.brand__logo {
  display: block;
  max-height: 60px;
  width: auto;
}

.brand__mark {
  width: 44px;
  height: 44px;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand__name {
  font-size: 1.35rem;
  font-weight: 700;
}

.brand__tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

/* Desktop navigation */

.primary-nav .menu,
.primary-nav .sub-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-nav .menu {
  display: flex;
  align-items: stretch;
}

.primary-nav .menu > li {
  position: static;
  display: flex;
  align-items: center;
}

.primary-nav .menu > li > a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--header-h);
  padding: 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading);
  text-decoration: none;
}

.primary-nav .menu > li > a::after {
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 0;
  height: 4px;
  background: var(--green);
  border-radius: 4px 4px 0 0;
  transform: scaleX(0);
  transition: transform 0.25s var(--ease);
}

.primary-nav .menu > li:hover > a::after,
.primary-nav .menu > li.is-open > a::after,
.primary-nav .menu > .current-menu-item > a::after,
.primary-nav .menu > .current-menu-ancestor > a::after {
  transform: scaleX(1);
}

.primary-nav .menu > li > a:hover {
  color: var(--green-dark);
}

.submenu-toggle {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: -0.6rem;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.submenu-toggle .icon {
  transition: transform 0.2s;
}

.is-open > .submenu-toggle .icon {
  transform: rotate(180deg);
}

/* Level 1 dropdown = full width mega panel */
.primary-nav .menu > li > .sub-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1.5rem 2.5rem;
  max-width: var(--container);
  margin-inline: auto;
  padding: 2rem 2.5rem 2.5rem;
  background: #fff;
  border-top: 4px solid var(--green);
  border-radius: 0 0 var(--leaf-lg);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0s 0.2s;
}

.primary-nav .menu > li:hover > .sub-menu,
.primary-nav .menu > li.is-open > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

/* Column headings */
.primary-nav .sub-menu > li > a {
  display: block;
  padding: 0.4rem 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--heading);
  text-decoration: none;
  border-bottom: 2px solid var(--green-tint);
}

.primary-nav .sub-menu > li > a:hover {
  color: var(--green-dark);
}

/* Level 2 lists */
.primary-nav .sub-menu .sub-menu {
  padding-top: 0.4rem;
}

.primary-nav .sub-menu .sub-menu a {
  display: block;
  padding: 0.25rem 0 0.25rem 1rem;
  font-weight: 400;
  font-size: 1.02rem;
  color: var(--text);
  border: 0;
  position: relative;
}

.primary-nav .sub-menu .sub-menu a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.85em;
  width: 6px;
  height: 6px;
  border-top: 2px solid var(--green);
  border-right: 2px solid var(--green);
  transform: rotate(45deg);
}

.primary-nav .sub-menu .sub-menu a:hover {
  color: var(--orange);
}

.primary-nav .sub-menu .submenu-toggle {
  display: none;
}

.menu-toggle {
  display: none;
}

.menu-toggle__bars {
  display: grid;
  gap: 5px;
  width: 22px;
}

.menu-toggle__bars span {
  display: block;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Header search */

.header-search {
  padding: 1.25rem 0;
  background: var(--bg-light);
  border-top: 1px solid var(--line);
}

.search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 40rem;
}

.header-search .search-form {
  margin-inline: auto;
}

.search-form__input,
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  font: inherit;
  color: inherit;
}

.search-form__input:focus,
input:focus,
textarea:focus {
  border-color: var(--green);
  outline: none;
}

/* ==========================================================================
   Quick tabs (fixed right edge)
   ========================================================================== */

.quick-tabs {
  position: fixed;
  right: 0;
  top: 50%;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(-50%);
}

.quick-tab {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 52px;
  padding: 0.8rem 0.9rem;
  overflow: hidden;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  border-radius: 10px 0 0 10px;
  box-shadow: var(--shadow);
  transition: width 0.3s var(--ease), background-color 0.2s;
}

.quick-tab--orange {
  background: var(--orange);
}

/* Expand the whole group so moving between tabs (across the gap) keeps it open. */
.quick-tabs:hover .quick-tab,
.quick-tabs:focus-within .quick-tab {
  width: 190px;
  color: #fff;
}

.quick-tab:hover,
.quick-tab:focus-visible {
  filter: brightness(0.92);
}

.quick-tab span {
  opacity: 0;
  transition: opacity 0.2s;
}

.quick-tabs:hover .quick-tab span,
.quick-tabs:focus-within .quick-tab span {
  opacity: 1;
}

/* ==========================================================================
   Hero slider
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  background: var(--heading);
}

.hero__track {
  display: grid;
}

.hero__slide {
  position: relative;
  grid-area: 1 / 1;
  display: flex;
  align-items: center;
  min-height: clamp(380px, 52vw, 600px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0s 0.8s;
}

.hero__slide.is-active {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.hero__image,
.hero__pattern {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__slide.is-active .hero__image {
  animation: hero-zoom 9s ease-out both;
}

@keyframes hero-zoom {
  from { transform: scale(1.06); }
  to { transform: scale(1); }
}

.hero__pattern {
  background:
    radial-gradient(circle at 85% 30%, rgba(255, 255, 255, 0.18) 0 18%, transparent 18.2%),
    radial-gradient(circle at 70% 90%, rgba(255, 255, 255, 0.1) 0 26%, transparent 26.2%),
    linear-gradient(120deg, var(--tone-a) 0%, var(--tone-b) 100%);
}

.hero__pattern::after {
  content: "";
  position: absolute;
  right: 8%;
  top: 50%;
  width: min(34vw, 420px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  background: url("assets/images/mark-white.svg") center / contain no-repeat;
  opacity: 0.2;
}

.hero__slide--green { --tone-a: #54770f; --tone-b: #8fd12a; }
.hero__slide--orange { --tone-a: #c45508; --tone-b: #f59a3c; }
.hero__slide--dark { --tone-a: #212934; --tone-b: #3d4b5c; }

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__box {
  max-width: 34rem;
  padding: 2rem 2.25rem 2.25rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--leaf-lg);
  border-left: 6px solid var(--green);
  box-shadow: var(--shadow-lg);
}

.hero__slide.is-active .hero__box {
  animation: hero-in 0.8s 0.15s var(--ease) both;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.hero__title {
  margin-bottom: 0.25em;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--green-dark);
}

.hero__subtitle {
  margin-bottom: 1.5rem;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  color: var(--heading);
}

.hero__controls {
  position: absolute;
  left: 0;
  right: 0;
  /* Clear the service strip, which overlaps the hero by 2.5rem. */
  bottom: 4rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.hero__arrow {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--heading);
  cursor: pointer;
}

.hero__arrow:hover {
  background: var(--green);
  color: #fff;
}

.hero__dots {
  display: flex;
  gap: 0.5rem;
}

.hero__dot {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: width 0.3s var(--ease), background-color 0.2s;
}

.hero__dot.is-active {
  width: 32px;
  border-radius: 6px;
  background: #fff;
}

/* ==========================================================================
   Service strip
   ========================================================================== */

.service-strip {
  position: relative;
  z-index: 3;
  margin-top: -2.5rem;
}

.service-strip__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
}

.service-tile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: background-color 0.2s, color 0.2s;
}

.service-tile:first-child {
  border-top-left-radius: 14px;
}

.service-tile:last-child {
  border-bottom-right-radius: 14px;
}

.service-tile .icon {
  color: var(--green);
  transition: color 0.2s;
}

.service-tile span {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.service-tile strong {
  font-size: 1.2rem;
  color: var(--heading);
}

.service-tile:hover {
  background: var(--green);
  color: #fff;
}

.service-tile:hover strong,
.service-tile:hover .icon {
  color: #fff;
}

/* ==========================================================================
   Sections & cards
   ========================================================================== */

.section {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.section--light {
  background: var(--bg-light);
}

.service-strip + .section {
  padding-top: clamp(4.5rem, 9vw, 6.5rem);
  margin-top: -2.5rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
}

.section-head .section-title {
  margin-bottom: 0;
}

.section-title {
  position: relative;
  margin-bottom: 2rem;
  padding-bottom: 0.6rem;
}

.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 56px;
  height: 4px;
  background: var(--orange);
  border-radius: 2px;
}

.card-grid,
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 2rem 2rem;
  text-align: center;
  background: #fff;
  border-radius: var(--leaf-lg);
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}

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

.product-card__icon {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  margin-bottom: 1.25rem;
  background: var(--green-tint);
  color: var(--green-dark);
  border-radius: 22px 0;
}

.product-card__title {
  font-size: 1.6rem;
  color: var(--green-dark);
}

.product-card p {
  flex: 1;
}

.post-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--leaf-lg);
  transition: box-shadow 0.3s, transform 0.3s var(--ease);
}

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

.post-card__media {
  display: block;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  background: var(--green-tint);
}

.post-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.post-card:hover .post-card__media img {
  transform: scale(1.05);
}

.post-card__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  color: var(--green);
}

.post-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 1.5rem;
}

.post-card__meta {
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.post-card__title {
  font-size: 1.35rem;
}

.post-card__title a {
  color: var(--heading);
  text-decoration: none;
}

.post-card__title a:hover {
  color: var(--green-dark);
}

.post-card__excerpt {
  flex: 1;
}

/* ==========================================================================
   Inner pages
   ========================================================================== */

.page-banner {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 0 2.75rem;
  background: linear-gradient(120deg, var(--green-dark), var(--green));
  color: #fff;
}

.page-banner::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 260px;
  aspect-ratio: 1;
  background: url("assets/images/mark-white.svg") center / contain no-repeat;
  opacity: 0.15;
}

.page-banner__title {
  margin: 0;
  color: #fff;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

.breadcrumb a {
  color: #fff;
}

.breadcrumb a:hover {
  color: #fff;
  text-decoration: none;
}

.entry-thumb {
  margin: 0 0 2rem;
  overflow: hidden;
  border-radius: var(--leaf-lg);
}

.entry-thumb img {
  display: block;
  width: 100%;
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  color: var(--text-muted);
}

.entry-meta__cats a {
  padding: 0.15rem 0.6rem;
  background: var(--green-tint);
  border-radius: 6px 0;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.entry-tags a {
  display: inline-block;
  margin: 0 0.4rem 0.4rem 0;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 6px 0;
  font-size: 0.95rem;
  text-decoration: none;
}

.layout-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18rem;
  gap: 3rem;
}

.layout-sidebar--none {
  grid-template-columns: minmax(0, 52rem);
  justify-content: center;
}

.sidebar .widget {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--bg-light);
  border-radius: var(--leaf);
}

.widget-title {
  font-size: 1.2rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--green);
}

.sidebar ul {
  margin: 0;
  padding-left: 1.1rem;
}

.prose > * + * {
  margin-top: 0;
}

.prose h2,
.prose h3 {
  margin-top: 1.6em;
}

.prose ul li::marker {
  color: var(--green);
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  background: var(--green-tint);
  border-left: 5px solid var(--green);
  border-radius: 0 0 var(--leaf-lg);
  font-size: 1.2rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
}

.prose th,
.prose td {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.prose th {
  background: var(--green);
  color: #fff;
}

.prose img {
  border-radius: var(--leaf);
}

.alignwide {
  margin-inline: calc(50% - min(45vw, 38rem));
  max-width: none;
}

.alignfull {
  margin-inline: calc(50% - 50vw);
  max-width: 100vw;
  width: 100vw;
}

.archive-description {
  margin-bottom: 2rem;
}

.empty-state {
  text-align: center;
}

.empty-state .search-form {
  margin: 1.5rem auto;
}

.empty-state__code {
  margin: 0;
  font-size: clamp(5rem, 15vw, 9rem);
  font-weight: 700;
  line-height: 1;
  color: var(--green);
}

/* Pagination & post nav */

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 3rem;
}

.pagination .page-numbers {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px 0;
  color: var(--heading);
  text-decoration: none;
  font-weight: 700;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.post-navigation .nav-links {
  justify-content: space-between;
}

.post-navigation a {
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem;
  background: var(--bg-light);
  border-radius: var(--leaf);
  text-decoration: none;
}

.post-navigation .nav-next a {
  text-align: right;
}

.nav-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.nav-title {
  font-weight: 700;
  color: var(--heading);
}

/* Comments */

.comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.comment-list {
  padding: 0;
  list-style: none;
}

.comment-list .children {
  list-style: none;
}

.comment-body {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: var(--bg-light);
  border-radius: var(--leaf);
}

.comment-author .avatar {
  float: left;
  margin-right: 0.75rem;
  border-radius: 50%;
}

.comment-form label {
  display: block;
  font-weight: 700;
}

.comment-form p {
  margin-bottom: 1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  color: rgba(255, 255, 255, 0.85);
}

.site-footer__contacts {
  position: relative;
  padding: 4rem 0 3rem;
  background: var(--footer);
  border-top: 6px solid var(--green);
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.contact__title {
  font-size: 1.4rem;
  color: #fff;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--green);
  display: inline-block;
}

.contact__lines {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact__lines li {
  padding: 0.15rem 0;
}

.contact__label {
  color: rgba(255, 255, 255, 0.65);
}

.site-footer a {
  color: #fff;
}

.contact__lines a {
  font-weight: 700;
  text-decoration: none;
}

.contact__lines a:hover {
  color: var(--green);
}

.site-footer__cta {
  margin: 2.5rem 0 0;
}

.site-footer__bottom {
  padding: 1.1rem 0;
  background: var(--footer-bottom);
  font-size: 0.95rem;
}

.site-footer__bottom-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
}

.site-footer__copy {
  margin: 0;
}

.legal-menu {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.legal-menu li + li::before {
  content: "|";
  margin: 0 0.75rem;
  color: rgba(255, 255, 255, 0.35);
}

.legal-menu a {
  text-decoration: none;
}

.legal-menu a:hover {
  color: var(--green);
}

.back-to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 80;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 12px 0;
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, visibility 0s 0.25s, background-color 0.2s;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.back-to-top:hover {
  background: var(--orange);
}

/* WordPress core */

.wp-caption-text,
figcaption {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-inline: auto; }

.has-green-color { color: var(--green); }
.has-green-background-color { background-color: var(--green); }
.has-green-dark-color { color: var(--green-dark); }
.has-green-dark-background-color { background-color: var(--green-dark); }
.has-orange-color { color: var(--orange); }
.has-orange-background-color { background-color: var(--orange); }
.has-dark-color { color: var(--text); }
.has-dark-background-color { background-color: var(--text); }
.has-light-color { color: var(--bg-light); }
.has-light-background-color { background-color: var(--bg-light); }
.has-white-color { color: #fff; }
.has-white-background-color { background-color: #fff; }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
  :root {
    --header-h: 70px;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .site-header__portal span {
    display: none;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    right: 0;
    width: min(100%, 26rem);
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    background: #fff;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0s 0.35s;
  }

  .primary-nav.is-open {
    transform: none;
    visibility: visible;
    transition-delay: 0s;
  }

  .primary-nav .menu {
    flex-direction: column;
    padding: 0.5rem 0 2rem;
  }

  .primary-nav .menu > li {
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
  }

  .primary-nav .menu > li > a {
    flex: 1;
    min-height: 56px;
    padding: 0 1.25rem;
  }

  .primary-nav .menu > li > a::after {
    display: none;
  }

  .submenu-toggle {
    width: 56px;
    height: 56px;
    margin: 0;
  }

  .primary-nav .menu > li > .sub-menu {
    position: static;
    display: none;
    flex-basis: 100%;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0.5rem 1.25rem 1.25rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: var(--bg-light);
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .primary-nav .menu > li:hover > .sub-menu {
    display: none;
  }

  .primary-nav .menu > li.is-open > .sub-menu {
    display: grid;
  }

  .layout-sidebar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .service-strip__inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-tile:nth-child(2) { border-top-right-radius: 0; }

  .card-grid,
  .post-grid,
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 1.0625rem;
  }

  .topbar__nav {
    display: none;
  }

  .topbar__inner {
    justify-content: center;
  }

  .brand__tagline {
    display: none;
  }

  .site-header__inner {
    gap: 1rem;
  }

  .hero__slide {
    align-items: flex-end;
    padding-bottom: 5rem;
  }

  .hero__box {
    padding: 1.5rem;
  }

  .hero__controls {
    bottom: 1.5rem;
    justify-content: center;
  }

  .service-strip {
    margin-top: 0;
  }

  .service-strip__inner {
    padding: 0;
  }

  .service-tile {
    padding: 1rem;
    border-radius: 0 !important;
  }

  .service-strip + .section {
    margin-top: 0;
    padding-top: 3rem;
  }

  .card-grid,
  .post-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .quick-tabs {
    top: auto;
    bottom: 5.5rem;
    transform: none;
  }

  .quick-tab {
    width: 48px;
    padding: 0.7rem;
  }

  .quick-tabs:hover .quick-tab,
  .quick-tabs:focus-within .quick-tab {
    width: 48px;
  }

  .quick-tabs:hover .quick-tab span,
  .quick-tabs:focus-within .quick-tab span {
    opacity: 0;
  }

  .search-form__submit span {
    display: none;
  }

  .alignleft,
  .alignright {
    float: none;
    margin: 0 0 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
