/* ============================================================
   site-nav.css — shared top navigation for the inner pages
   ────────────────────────────────────────────────────────────
   The canonical full menu that mirrors index.html / subscriptions.html
   / important.html: brand · section links · "افتح التطبيق" CTA · mobile menu.
   No colored "pill" highlights — every section link is a plain link,
   the current page is marked with a subtle underline via .is-current.

   All colors fall back to literals so the bar renders correctly on any
   page regardless of which CSS-variable names that page defines.

   Used by: about.html · data-deletion.html
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 1.5rem 0;
  transition: padding 0.3s ease;
}
.site-header.scrolled { padding-top: 0.55rem; }

.site-header .nav-shell {
  max-width: var(--container, 1180px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(29, 102, 82, 0.1);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: 0 10px 34px rgba(29, 102, 82, 0.08);
  border-radius: 999px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
}
.site-header.scrolled .nav-shell {
  background: #ffffff;
  border-color: rgba(29, 102, 82, 0.16);
  box-shadow: 0 14px 40px rgba(15, 35, 24, 0.12);
  padding: 0.55rem 0.85rem;
}

/* ── BRAND ── */
.site-header .brand { display: inline-flex; align-items: center; gap: 0.9rem; text-decoration: none; min-width: 0; }
.site-header .brand-mark {
  width: 60px; height: 50px; flex-shrink: 0; border-radius: 18px;
  border: 1px solid rgba(29, 102, 82, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 243, 215, 0.82));
  display: flex; align-items: center; justify-content: center;
  padding: 0.45rem 0.55rem; box-shadow: 0 10px 22px rgba(29, 102, 82, 0.06);
}
.site-header .brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.site-header .brand-copy { display: flex; flex-direction: column; min-width: 0; }
.site-header .brand-copy strong { font-size: 1.1rem; font-weight: 700; color: var(--text, #173f37); }
.site-header .brand-copy span { font-size: 0.8rem; color: var(--muted, #678178); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── SECTION LINKS ── */
.site-header .nav-links {
  display: flex; align-items: center; gap: 0.4rem; list-style: none; margin: 0; padding: 0;
  flex-wrap: wrap; justify-content: center;
}
.site-header .nav-links a {
  position: relative; text-decoration: none; color: var(--muted, #678178);
  font-size: 0.95rem; font-weight: 600; padding: 0.6rem 0.95rem; border-radius: 999px;
  transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.site-header .nav-links a.plain::after {
  content: ""; position: absolute; left: 50%; bottom: 0.34rem; width: 0; height: 2px;
  border-radius: 999px; background: linear-gradient(90deg, var(--brand, #1d6652), var(--gold, #c8963e));
  transform: translateX(-50%); transition: width 0.28s ease;
}
.site-header .nav-links a.plain:hover { color: var(--text, #173f37); transform: translateY(-1px); }
.site-header .nav-links a.plain:hover::after,
.site-header .nav-links a.is-current::after { width: 1.4rem; }
.site-header .nav-links a.is-current { color: var(--brand, #1d6652); }
.site-header .nav-links .nav-cta {
  background: linear-gradient(135deg, var(--brand, #1d6652), var(--brand-deep, #14503f));
  color: #fff; box-shadow: 0 14px 28px rgba(29, 102, 82, 0.2);
}
.site-header .nav-links .nav-cta:hover { transform: translateY(-1px); }

/* ── ACTIONS / MOBILE TRIGGER ── */
.site-header .nav-actions { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.mobile-menu-btn {
  display: none; border: 0; background: rgba(29, 102, 82, 0.08); color: var(--text, #173f37);
  width: 46px; height: 46px; border-radius: 14px; font-size: 1.2rem; cursor: pointer;
}

/* ── MOBILE MENU ── */
.mobile-nav {
  display: none; position: fixed; inset: 0; z-index: 120;
  background: rgba(255, 253, 250, 0.97); backdrop-filter: blur(20px); padding: 6rem 1.5rem 2rem;
}
.mobile-nav.open { display: block; }
.mobile-nav-shell {
  max-width: 440px; margin: 0 auto; background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(29, 102, 82, 0.14); border-radius: 28px;
  box-shadow: var(--shadow-soft, 0 16px 36px rgba(20, 42, 67, 0.06));
  padding: 1.2rem; display: flex; flex-direction: column; gap: 0.8rem;
}
.mobile-nav-close {
  align-self: flex-start; border: 0; background: rgba(237, 243, 215, 0.72); color: var(--text, #173f37);
  width: 44px; height: 44px; border-radius: 14px; font-size: 1.3rem; cursor: pointer;
}
.mobile-nav a {
  text-decoration: none; color: var(--text, #173f37); background: rgba(237, 243, 215, 0.72);
  border-radius: 18px; padding: 1rem 1.1rem; font-weight: 600;
}
.mobile-nav .mobile-cta { background: linear-gradient(135deg, var(--brand, #1d6652), var(--brand-deep, #14503f)); color: #fff; }

body.menu-open { overflow: hidden; }

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .site-header .nav-links { display: none; }
  .mobile-menu-btn { display: inline-grid; place-items: center; }
}
@media (max-width: 640px) {
  .site-header { padding-inline: 1rem; }
  .site-header .nav-shell { border-radius: 24px; }
  .site-header .brand-copy span { display: none; }
}

/* ============================================================
   HEADER CTA BUTTON (in .nav-actions)
   ============================================================ */
.site-header .nav-cta-btn {
  display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; white-space: nowrap;
  font-size: 0.92rem; font-weight: 700; color: #fff;
  padding: 0.6rem 1.15rem; border-radius: 999px;
  background: linear-gradient(135deg, var(--brand, #1d6652), var(--brand-deep, #14503f));
  box-shadow: 0 14px 28px rgba(29, 102, 82, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.site-header .nav-cta-btn:hover { transform: translateY(-1px); }

/* ============================================================
   HEADER "رئيسية" HOVER DROPDOWN
   Scoped under .site-header so it wins over any page's plain
   `.nav-links a` rules.
   ============================================================ */
.site-header .nav-group { position: relative; }
.site-header .nav-links .nav-main { display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; }
.site-header .nav-caret { font-size: 0.7rem; line-height: 1; transition: transform 0.2s ease; }
.site-header .nav-group:hover .nav-caret,
.site-header .nav-group:focus-within .nav-caret { transform: rotate(180deg); }

.site-header .nav-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin: 0.55rem 0 0;
  min-width: 210px;
  list-style: none;
  padding: 0.4rem;
  background: #ffffff;
  border: 1px solid rgba(29, 102, 82, 0.14);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(15, 35, 24, 0.16);
  display: grid;
  gap: 0.15rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 130;
}
.site-header .nav-dropdown::before {          /* hover bridge across the gap */
  content: "";
  position: absolute;
  top: -0.6rem; left: 0; right: 0; height: 0.6rem;
}
.site-header .nav-group:hover .nav-dropdown,
.site-header .nav-group:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.site-header .nav-dropdown li { list-style: none; margin: 0; }
.site-header .nav-dropdown a {
  display: block;
  text-decoration: none;
  color: var(--text, #173f37);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
}
.site-header .nav-dropdown a::after { display: none !important; }
.site-header .nav-dropdown a:hover { background: rgba(237, 243, 215, 0.7); color: var(--brand-deep, #14503f); transform: none; }

/* ============================================================
   ONE-SCREEN PAGE LAYOUT + SHARED FLAT FOOTER
   The page fills the viewport exactly (no page scrolling);
   content scrolls inside <main>, footer is always visible.
   Footer is one row:  [logo+name+tagline] [copyright] [links]
   Links align with the name line; copyright is centered and
   aligns with the tagline line.
   ============================================================ */
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;                 /* the page itself never scrolls */
}
.about-page, .privacy-page, .terms-page, .page-shell {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
main { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
footer {
  flex: 0 0 auto;
  padding: 0.25rem 1.25rem 0.3rem;  /* space above and under the footer content — same as index */
  border-top: 1px solid rgba(29, 102, 82, 0.12);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  line-height: 1.35;                /* tight lines keep the bar short */
}
footer .footer-shell {
  max-width: 1200px;                /* fixed: same row width as the homepage footer, so brand/links sit in the same spot when navigating between pages (page --container values differ) */
  margin: 0 auto;
  padding: 0.1rem 0 0;              /* top space as on index; sides cancel leftover page styles */
  border-top: 0;
  display: flex;
  align-items: flex-start;          /* links stay level with the name */
  justify-content: space-between;   /* brand at one end, links at the other */
  gap: 0.3rem 1.25rem;
  flex-wrap: wrap;
}
footer .footer-start { display: contents; }  /* wrapper is transparent for layout */
footer .footer-brand {
  display: flex;
  align-items: flex-start;          /* logo sits level with the name */
  gap: 0.5rem;
  color: var(--muted, #678178);
}
footer .footer-mark {
  width: 36px; height: 32px; flex-shrink: 0; border-radius: 10px;
  border: 1px solid rgba(29, 102, 82, 0.12);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(223, 247, 240, 0.7));
  box-shadow: none;                 /* cancels leftover shadow from old page styles */
  display: grid; place-items: center; padding: 0.25rem 0.3rem;
}
footer .footer-mark img { width: 150%; height: 150%; object-fit: contain; }
footer .footer-brand strong {
  display: inline;                  /* cancels display:block from old page styles — with the <br> in the markup, block adds an empty extra line and makes the bar taller */
  font-size: 0.8rem; font-weight: 700; color: var(--text, #173f37);
}
footer .footer-brand span { font-size: 0.62rem; color: var(--muted, #678178); }
footer .footer-copy {
  width: 100%;                      /* its own row, under the brand and the links */
  text-align: center;               /* centered in the middle */
  margin: 0.25rem 0 0;              /* small space above the copyright line */
  color: var(--muted, #678178); font-size: 0.62rem;
}
footer .footer-links {
  display: flex; align-items: center;
  gap: 0.1rem 0.25rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0;
}
footer .footer-links li { list-style: none; }
footer .footer-links a {
  text-decoration: none; color: var(--muted, #678178); font-size: 0.76rem; font-weight: 400;
  padding: 0.1rem 0.4rem; border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
footer .footer-links a:hover { background: rgba(237, 243, 215, 0.7); color: var(--brand-deep, #14503f); }
@media (max-width: 860px) {
  footer .footer-shell { flex-direction: column; align-items: center; text-align: center; gap: 0.35rem; }
  footer .footer-links { justify-content: center; }
}
