/* ==========================================================================
   Base reset + utilities - used by public and admin
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-family-base);
  font-weight: 400;
  line-height: 1.9;
  background-color: var(--bg-body);
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-family-heading);
  line-height: 1.4;
  font-weight: 700;
  color: var(--color-primary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color .25s ease;
}

a:hover {
  color: var(--color-primary-light);
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  direction: rtl;
}

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.container,
.wrap {
  width: 100%;
  max-width: var(--max-width);
  margin-right: auto;
  margin-left: auto;
  padding-right: clamp(16px, 2.2vw, 22px);
  padding-left: clamp(16px, 2.2vw, 22px);
}

.container-narrow,
.narrow {
  max-width: 800px;
}

.text-center { text-align: center; }
.text-start  { text-align: right; }
.text-end    { text-align: left; }

.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex  { display: flex !important; }
.d-grid  { display: grid !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Anti-spam honeypot field.
   This used to be parked off-canvas with `left: -9999px`. That hides the field
   from people but not from layout: an absolutely positioned box 9999px to the
   left still extends the scrollable area, which gave contact.php and
   register-organization.php a document scrollWidth of ~11400px at a 1425px
   viewport and a horizontal scrollbar on every screen size.
   Clipping it in place keeps it unreachable for a human and for the autocompleter
   while contributing no overflow. public.css already declared this pattern for
   .hp, but it never reset `left`, so the off-canvas offset survived from here -
   hence one definition here and none there. */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.elevation-sm { box-shadow: var(--shadow-sm); }
.elevation-md { box-shadow: var(--shadow-md); }
.elevation-lg { box-shadow: var(--shadow-lg); }

.divider {
  height: 1px;
  background-color: var(--border-color);
  margin-block: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}