/* CalcIL - Israeli Financial Calculators CSS */

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --primary-color: #1e40af;
  --primary-light: #3b82f6;
  --primary-dark: #1e3a8a;
  --secondary-color: #059669;
  --accent-color: #f59e0b;
  --text-dark: #1f2937;
  --text-gray: #6b7280;
  --text-light: #9ca3af;
  --bg-white: #ffffff;
  --bg-light: #f9fafb;
  --bg-gray: #f3f4f6;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --error-color: #ef4444;
  --warning-color: #f59e0b;

  /* Spacing */
  --container-max-width: 1200px;
  --section-padding: 4rem 0;
  --card-padding: 2rem;

  /* Typography */
  --font-family: "Assistant", "Arial", sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* Dark mode variables */
[data-theme="dark"] {
  --primary-color: #3b82f6;
  --primary-light: #60a5fa;
  --primary-dark: #2563eb;
  --secondary-color: #10b981;
  --accent-color: #fbbf24;
  --text-dark: #f9fafb;
  --text-gray: #d1d5db;
  --text-light: #9ca3af;
  --bg-white: #1f2937;
  --bg-light: #111827;
  --bg-gray: #374151;
  --border-color: #4b5563;
  --success-color: #10b981;
  --error-color: #f87171;
  --warning-color: #fbbf24;

  /* Dark mode shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.2);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.5);
}

/* Dark mode specific overrides */
[data-theme="dark"] .calculator-card,
[data-theme="dark"] .card,
[data-theme="dark"] .form-card {
  background: var(--bg-light);
  border-color: var(--border-color);
}

[data-theme="dark"] .result-card {
  background: var(--bg-gray);
  border-color: var(--border-color);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--bg-gray);
  border-color: var(--border-color);
  color: var(--text-dark);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
  border-color: var(--primary-color);
  background: var(--bg-white);
}

[data-theme="dark"] .btn-primary {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

[data-theme="dark"] .footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .hero {
  background: var(--bg-light);
}

[data-theme="dark"] .hero-content h1,
[data-theme="dark"] .hero-content p {
  color: var(--text-dark);
}

[data-theme="dark"] .stats {
  background: var(--bg-gray);
}

[data-theme="dark"] .calculator-grid .calculator-card:hover {
  background: var(--bg-gray);
  transform: translateY(-2px);
}

[data-theme="dark"] .breadcrumb a {
  color: var(--text-gray);
}

[data-theme="dark"] .breadcrumb a:hover {
  color: var(--primary-color);
}

/* Additional dark mode styling for better visual contrast */
[data-theme="dark"] .header {
  background: var(--bg-white);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .nav-menu a {
  color: var(--text-dark);
}

[data-theme="dark"] .nav-menu a:hover {
  color: var(--primary-color);
}

[data-theme="dark"] .dropdown-menu {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

[data-theme="dark"] .dropdown-menu a {
  color: var(--text-dark);
}

[data-theme="dark"] .dropdown-menu a:hover {
  background: var(--bg-gray);
}

[data-theme="dark"] .mobile-menu {
  background: var(--bg-white);
  border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .hero-stats .stat-number {
  color: var(--primary-color);
}

[data-theme="dark"] .section-title,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3 {
  color: var(--text-dark);
}

/* Dark mode cookie notice */
[data-theme="dark"] .cookie-notice {
  background: #1f2937;
  color: #f9fafb;
  border-top: 1px solid #374151;
}

[data-theme="dark"] .cookie-content p {
  color: #e5e7eb;
}

[data-theme="dark"] .btn-accept {
  background: var(--accent-color);
  color: #1f2937;
}

[data-theme="dark"] .btn-accept:hover {
  background: #fbbf24;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-white);
  transition: background-color 0.3s, color 0.3s;
}

/* Ensure all major elements transition smoothly */
* {
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

/* Dark mode body background is handled by the CSS variables above */

/* RTL Support */
[dir="rtl"] {
  text-align: right;
}

[dir="ltr"] {
  text-align: left;
}

/* Container */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 2rem;
  }
}

/* Advertisement Styles */
.ad-container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 1rem;
  position: relative;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 90px;
}

.ad-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.ad-footer {
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
}

/* Ensure AdSense ads display properly */
.adsbygoogle {
  display: block !important;
  min-height: 90px;
  background: transparent;
}

.ad-label {
  font-size: var(--font-size-xs);
  color: var(--text-light);
  text-align: center;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.adsbygoogle {
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-light);
}

/* Ad placeholder for development */
.ad-placeholder {
  background: var(--bg-gray);
  border: 2px dashed var(--border-color);
  color: var(--text-gray);
  font-size: var(--font-size-sm);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.ad-placeholder:hover {
  background: var(--bg-light);
  border-color: var(--text-light);
}

/* Responsive ad containers */
@media (max-width: 768px) {
  .ad-container {
    padding: 0.75rem;
  }

  .ad-header {
    margin-bottom: 1rem;
  }

  .ad-footer {
    margin-top: 1.5rem;
  }
}

/* Dark theme ad styles */
[data-theme="dark"] .ad-container {
  border-color: #374151;
}

[data-theme="dark"] .ad-header {
  border-bottom-color: #374151;
}

[data-theme="dark"] .ad-footer {
  border-top-color: #374151;
}

[data-theme="dark"] .adsbygoogle {
  background: #1f2937;
}

[data-theme="dark"] .ad-placeholder {
  background: #1f2937;
  border-color: #374151;
  color: #9ca3af;
}

[data-theme="dark"] .ad-placeholder:hover {
  background: #111827;
  border-color: #6b7280;
}

/* Header Styles */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo-text {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.logo-highlight {
  color: var(--accent-color);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-menu a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--primary-color);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-white);
  box-shadow: var(--shadow-lg);
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  list-style: none;
}

[dir="rtl"] .dropdown-menu {
  left: auto;
  right: 0;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  padding: 0;
}

.dropdown-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-dark);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.dropdown-menu a:hover {
  background-color: var(--bg-light);
  color: var(--primary-color);
}

.dropdown-category {
  padding: 0.5rem 1rem 0.25rem 1rem !important;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.25rem;
}

.dropdown-category strong {
  color: var(--text-gray);
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.dropdown-separator {
  height: 1px;
  background-color: var(--border-color);
  margin: 0.5rem 0;
}

.view-all-link {
  color: var(--primary-color) !important;
  font-weight: 600;
  font-style: italic;
}

.dropdown-menu {
  max-height: 70vh;
  overflow-y: auto;
  min-width: 280px;
}

/* Smooth scrolling for category navigation */
html {
  scroll-behavior: smooth;
}

.category-section {
  scroll-margin-top: 100px; /* Account for fixed header */
}

.category-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Language Selector */
.lang-selector {
  position: relative;
}

.lang-current {
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  border: none;
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-current:hover {
  background: var(--primary-dark);
}

.lang-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  min-width: 140px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  margin: 0;
  padding: 0;
  list-style: none;
}

.lang-selector.show .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  color: var(--text-dark);
  text-decoration: none;
  font-size: var(--font-size-sm);
  transition: background-color 0.2s ease;
}

.lang-option:hover {
  background: var(--bg-light);
}

.flag {
  font-size: 1rem;
}

.lang-name {
  white-space: nowrap;
}

.dropdown-arrow {
  margin-left: auto;
  transition: transform 0.3s ease;
}

.lang-selector.show .dropdown-arrow {
  transform: rotate(180deg);
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 2px solid var(--border-color);
  color: var(--text-dark);
  padding: 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.theme-toggle:hover {
  background: var(--bg-light);
  border-color: var(--primary-color);
}

.theme-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
  z-index: 1001;
  position: relative;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  margin: 3px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Mobile Menu Button Active State */
.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(45deg) translate(-6px, -6px);
}

/* Main Content */
.main-content {
  padding-top: 0;
}

/* Hero Section */
.hero {
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--primary-light) 100%
  );
  color: white;
  padding: var(--section-padding);
  text-align: center;
}

.hero h1 {
  font-size: var(--font-size-4xl);
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: var(--font-size-xl);
  margin-bottom: 3rem;
  opacity: 0.9;
}

/* Calculator Grid */
.calculator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.calculator-card {
  background: var(--bg-white);
  border-radius: 1rem;
  padding: var(--card-padding);
  box-shadow: var(--shadow-lg);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}

.calculator-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.calculator-card.popular::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--accent-color),
    var(--secondary-color)
  );
}

.popular-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--accent-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
}

[dir="rtl"] .popular-badge {
  right: auto;
  left: 1rem;
}

.calc-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.calculator-card h3 {
  color: var(--text-dark);
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.calculator-card p {
  color: var(--text-gray);
  margin-bottom: 1.5rem;
}

/* Buttons */
.btn-primary {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--primary-light)
  );
  color: white;
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 0.5rem;
  font-size: var(--font-size-base);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: linear-gradient(
    135deg,
    var(--primary-dark),
    var(--primary-color)
  );
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary.loading {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-size: var(--font-size-base);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
}

/* Features Section */
.features {
  padding: var(--section-padding);
  background: var(--bg-light);
}

.features h2 {
  text-align: center;
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text-dark);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.feature {
  background: var(--bg-white);
  padding: var(--card-padding);
  border-radius: 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.feature p {
  color: var(--text-gray);
  line-height: 1.6;
}

/* Calculator Page Styles */
.calculator-page {
  padding: var(--section-padding);
  background: var(--bg-light);
}

.calculator-header {
  text-align: center;
  margin-bottom: 3rem;
}

.calculator-header h1 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.calculator-header p {
  font-size: var(--font-size-lg);
  color: var(--text-gray);
  max-width: 600px;
  margin: 0 auto;
}

.calculator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

.calculator-form {
  background: var(--bg-white);
  padding: var(--card-padding);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}

.calculator-results {
  background: var(--bg-white);
  padding: var(--card-padding);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}

.calc-form .form-group {
  margin-bottom: 1.5rem;
}

.calc-form .form-row,
.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.calc-form label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.calc-form input,
.calc-form select,
.calc-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: var(--font-size-base);
  transition: border-color 0.3s ease;
}

.calc-form input:focus,
.calc-form select:focus,
.calc-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.calc-btn {
  width: 100%;
  margin-top: 1rem;
}

.result-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 0.5rem;
  border-left: 4px solid var(--border-color);
}

.result-item.highlight {
  background: linear-gradient(
    135deg,
    var(--primary-color) 10,
    var(--primary-light) 10
  );
  border-left-color: var(--primary-color);
}

.result-item .label {
  font-weight: 600;
  color: var(--text-dark);
}

.result-item .value {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--primary-color);
}

.disclaimer {
  background: var(--bg-gray);
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: var(--font-size-sm);
  color: var(--text-gray);
  border-left: 4px solid var(--warning-color);
}

/* Page Content Styles */
.page-content,
.main-content,
.calculator-page {
  padding: var(--section-padding);
  background: var(--bg-light);
  min-height: calc(100vh - 200px);
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-header h1 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.page-header p {
  font-size: var(--font-size-lg);
  color: var(--text-gray);
  max-width: 600px;
  margin: 0 auto;
}

.content-wrapper {
  max-width: 800px;
  margin: 0 auto;
  background: var(--bg-white);
  padding: var(--card-padding);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}

.content-section {
  margin-bottom: 3rem;
}

.content-section h2 {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.content-section p {
  color: var(--text-gray);
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Values Grid */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.value-item {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-light);
  border-radius: 0.5rem;
}

.value-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.value-item h3 {
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.contact-form {
  background: var(--bg-white);
  padding: var(--card-padding);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}

.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: block;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: var(--font-size-base);
  color: var(--text-dark);
  background-color: var(--bg-white);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form .calc-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.875rem 2rem;
  font-weight: 600;
}

/* reCAPTCHA notice styling */
.recaptcha-notice {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 1rem;
  line-height: 1.4;
}

.recaptcha-notice a {
  color: var(--primary-color);
  text-decoration: none;
}

.recaptcha-notice a:hover {
  text-decoration: underline;
}

.contact-info-section {
  background: var(--bg-white);
  padding: var(--card-padding);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
}

.contact-icon {
  font-size: 2rem;
  margin-right: 1rem;
  width: 3rem;
  text-align: center;
}

[dir="rtl"] .contact-icon {
  margin-right: 0;
  margin-left: 1rem;
}

.contact-details h4 {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.contact-details p {
  color: var(--text-gray);
  margin: 0;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
  align-items: start;
}

@media (max-width: 768px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.form-description {
  color: var(--text-gray);
  margin-bottom: 1.5rem;
  font-size: var(--font-size-sm);
}

.contact-form-section h2 {
  color: var(--text-dark);
  margin-bottom: 1rem;
  font-size: var(--font-size-2xl);
}

.contact-info-section h2 {
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  font-size: var(--font-size-2xl);
}

/* FAQ Styles */
.faq-section {
  margin-top: 3rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.faq-item {
  background: var(--bg-white);
  padding: 1.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-sm);
}

.faq-item h4 {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.faq-item p {
  color: var(--text-gray);
  margin: 0;
}

/* Alert Messages */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  border-left: 4px solid;
}

.alert-success {
  background: var(--success-color) 20;
  border-left-color: var(--success-color);
  color: var(--success-color);
}

.alert-error {
  background: var(--error-color) 20;
  border-left-color: var(--error-color);
  color: var(--error-color);
}

/* Privacy & Terms */
.privacy-section,
.terms-section {
  margin-bottom: 2rem;
}

.privacy-section h2,
.terms-section h2 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.last-updated {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  font-style: italic;
}

/* Table Styles */
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  background: var(--bg-white);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.breakdown-table th,
.breakdown-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

[dir="rtl"] .breakdown-table th,
[dir="rtl"] .breakdown-table td {
  text-align: right;
}

.breakdown-table th {
  background: var(--bg-gray);
  font-weight: 600;
  color: var(--text-dark);
}

.breakdown-table td {
  color: var(--text-gray);
}

/* Footer Styles */
.btn-primary {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-block;
  background: var(--bg-white);
  color: var(--primary-color);
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--primary-color);
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
}

/* Features Section */
.features {
  padding: var(--section-padding);
  background: var(--bg-light);
}

.features h2 {
  text-align: center;
  font-size: var(--font-size-3xl);
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text-dark);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.feature {
  text-align: center;
  padding: 2rem;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature h3 {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.feature p {
  color: var(--text-gray);
}

/* Ad Section */
.ad-section {
  padding: 2rem 0;
}

.ad-banner {
  text-align: center;
  margin: 2rem 0;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: var(--font-size-base);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgb(59 130 246 / 0.1);
}

.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  background: var(--bg-white);
  font-size: var(--font-size-base);
  cursor: pointer;
}

/* Results Display */
.results-section {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: 1rem;
  margin-top: 2rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-white);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.result-label {
  font-weight: 600;
  color: var(--text-dark);
}

.result-value {
  font-weight: 700;
  color: var(--primary-color);
  font-size: var(--font-size-lg);
}

.result-highlight {
  background: var(--primary-color);
  color: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  text-align: center;
}

.result-highlight .result-value {
  color: white;
  font-size: var(--font-size-2xl);
}

/* Footer */
.footer {
  background: var(--text-dark);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  margin-bottom: 1rem;
  color: white;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.social-links {
  margin-top: 1rem;
}

.social-link {
  display: inline-block;
  margin: 0 0.5rem;
  font-size: 1.5rem;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.social-link:hover {
  transform: scale(1.2);
}

.contact-info p {
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--accent-color);
}

.stat-label {
  font-size: var(--font-size-sm);
  color: var(--text-light);
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1rem;
  text-align: center;
}

.footer-bottom-content {
  color: var(--text-light);
}

.disclaimer {
  font-size: var(--font-size-sm);
  margin-top: 0.5rem;
}

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  font-size: var(--font-size-xl);
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
  z-index: 1000;
}

[dir="rtl"] .back-to-top {
  right: auto;
  left: 2rem;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Cookie Notice */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--text-dark);
  color: white;
  padding: 1rem;
  z-index: 1001;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-max-width);
  margin: 0 auto;
  gap: 1rem;
}

.cookie-content p {
  margin: 0;
  font-size: var(--font-size-sm);
  flex: 1;
}

.btn-accept {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-accept:hover {
  background: var(--warning-color);
}

/* Ad Placement Styles */
.ad-section {
  padding: 2rem 0;
  text-align: center;
}

.ad-banner {
  max-width: 728px;
  margin: 0 auto;
  background: var(--bg-gray);
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

/* Loading States */
.loading::after {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

[dir="rtl"] .loading::after {
  margin-left: 0;
  margin-right: 0.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  :root {
    --section-padding: 2rem 0;
    --card-padding: 1.5rem;
  }

  .container {
    padding: 0 1rem;
  }

  /* Mobile Navigation */
  .navbar {
    position: relative;
  }

  .mobile-menu-btn {
    display: flex;
    z-index: 1001;
  }

  /* Mobile Menu Overlay */
  .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
  }

  /* Prevent body scroll when mobile menu is open */
  body.menu-open {
    overflow: hidden;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for better mobile support */
    background: var(--bg-white);
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    padding: 5rem 2rem 2rem;
    box-shadow: var(--shadow-xl);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  [dir="rtl"] .nav-menu {
    left: auto;
    right: -100%;
    transition: right 0.3s ease;
  }

  .nav-menu.active {
    left: 0;
  }

  [dir="rtl"] .nav-menu.active {
    right: 0;
  }

  .nav-menu li {
    width: 100%;
    margin-bottom: 1rem;
  }

  .nav-menu a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: var(--bg-light);
    margin-top: 0.5rem;
  }

  .theme-controls {
    margin-top: 2rem;
    flex-direction: row;
    justify-content: center;
  }

  .lang-toggle {
    margin-top: 0;
  }

  /* Mobile Hero */
  .hero {
    padding: 3rem 0;
    text-align: center;
  }

  .hero h1 {
    font-size: var(--font-size-3xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-lg);
    margin-bottom: 2rem;
  }

  /* Mobile Calculator Grid */
  .calculator-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  .calculator-card {
    padding: 1.5rem;
  }

  /* Mobile Features */
  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature {
    padding: 1.5rem;
  }

  /* Mobile Calculator Pages */
  .calculator-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .calc-form .form-row,
  .contact-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* Mobile Contact */
  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .contact-item {
    margin-bottom: 1.5rem;
  }

  .contact-form-section,
  .contact-info-section {
    margin-bottom: 2rem;
  }

  .contact-icon {
    margin-right: 0;
    margin-bottom: 0.5rem;
  }

  [dir="rtl"] .contact-icon {
    margin-left: 0;
    margin-bottom: 0.5rem;
  }

  /* Mobile Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Mobile Values Grid */
  .values-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile FAQ */
  .faq-grid {
    grid-template-columns: 1fr;
  }

  /* Mobile Cookie Notice */
  .cookie-content {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  /* Mobile Back to Top */
  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
  }

  [dir="rtl"] .back-to-top {
    right: auto;
    left: 1rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: var(--font-size-2xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-base);
  }

  .calculator-card {
    padding: 1rem;
  }

  .calc-icon {
    font-size: 2rem;
  }

  .content-wrapper {
    padding: 1.5rem;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .stat-number {
    font-size: var(--font-size-xl);
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .back-to-top,
  .cookie-notice,
  .ad-section {
    display: none;
  }

  .main-content,
  .calculator-page,
  .page-content {
    padding: 0;
    background: var(--bg-white);
  }

  .calculator-container {
    display: block;
  }

  .calculator-form {
    display: none;
  }

  .calculator-results {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* Error Page Styles */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.error-content {
  max-width: 500px;
  margin: 0 auto;
}

.error-icon {
  font-size: 4rem;
  margin-bottom: 2rem;
  opacity: 0.7;
}

.error-content h1 {
  font-size: var(--font-size-3xl);
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.error-content p {
  color: var(--text-gray);
  font-size: var(--font-size-lg);
  margin-bottom: 2rem;
}

.error-actions h3 {
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Coming Soon Styles */
.coming-soon-section {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.coming-soon-content {
  background: var(--bg-white);
  padding: var(--card-padding);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 3rem;
}

.coming-soon-icon {
  font-size: 4rem;
  margin-bottom: 2rem;
}

.coming-soon-content h2 {
  font-size: var(--font-size-3xl);
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.coming-soon-content p {
  color: var(--text-gray);
  font-size: var(--font-size-lg);
  margin-bottom: 2rem;
}

/* Guide Preview Cards */
.guides-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.guide-preview-card {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  text-align: center;
  position: relative;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.guide-preview-card:hover {
  opacity: 1;
}

.guide-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.guide-preview-card h3 {
  color: var(--text-dark);
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.guide-preview-card p {
  color: var(--text-gray);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.status-badge {
  display: inline-block;
  background: var(--accent-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: var(--font-size-xs);
  font-weight: 600;
}

/* Newsletter Signup */
.newsletter-signup {
  background: var(--bg-white);
  padding: var(--card-padding);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}

.newsletter-signup h3 {
  color: var(--text-dark);
  font-size: var(--font-size-xl);
  margin-bottom: 0.5rem;
}

.newsletter-signup p {
  color: var(--text-gray);
  margin-bottom: 2rem;
}

.newsletter-form .form-row {
  display: flex;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  font-size: var(--font-size-base);
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Animation Classes */
.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mt-1 {
  margin-top: 0.25rem;
}
.mt-2 {
  margin-top: 0.5rem;
}
.mt-3 {
  margin-top: 0.75rem;
}
.mt-4 {
  margin-top: 1rem;
}
.mt-5 {
  margin-top: 1.25rem;
}
.mt-6 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}
.mb-2 {
  margin-bottom: 0.5rem;
}
.mb-3 {
  margin-bottom: 0.75rem;
}
.mb-4 {
  margin-bottom: 1rem;
}
.mb-5 {
  margin-bottom: 1.25rem;
}
.mb-6 {
  margin-bottom: 1.5rem;
}

.p-1 {
  padding: 0.25rem;
}
.p-2 {
  padding: 0.5rem;
}
.p-3 {
  padding: 0.75rem;
}
.p-4 {
  padding: 1rem;
}
.p-5 {
  padding: 1.25rem;
}
.p-6 {
  padding: 1.5rem;
}

.hidden {
  display: none;
}

.visible {
  display: block;
}

/* Accessibility Improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 1002;
  border-radius: 0 0 4px 4px;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 0;
}

/* Focus Styles */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000080;
    --text-dark: #000000;
    --text-gray: #333333;
    --border-color: #666666;
    --bg-light: #f0f0f0;
  }

  [data-theme="dark"] {
    --primary-color: #4d94ff;
    --text-dark: #ffffff;
    --text-gray: #cccccc;
    --border-color: #888888;
    --bg-white: #000000;
    --bg-light: #111111;
  }
}

/* Dark Mode Support removed - using manual toggle instead */

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

[dir="rtl"] .back-to-top {
  right: auto;
  left: 2rem;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Cookie Notice */
.cookie-notice {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--text-dark);
  color: white;
  padding: 1rem;
  z-index: 1000;
}

.cookie-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-max-width);
  margin: 0 auto;
}

.btn-accept {
  background: var(--accent-color);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-weight: 600;
  margin-left: 1rem;
}

[dir="rtl"] .btn-accept {
  margin-left: 0;
  margin-right: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu {
    display: flex; /* Override the default none - mobile menu needs to be flex */
  }

  .mobile-menu-btn {
    display: flex;
  }

  .hero h1 {
    font-size: var(--font-size-3xl);
  }

  .hero-subtitle {
    font-size: var(--font-size-lg);
  }

  .calculator-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .btn-accept {
    margin: 1rem 0 0 0;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .calculator-card {
    padding: 1.5rem;
  }

  .hero {
    padding: 2rem 0;
  }

  .features {
    padding: 2rem 0;
  }
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .ad-section,
  .cookie-notice,
  .back-to-top {
    display: none;
  }

  .main-content {
    padding-top: 0;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --primary-color: #000080;
    --text-dark: #000000;
    --border-color: #000000;
  }
}

/* Calculator Specific Styles */
.calculator-section {
  padding: var(--section-padding);
  background: var(--bg-light);
}

.breadcrumb {
  margin-bottom: 2rem;
  color: var(--text-gray);
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

.calculator-header {
  text-align: center;
  margin-bottom: 3rem;
}

.calculator-header h1 {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.calculator-subtitle {
  font-size: var(--font-size-lg);
  color: var(--text-gray);
  margin-bottom: 1rem;
}

.last-updated {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  font-style: italic;
}

.calculator-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  max-width: 1000px;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .calculator-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.calculator-form-section {
  background: var(--bg-white);
  padding: var(--card-padding);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
}

.salary-calculator-form .form-group {
  margin-bottom: 1.5rem;
}

.calculate-btn {
  width: 100%;
  padding: 1rem;
  font-size: var(--font-size-lg);
  margin-top: 1rem;
}

.calculator-results-section {
  background: var(--bg-white);
  padding: var(--card-padding);
  border-radius: 1rem;
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 2rem;
}

.calculator-results-section h2 {
  margin-bottom: 2rem;
  color: var(--text-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.share-btn,
.print-btn {
  font-size: var(--font-size-sm);
  padding: 0.5rem 1rem;
  margin-left: 0.5rem;
}

[dir="rtl"] .share-btn,
[dir="rtl"] .print-btn {
  margin-left: 0;
  margin-right: 0.5rem;
}

.results-breakdown {
  margin: 2rem 0;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
  border-bottom: none;
}

.result-item.total {
  border-top: 2px solid var(--border-color);
  font-weight: 600;
}

.result-item.final {
  background: var(--bg-light);
  border-radius: 0.5rem;
  border: 2px solid var(--primary-color);
  font-weight: 700;
  margin-top: 1rem;
}

.result-value.positive {
  color: var(--success-color);
}

.result-value.negative {
  color: var(--error-color);
}

.annual-results {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid var(--border-color);
}

.annual-results h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.disclaimer-section {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--warning-color);
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid var(--warning-color);
  border-radius: 0.5rem;
}

[dir="rtl"] .disclaimer-section {
  border-left: none;
  border-right: 4px solid var(--warning-color);
}

.disclaimer-section p {
  color: var(--text-dark);
  font-size: var(--font-size-sm);
  margin: 0;
}

.related-calculators {
  padding: var(--section-padding);
  background: var(--bg-white);
}

.related-calculators h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--text-dark);
}

.error-message {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  color: var(--error-color);
  padding: 1rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
  text-align: center;
}

.loading {
  position: relative;
  color: transparent;
}

.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid var(--text-dark);
  border-color: var(--text-dark) transparent var(--text-dark) transparent;
  animation: loading 1.2s linear infinite;
}

@keyframes loading {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.6s ease forwards;
}

/* Mobile Enhancements */
@media (max-width: 768px) {
  .calculator-results-section {
    position: static;
  }

  .calculator-header h1 {
    font-size: var(--font-size-2xl);
  }

  .result-highlight .result-value {
    font-size: var(--font-size-xl);
  }

  .share-btn,
  .print-btn {
    font-size: var(--font-size-xs);
    padding: 0.25rem 0.5rem;
  }
}

/* ACCESSIBILITY COMPLIANCE - WCAG 2.0 AA */

/* Skip Navigation Link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  z-index: 1001;
  border-radius: 0 0 4px 4px;
  font-weight: 600;
  font-size: 14px;
}

.skip-link:focus {
  top: 0;
}

/* Enhanced Focus Indicators - WCAG Compliant */
*:focus,
.calculator-card:focus,
.btn-primary:focus,
.btn-secondary:focus,
.form-input:focus,
.form-select:focus,
.nav-menu a:focus,
.logo a:focus {
  outline: 3px solid #005fcc !important;
  outline-offset: 2px !important;
}

/* Form Accessibility */
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-dark);
}

.required {
  color: var(--error-color);
  font-weight: bold;
}

.form-help {
  font-size: 0.875rem;
  color: var(--text-gray);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 1.5rem;
}

/* Screen Reader Only Content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Keyboard Navigation Improvements */
.nav-menu a:focus,
.dropdown-menu a:focus {
  background-color: var(--primary-color);
  color: white;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .calculator-card {
    border: 2px solid var(--text-dark);
  }

  .result-item {
    border-bottom: 2px solid var(--text-dark);
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Accessibility Statement Page */
.accessibility-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

.accessibility-section {
  margin-bottom: 3rem;
}

.accessibility-section h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.accessibility-section h3 {
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.standards-list {
  margin: 1rem 0;
  padding-right: 1.5rem;
}

.standards-list li {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.feature-item {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
}

.feature-item h3 {
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.feature-item p {
  color: var(--text-gray);
  line-height: 1.6;
}

.contact-info {
  background: var(--bg-light);
  border-left: 4px solid var(--primary-color);
  padding: 1.5rem;
  margin-top: 1rem;
  border-radius: 0 8px 8px 0;
}

.contact-info p {
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.contact-info a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.contact-info a:hover,
.contact-info a:focus {
  text-decoration: underline;
}

.accessibility-footer {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-gray);
}

/* Privacy Policy Specific Styling */
.privacy-section {
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.privacy-section:last-child {
  border-bottom: none;
}

.privacy-section h2 {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.privacy-section p {
  line-height: 1.7;
  color: var(--text-dark);
  margin-bottom: 0.75rem;
}

.highlight-section {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: 8px;
  border: 2px solid var(--primary-color);
  position: relative;
}

.highlight-section::before {
  content: "⚠️";
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
}

.privacy-intro {
  background: var(--bg-light);
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary-color);
}

.privacy-intro p {
  font-size: 1.1rem;
  color: var(--text-dark);
  margin: 0;
  line-height: 1.6;
}

.last-updated {
  font-size: 0.9rem;
  color: var(--text-gray);
  font-style: italic;
  margin-top: 0.5rem;
}
