/* ================ أساسيات عامة ================ */
html { -webkit-text-size-adjust: 100%; }
html, body { 
  overflow-x: hidden; 
  margin: 0; 
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #ffffff;
  color: #333333;
}

/* الحاويات العامة */
.container, .wrapper, .main, .content, .section, main,
.header .container, header .container {
  max-width: 1200px;       /* حد أقصى لطيف للديسكتوب */
  margin-inline: auto;
  padding-inline: 16px;
}

/* العناصر الكبيرة لا تخرج من الشاشة */
img, video, iframe, canvas, svg { max-width: 100%; height: auto; }

/* جداول لو أعرض من الشاشة */
.table-wrap { overflow-x: auto; }

/* أي سایدبار */
[class*="sidebar"], [class*="aside"] { width: 100%; }

/* ================ Header Styles ================ */
.header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 0.8rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.header-in {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 6px 10px;
  color: #374151;
  min-width: 40px;
  min-height: 40px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
  color: #2563eb;
  background: #f3f4f6;
}

.mobile-menu-toggle:active {
  transform: scale(0.95);
}

/* Mobile Menu */
.mobile-menu {
  display: none !important;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding: 0.75rem;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 999;
}

.mobile-menu.active {
  display: flex !important;
}

.mobile-menu .nav-link {
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.mobile-menu .nav-link:hover {
  background-color: #f3f4f6;
}

.nav-link {
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.4rem 0.6rem;
}

.nav-link:hover {
  color: #2563eb;
  transform: translateY(-1px);
}

.nav-link.active {
  color: #2563eb;
  font-weight: 600;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #2563eb;
  border-radius: 1px;
}

/* ================ Button Styles ================ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn.cta {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.3);
}

.btn.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(37, 99, 235, 0.4);
}

.btn.cta.large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn.solid {
  background-color: #10b981;
  color: white;
  box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.3);
}

.btn.solid:hover {
  background-color: #059669;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0 rgba(16, 185, 129, 0.4);
}

/* ================ Hero Section ================ */
.hero {
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  padding: 4rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23e5e7eb" opacity="0.3"/><circle cx="75" cy="75" r="1" fill="%23e5e7eb" opacity="0.2"/><circle cx="50" cy="10" r="0.5" fill="%23e5e7eb" opacity="0.4"/><circle cx="10" cy="60" r="0.8" fill="%23e5e7eb" opacity="0.3"/><circle cx="90" cy="40" r="0.6" fill="%23e5e7eb" opacity="0.2"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.5;
  pointer-events: none;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out;
}

.hero-sub {
  font-size: 1.25rem;
  color: #6b7280;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.ad-disclaimer {
  background-color: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  padding: 1rem;
  margin: 2rem 0;
  color: #92400e;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* ================ Two Column Layout ================ */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 3rem 0;
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .usage-counter{
      display: none !important;
  }
}

/* ================ Card Styles ================ */
.card {
  background: #ffffff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid #e5e7eb;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.card:hover::before {
  transform: scaleX(1);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.upload {
  text-align: center;
  animation: fadeInUp 0.8s ease-out 0.6s both;
}

.benefits {
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.cloud-icon {
  font-size: 4rem;
  color: #2563eb;
  margin-bottom: 1rem;
  animation: float 3s ease-in-out infinite;
}

.upload-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1rem;
}

.or {
  color: #6b7280;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.note {
  color: #6b7280;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.note a {
  color: #2563eb;
  text-decoration: none;
}

.note a:hover {
  text-decoration: underline;
}

/* ================ Benefits Section ================ */
.benefits-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 1.5rem;
  text-align: center;
}

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.steps li {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background-color: #f8fafc;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.steps li:hover {
  background-color: #e0f2fe;
  transform: translateX(4px);
}

.dot {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ================ Start Now Section ================ */
.start-now {
  text-align: center;
  margin: 3rem 0;
  position: relative;
  z-index: 1;
  animation: fadeInUp 0.8s ease-out 1s both;
}

/* ================ Tools Section ================ */
.tools {
  background-color: #f8fafc;
  padding: 2rem 0;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.tools-row {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.pill {
  background-color: #ffffff;
  color: #374151;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid #d1d5db;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
  transition: left 0.5s;
}

.pill:hover::before {
  left: 100%;
}

.pill:hover {
  background-color: #2563eb;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.pill.active {
  background-color: #2563eb;
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ================ Tools Grid Section ================ */
.tools-grid-section {
  background-color: #ffffff;
  padding: 4rem 0;
}

.tools-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 3rem;
  position: relative;
}

.tools-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, #2563eb);
  border-radius: 2px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ======== Shared Tool UI Enhancements ======== */
.tool-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1rem;
}
.tool-header .tool-emoji {
  font-size: 1.8rem;
}
.tool-header h1 {
  margin: 0;
}

.upload-area-large {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
}
.upload-area-large.dragover {
  border-color: #2563eb;
  background: #eef2ff;
  transform: translateY(-2px);
}

.files-list {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
}
.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #f8fafc;
  margin-bottom: 8px;
  cursor: pointer;
}
.file-item:hover { background:#eef2ff; }
.file-item.selected { border-color:#2563eb; background:#eef2ff; }

.reorder-buttons { display:flex; gap:.5rem; margin-top:.5rem; }

.conversion-options {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
}
.options-grid .option {
  background: #f8fafc;
}
.options-grid .option:hover {
  background: #eef2ff;
}

.action-buttons .btn.cta.large {
  box-shadow: 0 10px 20px rgba(37,99,235,0.15);
}
.action-buttons .btn.cta.large:hover {
  box-shadow: 0 14px 28px rgba(37,99,235,0.25);
}

/* Tool info cards */
.benefits-grid { gap: 1.25rem; }
.benefit-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.25rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,.06);
}

.tool-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 200px;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tool-card:hover::before {
  transform: scaleX(1);
}

.tool-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: #2563eb;
}

.tool-ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: #667eea;
  border-radius: 14px;
  color: white;
  font-size: 28px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.tool-ic i {
  font-size: 28px;
  line-height: 1;
}

.tool-ic .material-icons {
  font-size: 32px;
  line-height: 1;
}

.tool-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 0.75rem 0;
  text-align: center;
  line-height: 1.3;
}

.tool-card p {
  color: #6b7280;
  text-align: center;
  line-height: 1.6;
  margin: 0;
  font-size: 0.95rem;
  flex-grow: 1;
}

/* ================ Registration Section ================ */
.registration-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
  padding: 4rem 0;
}

.registration-form {
  max-width: 500px;
  margin: 0 auto;
  background: #ffffff;
  padding: 3rem;
  border-radius: 16px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  text-align: center;
}

.registration-form h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
}

.registration-form p {
  color: #6b7280;
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #374151;
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.success-message {
  background-color: #d1fae5;
  color: #065f46;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
  border: 1px solid #a7f3d0;
}

/* ================ Footer ================ */
.footer {
  background-color: #1f2937;
  color: #d1d5db;
  padding: 3rem 0 2rem;
}

.footer-in {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
}

.footer-logo {
  height: 40px;
  width: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.footer-brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand .brand {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: white;
}

.footer-tagline {
  margin: 0;
  font-size: 0.9rem;
  color: #d1d5db;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.footer-links a {
  color: #d1d5db;
  text-decoration: none;
  transition: color 0.3s ease;
  white-space: nowrap;
}

.footer-links a:hover {
  color: #ffffff;
}

/* ================ Animations ================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}


@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ================ Enhanced Motion Effects ================ */
.hero-title {
  background: linear-gradient(135deg, #1f2937, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.8s ease-out, glow 2s ease-in-out infinite 1s;
}

.tool-card:nth-child(odd) {
  animation: slideInLeft 0.6s ease-out forwards;
  opacity: 0;
}

.tool-card:nth-child(even) {
  animation: slideInRight 0.6s ease-out forwards;
  opacity: 0;
}

.btn.cta {
  position: relative;
  overflow: hidden;
}

.btn.cta::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}

.btn.cta:hover::after {
  left: 100%;
}

/* Loading shimmer effect for cards */
.card.loading {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
}

/* Parallax effect for hero section */
.hero {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}

/* Staggered animation delays */
.tool-card:nth-child(1) { animation-delay: 0.1s; }
.tool-card:nth-child(2) { animation-delay: 0.2s; }
.tool-card:nth-child(3) { animation-delay: 0.3s; }
.tool-card:nth-child(4) { animation-delay: 0.4s; }
.tool-card:nth-child(5) { animation-delay: 0.5s; }
.tool-card:nth-child(6) { animation-delay: 0.6s; }
.tool-card:nth-child(7) { animation-delay: 0.7s; }
.tool-card:nth-child(8) { animation-delay: 0.8s; }
.tool-card:nth-child(9) { animation-delay: 0.9s; }
.tool-card:nth-child(10) { animation-delay: 1.0s; }
.tool-card:nth-child(11) { animation-delay: 1.1s; }
.tool-card:nth-child(12) { animation-delay: 1.2s; }
.tool-card:nth-child(13) { animation-delay: 1.3s; }
.tool-card:nth-child(14) { animation-delay: 1.4s; }
.tool-card:nth-child(15) { animation-delay: 1.5s; }
.tool-card:nth-child(16) { animation-delay: 1.6s; }
.tool-card:nth-child(17) { animation-delay: 1.7s; }
.tool-card:nth-child(18) { animation-delay: 1.8s; }
.tool-card:nth-child(19) { animation-delay: 1.9s; }
.tool-card:nth-child(20) { animation-delay: 2.0s; }
.tool-card:nth-child(21) { animation-delay: 2.1s; }
.tool-card:nth-child(22) { animation-delay: 2.2s; }
.tool-card:nth-child(23) { animation-delay: 2.3s; }
.tool-card:nth-child(24) { animation-delay: 2.4s; }
.tool-card:nth-child(25) { animation-delay: 2.5s; }
.tool-card:nth-child(26) { animation-delay: 2.6s; }
.tool-card:nth-child(27) { animation-delay: 2.7s; }
.tool-card:nth-child(28) { animation-delay: 2.8s; }

/* Hover effects with enhanced animations */
.tool-card:hover .tool-ic {
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

.tool-card:hover h3 {
  color: #2563eb;
}

.tool-card:hover p {
  color: #4b5563;
}

/* Enhanced button hover effects */
.btn:hover {
  transform: translateY(-3px) scale(1.02);
}

.btn:active {
  transform: translateY(-1px) scale(0.98);
}

/* Loading states */
.loading {
  pointer-events: none;
  opacity: 0.7;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #2563eb;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Smooth transitions for all interactive elements */
* {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states for accessibility */
.btn:focus,
.tool-card:focus,
.pill:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ================ Page Content Styles ================ */
.page-content {
  padding: 2rem 0;
}

/* RTL/LTR Text Alignment */
[dir="rtl"] .page-content,
[dir="rtl"] .contact-info,
[dir="rtl"] .faq,
[dir="rtl"] .features-grid {
  text-align: right;
}

[dir="ltr"] .page-content,
[dir="ltr"] .contact-info,
[dir="ltr"] .faq,
[dir="ltr"] .features-grid {
  text-align: left;
}

/* Center aligned elements */
.hero,
.hero-title,
.hero-sub,
.tools-title,
.registration-form {
  text-align: center !important;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.feature {
  text-align: center;
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feature h3 {
  color: #2563eb;
  margin-bottom: 0.5rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item h3 {
  color: #2563eb;
  margin-bottom: 0.5rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-sizing: border-box;
  resize: vertical;
  font-family: inherit;
}

.contact-form textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.faq {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.faq-item {
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #2563eb;
}

.faq-item h3 {
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.tip {
  text-align: center;
  padding: 1rem;
  background: #f0f9ff;
  border-radius: 8px;
  border: 1px solid #e0f2fe;
}

.tip h3 {
  color: #0369a1;
  margin-bottom: 0.5rem;
}

.support-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

/* Tool Interface Styles */
.tool-interface {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 2rem 0;
}

.conversion-options {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}

.conversion-options h3 {
  color: #1f2937;
  margin-bottom: 1rem;
  text-align: center;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #f8fafc;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.option:hover {
  background: #e0f2fe;
}

.option input[type="radio"] {
  margin: 0;
}

.option label {
  margin: 0;
  cursor: pointer;
  flex: 1;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.btn-secondary {
  background-color: #6b7280;
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: #4b5563;
  transform: translateY(-2px);
}

/* Privacy and Terms Page Styles */
.privacy-sections, .terms-sections {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.privacy-item, .terms-item {
  padding: 1.5rem;
  background: #f8fafc;
  border-radius: 8px;
  border-left: 4px solid #2563eb;
}

.privacy-item h3, .terms-item h3 {
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.privacy-item ul, .terms-item ul {
  margin: 0.5rem 0;
  padding-right: 1rem;
}

.privacy-item li, .terms-item li {
  margin-bottom: 0.5rem;
  color: #4b5563;
}

.security-features, .limitations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.security-item, .limitation-item {
  text-align: center;
  padding: 1rem;
  background: #f0f9ff;
  border-radius: 8px;
  border: 1px solid #e0f2fe;
}

.security-item h3, .limitation-item h3 {
  color: #0369a1;
  margin-bottom: 0.5rem;
}

.contact-info {
  background: #f8fafc;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.contact-info p {
  margin: 0.5rem 0;
  color: #4b5563;
}

/* ================ Responsive Design ================ */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-sub {
    font-size: 1rem;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .tools-row {
    justify-content: center;
  }
  
  .registration-form {
    padding: 2rem;
    margin: 0 1rem;
  }
  
  /* Mobile Navigation */
  .mobile-menu-toggle {
    display: block !important;
    font-size: 1.5rem;
    padding: 8px 12px;
    min-width: 44px;
    min-height: 44px;
  }
  
  .nav:not(.mobile-menu) {
    display: none !important;
  }
  
  .mobile-menu {
    display: none !important;
  }
  
  .mobile-menu.active {
    display: flex !important;
  }
  
  .footer-in {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 2rem;
  }
  
  .footer-brand {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-links {
    justify-content: center;
    gap: 1rem;
  }

  /* Mobile specific styles */
  .header-in {
    gap: 1rem;
    text-align: center;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .tool-interface {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .tips-grid {
    grid-template-columns: 1fr;
  }

  .support-actions {
    flex-direction: column;
    align-items: center;
  }

  .action-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn, .btn-secondary {
    width: 100%;
    max-width: 300px;
  }

  .card {
    padding: 1.5rem;
  }

  .hero {
    padding: 2rem 0;
  }

  .page-content {
    padding: 1rem 0;
  }

  .privacy-sections, .terms-sections {
    gap: 1rem;
  }

  .privacy-item, .terms-item {
    padding: 1rem;
  }

  .security-features, .limitations {
    grid-template-columns: 1fr;
  }

  .contact-info {
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding-inline: 12px;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .card {
    padding: 1rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* ================ تنسيقات التحويل/التقدّم ================ */
.conversion-progress { text-align: center; padding: 2rem; }

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  margin: 2rem 0;
  overflow: hidden;
}
.progress-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #48bb78);
  border-radius: 4px;
  transition: width 0.3s ease;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 1rem auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.conversion-info { color: #718096; font-size: .9rem; margin-top: 1rem; }
.conversion-success, .conversion-error { text-align: center; padding: 2rem; }
.success-icon, .error-icon { font-size: 4rem; margin-bottom: 1rem; }

/* أزرار النجاح */
.success-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
@media (max-width: 768px) {
  .success-buttons { flex-direction: column; }
  .success-buttons .btn { width: 100%; }
}

/* شبكات/قوائم الأدوات (إن وجدت) */
.tools, .tools-list, .row, .grid, .columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

/* Force mobile menu behavior regardless of inline styles */
@media (max-width: 768px) {
  .nav:not(.mobile-menu) { display: none !important; }
  .mobile-menu-toggle { display: block !important; }
  .mobile-menu { display: none !important; }
  .mobile-menu.active { display: flex !important; }
  
  /* Fix logo size on mobile */
  .brand img {
    height: 35px !important;
    width: 35px !important;
    max-width: 35px !important;
  }
  
  .brand-name {
    font-size: 0.95rem !important;
  }
}
