/* Vinifo landing: animated sapphire gradient and accessible module showcase */
.home-gradient-stage {
  --home-glow-blue: rgba(50, 125, 255, .56);
  --home-glow-violet: rgba(113, 72, 255, .45);
  --home-glow-cyan: rgba(26, 205, 245, .30);
  --home-module-card-bg: rgba(12, 26, 58, .75);
  --home-module-border: rgba(140, 180, 247, .22);
  --home-module-tab-bg: rgba(11, 27, 61, .56);
  --home-module-tab-text: #d6e3ff;
  position: relative;
  isolation: isolate;
  overflow: clip;
  background: linear-gradient(122deg, #081a40 4%, #101a3c 46%, #091c43 100%);
}
/* Keep the aurora in a bounded composited layer; no huge rotating blurred canvas. */
.home-gradient-stage::before {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
  top: 55px;
  right: max(-100px, calc((100vw - 1280px) / 2));
  width: clamp(360px, 56vw, 700px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 20deg,
    transparent 0deg,
    var(--home-glow-blue) 62deg,
    transparent 120deg,
    var(--home-glow-violet) 197deg,
    transparent 265deg,
    var(--home-glow-cyan) 323deg,
    transparent 360deg);
  /* An alpha mask provides soft edges without expensive filter:blur. */
  -webkit-mask-image: radial-gradient(circle, #000 5%, rgba(0,0,0,.64) 41%, transparent 72%);
  mask-image: radial-gradient(circle, #000 5%, rgba(0,0,0,.64) 41%, transparent 72%);
  opacity: .7;
  transform: rotate(0deg);
  animation: vinifo-home-aurora-spin 48s linear infinite paused;
}
.home-gradient-stage.aurora-is-active::before {
  animation-play-state: running;
  will-change: transform;
}
.home-gradient-stage::after {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse 48% 23% at 88% 12%, rgba(38, 153, 255, .24), transparent 100%),
    radial-gradient(ellipse 46% 34% at 8% 75%, rgba(115, 80, 255, .21), transparent 100%);
}
@keyframes vinifo-home-aurora-spin {
  to { transform: rotate(360deg); }
}
.home-gradient-stage .homepage-hero,
.home-gradient-stage .home-modules-section {
  background: transparent;
  border-color: transparent;
}
.home-gradient-stage .homepage-hero::before {
  opacity: .38;
}
.home-gradient-stage .homepage-hero::after {
  background: linear-gradient(180deg, transparent, rgba(10, 21, 52, .08));
}
.home-gradient-stage .homepage-hero {
  padding-bottom: 18px;
}
.home-gradient-stage .hero-trust-row {
  border-top-color: rgba(147, 187, 255, .16);
}
.home-gradient-stage .hero-modules-jump {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  font-weight: 400;
  color: #88dbff;
  transition: color .2s ease;
}
.home-gradient-stage .hero-modules-jump:hover { color: #fff; }
.home-gradient-stage .home-modules-section {
  padding: 58px 0 104px;
  scroll-margin-top: 18px;
}
.home-modules-heading { margin-bottom: 25px; }
.home-modules-heading h2 { font-size: clamp(26px, 3.2vw, 39px); font-weight: 500; }
.home-modules-heading p { font-size: 13px; }
.home-modules-tabs-wrap {
  max-width: 100%;
  margin: 0 auto 30px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(118, 156, 224, .5) transparent;
  padding: 6px 4px 12px;
}
.home-modules-tabs {
  display: flex;
  align-items: center;
  width: max-content;
  max-width: none;
  margin-inline: auto;
  padding: 7px;
  gap: 7px;
  border: 1px solid rgba(154, 180, 239, .25);
  background: rgba(11, 27, 61, .65);
  border-radius: 999px;
  box-shadow: 0 14px 42px rgba(4, 13, 38, .16), inset 0 1px rgba(255,255,255,.09);
  /* No backdrop blur: avoids expensive backdrop recomposition on scroll. */
}
.home-modules-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 18px;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--home-module-tab-text);
  background: transparent;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.6;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s;
}
.home-modules-tab svg { width: 18px; height: 18px; flex-shrink: 0; }
.home-modules-tab:hover { background: rgba(112, 151, 229, .14); }
.home-modules-tab[aria-selected="true"] {
  color: white;
  background: linear-gradient(110deg, #3f83ff, #755cff);
  border-color: rgba(255,255,255,.27);
  box-shadow: 0 9px 19px rgba(65, 101, 242, .25), inset 0 1px rgba(255,255,255,.22);
}
.home-modules-tab:focus-visible,
.home-module-card-link:focus-visible,
.hero-modules-jump:focus-visible {
  outline: 3px solid #31ceff;
  outline-offset: 3px;
}
.home-module-panel[hidden] { display: none !important; }
.home-module-panel {
  animation: vinifo-module-in .22s ease both;
}
@keyframes vinifo-module-in {
  from { opacity: .55; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.home-module-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.home-module-panel-heading strong { display: block; font-size: 19px; line-height: 1.7; font-weight: 500; }
.home-module-panel-heading p { margin: 4px 0 0; color: #a8badd; font-size: 12px; }
.home-module-panel-counter {
  color: #a8badd;
  font-size: 11px;
  border: 1px solid rgba(130, 169, 237, .25);
  border-radius: 999px;
  padding: 6px 13px;
  white-space: nowrap;
}
.home-module-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.home-module-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  min-width: 0;
  min-height: 270px;
  padding: 26px 23px 21px;
  border-radius: 25px;
  border: 1px solid var(--home-module-border);
  background: var(--home-module-card-bg);
  box-shadow: 0 15px 40px rgba(4, 13, 43, .13), inset 0 1px rgba(255,255,255,.08);
  /* Solid translucent surface: no backdrop blur during scroll. */
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.home-module-card:hover {
  transform: translateY(-5px);
  border-color: rgba(71, 197, 255, .51);
  box-shadow: 0 21px 44px rgba(4, 17, 49, .23), inset 0 1px rgba(255,255,255,.10);
}
.home-module-card-icon {
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  color: #70d9ff;
  background: rgba(70, 142, 250, .17);
  border: 1px solid rgba(110, 180, 255, .19);
  border-radius: 16px;
  margin-bottom: 18px;
}
.home-module-card-icon svg { font-size: 23px; }
.home-module-card:nth-child(2) .home-module-card-icon { color: #b3a0ff; background: rgba(114, 90, 255, .16); }
.home-module-card:nth-child(3) .home-module-card-icon { color: #3fe3d4; background: rgba(39, 205, 192, .12); }
.home-module-card:nth-child(4) .home-module-card-icon { color: #92baff; background: rgba(76, 126, 233, .13); }
.home-module-card h3 { font-size: 15px; line-height: 1.7; margin: 0 0 8px; font-weight: 500; }
.home-module-card p { margin: 0 0 24px; font-size: 12px; line-height: 2; color: #afc1dd; flex: 1; }
.home-module-card-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #70d3ff;
  font-size: 11px;
  font-weight: 400;
  padding: 6px 0;
  transition: gap .2s ease, color .2s ease;
}
.home-module-card-link svg { width: 16px; height: 16px; }
.home-module-card-link:hover { gap: 12px; color: #fff; }
.home-modules-more { margin-top: 32px; display: flex; justify-content: center; }

/* Sapphire/violet/cyan palette kept in both existing theme modes. */
html[data-theme="light"] .home-gradient-stage {
  --home-glow-blue: rgba(70, 131, 251, .47);
  --home-glow-violet: rgba(135, 104, 254, .44);
  --home-glow-cyan: rgba(60, 202, 232, .34);
  --home-module-card-bg: rgba(255, 255, 255, .86);
  --home-module-border: rgba(120, 144, 211, .26);
  --home-module-tab-text: #485975;
  background: linear-gradient(115deg, #f3f7ff 4%, #f3f2ff 48%, #ecf7ff 100%);
}
html[data-theme="light"] .home-gradient-stage::before { opacity: .50; }
html[data-theme="light"] .home-gradient-stage::after {
  background: radial-gradient(ellipse 50% 24% at 91% 10%, rgba(118, 170, 255, .18), transparent 100%);
}
html[data-theme="light"] .home-gradient-stage .homepage-hero,
html[data-theme="light"] .home-gradient-stage .home-modules-section { background: transparent; }
html[data-theme="light"] .home-gradient-stage .homepage-hero::after {
  background: linear-gradient(180deg, transparent, rgba(250, 250, 255, .05));
}
html[data-theme="light"] .home-gradient-stage .hero-trust-row { border-top-color: rgba(100, 129, 203, .17); }
html[data-theme="light"] .home-gradient-stage .hero-modules-jump { color: #3657bf; }
html[data-theme="light"] .home-gradient-stage .hero-modules-jump:hover { color: #5e3bcc; }
html[data-theme="light"] .home-modules-tabs {
  background: rgba(255,255,255,.76);
  border-color: rgba(141, 158, 214, .21);
  box-shadow: 0 15px 36px rgba(80, 91, 149, .11);
}
html[data-theme="light"] .home-modules-tab:hover { background: rgba(93, 119, 203, .09); }
html[data-theme="light"] .home-modules-tab[aria-selected="true"] { color: #fff; }
html[data-theme="light"] .home-module-card {
  box-shadow: 0 16px 40px rgba(66, 81, 148, .08), inset 0 1px rgba(255,255,255,.9);
}
html[data-theme="light"] .home-module-card:hover { border-color: rgba(86, 112, 241, .47); }
html[data-theme="light"] .home-module-card h3,
html[data-theme="light"] .home-module-panel-heading strong { color: #1e2c49; }
html[data-theme="light"] .home-module-card p,
html[data-theme="light"] .home-module-panel-heading p { color: #5d6f8e; }
html[data-theme="light"] .home-module-panel-counter { color: #596985; border-color: rgba(100, 137, 201, .21); }
html[data-theme="light"] .home-module-card-link { color: #3e59c7; }
html[data-theme="light"] .home-module-card-link:hover { color: #6f47df; }

@media (max-width: 1100px) {
  .home-module-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-module-card { min-height: 234px; }
}
@media (max-width: 700px) {
  .home-gradient-stage::before {
    top: 80px;
    right: -95px;
    width: min(95vw, 460px);
    opacity: .4;
    animation: none;
    will-change: auto;
  }
  .home-gradient-stage .home-modules-section { padding: 39px 0 72px; }
  .home-modules-tabs { margin-inline: 0; }
  .home-modules-tabs-wrap { margin-bottom: 18px; }
  .home-modules-tab { min-height: 40px; font-size: 11px; padding: 7px 12px; gap: 6px; }
  .home-modules-heading { margin-bottom: 18px; }
  .home-module-panel-heading { align-items: flex-start; }
  .home-module-panel-heading strong { font-size: 16px; }
  .home-module-panel-heading p { font-size: 11px; }
  .home-module-panel-counter { display: none; }
  .home-module-cards { grid-template-columns: 1fr; gap: 12px; }
  .home-module-card { min-height: 205px; border-radius: 21px; padding: 20px; }
  .home-module-card-icon { width: 43px; height: 43px; margin-bottom: 12px; }
  .home-module-card p { margin-bottom: 10px; }
  .home-modules-more .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .home-gradient-stage::before { animation: none; will-change: auto; }
  .home-module-panel { animation: none; }
  .home-module-card, .home-modules-tab, .home-module-card-link { transition: none; }
  .home-module-card:hover { transform: none; }
}

/* Lightweight Vazirmatn typography: tabs and headings stay regular/medium. */
.home-gradient-stage .homepage-hero .hero-copy h1,
.home-gradient-stage .home-modules-heading h2 {
  font-weight: 500;
}
.home-gradient-stage .home-modules-tab[aria-selected="true"] {
  font-weight: 500;
}

/* v2.22.333 — improve contrast on light hover, retain regular typography. */
.home-modules-tab {font-weight:400;}
.home-modules-tab[aria-selected="true"] {font-weight:500;background:linear-gradient(110deg,#456fff,#625bf1);color:#fff;}
.home-module-card h3,.home-module-panel-heading strong,.home-modules-heading h2{font-weight:500;}
.home-module-card-link{font-weight:500;}
html[data-theme="light"] .home-modules-tab:not([aria-selected="true"]){color:#334767;background:transparent;}
html[data-theme="light"] .home-modules-tab:not([aria-selected="true"]):hover{
  color:#2d3f91;background:#e9edff;border-color:rgba(101,112,225,.23);
}
html[data-theme="light"] .home-modules-tab[aria-selected="true"],
html[data-theme="light"] .home-modules-tab[aria-selected="true"]:hover{
  color:#fff!important;background:linear-gradient(110deg,#456fff,#625bf1)!important;
  border-color:#6b74ea!important;text-shadow:none!important;
}
html[data-theme="light"] .home-module-card:hover{
  background:#fff;border-color:#889bf0;box-shadow:0 12px 28px rgba(69,94,165,.10);
}
html[data-theme="light"] .home-module-card:hover h3{color:#24335b;}
html[data-theme="light"] .home-module-card-link:hover{color:#5147b5;}


/* v2.22.334 — Public landing module cards: centered, calm and reference-inspired.
   Kept intentionally independent of authenticated admin styles. */
.home-gradient-stage {
  --home-module-card-bg: #14274a;
  --home-module-border: rgba(114,154,237,.23);
}
.home-gradient-stage .home-module-cards {
  gap: 23px 16px;
  padding-bottom: 12px;
}
.home-gradient-stage .home-module-card {
  align-items: center;
  text-align: center;
  justify-content: flex-start;
  min-height: 248px;
  padding: 24px 19px 34px;
  margin-bottom: 11px;
  border-radius: 23px;
  border: 1px solid rgba(135,167,242,.22);
  background: linear-gradient(160deg,rgba(29,48,92,.94),rgba(13,29,61,.97));
  box-shadow: inset 0 1px rgba(255,255,255,.07);
  overflow: visible;
  transform: none;
  transition: border-color .2s ease, background-color .2s ease;
}
.home-gradient-stage .home-module-card:hover,
.home-gradient-stage .home-module-card:focus-within {
  transform: none;
  border-color: rgba(114,151,255,.66);
  background: linear-gradient(160deg,rgba(34,57,106,.98),rgba(18,36,75,.98));
  box-shadow: inset 0 1px rgba(255,255,255,.11), 0 9px 24px rgba(2,12,37,.11);
}
.home-gradient-stage .home-module-card-icon,
.home-gradient-stage .home-module-card:nth-child(n) .home-module-card-icon {
  display: grid;
  place-items: center;
  width: 49px;
  height: 49px;
  border-radius: 50%;
  margin: 0 auto 19px;
  background: rgba(89,122,235,.15);
  border: 1px solid rgba(124,167,255,.14);
  color: #87aaff;
}
.home-gradient-stage .home-module-card:nth-child(2) .home-module-card-icon {color:#a79aff;background:rgba(119,99,230,.15)}
.home-gradient-stage .home-module-card:nth-child(3) .home-module-card-icon {color:#67c8f1;background:rgba(49,146,204,.13)}
.home-gradient-stage .home-module-card:nth-child(4) .home-module-card-icon {color:#949dff;background:rgba(95,105,225,.14)}
.home-gradient-stage .home-module-card-icon svg {width:22px;height:22px}
.home-gradient-stage .home-module-card h3 {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.75;
  margin: 0 0 11px;
  text-align: center;
  color: #ecf2ff;
}
.home-gradient-stage .home-module-card p {
  font-size: 12px;
  line-height: 2.05;
  margin: 0 auto 10px;
  flex: 1;
  max-width: 240px;
  text-align: center;
  color: #adbddb;
}
.home-gradient-stage .home-module-card-link {
  position: absolute;
  z-index: 2;
  bottom: -17px;
  left: calc(50% - 17px);
  width: 34px;
  height: 34px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  gap: 0;
  overflow: hidden;
  white-space: nowrap;
  font-size: 0;
  color: #f4f7ff;
  background: linear-gradient(135deg,#438dff,#6f5ff5);
  border: 3px solid #12254b;
  box-sizing: border-box;
  transition: background .18s ease, border-color .18s ease;
}
.home-gradient-stage .home-module-card-link svg {width:17px;height:17px;flex:none}
.home-gradient-stage .home-module-card-link:hover,
.home-gradient-stage .home-module-card-link:focus-visible {
  color:#fff;
  background:linear-gradient(135deg,#5bafff,#8377ff);
  border-color:#213c76;
}
html[data-theme="light"] .home-gradient-stage {
  --home-module-card-bg: #fff;
  --home-module-border: #d9e3f4;
}
html[data-theme="light"] .home-gradient-stage .home-module-card {
  background:#fff;
  border-color:#e0e8f8;
  box-shadow:0 8px 21px rgba(73,89,147,.045);
}
html[data-theme="light"] .home-gradient-stage .home-module-card:hover,
html[data-theme="light"] .home-gradient-stage .home-module-card:focus-within {
  background:#fbfcff;
  border-color:#9aaff4;
  box-shadow:0 10px 27px rgba(74,95,174,.09);
}
html[data-theme="light"] .home-gradient-stage .home-module-card h3{color:#253653}
html[data-theme="light"] .home-gradient-stage .home-module-card p{color:#64738c}
html[data-theme="light"] .home-gradient-stage .home-module-card-icon,
html[data-theme="light"] .home-gradient-stage .home-module-card:nth-child(n) .home-module-card-icon {
  background:#f0f4ff;
  border-color:#e3e9fc;
  color:#637bea;
}
html[data-theme="light"] .home-gradient-stage .home-module-card-link {border-color:#fff}
html[data-theme="light"] .home-gradient-stage .home-module-card-link:hover{border-color:#e8edff}
.home-gradient-stage .home-modules-tab {font-weight:400}
.home-gradient-stage .home-modules-tab[aria-selected="true"]{font-weight:500}
@media(max-width:700px){
  .home-gradient-stage .home-module-cards{gap:22px 12px}
  .home-gradient-stage .home-module-card{min-height:219px;padding:23px 18px 31px;margin-bottom:8px}
  .home-gradient-stage .home-module-card-icon{margin-bottom:12px}
}
@media(prefers-reduced-motion:reduce){
  .home-gradient-stage .home-module-card,.home-gradient-stage .home-module-card-link{transition:none}
}
