/*
Theme Name: GeneratePress Child
Theme URI: https://generatepress.com
Template: generatepress
Version: 3.6.1
*/

/* ===== Cairo Font ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap');

*, body, h1, h2, h3, h4, h5, h6, p, a, button, input, textarea, select {
    
  font-family: 'Cairo', sans-serif !important;
}

:root {
  --primary:       #2563EB;
  --primary-light: #EFF6FF;
  --primary-mid:   #BFDBFE;
  --text:          #1E293B;
  --muted:         #64748B;
  --border:        #E2E8F0;
  --card-bg:       #FFFFFF;
  --bg:            #F8FAFF;
  --radius:        14px;
}

/* Sticky Header */
#masthead {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: #fff;
  transition: all 0.3s ease;
}

/* ظل خفيف */
#masthead.scrolled {
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  backdrop-filter: blur(8px);
}

/* ===== Navbar Search ===== */
.nav-search-item {
  position: relative;
  display: flex;
  align-items: center;
  list-style: none;
}
.nav-search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 6px 10px;
  border-radius: 8px;
  transition: background .2s;
  line-height: 1;
}
.nav-search-toggle:hover { background: var(--primary-light); }

.nav-search-box {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  border: 1px solid var(--border);
  padding: 10px;
  width: 260px;
  display: none;
  z-index: 9999;
  animation: dropIn .2s ease;
}
.nav-search-box.open { display: block; }

@keyframes dropIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-search-box form { display: flex; gap: 6px; }
.nav-search-input {
  flex: 1;
  padding: 9px 14px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: .9rem;
  outline: none;
  transition: border-color .2s;
  direction: rtl;
}
.nav-search-input:focus { border-color: var(--primary); }
.nav-search-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  cursor: pointer;
  transition: background .2s;
}
.nav-search-submit:hover { background: #1d4ed8; }

/* ===== Grid ===== */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  padding: 20px;
}
.apps-grid.small {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  padding: 0;
}

/* ===== Card ===== */
.app-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.app-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(37,99,235,.12);
  border-color: var(--primary-mid);
}
.app-card a { text-decoration: none; color: inherit; display: block; }
.app-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.card-body { padding: 10px 12px 14px; }
.card-body h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cat-label {
  font-size: .72rem;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 8px;
  border-radius: 99px;
  display: inline-block;
  font-weight: 600;
}

/* ===== فلاتر ===== */
.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 8px;
  padding: 12px 20px;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-btn {
  flex-shrink: 0;
  padding: 7px 18px;
  border: 2px solid var(--border);
  border-radius: 99px;
  background: none;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  transition: all .2s;
  white-space: nowrap;
  color: var(--muted);
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== أزرار التحميل ===== */
.download-section { margin: 32px 0; }
.download-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.btn-dl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 99px;
  font-weight: 700;
  text-decoration: none;
  font-size: .95rem;
  color: #fff;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-dl:hover {
  transform: translateY(-3px) scale(1.03);
  filter: brightness(1.1);
  color: #fff;
  text-decoration: none;
}
.btn-dl:active { transform: scale(.98); }
.btn-dl.play  { background: linear-gradient(135deg, #34A853, #1e8e3e); box-shadow: 0 4px 16px rgba(52,168,83,.3); }
.btn-dl.apple { background: linear-gradient(135deg, #2c2c2c, #1a1a1a); box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.btn-dl.web   { background: linear-gradient(135deg, #2563EB, #1d4ed8); box-shadow: 0 4px 16px rgba(37,99,235,.3); }
.btn-dl.play:hover  { box-shadow: 0 8px 24px rgba(52,168,83,.45); }
.btn-dl.apple:hover { box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.btn-dl.web:hover   { box-shadow: 0 8px 24px rgba(37,99,235,.45); }

/* ===== صفحة التطبيق ===== */
.app-single { max-width: 820px; margin: 0 auto; padding: 24px 20px 48px; }
.app-header {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 28px;
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(37,99,235,.06);
  margin-bottom: 28px;
}
.app-thumb img {
  width: 100px; height: 100px;
  border-radius: 22px;
  object-fit: cover;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}
.app-title-area h1 { font-size: 1.5rem; font-weight: 900; color: var(--text); margin: 0 0 8px; }
.app-category-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-light); color: var(--primary);
  padding: 4px 14px; border-radius: 99px;
  font-size: .82rem; font-weight: 700;
  border: 1px solid var(--primary-mid);
}
.app-content {
  background: var(--card-bg); border-radius: var(--radius);
  border: 1px solid var(--border); padding: 32px;
  margin-bottom: 24px; line-height: 1.9;
  box-shadow: 0 2px 16px rgba(37,99,235,.04);
}
.app-content h2 {
  font-size: 1.2rem; font-weight: 900; color: var(--primary);
  margin: 28px 0 12px; padding-right: 14px;
  border-right: 4px solid var(--primary);
}
.app-content h2:first-child { margin-top: 0; }
.app-content h3 {
  font-size: 1.05rem; font-weight: 700; color: var(--text);
  margin: 20px 0 8px; display: flex; align-items: center; gap: 8px;
}
.app-content h3::before {
  content: ''; width: 8px; height: 8px;
  border-radius: 50%; background: var(--primary); flex-shrink: 0;
}
.app-content p { margin-bottom: 14px; color: #374151; }
.app-content ul, .app-content ol { padding-right: 20px; margin-bottom: 16px; }
.app-content li { margin-bottom: 8px; color: #374151; }
.app-content li::marker { color: var(--primary); }

/* ===== Related ===== */
.related-section { margin-top: 32px; }
.related-section h2 { margin-bottom: 16px; }

/* ===== Pagination ===== */
.pagination, .pagination-wrap {
  display: flex; justify-content: center;
  padding: 24px 20px; gap: 6px; flex-wrap: wrap;
}
.pagination .page-numbers,
.pagination-wrap .page-numbers {
  padding: 9px 16px; border-radius: 10px;
  border: 2px solid var(--border); color: var(--muted);
  text-decoration: none; font-weight: 700; transition: all .2s;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current,
.pagination-wrap .page-numbers:hover,
.pagination-wrap .page-numbers.current {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

/* ===== موبايل ===== */
@media (max-width: 600px) {
  .apps-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 10px; }
  .app-header { flex-direction: column; align-items: center; text-align: center; }
  .app-title-area { align-items: center; display: flex; flex-direction: column; }
  .download-buttons { flex-direction: column; }
  .btn-dl { justify-content: center; width: 100%; }
  .nav-search-box { left: auto; right: 0; width: 220px; }
  .app-content { padding: 20px 16px; }
}

/* ===== Sticky Footer FINAL (GeneratePress) ===== */

/* أهم wrapper */
#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* المحتوى يتمدد */
#content {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
}

/* المحتوى الداخلي */
.site-content {
  flex: 1 0 auto;
}

/* الفوتر */
.site-footer {
  margin-top: auto;
  flex-shrink: 0;
}

/* تحسين شكلي */
.site-footer {
  background: #fff;
  border-top: 1px solid #E2E8F0;
  padding: 16px 0;
}

.copyright-bar {
  text-align: center;
  color: #64748B;
  font-size: 0.9rem;
}


.app-card h3 {
  display: block !important;
  overflow: visible !important;
  height: auto !important;
  max-height: none !important;

  -webkit-line-clamp: unset !important;
  -webkit-box-orient: unset !important;

  white-space: normal !important;
}

/* ===== Subscribe Box Premium ===== */
.subscribe-box {
  text-align: center;
  padding: 30px 20px;
  margin: 30px auto;
  max-width: 700px;

  border-radius: 16px;
  border: 1px solid #1e293b;

  background: linear-gradient(135deg, #0f172a, #020617); /* 👈 دارك */

  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

/* النص */
.subscribe-box p {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 18px;
}

/* ===== Buttons Wrapper ===== */
.subscribe-buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
  color: #fff;

  transition: all .25s ease;
}

/* 🔴 YouTube */
.btn-sub.youtube {
  background: #FF0000;
}

.btn-sub.youtube:hover {
  background: #cc0000;
  transform: translateY(-2px);
}

/* 🔵 Telegram */
.btn-sub.telegram {
  background: #229ED9;
}

.btn-sub.telegram:hover {
  background: #1a7fb5;
  transform: translateY(-2px);
}

/* ===== Mobile ===== */
@media (max-width: 600px) {

  .subscribe-box {
    margin: 20px 10px;
    padding: 20px 15px;
  }

  .subscribe-box p {
    font-size: 0.95rem;
  }

  .subscribe-buttons {
    flex-direction: column;
  }

  .btn-sub {
    width: 100%;
  }

}

/* ===== Contact Form RTL ===== */
.wpforms-form {
  direction: rtl;
  text-align: right;
  max-width: 500px;
  margin: auto;
}

.wpforms-field label {
  text-align: right !important;
}

/* Inputs */
.wpforms-field input,
.wpforms-field textarea {
  border-radius: 12px !important;
  border: 1px solid #ddd !important;
  padding: 10px !important;
}

/* Button */
.wpforms-submit {
  background: linear-gradient(135deg,#2563eb,#3b82f6) !important;
  border-radius: 25px !important;
  padding: 10px 20px !important;
  float: right;
}

.cky-consent-container {
  direction: rtl;
  text-align: right;
}