/* ============================================
   Forex Broker Reviews 2026 – Professional Theme
   ============================================ */

/* Variables */
:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #e8f0fe;
  --accent: #00c853;
  --accent-dark: #00a844;
  --bg: #f5f7fa;
  --bg-alt: #ffffff;
  --card-bg: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #6c757d;
  --text-muted: #9ca3af;
  --border: #e2e8f0;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --nav-height: 70px;
  --transition: all 0.3s ease;
}

/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

img {
  max-width: 100%;
  height: auto;
}

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

/* ============================================
   Header
   ============================================ */
.site-header {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background: var(--text);
  color: white;
  padding: 0.5rem 0;
  font-size: 0.85rem;
}

.header-top-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-tagline {
  opacity: 0.9;
}

.lang-switcher {
  display: flex;
  gap: 0.25rem;
}

.lang-link {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2);
  transition: var(--transition);
  text-transform: uppercase;
}

.lang-link:hover,
.lang-link.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.main-nav {
  padding: 0;
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: var(--nav-height);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
}

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

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.nav-links {
  display: flex;
  gap: 0;
  align-items: center;
  height: 100%;
}

.nav-links > a,
.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-links > a:hover,
.nav-dropdown-trigger:hover {
  color: var(--primary);
  background: var(--primary-light);
}

.nav-links > a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--primary);
  transition: var(--transition);
  border-radius: 2px 2px 0 0;
}

.nav-links > a:hover::after {
  width: 80%;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--card-bg);
  min-width: 220px;
  box-shadow: var(--shadow-lg);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border: 1px solid var(--border);
  z-index: 100;
  padding: 0.5rem 0;
}

.nav-dropdown:hover .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
}

.nav-dropdown-menu a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* Mobile Menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

.mobile-nav {
  display: none;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  padding: 1rem;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.mobile-nav a:last-child {
  border-bottom: none;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  color: white;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.15rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-search {
  display: flex;
  max-width: 500px;
  margin: 0 auto 2rem;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.search-input {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  font-size: 1rem;
  outline: none;
}

.search-btn {
  padding: 1rem 2rem;
  background: var(--accent);
  color: white;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.search-btn:hover {
  background: var(--accent-dark);
}

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

.stat {
  text-align: center;
}

.stat-num {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
}

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

/* ============================================
   Section Titles
   ============================================ */
.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 3px solid var(--primary);
  display: inline-block;
}

/* ============================================
   Tools Section
   ============================================ */
.tools-section {
  margin: 3rem 0;
}

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

.tool-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  border: 2px solid transparent;
  text-align: center;
}

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

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

.tool-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.tool-card p {
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.tool-btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: var(--primary);
  color: white;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
}

.tool-card:hover .tool-btn {
  background: var(--primary-dark);
}

/* ============================================
   Content Grid (Articles + Sidebar)
   ============================================ */
.content-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  margin: 2rem 0;
}

/* ============================================
   Article Cards
   ============================================ */
.articles-section {
  margin: 3rem 0;
}

.article-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  margin-bottom: 1.5rem;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.article-content {
  padding: 1.5rem;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.article-category {
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.8rem;
}

.article-meta time {
  color: var(--text-muted);
}

.article-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.article-card h3 a {
  color: var(--text);
  text-decoration: none;
}

.article-card h3 a:hover {
  color: var(--primary);
}

.article-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.read-more {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
}

.read-more:hover {
  color: var(--primary-dark);
}

/* ============================================
   Article Full Page
   ============================================ */
.article-full {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.5rem;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

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

/* Article Header */
.article-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.article-header h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 1rem 0;
  color: var(--text);
}

.article-description {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.reading-time {
  color: var(--text-muted);
}

/* Article Body */
.article-body {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text);
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  color: var(--text);
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}

.article-body p {
  margin-bottom: 1.25rem;
}

.article-body ul,
.article-body ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body blockquote {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  background: var(--card-bg);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.article-body th,
.article-body td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.article-body th {
  background: var(--primary);
  color: white;
  font-weight: 600;
}

.article-body tr:nth-child(even) {
  background: var(--bg);
}

.article-body code {
  background: #f1f5f9;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Monaco', 'Consolas', monospace;
}

.article-body pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Article Footer */
.article-footer {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.article-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  background: var(--bg);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.85rem;
}

.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.share-btn {
  padding: 0.5rem 1rem;
  background: var(--bg);
  color: var(--text-secondary);
  border-radius: 50px;
  font-size: 0.85rem;
  transition: var(--transition);
}

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

/* Related Articles */
.related-articles {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.related-articles h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

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

.related-card {
  padding: 1.25rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.related-card:hover {
  background: var(--primary-light);
}

.related-card h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.related-card h3 a {
  color: var(--text);
}

.related-card h3 a:hover {
  color: var(--primary);
}

.related-card time {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   Sidebar
   ============================================ */
.sidebar {
  position: sticky;
  top: calc(var(--nav-height) + 2rem);
  align-self: start;
}

.sidebar-widget {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary);
}

.popular-posts {
  list-style: none;
}

.popular-posts li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.popular-posts li:last-child {
  border-bottom: none;
}

.popular-posts a {
  color: var(--text);
  font-size: 0.95rem;
  display: block;
}

.popular-posts a:hover {
  color: var(--primary);
}

.sidebar-tools {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sidebar-tool-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
  transition: var(--transition);
}

.sidebar-tool-link:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.category-list {
  list-style: none;
}

.category-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}

.category-list li:last-child {
  border-bottom: none;
}

.category-list a {
  color: var(--text);
}

.category-list a:hover {
  color: var(--primary);
}

.category-list .count {
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* TOC */
.toc {
  max-height: 400px;
  overflow-y: auto;
}

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

.toc li {
  margin-bottom: 0.5rem;
}

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

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

/* ============================================
   About Section
   ============================================ */
.about-section {
  margin: 3rem 0;
  padding: 3rem 0;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 3rem;
}

.about-content p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  max-width: 800px;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}

.feature {
  text-align: center;
  padding: 1.5rem;
}

.feature-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 1rem;
}

.feature h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

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

/* ============================================
   Categories Section
   ============================================ */
.categories-section {
  margin: 3rem 0;
}

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

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

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

.category-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ============================================
   Tool Pages
   ============================================ */
.tool-container {
  max-width: 700px;
  margin: 2rem auto;
  padding: 2.5rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tool-container h2 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.tool-container p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--text);
  color: white;
  margin-top: auto;
}

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

.footer-col h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: white;
}

.footer-col p {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  line-height: 1.6;
}

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

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

.footer-col a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: var(--transition);
}

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

.disclaimer {
  font-size: 0.85rem;
  line-height: 1.5;
}

.disclaimer strong {
  color: #fbbf24;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 0;
}

.footer-bottom-inner {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-bottom p {
  color: rgba(255,255,255,0.5);
  font-size: 0.85rem;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  .sidebar-widget {
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
  .header-top {
    display: none;
  }
  
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .hero-stats {
    gap: 1.5rem;
  }
  
  .stat-num {
    font-size: 1.25rem;
  }
  
  .article-full {
    padding: 1.5rem;
  }
  
  .article-header h1 {
    font-size: 1.5rem;
  }
  
  .article-body h2 {
    font-size: 1.25rem;
  }
  
  .sidebar {
    grid-template-columns: 1fr;
  }
  
  .about-section {
    padding: 2rem 1.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    padding: 2rem 1rem;
    margin: 1rem 0;
    border-radius: var(--radius-sm);
  }
  
  .hero-search {
    flex-direction: column;
    border-radius: var(--radius-sm);
  }
  
  .search-btn {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .about-features {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
  .site-header,
  .site-footer,
  .sidebar,
  .share-buttons,
  .related-articles,
  .mobile-nav {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .article-full {
    box-shadow: none;
    padding: 0;
  }
  
  a {
    color: black;
    text-decoration: underline;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}
/* Logo Image */
.logo-img {
  height: 40px;
  width: auto;
}

@media (max-width: 768px) {
  .logo-img {
    height: 32px;
  }
}

/* Search Box */
.search-box {
  max-width: 600px;
  margin: 0 auto 2rem;
}
.search-box input {
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
  transition: border-color 0.3s;
}
.search-box input:focus {
  border-color: #2563eb;
}

/* Usage Count */
.tool-usage {
  display: inline-block;
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

/* Related Tools */
.related-tools {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e2e8f0;
}
.related-tools h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #1e293b;
}
.related-tools-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.related-tool-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  color: #1e293b;
  transition: all 0.2s;
}
.related-tool-card:hover {
  background: #2563eb;
  color: white;
  border-color: #2563eb;
}
.related-tool-card .tool-icon {
  font-size: 1.2rem;
}

/* Search Button */
.search-btn {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background 0.2s;
}
.search-btn:hover {
  background: rgba(255,255,255,0.1);
}

/* Search Modal */
.search-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
}
.search-modal-content {
  background: white;
  margin: 10% auto;
  padding: 2rem;
  width: 90%;
  max-width: 600px;
  border-radius: 10px;
  position: relative;
}
.search-close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  font-size: 2rem;
  cursor: pointer;
  color: #666;
}
.search-close:hover {
  color: #000;
}
.search-modal-content h2 {
  margin: 0 0 1rem 0;
  color: #1e293b;
}
.search-modal-content input {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  outline: none;
  box-sizing: border-box;
}
.search-modal-content input:focus {
  border-color: #2563eb;
}
.search-results {
  margin-top: 1rem;
  max-height: 400px;
  overflow-y: auto;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  text-decoration: none;
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
  transition: background 0.2s;
}
.search-result-item:hover {
  background: #f8fafc;
}
.search-result-type {
  background: #2563eb;
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: uppercase;
}
.search-result-title {
  font-weight: 500;
}

/* ========================================
   RTL Support for Arabic Language
   ======================================== */

/* RTL Base Layout */
[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .site-header .container {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-menu {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-dropdown > .nav-link::after {
  margin-left: 0;
  margin-right: 0.4rem;
}

[dir="rtl"] .nav-dropdown-menu {
  left: auto;
  right: 0;
}

[dir="rtl"] .nav-dropdown-menu a {
  text-align: right;
}

[dir="rtl"] .hero {
  text-align: right;
}

[dir="rtl"] .hero-stats {
  flex-direction: row-reverse;
}

[dir="rtl"] .tools-grid {
  direction: rtl;
}

[dir="rtl"] .tool-card {
  text-align: right;
}

[dir="rtl"] .tool-card .tool-usage {
  text-align: left;
}

[dir="rtl"] .sidebar {
  order: -1;
}

[dir="rtl"] .content-area {
  flex-direction: row-reverse;
}

[dir="rtl"] .article-meta {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .article-meta .article-category {
  margin-right: 0;
  margin-left: 0.5rem;
}

[dir="rtl"] .article-list {
  text-align: right;
}

[dir="rtl"] .article-card {
  text-align: right;
}

[dir="rtl"] .article-card .read-more {
  text-align: left;
}

[dir="rtl"] .footer {
  text-align: right;
}

[dir="rtl"] .footer-grid {
  flex-direction: row-reverse;
}

[dir="rtl"] .footer-list {
  text-align: right;
}

[dir="rtl"] .breadcrumb {
  flex-direction: row-reverse;
}

[dir="rtl"] .breadcrumb-item::after {
  content: "←";
  margin-left: 0;
  margin-right: 0.5rem;
}

[dir="rtl"] .breadcrumb-item:first-child::after {
  display: none;
}

[dir="rtl"] .sidebar-tools {
  text-align: right;
}

[dir="rtl"] .sidebar-tools a {
  text-align: right;
}

[dir="rtl"] .search-modal {
  direction: rtl;
}

[dir="rtl"] .search-input {
  text-align: right;
}

[dir="rtl"] .search-results {
  text-align: right;
}

[dir="rtl"] .lang-switcher {
  flex-direction: row-reverse;
}

[dir="rtl"] .related-tools {
  text-align: right;
}

[dir="rtl"] .related-tools-grid {
  direction: rtl;
}

[dir="rtl"] .educational-content {
  text-align: right;
}

[dir="rtl"] .faq-section {
  text-align: right;
}

[dir="rtl"] .faq-answer {
  text-align: right;
}

[dir="rtl"] table {
  direction: rtl;
}

[dir="rtl"] table th,
[dir="rtl"] table td {
  text-align: right;
}

[dir="rtl"] .stat {
  text-align: right;
}

[dir="rtl"] blockquote {
  border-left: none;
  border-right: 4px solid #3b82f6;
  padding-left: 0;
  padding-right: 1rem;
  text-align: right;
}

[dir="rtl"] .mobile-nav {
  direction: rtl;
}

[dir="rtl"] .mobile-nav a {
  text-align: right;
}

[dir="rtl"] .tool-content {
  text-align: right;
}

[dir="rtl"] .calculator-form {
  text-align: right;
}

[dir="rtl"] .calculator-form label {
  text-align: right;
}

[dir="rtl"] .calculator-result {
  text-align: right;
}

[dir="rtl"] .category-list {
  text-align: right;
}

[dir="rtl"] .category-list li {
  text-align: right;
}

[dir="rtl"] .trust-badge {
  flex-direction: row-reverse;
}

[dir="rtl"] .hero h1,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6 {
  text-align: right;
}

[dir="rtl"] .article-content p,
[dir="rtl"] .article-content li,
[dir="rtl"] .article-content ul,
[dir="rtl"] .article-content ol {
  text-align: right;
}

[dir="rtl"] .article-content code,
[dir="rtl"] .article-content pre {
  direction: ltr;
  text-align: left;
}

[dir="rtl"] .pagination {
  flex-direction: row-reverse;
}
