/*
Theme Name: Keyhan Studio
Theme URI: https://keyhan-studio.ir
Author: Seyed Mahdi Hosseini
Description: لایه نمایشی اختصاصی افزونه Keyhan Studio Manager.
Version: 1.25.5
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: keyhan-studio
*/

@font-face {
  font-family: "Vazirmatn";
  src: url("assets/fonts/vazirmatn-arabic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
:root {
  --bg: #020817;
  --surface: rgba(9, 17, 39, 0.78);
  --surface-2: rgba(6, 12, 30, 0.92);
  --line: rgba(151, 174, 230, 0.27);
  --text: #f7f9ff;
  --muted: #9ba7c0;
  --cyan: #19bff2;
  --purple: #6b3df1;
  --radius: 12px;
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.34);
  --ksm-bg: var(--bg);
  --ksm-surface: var(--surface);
  --ksm-surface-2: var(--surface-2);
  --ksm-text: var(--text);
  --ksm-muted: var(--muted);
  --ksm-accent: var(--purple);
  --ksm-accent-2: var(--cyan);
  --ksm-radius: var(--radius);
  --ksm-max: 1180px;
  --ksm-shadow: var(--shadow);
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  direction: rtl;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  line-height: 1.85;
}
body::before {
  position: fixed;
  z-index: -2;
  inset: 0;
  content: "";
  pointer-events: none;
  background:
    radial-gradient(
      circle at 12% 16%,
      rgba(48, 92, 198, 0.18),
      transparent 28%
    ),
    radial-gradient(circle at 82% 38%, rgba(77, 45, 190, 0.1), transparent 30%),
    linear-gradient(180deg, #030817, #020817 65%, #03091b);
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}
button,
input,
textarea,
select {
  font: inherit;
}
.container,
.ksm-container {
  width: min(1180px, calc(100% - 42px));
  max-width: none;
  margin-inline: auto;
  padding: 0;
}
.keyhan-main {
  min-height: 70vh;
}
.section {
  min-height: 70vh;
  padding-bottom: 60px;
}
.card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.skip-link {
  position: fixed;
  z-index: 999;
  top: -100px;
  right: 20px;
  padding: 10px 16px;
  border-radius: 6px;
  color: #fff;
  background: var(--purple);
}
.skip-link:focus {
  top: 10px;
}

/* Header */
.site-header {
  position: fixed;
  z-index: 100;
  top: 10px;
  right: 0;
  left: 0;
  padding-inline: max(20px, calc((100vw - 1200px) / 2));
  transition: top .42s cubic-bezier(.22,.61,.36,1), padding-inline .42s cubic-bezier(.22,.61,.36,1);
}
body.admin-bar .site-header { top: 42px; }
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 56px; }
}
.nav-shell {
  display: flex;
  align-items: center;
  height: 64px;
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding: 0 34px;
  gap: 22px;
  border: 1px solid rgba(145, 170, 220, 0.22);
  border-radius: 14px;
  background: rgba(2, 8, 23, 0.73);
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
  transition: border-radius .42s cubic-bezier(.22,.61,.36,1), border-color .42s ease, box-shadow .42s ease, background .42s ease;
}
@media (min-width: 901px) {
  body.home .site-header:not(.is-scrolled) { top: 0; padding-inline: 0; }
  body.admin-bar.home .site-header:not(.is-scrolled) { top: 32px; }
  body.home .site-header:not(.is-scrolled) .nav-shell {
    border-top: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    background: rgba(2, 8, 23, .58);
    box-shadow: 0 10px 35px rgba(0,0,0,.12);
    border: 0px solid rgba(145, 170, 220, 0.22);
    border-bottom: 1px solid rgba(145, 170, 220, 0.22);
  }
}
.brand {
  font-size: 31px;
  font-weight: 900;
  letter-spacing: -2px;
  white-space: nowrap;
}
.brand span {
  color: var(--cyan);
}
.custom-logo {
  width: auto;
  max-height: 40px;
}
.main-nav {
  display: flex;
  align-items: center;
  margin-inline: auto;
  gap: 30px;
}
.main-nav ul {
  display: contents;
}
.main-nav li {
  list-style: none;
}
.main-nav a {
  position: relative;
  color: #d4dbec;
  font-size: 14px;
}
.main-nav a::after {
  position: absolute;
  right: 0;
  bottom: -12px;
  left: 100%;
  height: 2px;
  content: "";
  background: var(--cyan);
  transition: 0.25s;
}
.main-nav a:hover::after,
.main-nav a.is-active::after,
.main-nav .current-menu-item a::after {
  left: 0;
}
.main-nav a.is-active,
.main-nav .current-menu-item a {
  color: #fff;
  text-shadow: 0 0 16px rgba(25, 191, 242, 0.28);
}
.button,
.ksm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #fff;
  background: rgba(8, 14, 32, 0.72);
  font-weight: 600;
  transition:
    transform 0.2s,
    border-color 0.2s;
}
.button:hover,
.ksm-btn:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  opacity: 1;
}
.button-primary,
.ksm-btn-primary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 0;
  color: #fff;
  background: linear-gradient(
    110deg,
    #18c9f4 0%,
    #238eea 38%,
    #5363e8 64%,
    #713cf0 100%
  );
  background-size: 165% 100%;
  background-position: 0 50%;
  box-shadow:
    0 10px 30px rgba(35, 142, 234, 0.3),
    0 4px 18px rgba(113, 60, 240, 0.2);
  transition:
    transform 0.28s ease,
    box-shadow 0.35s ease,
    background-position 0.75s ease;
}
.button-primary::before,
.ksm-btn-primary::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 34%,
    rgba(187, 229, 255, 0.13) 49%,
    rgba(218, 198, 255, 0.11) 52%,
    transparent 67%
  );
  transform: translateX(-125%);
  transition: transform 0.85s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.button-primary::after,
.ksm-btn-primary::after {
  position: absolute;
  right: 14%;
  bottom: -65%;
  left: 14%;
  height: 80%;
  content: "";
  pointer-events: none;
  opacity: 0;
  border-radius: 50%;
  background: rgba(73, 130, 246, 0.44);
  filter: blur(16px);
  transform: translateY(8px);
  transition:
    opacity 0.45s ease,
    transform 0.45s ease;
}
.button-primary:hover,
.button-primary:focus-visible,
.ksm-btn-primary:hover,
.ksm-btn-primary:focus-visible {
  transform: translateY(-1px);
  background-position: 100% 50%;
  box-shadow:
    0 12px 34px rgba(35, 142, 234, 0.38),
    0 5px 22px rgba(113, 60, 240, 0.27);
}
.button-primary:hover::before,
.button-primary:focus-visible::before,
.ksm-btn-primary:hover::before,
.ksm-btn-primary:focus-visible::before {
  transform: translateX(125%);
}
.button-primary:hover::after,
.button-primary:focus-visible::after,
.ksm-btn-primary:hover::after,
.ksm-btn-primary:focus-visible::after {
  opacity: 0.46;
  transform: translateY(0);
}
.nav-cta {
  min-height: 40px;
  padding-inline: 20px;
}
.menu-toggle {
  display: none;
  margin-right: auto;
  border: 0;
  color: #fff;
  background: none;
  font-size: 27px;
}

/* Shared plugin sections */
.ksm-about,
.ksm-activities,
.ksm-games,
.ksm-reviews,
.ksm-news,
.ksm-team,
.ksm-contact {
  padding: 38px 0;
  color: var(--text);
  background: transparent;
  scroll-margin-top: 92px;
}

.ksm-about {
  background: linear-gradient(0deg, transparent, #020817);
}

.ksm-section-title {
  display: flex;
  align-items: center;
  margin: 0 0 26px;
  gap: 14px;
  color: var(--text);
  font-size: 28px;
  font-weight: 800;
  text-align: right;
}
.ksm-section-title::before {
  content: "✦";
  color: var(--cyan);
  font-size: 18px;
}
.ksm-empty {
  padding: 30px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

/* Activities */
.ksm-activities-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.ksm-activity-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 210px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(10,20,44,.78), rgba(4,9,25,.76));
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.ksm-activity-card:hover { transform: translateY(-6px); border-color: rgba(42,190,242,.52); box-shadow: 0 20px 48px rgba(0,0,0,.34), 0 0 24px rgba(42,160,242,.1); }
.ksm-activity-icon { width: 58px !important; height: 58px !important; margin: 0 0 18px !important; object-fit: contain; }
.ksm-activity-icon.dashicons { display: inline-grid; place-items: center; color: var(--cyan); font-size: 55px; line-height: 1; filter: drop-shadow(0 0 12px rgba(25,191,242,.28)); }
.ksm-activity-icon.dashicons::before,
.ksm-stat-icon.dashicons::before {
  color: transparent;
  background: linear-gradient(135deg, #20d4ff 12%, #557bff 50%, #9b55ff 88%);
  -webkit-background-clip: text;
  background-clip: text;
}
.ksm-activity-card h3 { margin: 0 0 9px; color: #fff; font-size: 20px; }
.ksm-activity-card p { display: -webkit-box; overflow: hidden; margin: 0; color: var(--muted); font-size: 14px; -webkit-box-orient: vertical; -webkit-line-clamp: 1; }

/* Hero shortcode */
.ksm-hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: initial;
  min-height: 710px;
  overflow: hidden;
  padding-top: 110px;
  background-color: var(--bg);
  background-image: url("assets/images/hero.webp");
  background-position: center;
  background-size: cover;
  text-align: right;
}
.ksm-hero-bg {
  z-index: 0;
  background-position: center;
}
.ksm-hero-overlay {
  z-index: 1;
  background:
    linear-gradient(
      90deg,
      transparent 8%,
      rgba(2, 8, 23, 0.08) 45%,
      rgba(2, 8, 23, 0.9) 72%,
      #020817 100%
    ),
    linear-gradient(180deg, transparent 72%, var(--bg));
}
.ksm-hero-content {
  z-index: 3;
  width: min(1180px, calc(100% - 42px));
  max-width: none;
  margin-inline: auto;
  padding: 40px 0 40px 52%;
}
.keyhan-particle-layer {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.96;
  mix-blend-mode: screen;
  transform: translateZ(0);
  contain: strict;
}
.ksm-hero-subtitle {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 19px;
  font-weight: 700;
}
.ksm-hero-title {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(46px, 5vw, 72px);
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: -2px;
  white-space: nowrap;
}
.ksm-hero-desc {
  text-align: justify;
  margin: 0 0 30px;
  color: #aeb8cf;
  font-size: 21px;
}
.ksm-hero-cta {
  display: flex;
  justify-content: flex-start;
  gap: 14px;
}
.ksm-btn-outline {
  border: 1px solid var(--line);
}

/* About shortcode */
.ksm-about-grid {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(0, 1.7fr);
  align-items: center;
  direction: ltr;
  gap: clamp(34px, 5vw, 78px);
}
.ksm-about-text,
.ksm-about-stats { direction: rtl; }
.ksm-about > .ksm-container > .ksm-section-title { display: none; }
.ksm-about-text h3 {
  display: none;
}
.ksm-about-text p {
  margin: 0 0 12px;
  color: var(--muted);
  text-align: justify;
}
.ksm-about-text p:first-of-type {
  color: var(--text);
  font-size: clamp(25px, 2.25vw, 36px);
  font-weight: 900;
  line-height: 1.65;
  letter-spacing: -.7px;
}
.ksm-about-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: auto;
  align-items: stretch;
  gap: clamp(14px, 1.7vw, 24px);
}
.ksm-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  min-height: 0;
  min-width: 0;
  aspect-ratio: 1 / 1;
  padding: 20px 18px;
  border: 2px solid rgba(116, 134, 190, .30);
  border-radius: 14px;
  background: linear-gradient(
    145deg,
    rgba(10, 20, 44, 0.73),
    rgba(4, 9, 25, 0.72)
  );
  box-shadow: var(--shadow);
}
.ksm-stat::before {
  content: "✦";
  display: grid;
  width: 34px;
  height: 34px;
  margin-bottom: 7px;
  place-items: center;
  color: var(--cyan);
  font-size: 29px;
  line-height: 1;
  filter: drop-shadow(0 0 9px rgba(28, 191, 242, .35));
}
.ksm-stat:nth-child(1)::before { content: "🎮︎"; }
.ksm-stat:nth-child(2)::before { content: "⇩"; color: #784cf4; }
.ksm-stat:nth-child(3)::before { content: "☆"; }
.ksm-stat:nth-child(4)::before { content: "♙"; color: #784cf4; }
.ksm-stat::before { display: none; }
.ksm-stat-icon.dashicons {
  display: inline-grid;
  width: 38px;
  height: 38px;
  margin-bottom: 7px;
  place-items: center;
  color: var(--cyan);
  font-size: 34px;
  line-height: 1;
  filter: drop-shadow(0 0 9px rgba(28,191,242,.35));
}
.ksm-stat-val {
  color: var(--text);
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.35;
  font-weight: 400;
}
.ksm-stat-label {
  width: 100%;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

/* Games shortcode */
.ksm-games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.ksm-game-card {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #081023;
  box-shadow: none;
  cursor: default;
}
.ksm-game-card.is-featured {
  grid-column: span 2;
  outline: none;
}
.ksm-game-cover {
  position: absolute;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden;
  background-image: url("assets/images/games-sheet.webp");
  background-position: 0 0;
  background-size: 200% 200%;
}
.ksm-game-card:nth-child(2) .ksm-game-cover {
  background-position: 100% 0;
}
.ksm-game-card:nth-child(3) .ksm-game-cover {
  background-position: 0 100%;
}
.ksm-game-card:nth-child(4) .ksm-game-cover {
  background-position: 100% 100%;
}
.ksm-game-cover::after {
  position: absolute;
  inset: 20% 0 0;
  content: "";
  background: linear-gradient(transparent, rgba(2, 7, 19, 0.97) 72%);
}
.ksm-game-cover img {
  position: absolute !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center center;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.ksm-game-body {
  position: absolute;
  z-index: 2;
  right: 16px;
  bottom: 18px;
  left: 16px;
  padding: 0;
}
.ksm-game-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 900;
}
.ksm-game-title a {
  color: #fff;
}
.ksm-game-logo { width: 96px !important; height: 96px !important; margin: 0 0 10px !important; border: 1px solid var(--line); border-radius: 18px; object-fit: cover; box-shadow: 0 8px 24px rgba(0,0,0,.3); pointer-events: none; user-select: none; -webkit-user-drag: none; }
.ksm-game-desc {
  display: none;
}
.ksm-game-meta {
  display: flex;
  justify-content: center;
  margin: 12px 0;
  gap: 0;
  color: #bec8dc;
  font-size: 12px;
}
.ksm-meta-item { padding: 0 9px; }
.ksm-meta-item + .ksm-meta-item { border-right: 1px solid var(--line); }
.ksm-installs::before { content: "نصب "; }
.ksm-rating {
  color: #ffd64a;
}
.ksm-game-stores {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.ksm-game-stores .ksm-googleplay,
.ksm-game-stores .ksm-other { grid-column: 1 / -1; }
.ksm-game-stores .ksm-btn:hover { transform: none; }
.ksm-googleplay::before {
  display: inline-block;
  width: 20px;
  height: 22px;
  margin-left: 8px;
  content: "";
  vertical-align: middle;
  background: conic-gradient(from 32deg at 48% 50%, #34a853 0 25%, #fbbc04 0 48%, #ea4335 0 70%, #4285f4 0);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.35));
}
.ksm-btn-sm {
  flex: 1;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  color: #fff;
  background: rgba(3, 7, 18, 0.75);
  font-size: 12px;
  text-align: center;
}
.ksm-store-icon { width: 22px; height: 22px; margin-left: 8px; object-fit: contain; vertical-align: middle; }
.ksm-game-stores > .ksm-btn-ghost { display: none; }

/* Game archive and details */
.ksm-games-archive { padding: 120px 0 70px; }
.ksm-games-archive .ksm-games { padding-top: 20px; }
.ksm-games-archive .ksm-view-all { display: none; }
.ksm-games-archive .ksm-games-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 20px; }
.ksm-games-archive .ksm-game-card { min-width: 0; min-height: 470px; cursor: default; transition: transform .32s ease, border-color .32s ease, box-shadow .32s ease; }
.ksm-games-archive .ksm-game-card.is-featured { grid-column: span 2; }
.ksm-games-archive .ksm-game-card:hover,
.ksm-games-archive .ksm-game-card:focus-within { z-index: 3; transform: translateY(-8px) scale(1.015); border-color: rgba(70, 190, 255, .62); box-shadow: 0 22px 55px rgba(0,0,0,.36), 0 0 30px rgba(50,123,225,.16); }
.ksm-games-archive .ksm-game-card:hover::before,
.ksm-games-archive .ksm-game-card:focus-within::before { opacity: 0; }
.ksm-flag {
  top: 12px;
  right: 12px;
  z-index: 3;
  border-radius: 999px;
  background: linear-gradient(110deg, var(--cyan), var(--purple));
}
.ksm-flag--new {
  background: linear-gradient(110deg, #11b981, var(--cyan));
}

@media (min-width: 701px) {
  .ksm-games-grid {
    display: flex;
    align-items: stretch;
  }
  .ksm-game-card {
    flex-basis: 0;
    flex-grow: var(--game-card-grow, 1);
    flex-shrink: 1;
    min-width: 0;
    cursor: default;
    transition:
      flex-grow 0.52s cubic-bezier(0.22, 0.61, 0.36, 1),
      border-color 0.35s ease,
      box-shadow 0.35s ease;
  }
  .ksm-game-card.is-featured {
    grid-column: auto;
  }
  .ksm-game-card::before {
    position: absolute;
    z-index: 2;
    inset: 0;
    content: "";
    pointer-events: none;
    opacity: 1;
    background: rgba(2, 7, 20, 0.34);
    box-shadow: inset 0 0 65px rgba(0, 0, 0, 0.18);
    transition: opacity 0.38s ease;
  }
  .ksm-game-card.is-active {
    border-color: rgba(70, 190, 255, 0.58);
    box-shadow:
      0 18px 45px rgba(0, 0, 0, 0.28),
      0 0 28px rgba(50, 123, 225, 0.12);
  }
  .ksm-game-card.is-active::before {
    opacity: 0;
  }
  .ksm-game-cover {
    transition: filter 0.4s ease;
  }
  .ksm-game-card:not(.is-active) .ksm-game-cover {
    filter: saturate(0.76) brightness(0.83);
  }
  .ksm-game-card .ksm-game-body {
    z-index: 3;
  }
  .ksm-game-card .ksm-flag {
    z-index: 4;
  }
}

/* Reviews */
.ksm-reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.ksm-review-card {
  min-height: 230px;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: linear-gradient(
    145deg,
    rgba(10, 20, 44, 0.73),
    rgba(4, 9, 25, 0.72)
  );
  box-shadow: var(--shadow);
}
.ksm-review-stars {
  color: #2aaeff;
}
.ksm-review-source {
  border: 1px solid var(--line);
  color: var(--muted);
  background: transparent;
}
.ksm-review-text {
  min-height: 90px;
  color: #bec7da;
  line-height: 1.9;
}
.ksm-review-author {
  color: #fff;
}
.ksm-review-author span {
  color: var(--muted);
}
.ksm-review-author a {
  color: var(--cyan);
}

/* News */
.ksm-news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.ksm-news-card {
  position: relative;
  display: block;
  color: inherit;
  overflow: hidden;
  border: 1px solid rgba(151, 174, 230, 0.08);
  border-radius: 11px;
  background: linear-gradient(
    145deg,
    rgba(10, 20, 44, 0.73),
    rgba(4, 9, 25, 0.72)
  );
  box-shadow: var(--shadow);
}
.ksm-news-img {
  display: block;
  height: 190px;
  background-image: url("assets/images/news-sheet.webp");
  background-position: 0 0;
  background-size: 300% 100%;
}
.ksm-news-card:nth-child(2) .ksm-news-img {
  background-position: 50% 0;
}
.ksm-news-card:nth-child(3) .ksm-news-img {
  background-position: 100% 0;
}
.ksm-news-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.ksm-news-body {
  padding: 16px 18px 58px;
}
.ksm-news-meta {
  color: var(--muted);
  font-size: 12px;
}
.ksm-news-meta time { display: inline-flex; align-items: center; gap: 7px; }
.ksm-news-meta time svg { width: 17px; height: 17px; color: var(--cyan); }
.ksm-news-body h3 {
  margin: 7px 0;
  font-size: 18px;
}
.ksm-news-body h3,
.ksm-news-body h3 a {
  color: #fff;
}
.ksm-news-card:hover { transform: translateY(-5px); border-color: rgba(91,177,255,.15); }

/* Single news */
.ksm-single-news { width: min(100% - 36px, 980px); margin: 0 auto; padding: 130px 0 80px; }
.ksm-news-back { display: inline-flex; margin-bottom: 18px; padding: 9px 15px; border: 1px solid var(--line); border-radius: 8px; color: #fff; background: var(--surface); }
.ksm-news-back:hover { border-color: var(--cyan); transform: translateX(3px); }
.ksm-news-article { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(6,12,30,.82); box-shadow: var(--shadow); }
.ksm-news-hero { position: relative; }
.ksm-news-featured { height: min(55vw, 520px); }
.ksm-news-featured img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.ksm-news-header-content { padding: 34px clamp(22px,5vw,64px) 26px; }
.ksm-news-category { display: inline-block; padding: 5px 12px; border-radius: 999px; color: #fff; background: var(--purple); font-size: 13px; }
.ksm-news-header-content h1 { margin: 16px 0 12px; color: #fff; font-size: clamp(30px,5vw,52px); line-height: 1.35; }
.ksm-news-details { display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--muted); font-size: 14px; }
.ksm-news-details span::before { content: "نویسنده: "; color: #dce6ff; }
.ksm-news-content { padding: 10px clamp(22px,5vw,64px) 42px; color: #d8e0ef; font-size: 17px; line-height: 2.05; }
.ksm-news-content img { max-width: 100%; height: auto; border-radius: 12px; }
.ksm-news-share { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px clamp(22px,5vw,64px); border-top: 1px solid var(--line); }
.ksm-news-share div { display: flex; flex-wrap: wrap; gap: 8px; }
.ksm-news-share a,
.ksm-news-share button { padding: 7px 13px; border: 1px solid var(--line); border-radius: 7px; color: #fff; background: var(--surface); font: inherit; cursor: pointer; }
.ksm-news-share button.is-copied { border-color: var(--cyan); color: var(--cyan); }
.ksm-news-body p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ksm-news-more {
  position: absolute;
  bottom: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 0;
  padding: 6px 10px;
  border: 1px solid rgba(75, 178, 255, .48);
  border-radius: 7px;
  color: #fff;
  background: linear-gradient(110deg, rgba(24,189,241,.18), rgba(112,67,232,.24));
  font-size: 11px;
}
.ksm-news-more:hover { border-color: var(--cyan); box-shadow: 0 0 20px rgba(60,142,239,.16); }
.ksm-news-more span { transition: transform .2s ease; }
.ksm-news-more:hover span { transform: translateX(-3px); }
.ksm-news-archive { min-height: 70vh; padding: 130px 0 80px; }
.ksm-news-archive .ksm-section-title { margin-bottom: 34px; }

/* Team */
.ksm-team-slider {
  position: relative;
  padding: 0 46px;
}
.ksm-team-grid {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  flex-wrap: nowrap;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 8px 2px 18px;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
}
.ksm-team-grid.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.ksm-team-grid::-webkit-scrollbar { display: none; }
.ksm-team-card {
  flex: 0 0 calc((100% - 96px) / 5);
  scroll-snap-align: start;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: center;
}
.ksm-team-arrow {
  position: absolute;
  z-index: 2;
  top: 54px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: #fff;
  background: rgba(9, 17, 39, .92);
  cursor: pointer;
}
.ksm-team-prev { right: 0; }
.ksm-team-next { left: 0; }
.ksm-team-arrow:hover { border-color: var(--cyan); background: rgba(29, 126, 214, .35); }
.ksm-team-photo {
  width: 124px;
  height: 124px;
  margin: 0 auto 11px;
  padding: 4px;
  overflow: hidden;
  border: 2px solid rgba(91, 177, 255, 0.55);
  border-radius: 50%;
  background-image: url("assets/images/team-sheet.webp");
  background-position: 0 0;
  background-size: 400% 100%;
  box-shadow: 0 0 0 7px rgba(37, 80, 164, 0.11);
}
.ksm-team-card:nth-child(2) .ksm-team-photo {
  background-position: 33.333% 0;
}
.ksm-team-card:nth-child(3) .ksm-team-photo {
  background-position: 66.666% 0;
}
.ksm-team-card:nth-child(4) .ksm-team-photo {
  background-position: 100% 0;
}
.ksm-team-photo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.ksm-team-card h3 {
  margin: 0;
  color: #fff;
  font-size: 16px;
}
.ksm-team-role {
  color: var(--muted);
}
.ksm-team-card p {
  margin: 7px 0 10px;
  color: var(--muted);
  font-size: 12px;
}
.ksm-team-socials a {
  border: 1px solid var(--line);
  background: var(--surface);
}

/* Contact */
.ksm-contact > .ksm-container {
  width: min(100% - 40px, 1180px);
  padding: clamp(24px, 4vw, 46px);
  border: 1px solid rgba(151, 174, 230, 0.38);
  border-radius: 14px;
  background:
    radial-gradient(
      circle at 5% 100%,
      rgba(79, 42, 177, 0.28),
      transparent 34%
    ),
    rgba(4, 10, 27, 0.75);
}
.ksm-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 34px;
}
.ksm-section-heading .ksm-section-title { margin-bottom: 0; }
.ksm-view-all {
  flex: 0 0 auto;
  padding: 10px 24px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #fff;
  background: transparent;
  font-weight: 700;
  transition: transform .15s, opacity .15s, border-color .15s;
}
.ksm-view-all:hover { transform: translateY(-2px); opacity: .92; border-color: rgba(255,255,255,.4); }
.ksm-contact-grid {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(0, 1.45fr);
  align-items: center;
  gap: clamp(34px, 5vw, 68px);
}
.ksm-contact {
  padding-bottom: 76px;
}
.ksm-contact .ksm-section-title {
  margin-bottom: 16px;
}
.ksm-contact-info {
  padding-left: clamp(24px, 4vw, 52px);
  border-left: 1px solid rgba(151,174,230,.3);
}
.ksm-contact-info h2 { margin: 0 0 12px; color: #fff; font-size: clamp(25px, 2.7vw, 37px); line-height: 1.5; }
.ksm-contact-copy { margin-bottom: 28px !important; font-size: 15px; text-align: justify; }
.ksm-contact-methods { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.ksm-contact-method { position: relative; padding-right: 30px; direction: ltr; color: #dbe5f7 !important; }
.ksm-contact-method::before { position: absolute; right: 0; color: var(--cyan); font-size: 18px; }
.ksm-contact-method.is-email::before { content: "✉"; }
.ksm-contact-method.is-phone::before {
  width: 19px;
  height: 19px;
  content: "";
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.79 19.79 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.9.33 1.78.62 2.63a2 2 0 0 1-.45 2.11L8 9.73a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.85.29 1.73.5 2.63.62A2 2 0 0 1 22 16.92Z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6A19.79 19.79 0 0 1 2.12 4.18 2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.12.9.33 1.78.62 2.63a2 2 0 0 1-.45 2.11L8 9.73a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.85.29 1.73.5 2.63.62A2 2 0 0 1 22 16.92Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ksm-contact-method.is-address { direction: rtl; }
.ksm-contact-method.is-address::before {
  width: 19px;
  height: 19px;
  content: "";
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M20 10c0 5-8 12-8 12S4 15 4 10a8 8 0 1 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ksm-contact-info p {
  margin: 0 0 7px;
  color: var(--muted);
}
.ksm-contact-socials {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 18px;
  gap: 7px;
}
.ksm-contact-info a {
  color: var(--cyan);
}
.ksm-contact-map {
  width: 100%;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid rgba(151,174,230,.3);
  border-radius: 12px;
  background: rgba(2,7,19,.7);
}
.ksm-contact-map iframe {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 200px;
  border: 0;
}
.ksm-contact-socials a {
  padding: 0;
  border: 0;
  color: #dbe5f7;
  background: transparent;
}
.ksm-contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 0;
  gap: 8px 10px;
  background: transparent;
  box-shadow: none;
}
.ksm-form-row {
  margin: 0;
}
.ksm-form-row:nth-of-type(3),
.ksm-form-row:nth-of-type(4),
.ksm-recaptcha,
.ksm-contact-form > .ksm-btn,
.ksm-form-feedback {
  grid-column: 1 / -1;
}
.ksm-form-row label {
  margin-bottom: 3px;
  color: #cbd4e7;
  font-size: 13px;
}
.ksm-form-row input,
.ksm-form-row select,
.ksm-form-row textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #fff;
  background: rgba(3, 9, 25, 0.78);
}
.ksm-form-row input,
.ksm-form-row select {
  padding-block: 8px;
}
.ksm-form-row textarea {
  height: 88px;
  min-height: 88px;
  padding-block: 8px;
  resize: vertical;
}
.ksm-contact-form > .ksm-btn {
  display: inline-flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  justify-self: end;
  gap: 10px;
  width: max-content;
  min-width: 130px;
}
.ksm-contact-form > .ksm-btn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ksm-form-feedback.ksm-ok {
  color: #72e8ae;
}
.ksm-form-feedback.ksm-err {
  color: #ff9da8;
}

/* Plugin footer */
.ksm-footer {
  position: relative;
  overflow: hidden;
  padding: 54px 0 18px;
  color: var(--muted);
  border-top: 1px solid rgba(255,255,255,.15);
  background:
    radial-gradient(ellipse at 12% 15%, rgba(56, 111, 232, .25), transparent 35%),
    radial-gradient(ellipse at 78% 115%, rgba(111, 55, 222, .26), transparent 42%),
    linear-gradient(180deg, rgba(4, 11, 29, .98), rgba(2, 6, 18, 1));
  box-shadow: inset 0 18px 55px rgba(19, 75, 151, .08), 0 -10px 40px rgba(20, 78, 158, .08);
}
.ksm-footer::before {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
  display: none;
  opacity: .72;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.9) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(74,190,255,.8) 0 1px, transparent 1.7px),
    radial-gradient(circle, rgba(166,132,255,.7) 0 1px, transparent 1.6px);
  background-position: 12px 18px, 67px 43px, 31px 78px;
  background-size: 89px 83px, 131px 119px, 173px 151px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,.9), rgba(0,0,0,.35) 48%, rgba(0,0,0,.85));
}
.ksm-footer-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  padding-bottom: 30px;
  gap: 30px;
}
.ksm-footer-brand strong {
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

/* Back to top */
.keyhan-back-to-top {
  position: fixed;
  z-index: 999;
  bottom: 24px;
  left: 24px;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(86, 184, 255, .48);
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, rgba(27, 184, 241, .92), rgba(102, 58, 226, .94));
  box-shadow: 0 12px 30px rgba(24, 81, 180, .34);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .25s ease, visibility .25s ease, transform .25s ease, box-shadow .25s ease;
}
.keyhan-back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.keyhan-back-to-top:hover { box-shadow: 0 15px 36px rgba(49, 116, 230, .5); transform: translateY(-3px); }
.keyhan-back-to-top svg { width: 23px; height: 23px; }
.ksm-footer-socials a {
  color: var(--muted);
}
.ksm-footer-socials {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.ksm-footer-socials a {
  display: inline-grid;
  width: 45px;
  height: 45px;
  padding: 9px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.ksm-footer-socials a:hover { transform: translateY(-4px); border-color: rgba(60,190,242,.58); background: rgba(14,28,57,.9); }
.ksm-footer-socials img { width: 100%; height: 100%; object-fit: contain; }
.ksm-footer-bottom {
  position: relative;
  z-index: 3;
  border-top: 0;
}
.ksm-footer-bottom .ksm-container {
  display: flex;
  justify-content: space-between;
}
.site-footer-fallback {
  padding: 35px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}
.keyhan-plugin-required {
  min-height: 70vh;
  padding-top: 160px;
}
.keyhan-plugin-required p {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

@media (max-width: 900px) {
  .site-header { top: 0; padding-inline: 0; }
  body.admin-bar .site-header { top: 32px; }
  .site-header .nav-shell {
    width: 100%;
    max-width: none;
    margin-inline: 0;
    height: 68px;
    padding-inline: 26px;
    border-top: 0;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }
  .main-nav {
    position: absolute;
    top: 72px;
    right: 24px;
    left: 24px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #070e22;
  }
  .main-nav a {
    font-size: 18px;
  }
  .main-nav.open {
    display: flex;
  }
  .menu-toggle {
    display: block;
  }
  .nav-cta {
    display: none;
  }
  .ksm-hero-content {
    padding-left: 32%;
  }
  .ksm-about-grid,
  .ksm-contact-grid {
    grid-template-columns: 1fr;
  }
  .ksm-about-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .ksm-activities-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ksm-games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .ksm-games-archive .ksm-games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ksm-reviews-grid,
  .ksm-news-grid {
    grid-template-columns: 1fr 1fr;
  }
  .ksm-team-grid {
    gap: 26px 18px;
  }
  .ksm-team-card { flex-basis: calc((100% - 36px) / 3); }
  .ksm-contact-info {
    padding: 0 0 20px;
    border-bottom: 1px solid var(--line);
    border-left: 0;
  }
  .ksm-footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .ksm-footer-links,
  .ksm-footer-socials,
  .ksm-footer-contact {
    align-items: center;
    justify-content: center;
  }
}
@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
}
@media (max-width: 600px) {
  .container,
  .ksm-container {
    width: min(100% - 28px, 1180px);
  }
  .site-header {
    top: 0;
  }
  body.admin-bar .site-header { top: 46px; }
  .nav-shell {
    height: 68px;
    padding-inline: 26px;
  }
  .brand {
    font-size: 27px;
  }
  .ksm-hero {
    min-height: 680px;
    background-position: 30% center;
  }
  .ksm-hero-overlay {
    background: linear-gradient(
      180deg,
      rgba(2, 8, 23, 0.2),
      rgba(2, 8, 23, 0.92) 68%,
      var(--bg)
    );
  }
  .ksm-hero-content {
    width: calc(100% - 84px);
    padding: 160px 0 30px;
    text-align: center;
  }
  .ksm-hero-title {
    font-size: 42px;
  }
  .ksm-hero-desc {
    font-size: 17px;
  }
  .ksm-hero-cta {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .ksm-hero-cta > .ksm-btn { width: 70%; min-height: 58px; display: inline-flex; align-items: center; justify-content: center; }
  .ksm-about,
  .ksm-activities,
  .ksm-games,
  .ksm-reviews,
  .ksm-news,
  .ksm-team,
  .ksm-contact {
    padding: 42px 0;
  }
  .ksm-section-title {
    font-size: 23px;
  }
  .ksm-games-grid,
  .ksm-reviews-grid,
  .ksm-news-grid {
    grid-template-columns: 1fr;
  }
  .ksm-about-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ksm-activities-grid { grid-template-columns: 1fr; }
  .ksm-game-card.is-featured {
    grid-column: auto;
  }
  .ksm-team-grid {
    gap: 30px 12px;
  }
  .ksm-team-slider { padding: 0 34px; }
  .ksm-team-card { flex-basis: calc((100% - 12px) / 2); }
  .ksm-team-arrow { width: 30px; height: 30px; }
  .ksm-team-photo {
    width: 108px;
    height: 108px;
  }
  .ksm-contact > .ksm-container {
    width: min(100% - 28px, 826px);
    padding: 20px;
  }
  .ksm-contact-form {
    grid-template-columns: 1fr;
  }
  .ksm-form-row {
    grid-column: 1 / -1;
  }
  .ksm-footer-bottom .ksm-container {
    flex-direction: column;
    text-align: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  .button-primary:hover,
  .button-primary:focus-visible,
  .ksm-btn-primary:hover,
  .ksm-btn-primary:focus-visible,
  .button-primary:hover::before,
  .button-primary:focus-visible::before,
  .ksm-btn-primary:hover::before,
  .ksm-btn-primary:focus-visible::before,
  .button-primary:hover::after,
  .button-primary:focus-visible::after,
  .ksm-btn-primary:hover::after,
  .ksm-btn-primary:focus-visible::after {
    animation: none !important;
  }
}
