/* Ronak Gasht — calendar refinements + mobile-only RG signature. */

/* Desktop is intentionally untouched: the original hero grid and magazine slider remain active. */
.hero-rg-mobile { display: none; }
.hero-home .hero-headline-layout,
.hero-home .hero-heading-copy { display: contents; }

/* The RG mark is shown only on phone layouts, beside the headline. */
@media (max-width: 760px) {
  .hero-home .hero-headline-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.16fr) minmax(104px, .84fr);
    align-items: center;
    gap: 9px;
    direction: rtl;
    width: 100%;
  }
  .hero-home .hero-heading-copy { min-width: 0; }
  .hero-home .hero-heading-copy h1 {
    margin: 13px 0 15px;
    font-size: clamp(22px, 6.45vw, 32px) !important;
    line-height: 1.43 !important;
    text-align: right !important;
    text-wrap: balance;
  }
  .hero-home .hero-heading-copy h1 span { display: inline; }
  .hero-home .hero-rg-mobile {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }
  .hero-home .hero-rg-mobile img {
    display: block;
    width: 100%;
    max-width: 158px;
    height: auto;
    object-fit: contain;
    filter: saturate(1) brightness(1);
    animation: rgMarkColorBreath 5.8s ease-in-out infinite;
  }
  .hero-home .hero-rg-name,
  .hero-home .hero-rg-caption {
    display: block;
    max-width: 100%;
    color: #fff;
    font-family: var(--font, 'Vazirmatn', Tahoma, sans-serif);
    font-weight: 800;
    line-height: 1.5;
    white-space: nowrap;
  }
  .hero-home .hero-rg-name {
    font-size: clamp(10px, 2.8vw, 13px);
    letter-spacing: -.02em;
  }
  .hero-home .hero-rg-caption {
    color: rgba(255,255,255,.76);
    font-size: clamp(8px, 2.05vw, 10px);
    font-weight: 600;
  }
  /* The desktop magazine card is not part of the compact mobile hero. */
  .hero-home .hero-mag { display: none !important; }
  .hero-home .hero-lead { margin-top: 10px; }
}

@media (max-width: 360px) {
  .hero-home .hero-headline-layout {
    grid-template-columns: minmax(0, 1.1fr) minmax(98px, .9fr);
    gap: 6px;
  }
  .hero-home .hero-heading-copy h1 { font-size: 21px !important; }
  .hero-home .hero-rg-mobile img { max-width: 136px; }
}

@keyframes rgMarkColorBreath {
  0%, 100% { filter: saturate(1) brightness(1); }
  50% { filter: saturate(1.16) brightness(1.055); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-home .hero-rg-mobile img { animation: none !important; }
}

/* ──────────────────────────────
   Jalali date picker: viewport layer
   ────────────────────────────── */
.rg-jcal {
  position: fixed !important;
  z-index: 2147483000 !important;
  top: 12px;
  right: auto !important;
  bottom: auto !important;
  left: 12px;
  width: min(360px, calc(100vw - 24px)) !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 15px !important;
  border: 1px solid rgba(47, 91, 139, .14) !important;
  border-radius: 22px !important;
  background: rgba(255, 255, 255, .985) !important;
  box-shadow: 0 24px 72px rgba(5, 25, 55, .26), 0 4px 14px rgba(5, 25, 55, .08) !important;
  color: #172943;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: none !important;
  transform-origin: center;
}
.rg-jcal-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.rg-jcal-head button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #e4ebf3;
  border-radius: 13px;
  background: linear-gradient(180deg, #fff, #f5f8fc);
  color: #244366;
  font-size: 24px;
  line-height: 1;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.rg-jcal-head button:not(:disabled):active { transform: scale(.94); background: #eef5ff; }
.rg-jcal-head button:disabled { opacity: .28; cursor: not-allowed; }
.rg-jcal-title { color: #0a2749; font-size: 15px; font-weight: 900; text-align: center; }
.rg-jcal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  direction: rtl;
}
.rg-jcal-grid > span {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 34px;
  color: #8492a6;
  font-size: 11px;
  font-weight: 800;
}
.rg-jcal-grid > button {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 40px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: #243b58;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.rg-jcal-grid > button:disabled { cursor: default; }
.rg-jcal-grid > button.is-today { border-color: #e4b04e; color: #9a6815; font-weight: 900; background: #fffaf0; }
.rg-jcal-grid > button.is-selected { border-color: transparent !important; background: linear-gradient(140deg, #0a2749, #1d568e) !important; color: #fff !important; font-weight: 900; box-shadow: 0 5px 14px rgba(10,39,73,.22); }
.rg-jcal-grid > button.is-disabled { color: #c4cbd5 !important; background: #f7f9fc !important; opacity: .64; }
.rg-jcal-grid > button:not(:disabled):hover { border-color: #d8e7f7; background: #f0f6fd; color: #0a4a8d; transform: translateY(-1px); }
.rg-jcal button:focus-visible { outline: 2px solid #dda73f; outline-offset: 2px; }
.rg-jcal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #edf1f6;
  color: #8995a7;
  font-size: 10px;
  font-weight: 600;
}
.rg-jcal-foot span:first-child { color: #45617f; }
.rg-jalali-display { cursor: pointer; }
.rg-jalali-display::placeholder { color: #9aa6b5; }

@media (max-width: 760px) {
  .hero-home .container.hero-grid { width: min(100% - 28px, 100%); }
  .hero-home .hero-headline-layout {
    grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
    gap: 8px;
    margin-top: 10px;
  }
  .hero-home .hero-heading-copy h1 {
    margin: 12px 0 14px;
    font-size: clamp(23px, 6.5vw, 32px) !important;
    line-height: 1.42 !important;
    text-align: right !important;
  }
  .hero-home .hero-rg-art {
    width: 100%;
    max-width: none;
    min-width: 0;
    aspect-ratio: .92 / 1;
    border-radius: 18px;
  }
  .hero-home .rg-neon-frame {
    width: 94%;
    aspect-ratio: .92 / 1;
    padding: 13px 7px;
    border-radius: 19px;
  }
  .hero-home .rg-neon-frame::before { inset: 5px; border-radius: 14px; }
  .hero-home .rg-neon-sign-top { font-size: clamp(7px, 2vw, 9px); letter-spacing: .2em; }
  .hero-home .rg-neon-sign-bottom { font-size: clamp(5px, 1.45vw, 7px); letter-spacing: .08em; }
  .hero-home .rg-neon-monogram { font-size: clamp(58px, 17vw, 91px); }
  .hero-home .rg-neon-bulb { width: 5px; height: 5px; }
  .hero-home .rg-bulb-3,.hero-home .rg-bulb-4 { width: 4px; height: 4px; }
  .hero-home .rg-neon-spark { font-size: 13px; }
  .hero-home .hero-lead { margin: 12px 0 16px; font-size: 13px !important; text-align: right !important; }
  .hero-home .hero-actions { justify-content: flex-start; }
  .hero-home .hero-actions .btn { flex: 1 1 145px; }
  .rg-jcal {
    width: min(360px, calc(100vw - 24px)) !important;
    padding: 13px !important;
    border-radius: 20px !important;
  }
  .rg-jcal-head { grid-template-columns: 40px minmax(0,1fr) 40px; gap: 8px; }
  .rg-jcal-head button { width: 40px; height: 40px; }
  .rg-jcal-grid { gap: 4px; }
  .rg-jcal-grid > span { min-height: 31px; font-size: 10px; }
  .rg-jcal-grid > button { min-height: clamp(36px, 10vw, 42px); border-radius: 10px; font-size: 12px; }
}
@media (max-width: 360px) {
  .hero-home .hero-headline-layout { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 6px; }
  .hero-home .hero-heading-copy h1 { font-size: 22px !important; }
  .hero-home .rg-neon-monogram { font-size: 58px; }
  .rg-jcal-grid { gap: 2px; }
  .rg-jcal-grid > button { min-height: 35px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .rg-neon-halo, .rg-neon-frame, .rg-neon-frame::after, .rg-neon-monogram span,
  .rg-neon-bulb, .rg-neon-spark { animation: none !important; }
  .rg-jcal, .rg-jcal * { transition: none !important; }
}
