:root {
  --kl-ink: #080a18;
  --kl-ink-soft: #171a2c;
  --kl-indigo: #252a82;
  --kl-indigo-bright: #6971e9;
  --kl-periwinkle: #aeb2ff;
  --kl-cloud: #f5f4ef;
  --kl-paper: #fbfaf6;
  --kl-white: #ffffff;
  --kl-muted: #666878;
  --kl-green: #1ea66f;
  --kl-line: rgba(8, 10, 24, 0.14);
  --kl-line-light: rgba(255, 255, 255, 0.17);
  --kl-radius-sm: 14px;
  --kl-radius-md: 24px;
  --kl-radius-lg: 36px;
  --kl-shadow: 0 26px 70px rgba(14, 17, 52, 0.14);
  --kl-content: 1220px;
}

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

html {
  scroll-behavior: smooth;
  background: var(--kl-paper);
}

body.klinik-lee-theme {
  margin: 0;
  overflow-x: clip;
  background: var(--kl-paper);
  color: var(--kl-ink);
  font-family: Inter, "SF Pro Text", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.klinik-lee-theme a {
  color: inherit;
  text-decoration: none;
}

.klinik-lee-theme img {
  display: block;
  max-width: 100%;
}

.klinik-lee-theme ::selection {
  background: var(--kl-periwinkle);
  color: var(--kl-ink);
}

.kl-shell {
  width: min(var(--kl-content), calc(100% - 48px));
  margin-inline: auto;
}

.kl-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 10, 24, 0.92);
  color: var(--kl-white);
  backdrop-filter: blur(18px);
}

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

.kl-header-inner {
  min-height: 82px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
  align-items: center;
  gap: 28px;
}

.kl-brand {
  width: 236px;
  max-width: 100%;
  display: flex;
  align-items: center;
}

.kl-logo-crop {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3.1 / 1;
  overflow: hidden;
}

.kl-logo-crop .kl-logo-image,
.kl-logo-crop .custom-logo {
  position: absolute;
  width: 110.8%;
  max-width: none;
  height: auto;
  left: -4.35%;
  top: -59.3%;
  filter: brightness(0) invert(1);
}

.kl-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.kl-nav-link {
  position: relative;
  padding: 30px 0 27px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 180ms ease;
}

.kl-nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  background: var(--kl-periwinkle);
  transition: transform 180ms ease;
}

.kl-nav-link:hover,
.kl-nav-link:focus-visible,
.kl-nav-link.is-active {
  color: var(--kl-white);
}

.kl-nav-link:hover::after,
.kl-nav-link:focus-visible::after,
.kl-nav-link.is-active::after {
  transform: scaleX(1);
}

.kl-header-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.kl-language {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 12px;
  border: 1px solid var(--kl-line-light);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.kl-language span {
  color: var(--kl-periwinkle);
}

.kl-button {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 760;
  line-height: 1.1;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.kl-button:hover,
.kl-button:focus-visible {
  transform: translateY(-2px);
}

.kl-button-primary {
  background: var(--kl-periwinkle);
  color: var(--kl-ink);
}

.kl-button-primary:hover,
.kl-button-primary:focus-visible {
  background: var(--kl-white);
  color: var(--kl-ink);
}

.kl-main-page,
.kl-elementor-full-width {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.kl-content-shell {
  width: min(920px, calc(100% - 48px));
  min-height: 60vh;
  margin-inline: auto;
  padding: 96px 0;
}

.kl-content-shell h1 {
  margin: 0 0 36px;
  color: var(--kl-indigo);
  font-size: clamp(2.8rem, 6vw, 5.8rem);
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.kl-article > * + *,
.kl-post-card > * + * {
  margin-top: 18px;
}

.kl-post-list,
.kl-archive-header + .kl-post-card {
  margin-top: 42px;
}

.kl-post-card {
  padding: 28px 0;
  border-bottom: 1px solid var(--kl-line);
}

.kl-post-card h2 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.4rem);
}

.kl-not-found {
  text-align: center;
}

.kl-not-found .kl-button {
  margin-top: 24px;
}

.kl-emergency {
  padding: 17px 24px;
  background: #181a2a;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
}

.kl-emergency strong,
.kl-emergency a {
  color: var(--kl-white);
}

.kl-site-footer {
  padding: 76px 0 34px;
  background: #050610;
  color: var(--kl-white);
}

.kl-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.65fr 0.8fr;
  gap: 80px;
  padding-bottom: 70px;
}

.kl-footer-brand {
  width: min(340px, 100%);
}

.kl-footer-brand .kl-logo-crop {
  margin-bottom: 28px;
}

.kl-footer-brand p,
.kl-footer-contact p {
  max-width: 410px;
  margin: 0;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.84rem;
  line-height: 1.65;
}

.kl-footer-title {
  margin: 0 0 24px;
  color: rgba(255, 255, 255, 0.44);
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kl-footer-nav,
.kl-footer-contact {
  display: grid;
  align-content: start;
  gap: 14px;
}

.kl-footer-nav a,
.kl-footer-contact a {
  width: fit-content;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
}

.kl-footer-nav a:hover,
.kl-footer-contact a:hover {
  color: var(--kl-periwinkle);
}

.kl-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 30px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.72rem;
  line-height: 1.6;
}

.kl-mobile-actions {
  display: none;
}

.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;
}

.screen-reader-text:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  clip: auto;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--kl-white);
  color: var(--kl-ink);
}

@media (max-width: 1080px) {
  .kl-header-inner {
    grid-template-columns: minmax(190px, 1fr) auto;
  }

  .kl-nav {
    order: 3;
    grid-column: 1 / -1;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .kl-nav-link {
    padding: 16px 0 15px;
  }

  .kl-nav-link::after {
    bottom: 10px;
  }

  .kl-footer-grid {
    gap: 42px;
  }
}

@media (max-width: 782px) {
  .admin-bar .kl-site-header {
    top: 46px;
  }
}

@media (max-width: 780px) {
  .kl-shell,
  .kl-content-shell {
    width: min(100% - 32px, 640px);
  }

  .kl-site-header {
    position: relative;
    top: 0 !important;
  }

  .kl-header-inner {
    min-height: 70px;
    grid-template-columns: minmax(155px, 1fr) auto;
    gap: 14px;
  }

  .kl-brand {
    width: 184px;
  }

  .kl-header-whatsapp {
    display: none;
  }

  .kl-language {
    padding: 9px 10px;
  }

  .kl-nav {
    gap: clamp(15px, 5vw, 27px);
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .kl-nav::-webkit-scrollbar {
    display: none;
  }

  .kl-nav-link {
    white-space: nowrap;
    font-size: 0.7rem;
  }

  .kl-footer-grid {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .kl-footer-bottom {
    flex-direction: column;
  }

  .kl-site-footer {
    padding-bottom: 110px;
  }

  .kl-mobile-actions {
    position: fixed;
    z-index: 1100;
    left: 12px;
    right: 12px;
    bottom: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(8, 10, 24, 0.9);
    box-shadow: 0 16px 50px rgba(8, 10, 24, 0.32);
    backdrop-filter: blur(18px);
  }

  .kl-mobile-actions a {
    min-height: 46px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: var(--kl-white);
    font-size: 0.78rem;
    font-weight: 760;
  }

  .kl-mobile-actions a:first-child {
    background: var(--kl-green);
  }

  .kl-mobile-actions a:last-child {
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
}

@media (max-width: 420px) {
  .kl-brand {
    width: 158px;
  }

  .kl-language {
    font-size: 0.7rem;
  }
}

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