:root {
  --gold: #F5A623; --gold-dark: #C8820A;
  --black: #111; --surface: #1A1A1A; --surface2: #242424;
  --border: rgba(255,255,255,0.08); --text: #F0EDE6; --muted: #888;
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Barlow', sans-serif; background: var(--black); color: var(--text); min-height: 100vh; }
.gold { color: var(--gold); }
em { color: var(--gold); font-style: normal; }

nav { position: sticky; top: 0; z-index: 100; background: rgba(17,17,17,0.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); padding: 0 2rem; display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { font-family: 'Barlow Condensed', sans-serif; font-size: 1.5rem; font-weight: 800; color: var(--text); text-decoration: none; }
.logo span { color: var(--gold); }
.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.03em; transition: color 0.2s; }
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.lang-select { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 6px 12px; border-radius: 6px; font-family: 'Barlow', sans-serif; font-size: 0.85rem; cursor: pointer; }

.hero { background: linear-gradient(135deg, #111 0%, #1c1008 50%, #111 100%); padding: 5rem 2rem 4rem; text-align: center; border-bottom: 1px solid var(--border); }
.hero-eyebrow { font-family: 'Barlow Condensed', sans-serif; font-size: 0.85rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.hero h1 { font-family: 'Barlow Condensed', sans-serif; font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 800; line-height: 1; margin-bottom: 1.25rem; }
.hero-sub { color: var(--muted); font-size: 1.1rem; max-width: 540px; margin: 0 auto 2.5rem; line-height: 1.6; }
.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-gold { background: var(--gold); color: var(--black); border: none; padding: 0.8rem 2rem; font-family: 'Barlow Condensed', sans-serif; font-size: 1rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border-radius: var(--radius); cursor: pointer; text-decoration: none; display: inline-block; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid var(--border); padding: 0.8rem 2rem; font-family: 'Barlow Condensed', sans-serif; font-size: 1rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; border-radius: var(--radius); cursor: pointer; text-decoration: none; transition: border-color 0.2s, color 0.2s; display: inline-block; }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.stats-strip { display: flex; justify-content: center; align-items: stretch; background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat-item { flex: 1; max-width: 220px; padding: 2rem 1rem; text-align: center; border-right: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.4rem; }
.stat-item:last-child { border-right: none; }
.stat-number { font-family: 'Barlow Condensed', sans-serif; font-size: 2.6rem; font-weight: 800; color: var(--gold); line-height: 1; }
.stat-text { font-size: 0.75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }

.catalog-header { padding: 2.5rem 2rem 1.5rem; border-bottom: 1px solid var(--border); }
.catalog-header h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 2rem; font-weight: 800; margin-bottom: 1.25rem; }
.filter-bar { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.filter-btn { background: var(--surface2); border: 1px solid var(--border); color: var(--muted); padding: 0.45rem 1.1rem; border-radius: 100px; font-family: 'Barlow', sans-serif; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.2s; }
.filter-btn:hover { border-color: var(--gold); color: var(--gold); }
.filter-btn.active { background: var(--gold); color: var(--black); border-color: var(--gold); font-weight: 600; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1px; background: var(--border); }
.tool-card { background: var(--black); cursor: pointer; transition: background 0.2s; position: relative; overflow: hidden; display: flex; flex-direction: column; }
.tool-card:hover { background: var(--surface); }
.tool-card img { width: 100%; aspect-ratio: unset; object-fit: contain; width: 100%; height: 220px; display: block; background: var(--surface2); }
.card-body { padding: 1rem; }
.card-cat { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.3rem; }
.card-name { font-family: 'Barlow Condensed', sans-serif; font-size: 1.1rem; font-weight: 700; color: var(--text); }
.card-overlay { position: absolute; inset: 0; background: rgba(245,166,35,0.06); display: flex; align-items: flex-end; padding: 1rem; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
.tool-card:hover .card-overlay { opacity: 1; }
.card-overlay span { font-family: 'Barlow Condensed', sans-serif; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); border-bottom: 1px solid var(--gold); }

.pagination { display: flex; justify-content: center; gap: 0.5rem; padding: 2rem 1rem; flex-wrap: wrap; }
.pagination button { background: var(--surface2); border: 1px solid var(--border); color: var(--text); padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; font-family: 'Barlow Condensed', sans-serif; font-size: 1rem; font-weight: 600; transition: all 0.2s; min-width: 2.5rem; }
.pagination button:hover { border-color: var(--gold); color: var(--gold); }
.pagination button.active { background: var(--gold); color: var(--black); border-color: var(--gold); }
.pagination button:disabled { opacity: 0.3; cursor: not-allowed; }

.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 1000; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; max-width: 700px; width: 100%; max-height: 90vh; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; }
.modal img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px 0 0 14px; }
.modal-body { padding: 1.75rem; }
.modal-cat { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; }
.modal-title { font-family: 'Barlow Condensed', sans-serif; font-size: 1.75rem; font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
.modal-desc { color: var(--muted); font-size: 0.95rem; line-height: 1.6; margin-bottom: 1.25rem; }
.modal-specs { list-style: none; }
.modal-specs li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; }
.modal-specs li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.modal-close { display: block; margin-top: 1.5rem; width: 100%; background: var(--gold); color: var(--black); border: none; padding: 0.7rem 1.5rem; font-family: 'Barlow Condensed', sans-serif; font-size: 0.95rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; border-radius: 8px; cursor: pointer; }
.modal-close:hover { background: var(--gold-dark); }

.contact-page { max-width: 960px; margin: 0 auto; padding: 3rem 2rem; }
.contact-eyebrow { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.5rem; }
.contact-page h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 2.5rem; font-weight: 800; margin-bottom: 0.5rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 2rem; margin-top: 2.5rem; }
.contact-info { display: flex; flex-direction: column; gap: 1.5rem; }
.info-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.info-label { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; }
.info-value { font-size: 1rem; color: var(--text); line-height: 1.5; }
.map-wrap { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map-wrap iframe { display: block; width: 100%; height: 400px; border: 0; }

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

[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .filter-bar { flex-direction: row-reverse; }
[dir="rtl"] .card-body, [dir="rtl"] .modal-body, [dir="rtl"] .info-value { text-align: right; }
[dir="rtl"] .modal img { border-radius: 0 14px 14px 0; }
[dir="rtl"] .modal-specs li { flex-direction: row-reverse; }
[dir="rtl"] .contact-grid { direction: rtl; }

@media (max-width: 640px) {
  .nav-links { gap: 1rem; }
  .hero { padding: 3rem 1rem 2.5rem; }
  .stats-strip { flex-wrap: wrap; }
  .stat-item { flex: 1 1 50%; max-width: 50%; border-right: none; border-bottom: 1px solid var(--border); padding: 1.5rem 1rem; }
  .modal { grid-template-columns: 1fr; }
  .modal img { border-radius: 14px 14px 0 0; aspect-ratio: 4/3; }
  .contact-grid { grid-template-columns: 1fr; }
}

/* --- LIGHT MODE OVERRIDES --- */
body.light-mode {
  background-color: #f4f6f8;
  color: #1a1a1a;
}
body.light-mode nav {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
body.light-mode nav a, body.light-mode .logo {
  color: #1a1a1a;
}
body.light-mode .tool-card, 
body.light-mode .info-card {
  background-color: #ffffff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid #e0e0e0;
}
body.light-mode .card-desc,
body.light-mode .info-label {
  color: #666 !important;
}
body.light-mode .card-name,
body.light-mode .info-value,
body.light-mode h2,
body.light-mode .catalog-title {
  color: #1a1a1a;
}
body.light-mode footer {
  background-color: #e9ecef;
  color: #495057;
  border-top: 1px solid #ddd;
}
body.light-mode .filter-btn {
  background-color: #e9ecef;
  color: #1a1a1a;
}
body.light-mode .filter-btn:hover,
body.light-mode .filter-btn.active {
  background-color: #f39c12; /* Keeps the gold active state */
  color: #fff;
}
body.light-mode select.lang-select,
body.light-mode #search-box {
  background-color: #ffffff;
  color: #1a1a1a;
  border: 1px solid #ccc;
}
body.light-mode .contact-page, 
body.light-mode .contact-grid {
  background-color: transparent;
}