/* 7asba Calculator Web Application - Strict Light Minimalist Design */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-app: #f9fafb;
  --bg-card: #ffffff;
  --border-subtle: #e5e7eb;
  --border-focus: #93c5fd;
  --text-main: #111827;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --success-bg: #ecfdf5;
  --success-text: #065f46;
  --warning-bg: #fffbeb;
  --warning-text: #92400e;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  --ad-height: 100px;
}

/* Global Typography & Reset */
html {
  font-size: 15px;
}

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html[lang="ar"] body {
  font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  letter-spacing: 0;
}

html[lang="fr"] body,
html[lang="en"] body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Navbar */
.navbar-7asba {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.brand-logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text-main);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-logo:hover {
  color: var(--primary-color);
}

.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  background-color: #eff6ff;
  color: var(--primary-color);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* Cards & Panels */
.calc-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
}

.calc-grid-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 1rem;
  height: 100%;
  transition: border-color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.calc-grid-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-1px);
  color: inherit;
}

/* Compact Forms & Inputs (Strictly small form-control-sm) */
.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.25rem;
}

.form-control-sm,
.form-select-sm {
  border-color: var(--border-subtle);
  font-size: 0.85rem;
  padding: 0.35rem 0.6rem;
  border-radius: 5px;
}

.form-control-sm:focus,
.form-select-sm:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Results Display Card */
.result-box {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 1rem;
}

.result-metric-primary {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.result-comment-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  display: inline-block;
}

.badge-info-subtle {
  background-color: #eff6ff;
  color: #1e40af;
  border: 1px solid #dbeafe;
}

.badge-success-subtle {
  background-color: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-warning-subtle {
  background-color: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-danger-subtle {
  background-color: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* AdSense Slot (Zero Cumulative Layout Shift - CLS) */
.adsense-container {
  width: 100%;
  min-height: var(--ad-height);
  height: var(--ad-height);
  background-color: #fafafa;
  border: 1px dashed #e2e8f0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
  position: relative;
  overflow: hidden;
}

.adsense-label {
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Article / Explanation Section (Bottom) */
.article-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 1.5rem;
}

.article-section h2 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1f2937;
}

.article-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.article-section p,
.article-section li {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #4b5563;
}

/* Category Filter Tabs */
.nav-pills-7asba .nav-link {
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 5px;
  border: 1px solid transparent;
}

.nav-pills-7asba .nav-link.active,
.nav-pills-7asba .nav-link:hover {
  color: var(--primary-color);
  background-color: #eff6ff;
  border-color: #dbeafe;
}

/* Language Switcher Dropdown */
.lang-btn {
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  background-color: #ffffff;
  color: var(--text-main);
}

.lang-btn:hover {
  background-color: #f8fafc;
}

/* Quick Search input */
.search-input-box {
  background-color: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  font-size: 0.85rem;
  padding: 0.4rem 0.75rem;
}

.search-input-box:focus {
  background-color: #ffffff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

/* Footer */
footer {
  margin-top: auto;
  background-color: #ffffff;
  border-top: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
}

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