/* Shared layout for subpages: قصص، كيف يعمل، هدايا، من نحن، تواصل */
:root {
  --purple: #9f7aea;
  --pink: #ed64a6;
  --white: #fafafa;
  --text: #111111;
  --text-soft: #333333;
}

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

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Noto Kufi Arabic', 'Poppins', sans-serif;
  background: linear-gradient(165deg, var(--white) 0%, #fdf8f3 50%, #fef5f8 100%);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  direction: rtl;
}

.tag-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(90deg, var(--purple) 0%, var(--pink) 100%);
  color: var(--white);
  text-align: center;
  padding: 0.85rem 1.25rem;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

header {
  padding: 0.875rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  gap: 1rem;
}

.header-left, .header-center, .header-right { display: flex; align-items: center; }
.header-center { justify-content: center; }
.header-right { justify-content: flex-end; gap: 1rem; }

.logo { height: 120px; width: auto; max-width: 240px; object-fit: contain; }

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s;
}

.burger:hover { background: rgba(159, 122, 234, 0.1); }

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}

.burger:hover span { background: var(--purple); }

.header-actions { display: flex; align-items: center; gap: 0.5rem; }

.header-actions a,
.header-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.header-actions a:hover,
.header-actions button:hover {
  background: rgba(159, 122, 234, 0.1);
  color: var(--purple);
}

.header-actions svg { width: 22px; height: 22px; }

.header-nav { display: none; }

@media (min-width: 769px) {
  .burger { display: none; }
  .header-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 0.35rem 1.5rem 0.5rem;
    max-width: 1200px;
    margin: 0 auto;
    direction: rtl;
  }
  .header-nav a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
  }
  .header-nav a:hover { color: var(--purple); }
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(250, 250, 250, 0.98);
  z-index: 1000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 2rem;
}

.mobile-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 500;
  direction: rtl;
  transition: color 0.2s;
}

.mobile-menu a:hover { color: var(--purple); }

.mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

body.menu-open .mobile-menu { display: flex; }
body.menu-open { overflow: hidden; }

.site-footer {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid rgba(159, 122, 234, 0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  direction: rtl;
}

.site-footer a {
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.site-footer a:hover { color: var(--purple); }

.site-footer .copy { font-size: 0.9rem; color: var(--text-soft); }

.site-footer .admin-footer-link {
  font-size: 0.7rem;
  color: var(--text-soft);
  opacity: 0.6;
  text-decoration: none;
  margin-top: 0.25rem;
}
.site-footer .admin-footer-link:hover { opacity: 1; color: var(--purple); }

.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  direction: rtl;
}

.page-content h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.3;
}

.page-content p {
  font-size: 1.05rem;
  color: var(--text-soft);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.page-content .cta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.9rem 1.75rem;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: var(--white);
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(159, 122, 234, 0.3);
  transition: opacity 0.2s, transform 0.2s;
}

.page-content .cta:hover {
  opacity: 0.95;
  transform: translateY(-2px);
}

@media (max-width: 768px) {
  .tag-bar { padding: 0.75rem 1rem; font-size: 1rem; }
  header { padding: 0.5rem 1rem; }
  .logo { height: 88px; max-width: min(55vw, 200px); }
  .burger { width: 44px; height: 44px; }
  .burger span { width: 20px; }
  .header-actions a,
  .header-actions button { width: 44px; height: 44px; }
  .header-actions svg { width: 20px; height: 20px; }
  .mobile-menu a { font-size: 1.1rem; }
  .page-content { padding: 1.75rem 1rem 2.5rem; }
  .page-content h1 { font-size: 1.5rem; }
  .page-content p { font-size: 0.98rem; }
}
