/*
  ****************************************************
  *  Author: Armin Silatani
  *  Date: 2026-05-01
  *  Version: 1.0.0
  ****************************************************
*/

/* =========================== LANDING PAGE STYLES ============================ */

/* ------------------------- FONTS ------------------------- */
@font-face {
  font-family: "Kalameh";
  src: url("../../fonts/KalamehWeb-Regular.woff2") format("woff2"),
       url("../../fonts/KalamehWeb-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Kalameh";
  src: url("../../fonts/KalamehWeb-Black.woff2") format("woff2"),
       url("../../fonts/KalamehWeb-Black.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ------------------------- RESET & BASE ------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  font-family: "Kalameh", system-ui, -apple-system, sans-serif;
}

main {
  flex: 1;
  display: flex;
}

/* ------------------------- GLOBAL SCROLL LOCK ------------------------- */
html,
body {
  height: 100%;
  overflow: hidden !important;
  overscroll-behavior: none;   /* prevent pull-to-refresh / bounce */
  touch-action: none;          /* disable touch scroll/pinch gestures */
}

/* For iOS dynamic viewport */
@supports (height: 100dvh) {
  body.landing {
    height: 100dvh;
  }
}

/* Utility class – do not apply to containers with internal scroll */
.no-scroll {
  overflow: hidden !important;
}

/* ------------------------- LANDING PAGE OVERRIDES ------------------------- */
body.landing {
  margin: 0;
  background: #0d0d0d;
  color: #ffffff;
  font-family: "Kalameh", sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ------------------------- FOOTER ------------------------- */
.footer {
  padding: 30px 0;
  display: flex;
  justify-content: center;
}

.footer-signature {
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.footer-signature:hover {
  opacity: 1;
}

.crafted {
  font-size: 10px;
  color: #7a7a7a;
  letter-spacing: 0.08em;
}

.signature {
  height: 20px;
  transform: translateY(-2px);
  opacity: 0.85;
  filter: brightness(0.9) contrast(1.05);
}

/* ------------------------- FLOATING LOGOS ------------------------- */
.logo-floating {
  position: absolute;
  pointer-events: none;
  user-select: none;
  z-index: 0;
  transition: opacity 1.2s ease, transform 1.2s ease;
  will-change: opacity, transform;
}

#logo-cloud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* :::::::::::::::::::::::::: CUSTOM PROPERTIES & ANIMATIONS :::::::::::::::::::::::::: */
@property --gradient-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@keyframes neonSpin {
  0%   { --gradient-angle: 0deg; }
  100% { --gradient-angle: 360deg; }
}

@keyframes fadeInUp {
  from { opacity: 0; top: 30px; }
  to   { opacity: 1; top: 0; }
}

/* ------------------------- SEARCH AREA ------------------------- */
.search-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.search-wrapper::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 480px;
  max-width: 90vw;
  height: 58px;
  border-radius: 16px;
  z-index: 0;
  pointer-events: none;
  backdrop-filter: blur(60px) grayscale(1) brightness(0.45);
  -webkit-backdrop-filter: blur(60px) grayscale(1) brightness(0.45);
}

/* ------------------------- SEARCH BOX ------------------------- */
.search-box {
  position: relative;
  z-index: 1;
  width: 480px;
  max-width: 90vw;
  height: 58px;
  border-radius: 16px;
  padding: 0 18px 0 48px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: rgba(13, 13, 13, 0.8);
  border: none;
  box-shadow: none;
  animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.3, 1) forwards;
  top: 0;
  transition: background 0.35s ease;
}

/* Neon ring (visible on focus) */
.search-box::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--gradient-angle) at 0px 110%,
    #ff00c1,
    #ff8c00,
    #00e5ff,
    #7b2ff7,
    #ff00c1
  );
  z-index: -1;
  opacity: 0;
  transition: opacity 0.45s ease;
  animation: neonSpin 3s linear infinite;
  animation-play-state: paused;
  filter: blur(10px);
}

/* Scan line effect */
.search-box::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.search-box:focus-within::before {
  opacity: 1;
  animation-play-state: running;
}

.search-box:focus-within::after {
  transform: translateX(100%);
}

.search-box:focus-within {
  border: none;
  box-shadow: none;
  margin-top: 0;
  background: rgba(13, 13, 13, 0.8);
}

/* Search icon & input field */
.search-box .icon {
  width: 24px;
  height: 24px;
  position: absolute;
  left: 18px;
  opacity: 0.6;
  color: #f5f5f5;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
  z-index: 2;
}

.search-box:focus-within .icon {
  transform: scale(1.2) rotate(-10deg);
  opacity: 0.9;
  filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.8));
}

#search-input {
  width: 100%;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  font-size: 17px;
  color: #fff;
  caret-color: #00e5ff;
  font-weight: 400;
  letter-spacing: 0.3px;
}

#search-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
  transition: opacity 0.35s ease, transform 0.3s;
}

#search-input:focus::placeholder {
  opacity: 0.15;
  transform: translateX(8px);
}

#search-input:not(:placeholder-shown) {
  text-shadow: 0 0 8px rgba(0, 229, 255, 0.5);
}

/* ------------------------- SEARCH RESULTS DROPDOWN ------------------------- */
.search-results {
  position: absolute;
  top: calc(50% + 44px);
  left: 50%;
  transform: translateX(-50%);
  width: 480px;
  max-width: 90vw;
  z-index: 10;
  overflow: hidden;
  display: none;
}

.result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 15px;
  color: #ddd;
  cursor: pointer;
  transition: background 0.2s;
}

.result-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.8;
}

.no-result {
  padding: 12px 20px;
  color: #777;
  font-size: 14px;
  text-align: center;
}

/* ------------------------- CATEGORIES ------------------------- */
.categories {
  display: flex;
  gap: 30px;
}

.categories a {
  color: var(--text-muted, #888);
  text-decoration: none;
  font-size: 14px;
  transition: 0.3s;
}

.categories a:hover {
  color: var(--text, #fff);
}

/* =========================== FOOTER LINK OVERRIDE ============================ */
.footer-signature a {
    display: contents;          /* لینک هیچ تأثیری در چیدمان نمی‌ذاره */
    text-decoration: none;      /* خط زیرش رو حذف می‌کنه */
    color: inherit;             /* رنگ رو از والد می‌گیره */
}

.footer-signature a:hover {
    text-decoration: none;      /* مطمئن می‌شیم در هاور هم خط نیفته */
}