/* Generated by script */
@font-face {
  font-family: Vazirmatn;
  src: url('Vazirmatn-Thin.woff2') format('woff2');
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('Vazirmatn-ExtraLight.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('Vazirmatn-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('Vazirmatn-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('Vazirmatn-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('Vazirmatn-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('Vazirmatn-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #f7f5f2;
  --surface:   #ffffff;
  --border:    #e2ddd7;
  --ink:       #18120e;
  --muted:     #7a7068;
  --accent:    #1a6b8a;
  --accent-h:  #145571;
  --link:      #1a3fa8;
  --green:     #1e7a48;
  --ad-bg:     #fdf8f0;
  --ad-border: #e8dfc8;
  --radius:    10px;
  --shadow:    0 2px 14px rgba(0,0,0,.08);
  --font:      'Vazirmatn', sans-serif;
}

html { font-size: 16px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  min-height: 100vh;
  line-height: 1.7;
  direction: rtl;
}


header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(1rem, 4vw, 3rem);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.header-inner {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: .75rem 0;
  flex-wrap: wrap;
  flex-direction: row-reverse;
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo em { color: var(--ink); font-style: normal; }


.search-form {
  flex: 1;
  display: flex;
  flex-direction: row-reverse;
  min-width: 0;
  gap: .5rem;
}
.search-wrap {
  flex: 1;
  position: relative;
  min-width: 0;
  height: 59px;
}
.search-wrap svg {
  position: absolute;
  left: .9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: .65rem 1.1rem .65rem 2.6rem;
  border: 1.5px solid var(--border);
  border-radius: 30px;
  background: var(--bg);
  font-family: var(--font);
  font-size: .95rem;
  color: var(--ink);
  outline: none;
  text-align: right;
  direction: rtl;
  transition: border-color .2s, box-shadow .2s;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(26,107,138,.13);
  background: #fff;
}
.search-btn {
  padding: .65rem 1.4rem;
  border: none;
  border-radius: 30px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
  white-space: nowrap;
  flex-shrink: 0;
    height: 59px;
}
.search-btn:hover  { background: var(--accent-h); }
.search-btn:active { transform: scale(.97); }


.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 72px);
  padding: 2rem;
  text-align: center;
}
.hero-logo {
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: .2rem;
}
.hero-logo span { color: var(--accent); }
.hero-tagline {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 2rem;
  font-weight: 300;
}
.hero-form {
  width: 100%;
  max-width: 580px;
  display: flex;
  flex-direction: row-reverse;
  gap: .6rem;
}
.hero-form .search-input {
  font-size: 1.05rem;
  padding: .85rem 1.2rem .85rem 2.8rem;
  border-radius: 40px;
}
.hero-form svg { width: 20px; height: 20px; }
.hero-form .search-btn { padding: .85rem 1.7rem; font-size: 1rem; }

.results-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 4vw, 2rem) 3rem;
}


.stats {
  font-size: .83rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-direction: row-reverse;
  justify-content: flex-end;
}
.stats-dot { width: 4px; height: 4px; border-radius: 50%; background: var(--border); }


.section-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-direction: row-reverse;
}
.section-label::before {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}


.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  margin-bottom: .75rem;
  display: flex;
  flex-direction: row-reverse;
  gap: .85rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, border-color .2s, transform .15s;
  animation: fadeUp .35s ease both;
}
.result-card:hover {
  box-shadow: var(--shadow);
  border-color: #ccc5bb;
  transform: translateY(-1px);
}
.result-card.ad-card {
  background: var(--ad-bg);
  border-color: var(--ad-border);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.result-card:nth-child(1)  { animation-delay: .03s; }
.result-card:nth-child(2)  { animation-delay: .06s; }
.result-card:nth-child(3)  { animation-delay: .09s; }
.result-card:nth-child(4)  { animation-delay: .12s; }
.result-card:nth-child(5)  { animation-delay: .15s; }
.result-card:nth-child(6)  { animation-delay: .18s; }
.result-card:nth-child(7)  { animation-delay: .21s; }
.result-card:nth-child(8)  { animation-delay: .24s; }
.result-card:nth-child(9)  { animation-delay: .27s; }
.result-card:nth-child(10) { animation-delay: .30s; }

.favicon {
  width: 28px; height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: .2rem;
  background: var(--bg);
}
.result-body { flex: 1; min-width: 0; text-align: right; }


.result-url {
  font-size: .78rem;
  color: var(--green);
  margin-bottom: .2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
  text-align: left;
  display: flex;
  align-items: center;
  gap: .35rem;
}
.ad-badge {
  font-size: .63rem;
  font-weight: 700;
  background: #eee3cc;
  color: #7a6040;
  border-radius: 4px;
  padding: .12rem .38rem;
  flex-shrink: 0;
  direction: rtl;
}
.result-title {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--link);
  line-height: 1.45;
  margin-bottom: .3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.result-card:hover .result-title { text-decoration: underline; }
.result-snippet {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 300;
}


.state-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  color: var(--muted);
}
.state-box h2 { font-size: 1.3rem; font-weight: 700; color: var(--ink); margin-bottom: .5rem; }
.state-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.state-box code {
  background: #f0ece8;
  border-radius: 4px;
  padding: .1rem .4rem;
  font-size: .8rem;
  direction: ltr;
  display: inline-block;
}


.pagination {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  direction: ltr;
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 .75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  font-family: var(--font);
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.page-link:hover         { background: #eee8e0; }
.page-link.active        { background: var(--accent); color: #fff; border-color: var(--accent); pointer-events: none; }
.page-link.disabled      { opacity: .35; pointer-events: none; cursor: default; }
.page-link.arrow         { font-size: 1.1rem; padding: 0 .6rem; }


footer {
  text-align: center;
  padding: 1.5rem;
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--surface);
  margin-top: 2rem;
}
