/* ================ TOKENS ================ */
:root {
  --primary: #00A4FF;
  --primary-dark: #00389B;
  --primary-light: #E6F4FF;
  --bg: #f7f7f7;
  --text: #1f2937;
  --text-light: #6b7280;
  --white: #ffffff;
  --success: #10b981;
  --border: #e5e7eb;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --gradient: linear-gradient(135deg, var(--primary), var(--primary-dark));
  --gradient-light: linear-gradient(135deg, var(--primary-light), rgba(0, 164, 255, 0.1));
}

/* ================ FONTAWESOME ICON FIXES ================ */
/* Ensure FontAwesome icons display properly in RTL */
[dir="rtl"] .fas,
[dir="rtl"] .far,
[dir="rtl"] .fab,
[dir="rtl"] .fa {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  display: inline-block !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  line-height: 1 !important;
}

/* Global FontAwesome icon fix for all pages */
.fas,
.far,
.fab,
.fa {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  display: inline-block !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  line-height: 1 !important;
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* ================ MAIN ABOUT SECTION ================ */
.about {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
}

.about::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 164, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 56, 155, 0.1) 0%, transparent 50%);
  z-index: 1;
}

.about .container {
  position: relative;
  z-index: 2;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
}

/* ================ HERO CARD ================ */
.about-hero-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  background: var(--white);
  border-radius: 2rem;
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.about-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient);
}

.about-hero-media {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-hero-media img {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.about-hero-media img:hover {
  transform: scale(1.05);
}

.about-hero-text {
  padding: 1rem 0;
}

.about-hero-text h3 {
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  line-height: 1.3;
  position: relative;
}

.about-hero-text h3::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60px;
  background: var(--gradient);
  border-radius: 2px;
}

.about-hero-text p {
  font-size: 1.125rem;
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 2rem;
}

/* ================ ABOUT GRID SECTION ================ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  padding: 0 1rem;
}

.about-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow);
  cursor: pointer;
}

.about-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.about-card:hover::before {
  transform: scaleX(1);
}

.about-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 164, 255, 0.02), rgba(0, 56, 155, 0.02));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.about-card:hover::after {
  opacity: 1;
}

.about-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.about-card h4 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}

.about-card:hover h4 {
  color: var(--primary);
}

.about-card p {
  font-size: 1.125rem;
  color: var(--text-light);
  line-height: 1.8;
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}

.about-card:hover p {
  color: var(--text);
}

/* Mission card specific styling */
.about-card:first-child {
  background: linear-gradient(135deg, var(--white) 0%, var(--primary-light) 100%);
}

.about-card:first-child h4::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0;
  font-size: 1.5rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.about-card:first-child:hover h4::before {
  opacity: 1;
  transform: translateX(0);
}

/* Vision card specific styling */
.about-card:last-child {
  background: linear-gradient(135deg, var(--white) 0%, rgba(0, 56, 155, 0.05) 100%);
}

.about-card:last-child h4::before {
  content: '';
  position: absolute;
  left: -2.5rem;
  top: 0;
  font-size: 1.5rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: all 0.3s ease;
}

.about-card:last-child:hover h4::before {
  opacity: 1;
  transform: translateX(0);
}

/* Animation for about-grid */
.about-grid {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.about-grid.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.about-card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.about-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.about-card:nth-child(1) {
  transition-delay: 0.2s;
}

.about-card:nth-child(2) {
  transition-delay: 0.4s;
}

/* Focus states for accessibility */
.about-card:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.about-card:focus h4 {
  color: var(--primary);
}

/* Responsive design for about-grid */
@media (max-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 0;
  }

  .about-card {
    padding: 2rem;
  }

  .about-card h4 {
    font-size: 1.5rem;
  }

  .about-card h4::before {
    display: none;
  }
}

@media (max-width: 480px) {
  .about-card {
    padding: 1.5rem;
  }

  .about-card h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .about-card p {
    font-size: 1rem;
  }
}

/* ================ VALUES SECTION ================ */
.values-section {
  padding: 6rem 0;
  background: var(--white);
  position: relative;
}

.values-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(0, 164, 255, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 90% 90%, rgba(0, 56, 155, 0.05) 0%, transparent 50%);
  z-index: 1;
}

.values-section .container {
  position: relative;
  z-index: 2;
}

.values-section .section-title h2 {
  color: var(--primary-dark);
}

.values-section .section-title p {
  font-size: 1.125rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.value-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.value-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.value-card:hover::before {
  transform: scaleX(1);
}

.value-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.value-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: var(--white);
  transition: all 0.3s ease;
}

.value-card:hover .value-icon {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0, 164, 255, 0.3);
}

.value-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}

.value-card:hover h3 {
  color: var(--primary);
}

.value-card p {
  color: var(--text-light);
  line-height: 1.7;
  font-size: 1rem;
}

/* ================ ANIMATIONS ================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

.about-hero-card {
  animation: fadeInUp 0.8s ease forwards;
}

.about-hero-media {
  animation: fadeInLeft 0.8s ease forwards;
}

.about-hero-text {
  animation: fadeInRight 0.8s ease forwards;
}

.value-card {
  animation: fadeInUp 0.6s ease forwards;
}

.value-card:nth-child(1) {
  animation-delay: 0.1s;
}

.value-card:nth-child(2) {
  animation-delay: 0.2s;
}

.value-card:nth-child(3) {
  animation-delay: 0.3s;
}

.value-card:nth-child(4) {
  animation-delay: 0.4s;
}

/* ================ RESPONSIVE DESIGN ================ */
@media (max-width: 992px) {
  .about-hero-card {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .about-hero-text h3::before {
    display: none;
  }

  .values-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }

  .about {
    padding: 3rem 0;
  }
}

@media (max-width: 768px) {
  .about-hero-card {
    padding: 2rem;
    border-radius: 1.5rem;
  }

  .value-card {
    padding: 2rem 1.5rem;
  }

  .values-section {
    padding: 4rem 0;
  }

  .section-title h2 {
    font-size: 2.5rem;
  }
}

@media (max-width: 480px) {
  .about {
    padding: 2rem 0;
  }

  .about-hero-card {
    padding: 1.5rem;
    margin: 0 1rem;
  }

  .value-card {
    padding: 1.5rem;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .section-title h2 {
    font-size: 2rem;
  }
}

/* ================ LOADER ================ */
.loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ================ CUSTOM SCROLLBAR ================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--gradient);
  border-radius: 4px;
  transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-dark), #002a7a);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary) #f1f5f9;
}

/* ================ CUSTOM SELECTION COLORS ================ */
::selection {
  background: rgba(0, 164, 255, 0.2);
  color: var(--primary-dark);
}

::-moz-selection {
  background: rgba(0, 164, 255, 0.2);
  color: var(--primary-dark);
}

/* ================ ENHANCED BACK TO TOP BUTTON ================ */
.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 0;
  background: var(--gradient);
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0, 164, 255, 0.4);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  font-size: 18px;
}

.back-to-top:hover {
  background: linear-gradient(135deg, var(--primary-dark), #002a7a);
  box-shadow: 0 12px 32px rgba(0, 164, 255, 0.5);
  transform: translateY(-2px) scale(1.05);
}

.back-to-top:active {
  transform: translateY(0) scale(0.95);
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

/* Pulse animation for attention */
.back-to-top.pulse {
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 8px 24px rgba(0, 164, 255, 0.4);
  }

  50% {
    box-shadow: 0 8px 24px rgba(0, 164, 255, 0.6), 0 0 20px rgba(0, 164, 255, 0.3);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .back-to-top {
    right: 16px;
    bottom: 16px;
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .back-to-top {
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    font-size: 14px;
  }
}

/* ================ INTERSECTION OBSERVER STYLES ================ */
.about-hero-card,
.value-card {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.about-hero-card.animate-in,
.value-card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ================ HOVER EFFECTS ================ */
.about-hero-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.value-card:hover .value-icon {
  animation: pulse 0.6s ease;
}

/* ================ FOCUS STATES ================ */
.value-card:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ================ PRINT STYLES ================ */
@media print {

  .back-to-top,
  .loader {
    display: none !important;
  }

  .about,
  .values-section {
    background: white !important;
  }

  .about-hero-card,
  .value-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}