/* تنسيق صفحة التواصل العامة التي تعمل من /contact/ عبر admin/contact.php. */
@font-face {
  font-family: "Ara Jozoor";
  src: url("/fonts/Ara.Jozoor-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  color-scheme: light;
  font-family: "Ara Jozoor", Tahoma, Arial, sans-serif;
}

html {
  max-width: 100%;
  overflow-x: hidden;
}

* {
  box-sizing: border-box;
}

body {
  max-width: 100%;
  min-height: 100vh;
  margin: 0;
  padding-bottom: 48px;
  color: #1f2933;
  background: #f4f6f8;
  overflow-x: hidden;
}

.page-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.contact-panel {
  min-width: 0;
  width: 100%;
  max-width: 760px;
  padding: 28px;
  background: #ffffff;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #52606d;
  font-size: 14px;
  text-decoration: none;
}

.home-link.has-logo {
  color: #102a43;
  font-weight: 700;
}

.home-link img {
  display: block;
  width: auto;
  max-width: 160px;
  max-height: 46px;
  object-fit: contain;
}

.home-link span {
  line-height: 1.2;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  direction: ltr;
}

.topbar.logo-left {
  flex-direction: row;
}

.topbar.logo-right {
  flex-direction: row-reverse;
}

.topbar > * {
  direction: rtl;
}

html[dir="ltr"] .topbar > * {
  direction: ltr;
}

html[dir="rtl"] .topbar > * {
  direction: rtl;
}

.language-link {
  display: inline-flex;
  border: 1px solid #bcccdc;
  border-radius: 999px;
  padding: 6px 12px;
  color: #243b53;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
}

h1 {
  margin: 0 0 22px;
  color: #102a43;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
}

.contact-form {
  display: flex;
  flex-wrap: wrap;
  margin: -9px;
}

.field,
.field-full {
  display: block;
  min-width: 0;
  width: 100%;
  margin: 9px;
}

.field-full {
  width: calc(100% - 18px);
}

label {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: #334e68;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.required-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 3px 8px;
  color: #610316;
  background: #ffeef0;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
}

.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;
}

input,
select,
textarea {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  border: 1px solid #bcccdc;
  border-radius: 6px;
  padding: 12px;
  color: #102a43;
  background: #ffffff;
  font: inherit;
}

select {
  appearance: auto;
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(86px, 112px) minmax(0, 1fr);
  gap: 8px;
  direction: ltr;
}

.dial-code-input {
  text-align: center;
  color: #334e68;
  background: #f8fafc;
  font-weight: 700;
}

.dial-code-input:read-only {
  cursor: default;
}

textarea {
  resize: vertical;
  min-height: 160px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(64, 98, 145, 0.22);
  border-color: #486581;
}

input[type="email"],
input[type="tel"] {
  direction: ltr;
}

.notice {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 6px;
  line-height: 1.7;
}

.notice p {
  margin: 0 0 6px;
  font-weight: 700;
}

.notice ul {
  margin: 0;
  padding: 0 18px 0 0;
}

html[dir="ltr"] .notice ul {
  padding: 0 0 0 18px;
}

.notice.success {
  color: #014d40;
  background: #effcf6;
  border: 1px solid #8eedc7;
}

.success-message {
  margin-bottom: 0;
}

.success-message p {
  margin: 0 0 10px;
}

.success-message p:first-child {
  font-size: 18px;
}

.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  border-radius: 6px;
  padding: 10px 16px;
  color: #ffffff;
  background: #243b53;
  font-weight: 700;
  text-decoration: none;
}

.home-button:hover {
  background: #102a43;
}

.notice.error {
  color: #610316;
  background: #ffeef0;
  border: 1px solid #f8c4cf;
}

.turnstile-wrap {
  min-width: 0;
  width: calc(100% - 18px);
  direction: ltr;
  overflow: visible;
}

.turnstile-card {
  display: block;
  min-width: 0;
  width: 100%;
  max-width: 420px;
  min-height: 89px;
  border: 1px solid #d9e2ec;
  border-radius: 8px;
  padding: 11px;
  background: #f8fafc;
}

.turnstile-widget {
  width: 100%;
  min-height: 65px;
}

.turnstile-widget.is-compact {
  width: 150px;
  min-height: 140px;
}

.turnstile-widget iframe {
  max-width: 100%;
}

.turnstile-status,
.turnstile-note {
  margin: 10px 0 0;
  border-radius: 6px;
  padding: 9px 11px;
  direction: rtl;
  font-size: 13px;
  line-height: 1.6;
}

.turnstile-status {
  color: #610316;
  background: #ffeef0;
  border: 1px solid #f8c4cf;
}

.turnstile-note {
  color: #014d40;
  background: #effcf6;
  border: 1px solid #8eedc7;
}

[hidden] {
  display: none !important;
}

button {
  max-width: 100%;
  flex: 0 0 auto;
  margin: 9px;
  border: 0;
  border-radius: 6px;
  padding: 12px 22px;
  color: #ffffff;
  background: #243b53;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.contact-form > button {
  align-self: flex-start;
}

button:hover {
  background: #102a43;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.visitors-noscript-pixel {
  position: fixed;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.trap {
  position: fixed;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.site-footer {
  position: fixed;
  z-index: 2;
  inset-inline: 12px;
  inset-block-end: 10px;
  color: #64748b;
  text-align: center;
}

.site-footer small {
  display: inline-block;
  max-width: 100%;
  padding: 7px 11px;
  border: 1px solid rgba(188, 204, 220, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .page-shell {
    align-items: start;
    padding: 18px 12px;
  }

  .contact-panel {
    padding: 20px;
  }

  .topbar {
    align-items: flex-start;
  }

  .contact-form {
    display: flex;
  }

  h1 {
    font-size: 26px;
  }

  button {
    width: calc(100% - 18px);
  }
}

@media (min-width: 641px) {
  .field {
    width: calc(50% - 18px);
  }
}

@media (max-width: 360px) {
  .page-shell {
    padding-left: 8px;
    padding-right: 8px;
  }

  .contact-panel {
    padding: 14px;
  }

  .turnstile-card {
    display: inline-block;
    width: auto;
    min-height: 164px;
  }
}

@supports (display: grid) {
  .page-shell {
    display: grid;
    align-items: center;
    justify-items: center;
  }

  .contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
  }

  .field,
  .field-full,
  .turnstile-wrap {
    width: auto;
    margin: 0;
  }

  .field-full,
  .turnstile-wrap,
  .contact-form > button {
    grid-column: 1 / -1;
  }

  .contact-form > button {
    justify-self: start;
    margin: 0;
  }

  @media (max-width: 640px) {
    .page-shell {
      align-items: start;
    }

    .contact-form {
      grid-template-columns: 1fr;
    }

    .contact-form > button {
      justify-self: stretch;
      width: 100%;
    }
  }
}
