/* ═══ Animations ═══ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrollIcons {
  0% { transform: translate(0); }
  100% { transform: translate(-50%); }
}
@keyframes menuFade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══ Nav icon buttons (menu, theme, lang) ═══ */
.nav-icon-btn {
  -webkit-tap-highlight-color: transparent;
}

.nav-icon-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center;
  transition: transform 0.2s ease;
}

.nav-icon-btn:active .nav-icon-slot {
  transform: scale(0.88);
}

@keyframes nav-icon-bounce {
  0% {
    transform: scale(0.5) rotate(-120deg);
    opacity: 0;
  }
  55% {
    transform: scale(1.12) rotate(8deg);
    opacity: 1;
  }
  80% {
    transform: scale(0.96) rotate(-3deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.nav-icon-slot.nav-icon-bounce {
  animation: nav-icon-bounce 0.42s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
}

/* line-md theme icons animate inside SVG; keep container stable */
.theme-line-md-icon {
  display: block;
}

@keyframes menu-icon-nudge {
  0%, 100% { transform: translateY(0); }
  35% { transform: translateY(-3px); }
  70% { transform: translateY(2px); }
}

#nav-menu-btn:not([aria-expanded="true"]):hover .nav-menu-icon-slot {
  animation: menu-icon-nudge 0.45s ease;
}

.nav-icon-btn .lang-label {
  display: inline-block;
  transition: transform 0.2s ease;
}

.nav-icon-btn:hover .lang-label {
  transform: scale(1.06);
}

.nav-icon-btn:active .lang-label {
  transform: scale(0.94);
}

@media (prefers-reduced-motion: reduce) {
  .nav-icon-slot.nav-icon-bounce {
    animation: none;
  }
  #nav-menu-btn:not([aria-expanded="true"]):hover .nav-menu-icon-slot {
    animation: none;
  }
  .nav-icon-btn .lang-label {
    transition: none;
  }
  .nav-icon-slot {
    transition: none;
  }
}

/* ═══ Icon Grid Background ═══ */
.icon-grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 55vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 30%, rgba(0,0,0,0));
  mask-image: linear-gradient(to bottom, #000 30%, #0000);
}

.icon-row {
  display: flex;
  gap: 12px;
  position: absolute;
  left: 0;
  white-space: nowrap;
}

.icon-track {
  display: flex;
  gap: 12px;
  animation: scrollIcons 50s linear infinite;
  will-change: transform;
}

.icon-track--rev {
  animation-direction: reverse;
}

.icon-cell {
  flex-shrink: 0;
  overflow: hidden;
}

.icon-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ═══ Dropdowns ═══ */
.ns-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  min-width: 180px;
  z-index: 100;
  animation: menuFade 0.15s ease-out;
}

.ns-dropdown.open {
  display: block;
}

[dir="rtl"] .ns-dropdown--nav {
  right: auto;
  left: 0;
}

[dir="ltr"] .ns-dropdown--nav {
  right: 0;
  left: auto;
}

[dir="rtl"] .ns-dropdown--lang {
  right: auto;
  left: 0;
}

[dir="ltr"] .ns-dropdown--lang {
  right: 0;
  left: auto;
}

[dir="rtl"] .ns-dropdown--theme {
  right: auto;
  left: 0;
}

[dir="ltr"] .ns-dropdown--theme {
  right: 0;
  left: auto;
}

/* ═══ Scroll Reveal ═══ */
.scroll-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ Featured Scroll ═══ */
.featured-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.featured-scroll::-webkit-scrollbar {
  display: none;
}

/* ═══ Step Connector ═══ */
.step-connector {
  position: absolute;
  width: 2px;
  bottom: 0;
}

[dir="ltr"] .step-connector {
  left: 21px;
}

[dir="rtl"] .step-connector {
  right: 21px;
}

@media (max-width: 768px) {
  [dir="ltr"] .step-connector {
    left: 17px;
  }
  [dir="rtl"] .step-connector {
    right: 17px;
  }
}

/* ═══ Spinner ═══ */
.ns-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ═══ RTL Adjustments ═══ */
[dir="rtl"] .hero-steps {
  direction: rtl;
}

/* ═══ FAQ (details/summary) ═══ */
.faq-summary::-webkit-details-marker,
.faq-summary::marker {
  display: none;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
}

/* ═══ Site footer (minimal / corporate) ═══ */
.site-footer__divider {
  height: 1px;
  width: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 0, 0, 0.08) 15%,
    rgba(0, 0, 0, 0.08) 85%,
    transparent
  );
}

.dark .site-footer__divider {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1) 15%,
    rgba(255, 255, 255, 0.1) 85%,
    transparent
  );
}

.site-footer__label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9ca3af;
}

.dark .site-footer__label {
  color: #6b7280;
}

.site-footer__link {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  width: 100%;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: #4b5563;
  text-decoration: none;
  transition: color 0.15s ease;
  padding: 0.125rem 0;
  border-radius: 0.375rem;
}

@media (min-width: 640px) {
  .site-footer__link {
    display: inline-flex;
    width: auto;
    min-height: 0;
    font-size: 0.875rem;
    line-height: 1.25rem;
    padding: 0;
  }
}

.site-footer__link:hover {
  color: var(--color-brand, #e85d75);
}

.dark .site-footer__link {
  color: #9ca3af;
}

.dark .site-footer__link:hover {
  color: var(--color-brand, #f06b80);
}

/* Social CTA — brand colors + icons */
.site-footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 2.875rem;
  padding: 0.625rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

@media (min-width: 640px) {
  .site-footer__social {
    font-size: 0.875rem;
    padding: 0.625rem 1rem;
    min-height: 3rem;
  }
}

.site-footer__social:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.site-footer__social:active {
  transform: translateY(0);
}

.site-footer__social--telegram {
  color: #fff;
  background: linear-gradient(180deg, #37aee2 0%, #229ed9 55%, #1d8bc9 100%);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.site-footer__social--telegram:hover {
  filter: brightness(1.06);
}

.dark .site-footer__social--telegram {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.site-footer__social--instagram {
  color: #fff;
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.site-footer__social--instagram:hover {
  filter: brightness(1.05) saturate(1.05);
}

.dark .site-footer__social--instagram {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

/* Social: centered label on stacked / narrow; start align on wide desktop column */
@media (max-width: 1023.98px) {
  .site-footer .site-footer__social {
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .site-footer .site-footer__social {
    justify-content: flex-start;
  }

  [dir="rtl"] .site-footer .site-footer__social {
    justify-content: flex-end;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer__social {
    transition: none;
  }

  .site-footer__social:hover,
  .site-footer__social:active {
    transform: none;
  }
}

.footer-motto {
  text-wrap: balance;
  max-width: 42rem;
}

/* ═══ Footer RTL Adjustments ═══ */
[dir="rtl"] .site-footer__identity {
  text-align: right;
}

[dir="rtl"] .site-footer__identity a {
  margin-right: -0.25rem;
  margin-left: 0;
}

[dir="rtl"] .site-footer__label {
  text-align: right;
}

[dir="rtl"] .site-footer nav ul {
  text-align: right;
}

[dir="rtl"] .site-footer__link {
  justify-content: flex-end;
}

@media (min-width: 640px) {
  [dir="rtl"] .site-footer__link {
    justify-content: flex-start;
  }
}

[dir="rtl"] #footer-col-follow ~ ul {
  text-align: right;
}

[dir="rtl"] .site-footer .site-footer__social {
  justify-content: center;
}

@media (min-width: 1024px) {
  [dir="rtl"] .site-footer .site-footer__social {
    justify-content: flex-start;
  }
}

/* Legal section RTL */
[dir="rtl"] .site-footer > div > div:last-child {
  text-align: right;
}

@media (min-width: 640px) {
  [dir="rtl"] .site-footer > div > div:last-child {
    text-align: right;
  }
  
  [dir="rtl"] .site-footer > div > div:last-child p:first-child {
    text-align: right;
  }
  
  [dir="rtl"] .site-footer > div > div:last-child p:last-child {
    text-align: left;
  }
}

/* ═══ Selection ═══ */
::selection {
  background: var(--color-brand, #E85D75);
  color: #fff;
}
