/* ============================================
   محطة التمويل - محطة التمويل
   Theme: Dark/Blue Professional Arabic RTL
   ============================================ */

:root {
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: #1a2234;
  --bg-hover: #232d42;
  --text-primary: #f0f4f8;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-dark: #2563eb;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: #2d3748;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0,0,0,0.4);
  --transition: all 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  direction: rtl;
}

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

a:hover {
  color: var(--accent);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-icon {
  font-size: 1.6rem;
}

.main-nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

.nav-link:hover {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Risk Banner */
.risk-banner {
  background: linear-gradient(90deg, #7c2d12, #92400e);
  padding: 0.75rem 0;
  text-align: center;
  font-size: 0.9rem;
}

.risk-banner p {
  margin: 0;
}

/* Hero */
.hero {
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.hero-grid {
  display: grid;
  gap: 2rem;
}

.hero-content {
  text-align: center;
}

.hero-title {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.highlight {
  color: var(--accent-light);
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.stat-item {
  text-align: center;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  min-width: 120px;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-light);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-tag {
  display: inline-block;
  background: var(--accent-dark);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-desc {
  color: var(--text-secondary);
}

/* Categories Grid */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.category-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.category-card h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.category-card p {
  color: var(--text-secondary);
}

/* Firms Grid */
.firms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Firm Card */
.firm-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
}

.firm-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.firm-card-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.firm-info {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.firm-name {
  font-size: 1.2rem;
  margin-left: auto;
  flex: 1 1 100%;
}

.firm-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-hover);
  color: var(--text-secondary);
}

.badge-active {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.badge-paused {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.badge-closed {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.badge-unclear {
  background: rgba(148, 163, 184, 0.2);
  color: var(--text-muted);
}

.firm-card-body {
  padding: 1.5rem;
}

.firm-features {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.feature-item {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.firm-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

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

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

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-light);
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1.1rem;
}

/* Review Page */
.review-hero {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.review-hero h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.review-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.breadcrumb {
  padding: 1rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--text-secondary);
}

.breadcrumb a:hover {
  color: var(--accent-light);
}

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

.content-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

.quick-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

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

.summary-grid div {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
}

.data-table thead {
  background: var(--bg-hover);
}

.data-table th,
.data-table td {
  padding: 1rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background: var(--bg-hover);
}

.table-wrapper {
  overflow-x: auto;
}

.plans-table {
  min-width: 900px;
}

/* FAQ */
.faq {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
}

.faq summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

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

.faq details[open] summary {
  margin-bottom: 0.75rem;
  color: var(--accent-light);
}

/* Sources */
.sources-list {
  list-style: none;
}

.sources-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.sources-list a {
  word-break: break-all;
}

/* Footer */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand p {
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.footer-col h4 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-col a {
  display: block;
  color: var(--text-secondary);
  padding: 0.3rem 0;
}

.footer-col a:hover {
  color: var(--accent-light);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .main-nav.active {
    display: flex;
  }

  .mobile-menu-btn {
    display: block;
  }

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

  .hero-stats {
    gap: 1rem;
  }

  .stat-item {
    min-width: 100px;
    padding: 0.75rem;
  }

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

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

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

  .data-table {
    font-size: 0.85rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.75rem 0.5rem;
  }
}
