/* ==========================================================================
   Vizhen — AI Workshops section
   Layout: RTL heading block, then a 3/2/1-column grid of photo cards with a
   frosted-glass content panel. Workshop 1 is open; 2–6 are faded "coming soon".
   Brand: Vizhen Brand System (Ink Navy surface, blue gradient, amber CTAs,
   Estedad for Persian, Goldman for English display).
   ========================================================================== */

@font-face {
  font-family: "Estedad";
  src: url("fonts/Estedad-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

.vz-workshops {
  --vz-ink: #0A1124;
  --vz-ink-2: #101A33;
  --vz-electric: #0D57EB;
  --vz-azure: #2779F2;
  --vz-sky: #4BA9FD;
  --vz-slate: #5C6B85;
  --vz-mist: #EEF3FB;
  --vz-amber: #FFB23E;
  --vz-gradient: linear-gradient(100deg, #0D57EB 0%, #4BA9FD 100%);

  --vz-glass: rgba(16, 26, 51, 0.48);
  --vz-glass-strong: rgba(13, 21, 42, 0.72);
  --vz-glass-line: rgba(238, 243, 251, 0.14);
  --vz-text-dim: rgba(238, 243, 251, 0.72);

  --vz-fa: "Estedad", "Vazirmatn", "Tahoma", sans-serif;
  --vz-en: "Goldman", "Raleway", "Segoe UI", sans-serif;

  position: relative;
  isolation: isolate;
  overflow: hidden;
  direction: rtl;
  background: var(--vz-ink);
  color: var(--vz-mist);
  font-family: var(--vz-fa);
}

/* Soft blue light behind the glass so the blur has something to catch */
.vz-workshops::before,
.vz-workshops::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
}
.vz-workshops::before {
  width: 520px; height: 520px; top: -160px; right: -120px;
  background: rgba(13, 87, 235, 0.45);
}
.vz-workshops::after {
  width: 460px; height: 460px; bottom: -180px; left: -100px;
  background: rgba(75, 169, 253, 0.28);
}

.vz-workshops__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-block: clamp(56px, 8vw, 104px);
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid;
  gap: clamp(32px, 5vw, 56px);
}

/* ---------- Heading ---------- */
.vz-workshops__head { display: grid; gap: 14px; max-width: 660px; }

/* Vizhen logo, top-left corner (end side in RTL) */
.vz-workshops__logo {
  justify-self: end;
  display: inline-flex;
  margin-bottom: clamp(-24px, -2vw, -8px);
}
.vz-workshops__logo svg { display: block; height: clamp(26px, 3vw, 34px); width: auto; }
.vz-workshops__logo svg { stroke: none; }
.vz-workshops__logo:focus-visible { outline: 2px solid var(--vz-sky); outline-offset: 6px; border-radius: 4px; }

/* Program name: "فکر با هوش مصنوعی" */
.vz-workshops__brand {
  margin: 0;
  justify-self: start;
  display: inline-flex; align-items: center; gap: 12px;
  font-size: clamp(18px, 2.2vw, 22px); font-weight: 700;
  color: var(--vz-sky);
}
.vz-workshops__brand::after {
  content: ""; width: 40px; height: 3px; border-radius: 2px;
  background: var(--vz-gradient);
}

/* "Developed by VIZHEN" credit */
.vz-workshops__credit {
  margin: 4px 0 0;
  justify-self: start;
  direction: ltr;
  font-family: var(--vz-en);
  font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--vz-slate);
}
.vz-workshops__credit span {
  font-size: 15px; letter-spacing: 0.06em; font-style: italic;
  background: var(--vz-gradient);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.vz-workshops__title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(32px, 5.4vw, 56px);
  line-height: 1.3;
  text-wrap: balance;
}
.vz-workshops__title span {
  background: var(--vz-gradient);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

.vz-workshops__lead {
  margin: 0;
  font-size: 17px; line-height: 1.9;
  color: var(--vz-text-dim);
}

/* ---------- Grid ---------- */
.vz-workshops__grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 980px) { .vz-workshops__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .vz-workshops__grid { grid-template-columns: 1fr; } }

/* ---------- Card ---------- */
.vz-card {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 440px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--vz-glass-line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px;
  gap: 18px;
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.7);
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

.vz-card__bg {
  position: absolute; inset: 0; z-index: -2;
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  transition: transform 0.6s ease, filter 0.4s ease, opacity 0.4s ease;
}
/* Navy wash: keeps every photo on-brand and the text readable */
.vz-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(10, 17, 36, 0.15) 0%, rgba(10, 17, 36, 0.55) 45%, rgba(10, 17, 36, 0.92) 100%),
    linear-gradient(135deg, rgba(13, 87, 235, 0.28), rgba(10, 17, 36, 0));
}

.vz-card:hover { transform: translateY(-4px); border-color: rgba(75, 169, 253, 0.5); }
.vz-card:hover .vz-card__bg { transform: scale(1.07); }

/* Top row: number + status */
.vz-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.vz-card__num {
  direction: ltr;
  font-family: var(--vz-en);
  font-size: 15px; letter-spacing: 0.08em;
  color: #fff;
  padding: 6px 14px;
  background: var(--vz-gradient);
  clip-path: polygon(14% 0, 100% 0, 86% 100%, 0 100%); /* 18° blade cut */
}

.vz-card__status {
  font-size: 12.5px; font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--vz-glass-line);
  background: rgba(10, 17, 36, 0.45);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: inline-flex; align-items: center; gap: 8px;
}
.vz-card__status::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
}
.vz-card--open .vz-card__status { color: #7FE3B0; }
.vz-card--soon .vz-card__status { color: var(--vz-amber); }

/* Glass panel */
.vz-card__glass {
  display: grid; gap: 12px;
  padding: 20px 18px 18px;
  border-radius: 16px;
  background: var(--vz-glass);
  border: 1px solid var(--vz-glass-line);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.vz-card__tag {
  font-size: 12.5px; font-weight: 500; color: var(--vz-sky);
}
.vz-card__title {
  margin: 0;
  font-size: 20px; font-weight: 700; line-height: 1.65;
  text-wrap: balance;
}
.vz-card__topics { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.vz-card__topics li {
  position: relative;
  padding-right: 16px;
  font-size: 14.5px; line-height: 1.85;
  color: var(--vz-text-dim);
}
.vz-card__topics li::before {
  content: ""; position: absolute; right: 0; top: 0.72em;
  width: 7px; height: 9px;
  background: var(--vz-sky);
  clip-path: polygon(30% 0, 100% 0, 70% 100%, 0 100%);
}

.vz-card__btn {
  justify-self: start;
  margin-top: 4px;
  display: inline-flex; align-items: center; gap: 8px;
  font: inherit; font-size: 14.5px; font-weight: 600;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid rgba(75, 169, 253, 0.45);
  background: rgba(39, 121, 242, 0.22);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s ease, border-color 0.25s ease;
}
.vz-card__btn:hover { background: var(--vz-gradient); border-color: transparent; }
.vz-card__btn svg { width: 16px; height: 16px; }
.vz-card--open .vz-card__btn { background: var(--vz-gradient); border-color: transparent; }

.vz-card__btn:focus-visible,
.vz-modal button:focus-visible,
.vz-modal input:focus-visible {
  outline: 2px solid var(--vz-sky);
  outline-offset: 3px;
}

/* Faded state for workshops not yet announced */
.vz-card--soon { border-color: rgba(238, 243, 251, 0.07); box-shadow: none; }
.vz-card--soon .vz-card__bg { filter: grayscale(1) brightness(0.55); opacity: 0.3; }
.vz-card--soon .vz-card__glass { background: rgba(16, 26, 51, 0.35); border-color: rgba(238, 243, 251, 0.07); }
.vz-card--soon .vz-card__glass > :not(.vz-card__btn),
.vz-card--soon .vz-card__num { opacity: 0.5; }
.vz-card--soon .vz-card__btn { opacity: 0.7; }
.vz-card--soon:hover .vz-card__bg { filter: grayscale(0.4) brightness(0.8); opacity: 0.6; }
.vz-card--soon:hover .vz-card__glass > *,
.vz-card--soon:hover .vz-card__num { opacity: 1; }

/* Workshop 1: brighter photo, lighter wash and glass, gradient rim */
.vz-card--open {
  border-color: transparent;
  box-shadow: 0 0 0 1px rgba(75, 169, 253, 0.7), 0 24px 70px -20px rgba(39, 121, 242, 0.75);
}
.vz-card--open .vz-card__bg { filter: brightness(1.12) saturate(1.1); }
.vz-card--open::before {
  background:
    linear-gradient(180deg, rgba(10, 17, 36, 0) 0%, rgba(10, 17, 36, 0.2) 45%, rgba(10, 17, 36, 0.7) 100%),
    linear-gradient(135deg, rgba(75, 169, 253, 0.22), rgba(10, 17, 36, 0));
}
/* Slimmer, clearer glass so more of the poster strips show through */
.vz-card--open .vz-card__glass {
  gap: 8px;
  padding: 14px 16px 14px;
  background: linear-gradient(180deg, rgba(10, 17, 36, 0.22) 0%, rgba(10, 17, 36, 0.5) 100%);
  border-color: rgba(238, 243, 251, 0.28);
  -webkit-backdrop-filter: blur(6px) saturate(130%);
  backdrop-filter: blur(6px) saturate(130%);
  text-shadow: 0 1px 8px rgba(10, 17, 36, 0.85);
}
.vz-card--open .vz-card__title { font-size: 18px; line-height: 1.55; }
.vz-card--open .vz-card__topics { gap: 2px; }
.vz-card--open .vz-card__topics li { font-size: 13.5px; line-height: 1.75; }
.vz-card--open .vz-card__btn { text-shadow: none; margin-top: 2px; padding: 8px 16px; }
.vz-card--open .vz-card__tag { color: #9CCFFF; }
.vz-card--open .vz-card__topics li { color: rgba(238, 243, 251, 0.88); }

/* ---------- "Coming soon" modal ---------- */
.vz-modal {
  direction: rtl;
  width: min(380px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--vz-glass-line);
  border-radius: 20px;
  background: var(--vz-glass-strong);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  color: var(--vz-mist);
  font-family: var(--vz-fa);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.vz-modal::backdrop {
  background: rgba(5, 9, 20, 0.6);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.vz-modal[open] { animation: vz-pop 0.28s ease; }
@keyframes vz-pop { from { opacity: 0; transform: translateY(10px) scale(0.97); } }

.vz-modal__body { display: grid; gap: 14px; padding: 26px 22px 22px; }

.vz-modal__close {
  position: absolute; top: 12px; left: 12px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 8px;
  border: 1px solid var(--vz-glass-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--vz-mist);
  cursor: pointer;
}
.vz-modal__close svg { width: 14px; height: 14px; }

.vz-modal__badge {
  justify-self: start;
  font-size: 12px; font-weight: 600;
  color: var(--vz-amber);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 178, 62, 0.4);
  background: rgba(255, 178, 62, 0.1);
}
.vz-modal__title { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.6; padding-left: 36px; }
.vz-modal__text { margin: 0; font-size: 14.5px; line-height: 1.85; color: var(--vz-text-dim); }

.vz-modal__form { display: flex; gap: 8px; }
.vz-modal__form input {
  flex: 1; min-width: 0;
  font: inherit; font-size: 14px;
  color: var(--vz-mist);
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--vz-glass-line);
  background: rgba(10, 17, 36, 0.6);
}
.vz-modal__form input::placeholder { color: rgba(238, 243, 251, 0.45); }
.vz-modal__form button {
  font: inherit; font-size: 14px; font-weight: 600;
  color: #fff;
  padding: 0 16px;
  border: 0; border-radius: 10px;
  background: var(--vz-gradient);
  cursor: pointer;
  white-space: nowrap;
}

.vz-modal__msg { margin: 0; font-size: 13.5px; color: #7FE3B0; min-height: 1em; }
.vz-modal__msg.is-error { color: #FF8A8A; }

.vz-modal__reserve {
  display: grid; gap: 10px;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--vz-glass-line);
}
.vz-modal__reserve p { margin: 0; font-size: 14px; line-height: 1.8; color: var(--vz-mist); }
.vz-modal__reserve strong { color: var(--vz-amber); font-weight: 700; }
.vz-modal__reserve button {
  font: inherit; font-size: 14.5px; font-weight: 700;
  color: var(--vz-ink);
  padding: 11px 16px;
  border: 0; border-radius: 10px;
  background: var(--vz-amber);
  cursor: pointer;
}
.vz-modal__reserve button:hover { filter: brightness(1.06); }

@media (prefers-reduced-motion: reduce) {
  .vz-card, .vz-card__bg, .vz-card__btn { transition: none; }
  .vz-card:hover, .vz-card:hover .vz-card__bg { transform: none; }
  .vz-modal[open] { animation: none; }
}
