/* CRITICAL CSS - Above the fold styles for faster rendering */
/* Critical styles for hero section and navbar */
:root {
  --tedra-blue: #0a2342;
  --tedra-light-blue: #2e5c9a;
  --tedra-accent: #eaf1fa;
  --tedra-white: #fff;
  --tedra-gray: #f5f7fa;
  --tedra-dark: #181c22;
  --tedra-text: #222;
  --tedra-muted: #6c757d;
  --tedra-primary: var(--tedra-blue);
  --tedra-secondary: var(--tedra-light-blue);
}

/* Critical layout styles */
html, body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Enhanced Language Switcher Styles */
.language-switcher-container {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 25px;
  padding: 3px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.navbar.scrolled .language-switcher-container {
  background: rgba(10, 35, 66, 0.05);
  border: 1px solid rgba(10, 35, 66, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#lang-ar, #lang-en {
  position: relative;
  min-width: 44px;
  height: 36px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
}

#lang-ar::before, #lang-en::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--tedra-primary), var(--tedra-secondary));
  border-radius: 20px;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

#lang-ar:hover::before, #lang-en:hover::before {
  opacity: 1;
}

#lang-ar:hover, #lang-en:hover {
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 35, 66, 0.3);
}

#lang-ar:active, #lang-en:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(10, 35, 66, 0.2);
}

/* Active state styling */
#lang-ar.active, #lang-en.active {
  color: white;
  background: linear-gradient(135deg, var(--tedra-primary), var(--tedra-secondary));
  box-shadow: 0 4px 12px rgba(10, 35, 66, 0.3);
  transform: scale(1.05);
}

/* Navbar scrolled state */
.navbar.scrolled #lang-ar,
.navbar.scrolled #lang-en {
  color: var(--tedra-text);
}

.navbar.scrolled #lang-ar:hover,
.navbar.scrolled #lang-en:hover {
  color: white;
}

.navbar.scrolled #lang-ar.active,
.navbar.scrolled #lang-en.active {
  color: white;
}

/* Hidden state */
#lang-ar.hidden, #lang-en.hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transform: scale(0.8) !important;
}

/* Force hide language buttons by default until JavaScript initializes */
#lang-ar:not(.initialized), #lang-en:not(.initialized) {
  display: none !important;
  visibility: hidden !important;
}

/* Language switcher container responsive */
@media (max-width: 767px) {
  .language-switcher-container {
    padding: 2px;
  }
  
  #lang-ar, #lang-en {
    min-width: 40px;
    height: 32px;
    font-size: 12px;
  }
}

/* Smooth animation for language switch */
@keyframes languageSwitch {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

#lang-ar.switching, #lang-en.switching {
  animation: languageSwitch 0.3s ease-in-out;
}

body {
  font-family: 'Tajawal','Kanun AR', 'Cairo', 'Montserrat', Arial, sans-serif;
  background: var(--tedra-gray);
  color: var(--tedra-text);
  line-height: 1.7;
}

/* Critical navbar styles */
.navbar {
  transition: all 0.3s ease;
  z-index: 1030;
}

.navbar.bg-transparent {
  background: transparent !important;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95) !important;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Critical hero carousel styles */
.hero-carousel-section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: 400px;
  position: relative;
}

.carousel-item img {
  object-fit: cover;
  height: 100vh;
  min-height: 400px;
  width: 100%;
}

.carousel-caption {
  background: rgba(0, 0, 0, 0.5);
  border-radius: 0;
}

.text-shadow {
  text-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

/* Critical button styles */
.btn {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  color: #fff;
  background-color: var(--tedra-primary);
  border-color: var(--tedra-primary);
}

.btn-outline-light {
  color: #fff;
  border-color: #fff;
  background-color: transparent;
}

.btn-lg {
  padding: 0.5rem 1rem;
  font-size: 1.25rem;
  border-radius: 0.3rem;
}

/* Critical responsive styles */
@media (max-width: 991px) {
  .carousel-item img {
    height: 80vh;
  }
}

@media (max-width: 767px) {
  .carousel-item img {
    height: 60vh;
  }
}

/* TEDRA MODERN FLAT DESIGN - Full Styles */
[data-aos] {
  max-width: 100vw;
  box-sizing: border-box;
}

section {
  padding-top: 60px;
  padding-bottom: 60px;
}

.section-bg-white {
  background: var(--tedra-white);
  position: relative;
  z-index: 1;
}
.section-bg-light {
  background: #f5f7fa !important;
}
.section-bg-blue {
  background: linear-gradient(120deg, #0a2342 0%, #2e5c9a 100%);
  position: relative;
  z-index: 1;
}
.section-bg-dark {
  background: var(--tedra-dark);
}

.container {
  margin: 0 auto;
}

/* HERO CAROUSEL MINIMAL OVERRIDES */
#home.hero-carousel-section {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  min-height: 400px;
}
.carousel-item img {
  object-fit: cover;
  height: 100vh;
  min-height: 400px;
}
.text-shadow {
  text-shadow: 0 4px 8px rgba(0,0,0,0.5);
}
@media (max-width: 991px) {
  .carousel-item img {
    height: 80vh;
  }
  section {
    padding-top: 40px;
    padding-bottom: 40px;
  }
}
@media (max-width: 767px) {
  .carousel-item img {
    height: 60vh;
  }
  section {
    padding-top: 24px;
    padding-bottom: 24px;
  }
}
/* Scroll Down Indicator (keep for style) */
.position-absolute.bottom-0.start-50.translate-middle-x.mb-3.z-3 a {
  transition: background 0.2s, border 0.2s;
}
.position-absolute.bottom-0.start-50.translate-middle-x.mb-3.z-3 a:hover {
  background: rgba(255,255,255,0.5);
  border-color: #fff;
}
/* Remove old custom hero carousel styles */
.carousel-overlay, .carousel-content, .carousel-logo, .carousel-title, .carousel-subtitle, .carousel-buttons { display: unset !important; background: unset !important; box-shadow: unset !important; animation: unset !important; padding: unset !important; margin: unset !important; font-size: unset !important; font-weight: unset !important; color: unset !important; border-radius: unset !important; }

/* SECTION HEADINGS */
section h2, section h3, section h4, section h5 {
  color: var(--tedra-primary);
  font-weight: 700;
}
.section-bg-blue h2,
.section-bg-blue h3,
.section-bg-blue h4,
.section-bg-blue h5 {
  color: var(--tedra-white);
}

/* ABOUT */
#about img.img-fluid {
  /* clip-path: polygon(10% 0%, 90% 0%, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0% 90%, 0% 10%); */
  /* border-radius: 0 !important; */

}
#about ul {
  margin-top: 24px;
}
#about li {
  color: var(--tedra-muted);
  font-size: 1.05rem;
  margin-bottom: 8px;
}
#about i {
  color: var(--tedra-primary);
}

/* DOWNLOAD APP */
#download-app {
  text-align: center;
}
#download-app h2 {
  color: var(--tedra-white);
}
#download-app p {
  color: #eaf1fa;
}
#download-app img {
  border-radius: 16px;
  box-shadow: 0 4px 24px 0 rgba(10,35,66,0.10);
}
#download-app .btn-dark {
  background: #222;
  color: #fff;
  border: none;
  border-radius: 6px;
  margin-bottom: 8px;
  transition: background 0.2s;
}
#download-app .btn-dark:hover {
  background: var(--tedra-secondary);
  color: #fff;
}
#download-app ul li {
  color: #eaf1fa;
  font-size: 1.05rem;
}

/* CARDS (flat, minimal) */
.card {
  background: var(--tedra-white);
  border-radius: 12px;
  box-shadow: 0 2px 12px 0 rgba(10,35,66,0.06);
  border: 1px solid #eaf1fa;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: 0 6px 24px 0 rgba(10,35,66,0.12);
  transform: translateY(-2px) scale(1.01);
}
.card .fa-2x {
  color: var(--tedra-primary);
}
.section-bg-blue .card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}
.achievement-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}
.achievement-card .fa-2x,
.achievement-card .display-5,
.achievement-card .text-white-50 {
  color: #fff !important;
}

/* ICONS */
.card i, .contact-icon i {
  color: var(--tedra-primary);
}
.section-bg-blue .card i, .section-bg-blue .achievement-card i {
  color: #fff;
}

/* VALUES */
#values {
  background: linear-gradient(120deg, #f5f7fa 0%, #eaf1fa 100%);
  padding-top: 96px;
  padding-bottom: 64px;
}
#values h2 {
  margin-bottom: 3.5rem !important;
  margin-top: 2.5rem !important;
  position: relative;
  z-index: 3;
}
#values .card {
  background: rgba(255,255,255,0.75);
  border: 1.5px solid #eaf1fa;
  border-radius: 22px;
  box-shadow: 0 8px 32px 0 rgba(10,35,66,0.10);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 2.2rem 1.5rem 2rem 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  z-index: 1;
}
#values .card:hover {
  box-shadow: 0 16px 40px 0 rgba(10,35,66,0.18);
  transform: translateY(-6px) scale(1.03);
}
#values .card .mb-3 {
  margin-bottom: 1.5rem !important;
  margin-top: -2.5rem !important;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}
#values .card i {
  background: linear-gradient(135deg, #eaf1fa 0%, #b6c9e6 100%);
  color: #0a2e5c;
  font-size: 2.7rem;
  border-radius: 50%;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  margin-top: -20px;
  margin-bottom: 0.5rem;
  box-shadow: 0 6px 24px 0 rgba(10,35,66,0.13);
  border: 4px solid #fff;
  position: relative;
  z-index: 2;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
#values .card:hover i,
#values .card:hover i svg {
  color: #fff !important;
  fill: #fff !important;
}
#values .card {
  padding-top: 3.5rem;
}
#values .card h4 {
  font-size: 1.3rem;
  font-weight: 900;
  color: #0a2342;
  margin-bottom: 1rem;
}
#values .card p {
  color: #6c757d;
  font-size: 1.08rem;
  font-weight: 500;
}
@media (max-width: 991px) {
  #values .card { padding: 1.5rem 1rem 1.2rem 1rem; }
  #values { padding-top: 40px; padding-bottom: 40px; }
}
@media (max-width: 767px) {
  #values .card { margin-bottom: 1.5rem; }
  #values { padding-top: 24px; padding-bottom: 24px; }
}

/* SERVICES */
#services .card {
  min-height: 220px;
}
#services h5 {
  font-size: 1.1rem;
}

/* ACHIEVEMENTS */
#achievements .card {
  min-height: 200px;
}
#achievements .display-5 {
  font-size: 2.2rem;
  font-weight: 700;
}

/* CONTACT */
#contact .card {
  background: var(--tedra-accent);
  border: 1px solid #dbe6f6;
  border-radius: 10px;
}
#contact .contact-icon i {
  color: var(--tedra-primary);
}
#contact h5 {
  color: var(--tedra-primary);
}

/* FOOTER */
footer {
  background: var(--tedra-dark);
  color: #fff;
  font-size: 1rem;
}
footer h5 {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
}
footer .footer-links a,
footer .footer-contact span {
  color: #eaf1fa;
  text-decoration: none;
  transition: color 0.2s;
}
footer .footer-links a:hover {
  color: #fff;
}
footer .footer-contact i {
  color: var(--tedra-secondary);
}
footer hr {
  border-color: #2e5c9a33;
}

/* SOCIAL ICONS */
footer .fs-4 {
  font-size: 1.5rem !important;
}
footer a.text-white-50:hover {
  color: #fff !important;
}

/* RESPONSIVE */
@media (max-width: 991px) {
  .container {
    /* padding: 0 8px; */
  }
  section {
    padding-top: 40px;
    padding-bottom: 40px;
  }
  .card {
    min-height: unset !important;
  }
  .navbar-collapse.show {
    background: var(--tedra-primary);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: #fff;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 8px 32px 0 rgba(10,35,66,0.08);
    padding: 1.5rem 0;
    transition: background 0.3s;
  }
  .navbar.scrolled .navbar-collapse.show {
    background: #fff;
    color: var(--tedra-primary);
  }
  .navbar-nav {
    display: block !important;
    width: 100%;
    padding: 0 2rem;
    direction: rtl;
    text-align: right;
  }
  .navbar-nav .nav-link {
    color: #fff !important;
    font-size: 1.5rem;
    text-align: right;
    margin-bottom: 1.2rem;
    direction: rtl;
    display: block;
  }
  .navbar.scrolled .navbar-nav .nav-link {
    color: var(--tedra-primary) !important;
  }
  .navbar-toggler[aria-expanded="true"] .custom-toggler-icon span {
    background: #fff !important;
  }
  .navbar.scrolled .navbar-toggler[aria-expanded="true"] .custom-toggler-icon span {
    background: var(--tedra-primary) !important;
  }
}
@media (max-width: 767px) {
  .hero-carousel-section {
    min-height: 400px;
  }
  .carousel-title {
    font-size: 2rem;
  }
  .carousel-subtitle {
    font-size: 1rem;
  }
  .carousel-content {
    padding: 1rem;
  }
  .carousel-buttons .btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
    margin: 0.3rem;
  }
  .carousel-control-prev,
  .carousel-control-next {
    width: 40px;
    height: 40px;
    margin: 0 0.5rem;
  }
  .carousel-indicators {
    bottom: 20px;
  }
  .carousel-indicators button {
    width: 10px;
    height: 10px;
    margin: 0 4px;
  }
  .section-bg-blue::before,
  .section-bg-white::after {
    height: 32px;
    top: -20px;
    bottom: -20px;
  }
  #app-download .phone-frame {
    width: 220px;
    height: 400px;
  }
  #app-download .app-mockup-wrapper {
    min-height: 260px;
    padding: 2rem 0;
  }
  section {
    padding-top: 24px;
    padding-bottom: 24px;
  }
}
@media (max-width: 575px) {
  .hero-carousel-section {
    min-height: 350px;
  }
  .carousel-title {
    font-size: 1.8rem;
  }
  .carousel-subtitle {
    font-size: 0.9rem;
  }
  .carousel-buttons {
    flex-direction: column;
    align-items: center;
  }
  .carousel-buttons .btn {
    width: 200px;
    margin: 0.3rem 0;
  }
  .carousel-control-prev,
  .carousel-control-next {
    display: none;
  }
  #app-download .phone-frame {
    width: 180px;
    height: 340px;
  }
  #app-download .app-mockup-wrapper {
    min-height: 220px;
    padding: 1.5rem 0;
  }
}

/* UTILITY */
.fw-bold { font-weight: 700; }
.text-center { text-align: center; }
.text-white { color: #fff !important; }
.text-white-50 { color: #eaf1fa !important; }
.text-primary { color: var(--tedra-primary) !important; }
.text-muted, .text-secondary { color: var(--tedra-muted) !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 2rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.d-flex { display: flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.text-md-start { text-align: left !important; }
.text-md-end { text-align: right !important; }
@media (max-width: 767px) {
  .text-md-start, .text-md-end { text-align: center !important; }
}

/* BUTTONS */
.btn {
  display: inline-block;
  font-weight: 500;
  padding: 0.7rem 2rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.btn-lg {
  font-size: 1.1rem;
  padding: 0.9rem 2.5rem;
}
.btn-primary {
  background: var(--tedra-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--tedra-secondary);
}
.btn-outline-primary {
  background: transparent;
  color: var(--tedra-primary);
  border: 2px solid var(--tedra-primary);
}
.btn-outline-primary:hover {
  background: var(--tedra-primary);
  color: #fff;
}

/* Hide old floating shapes, glass, and special effects */
.floating-shapes, .floating-elements, .glass-card, .popout-card, .pill-card, .wave-card, .bordered-card, .floating-card, .about-img-wrapper .experience-badge, .year-badge, .card-watermark, .card-star-bg, .about-content .content-en, .about-content .content-ar, .about-features .feature-item, .about-img-wrapper, .about-img-wrapper .experience-badge, .about-img-wrapper:before, .about-img-wrapper:after {
  display: none !important;
}

.transition-navbar {
  transition: background 0.3s, box-shadow 0.3s;
}
.navbar.bg-transparent {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}
.navbar.bg-white {
  background: #fff !important;
}
.navbar.scrolled {
  color: #222 !important;
}
.navbar .navbar-nav .nav-link {
  color: #222 !important;
}
.navbar .navbar-brand {
  color: #222 !important;
}

.navbar.bg-transparent .navbar-nav .nav-link,
.navbar.bg-transparent .navbar-brand,
.navbar.bg-transparent .brand-text,
.navbar.bg-transparent .navbar-brand span {
  color: #fff !important;
  transition: color 0.3s;
}
.navbar.scrolled .navbar-nav .nav-link,
.navbar.scrolled .navbar-brand,
.navbar.scrolled .brand-text,
.navbar.scrolled .navbar-brand span {
  color: #222 !important;
}

/* SOCIAL LINKS MODERN */
.social-links {
  gap: 2rem !important;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--tedra-accent);
  color: var(--tedra-primary);
  font-size: 2rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
  box-shadow: 0 2px 8px 0 rgba(10,35,66,0.06);
  text-decoration: none;
}
.social-link:hover {
  transform: scale(1.12) translateY(-2px);
  box-shadow: 0 6px 24px 0 rgba(10,35,66,0.12);
  background: var(--tedra-primary);
  color: #fff;
}
.social-link .fa-instagram { color: #E4405F; }
.social-link .fa-tiktok { color: #000; }
.social-link .fa-twitter { color: #1DA1F2; }
.social-link .fa-linkedin { color: #0077B5; }
.social-link:hover .fa-instagram,
.social-link:hover .fa-tiktok,
.social-link:hover .fa-twitter,
.social-link:hover .fa-linkedin {
  color: #fff;
}
@media (max-width: 575px) {
  .social-link {
    width: 44px;
    height: 44px;
    font-size: 1.4rem;
  }
  .social-links {
    gap: 1rem !important;
  }
}

/* TEDRA LOGO-INSPIRED TOUCHES (NEW) */
/* Remove previous section edge effects */
.section-bg-blue::before,
.section-bg-white::after {
  display: none !important;
}

/* Geometric motif SVG pattern as background */
.section-bg-white, .section-bg-blue {
  position: relative;
  z-index: 1;
}
.section-bg-white::before, .section-bg-blue::before {
  display: none !important;
}

/* Logo-inspired geometric shape on side of section */
.section-bg-blue:not(.no-bg-shape) {
  position: relative;
  overflow: hidden;
}
.section-bg-blue:not(.no-bg-shape) .tedra-bg-shape {
  content: '';
  position: absolute;
  top: 50%;
  right: -120px;
  transform: translateY(-50%);
  width: 320px;
  height: 320px;
  opacity: 0.07;
  z-index: 0;
  pointer-events: none;
}
.section-bg-white:not(.no-bg-shape) {
  position: relative;
  overflow: hidden;
}
.section-bg-white:not(.no-bg-shape) .tedra-bg-shape {
  content: '';
  position: absolute;
  top: 50%;
  left: -120px;
  transform: translateY(-50%);
  width: 320px;
  height: 320px;
  opacity: 0.07;
  z-index: 0;
  pointer-events: none;
}
/* Remove background shape from contact section */
#contact.section-bg-white {
  background: linear-gradient(135deg, #e3eaf3 0%, #eaf1fa 100%) !important;
}
#contact .tedra-bg-shape { display: none !important; }

/* Remove the blue accent bar at the top of each section */
section::after {
  display: none !important;
}

.contact-logo-bg {
  position: relative;
  background-image: url('assets/logo.png');
  background-repeat: no-repeat;
  background-position: right 40px center;
  background-size: 320px auto;
  opacity: 1;
}
@media (max-width: 991px) {
  .contact-logo-bg {
    background-size: 180px auto;
    background-position: right 10px center;
  }
}
@media (max-width: 575px) {
  .contact-logo-bg {
    background-size: 100px auto;
    background-position: right 0px center;
  }
}
.contact-logo-bg:before {
  content: '';
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0.85;
  pointer-events: none;
  z-index: 0;
}
/* Social icon blue ring */
.social-link {
  box-shadow: 0 0 0 4px #eaf1fa, 0 2px 8px 0 rgba(10,35,66,0.06);
  position: relative;
  z-index: 1;
}
.social-link:hover {
  box-shadow: 0 0 0 6px #2e5c9a33, 0 6px 24px 0 rgba(10,35,66,0.12);
}
/* Enhance blue gradients for logo inspiration */
.section-bg-blue {
  background: linear-gradient(120deg, #0a2342 0%, #2e5c9a 100%);
}

/* SERVICES SECTION REDESIGN */
.services-title {
  font-size: 2.6rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 2.5rem !important;
  color: #fff;
}
.services-grid {
  opacity: 1 !important;
  display: flex !important;
  z-index: 1;
}
.service-card {
  position: relative;
  background: #fff;
  border-radius: 18px 0 18px 0 !important;
  box-shadow: 0 4px 24px 0 rgba(10,35,66,0.08);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  border: none;
  overflow: hidden;
  z-index: 1;
}

/* Top-right: premium stepped notch */
.service-card::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 32px;
  width: 48px;
  height: 48px;
  background: #eaf1fa;
  opacity: 0.5;
  z-index: 0;
  border-radius: 8px;
  transform: rotate(8deg);
  filter: blur(0.5px);
  box-shadow: 0 4px 24px 0 rgba(10,35,66,0.06);
  pointer-events: none;
}

/* Bottom-left: premium stepped notch */
.service-card::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 64px;
  height: 64px;
  background: none;
  border-top: 0;
  border-right: 0;
  border-left: 0;
  border-bottom: 0;
  z-index: 2;
  pointer-events: none;
  /* Modern stepped notch using clip-path and border */
  box-shadow:
    7px 0 0 0 #b6c9e6,
    0 -7px 0 0 #b6c9e6,
    7px -7px 0 0 #b6c9e6;
  clip-path: polygon(0 100%, 100% 100%, 100% 60%, 60% 60%, 60% 0, 0 0);
}

.service-card-accent {
  position: absolute;
  top: 0; right: 0;
  width: 54px; height: 54px;
  background: #0a2e5c;
  clip-path: polygon(100% 0, 0 0, 100% 100%);
  z-index: 2;
  border-top-right-radius: 18px;
  opacity: 0.13;
  pointer-events: none;
}
.service-card:hover {
  box-shadow: 0 12px 32px 0 rgba(10,35,66,0.16);
  transform: translateY(-6px) scale(1.03);
}
.service-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #0a2e5c;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
  box-shadow: 0 2px 12px 0 rgba(10,35,66,0.10);
  color: #fff;
  font-size: 2.2rem;
  z-index: 3;
  position: relative;
  transition: background 0.2s, box-shadow 0.2s;
}
.service-card:hover .service-icon {
  background: #2e5c9a;
  box-shadow: 0 4px 24px 0 rgba(10,35,66,0.18);
}
.service-icon i {
  color: #fff;
  font-size: 2.6rem;
  margin: 0;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.service-card h4 {
  color: #0a2e5c;
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 0.7rem;
}
.service-card p {
  color: #444;
  font-size: 1.02rem;
  font-weight: 500;
}
@media (max-width: 991px) {
  .service-card {
    padding: 1.5rem 1rem 1rem 1rem;
  }
}
@media (max-width: 767px) {
  .service-card {
    padding: 1.2rem 0.7rem 0.7rem 0.7rem;
  }
}

.section-bg-light .services-title {
  color: #23365e !important;
}
.section-bg-light .service-card h4,
.section-bg-light .service-card p {
  color: #181c22 !important;
}

.section-bg-light::after {
  display: none !important;
}
.section-bg-light .tedra-bg-shape {
  position: absolute !important;
  top: 40px !important;
  left: 40px !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  z-index: 0 !important;
  opacity: 0.03 !important;
  pointer-events: none;
}

/* CONTACT SECTION MODERN UI/UX */
.contact-card {
  background: #fff !important;
  border: 2.5px solid #c2d3e6;
  box-shadow: 0 8px 32px 0 rgba(10,35,66,0.13);
  border-radius: 28px;
  padding: 1.5rem 1.5rem;
  margin-bottom: 2.5rem;
}
.contact-card .contact-icon {
  color: #fff !important;
  box-shadow: 0 2px 8px 0 rgba(35,54,94,0.10);
}
.social-media {
  margin-bottom: 2.5rem !important;
}
.social-links {
  margin-bottom: 2.5rem !important;
}
.social-link {
  background: #fff !important;
  border: 2.5px solid #eaf1fa;
  box-shadow: 0 2px 12px 0 rgba(35,54,94,0.08);
  color: #23365e !important;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s, border 0.2s, transform 0.2s;
}
.social-link:hover {
  background: #23365e !important;
  color: #fff !important;
  border-color: #2e5c9a;
  box-shadow: 0 8px 32px 0 rgba(35,54,94,0.14);
  transform: scale(1.08);
}
.contact-panel {
  background: #fff !important;
  border: 2px solid #c2d3e6;
  box-shadow: 0 12px 48px 0 rgba(10,35,66,0.16);
  border-radius: 26px;
  padding: 2.5rem 2rem;
  margin-top: 2.5rem;
}
.form-control {
  background: #fff !important;
  border: 1.8px solid #c2d3e6;
  border-radius: 12px;
  font-size: 1.12rem;
  box-shadow: none;
}
.form-control:focus, .form-control:hover {
  border-color: #2e5c9a;
  box-shadow: 0 2px 12px 0 rgba(35,54,94,0.10);
  background: #fff;
}
.btn-primary {
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.8rem 2.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 12px 0 rgba(35,54,94,0.10);
  background: #23365e;
  border: none;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
 #lang-en, #lang-ar{
  padding: 0.3rem 0.2rem;

}

/* Fix for h1 font-size deprecation warning */
/* Explicit font-size declarations for h1 tags within section elements */
section h1,
section h1.display-4,
section h1.text-white,
section h1.fw-bold,
section h1.mb-3,
section h1.text-shadow {
  font-size: 3.5rem !important;
  line-height: 1.2 !important;
}

/* CLS Prevention - Font loading optimization */
@font-face {
  font-family: 'KanunAR';
  src: url('fonts/JLCSSK-KanunAR-LT-Light.ttf') format('truetype');
  font-display: swap;
  font-weight: 300;
}

@font-face {
  font-family: 'KanunAR';
  src: url('fonts/JLCSSK-KanunAR-LT-Regular.ttf') format('truetype');
  font-display: swap;
  font-weight: 400;
}

/* Prevent layout shifts during font loading */
body {
  font-display: swap;
}

/* Reserve space for images to prevent CLS */
.carousel-item img {
  width: 100% !important;
  height: 100vh !important;
  min-height: 400px !important;
  aspect-ratio: 16/9 !important;
  object-fit: cover !important;
}

/* LCP Optimization for hero image */
.hero-lcp-image {
  contain: layout style paint;
  will-change: auto;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Ensure first carousel item is visible for LCP */
.carousel-item.active {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Prevent text layout shifts */
h1, h2, h3, h4, h5, h6 {
  font-display: swap;
  min-height: 1.2em;
}

/* Reserve space for dynamic content */
.carousel-caption {
  min-height: 200px;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
}

/* Prevent button layout shifts */
.btn {
  min-height: 44px;
  min-width: 120px;
}

/* Mobile performance optimizations */
@media (max-width: 768px) {
  /* Optimize images for mobile - keep full height */
  .carousel-item img {
    height: 100vh !important;
    min-height: 400px !important;
  }
  
  /* Reduce font sizes for mobile */
  .display-4 {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
  
  .lead {
    font-size: 1rem !important;
  }
  
  /* Optimize buttons for mobile */
  .btn-lg {
    font-size: 0.9rem !important;
    padding: 0.5rem 1rem !important;
  }
}

/* Specific override for text-white h1 tags (privacy and terms pages) */
section h1.text-white:not(.display-4) {
  font-size: 2.5rem !important;
  line-height: 1.3 !important;
}

/* Additional comprehensive fix for all h1 tags within section, article, aside, or nav */
section h1,
article h1,
aside h1,
nav h1 {
  font-size: 3.5rem !important;
  line-height: 1.2 !important;
}

/* Specific overrides for different contexts */
section h1.text-white:not(.display-4),
article h1.text-white:not(.display-4),
aside h1.text-white:not(.display-4),
nav h1.text-white:not(.display-4) {
  font-size: 2.5rem !important;
  line-height: 1.3 !important;
}

/* Responsive font sizes for h1 tags */
@media (max-width: 991px) {
  section h1,
  section h1.display-4,
  article h1,
  aside h1,
  nav h1 {
    font-size: 2.8rem !important;
  }
  
  section h1.text-white:not(.display-4),
  article h1.text-white:not(.display-4),
  aside h1.text-white:not(.display-4),
  nav h1.text-white:not(.display-4) {
    font-size: 2rem !important;
  }
}

@media (max-width: 767px) {
  section h1,
  section h1.display-4,
  article h1,
  aside h1,
  nav h1 {
    font-size: 2.2rem !important;
  }
  
  section h1.text-white:not(.display-4),
  article h1.text-white:not(.display-4),
  aside h1.text-white:not(.display-4),
  nav h1.text-white:not(.display-4) {
    font-size: 1.8rem !important;
  }
}

@media (max-width: 575px) {
  section h1,
  section h1.display-4,
  article h1,
  aside h1,
  nav h1 {
    font-size: 1.8rem !important;
  }
  
  section h1.text-white:not(.display-4),
  article h1.text-white:not(.display-4),
  aside h1.text-white:not(.display-4),
  nav h1.text-white:not(.display-4) {
    font-size: 1.5rem !important;
  }
}
.btn-primary:hover, .btn-primary:focus {
  background: #2e5c9a;
  box-shadow: 0 6px 24px 0 rgba(35,54,94,0.16);
  transform: translateY(-2px) scale(1.03);
}
.contact-feedback {
  min-height: 24px;
  font-size: 1.08rem;
  text-align: center;
  color: #fff;
  background: none;
  border-radius: 8px;
  margin-top: 1rem;
}
#contact h2, #contact h4 {
  color: #23365e !important;
  font-weight: 900;
}

/* APP DOWNLOAD MODERN SPLIT LAYOUT */
#app-download {
  background: linear-gradient(120deg, #0a2342 0%, #2e5c9a 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
}
#app-download h2, #app-download .lead {
  color: #fff;
}
#app-download .app-features {
  margin-bottom: 2rem;
}
#app-download .feature-item {
  background: rgba(255,255,255,0.10);
  border-radius: 12px;
  padding: 0.7rem 1.2rem;
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  font-size: 1.08rem;
  color: #fff;
  box-shadow: 0 2px 12px 0 rgba(10,35,66,0.08);
}
#app-download .feature-item i {
  font-size: 1.2rem;
  color: #eaf1fa !important;
}
#app-download .download-buttons .btn {
  min-width: 180px;
  border-radius: 14px;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 24px 0 rgba(10,35,66,0.10);
  padding: 1rem 1.5rem;
}
#app-download .download-btn .btn-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}
#app-download .download-btn small {
  font-size: 0.8rem;
  color: #eaf1fa;
}
#app-download .download-btn span {
  font-size: 1.1rem;
  color: #fff;
}
#app-download .app-mockup-wrapper {
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
#app-download .app-mockup {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}
#app-download .phone-frame {
  background: linear-gradient(74deg, var(--tedra-primary) 0%, var(--tedra-accent) 100%);
  border-radius: 32px;
  box-shadow: 0 8px 40px 0 rgba(10, 35, 66, 0.18);
  padding: 12px 8px;
  width: 260px;
  height: 480px;
  display: flex
;
  align-items: center;
  justify-content: center;
}
#app-download .phone-screen {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 12px 0 rgba(10,35,66,0.10);
  overflow: hidden;
}
#app-download .app-header {
  background: linear-gradient(90deg, var(--tedra-accent) 0%, var(--tedra-primary) 100%);
  border-radius: 24px 24px 0 0;
  padding: 1.2rem 1rem 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  justify-content: flex-start;
}
#app-download .app-header .app-icon {
  background: #fff;
  color: var(--tedra-primary);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
#app-download .app-header h4 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0;
  color: #fff;
}
#app-download .app-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding: 1.5rem 1rem 1.2rem 1rem;
}
#app-download .app-content .service-card {
  background: var(--tedra-accent);
  color: var(--tedra-primary);
  border-radius: 12px;
  box-shadow: 0 2px 8px 0 rgba(10,35,66,0.08);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1rem;
  font-size: 1.05rem;
  font-weight: 600;
}
#app-download .app-content .service-card i {
  color: var(--tedra-primary);
  font-size: 1.2rem;
}
#app-download .floating-elements {
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  pointer-events: none;
  z-index: 1;
}
#app-download .floating-icon {
  position: absolute;
  font-size: 2rem;
  color: #eaf1fa;
  opacity: 0.7;
  animation: floatY 4s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
#app-download .floating-icon:nth-child(1) { left: 10%; top: 20%; }
#app-download .floating-icon:nth-child(2) { left: 80%; top: 40%; }
#app-download .floating-icon:nth-child(3) { left: 50%; top: 80%; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}
@media (max-width: 991px) {
  #app-download .phone-frame {
    width: 90vw;
    max-width: 350px;
    height: 90vh;
    max-height: 600px;
    background: linear-gradient(120deg, #eaf1fa 0%, #b6c9e6 100%);
  }
  #app-download .app-header {
    background: linear-gradient(90deg, #b6c9e6 0%, #eaf1fa 100%);
    color: #23365e;
  }
  #app-download .app-header h4 {
    color: #23365e;
  }
  #app-download .app-mockup-wrapper { min-height: 320px; }
}
@media (max-width: 767px) {
  #app-download .phone-frame {
    width: 95vw;
    max-width: 350px;
    height: 90vh;
    max-height: 600px;
    background: linear-gradient(120deg, #f5f7fa 0%, #eaf1fa 100%);
  }
  #app-download .app-header {
    background: linear-gradient(90deg, #eaf1fa 0%, #f5f7fa 100%);
    color: #23365e;
  }
  #app-download .app-header h4 {
    color: #23365e;
  }
  #app-download .app-mockup-wrapper { min-height: 260px; padding: 2rem 0; }
  #app-download .app-content { padding: 0.7rem 0.5rem 0.7rem 0.5rem; }
}
@media (max-width: 575px) {
  #app-download .phone-frame {
    width: 98vw;
    max-width: 350px;
    height: 90vh;
    max-height: 600px;
    background: linear-gradient(120deg, #f5f7fa 0%, #eaf1fa 100%);
  }
  #app-download .app-header {
    background: linear-gradient(90deg, #eaf1fa 0%, #f5f7fa 100%);
    color: #23365e;
  }
  #app-download .app-header h4 {
    color: #23365e;
  }
  #app-download .app-mockup-wrapper { min-height: 220px; padding: 1.5rem 0; }
  #app-download .app-content { padding: 0.7rem 0.5rem 0.7rem 0.5rem; }
}

#about::before, #about::after {
  display: none !important;
  content: none !important;
}

.service-card {
  position: relative;
  z-index: 1;
}
.service-card::before {
  content: "";
  position: absolute;
  left: 18px;
  top: 32px;
  width: 48px;
  height: 48px;
  background: #eaf1fa;
  opacity: 0.5;
  z-index: 0;
  border-radius: 8px;
  transform: rotate(8deg);
  filter: blur(0.5px);
  box-shadow: 0 4px 24px 0 rgba(10,35,66,0.06);
  pointer-events: none;
}

.about-img-wrapper img {
  /* clip-path: polygon(10% 0%, 90% 0%, 100% 10%, 100% 90%, 90% 100%, 10% 100%, 0% 90%, 0% 10%); */
  border-radius: 0 !important;
  box-shadow: 0 4px 24px 0 rgba(10,35,66,0.10);
  background: #fff;
}

.about-img-wrapper img.custom-corners {
  border: none !important;
  border-top-left-radius: 32px !important;
  border-bottom-right-radius: 32px !important;
  border-top-right-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
  overflow: hidden !important;
  box-shadow:
    -16px -16px 32px -16px #b6c9e6 inset,
     16px 16px 32px -16px #23365e33 inset !important;
  background: #fff !important;
  position: relative !important;
}

.custom-corners {
  border: none;
  border-top-left-radius: 32px;
  border-bottom-right-radius: 32px;
  border-top-right-radius: 0;
  border-bottom-left-radius: 0;
  overflow: hidden;
  box-shadow:
    -16px -16px 32px -16px #b6c9e6 inset, /* soft blue top-left */
     16px 16px 32px -16px #23365e33 inset; /* soft dark blue bottom-right */
  background: #fff;
  position: relative;
}

.navbar-logo {
  filter: brightness(0) invert(1);
  transition: filter 0.3s;
}
.navbar.scrolled .navbar-logo {
  filter: none;
}

.navbar-toggler {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
}

.custom-toggler-icon {
  display: inline-block;
  width: 28px;
  height: 22px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
}
.custom-toggler-icon span {
  display: block;
  position: absolute;
  height: 4px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  opacity: 1;
  left: 0;
  transition: all 0.3s;
}
.custom-toggler-icon span:nth-child(1) { top: 0; }
.custom-toggler-icon span:nth-child(2) { top: 9px; }
.custom-toggler-icon span:nth-child(3) { top: 18px; }

/* Animate to X when menu is open */
.navbar-toggler[aria-expanded="true"] .custom-toggler-icon span:nth-child(1) {
  top: 9px;
  transform: rotate(45deg);
}
.navbar-toggler[aria-expanded="true"] .custom-toggler-icon span:nth-child(2) {
  opacity: 0;
}
.navbar-toggler[aria-expanded="true"] .custom-toggler-icon span:nth-child(3) {
  top: 9px;
  transform: rotate(-45deg);
}

.custom-toggler-icon span {
  background: #fff;
}
.navbar.scrolled .custom-toggler-icon span,
.navbar-toggler[aria-expanded="true"] .custom-toggler-icon span {
  background: var(--tedra-primary);
}

@media (max-width: 991px) {
  .navbar-collapse.show {
    background: var(--tedra-primary);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: #fff;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 8px 32px 0 rgba(10,35,66,0.08);
    padding: 1.5rem 0;
    transition: background 0.3s;
  }
  .navbar.scrolled .navbar-collapse.show {
    background: #fff;
    color: var(--tedra-primary);
  }
  .navbar-nav {
    width: 100%;
    align-items: flex-end;
    padding: 0 2rem;
    direction: rtl;
    text-align: right;
  }
  .navbar-nav .nav-link {
    color: #fff !important;
    font-size: 1.5rem;
    text-align: right;
    margin-bottom: 1.2rem;
    direction: rtl;
  }
  .navbar.scrolled .navbar-nav .nav-link {
    color: var(--tedra-primary) !important;
  }
}

/* --- Vision & Mission Card Watermark Icon --- */
#vision-mission .card {
  position: relative !important;
  overflow: hidden !important;
  background: #fff !important;
  background-repeat: no-repeat !important;
  background-position-x: -70px !important;
  background-position-y: 0px !important;
  background-size: 200px 200px !important;
}
#vision-mission .card-vision {
  /* Mountain for vision */
  background-image: url('data:image/svg+xml;utf8,<svg width="320" height="320" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"><polygon points="8,56 32,16 56,56" fill="%230A2342" opacity="0.07"/><polygon points="24,40 32,28 40,40" fill="%230A2342" opacity="0.13"/></svg>') !important;
}
#vision-mission .card-mission {
  /* Flag on a peak for mission */
  background-image: url('data:image/svg+xml;utf8,<svg width="320" height="320" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"><polygon points="8,56 32,16 56,56" fill="%230A2342" opacity="0.07"/><rect x="30" y="8" width="4" height="20" fill="%230A2342" opacity="0.13"/><polygon points="34,8 46,12 34,16" fill="%230A2342" opacity="0.13"/></svg>') !important;
}

/* LOGIN BUTTON COLOR ON NAVBAR */
.navbar.bg-transparent #login-btn,
.navbar:not(.scrolled) #login-btn {
  color: #fff !important;
  border-color: #fff !important;
}
.navbar.bg-transparent #login-btn:hover,
.navbar:not(.scrolled) #login-btn:hover {
  background: #fff !important;
  color: var(--tedra-primary) !important;
}
.navbar.scrolled #login-btn {
  color: var(--tedra-primary) !important;
  border-color: var(--tedra-primary) !important;
  background: transparent !important;
}
.navbar.scrolled #login-btn:hover {
  background: var(--tedra-primary) !important;
  color: #fff !important;
}