/* ==================================================
   style.css - شركة الركيزة النفطية للخدمات النفطية
   المسؤول عن التصميم الكامل وتنسيق الواجهة (RTL)
   تحديث: إضافة خط DIN Next Arabic وضبط الهوية البصرية
   ================================================== */

/* 1. تعريف الخطوط (Custom Fonts) */
@font-face {
    font-family: 'DIN Next Arabic';
    src: url('../assets/fonts/DINNextLTArabic-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'DIN Next Arabic';
    src: url('../assets/fonts/DINNextLTArabic-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

/* 2. إعدادات عامة (Global Reset & Base) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'DIN Next Arabic', sans-serif; /* تطبيق الخط المختار */
}

:root {
  --main: #003153;        /* أزرق داكن - لون الثقة */
  --secondary: #1a4f7a;   /* أزرق متوسط */
  --accent: #f9a11b;      /* برتقالي ذهبي - للطاقة */
  --gray: #f2f4f7;        /* خلفيات رمادية فاتحة */
  --dark: #0c1f33;        /* لون داكن جداً */
  --white: #ffffff;
  --Creamy: #E6E7E8;      /* اللون الكريمي الجديد */
  --transition: 0.4s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--white);
  color: #333;
  line-height: 1.8;
  overflow-x: hidden;
  direction: rtl; /* التأكيد على اتجاه الصفحة */
  opacity: 0; 
  transition: opacity 0.8s ease-in;
}

body.loaded {
  opacity: 1;
}

/* 3. الحاويات (Containers) */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* 4. الهيدر والقائمة (Header & Navigation) */
header {
  background: var(--main);
  color: var(--white);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: var(--transition);
  height: 90px; 
  display: flex;
  align-items: center;
}

header.sticky {
  background: rgba(0, 49, 83, 0.98);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  height: 75px; 
}

header .container {
  display: flex;
  justify-content: space-between; 
  align-items: center;
  width: 90%;
}

/* تنسيق الشعار (Logo) */
.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 75px; 
  width: auto; /* تغيير من 100% لـ auto لعدم تشويه الأبعاد */
  /*background: var(--white);*/ /* خلفية بيضاء لبروز الشعار */
  padding: 5px;
  /*border-radius: 50%;*/ /* خلفية دائرية */
  /*box-shadow: 0 4px 10px rgba(0,0,0,0.15);*/
  transition: var(--transition);
}

header.sticky .logo img {
  height: 60px; 
}

/* تنسيق القائمة (Navigation) */
nav {
  display: flex;
  align-items: center;
  gap: 25px; 
}

nav a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  transition: var(--transition);
  position: relative;
  white-space: nowrap;
}

nav a:hover,
nav a.active {
  color: var(--accent);
}

nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--accent);
  bottom: -5px;
  right: 0;
  transition: var(--transition);
}

nav a:hover::after,
nav a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--white);
}

/* 5. قسم الهيرو (Hero Section) */
.hero {
  height: 100vh;
  background: url('https://images.unsplash.com/photo-1516934023934-890378873491?auto=format&fit=crop&q=80') center/cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  /* دمج التغطية الشفافة مع اللون الكريمي لضمان رؤية الصورة خلف النص */
  background: linear-gradient(rgba(230, 231, 232, 0.8), rgba(230, 231, 232, 0.9));
}

.hero-content {
  position: relative;
  text-align: center;
  color: var(--main);
  max-width: 1200px;
  padding: 20px;
}

.hero h1 {
  font-size: 70px;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.3;
}

.hero p {
  font-size: 22px;
  margin-bottom: 40px;
  opacity: 0.9;
}

/* 6. الأزرار (Buttons) */
.btn {
  padding: 14px 40px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
  transition: var(--transition);
  cursor: pointer;
  font-size: 17px;
  text-align: center;
}

.btn-primary {
  background-color: var(--main); 
  color: var(--Creamy);           
  border: 2px solid var(--main); 
}

.btn-primary:hover {
  background-color: var(--accent);
  border-color: var(--accent);
  color: var(--main);
  transform: translateY(-3px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--main);
  color: var(--main);
  margin-left: 15px;
}

.btn-outline:hover {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
  transform: translateY(-3px);
}

/* 7. تنسيقات الأقسام (Sections) */
section {
  padding: 100px 0;
}

h2 {
  text-align: center;
  margin-bottom: 60px;
  color: var(--main);
  font-size: 36px;
  font-weight: 800;
  position: relative;
}

h2::after {
  content: "";
  position: absolute;
  width: 80px;
  height: 4px;
  background: var(--accent);
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
}

.services {
  background: var(--gray);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service-box {
  background: var(--white);
  padding: 40px 30px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  font-weight: 700;
}

.service-box:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

/* 8. الإحصائيات (Stats) */
.stats {
  background: linear-gradient(135deg, var(--main), var(--dark));
  color: var(--white);
}

.stats h2 { color: var(--white); }

.stats .counter {
  font-size: 48px;
  font-weight: 800;
  color: var(--accent);
  display: block;
}

/* 9. المشاريع (Projects) */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.project {
  background: var(--main);
  color: var(--white);
  padding: 40px;
  border-radius: 20px;
  transition: var(--transition);
  cursor: pointer;
}

.project:hover {
  background: var(--secondary);
  transform: scale(1.03);
}

.project h3 {
  color: var(--accent);
  margin-bottom: 15px;
}

/* 10. التذييل (Footer) */
footer {
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 50px 0;
}

/* 11. تأثيرات الظهور عند التمرير (Reveal) */
.service-box, .project, .about p, .project-card, .value-card {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

.reveal {
  opacity: 1;
  transform: translateY(0);
}

/* 12. الاستجابة (Responsive Design) */
@media (max-width: 1024px) {
    .hero h1 { font-size: 55px; }
}

@media (max-width: 992px) {
  .hero h1 { font-size: 45px; }
  .hero p { font-size: 18px; }
}

@media (max-width: 768px) {
  header { height: 80px; }
  .menu-toggle { display: block; }

  nav {
    position: absolute;
    top: 80px;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--main);
    flex-direction: column;
    padding: 50px 30px;
    transition: 0.5s ease-in-out;
    box-shadow: -10px 0 30px rgba(0,0,0,0.3);
    align-items: flex-start;
  }

  nav.nav-active { right: 0; }
  nav a { margin: 15px 0; font-size: 18px; }

  .hero h1 { font-size: 32px; }
  .btn-outline { margin-left: 0; margin-top: 15px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 28px; }
  .container { width: 85%; }
  h2 { font-size: 26px; }
}

.fa-solid, .fas, .fab {
    font-family: "Font Awesome 6 Free" !important;
}