/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

:root {
  --primary: #000000;
  --secondary: #ffffff;
  --text: #1a1a1a;
  --text-light: #666666;
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --border: #e5e5e5;
  --accent: #333333;
}

body {
  font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  transition: all 0.3s ease;
}

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

body[dir="rtl"] .header-content {
  flex-direction: row-reverse;
}

body[dir="rtl"] .nav-menu {
  flex-direction: row-reverse;
}

body[dir="rtl"] .nav-menu a::after {
  right: 0;
  left: auto;
}

body[dir="rtl"] .dropdown-menu {
  right: 0;
  left: auto;
}

body[dir="rtl"] .dropdown-menu a {
  border-left: none;
  border-right: 3px solid transparent;
  text-align: right;
}

body[dir="rtl"] .dropdown-menu a:hover {
  border-left-color: transparent;
  border-right-color: #000000;
  padding-left: 20px;
  padding-right: 25px;
}


body[dir="rtl"] .contact-item {
  flex-direction: row-reverse;
  align-items: flex-start;
}

/* RTL Support for Arabic pages */
body[dir="rtl"] .nav-menu {
  text-align: right;
}

body[dir="rtl"] .nav-menu a {
  text-align: right;
  direction: rtl;
  padding-right: 0;
  padding-left: 0;
}

body[dir="rtl"] .dropdown-menu {
  text-align: right;
}

body[dir="rtl"] .dropdown-menu a {
  text-align: right;
  direction: rtl;
  padding-right: 15px;
  padding-left: 15px;
}

body[dir="rtl"] .nav-menu li {
  text-align: right;
}

body[dir="rtl"] .has-dropdown > a::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

body[dir="rtl"] .has-dropdown.active > a::after {
  content: '−';
  transform: translateY(-50%) rotate(0deg);
}

body[dir="rtl"] .contact-item div {
  text-align: right;
  flex: 1;
  margin-right: 20px;
}

body[dir="rtl"] .contact-item h4,
body[dir="rtl"] .contact-item p {
  text-align: right;
  direction: rtl;
  margin: 0;
}

body[dir="rtl"] .contact-item p {
  line-height: 1.6;
  margin-top: 5px;
}

body[dir="rtl"] .contact-item a[href^="tel:"],
body[dir="rtl"] .contact-item a[href^="mailto:"] {
  direction: ltr;
  text-align: right;
  display: inline-block;
}

body[dir="rtl"] .service-card li {
  padding-left: 0;
  padding-right: 20px;
  text-align: right;
}

body[dir="rtl"] .service-card li::before {
  left: auto;
  right: 0;
}

body[dir="rtl"] .about-content {
  text-align: right;
}

body[dir="rtl"] .about-content p {
  text-align: right;
}

body[dir="rtl"] .team-member {
  text-align: center;
}

body[dir="rtl"] .csr-content > p {
  text-align: center;
}

body[dir="rtl"] .csr-item {
  text-align: right;
}

body[dir="rtl"] .csr-item h4,
body[dir="rtl"] .csr-item p {
  text-align: right;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo img {
  height: 80px;
  width: auto;
  max-width: 250px;
}

.logo .logo-dark {
  display: block;
}

.logo .logo-light {
  display: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-menu a {
  font-weight: 500;
  transition: all 0.3s ease;
  font-size: 15px;
  position: relative;
  padding: 8px 0;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #000000;
  transition: width 0.3s ease;
}

.nav-menu a:hover {
  color: #000000;
}

.nav-menu a:hover::after {
  width: 100%;
}

/* Language Toggle */
.language-toggle {
  margin: 0;
  display: flex;
  align-items: center;
}

.lang-btn {
  background: #000000;
  color: #ffffff;
  border: 2px solid #000000;
  padding: 10px 20px;
  border-radius: 6px;
  font-family: 'Tajawal', sans-serif;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 70px;
}

.lang-btn:hover {
  background: #ffffff;
  color: #000000;
  border-color: #000000;
  transform: translateY(-1px);
}

.lang-text {
  display: block;
}

/* Dropdown Menu */
.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: #ffffff;
  border: 1px solid #e5e5e5;
  list-style: none;
  padding: 10px 0;
  margin-top: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 100;
}

.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  padding: 0;
}

.dropdown-menu a {
  display: block;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
  background: #fafafa;
  border-left-color: #000000;
  padding-left: 25px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 2px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-toggle::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: #000000;
  transition: width 0.3s ease;
}

.nav-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
  transform: scale(1.02);
}

.nav-toggle:hover::after {
  width: 80%;
}

.nav-toggle span {
  width: 20px;
  height: 1px;
  background: var(--primary);
  border-radius: 0.5px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-toggle:hover span {
  background: #333333;
  transform: scaleX(1.1);
}

.nav-toggle:hover span:nth-child(1) {
  transform: scaleX(1.1) translateY(1px);
}

.nav-toggle:hover span:nth-child(2) {
  transform: scaleX(1.1);
}

.nav-toggle:hover span:nth-child(3) {
  transform: scaleX(1.1) translateY(-1px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000000;
  color: white;
  text-align: center;
  padding: 100px 20px 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 100px,
    rgba(255,255,255,0.02) 100px,
    rgba(255,255,255,0.02) 101px
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero p {
  font-size: clamp(18px, 2.5vw, 24px);
  margin-bottom: 30px;
  opacity: 0.95;
}

.hero-divider {
  width: 80px;
  height: 2px;
  background: white;
  margin: 20px auto;
  opacity: 0.8;
}

.hero-subtitle {
  font-size: clamp(16px, 2vw, 20px) !important;
  font-weight: 400 !important;
  margin-bottom: 20px !important;
  opacity: 0.9 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-tagline {
  font-size: clamp(16px, 2vw, 20px) !important;
  font-weight: 400 !important;
  margin-bottom: 30px !important;
  opacity: 0.9 !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.btn-primary {
  background: #ffffff;
  color: #000000;
  border: 2px solid #ffffff;
}

.btn-primary:hover {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
  transform: translateY(-2px);
  opacity: 0.9;
}

/* Section Styles */
.section {
  padding: 80px 20px;
}

.section-title {
  text-align: center;
  font-size: clamp(32px, 4vw, 42px);
  margin-bottom: 50px;
  color: var(--primary);
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 2px;
  background: #000000;
}

/* About Section */
.about {
  background: var(--bg);
}

.about-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.about-content p {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 20px;
  color: var(--text-light);
}

/* Services Section */
.services {
  background: var(--bg-alt);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  background: white;
  padding: 35px;
  border: 1px solid #e5e5e5;
  border-radius: 0;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  display: block;
  color: inherit;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: #000000;
  transition: width 0.3s ease;
}

.service-card:hover {
  border-color: #000000;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  transform: translateY(-5px);
}

.service-card:hover::after {
  width: 100%;
}

.service-icon {
  display: none;
}

.service-card h3 {
  font-size: 22px;
  color: var(--primary);
  margin-bottom: 15px;
}

.service-card ul {
  list-style: none;
}

.service-card li {
  padding: 8px 0;
  padding-left: 20px;
  position: relative;
  font-size: 15px;
  color: var(--text-light);
}

.service-card li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: #000000;
  font-weight: normal;
}

/* Team Section */
.team {
  background: var(--bg);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  max-width: 800px;
  margin: 0 auto;
}

.team-member {
  text-align: center;
}

.member-photo {
  width: 200px;
  height: 200px;
  margin: 0 auto 20px;
  border-radius: 0;
  overflow: hidden;
  background: var(--bg-alt);
}

.member-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-member h3 {
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 5px;
}

.member-role {
  color: var(--text-light);
  font-size: 16px;
}

/* CSR Section */
.csr {
  background: #000000;
  color: white;
}

.csr .section-title {
  color: white;
}

.csr .section-title::after {
  background: #ffffff;
}

.csr-content {
  max-width: 900px;
  margin: 0 auto;
}

.csr-content > p {
  text-align: center;
  font-size: 18px;
  margin-bottom: 40px;
  line-height: 1.8;
}

.csr-highlights {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
}

.csr-item {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.csr-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s ease;
}

.csr-item:hover::before {
  left: 100%;
}

.csr-item:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-5px);
}

.csr-item h4 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #ffffff;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

.csr-item p {
  font-size: 15px;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

@media (max-width: 1024px) {
  .csr-highlights {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .csr-highlights {
    grid-template-columns: 1fr;
  }
}

/* Contact Section */
.contact {
  background: var(--bg-alt);
}


.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 50px;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.contact-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.contact-icon {
  font-size: 24px;
  flex-shrink: 0;
  color: #000000;
  font-weight: 300;
  text-align: center;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  border-radius: 50%;
  border: 1px solid #e5e5e5;
}

.contact-item h4 {
  font-size: 18px;
  color: var(--primary);
  margin-bottom: 5px;
}

.contact-item p {
  color: var(--text-light);
}

.contact-item a {
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: #000000;
}

.contact-form {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 14px;
  margin-bottom: 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #000000;
}

.contact-form button {
  width: 100%;
}

/* HubSpot Form Styling */
.contact-form .hs-form {
  font-family: inherit;
}

.contact-form .hs-form-field {
  margin-bottom: 15px;
}

.contact-form .hs-input {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.contact-form .hs-input:focus {
  outline: none;
  border-color: #000000;
}

.contact-form .hs-form-required {
  display: none;
}

.contact-form .hs-error-msgs {
  margin-top: 5px;
}

.contact-form .hs-error-msg {
  color: #e74c3c;
  font-size: 13px;
}

.contact-form .hs-submit {
  margin-top: 10px;
}

.contact-form .hs-submit input[type="submit"] {
  width: 100%;
  background: #000000;
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-form .hs-submit input[type="submit"]:hover {
  background: #333333;
  transform: translateY(-1px);
}

.contact-form label {
  font-weight: 500;
  margin-bottom: 5px;
  display: block;
  color: var(--text);
}

/* HubSpot Success Message Styling */
.contact-form .hs-form-success {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 20px;
  margin-top: 15px;
  text-align: left;
}

.contact-form .hs-form-success p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  font-family: inherit;
}

.contact-form .hs-form-success h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  font-family: inherit;
}

/* HubSpot Loading State */
.contact-form .hs-form-progress {
  font-size: 15px;
  color: var(--text);
  font-family: inherit;
}

/* Ensure consistent text sizing across all HubSpot form elements */
.contact-form .hs-form .hs-form-field > label,
.contact-form .hs-form .hs-form-field .hs-field-desc,
.contact-form .hs-form .hs-form-field .hs-error-msg {
  font-size: 15px;
  font-family: inherit;
  line-height: 1.6;
}

.contact-form .hs-form .hs-form-field .hs-field-desc {
  color: var(--text-light);
  margin-top: 5px;
}

/* Style any additional HubSpot form elements */
.contact-form .hs-form .hs-form-field .hs-input::placeholder {
  color: #999;
  font-size: 15px;
  font-family: inherit;
}

.map-container {
  margin-top: 30px;
  border: 1px solid #e5e5e5;
  overflow: hidden;
}

.map-container iframe {
  display: block;
  width: 100%;
}

/* Footer */
.footer {
  background: #000000;
  color: white;
  padding: 40px 20px;
  text-align: center;
}

.footer-logo {
  margin-bottom: 20px;
}

.footer-logo img {
  height: 80px;
  width: auto;
  max-width: 250px;
  margin: 0 auto;
}

.footer p {
  font-size: 14px;
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 15px;
  }

  .nav-toggle {
    display: flex;
  }

  .language-toggle {
    order: 2;
    margin-right: 15px;
  }

  .nav-toggle {
    order: 3;
  }

  .logo {
    order: 1;
  }

  .nav-menu {
    position: fixed;
    top: 90px;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    max-height: calc(100vh - 90px);
    overflow-y: auto;
    z-index: 999;
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .nav-menu.active {
    transform: translateX(0);
  }

  /* Mobile menu backdrop */
  .nav-menu::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .nav-menu.active::before {
    opacity: 1;
  }

  .nav-menu li {
    padding: 0;
    border-bottom: 1px solid var(--border);
    width: 100%;
    display: block;
  }

  .nav-menu li:last-child {
    border-bottom: none;
  }


  .nav-menu a {
    display: block;
    padding: 15px 0;
    font-size: 16px;
    border-bottom: none;
    line-height: 1.5;
    width: 100%;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-menu a::after {
    display: none;
  }

  /* Mobile dropdown styles */
  .has-dropdown {
    position: static;
  }

  .has-dropdown > a {
    position: relative;
    padding-right: 30px;
  }

  .has-dropdown > a::before {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: bold;
    transition: transform 0.3s ease;
  }

  .has-dropdown.active > a::before {
    content: '−';
    transform: translateY(-50%) rotate(0deg);
  }

  .dropdown-menu {
    position: static;
    min-width: auto;
    background: #f8f8f8;
    border: none;
    padding: 0;
    margin: 5px 0 0 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border-radius: 4px;
    width: 100%;
  }

  .has-dropdown.active .dropdown-menu {
    max-height: 300px;
  }

  .dropdown-menu li {
    padding: 0;
    border-bottom: none;
  }

  .dropdown-menu a {
    padding: 12px 15px;
    font-size: 14px;
    color: var(--text-light);
    border-left: none;
    background: transparent;
    margin: 1px 0;
    border-radius: 0;
    line-height: 1.4;
    width: 100%;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dropdown-menu a:hover {
    background: #e8e8e8;
    padding-left: 15px;
    border-left: none;
  }

  /* Services grid responsive */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .service-card {
    padding: 25px;
  }

  /* Contact grid responsive */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }


  /* Section padding adjustments */
  .section {
    padding: 60px 15px;
  }

  /* Hero section mobile adjustments */
  .hero {
    padding: 80px 15px 50px;
    min-height: 80vh;
  }

  .hero h1 {
    font-size: clamp(24px, 6vw, 36px);
    margin-bottom: 15px;
  }

  .hero p {
    font-size: clamp(14px, 3vw, 18px);
    margin-bottom: 20px;
  }

  /* Team grid mobile */
  .team-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .member-photo {
    width: 150px;
    height: 150px;
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  .nav-menu {
    padding: 10px;
    top: 80px;
  }

  .nav-menu a {
    font-size: 14px;
    padding: 12px 0;
    line-height: 1.6;
  }

  .dropdown-menu a {
    padding: 8px 12px;
    font-size: 12px;
  }

  .section {
    padding: 40px 10px;
  }

  .hero {
    padding: 70px 10px 40px;
    min-height: 70vh;
  }

  .hero h1 {
    font-size: clamp(20px, 5vw, 28px);
  }

  .hero p {
    font-size: clamp(12px, 2.5vw, 16px);
  }

  .service-card {
    padding: 20px;
  }

  .logo img {
    height: 50px;
  }

  .header-content {
    padding: 8px 0;
  }

  .language-toggle-item .lang-btn {
    font-size: 12px;
    padding: 6px 12px;
    min-width: 50px;
  }
}
