:root {
  --primary: #00c6ff;
  --secondary: #2660ab;
  --dark: #1c2646;
  --light: #f9fafb;
  --gray: #6b7280;
  --error: #dc2626;
  --success: #10b981;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  /* Fixed colors for navbar */
  --navbar-bg-start: #00c6ff;
  --navbar-bg-end: #2660ab;
  --navbar-text: #ffffff;
}

[data-theme="dark"] {
  --light: #1f2937;
  --gray: #d1d5db;
  --glass-bg: rgba(31, 41, 55, 0.3);
  --glass-border: rgba(255, 255, 255, 0.1);
  /* Updated for dark mode to make card text visible */
  --card-text: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: "Microsoft Uighur";
  src: url("fonts/Microsoft Uighur.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

html[dir="ltr"] {
  font-family: "Inter", sans-serif;
}

html[dir="rtl"] {
  font-family: "Microsoft Uighur", sans-serif;
  font-size: 1.3rem;
}

body {
  background: var(--light);
  color: var(--dark);
  line-height: 1.8;
  scroll-behavior: smooth;
  overflow-x: hidden;
  transition: background 0.3s ease;
}

html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  direction: ltr;
}

header.scrolled {
  background: var(--dark);
  padding: 0.8rem 2rem;
}

header img {
  height: 55px;
  transition: transform 0.3s ease;
}

header img:hover {
  transform: scale(1.05);
}

nav {
  display: flex;
  align-items: center;
}

nav a {
  margin: 0 1.2rem;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  transition: all 0.3s ease;
}

nav a::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--primary);
  bottom: -5px;
  left: 0;
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: 100%;
}

nav a:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

nav a.active::after {
  width: 100%;
  background: var(--primary);
}

.admin-btn {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  color: white;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-btn:hover {
  color: white;
  transform: translateY(-2px);
}

.admin-btn::after {
  display: none;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switch a {
  color: white;
  margin-left: 0.6rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.3s ease;
}

html[dir="rtl"] .lang-switch a {
  font-size: 0.8rem;
}

.lang-switch a:hover {
  color: var(--primary);
}

.theme-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
}

.theme-toggle:hover {
  transform: rotate(360deg);
}

.hamburger {
  display: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: white;
}

.hero,
.services-hero,
.careers-hero,
.news-hero,
.contact-hero {
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 0 2rem;
  overflow: hidden;
}

.careers-hero {
  height: 80vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 0 2rem;
  overflow: hidden;
  background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)),
    url("<?php echo htmlspecialchars($careers_background); ?>") center/cover
      no-repeat fixed;
}

.hero::before,
.services-hero::before,
.careers-hero::before,
.news-hero::before,
.contact-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  opacity: 0.2;
  z-index: 0;
}

.hero-content,
.services-hero-content,
.news-hero-content,
.contact-hero-content {
  position: relative;
  z-index: 1;
}

.hero-content h2,
.services-hero-content h2,
.news-hero-content h2,
.contact-hero-content h2 {
  font-size: 3.5rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  text-shadow: 4px 4px 12px rgba(0, 0, 0, 0.5);
  animation: zoomIn 1.2s ease-out;
}

html[dir="rtl"] .hero-content h2,
html[dir="rtl"] .services-hero-content h2,
html[dir="rtl"] .news-hero-content h2,
html[dir="rtl"] .contact-hero-content h2 {
  font-size: 3rem;
  line-height: 1.2;
}

.hero-content p,
.services-hero-content p,
.news-hero-content p,
.contact-hero-content p {
  font-size: 1.3rem;
  max-width: 750px;
  margin: 0 auto 2rem;
  line-height: 2;
  font-weight: 300;
  animation: zoomIn 1.4s ease-out;
}

html[dir="rtl"] .hero-content p,
html[dir="rtl"] .services-hero-content p,
html[dir="rtl"] .news-hero-content p,
html[dir="rtl"] .contact-hero-content p {
  font-size: 1.1rem;
  line-height: 1.8;
}

.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 1rem 3rem;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  position: relative;
  overflow: hidden;
}

html[dir="rtl"] .btn {
  font-size: 0.95rem;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.3s ease;
}

html[dir="rtl"] .btn::before {
  left: 100%;
  right: -100%;
}

.btn:hover::before {
  left: 100%;
}

html[dir="rtl"] .btn:hover::before {
  right: 100%;
  left: auto;
}

.btn:hover {
  background: var(--secondary);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

section {
  max-width: 1400px;
  margin: 7rem auto;
  padding: 4rem;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
  text-align: center;
  border: 1px solid var(--glass-border);
  transition: transform 0.4s ease;
}

section:hover {
  transform: translateY(-10px);
}

section h2 {
  font-size: 3rem;
  color: var(--secondary);
  font-weight: 800;
  margin-bottom: 2rem;
  position: relative;
}

html[dir="rtl"] section h2 {
  font-size: 2.5rem;
  line-height: 1.3;
}

section h2::after {
  content: "";
  width: 120px;
  height: 6px;
  background: var(--primary);
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 3px;
}

section p {
  font-size: 1.2rem;
  color: var(--gray);
  line-height: 2.1;
  max-width: 1000px;
  margin: 0 auto;
}

html[dir="rtl"] section p {
  font-size: 1rem;
  line-height: 1.8;
}

.cards,
.team-members,
.job-listings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  max-width: 1400px;
  margin: 5rem auto;
  padding: 0 2rem;
}

.card,
.team-member,
.job {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2.5rem;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--glass-border);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::before,
.team-member::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before,
.team-member:hover::before {
  opacity: 0.1;
}

.card i {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.card:hover i {
  transform: scale(1.2);
}

.card h3,
.team-member h4,
.job h3 {
  font-size: 1.8rem;
  color: var(--card-text, var(--dark));
  margin-bottom: 1.2rem;
}

html[dir="rtl"] .card h3,
html[dir="rtl"] .team-member h4,
html[dir="rtl"] .job h3 {
  font-size: 1.5rem;
  line-height: 1.3;
}

.card p,
.team-member p,
.job p {
  font-size: 1.1rem;
  color: var(--card-text, var(--gray));
}

html[dir="rtl"] .card p,
html[dir="rtl"] .team-member p,
html[dir="rtl"] .job p {
  font-size: 0.95rem;
  line-height: 1.6;
}

.team-member img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin-bottom: 1rem;
  object-fit: cover;
}

.team-member:hover,
.job:hover {
  transform: translateY(-5px);
}

.job {
  text-align: left;
  padding: 2rem;
}

html[dir="rtl"] .job {
  text-align: right;
}

.job .location,
.job .closing-date {
  font-size: 1rem;
  color: var(--gray);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

html[dir="rtl"] .job .location,
html[dir="rtl"] .job .closing-date {
  font-size: 1.2rem;
}

.job .location i,
.job .closing-date i {
  color: var(--primary);
}

.job-actions {
  display: flex;
  gap: 1rem;
}

.job button {
  padding: 0.8rem 1.5rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 50px;
  border: none;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

html[dir="rtl"] .job button {
  font-size: 1.2rem;
}

.job button.apply-btn {
  background: var(--primary);
  color: white;
}

.job button.details-btn {
  background: var(--secondary);
  color: white;
}

.job button.apply-btn:hover,
.job button.details-btn:hover {
  background: var(--dark);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.news-articles {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  max-width: 1400px;
  margin: 5rem auto;
  padding: 0 2rem;
  justify-content: center;
}

.article {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  width: 100%;
  max-width: 320px;
}

.article:hover {
  transform: translateY(-5px);
}

.image-container {
  position: relative;
  width: 100%;
  padding-top: 100%;
}

.article-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.3s ease;
  background-color: white;
}

.article:hover .article-img {
  transform: scale(1.05);
}

.article-content {
  padding: 0.5rem;
}

.article-content h3 {
  font-size: 1.3rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  text-align: center;
}

html[dir="rtl"] .article-content h3 {
  font-size: 1rem;
  line-height: 1.3;
}

.article-content .date {
  font-size: 0.9rem;
  color: var(--gray);
  margin-bottom: 1rem;
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .article-content .date {
  direction: rtl;
  text-align: right;
  font-size: 0.8rem;
}

.article-content .description {
  font-size: 1rem;
  color: var(--gray);
  line-height: 1.8;
  text-align: justify;
}

html[dir="rtl"] .article-content .description {
  font-size: 0.85rem;
  line-height: 1.6;
}

.details-content {
  display: none;
}

.details-content.visible {
  display: block;
}

.details-btn {
  background: var(--primary);
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  margin: 0.5rem auto;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: block;
}

html[dir="rtl"] .details-btn {
  font-size: 0.8rem;
}

.details-btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.cta-section {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  margin: 5rem 0;
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

html[dir="rtl"] .cta-section h2 {
  font-size: 2rem;
  line-height: 1.3;
}

.cta-section p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 2rem;
}

html[dir="rtl"] .cta-section p {
  font-size: 1rem;
  line-height: 1.8;
}

.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  max-width: 1400px;
  margin: 5rem auto;
  padding: 0 2rem;
  justify-content: center;
}

.contact-form,
.contact-info {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--glass-border);
  width: 100%;
  max-width: 450px;
  transition: transform 0.3s ease;
}

.contact-form:hover,
.contact-info:hover {
  transform: translateY(-5px);
}

.contact-form h3,
.contact-info h3 {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 1.5rem;
  text-align: center;
}

html[dir="rtl"] .contact-form h3,
html[dir="rtl"] .contact-info h3 {
  font-size: 1.7rem;
  line-height: 1.3;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1.5rem;
  border: 2px solid var(--primary);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  color: var(--dark);
  font-size: 1rem;
  outline: none;
  transition: border 0.3s ease, box-shadow 0.3s ease;
}

html[dir="rtl"] .contact-form input,
html[dir="rtl"] .contact-form textarea {
  font-size: 0.85rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 8px rgba(0, 198, 255, 0.3);
}

.contact-form textarea {
  resize: vertical;
  min-height: 150px;
}

.contact-form button {
  background: var(--primary);
  color: white;
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  display: block;
  margin: 0 auto;
}

html[dir="rtl"] .contact-form button {
  font-size: 0.8rem;
}

.contact-form button:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.contact-info p {
  font-size: 1.1rem;
  color: var(--gray);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

html[dir="rtl"] .contact-info p {
  font-size: 0.9rem;
}

.contact-info p i {
  color: var(--primary);
  font-size: 1.2rem;
}

.map {
  max-width: 1400px;
  margin: 5rem auto;
  padding: 0 2rem;
}

.map iframe {
  width: 100%;
  height: 400px;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: var(--light);
  border-radius: 10px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  text-align: center;
  direction: "<?php echo ($lang === 'fa') ? 'rtl' : 'ltr'; ?>";
}

.modal-content img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 1rem;
  object-fit: cover;
}

.modal-content h3 {
  font-size: 1.8rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

html[dir="rtl"] .modal-content h3 {
  font-size: 1.5rem;
  line-height: 1.3;
}

.modal-content .position {
  font-size: 1.2rem;
  color: var(--gray);
  margin-bottom: 1rem;
}

html[dir="rtl"] .modal-content .position {
  font-size: 1rem;
}

.modal-content .details {
  text-align: left;
}

html[dir="rtl"] .modal-content .details {
  text-align: right;
}

.modal-content .details h4 {
  font-size: 1.2rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

html[dir="rtl"] .modal-content .details h4 {
  font-size: 1rem;
}

.modal-content .details p {
  font-size: 1rem;
  color: var(--gray);
  white-space: pre-line;
}

html[dir="rtl"] .modal-content .details p {
  font-size: 0.85rem;
}

.modal-content .close,
.modal-content .close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  color: var(--gray);
  cursor: pointer;
  transition: color 0.3s ease;
}

html[dir="rtl"] .modal-content .close,
html[dir="rtl"] .modal-content .close-btn {
  right: auto;
  left: 15px;
}

.modal-content .close:hover,
.modal-content .close-btn:hover {
  color: var(--dark);
}

#imageModal .modal-content {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

#imageModal .close {
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2rem;
}

#imageModal .close:hover {
  color: var(--primary);
}

#job-details-modal .modal-content {
  text-align: "<?php echo ($lang === 'fa') ? 'right' : 'left'; ?>" !important;
  display: block !important;
}

#job-details-modal .modal-content p {
  margin: 0.5rem 0;
  font-size: 1rem;
  color: var(--gray);
  text-align: "<?php echo ($lang === 'fa') ? 'right' : 'left'; ?>" !important;
}

html[dir="rtl"] #job-details-modal .modal-content p {
  font-size: 1.2rem;
  text-align: right !important;
}

#job-details-modal .modal-content p strong {
  color: var(--secondary);
  display: inline-block;
  width: 180px;
  text-align: "<?php echo ($lang === 'fa') ? 'right' : 'left'; ?>" !important;
}

#job-details-modal .modal-content button.apply-btn {
  float: "<?php echo ($lang === 'fa') ? 'right' : 'left'; ?>" !important;
  margin-top: 1rem;
}

#apply-modal .modal-content form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#apply-modal .modal-content .form-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

html[dir="rtl"] #apply-modal .modal-content .form-group {
  text-align: right;
}

#apply-modal .modal-content .form-group label {
  font-size: 1rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

html[dir="rtl"] #apply-modal .modal-content .form-group label {
  font-size: 1.2rem;
}

#apply-modal .modal-content .form-group input {
  padding: 0.8rem;
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
}

#apply-modal .modal-content .form-group input:focus {
  border-color: var(--primary);
}

#apply-modal .modal-content button[type="submit"],
#job-details-modal .modal-content button.apply-btn {
  background: var(--primary);
  color: white;
  padding: 0.8rem;
  border: none;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 1rem;
}

html[dir="rtl"] #apply-modal .modal-content button[type="submit"],
html[dir="rtl"] #job-details-modal .modal-content button.apply-btn {
  font-size: 1.2rem;
}

#apply-modal .modal-content button[type="submit"]:hover,
#job-details-modal .modal-content button.apply-btn:hover {
  background: var(--dark);
  transform: translateY(-2px);
}

.message {
  color: var(--secondary);
  margin-bottom: 1rem;
  font-size: 1rem;
  text-align: center;
}

html[dir="rtl"] .message {
  font-size: 1.2rem;
}

.message.error {
  color: var(--error);
}

footer {
  background: var(--dark);
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.08),
    rgba(255, 255, 255, 0)
  );
  z-index: 0;
}

footer .container {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
}

.newsletter {
  margin-bottom: 2rem;
}

.newsletter h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

html[dir="rtl"] .newsletter h3 {
  font-size: 1.5rem;
  line-height: 1.3;
}

.newsletter input {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 50px 0 0 50px;
  font-size: 1rem;
  outline: none;
  width: 250px;
}

html[dir="rtl"] .newsletter input {
  border-radius: 0 50px 50px 0;
  font-size: 0.85rem;
}

.newsletter button {
  padding: 0.8rem 1.5rem;
  border: none;
  background: var(--primary);
  color: white;
  font-weight: 600;
  border-radius: 0 50px 50px 0;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 1rem;
}

html[dir="rtl"] .newsletter button {
  border-radius: 50px 0 0 50px;
  font-size: 0.85rem;
}

.newsletter button:hover {
  background: var(--secondary);
}

.footer-links {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.footer-links a {
  color: white;
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary);
  transform: translateY(-3px);
}

footer p {
  font-size: 1rem;
}

html[dir="rtl"] footer p {
  font-size: 0.85rem;
}

.back-to-top {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html[dir="rtl"] .back-to-top {
  right: auto;
  left: 2rem;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--secondary);
  transform: translateY(-5px);
}

.back-to-top i {
  color: white;
  font-size: 1.5rem;
  line-height: 1;
  text-align: center;
  justify-content: center;
  align-items: center;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-self: center;
  width: 100%;
  height: 100%;
  font-size: inherit;
  box-sizing: border-box;
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  header {
    padding: 1rem;
    flex-wrap: wrap;
  }

  .hamburger {
    display: block;
  }

  nav {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--dark);
    position: absolute;
    top: 70px;
    left: 0;
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
  }

  nav.active {
    display: flex;
  }

  nav a {
    margin: 0.5rem 0;
    font-size: 1.2rem;
  }

  .header-controls {
    gap: 0.5rem;
  }

  .lang-switch a {
    margin-left: 0.3rem;
    font-size: 0.8rem;
  }

  .theme-toggle,
  .hamburger {
    font-size: 1rem;
  }

  .admin-btn {
    padding: 0.3rem 0.6rem;
    font-size: 1rem;
  }

  .hero,
  .services-hero,
  .careers-hero,
  .news-hero,
  .contact-hero {
    height: 60vh;
  }

  .hero-content h2,
  .careers-hero .hero-content h2 {
    font-size: 2.5rem;
  }

  html[dir="rtl"] .hero-content h2,
  html[dir="rtl"] .careers-hero .hero-content h2 {
    font-size: 2.2rem;
  }

  .hero-content p,
  .careers-hero .hero-content p {
    font-size: 1.1rem;
  }

  html[dir="rtl"] .hero-content p,
  html[dir="rtl"] .careers-hero .hero-content p {
    font-size: 0.9rem;
  }

  section {
    margin: 4rem 1.5rem;
    padding: 2.5rem;
  }

  .cards,
  .team-members,
  .job-listings {
    grid-template-columns: 1fr;
  }

  .contact-container {
    flex-direction: column;
    align-items: center;
  }

  .contact-form,
  .contact-info {
    max-width: 100%;
  }

  .map iframe {
    height: 300px;
  }

  .cta-section {
    padding: 2rem 1rem;
  }

  .cta-section h2 {
    font-size: 1.8rem;
  }

  html[dir="rtl"] .cta-section h2 {
    font-size: 1.5rem;
  }

  .cta-section p {
    font-size: 1rem;
  }

  html[dir="rtl"] .cta-section p {
    font-size: 0.9rem;
  }

  .job-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .job button {
    width: 100%;
    text-align: center;
  }

  .newsletter input {
    width: 200px;
  }
}
