/*
Theme Name: KT1CO Core
Version: 1.8
*/

/* ---------------- THEME TOKENS ---------------- */

:root {
  --kt-color-bg: #070f26;
  --kt-color-surface: #0b1535;
  --kt-color-surface-soft: #101b3f;

  /* Based on KT1 logo: pink + orange + lime */
  --kt-color-accent: #ff3f8e;
  --kt-color-accent-soft: rgba(255, 63, 142, 0.12);
  --kt-color-accent-strong: #ff256f;

  --kt-color-accent-alt: #ff8a1a;
  --kt-color-highlight: #b4ff2b;

  --kt-color-text: #f9fafb;
  --kt-color-muted: #cbd5f5;

  --kt-radius-lg: 18px;
  --kt-radius-full: 999px;

  --kt-max-width: 1200px;
  --kt-header-height: 78px;
  --kt-transition-fast: 150ms ease-out;
}

html {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: "IRANSans", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #111827, #020617 70%);
  color: var(--kt-color-text);
  direction: rtl;
  text-align: right;
}

/* ---------------- LAYOUT SHELL ---------------- */

.kt-site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* ---------------- HEADER ---------------- */

.kt-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(24, 31, 56, 0.98),
    rgba(7, 15, 38, 0.96)
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.35);
}

/* one row: [brand] | [nav] | [buttons] | [burger] */

.kt-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  column-gap: 10px;
  height: var(--kt-header-height);
}

/* ---------------- BRAND ---------------- */

.kt-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kt-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 16px;
  background: radial-gradient(circle at 30% 30%, #ffffff, #e5e7eb);
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.65);
}

.kt-logo img {
  display: block;
  max-height: 40px;
  width: auto;
}

.kt-brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kt-brand-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--kt-color-text);
  max-width: 260px;
  line-height: 1.4;
  white-space: normal;
}

/* ---------------- HOME SWITCHER BAR ---------------- */

.kt-home-switcher-bar {
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  background: radial-gradient(circle at top, #0b1535, #070f26);
}

.kt-home-switcher {
  margin: 0;
  padding: 6px 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;  /* put KT1CO / KIEFZCO / ... to the right */
  gap: 6px;
}

.kt-home-switcher li {
  margin: 0;
  padding: 0;
}

.kt-home-switcher li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border-radius: var(--kt-radius-full);
  font-size: 11px;
  color: var(--kt-color-muted);
  text-decoration: none;
  border: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(7, 15, 38, 0.95);
  transition: var(--kt-transition-fast);
}

.kt-home-switcher li.current-menu-item > a,
.kt-home-switcher li a:hover {
  color: var(--kt-color-text);
  border-color: var(--kt-color-accent-alt);
  background: linear-gradient(
    135deg,
    var(--kt-color-accent-alt),
    var(--kt-color-accent-strong)
  );
}

/* ---------------- NAV – SHARED ---------------- */

.kt-header,
.kt-nav-wrapper,
.kt-nav {
  overflow: visible !important;
}

.kt-nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

/* top-level nav pills (primary menu) */

.kt-header ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kt-header ul li {
  margin: 0;
  padding: 0;
  position: relative;
}

.kt-header ul li > a {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: var(--kt-radius-full);
  font-size: 12px;
  color: var(--kt-color-muted);
  text-decoration: none;
  border: 1px solid transparent;
  background: transparent;
  transition: var(--kt-transition-fast);
}

.kt-header ul li.current-menu-item > a,
.kt-header ul li > a:hover {
  color: var(--kt-color-text);
  border-color: rgba(148, 163, 184, 0.65);
  background: radial-gradient(
    circle at top,
    rgba(148, 163, 184, 0.18),
    rgba(7, 15, 38, 0.98)
  );
}

/* primary nav list */

.kt-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

/* ---------------- SIMPLE DROPDOWN MENUS ---------------- */

.kt-nav .menu-item-has-children {
  position: relative;
}

/* hidden by default */
.kt-nav .menu-item-has-children > ul.sub-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 210px;
  margin: 0;
  padding: 8px;
  list-style: none;

  border-radius: 14px;
  background: rgba(12, 19, 43, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.85);

  display: none;
  z-index: 9999;
}

/* show on hover */
.kt-nav .menu-item-has-children:hover > ul.sub-menu {
  display: block;
}

/* items inside dropdown */
.kt-nav ul.sub-menu li {
  margin: 0 0 3px 0;
  padding: 0;
}

.kt-nav ul.sub-menu li:last-child {
  margin-bottom: 0;
}

/* links inside dropdown */
.kt-nav ul.sub-menu li > a {
  display: block;
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--kt-color-text);
  text-decoration: none;
  white-space: nowrap;
}

/* hover state for dropdown links */
.kt-nav ul.sub-menu li > a:hover {
  border-color: rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.96);
}

/* safety net: if WP outputs menu-item-has-children elsewhere in header */

.kt-header .menu-item-has-children {
  position: relative;
}

.kt-header .menu-item-has-children > ul.sub-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 210px;
  margin: 0;
  padding: 8px;
  list-style: none;

  border-radius: 14px;
  background: rgba(12, 19, 43, 0.98);
  border: 1px solid rgba(148, 163, 184, 0.55);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.85);

  display: none;
  z-index: 9999;
}

.kt-header .menu-item-has-children:hover > ul.sub-menu {
  display: block;
}

.kt-header ul.sub-menu li {
  margin: 0 0 3px 0;
  padding: 0;
}

.kt-header ul.sub-menu li:last-child {
  margin-bottom: 0;
}

.kt-header ul.sub-menu li > a {
  display: block;
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--kt-color-text);
  text-decoration: none;
  white-space: nowrap;
}

.kt-header ul.sub-menu li > a:hover {
  border-color: rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.96);
}

/* ---------------- MEGA MENU (خدمات بازرگانی) ---------------- */

.kt-mega-services {
  position: absolute;
  inset-inline: 0;
  top: calc(var(--kt-header-height) + 34px); /* header + home-switcher bar */
  display: none;
  z-index: 40;
}

.kt-mega-services.is-open {
  display: block;
}

.kt-mega-services .kt-container {
  padding-top: 10px;
  padding-bottom: 18px;
}

/* big card */

.kt-mega {
  max-width: var(--kt-max-width);
  margin-inline: auto;
  border-radius: 24px;
  background: radial-gradient(
    circle at top left,
    rgba(255, 63, 142, 0.18),
    rgba(11, 21, 53, 0.98)
  );
  border: 1px solid rgba(148, 163, 184, 0.65);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.9);
  padding: 20px 22px;
}

/* columns inside mega */

.kt-mega-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
  justify-content: space-between;
}

.kt-mega-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
}

/* one column */

.kt-mega-list > li {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 180px;
}

/* top label in each column */

.kt-mega-list > li > a {
  padding: 4px 0;
  border-radius: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--kt-color-highlight);
  border: none;
  background: transparent;
}

/* ensure mega menu columns don’t behave like normal dropdowns */

.kt-mega-list > li.menu-item-has-children {
  position: static !important;
}

.kt-mega-list > li > ul.sub-menu {
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  min-width: 0;
  padding: 0;
  margin: 0;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex !important;
  flex-wrap: wrap;
  gap: 8px;
}

/* pill items */

.kt-mega-list > li > ul.sub-menu > li > a {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: var(--kt-radius-full);
  font-size: 12px;
  color: var(--kt-color-text);
  background: rgba(7, 15, 38, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.6);
  white-space: nowrap;
  text-decoration: none;
  transition: var(--kt-transition-fast);
}

.kt-mega-list > li > ul.sub-menu > li > a:hover {
  border-color: var(--kt-color-accent-strong);
  background: var(--kt-color-accent-soft);
}

/* ---------------- KEYCLOAK BUTTONS ---------------- */

.kt-identity-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.kt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--kt-radius-full);
  font-size: 12px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--kt-transition-fast);
}

.kt-btn-outline {
  border-color: rgba(148, 163, 184, 0.8);
  color: var(--kt-color-text);
  background: transparent;
}

.kt-btn-outline:hover {
  background: rgba(15, 23, 42, 0.95);
}

.kt-btn-primary {
  background: linear-gradient(
    135deg,
    var(--kt-color-accent-alt),
    var(--kt-color-accent-strong)
  );
  color: white;
}

.kt-btn-primary:hover {
  filter: brightness(1.05);
}

/* ---------------- BURGER (MOBILE) ---------------- */

.kt-burger {
  display: none;
  width: 36px;
  height: 36px;
  border-radius: var(--kt-radius-full);
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(7, 15, 38, 0.97);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.kt-burger-lines {
  width: 18px;
  height: 2px;
  background: var(--kt-color-text);
  position: relative;
}

.kt-burger-lines::before,
.kt-burger-lines::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  width: 18px;
  height: 2px;
  background: var(--kt-color-text);
}

.kt-burger-lines::before { top: -6px; }
.kt-burger-lines::after  { top:  6px; }

/* ---------------- MOBILE NAV ---------------- */

@media (max-width: 1100px) {
  .kt-header-inner {
    grid-template-columns: auto auto auto; /* brand | nav(burger) | burger/btns */
  }

  .kt-nav-wrapper {
    justify-content: flex-end;
  }

  .kt-header ul {
    position: fixed;
    inset-inline: 12px;
    top: 70px;
    background: rgba(7, 15, 38, 0.98);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    padding: 12px;
    flex-direction: column;
    gap: 4px;
    transform-origin: top;
    transform: scaleY(0.8);
    opacity: 0;
    pointer-events: none;
    transition: 160ms ease-out;
  }

  .kt-nav.kt-nav-open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .kt-mega-services {
    position: static;
  }

  .kt-identity-actions {
    display: none;
  }

  .kt-burger {
    display: inline-flex;
  }
}

/* ---------------- MAIN & FOOTER ---------------- */

main.kt-main {
  flex: 1;
  padding: 24px 0 40px;
}

.kt-card {
  background: radial-gradient(
    circle at top,
    rgba(148, 163, 184, 0.22),
    rgba(7, 15, 38, 0.98)
  );
  border-radius: var(--kt-radius-lg);
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.kt-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  padding: 16px 0 24px;
  font-size: 12px;
  color: var(--kt-color-muted);
}

.kt-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}


/* ================= HERO – FULL WIDTH CHEVRON ================= */

.kt-hero-wrap {
  margin-inline: calc(50% - 50vw); /* break out of .kt-container */
}

.kt-hero-chevron {
  position: relative;
  width: 100vw;
  height: 420px;
  background: radial-gradient(circle at top, #111827, #020617 70%);
  overflow: hidden;
}

/* animated chevron layers */
.kt-hero-chevron::before,
.kt-hero-chevron::after {
  content: "";
  position: absolute;
  inset-inline: -20vw;
  height: 60%;
  top: 25%;
  background: linear-gradient(
    135deg,
    rgba(255, 63, 142, 0.35),
    rgba(255, 138, 26, 0.25)
  );
  clip-path: polygon(0 0, 50% 100%, 100% 0, 100% 100%, 0 100%);
  opacity: 0.75;
}

.kt-hero-chevron::before {
  transform: translateX(-10%);
  animation: kt-chevron-move 18s infinite alternate ease-in-out;
}

.kt-hero-chevron::after {
  top: 30%;
  opacity: 0.45;
  filter: blur(2px);
  animation: kt-chevron-move 22s infinite alternate-reverse ease-in-out;
}

/* hero content */

.kt-hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--kt-max-width);
  margin: 0 auto;
  height: 100%;
  padding: 40px 16px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.kt-hero-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.kt-hero-subtitle {
  font-size: 14px;
  color: var(--kt-color-muted);
  max-width: 560px;
}

/* K scroll button */

.kt-hero-scroll {
  position: absolute;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%);
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.9);
  background: radial-gradient(circle at 30% 30%, #ffffff, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.9);
  text-decoration: none;
  transition: transform 160ms ease-out, box-shadow 160ms ease-out;
}

.kt-hero-scroll img {
  max-width: 30px;
  max-height: 30px;
  display: block;
}

.kt-hero-scroll:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.95);
}

/* main content under hero re-centred inside container width */

.kt-main-content {
  max-width: var(--kt-max-width);
  margin: 0 auto;
}

/* chevron keyframes */

@keyframes kt-chevron-move {
  0% {
    transform: translateX(-8%);
  }
  50% {
    transform: translateX(6%);
  }
  100% {
    transform: translateX(-4%);
  }
}

/* responsive adjustments */

@media (max-width: 768px) {
  .kt-hero-chevron {
    height: 340px;
  }

  .kt-hero-inner {
    padding: 32px 16px 70px;
  }

  .kt-hero-title {
    font-size: 18px;
  }

  .kt-hero-subtitle {
    font-size: 12px;
  }

  .kt-hero-scroll {
    width: 50px;
    height: 50px;
    bottom: 24px;
  }
}
