/* 
========================================
CORE VARIABLES & RESET
========================================
*/
:root {
  --primary: #30455b; /* Dark Blue */
  --primary-dark: #203040; /* Darker Blue */
  --secondary: #2e7283; /* Teal */
  --accent: #d16d40; /* Orange */
  --accent-light: #e89a7d; /* Lighter Orange */
  --text-dark: #1a1a1a;
  --text-gray: #4a4a4a;
  --text-light: #f9f9f9;
  --bg-light: #ffffff;
  --bg-off-white: #f8f9fa;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
  --radius-md: 12px;
  --radius-lg: 24px;
  --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Noto Kufi Arabic", sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

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

/* 
========================================
UTILITY CLASSES & ANIMATIONS
========================================
*/
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 2.5rem;
  color: var(--primary);
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--secondary); /* Teal divider */
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-gray);
  margin-top: 24px;
}

/* Animation Classes */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 1s ease;
}

.fade-in.active {
  opacity: 1;
}

/* 
========================================
NAVIGATION
========================================
*/
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 12px 0;
  box-shadow: var(--shadow-sm);
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0; /* Remove gap */
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--primary);
}

.logo img {
  height: 50px;
  transition: var(--transition);
  margin-left: -8px; /* Negative margin to pull text closer */
}

.navbar.scrolled .logo img {
  height: 60px;
}

.nav-links {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-weight: 600;
  color: var(--text-light); /* Default for transparent header */
  position: relative;
  padding: 8px 0;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  right: 0; /* RTL */
  background-color: var(--accent);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.navbar.scrolled .nav-link {
  color: var(--primary);
}

.mobile-toggle {
    display: none; /* Hidden by default on desktop */
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--text-light); /* Default white */
    border-radius: 3px;
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

.navbar.scrolled .mobile-toggle .bar {
    background-color: var(--primary);
}

/* Hamburger Animation */
.mobile-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
    background-color: var(--primary); /* Force dark color when open */
}

.mobile-toggle.active .bar:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

.mobile-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -7px);
    background-color: var(--primary); /* Force dark color when open */
}

/* Logo Text */
.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  line-height: 1; /* Fix vertical alignment */
}

.navbar:not(.scrolled) .logo-text {
  color: var(--text-light); /* White/Light when transparent */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.navbar.scrolled .logo-text {
  color: var(--primary);
  text-shadow: none;
}

/* 
========================================
HERO SECTION
========================================
*/
@keyframes gradientBG {
  0% {
    background-position: 0% 50%, 0% 50%, center;
  }
  50% {
    background-position: 100% 50%, 100% 50%, center;
  }
  100% {
    background-position: 0% 50%, 0% 50%, center;
  }
}

.hero {
  height: 100vh;
  min-height: 600px;
  background: radial-gradient(
      circle at top right,
      rgba(209, 109, 64, 0.45),
      transparent 60%
    ),
    linear-gradient(135deg, rgba(48, 69, 91, 0.95), rgba(46, 114, 131, 0.9)),
    url("https://images.unsplash.com/photo-1577705998148-6da4f396c3d2?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80");
  background-size: 200% 200%, 200% 200%, cover;
  background-position: center;
  background-attachment: fixed;
  animation: gradientBG 15s ease infinite;
  display: flex;
  align-items: center;
  position: relative;
  color: var(--text-light);
  will-change: background-position;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

/* Hero Animations */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-logo-container {
  width: 480px;
  max-width: 90%;
  margin: 0 auto 20px auto; /* Reduced margin for text below */
  opacity: 0;
  animation: logoReveal 1.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards,
    breathe 6s ease-in-out infinite 2s;
  display: flex;
  justify-content: center;
  perspective: 1000px;
}

.hero-logo-text-en {
  font-family: "Outfit", sans-serif; /* Modern Sans */
  font-size: 0.9rem;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 30px;
  opacity: 0;
  animation: fadeInUp 1s forwards 1.2s;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-logo {
  width: 100%;
  height: auto;
  /* Static premium shadow, no transition to avoid lag */
  filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.4));
  transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  transform-style: preserve-3d;
  will-change: transform;
}

.hero-logo:hover {
  transform: scale(1.05) rotateX(10deg) translateY(-10px);
  /* Removed dynamic filter change for performance */
}

@keyframes logoReveal {
  0% {
    opacity: 0;
    transform: scale(0.8) translateY(40px);
    filter: blur(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 20px 50px rgba(0, 0, 0, 0.4));
  }
  50% {
    transform: scale(1.03);
    filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.5));
  }
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
  opacity: 0;
  animation: textSlideUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.8s; /* Staggered */
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 40px;
  opacity: 0.9;
  max-width: 600px;
  opacity: 0;
  animation: fadeInUp 1s forwards 0.8s;
}

.btn {
  display: inline-block;
  padding: 16px 48px;
  background-color: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 50px;
  border: 2px solid var(--accent);
  transition: var(--transition);
  opacity: 0;
  animation: fadeInUp 1s forwards 1.1s;
  cursor: pointer;
}

.btn:hover {
  background-color: transparent;
  color: #fff;
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: #fff;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes textSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
    clip-path: inset(100% 0 0 0);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0 0);
  }
}

/* 
========================================
ABOUT SECTION
========================================
*/
.about-content {
  max-width: 800px;
  margin: 60px auto 0;
  text-align: center;
  display: block;
  /* Container Styling */
  background-color: #ffffff;
  padding: 60px 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(48, 69, 91, 0.05);
}

.about-text h3 {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 30px;
  font-weight: 800;
}

.about-text p {
  margin-bottom: 24px;
  color: var(--text-gray);
  font-size: 1.1rem;
  line-height: 1.9;
}

/* Removed .about-image styles */

.about-image img {
  width: 100%;
  transition: var(--transition);
}

.about-image:hover img {
  transform: scale(1.05);
}

/* Values Cards */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 80px;
}

.value-card {
  background: #fff;
  padding: 40px 30px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.value-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.value-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: rgba(46, 114, 131, 0.1); /* Teal tint */
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary); /* Teal Icon */
}

.value-icon svg {
  width: 40px;
  height: 40px;
  fill: currentColor;
}

.value-card h4 {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 12px;
}

/* 
========================================
SECTORS SECTION
========================================
*/
.bg-light {
  background-color: var(--bg-off-white);
}

.sector-card {
  display: flex;
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
  transition: var(--transition);
}

.sector-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.sector-card:nth-child(even) {
  flex-direction: row-reverse;
}

.sector-img {
  flex: 1;
  min-height: 400px;
}

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

.sector-info {
  flex: 1;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sector-info h3 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.sector-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.tag {
  background: rgba(0, 40, 85, 0.05);
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
}

/* 
========================================
CONTACT SECTION
========================================
*/
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.contact-info {
  background-color: var(--primary);
  padding: 60px 40px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
}

.info-icon {
  color: var(--accent);
  font-size: 1.5rem;
  margin-top: 4px;
}

.contact-form-wrapper {
  padding: 60px;
}

.form-group {
  margin-bottom: 24px;
  position: relative;
}

.form-control {
  width: 100%;
  padding: 16px;
  background: var(--bg-off-white);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(164, 134, 80, 0.1);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* 
========================================
FOOTER
========================================
*/
footer {
  background-color: var(--primary);
  color: var(--text-light);
  padding: 60px 0 20px;
  text-align: center;
}

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

.footer-logo img {
  height: 150px;
  display: block;
  margin: 0 auto 20px auto;
  filter: brightness(0) invert(1);
}

.copyright {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* 
========================================
RESPONSIVE
========================================
*/
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .about-content {
    padding: 40px 30px;
  } /* Reduce container padding */
  .values-grid {
    grid-template-columns: 1fr;
  }
  .sector-card,
  .sector-card:nth-child(even) {
    flex-direction: column;
  }
  .sector-img {
    height: 300px;
  }
  .sector-info {
    padding: 40px 24px;
  }
  .contact-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
    .nav-links { 
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 20px;
        box-shadow: var(--shadow-md);
        text-align: center;
        gap: 20px;
        
        /* Hidden state */
        visibility: hidden;
        opacity: 0;
        transform: translateY(-20px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
    }
    .mobile-toggle { display: flex; } /* Ensure it shows as flex on mobile */
    .hero-title { font-size: 2rem; }
    .section { padding: 60px 0; }
    
    .nav-links.mobile-active {
        /* Active state */
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
  .nav-link::after {
    bottom: -5px;
  }

  /* Force dark text on mobile menu regardless of header state */
  .nav-links.mobile-active .nav-link {
    color: var(--primary) !important;
  }
}

@media (max-width: 480px) {
  .hero-logo-container {
    width: 90%;
    max-width: 280px;
    margin-bottom: 20px;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .section {
    padding: 40px 0;
  }
  .section-title {
    font-size: 2rem;
  }
  .about-content {
    padding: 40px 20px;
    margin-top: 40px;
  } /* Tighter mobile padding */
  .about-text h3 {
    font-size: 1.8rem;
  }
  .logo-text {
    font-size: 0.9rem;
  }
  .logo img {
    height: 40px;
  }
  .btn {
    width: 100%;
    text-align: center;
  }
  .sector-img {
    height: 250px;
  }
}
