:root {
  --orange: #F97316;
  --orange-dark: #EA580C;
  --navy: #1E2A47;
  --black: #14141A;
  --gray-text: #667085;
  --footer-bg: #160800;
  --footer-text: #FFECE1;
  --border-color: #E5E7EB;
  --success: #1E8E5A;
  --pending: #C77B0A;
  --danger: #D0362B;
}

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

body {
  font-family: "Inter", -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
  direction: ltr;
  color: var(--navy);
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }

/* ---------- Hero wrap + Glass header ---------- */
.hero-wrap {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  border-radius: 0 0 32px 32px;
  background-color: var(--orange);
  background-image:
    url('/assets/logo.casing.png'),
    linear-gradient(120deg, #FDEEDD 0%, var(--orange) 45%, #FDEEDD 100%);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
}

header.site-header {
  position: absolute;
  top: 24px;
  left: 24px;
  right: 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* py-2 pr-3 pl-2 من الكود الحقيقي */
  padding: 8px 12px 8px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: 0 8px 30px rgba(30, 15, 0, 0.08);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  flex-shrink: 0;
  z-index: 1;
}

.logo .mark {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 19px;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
  flex-shrink: 0;
}

.logo .mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* لو فشل تحميل صورة الشعار، أخفِها واخلي النص الاحتياطي "al" يظهر بدلها */
.logo .mark img.img-error {
  display: none;
}

.logo .mark .mark-fallback {
  position: relative;
  display: none;
}

.logo .mark img.img-error + .mark-fallback {
  display: block;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.5vw, 32px);
  white-space: nowrap;
}

/* روابط القائمة الرئيسية: زي الأزرار الحقيقية h-12 px-6 text-base font-semibold */
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy);
  transition: background 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* روابط القوائم المنسدلة (Geld senden, Ressourcen): h-9 px-4 text-sm */
.nav-link-sm {
  height: 36px;
  padding: 0 16px;
  font-size: 13px;
}

.nav-link.active {
  color: var(--navy);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-cta-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.flag-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  /* size-9 = 36px مطابق للحجم الحقيقي */
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  /* خلفية احتياطية بألوان علم النمسا: تظهر تلقائياً إذا فشل تحميل الصورة الحقيقية */
  background: linear-gradient(to bottom, #ED2939 0%, #ED2939 33.33%, #fff 33.33%, #fff 66.66%, #ED2939 66.66%, #ED2939 100%);
}

.flag-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* لو فشل تحميل الصورة الحقيقية، أخفِ أيقونة الصورة المكسورة نهائياً
   وخلّي خلفية العلم الاحتياطية (بالأعلى) تظهر بدلها تلقائياً */
.flag-badge img.img-error {
  display: none;
}

/* الأزرار (Anmelden / Registrieren): h-12 px-6 text-base font-semibold rounded-full */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.btn-outline {
  background: #fff;
  border: 1px solid #F5F5F4;
  color: #000;
}

.btn-outline:hover { background: #F5F5F4; }

.btn-dark {
  background: #000;
  color: #fff;
}

.btn-dark:hover { background: #1F2937; }

.btn-orange {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #F97316;
  background: oklch(70.5% .213 47.604);
  color: #000;
  width: 100%;
  height: 48px;
  padding: 8px 16px;
  font-size: 16px;
  line-height: 1.375rem;
  font-weight: 600;
  border-radius: 999px;
  border: none;
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
  transition: background 0.15s ease;
}

.btn-orange:focus {
  outline: none;
  box-shadow: none;
}

.btn-orange:hover { background: var(--orange-dark); }
.btn-orange:disabled { cursor: not-allowed; }

/* ---------- Main content ---------- */
main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 70px 24px 240px;
}

.track-box { width: 100%; max-width: 560px; }
.track-box.is-hidden { display: none; }

.track-box h1 {
  font-size: 44px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
  margin-bottom: 18px;
}

.track-box .subtitle {
  font-size: 17px;
  color: var(--gray-text);
  margin-bottom: 34px;
  line-height: 1.6;
}

.field-wrap {
  position: relative;
  margin-bottom: 10px;
}

.field {
  width: 100%;
  background: #EEF0F3;
  border: 1.5px solid transparent;
  border-radius: 16px;
  padding: 27px 48px 13px 20px;
  font-size: 16px;
  color: var(--navy);
  margin-bottom: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.field:focus {
  outline: none;
  background: #fff;
  border-color: #545B69;
}

.field-label {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--gray-text);
  pointer-events: none;
  transition: top 0.15s ease, font-size 0.15s ease, transform 0.15s ease;
}

.field:focus + .field-label,
.field:not(:placeholder-shown) + .field-label {
  top: 13px;
  transform: translateY(0);
  font-size: 12px;
}

.field-clear {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #6B7280;
  color: #fff;
  border: none;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.field-clear.show {
  display: flex;
}

.field-hint {
  font-size: 13px;
  color: var(--gray-text);
  margin-bottom: 26px;
}

.field-hint.is-error {
  color: var(--danger);
  font-weight: 600;
}

.field.field-error {
  border-color: var(--danger);
}

.field.field-error:focus {
  border-color: var(--danger);
}

.helper-link {
  display: block;
  text-align: center;
  margin-top: 22px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  color: var(--navy);
}

/* ---------- Result / status states ---------- */
.result-box {
  margin-top: 32px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 26px;
  display: none;
}

.result-box.show { display: block; }

.result-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  color: #fff;
}

.status-icon.loading { background: var(--gray-text); }
.status-icon.found { background: var(--success); }
.status-icon.hold { background: var(--pending); }
.status-icon.cancel { background: var(--danger); }

.status-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.status-time { font-size: 13px; color: var(--gray-text); }

.spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-spinner-icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-msg {
  color: var(--danger);
  font-size: 14px;
  margin-top: 10px;
  display: none;
}

.error-msg.show { display: block; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 80px 56px 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto 40px;
}

.footer-logo {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--orange);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
}

.footer-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer-logo img.img-error {
  display: none;
}

.footer-logo-fallback {
  position: relative;
  display: none;
}

.footer-logo img.img-error + .footer-logo-fallback {
  display: block;
}

.footer-col h4 {
  color: var(--orange);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
}

.footer-col a {
  display: block;
  font-size: 14.5px;
  color: var(--footer-text);
  margin-bottom: 14px;
  opacity: 0.92;
}

.social-icons {
  display: flex;
  gap: 22px;
  align-items: center;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--footer-text);
  opacity: 0.9;
  transition: opacity 0.15s ease;
}

.social-icons a:hover {
  opacity: 1;
}

.social-icons svg {
  width: 28px;
  height: 28px;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: #C9C3BC;
  flex-wrap: wrap;
}

.footer-bottom-text {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.globe-icon {
  display: flex;
  align-items: center;
  color: #C9C3BC;
}

.footer-bottom a { color: var(--orange); }

/* ---------- Modal: Wo finde ich meine PIN und Bestellnummer? ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(60, 50, 45, 0.55);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.show {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 28px;
  padding: 36px 32px 32px;
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.modal-icon {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #F2F4F7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  overflow: hidden;
}

.modal-icon img {
  width: 60%;
  height: 60%;
  object-fit: contain;
}

.modal-icon img.img-error {
  display: none;
}

.modal-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 24px;
}

.modal-section {
  text-align: left;
  margin-bottom: 20px;
}

.modal-section h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.modal-section p {
  font-size: 15px;
  color: var(--navy);
  line-height: 1.6;
}

.modal-close-btn {
  margin-top: 8px;
}

/* ---------- زر الهمبرغر وقائمة الجوال (مخفيين بالديسكتوب افتراضياً) ---------- */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  flex-shrink: 0;
}

.mobile-nav {
  display: none;
}

/* ---------- صفحة النتيجة الكاملة (بعد ما تظهر الحالة النهائية) ---------- */
.result-page {
  display: none;
  width: 100%;
  max-width: 620px;
  text-align: center;
}

.result-page.show {
  display: block;
}

.flag-pill {
  position: relative;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #FDEEE3;
  border-radius: 999px;
  padding: 8px;
  margin: -72px auto 24px;
  color: var(--navy);
}

.flag-pill-circle {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
}

/* خلفية احتياطية بألوان علم النمسا: تظهر تلقائياً لو فشلت الصورة الحقيقية */
.flag-pill-at {
  background: linear-gradient(to bottom, #ED2939 0%, #ED2939 33.33%, #fff 33.33%, #fff 66.66%, #ED2939 66.66%, #ED2939 100%);
}

/* خلفية احتياطية بلون علم تركيا: تظهر تلقائياً لو فشلت الصورة الحقيقية */
.flag-pill-tr {
  background: #E30A17;
}

.flag-pill-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.flag-pill-circle img.img-error {
  display: none;
}

.result-quote {
  font-size: 14px;
  color: var(--gray-text);
  margin-bottom: 8px;
}

.result-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--navy);
  margin-bottom: 28px;
}

.result-card {
  text-align: left;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 24px 24px 4px;
  background: #fff;
}

.result-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.result-label-right {
  text-align: right;
}

.result-label {
  font-size: 12px;
  color: var(--gray-text);
  margin-bottom: 2px;
}

.result-value {
  font-size: 14px;
  font-weight: 400;
  color: var(--navy);
}

/* ---------- الخط الزمني ---------- */
.timeline {
  margin-top: 32px;
}

.timeline-step {
  display: flex;
  align-items: stretch;
  gap: 16px;
}

.timeline-marker-col {
  width: 16px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--orange);
}

.timeline-dot svg { width: 10px; height: 10px; }

.timeline-dot.current-marker {
  position: relative;
  background: transparent;
}

.timeline-dot.current-marker .ring-outer,
.timeline-dot.current-marker .ring-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  border: 1px solid rgba(30,42,71,0.25);
}

.timeline-dot.current-marker .ring-outer { width: 16px; height: 16px; transform: translate(-50%, -50%); }
.timeline-dot.current-marker .ring-inner { width: 12px; height: 12px; transform: translate(-50%, -50%); border-color: rgba(30,42,71,0.4); }

.timeline-dot.current-marker .core-dot {
  position: relative;
  z-index: 1;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #000;
}

.timeline-dot.cancelled-marker { background: var(--danger); }

.timeline-dot.inactive-marker {
  background: #fff;
  border: 2px solid var(--border-color);
}

.timeline-line {
  width: 2px;
  flex: 1;
  min-height: 32px;
  margin: 4px 0;
  background: var(--orange);
}

.timeline-content {
  flex: 1;
  padding-bottom: 32px;
}

.timeline-date {
  font-size: 12px;
  color: var(--gray-text);
  margin-bottom: 4px;
}

.timeline-text {
  font-size: 16px;
  color: var(--navy);
  line-height: 1.5;
}

.timeline-step.is-current .timeline-text {
  font-weight: 600;
}

.timeline-step.is-inactive {
  opacity: 0.55;
}

.timeline-step.is-inactive .timeline-text {
  color: var(--gray-text);
  font-weight: 400;
}

/* ---------- رسالة تنبيه (مثل: مطلوب مستندات إضافية) ---------- */
.timeline-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #FEF6E0;
  color: #8A5A00;
}

.timeline-warning svg {
  flex-shrink: 0;
  margin-top: 1px;
}

.timeline-warning span {
  font-size: 12.5px;
  line-height: 1.5;
}

/* ---------- أكورديون "الحوالة ما وصلت بعد؟" ---------- */
.result-accordion-wrap {
  border-top: 1px solid var(--border-color);
  margin-top: 8px;
}

.result-accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  list-style: none;
}

.result-accordion summary::-webkit-details-marker {
  display: none;
}

.result-accordion summary svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.result-accordion[open] summary svg {
  transform: rotate(180deg);
}

.result-accordion-body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--gray-text);
  padding-bottom: 20px;
}

.btn-track-another {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 28px;
  margin-top: 28px;
  border-radius: 999px;
  background: #F2F4F7;
  color: var(--navy);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
}

.btn-track-another:hover {
  background: #E5E7EB;
}

@media (max-width: 900px) {
  header.site-header { top: 14px; left: 14px; right: 14px; padding: 6px 10px 6px 6px; border-radius: 999px; gap: 8px; }
  nav.main-nav { display: none; }
  .header-cta-group { display: none; }
  .menu-toggle { display: flex; }
  .btn { height: 40px; padding: 0 18px; font-size: 14px; }
  .logo .mark { width: 46px; height: 46px; font-size: 16px; }
  .hero-wrap { min-height: 110px; }
  main { padding: 40px 18px 210px; }
  .track-box { text-align: center; }
  .track-box h1 { font-size: 32px; }
  .footer-grid { grid-template-columns: 1fr; }
  footer.site-footer { padding: 48px 20px 24px; }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 14px;
  }

  .footer-bottom-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .globe-icon {
    align-self: flex-end;
  }

  .mobile-nav {
    display: flex;
    position: fixed;
    top: 90px;
    left: 14px;
    right: 14px;
    z-index: 999;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    flex-direction: column;
    gap: 2px;
    background: #fff;
    border-radius: 24px;
    padding: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  }

  .mobile-nav.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 14px;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
  }

  .mobile-nav-link.active,
  .mobile-nav-link:hover {
    background: #F2F4F7;
  }

  .mobile-nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 6px;
  }

  .mobile-lang-flag {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 10px;
    background: linear-gradient(to bottom, #ED2939 0%, #ED2939 33.33%, #fff 33.33%, #fff 66.66%, #ED2939 66.66%, #ED2939 100%);
  }

  .mobile-lang-flag img { width: 100%; height: 100%; object-fit: cover; }
  .mobile-lang-flag img.img-error { display: none; }

  .mobile-nav-lang { justify-content: flex-start; }
  .mobile-lang-text { flex: 1; }

  .flag-pill { margin: -56px auto 20px; }
  .result-title { font-size: 30px; }
  .result-card { padding: 20px 18px 4px; }
}
