/*
Theme Name: نداء / Nidaa Site
Theme URI: https://nidaa.site
Author: نداء المؤمن
Author URI: https://nidaa.site
Description: ثيم عربي RTL لصفحات نداء الرسمية — الخصوصية، الشروط، الدعم، حذف الحساب، وسلامة البيانات. الهوية الخضراء #00BE76.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
Text Domain: nidaa
Tags: rtl-language-support, custom-menu, one-column, translation-ready
*/

:root {
  --brand: #00be76;
  --brand-dark: #00995f;
  --brand-soft: #e6f8f0;
  --brand-mid: #b8ebd4;
  --ink: #1a2e24;
  --ink-muted: #4a6356;
  --paper: #f7fbf8;
  --white: #ffffff;
  /* Soft mint hairline — never black (was too harsh under header in WebView/app). */
  --line: #e4f2ea;
  --gold: #c4a35a;
  --radius: 14px;
  --max: 720px;
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 50% at 100% -10%, rgba(0, 190, 118, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 40% at 0% 100%, rgba(196, 163, 90, 0.08), transparent 50%),
    linear-gradient(180deg, #f0faf5 0%, var(--paper) 40%, #eef7f2 100%);
  min-height: 100vh;
  line-height: 1.75;
  font-size: 1.05rem;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 8 L34 22 L48 22 L37 30 L41 44 L30 36 L19 44 L23 30 L12 22 L26 22 Z' fill='%2300BE76' fill-opacity='1'/%3E%3C/svg%3E");
  z-index: 0;
}

a {
  color: var(--brand-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--brand);
}

.site-wrap {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0 1rem;
  /* No solid black/dark rule — soft brand wash only (fixes harsh line in app WebView). */
  border-bottom: none;
  box-shadow: 0 1px 0 rgba(0, 190, 118, 0.1);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

/* WP block editor may stamp has-black-border-color — force brand-soft. */
.has-black-border-color,
.wp-block-group.has-border-color.has-black-border-color,
.wp-block-columns.has-border-color.has-black-border-color {
  border-color: var(--line) !important;
}

hr {
  border: 0;
  height: 1px;
  background: var(--line);
  margin: 1.5rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-dark) 100%);
  display: grid;
  place-items: center;
  color: white;
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 0 4px 14px rgba(0, 190, 118, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-tag {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  font-size: 0.92rem;
}

.nav a {
  color: var(--ink-muted);
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
}

.hero {
  text-align: center;
  padding: 2.5rem 0 2rem;
}

.hero-brand {
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 700;
  color: var(--brand-dark);
  margin: 0 0 0.5rem;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(1.15rem, 3vw, 1.45rem);
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

.hero p {
  max-width: 36rem;
  margin: 0 auto 1.75rem;
  color: var(--ink-muted);
  font-size: 1.05rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.35rem;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand);
  color: white;
  box-shadow: 0 6px 18px rgba(0, 190, 118, 0.28);
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: white;
}

.btn-ghost {
  background: var(--white);
  color: var(--brand-dark);
  border-color: var(--brand-mid);
}

.btn-ghost:hover {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

.page-header {
  margin-bottom: 1.75rem;
}

.page-header h1 {
  font-size: clamp(1.6rem, 4vw, 2rem);
  margin: 0 0 0.4rem;
  color: var(--ink);
  font-weight: 700;
}

.page-meta {
  color: var(--ink-muted);
  font-size: 0.92rem;
  margin: 0;
}

.content {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(0, 190, 118, 0.12);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem 1.75rem;
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 28px rgba(0, 190, 118, 0.06);
}

.content h2 {
  font-size: 1.2rem;
  margin: 1.6rem 0 0.55rem;
  color: var(--brand-dark);
  font-weight: 700;
}

.content h2:first-child {
  margin-top: 0;
}

.content p,
.content li {
  color: var(--ink);
}

.content ul,
.content ol {
  padding-inline-start: 1.35rem;
  margin: 0.4rem 0 0.8rem;
}

.content li {
  margin-bottom: 0.35rem;
}

.content .note {
  background: var(--brand-soft);
  border-inline-start: 3px solid var(--brand);
  padding: 0.85rem 1rem;
  border-radius: 0 10px 10px 0;
  margin: 1.1rem 0;
  color: var(--ink);
  font-size: 0.98rem;
}

[dir="rtl"] .content .note {
  border-radius: 10px 0 0 10px;
}

.link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.link-tile {
  display: block;
  padding: 1.15rem 1.1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.link-tile:hover {
  border-color: var(--brand);
  box-shadow: 0 8px 24px rgba(0, 190, 118, 0.12);
  transform: translateY(-2px);
  color: var(--ink);
}

.link-tile strong {
  display: block;
  color: var(--brand-dark);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.link-tile span {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.site-footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: none;
  box-shadow: 0 -1px 0 rgba(0, 190, 118, 0.1);
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.site-footer a {
  color: var(--ink-muted);
}

.en {
  direction: ltr;
  text-align: left;
  font-size: 0.92rem;
  color: var(--ink-muted);
  margin-top: 0.35rem;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0.85rem 1rem 0.85rem 0.5rem;
  margin-bottom: 0.65rem;
  background: var(--brand-soft);
  border-radius: 10px;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--brand);
  color: white;
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  margin-top: 0.1rem;
}

.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

th,
td {
  border: 1px solid var(--line);
  padding: 0.65rem 0.75rem;
  text-align: start;
}

th {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}

@media (max-width: 560px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .content {
    padding: 1.15rem 1rem 1.35rem;
  }

  .nav {
    gap: 0.25rem 0.7rem;
  }
}
