/* ========================= */
/* GLOBAL */
/* ========================= */

html {
  overflow-y: scroll;   /* ✅ ALWAYS reserve scrollbar space */
}

/* BODY */
body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background: #f3f4f6;
    /*direction: ltr;
    text-align: left;*/
    overflow-x: hidden;
    margin-top: 60px; /* adjust based on navbar height */
}

/* ========================= */
/* NAVBAR */
/* ========================= */

.nav {
  position: fixed;
  top: 0;
  left: 0; 
  width: 100%; 
  z-index: 9999;       /* 🔥 keeps it above everything */
  background: #fff;    /* 🔥 prevents transparency */
  display: flex;
  align-items: center;
  padding: 0;        /* reduce height */
  justify-content: space-between; /* 🔥 left + right separation */
}

.nav-left {
  display: flex;
  align-items: flex-start; /* keep top alignment */
  gap: 0px;
}

.logo {
  margin: 0;
  line-height: 1;   /* 🔥 removes extra vertical space */
  white-space: nowrap; /* 🔥 prevents line break */
  margin-left: 6px;
  margin-top: 3px;
}

.nav-btn {
    background: #2563eb;
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
}

/* ========================= */
/* HERO */
/* ========================= */

.hero {
    text-align: center;
    padding: 10px 20px;
    background: #0F4761;
    color: white;
}

.hero h1 {
    font-size: 34px;
    margin-bottom: 10px;
    margin-top: 0;   /* 🔥 removes space above title */
}

.hero p {
    margin-bottom: 0;
    margin-top: 0;
}

/* ========================= */
/* TOOL */
/* ========================= */

.tool-section {
    padding: 60px 20px;
    border-bottom: 1px solid #0F4761; /* Add this line for a separator */
}

.container {
    max-width: 800px;
    margin: 60px auto;
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    height: auto;
    overflow: visible;
}

.container h2 {
    text-align: center;
}

.drop-area {
    border: 2px dashed #2563eb;
    padding: 40px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    background: #f8fafc;
    transition: 0.2s;
}

.drop-area:hover {
    background: #eef2ff;
}

/* ✅ Unified input style */
input, select {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

/* ========================= */
/* STATS */
/* ========================= */

.stats {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.stat {
    flex: 1;
    background: #f1f5f9;
    padding: 10px;
    text-align: center;
    border-radius: 8px;
}

/* ========================= */
/* BUTTON */
/* ========================= */

button {
    width: 100%;
    margin-top: 5px;
    padding: 6px 10px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
}

button:hover {
    background: #1d4ed8;
}

/* ========================= */
/* INSTRUCTIONS */
/* ========================= */

.instructions {
    background: #f9fafb;
    padding: 60px 20px;
    text-align: center;
}

.instructions h2 {
    font-size: 28px;
    margin-bottom: 40px;
    color: #111827;
    font-weight: 600;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    max-width: 1000px;
    margin: auto;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.step-box {
    background: white;
    padding: 30px 25px;
    text-align: left;
    border-right: 1px solid #e5e7eb;
    transition: 0.2s;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.step-box:last-child {
    border-right: none;
}

/* Hover merged */
.step-box:hover {
    background: #f8fafc;
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
}

/* Icon */
.icon {
    font-size: 28px;
    margin-bottom: 8px;
    line-height: 1;
}

.step-box h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: #111827;
}

.step-box p {
    color: #4b5563;
    line-height: 1.6;
    font-size: 14px;
}

/* ========================= */
/* TEMPLATE BUTTON */
/* ========================= */

.template-link {
    display: inline-block;
    margin-top: 12px;
    padding: 10px 16px;
    background: #2563eb;
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
}

.template-link:hover {
    background: #1d4ed8;
}

/* ========================= */
/* FOOTER */
/* ========================= */

.footer {
    background: #0F4761;
    color: white;
    padding: 12px 20px;
    margin: 0;            /* 🔥 remove outer space */
}

.footer-container {
    max-width: 1100px;
    margin: auto;
    display: grid;
    justify-content: space-between; /* Space out the sections */
    grid-template-columns: 3fr 2fr 1fr;
    gap: 20px;
    align-items: center; /* Align items vertically */
}

.footer-col {
    display: flex;
    flex-direction: column;
    flex: 1;
    align-items: Center; /* Center the Contact column */
    align-items: flex-start; /* 🔥 LEFT ALIGN */
}

.footer-col h3 {
    margin: 0 0 6px 0;   /* small space below only */
    font-size: 18px;
}

.footer-col p {
    font-size: 14px;
    color: #d1d5db;
    line-height: 1.4;
    margin: 0;
}

.footer-col:first-child p {
    max-width: 400px;
    line-height: 1.4;   /* tighter */
    text-align: left;
}

.footer-col center {
    align-items: center;   /* center content horizontally */
    text-align: center;    /* center text */
}

.social-icons {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.social-icons a {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: white;
  font-size: 14px;
}

.social-icons img {
  width: 16px;
  height: 16px;
  margin-right: 6px;
  vertical-align: middle;
}

.social-icons a:hover {
  opacity: 0.8;
  transform: translateX(3px);
}

@media (max-width: 768px) {

  .footer-container {
    grid-template-columns: 1fr; /* 🔥 stack columns */
    gap: 30px;
    text-align: center; /* optional */
  }

  .footer-col {
    align-items: center; /* center content */
  }

  .footer-col p {
    text-align: center;
  }

}

/* ========================= */
/* MOBILE */
/* ========================= */

@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .step-box {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .step-box:last-child {
        border-bottom: none;
    }

    .faq-why-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================= */
/* TABLE */
/* ========================= */

#preview {
    width: 100%;
    border-collapse: collapse;
    direction: rtl;
}

#preview td {
    border: 1px solid #93c5fd;
    padding: 10px;
    text-align: right;
}

#preview td:first-child {
    width: 60px;
    text-align: center;
    font-weight: bold;
}

.pricing-note {
    margin-top: 10px;
    color: #dc2626;
    font-size: 14px;
    text-align: center;
}

.drop-area.dragover {
    background: #dbeafe;
    border-color: #1d4ed8;
}

.trust {
    margin-top: 10px;
    font-size: 14px;
    opacity: 0.9;
    line-height: 1.6;
}

/* ========================= */
/* COUNTRY SELECT */
/* ========================= */

.form-row {
    display: flex;
    gap: 12px;
}

.form-row > * {
    flex: 1;        /* each takes equal space */
    min-width: 0;   /* prevents overflow issues */
}

.form-row input,
#countryInput {
    width: 100%;
    height: 48px;
    box-sizing: border-box;
}

.country-select {
    position: relative;
}

#countryInput {
    border-radius: 10px;
}

/* Dropdown */
.country-list {
    position: absolute;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-top: 6px;
    z-index: 1000;
}

.country-region {
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    background: #f9fafb;
    color: #6b7280;
}

.country-item {
    padding: 10px 12px;
    cursor: pointer;
    transition: 0.2s;
}

.country-item:hover {
    background: #f3f4f6;
}

.country-item.active {
    background: #2563eb;
    color: white;
}

#submitBtn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.credit-box {
  margin-top: 8px;
  font-size: 14px;
  text-align: left;
  padding-left: 5px;
}

@keyframes loading {
  0% { width: 0%; }
  50% { width: 80%; }
  100% { width: 100%; }
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
    }
}

.faq-why-section {
  max-width: 1000px;
  margin: 60px auto;
  padding: 0;
  box-sizing: border-box;
  align-self: center;
}

/* REMOVE CONTAINER EFFECT INSIDE */
.faq-why-section .container {
  max-width: 100%;
  margin: 0;
  padding: 0;
  box-shadow: none;
  background: transparent;
}

/* GRID LAYOUT */
.faq-why-grid {
  display: flex;
  gap: 50px;
  align-items: flex-start;
}

/* make both sides equal width */
.faq-why-grid > div {
  flex: 1;
}

.points-btn {
  padding: 4px 10px;
  font-size: 13px;
  line-height: 1;          /* 🔥 important */
  display: flex;           /* 🔥 fix alignment */
  align-items: center;     /* 🔥 center icon + text */
  margin-top: 2px;  /* 🔥 adjust: try 1px–3px */
  border-radius: 5px; /* 🔥 makes it pill-shaped like your button */
  background: #2563eb;  /* 🔥 SAME COLOR */
  color: white;
  cursor: pointer;
  gap: 5px;
}

.points-btn:hover {
  background: #1d4ed8; /* slightly darker on hover */
}

.small-message {
  font-size: 14px;   /* 🔥 adjust: 12px–14px */
  color: #444;       /* optional: softer color */
  line-height: 1.4;
}
  
/* FAQ SIDE */
.faq-section {
  padding: 0;
  background: transparent;
  margin-inline-start: 200px;
}

@media (max-width: 768px) {

  .faq-why-grid {
    display: block; /* 🔥 simpler than flex */
  }

  .faq-section {
    margin-left: 0;
    margin-top: 30px;
  }

}

.faq-section .container {
  max-width: 1200px;
}


.why-section h2,
.faq-header h2 {
  position: relative;
  padding-bottom: 7px; /* Space for the line */
  display: inline-block; /* Ensure the h2 behaves like an inline element */
}

.why-section h2::after,
.faq-header h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%; /* Set to 100% to cover the text */
  height: 1px;
  background: #f4b400; /* header line - orange color */
  border-radius: 1px;
  transform: scaleX(1); /* Scale the line to full width */
  transform-origin: left; /* Set the origin for scaling */
  transition: transform 0.3s ease; /* Optional: Add a transition effect */
}

.faq-item {
  margin-bottom: 10px;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.2s ease;
  margin: 0;            /* remove default paragraph spacing */
  line-height: 1.4;
}

.faq-answer p {
  margin: 4px; /* 🔥  default spacing */
}

/* question style */
.faq-question {
  cursor: pointer;
  font-weight: 600;
  margin-bottom: 0;
  line-height: 1.3;     /* 🔥 reduce vertical spacing */
  position: relative;      /* ✅ REQUIRED */
  padding-left: 25px;      /* space for bullet */
}

.faq-question::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 1px;                /* adjust vertically */
  color: #1f5d73;
  font-size: 25px;
  line-height: 1;
}

.faq-header {
  margin-bottom: 5px;
}

.faq-header h2 {
  font-size: 28px;   /* ✅ SAME AS WHY */
  margin: 0;
  font-weight: 600;
}

/* SAME STYLE FOR BOTH TITLES */
.why-section h2,
.faq-header h2 {
  font-family: 'IBM Plex Sans Arabic', sans-serif; /* same font */
  font-size: 28px;   /* same size */
  font-weight: 600;  /* same weight */
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 20px;
  letter-spacing: 0.2px;
}

/* WHY SIDE */
.why-section {
  margin-top: 0;
  padding: 0;
  line-height: 1.6;
}

.why-grid {
  display: flex;
  flex-direction: column;
  gap: 15px; /* ✅ controls spacing cleanly */
}

.why-box {
  background: transparent;   /* 🔥 remove box look */
  padding: 0;
}
.why-box h3 {
  margin: 0 0 5px 0; /* small space below title */
  font-size: 18px;
}

.why-box p {
  margin: 0; /* ❌ remove extra space */
  color: #444;
}

.language-switch {
    display: flex;
    align-items: center;  /* 🔥 align buttons vertically */
    padding: 0;
    gap: 1px
}

.lang-btn {
    padding: 6px 10px;
    border: none;
    background: #2563eb;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

.lang-btn.active {
    background: #1d4ed8;
}

/* ========================= */
/* RTL SUPPORT */
/* ========================= */

/* RTL fix for steps */
html[dir="rtl"] .step-box {
    text-align: right;
    align-items: flex-end;

    border-right: none !important;   /* 🔥 VERY IMPORTANT */
    border-left: 1px solid #e5e7eb !important;
}

html[dir="rtl"] .step-box:last-child {
    border-left: none !important;
}

html[dir="rtl"] .step-box h3 {
    direction: rtl;
    unicode-bidi: isolate;
    text-align: right;
}
/* Fix grid direction*/
html[dir="rtl"] .steps-grid {
    direction: rtl;
}

/* Fix layout direction */
html[dir="rtl"] .nav,
html[dir="rtl"] .form-row,
html[dir="rtl"] .faq-why-grid {
    direction: rtl;
}


/* Fix FAQ bullets */
html[dir="rtl"] .faq-question {
    padding-right: 25px;
    padding-left: 0;
    text-align: right;
}

html[dir="rtl"] .faq-question::before {
    right: 0;
    left: auto;
}

html[dir="rtl"] .footer-col p {
    text-align: right !important;
    direction: rtl;
}

html[dir="rtl"] .faq-why-section {
    display: flex;
    justify-content: center;
}

html[dir="rtl"] .faq-why-grid {
    max-width: 900px;
    width: 100%;
    justify-content: center;
}

@media (max-width: 768px) {
  html[dir="rtl"] .faq-section {
    text-align: right;
  }

  html[dir="rtl"] .faq-question {
    text-align: right;
  }

  html[dir="rtl"] .faq-answer p {
    text-align: right;
  }
}

@media (max-width: 768px) {
  html[dir="rtl"] .faq-why-grid {
    text-align: right;
  }
}

@media (max-width: 768px) {

  html[dir="rtl"] .faq-section {
    margin-inline-start: 0 !important;
    text-align: right !important;
  }

  html[dir="rtl"] #faqContent {
    text-align: right !important;
  }

  html[dir="rtl"] .faq-item {
    text-align: right !important;
  }

  html[dir="rtl"] .faq-question {
    text-align: right !important;
    padding-right: 25px;
    padding-left: 0;
  }

  html[dir="rtl"] .faq-question::before {
    right: 0;
    left: auto;
  }

  html[dir="rtl"] .faq-answer p {
    text-align: right !important;
  }

}

html[dir="rtl"] .credit-box {
    text-align: right !important;
    padding-left: 0 !important;
    padding-right: 5px;
}

.balance-amount {
    direction: ltr;
    unicode-bidi: isolate;
    display: inline-block;
}