/* ============================================================
   ARIO — 15 HOME ACADEMY
   Homepage: hero · acronym · footer
   + Shared WHY-Ario sticker styles (used by contest page)
   ============================================================ */

/* ============================================================
   PAGE-WIDE WHITE BACKGROUND
   ============================================================ */
body:has(.acad-hero) {
  background: #ffffff !important;
  background-attachment: initial !important;
}
body:has(.acad-hero)::before,
body:has(.acad-hero)::after {
  display: none !important;
  content: none !important;
}

/* ============================================================
   HERO — outer container
   ============================================================ */
.acad-hero {
  position: relative;
  padding: 0 0.75rem 0rem;
  overflow: hidden;
  isolation: isolate;
  background: #ffffff;
}

.acad-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.acad-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .28;
  animation: orbFloat 14s ease-in-out infinite;
}
.acad-blob-1 { top: 5%;  left: 6%;  width: 340px; height: 340px; background: radial-gradient(circle, rgba(96, 165, 250, .55), transparent 70%); }
.acad-blob-2 { top: 15%; right: 4%; width: 300px; height: 300px; background: radial-gradient(circle, rgba(251, 191, 36, .4), transparent 70%); animation-delay: -5s; }
.acad-blob-3 { bottom: -15%; left: 50%; transform: translateX(-50%); width: 360px; height: 360px; background: radial-gradient(circle, rgba(34, 211, 238, .35), transparent 70%); animation-delay: -9s; }

.acad-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, .05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 25%, transparent 78%);
}

/* ============================================================
   HERO INNER GRID
   ============================================================ */
.acad-hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  align-items: center;
  gap: 1.5rem;
  max-width: 1320px;
  margin: 0 auto;
}

.acad-hero-text {
  text-align: right;
  max-width: 620px;
  margin: 0;
  margin-inline-end: auto;
  justify-self: start;
}

.acad-slogan {
  position: relative;
  display: inline-block;
  font-family: var(--font-fa);
  font-size: clamp(.95rem, 1.35vw, 1.1rem);
  font-weight: 800;
  line-height: 1.9;
  color: var(--blue-700);
  margin: 0 0 1.2rem;
  padding-inline-start: .95rem;
  border-inline-start: 3px solid var(--yellow-500);
}

/* ✅ متن ۳ خطی هیرو — خوانا و جمع‌وجور */
.acad-sub {
  font-family: var(--font-fa);
  font-size: .95rem;
  line-height: 2.05;
  color: var(--text-soft);
  font-weight: 500;
  margin: 0 0 1.8rem;
  max-width: 58ch;
}

/* ============================================================
   TRUST pill — A R I O avatars + student count
   ============================================================ */
.acad-hero-trust {
  display: inline-flex;
  align-items: center;
  gap: .9rem;
  padding: .65rem 1.1rem .65rem .55rem;
  background: #ffffff;
  border: 1.5px solid rgba(59, 130, 246, .18);
  border-radius: 100px;
  box-shadow:
    0 12px 30px -8px rgba(59, 130, 246, .18),
    0 2px 6px rgba(15, 23, 42, .04),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  max-width: 100%;
}

.acad-hero-trust-avatars {
  display: inline-flex;
  flex-shrink: 0;
  direction: ltr;
}
.acad-hero-trust-avatars span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-family: var(--font-en);
  font-weight: 900;
  font-size: .85rem;
  color: #ffffff;
  border: 2.5px solid #ffffff;
  margin-inline-start: -11px;
  box-shadow: 0 4px 10px rgba(15, 23, 42, .14);
  position: relative;
  transition: transform .3s cubic-bezier(.34, 1.3, .5, 1);
}
.acad-hero-trust-avatars span:first-child { margin-inline-start: 0; }
.acad-hero-trust-avatars span:nth-child(1) { background: linear-gradient(135deg, #3b82f6, #1d4ed8); z-index: 4; }
.acad-hero-trust-avatars span:nth-child(2) { background: linear-gradient(135deg, #f59e0b, #d97706); z-index: 3; }
.acad-hero-trust-avatars span:nth-child(3) { background: linear-gradient(135deg, #ec4899, #be185d); z-index: 2; }
.acad-hero-trust-avatars span:nth-child(4) { background: linear-gradient(135deg, #10b981, #059669); z-index: 1; }
.acad-hero-trust:hover .acad-hero-trust-avatars span { transform: translateY(-2px) scale(1.05); }

.acad-hero-trust-text {
  font-family: var(--font-fa);
  font-size: .9rem;
  color: var(--text-soft);
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acad-hero-trust-text b {
  font-weight: 900;
  font-size: 1rem;
  color: inherit;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: inherit;
  animation: none;
  margin-inline-end: .15rem;
}

/* ============================================================
   ILLUSTRATION — simple, clean, no effects
   ============================================================ */
.acad-scene {
  position: relative;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 1 / 0.78;
  margin: 0;
  margin-inline-end: -1.5rem;
  margin-top: -1.5rem;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  animation: acadIllustrationFloat 8s ease-in-out infinite;
}
@keyframes acadIllustrationFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.acad-scene-img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  mix-blend-mode: multiply;
  filter: contrast(1.06) saturate(1.08);
  -webkit-mask-image: radial-gradient(ellipse 78% 78% at 50% 50%, #000 65%, transparent 100%);
          mask-image: radial-gradient(ellipse 78% 78% at 50% 50%, #000 65%, transparent 100%);
}
@supports not (mix-blend-mode: multiply) {
  .acad-scene-img {
    -webkit-mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 55%, transparent 100%);
            mask-image: radial-gradient(ellipse 72% 72% at 50% 50%, #000 55%, transparent 100%);
  }
}

/* ============================================================
   RESPONSIVE — HERO
   ============================================================ */
@media (max-width: 1024px) {
  .acad-hero-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
  }
  .acad-hero-text {
    text-align: center;
    margin-inline: auto;
    justify-self: center;
    order: 1;
  }
  .acad-slogan {
    display: block;
    padding-inline-start: 0;
    border-inline-start: none;
    border-top: 2px solid var(--yellow-500);
    border-bottom: 2px solid var(--yellow-500);
    padding-block: .55rem;
    max-width: 460px;
    margin-inline: auto;
    margin-bottom: 1rem;
  }
  .acad-sub { margin-inline: auto; }
  .acad-scene { order: 2; max-width: 620px; }
}

@media (max-width: 640px) {
  .acad-hero { padding: 0 0.5rem 0.5rem; }
  .acad-slogan { font-size: 1.05rem; }
  .acad-sub { font-size: .88rem; line-height: 1.95; }

  .acad-hero-trust { padding: .55rem .9rem .55rem .5rem; gap: .7rem; }
  .acad-hero-trust-avatars span { width: 28px; height: 28px; font-size: .75rem; margin-inline-start: -9px; }
  .acad-hero-trust-text { font-size: .78rem; white-space: normal; }
  .acad-hero-trust-text b { font-size: .88rem; }

  .acad-scene { max-width: 100%; aspect-ratio: 1 / 0.85; }
}

/* ============================================================
   ARIO ACRONYM — container عریض‌تر تا متن هر خط یکجا جا بشه
   ============================================================ */
.acad-acronym {
  position: relative;
  padding: 0 2rem 4rem;
  max-width: min(1280px, 96%);
  margin-inline: auto;
  background: #ffffff;
  scroll-margin-top: 100px;
}

.acad-acronym-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 1.4rem;
}

/* «From Origin to Impact» — همان گرادیان «دوره‌های آموزشی» با افکت ملایم */
.acad-acronym-tagline {
  font-family: var(--font-en);
  font-size: clamp(1.2rem, 3.0vw, 2.2rem);
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: .5rem 0 .9rem;
  line-height: 1.2;
  text-align: center;
  padding-inline-start: .1em;
  background: linear-gradient(90deg,
    #1e3a8a 0%,
    #1e40af 20%,
    #1d4ed8 35%,
    #2563eb 45%,
    #3b82f6 50%,
    #2563eb 55%,
    #1d4ed8 65%,
    #1e40af 80%,
    #1e3a8a 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: acadAcronymShine 6s ease-in-out infinite;
  filter: none;
}

@keyframes acadAcronymShine {
  0%, 100% { background-position:   0% center; }
  50%      { background-position: 100% center; }
}

.acad-acronym-tagline-fa {
  font-family: var(--font-fa);
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 800;
  color: var(--text-soft);
  margin: 0;
}

/* ✅ کادر — پدینگ بالا و پایین کمتر شد (تنگ‌تر به متن) */
.acad-acronym-closing {
  position: relative;
  max-width: 1180px;
  margin-inline: auto;
  padding: 1.8rem 2.5rem 1.8rem;
  border-radius: 26px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(59, 130, 246, .07), transparent 60%),
    linear-gradient(160deg, #ffffff 0%, #f8fbff 100%);
  border: 1.5px solid rgba(59, 130, 246, .2);
  box-shadow:
    0 22px 55px rgba(59, 130, 246, .1),
    0 0 0 1px rgba(255, 255, 255, .6) inset;
}

.acad-acronym-closing-line {
  display: none !important;
  content: none !important;
}

/* ✅ متن — nowrap روی دسکتاپ + فاصله‌ی کمتر با امضا */
.acad-acronym-closing-text {
  font-family: var(--font-fa);
  font-size: 1rem;
  line-height: 2.2;
  color: #334155;
  font-weight: 500;
  max-width: none;
  margin: 0 auto 1.2rem;
  white-space: nowrap;
}

/* ✅ کلمات Bold داخل متن اصلی — فقط ضخیم‌تر، با همان رنگ متن */
.acad-acronym-closing-text b {
  font-weight: 900;
  color: inherit;
  background: none;
  -webkit-background-clip: initial;
          background-clip: initial;
  -webkit-text-fill-color: inherit;
  animation: none;
  filter: none;
}

/* ============================================================
   ✅ امضای پایانی — افکت گرادیان متحرک آبی → فیروزه‌ای → آبی
   گرادیان قرینه است تا در loop، پرش رنگ نداشته باشد
   ============================================================ */
.acad-acronym-closing-signature {
  position: relative;
  font-family: var(--font-fa);
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  padding: 1rem 1.5rem;
  display: inline-block;
  border-radius: 100px;
  border: 1.5px dashed rgba(59, 130, 246, .3);

  /* دو لایه: لایه ۱ = گرادیان متن · لایه ۲ = پس‌زمینه‌ی پیل */
  background-image:
    linear-gradient(120deg,
      #1d4ed8 0%,
      #2563eb 18%,
      #0891b2 38%,
      #06b6d4 50%,
      #0891b2 62%,
      #2563eb 82%,
      #1d4ed8 100%),
    linear-gradient(135deg, rgba(59, 130, 246, .08), rgba(245, 158, 11, .06));
  background-size: 240% auto, auto;
  background-position: 0% center, 0 0;
  -webkit-background-clip: text, padding-box;
          background-clip: text, padding-box;

  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: signatureShine 8s linear infinite;
}

@keyframes signatureShine {
  0%   { background-position:   0% center, 0 0; }
  100% { background-position: 240% center, 0 0; }
}

/* <b> داخل امضا — گرادیان را از والد به ارث می‌برد */
.acad-acronym-closing-signature b {
  font-weight: 900;
  color: inherit;
  background: none;
  -webkit-background-clip: initial;
          background-clip: initial;
  -webkit-text-fill-color: inherit;
  animation: none;
  filter: none;
}

/* ✅ دارک مود — نسخه‌ی روشن‌تر گرادیان قرینه */
html.dark-mode .acad-acronym-closing-signature {
  border-color: rgba(96, 165, 250, .45);
  background-image:
    linear-gradient(120deg,
      #93c5fd 0%,
      #bfdbfe 18%,
      #22d3ee 38%,
      #67e8f9 50%,
      #22d3ee 62%,
      #bfdbfe 82%,
      #93c5fd 100%),
    linear-gradient(135deg, rgba(96, 165, 250, .12), rgba(251, 191, 36, .08));
}

/* ✅ احترام به prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .acad-acronym-closing-signature {
    animation: none !important;
    background-position: 50% center, 0 0 !important;
  }
}

/* ============================================================
   ✅ عکس کوچک home_1.png — پایین-راست کادر
   ============================================================ */
.acad-acronym-home-img {
  position: absolute;
  bottom: 15px;
  right: 24px;
  width: 96px;
  height: auto;
  display: block;
  z-index: 4;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  filter: drop-shadow(0 6px 16px rgba(59, 130, 246, .22));
  transition: transform .35s cubic-bezier(.34, 1.3, .5, 1);
}

.acad-acronym-home-img:hover { transform: translateY(-3px) scale(1.06); }

html.dark-mode .acad-acronym-home-img {
  filter: drop-shadow(0 6px 20px rgba(96, 165, 250, .35));
}

/* ✅ کاهش تدریجی فونت تا متن همچنان یک‌خطی بماند */
@media (max-width: 1280px) {
  .acad-acronym-closing-text {
    font-size: .93rem;
    white-space: nowrap;
  }
}

@media (max-width: 1180px) {
  .acad-acronym-closing-text {
    font-size: .86rem;
  }
  .acad-acronym-home-img { width: 84px; bottom: 5px; right: 20px; }
}

@media (max-width: 1080px) {
  .acad-acronym-closing-text {
    font-size: .8rem;
  }
  .acad-acronym-home-img { width: 74px; bottom: 5px; right: 16px; }
}

/* ✅ زیر ۱۰۰۰px شکستن خطوط فعال می‌شود (nowrap برداشته می‌شود) */
@media (max-width: 1000px) {
  .acad-acronym { max-width: 100%; }
  .acad-acronym-closing { max-width: 100%; }
  .acad-acronym-closing-text {
    font-size: 1rem;
    line-height: 2.05;
    white-space: normal;
  }
}

@media (max-width: 640px) {
  .acad-acronym { padding: 0 1rem 3rem; }
  .acad-acronym-head { margin-bottom: 1.2rem; }
  .acad-acronym-closing { padding: 1.4rem 1.2rem 1.4rem; border-radius: 22px; }
  .acad-acronym-closing-text { font-size: .92rem; line-height: 2.1; }
  .acad-acronym-closing-signature { font-size: .88rem; padding: .85rem 1.2rem; }
  .acad-acronym-home-img { width: 66px; bottom: 5px; right: 14px; }
}

/* ============================================================
   WHY-Ario sticker styles — SHARED (used by contest.html)
   ============================================================ */
.acad-why-sticker {
  display: inline-block;
  width: 56px;
  height: 56px;
  margin-bottom: 1.2rem;
  flex-shrink: 0;
  color: currentColor;
  transform-origin: center;
  vertical-align: middle;
  transition: transform .4s cubic-bezier(.34, 1.3, .5, 1);
}

.acad-why-icon-blue { color: #3b82f6; }
.acad-why-icon-blue .acad-why-sticker {
  filter:
    drop-shadow(0 0 6px rgba(59, 130, 246, .55))
    drop-shadow(0 0 14px rgba(59, 130, 246, .3));
  animation: arioStickerPulse 2.8s ease-in-out infinite;
}
.acad-why-icon-violet { color: #8b5cf6; }
.acad-why-icon-violet .acad-why-sticker {
  filter:
    drop-shadow(0 0 6px rgba(139, 92, 246, .55))
    drop-shadow(0 0 14px rgba(139, 92, 246, .3));
  animation: arioStickerFloat 3.4s ease-in-out infinite;
}
.acad-why-icon-amber { color: #f59e0b; }
.acad-why-icon-amber .acad-why-sticker {
  filter:
    drop-shadow(0 0 6px rgba(245, 158, 11, .55))
    drop-shadow(0 0 14px rgba(245, 158, 11, .3));
  animation: arioStickerWave 2.4s ease-in-out infinite;
  transform-origin: 70% 70%;
}
.acad-why-icon-green { color: #10b981; }
.acad-why-icon-green .acad-why-sticker {
  filter:
    drop-shadow(0 0 6px rgba(16, 185, 129, .55))
    drop-shadow(0 0 14px rgba(16, 185, 129, .3));
  animation: arioStickerHeartbeat 2.6s ease-in-out infinite;
}
.acad-why-icon-cyan { color: #06b6d4; }
.acad-why-icon-cyan .acad-why-sticker {
  filter:
    drop-shadow(0 0 6px rgba(6, 182, 212, .55))
    drop-shadow(0 0 14px rgba(6, 182, 212, .3));
  animation: arioStickerSpin 18s linear infinite;
}
.acad-why-icon-pink { color: #ec4899; }
.acad-why-icon-pink .acad-why-sticker {
  filter:
    drop-shadow(0 0 6px rgba(236, 72, 153, .55))
    drop-shadow(0 0 14px rgba(236, 72, 153, .3));
  animation: arioStickerBounce 3s ease-in-out infinite;
}

@keyframes arioStickerPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.10); opacity: .92; }
}
@keyframes arioStickerFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-5px) rotate(2deg); }
}
@keyframes arioStickerWave {
  0%, 100%      { transform: rotate(0deg); }
  15%, 45%, 75% { transform: rotate(14deg); }
  30%, 60%, 90% { transform: rotate(-8deg); }
}
@keyframes arioStickerHeartbeat {
  0%, 100% { transform: scale(1); }
  20%      { transform: scale(1.10); }
  40%      { transform: scale(.98); }
  60%      { transform: scale(1.06); }
  80%      { transform: scale(.99); }
}
@keyframes arioStickerSpin { to { transform: rotate(360deg); } }
@keyframes arioStickerBounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50%      { transform: translateY(-5px) rotate(3deg); }
}

@media (max-width: 640px) {
  .acad-why-sticker { width: 46px; height: 46px; margin-bottom: .95rem; }
}

/* ============================================================
   FOOTER — plain gray text, no gradient, no animation
   ============================================================ */
.site-footer {
  position: relative;
  padding: 1.2rem 1rem 1rem;
  background: #ffffff;
  border-top: 1px solid rgba(15, 23, 42, .06);
  text-align: center;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-signature {
  font-family: var(--font-en);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #b0b8c4;
  padding-inline-start: .28em;
  line-height: 1;
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  -webkit-text-fill-color: inherit;
  animation: none;
}

.footer-admin-link {
  position: absolute;
  bottom: 6px;
  left: 14px;
  display: inline-block;
  width: 80px;
  height: 20px;
  padding: 0;
  margin: 0;
  font-size: 0;
  color: transparent;
  text-decoration: none;
  background: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  z-index: 5;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.footer-admin-link:focus-visible {
  outline: 2px solid rgba(59, 130, 246, .5);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .site-footer { padding: .9rem 1rem .8rem; min-height: 48px; }
  .footer-signature { font-size: .66rem; letter-spacing: .22em; }
  .footer-admin-link { width: 66px; height: 18px; bottom: 4px; left: 10px; }
}

/* Dark mode footer */
html.dark-mode .site-footer {
  background: #05080f;
  border-top-color: rgba(148, 163, 184, .08);
}
html.dark-mode .footer-signature {
  color: #475569;
}

/* ============================================================
   Shared helper keyframes
   ============================================================ */
@keyframes statNumShine { to { background-position: 200% center; } }
@keyframes statIconFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-5px) scale(1.05); }
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(22px, -18px) scale(1.15); }
}
@keyframes borderShine {
  0%   { background-position:   0% 50%; }
  100% { background-position: 300% 50%; }
}