/* ArabCalculators.com - Gulf Emerald & Gold Theme with RTL/LTR Support */
:root {
  --primary: #006C35;
  --primary-dark: #004d25;
  --primary-light: #e8f5ec;
  --gold: #c59b27;
  --gold-light: #fef9e7;
  --gold-dark: #9a7617;
  --text-main: #1f2937;
  --text-muted: #4b5563;
  --bg-page: #f9fafb;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --border-focus: #006C35;
  --success: #059669;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", Tahoma, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

[dir="ltr"] {
  text-align: left;
  direction: ltr;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #ffffff;
  padding: 16px 0;
  border-bottom: 3px solid var(--gold);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.site-logo {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.site-logo span.tag {
  background: var(--gold);
  color: #002D15;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.header-nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  transition: background 0.2s;
}

.header-nav a:hover {
  background: rgba(255, 255, 255, 0.15);
}

.lang-switch {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: 4px 12px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.lang-switch:hover {
  background: var(--gold);
  color: #002D15;
}

/* Country Pill Nav */
.country-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  overflow-x: auto;
  white-space: nowrap;
}

.country-nav {
  display: flex;
  gap: 10px;
  padding-bottom: 4px;
}

.country-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.country-pill:hover, .country-pill.active {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 14px 0 6px 0;
  font-size: 14px;
  color: var(--text-muted);
}

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

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span.sep {
  margin: 0 6px;
  color: #9ca3af;
}

/* Main Content Layout */
.main-wrapper {
  padding: 24px 0 48px 0;
}

.page-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 12px;
  line-height: 1.3;
}

.page-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Forms & Inputs */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  outline: none;
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(0, 108, 53, 0.15);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(0, 108, 53, 0.3);
}

/* Result Box */
.result-box {
  background: linear-gradient(135deg, var(--primary-light) 0%, #ffffff 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px;
  margin: 20px 0;
  text-align: center;
}

.result-box .label {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.result-box .big-value {
  font-size: 38px;
  font-weight: 900;
  color: var(--primary);
  margin: 8px 0;
}

.result-box .currency {
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-dark);
}

.result-box .subtext {
  font-size: 14px;
  color: var(--text-muted);
}

/* Data Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 16px 0;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: inherit;
}

table.data-table th {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 2px solid var(--border);
  font-size: 14px;
}

table.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

table.data-table tr:hover {
  background: #f8fafc;
}

/* Grid of Cards */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.hub-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

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

.hub-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.hub-card p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.hub-card .badge {
  align-self: flex-start;
  margin-top: 14px;
  background: var(--gold-light);
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
}

/* Content & Law References */
.content-section {
  margin: 28px 0;
}

.content-section h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 12px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 6px;
}

.content-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin: 18px 0 8px 0;
}

.content-section p {
  margin-bottom: 14px;
  color: #374151;
}

.content-section ul, .content-section ol {
  margin: 12px 24px;
}

.content-section li {
  margin-bottom: 8px;
}

.law-quote {
  background: var(--gold-light);
  border-right: 4px solid var(--gold);
  padding: 16px 20px;
  border-radius: 6px;
  margin: 16px 0;
  font-style: normal;
  color: #5c4308;
}

[dir="ltr"] .law-quote {
  border-right: none;
  border-left: 4px solid var(--gold);
}

/* AdSense Container */
.ad-slot {
  margin: 24px auto;
  text-align: center;
  min-height: 90px;
  background: #fdfdfd;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  padding: 10px;
  overflow: hidden;
}

/* FAQ Accordion */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.faq-question {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 6px;
}

.faq-answer {
  font-size: 15px;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: #111827;
  color: #9ca3af;
  padding: 48px 0 24px 0;
  border-top: 4px solid var(--primary);
  font-size: 14px;
}

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

.footer-col h4 {
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

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

.footer-col li {
  margin-bottom: 8px;
}

.footer-col a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-bottom {
  border-top: 1px solid #1f2937;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.partner-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.partner-links a {
  color: #6b7280;
  text-decoration: none;
  font-size: 12px;
}

.partner-links a:hover {
  color: var(--gold);
}

/* Responsive */
@media (max-width: 768px) {
  .page-title {
    font-size: 22px;
  }
  .result-box .big-value {
    font-size: 30px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
}
