/* ==================================== */
/* 0. Base Styles & Global Setup (RTL)  */
/* ==================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --brand-blue: #003366;
  --accent: #ff9900;
  --muted: #f4f4f4;
  --card-border: #e6eef1;
  --text: #333333;
  --max-width: 1200px;
}

body {
  font-family: "Cairo", "Arial", sans-serif;
  line-height: 1.6;
  background-color: var(--muted);
  direction: rtl; /* Sets the default direction to RTL (Arabic) */
  text-align: right; /* Default text alignment for Arabic */
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  width: 90%;
  max-width: var(--max-width);
  margin: 0 auto;
}

h1,
h2,
h3 {
  color: var(--brand-blue); /* Deep Corporate Blue */
}

a {
  text-decoration: none;
  color: #003366;
}

/* Scroll padding to prevent fixed header from covering anchored content */
html {
  scroll-padding-top: 80px;
}

.btn {
  display: inline-block;
  padding: 10px 22px;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.25s ease;
  border: none;
  cursor: pointer;
}

.primary-btn {
  background-color: var(--accent); /* Accent Color */
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(255, 153, 0, 0.12);
}

.primary-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.secondary-btn {
  background: transparent;
  color: var(--brand-blue);
  border: 1px solid rgba(0, 51, 102, 0.08);
}

.section-title {
  font-size: 32px;
  text-align: center;
  margin-bottom: 40px;
  margin-top: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e9eef2;
  display: block;
  width: auto;
}

.page-content {
  padding: 60px 0;
  background-color: #ffffff;
}

.intro-text {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 40px auto;
  font-size: 17px;
  color: #555;
  line-height: 1.8;
}

/* Company intro and facts (About section) */
.company-intro {
  margin-top: 18px;
  text-align: center;
  font-weight: 600;
  color: #333;
  font-size: 16px;
  line-height: 1.6;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.company-facts {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  text-align: right;
  direction: rtl;
}

.company-facts dt {
  font-weight: 700;
  color: var(--brand-blue);
  margin-bottom: 4px;
}

.company-facts dd {
  margin: 0 0 10px 0;
  color: #555;
}

/* ==================================== */
/* 1. Top Bar Styling (RTL)             */
/* ==================================== */
.top-bar {
  background-color: var(--brand-blue);
  color: #ffffff;
  padding: 8px 0;
  font-size: 14px;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row-reverse; /* Put contact info on the right in RTL */
}

.contact-info span {
  margin-left: 20px;
}

.lang-switcher {
  color: #ffffff;
  border: 1px solid #ffffff;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: normal;
}

/* ==================================== */
/* 2. Header & Navigation (RTL)         */
/* ==================================== */
.main-header {
  background-color: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky; /* Make the header stick to the top */
  top: 0;
  z-index: 100;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
}

.logo h1 {
  font-size: 26px;
  margin-bottom: 0;
}
.logo p {
  color: #777;
  font-size: 13px;
  margin-top: -4px;
}

/* Inline brand mark next to title */
.brand-logo {
  height: 38px;
  width: auto;
  vertical-align: middle;
  margin-left: 8px; /* space between logo (right) and title text (left) in RTL */
  border-radius: 4px;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
}

.main-nav li {
  margin-left: 0; /* gaps handle spacing */
}

.main-nav a {
  font-weight: bold;
  padding: 5px 0;
  transition: color 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
  color: #ff9900;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--brand-blue);
}

/* ==================================== */
/* 3. Hero Section (RTL)                */
/* ==================================== */
.hero-section {
  /* image behind the whole section with a subtle dark overlay for contrast */
  background-image: linear-gradient(rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.14)), url("../images/backgorund.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  padding: 80px 0; /* Add extra padding for large hero */
  text-align: right;
}

.hero-inner {
  /* white translucent card over the hero background image */
  background: rgba(255, 255, 255, 0.94);
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  max-width: 980px;
  margin: 0 auto;
  color: var(--text);
}

.hero-inner .btn {
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.hero-section h2 {
  font-size: 40px;
  margin-bottom: 12px;
}

.hero-section p {
  font-size: 18px;
  margin-bottom: 22px;
  color: #444;
}

/* ==================================== */
/* 4. Vision & Mission Styling          */
/* ==================================== */
.vision-mission {
  background-color: #f9f9f9;
}

.statement-box {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(0, 51, 102, 0.06);
}
.statement-box:last-child {
  margin-bottom: 0;
}

.statement-box h2 {
  display: flex;
  align-items: center;
  color: var(--accent);
  font-size: 30px;
  margin-bottom: 15px;
}

.values-section {
  background-color: #ffffff;
}

/* ✅ NEW CLASS: Dedicated Wrapper for the 3-Column Cards */
.cards-grid-wrapper {
  display: grid;
  /* Ensure 3 columns wide enough for content, but flexible */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  margin-top: 30px; /* Add space below the intro paragraph */
}

.service-card {
  background-color: #ffffff;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 28px;
  text-align: right;
  margin-bottom: 20px;
  box-shadow: 0 8px 22px rgba(14, 30, 37, 0.04);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.3, 1), box-shadow 0.28s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.service-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.08);
}

.card-icon {
  color: var(--accent);
  font-size: 40px;
  margin-bottom: 15px;
  text-align: right;
  background: rgba(255, 153, 0, 0.09);
  width: 68px;
  height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.service-card h2 {
  font-size: 20px;
  margin: 14px 0 10px;
}
.service-card p {
  color: #555;
  line-height: 1.7;
}
.service-card .card-footer {
  margin-top: 18px;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}
.service-card .card-footer .btn {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 6px;
}

/* ==================================== */
/* 6. Why Us USP List Styling           */
/* ==================================== */
.usp-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  text-align: center;
}

.usp-item {
  padding: 30px;
  background-color: #e6f0ff;
  border-radius: 8px;
  border-bottom: 5px solid #003366;
}

.usp-item i {
  font-size: 45px;
  color: #ff9900;
  margin-bottom: 15px;
}

.usp-item h3 {
  font-size: 22px;
  color: #003366;
  margin-bottom: 10px;
}

.usp-item p {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  text-align: inherit;
}

/* ==================================== */
/* 7. Contact Section Styling (RTL)     */
/* ==================================== */
.contact-section {
  padding: 60px 0;
  background-color: #ffffff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 36px;
  text-align: right;
}

.contact-form-container h2 {
  color: #003366;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.form-group {
  margin-bottom: 15px;
}

.contact-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #444;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 8px;
  font-size: 15px;
  text-align: right;
  direction: rtl;
  background: #fff;
}

.company-details-container {
  background: linear-gradient(180deg, #fbfdff, #f7fbff);
  padding: 30px;
  border-radius: 8px;
  height: fit-content;
}

.company-details-container h2 {
  color: #ff9900;
  margin-top: 0;
  margin-bottom: 30px;
}

.detail-item {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
}

.detail-item i {
  color: #003366;
  font-size: 20px;
  margin-left: 15px; /* Spacing in RTL */
}

.social-links {
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
}

.social-links a {
  color: #003366;
  font-size: 24px;
  margin-left: 15px;
  transition: color 0.3s;
}

.social-links a:hover {
  color: #ff9900;
}

/* ==================================== */
/* 8. Footer                            */
/* ==================================== */
.main-footer {
  background-color: #222;
  color: #ffffff;
  padding: 22px 0;
  text-align: center;
  font-size: 14px;
}

/* small animation helpers */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.fade-up {
  animation: fadeUp 0.7s ease both;
}

/* ==================================== */
/* 9. LTR Overrides (English)           */
/* ==================================== */

.ltr-body {
  direction: ltr !important;
  text-align: left !important;
}

.ltr-body h1,
.ltr-body h2,
.ltr-body h3,
.ltr-body p,
.ltr-body .section-title {
  text-align: left !important;
}

.ltr-body .top-bar .container {
  flex-direction: row;
}

.ltr-body .contact-info span {
  margin-left: 0;
  margin-right: 20px;
}

.ltr-body .main-nav li {
  margin-left: 0;
  margin-right: 20px;
}

.ltr-body .statement-box h2 i {
  margin-right: 15px;
  margin-left: 0;
}

.ltr-body .services-list .container,
.ltr-body .service-card {
  text-align: left;
}

.ltr-body .card-icon {
  text-align: left;
}

.ltr-body .contact-form input,
.ltr-body .contact-form textarea {
  text-align: left;
  direction: ltr;
}

.ltr-body .detail-item i {
  margin-right: 15px;
  margin-left: 0;
}

.ltr-body .social-links {
  justify-content: flex-start;
}

.ltr-body .social-links a {
  margin-right: 15px;
  margin-left: 0;
}

/* ==================================== */
/* 10. Mobile Responsiveness (Max Width 768px) */
/* ==================================== */

@media (max-width: 768px) {
  /* Header/Navigation */
  .main-header {
    position: fixed; /* Keep header visible on top of mobile screen */
    width: 100%;
  }
  .hero-section {
    padding-top: 100px; /* Push hero content down so header doesn't cover it */
  }

  .menu-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 24px;
    color: #003366;
    cursor: pointer;
  }

  .main-nav {
    display: none;
    width: 100%;
    position: absolute;
    top: 65px;
    right: 0;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
    z-index: 99;
  }
  .ltr-body .main-nav {
    right: auto;
    left: 0;
  }

  .main-nav.active {
    display: block;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  .main-nav ul {
    flex-direction: column;
  }

  .main-nav li {
    margin: 0;
    border-bottom: 1px solid #f4f4f4;
  }

  .main-nav a {
    display: block;
    padding: 12px 20px;
    text-align: right;
  }
  .ltr-body .main-nav a {
    text-align: left;
  }

  /* Grid Layouts (Services, Values, Why Us) */
  .services-list .container,
  .usp-list {
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 25px;
  }

  /* Contact Grid */
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .company-details-container {
    order: -1; /* Move details above the form on mobile */
  }

  /* Top Bar */
  .top-bar .container {
    flex-direction: column;
    align-items: center;
  }
  .contact-info {
    margin-bottom: 5px;
    order: 2;
  }
  .lang-switcher {
    order: 1;
    margin-bottom: 5px;
  }
}
/* التنسيقات العامة للشبكة */
.fact-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin: 40px 0;
  text-align: center;
}

/* تنسيق البطاقة الفردية */
.fact-card {
  background-color: #f7f7f7; /* لون خلفية خفيف */
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* تنسيق الأيقونة */
.fact-card .icon-circle {
  width: 60px;
  height: 60px;
  background-color: #007bff; /* لون أساسي */
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 24px;
}

/* تنسيق القيمة (الرقم/النص البارز) */
.fact-card .fact-value {
  font-size: 1.8em;
  font-weight: 700;
  color: #333;
  margin: 5px 0 0;
}

.fact-card small {
  color: #6c757d;
}

/* تنسيق قسم التوريد المتخصص */
.specialized-supply {
  border-right: 5px solid #007bff; /* خط جانبي لإبراز المحتوى */
  padding-right: 20px;
  margin-top: 50px;
}

.highlight-text {
  font-size: 1.1em;
  font-weight: 600;
  color: #007bff;
}

/* --- Logo Styling --- */
.main-header .logo .brand-logo {
  max-height: 50px; /* Adjust this value to control the height of the logo */
  width: auto; /* Maintain aspect ratio */
  vertical-align: middle; /* Align with text next to it */
  margin-inline-end: 10px; /* Space between logo and text in RTL */
  /* For LTR, you would use margin-right: 10px; */
}

/* You might want to adjust the font size of the h1 next to the logo as well */
.main-header .logo h1 {
  font-size: 1.8em; /* Example adjustment, ensure it looks good with the logo */
  display: flex; /* Use flexbox to easily align logo and text */
  align-items: center; /* Vertically center logo and text */
}

/* Adjust paragraph below logo if needed */
.main-header .logo p {
  font-size: 0.9em; /* Smaller text for the tagline */
  margin-top: 5px; /* Add some space below the logo/h1 */
}

/* Responsive adjustments for smaller screens (e.g., mobile) */
@media (max-width: 768px) {
  .main-header .logo .brand-logo {
    max-height: 40px; /* Slightly smaller on mobile */
  }
  .main-header .logo h1 {
    font-size: 1.5em; /* Adjust font size on mobile */
  }
}
/* --- Contact Details Styling --- */
.company-details-container {
  padding: 20px;
  /* Optional: Add a light background or border */
  /* border: 1px solid #eee; */
  /* border-radius: 8px; */
}

.contact-list {
  margin-bottom: 30px;
}

.detail-item {
  display: flex; /* Use flexbox for horizontal alignment */
  align-items: flex-start; /* Align content to the top of the line */
  margin-bottom: 20px; /* Space between items */
}

.contact-icon {
  font-size: 1.5em; /* Make the icon slightly larger */
  color: #007bff; /* Use your brand color for the icon */
  /* Space after the icon in an RTL layout */
  margin-inline-end: 15px;
  /* Ensures the icon stays aligned with the top of the text */
  padding-top: 3px;
}

.detail-content {
  /* Use flex-grow to take up available space */
  flex-grow: 1;
  direction: ltr;
}

.detail-label {
  font-weight: bold;
  color: #333; /* Darker color for labels */
  margin: 0;
  line-height: 1.2;
}

.detail-value {
  color: #666; /* Subtler color for the value */
  margin: 0;
  line-height: 1.2;
}

/* Specific styling for the Map link */
.map-link {
  color: #007bff; /* Use brand color */
  font-size: 0.9em;
  text-decoration: none; /* Remove underline, the color is enough */
  display: flex;
  align-items: center;
  margin-top: 5px;
}

.map-link:hover {
  text-decoration: underline;
}

/* Social links (If you want to style them as circles) */
.social-links {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.social-links a {
  font-size: 1.2em;
  color: #333; /* Default icon color */
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 50%; /* Makes the container circular */
  transition: background-color 0.3s, color 0.3s;
}

.social-links a:hover {
  color: white;
  background-color: #007bff; /* Hover effect */
  border-color: #007bff;
}

/* Styling for the Map link within the detail-content */
.detail-content .map-link {
  /* Explicitly set the direction for the link */
  direction: rtl;

  /* Align the content to the right (start of the RTL flow) */
  text-align: right;

  /* Ensure the icon and text are centered vertically */
  display: flex;
  align-items: center;

  /* Align the whole flex container (icon + text) to the right */
  justify-content: flex-end;

  /* Remove the inline style and put it here for better maintenance */
  font-size: 0.9em;
  text-decoration: none;
  margin-top: 5px;
  color: #007bff;
}

/* Ensure the icon is placed correctly relative to the text in RTL */
.map-link i {
  /* margin-inline-end is the correct way to add space after an element in RTL */
  margin-inline-end: 5px;
}
.detail-content {
  flex-grow: 1;
  direction: rtl; /* Crucial: Sets the flow for all children to RTL */
  text-align: right; /* Ensures block elements are right-aligned */
}
.map-link {
  /* Change to inline-flex so it aligns within the parent's text-align: right */
  display: inline-flex;

  /* Reverse the order of icon and text for visual RTL flow */
  flex-direction: row-reverse;

  /* Ensure all content flows RTL */
  direction: rtl;

  /* Other visual properties */
  color: #007bff;
  font-size: 0.9em;
  text-decoration: none;
  margin-top: 5px;

  /* We don't need justify-content now, as the text-align on the parent handles placement */
}

/* Ensure the space is applied correctly between the icon and the Arabic text */
.map-link i {
  /* Use margin-left to create space after the icon when it's placed on the right (RTL flow) */
  margin-left: 5px;
  margin-inline-end: 0; /* Clear previous setting if any */
}
/* --- Styling for the Social Icon Links --- */

.social-links {
  /* Ensures icons are spaced nicely */
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.social-icon-link {
  /* --- Base Style for All Icons --- */
  font-size: 1.2em;
  color: #333;
  padding: 8px;
  border: 1px solid #ccc;

  /* REMOVE the circle/oval */
  border-radius: 0; /* Ensures the shape is a square or rectangle */

  /* Ensure no text decoration appears */
  text-decoration: none;

  /* Smooth hover transitions */
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.social-icon-link:hover {
  color: white;
  background-color: #007bff; /* Example Hover Color (use your primary brand color) */
  border-color: #007bff;
}
