:root {
  --wa3i-navy: #0f1a44;
  --wa3i-navy-deep: #0b1439;
  --wa3i-cyan: #48c6e1;
  --wa3i-cyan-2: #35b9da;
  --wa3i-cyan-soft: #ecfbff;
  --wa3i-bg: #0f1a44;
  --wa3i-text: #0f1a44;
  --wa3i-muted: #5f6b85;
  --wa3i-border: #d8eef5;
  --wa3i-white: #ffffff;
  --wa3i-danger: #c62828;
  --wa3i-success: #0b7a55;
  --shadow: 0 24px 60px rgba(5, 12, 39, 0.30);
  --radius-xl: 28px;
  --radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--wa3i-navy-deep);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Tajawal", "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  color: var(--wa3i-text);
  background-color: var(--wa3i-navy-deep);
  background-image:
    linear-gradient(180deg, rgba(11, 20, 57, 0.16), rgba(10, 53, 86, 0.20)),
    url("wa3i-bg.svg");
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  direction: rtl;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 255, 255, 0.10), transparent 30%),
    linear-gradient(180deg, rgba(8, 16, 48, 0.04), rgba(8, 16, 48, 0.58));
  z-index: 0;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  margin: 0 auto;
  padding: 44px 18px 28px;
}

.brand-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 26px;
}

.brand-logo {
  width: min(245px, 46vw);
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.18));
}

.form-card {
  position: relative;
  width: min(100%, 590px);
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 30px;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.form-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 7px;
  background: linear-gradient(90deg, var(--wa3i-cyan), #72deef, var(--wa3i-navy));
}

.event-intro {
  text-align: right;
  border-bottom: 1px solid var(--wa3i-border);
  padding-bottom: 22px;
  margin-bottom: 24px;
}

.event-intro h1 {
  margin: 0 0 14px;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.35;
  color: var(--wa3i-navy);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.event-intro h2 {
  margin: 16px 0;
  padding: 14px 20px;
  border-radius: 999px;
  font-size: clamp(1.22rem, 2.6vw, 1.62rem);
  line-height: 1.4;
  color: #ffffff;
  background: linear-gradient(90deg, var(--wa3i-navy), #14245c);
  font-weight: 800;
  text-align: center;
  box-shadow: 0 12px 26px rgba(15, 26, 68, 0.18);
}

.event-intro p {
  margin: 10px 0;
  font-size: 0.98rem;
  line-height: 1.95;
  color: var(--wa3i-text);
}

.event-intro strong,
.detail-label {
  font-weight: 800;
  color: var(--wa3i-navy);
}

.event-details {
  margin: 18px 0;
  padding: 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, var(--wa3i-cyan-soft), #ffffff);
  border: 1px solid var(--wa3i-border);
}

.detail-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  align-items: start;
  margin: 8px 0;
  font-size: 0.98rem;
  line-height: 1.7;
}

.detail-value {
  color: var(--wa3i-text);
}

.map-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--wa3i-cyan);
  background: #ffffff;
  color: var(--wa3i-navy);
  text-decoration: none;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.map-button:hover,
.map-button:focus {
  background: var(--wa3i-cyan-soft);
  box-shadow: 0 10px 24px rgba(72, 198, 225, 0.25);
  transform: translateY(-1px);
  outline: none;
}

.form-note {
  font-weight: 800;
  margin-top: 18px !important;
}

.attendance-form {
  display: grid;
  gap: 18px;
}

.field-group {
  display: grid;
  gap: 8px;
}

label,
legend {
  color: var(--wa3i-navy);
  font-weight: 800;
  font-size: 0.98rem;
}

.required {
  color: var(--wa3i-danger);
  font-weight: 800;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid #bfeaf3;
  background: #ffffff;
  color: var(--wa3i-text);
  font: inherit;
  line-height: 1.4;
  text-align: right;
  direction: rtl;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input[type="email"] {
  text-align: left;
  direction: ltr;
}

input::placeholder {
  color: #9aa4b8;
}

input:focus {
  border-color: var(--wa3i-cyan);
  box-shadow: 0 0 0 4px rgba(72, 198, 225, 0.18);
}

.field-hint {
  color: var(--wa3i-muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.field-error {
  min-height: 18px;
  color: var(--wa3i-danger);
  font-size: 0.82rem;
  line-height: 1.5;
}

.radio-group {
  padding: 0;
  margin: 4px 0 0;
  border: 0;
}

.radio-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  margin-top: 8px;
  border: 1px solid var(--wa3i-border);
  border-radius: var(--radius-md);
  background: #ffffff;
  cursor: pointer;
  font-weight: 700;
  color: var(--wa3i-text);
}

.radio-option input {
  width: 18px;
  height: 18px;
  accent-color: var(--wa3i-navy);
}

.form-alert {
  display: none;
  padding: 13px 14px;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  line-height: 1.7;
  white-space: pre-line;
}

.form-alert.is-success {
  display: block;
  color: var(--wa3i-success);
  background: #ecfff7;
  border: 1px solid #bcead7;
}

.form-alert.is-error {
  display: block;
  color: var(--wa3i-danger);
  background: #fff3f3;
  border: 1px solid #ffd0d0;
}

.submit-button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--wa3i-navy), #132561);
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(15, 26, 68, 0.22);
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.submit-button:hover,
.submit-button:focus {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(15, 26, 68, 0.28);
  outline: none;
}

.submit-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.page-footer {
  width: min(100%, 590px);
  margin: 18px auto 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
  text-align: center;
}

@media (max-width: 640px) {
  body {
    background-attachment: scroll;
    background-position: center top;
  }

  .page-shell {
    padding: 28px 12px 22px;
  }

  .brand-logo {
    width: min(190px, 52vw);
  }

  .form-card {
    padding: 24px 16px 22px;
    border-radius: 22px;
  }

  .detail-row {
    grid-template-columns: 74px 1fr;
    gap: 8px;
  }

  .event-intro p,
  .detail-row,
  label,
  legend {
    font-size: 0.94rem;
  }
}
