/* ========================================
   TOOLS LANDING PAGE - PROFESSIONAL CSS
   Mobile-First Responsive Design
   ======================================== */

/* === ROOT VARIABLES === */
:root {
  /* Colors */
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --secondary: #16a34a;
  --accent: #f59e0b;
  --danger: #ef4444;
  
  /* Neutrals */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-900: #0f172a;
  
  /* Typography */
  --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  
  /* Spacing */
  --container-width: 1200px;
  --section-padding: 4rem 2rem;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-system);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-700);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 {
  color: var(--gray-900);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

/* === CONTAINER === */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* === HERO SECTION === */
.hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1.5rem;
  border-radius: 50px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255,255,255,0.3);
}

.hero-title {
  color: white;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-title .highlight {
  display: block;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 0.5rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  max-width: 700px;
  margin: 0 auto 2.5rem;
  opacity: 0.95;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

/* === BUTTONS === */
.btn-primary,
.btn-secondary,
.btn-primary-large,
.btn-tool,
.btn-product {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary,
.btn-primary-large {
  background: white;
  color: var(--primary);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover,
.btn-primary-large:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary-large {
  padding: 1.25rem 2.5rem;
  font-size: 1.125rem;
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-secondary:hover {
  background: white;
  color: var(--primary);
}

.btn-tool {
  background: var(--primary);
  color: white;
  width: 100%;
  margin-top: auto;
}

.btn-tool:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-product {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: white;
  padding: 1rem 2.5rem;
  font-size: 1.125rem;
  box-shadow: 0 4px 15px rgba(245,158,11,0.4);
}

.btn-product:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(245,158,11,0.5);
}

/* === TRUST BAR === */
.trust-bar {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.trust-icon {
  font-size: 1.5rem;
}

/* === SECTION COMMON === */
section {
  padding: var(--section-padding);
}

.section-title {
  text-align: center;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  color: var(--gray-600);
  max-width: 700px;
  margin: 0 auto 3rem;
  font-size: 1.125rem;
}

/* === INFOGRAPHIC SECTION === */
.infographic-section {
  background: var(--gray-50);
}

/* === TOOLS GRID === */
.tools-section {
  background: white;
}

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

.tool-card {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: 12px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  position: relative;
}

.tool-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.tool-card.featured {
  border-color: var(--accent);
  background: linear-gradient(to bottom, #fffbeb 0%, white 100%);
}

.tool-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--accent);
  color: white;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}

.tool-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.tool-title {
  font-size: 1.35rem;
  margin-bottom: 1rem;
  color: var(--gray-900);
}

.tool-desc {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
  flex-grow: 1;
  line-height: 1.6;
}

.tool-features {
  list-style: none;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: 8px;
}

.tool-features li {
  padding: 0.5rem 0;
  color: var(--gray-700);
  font-size: 0.95rem;
}

.tool-stats {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--gray-600);
  font-weight: 600;
}

/* === COMPARISON TABLE === */
.comparison-section {
  background: var(--gray-50);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2rem 0;
  border-radius: 12px;
  box-shadow: var(--shadow-md);
}

.comparison-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  background: white;
}

.comparison-table thead {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--gray-200);
}

.comparison-table th {
  font-weight: 700;
  font-size: 0.95rem;
}

.comparison-table tbody tr:hover {
  background: var(--gray-50);
}

.badge-easy {
  background: #dcfce7;
  color: #166534;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-medium {
  background: #fef3c7;
  color: #92400e;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

.tip-box {
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  border-left: 4px solid var(--primary);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
}

.tip-box h4 {
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

/* === TESTIMONIALS === */
.testimonials-section {
  background: white;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.testimonial-card {
  background: var(--gray-50);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
}

.testimonial-stars {
  color: #fbbf24;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.testimonial-text {
  font-style: italic;
  color: var(--gray-700);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

.testimonial-author {
  font-weight: 600;
  color: var(--gray-900);
  font-size: 0.95rem;
}

/* === STATS BAR === */
.stats-bar {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 3rem 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  margin-top: 3rem;
  color: white;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* === FINAL CTA SECTION === */
.final-cta-section {
  background: var(--gray-50);
}

.cta-box {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  padding: 3rem;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 3rem;
}

.cta-box h2 {
  color: white;
  margin-bottom: 1rem;
}

/* === FEATURED PRODUCT === */
.featured-product {
  background: white;
  border: 3px solid var(--accent);
  border-radius: 16px;
  padding: 2.5rem;
  position: relative;
}

.featured-badge {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  color: white;
  padding: 0.5rem 2rem;
  border-radius: 25px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
}

.featured-product h3 {
  text-align: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.featured-intro {
  text-align: center;
  color: var(--gray-600);
  max-width: 700px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
}

.product-highlight {
  background: var(--gray-50);
  padding: 2rem;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

.product-info h4 {
  color: var(--accent);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.product-desc {
  margin-bottom: 1rem;
  line-height: 1.7;
}

.product-benefits {
  list-style: none;
  margin-bottom: 1.5rem;
}

.product-benefits li {
  padding: 0.5rem 0;
  color: var(--gray-700);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.product-rating .stars {
  color: #fbbf24;
  font-size: 1.25rem;
}

.product-rating .rating-text {
  color: var(--gray-600);
  font-size: 0.95rem;
}

.product-cta {
  text-align: center;
}

.product-disclaimer {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--gray-600);
  line-height: 1.4;
}

/* === FAQ SECTION === */
.faq-section {
  background: white;
}

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

.faq-item {
  background: var(--gray-50);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
}

.faq-question {
  color: var(--primary-dark);
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.faq-answer {
  color: var(--gray-700);
  line-height: 1.7;
}

/* === FOOTER === */
.footer {
  background: var(--gray-900);
  color: var(--gray-300);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: white;
  margin-bottom: 1rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--gray-300);
}

.footer-col a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid var(--gray-700);
  padding-top: 1.5rem;
  text-align: center;
}

.footer-disclaimer {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--gray-600);
  font-style: italic;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
  :root {
    --section-padding: 3rem 1.5rem;
  }
  
  .product-highlight {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 3rem 0 2.5rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
  
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
  
  .trust-bar {
    gap: 1rem;
  }
  
  .trust-item {
    flex-direction: column;
    text-align: center;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-bar {
    flex-direction: column;
    text-align: center;
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .tool-card {
    padding: 1.5rem;
  }
  
  .featured-product {
    padding: 1.5rem;
  }
  
  .product-highlight {
    padding: 1.5rem;
  }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* ========================================
   LEGAL & CONTACT PAGES STYLES
   ======================================== */

.simple-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 0 2rem;
  text-align: center;
}

.back-link {
  color: white;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 1rem;
  opacity: 0.9;
  transition: opacity 0.3s;
}

.back-link:hover {
  opacity: 1;
}

.last-update {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 0.5rem;
}

.legal-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 3rem 2rem;
  line-height: 1.8;
}

.legal-content section {
  margin-bottom: 3rem;
}

.legal-content h2 {
  color: #1e293b;
  margin-top: 2rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e2e8f0;
}

.legal-content h3 {
  color: #334155;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.legal-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content li {
  margin-bottom: 0.5rem;
}

.warning-box {
  background: #fef2f2;
  border: 3px solid #ef4444;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}

.warning-box h2 {
  color: #dc2626;
  border: none;
  margin-top: 0;
}

.red-list {
  list-style: none;
  padding-left: 0;
}

.red-list li:before {
  content: "⛔ ";
  color: #ef4444;
  font-weight: bold;
  margin-right: 0.5rem;
}

.emergency-box {
  background: #fff7ed;
  border: 3px solid #f59e0b;
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem 0;
}

.emergency-box h3 {
  color: #ea580c;
  margin-top: 0;
}

/* Contact Page */
.contact-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.contact-intro {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 1.125rem;
  color: #64748b;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.contact-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s;
}

.contact-card:hover {
  border-color: #3b82f6;
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.contact-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.contact-link {
  display: inline-block;
  color: #3b82f6;
  font-weight: 600;
  margin: 1rem 0;
  word-break: break-all;
}

.response-time {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 1rem;
}

.faq-quick {
  background: #f8fafc;
  padding: 2rem;
  border-radius: 12px;
  margin: 3rem 0;
}

.faq-quick h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.faq-quick-item {
  background: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  border-left: 4px solid #3b82f6;
}

.faq-quick-item h4 {
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.social-section {
  text-align: center;
  margin: 4rem 0;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: #334155;
  font-weight: 600;
  transition: all 0.3s;
}

.social-btn:hover {
  border-color: #3b82f6;
  background: #f8fafc;
  transform: translateY(-2px);
}

.simple-footer {
  background: #f8fafc;
  padding: 2rem 0;
  text-align: center;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .social-links {
    flex-direction: column;
    align-items: stretch;
  }
}

/* === FIX FOR FEATURED PRODUCT OVERLAP === */
.featured-product {
  margin-top: 2rem; /* إضافة مساحة إضافية في الأعلى */
  padding-top: 2rem; /* زيادة الحشو الداخلي العلوي */
}

.featured-badge {
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10; /* التأكد من ظهوره فوق المحتوى */
}

.featured-product h3 {
  margin-top: 1rem; /* إضافة مساحة بين البادج والعنوان */
  position: relative;
  z-index: 5; /* التأكد من ظهور النص بشكل صحيح */
}

/* تحسينات إضافية للاستجابة */
@media (max-width: 768px) {
  .featured-product {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
  }
  
  .featured-badge {
    font-size: 0.8rem;
    padding: 0.4rem 1.5rem;
  }
}

/* === SVG CONTAINER STYLES === */
.svg-container {
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.svg-container svg {
  width: 100%;
  height: auto;
  min-height: 400px;
  display: block;
}

/* تحسينات للهواتف */
@media (max-width: 768px) {
  .svg-container {
    margin: 1rem auto;
    max-width: 100%;
    border-radius: 6px;
  }
  
  .svg-container svg {
    min-height: 500px;
  }
}

@media (max-width: 480px) {
  .svg-container {
    margin: 0.5rem auto;
    border: none;
    border-radius: 0;
  }
  
  .svg-container svg {
    min-height: 600px;
  }
}