@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* ==========================================
   Design System Variables & Root Settings
   ========================================== */
:root {
  /* Color Palette */
  --primary-color: #0B2F64;
  --primary-hover: #071F42;
  --secondary-color: #207398;
  --secondary-hover: #175773;
  --accent-color: #EBF2FA;
  --accent-hover: #D7E7F7;
  
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #F1F5F9;
  --bg-dark: #0A192F;
  --bg-dark-hover: #112240;
  
  --text-dark: #0F172A;
  --text-muted: #475569;
  --text-light: #94A3B8;
  --text-white: #FFFFFF;
  
  --border-color: #E2E8F0;
  --border-focus: #207398;
  
  --success: #10B981;
  --warning: #F59E0B;
  --danger: #EF4444;

  /* Typography */
  --font-arabic: 'Cairo', sans-serif;
  --font-english: 'Outfit', sans-serif;
  --font-family: var(--font-arabic); /* default */

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-glass: 0 8px 32px 0 rgba(11, 47, 100, 0.08);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

  /* Structure */
  --max-width: 1200px;
  --header-height: 80px;
}

/* Set English font for specific language builds */
:lang(en) {
  --font-family: var(--font-english);
}

/* ==========================================
   CSS Resets & Core Styles
   ========================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family);
  background: linear-gradient(180deg, #F8FAFC 0%, #EBF2FA 25%, #F1F5F9 50%, #EBF2FA 75%, #F8FAFC 100%);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

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

button, input, select, textarea {
  font-family: inherit;
  font-size: 1rem;
  outline: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  list-style: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section-padding {
  padding: 5rem 0;
}

.text-center {
  text-align: center;
}

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

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 992px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2, .grid-3 {
    grid-template-columns: 1fr;
  }
  .section-padding {
    padding: 3rem 0;
  }
}

/* ==========================================
   Typography & Headers
   ========================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; position: relative; padding-bottom: 0.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.section-title {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: var(--radius-full);
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 600px;
  margin: -0.5rem auto 0 auto;
  font-size: 1.1rem;
}

/* ==========================================
   Buttons & Interactivity
   ========================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-white);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-white);
}

.btn-secondary:hover {
  background-color: var(--secondary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background-color: var(--accent-color);
  color: var(--primary-color);
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

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

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--text-white);
}

/* ==========================================
   Header & Navigation
   ========================================== */
.header {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.header.scrolled {
  height: 70px;
  background-color: rgba(255, 255, 255, 0.95);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-img {
  height: 50px;
  width: 50px;
  object-fit: cover;
  border-radius: var(--radius-full);
  border: 2px solid var(--secondary-color);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-color);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.95rem;
  position: relative;
  padding: 0.25rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transition: var(--transition-fast);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Burger Menu */
.burger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
  position: relative;
  z-index: 1100;
}

.burger span {
  display: block;
  height: 2.5px;
  width: 100%;
  background-color: var(--primary-color);
  border-radius: var(--radius-full);
  transition: var(--transition-normal);
}

.nav-actions-mobile {
  display: none;
}

@media (min-width: 1201px) {
  .nav-menu {
    gap: 1.15rem;
  }
  .nav-link {
    font-size: 0.9rem;
  }
  .nav-actions {
    gap: 0.75rem;
  }
  .nav-actions .btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 1200px) {
  .burger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background-color: var(--bg-primary);
    box-shadow: var(--shadow-xl);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 5rem 2rem 2.5rem 2rem;
    gap: 1.5rem;
    z-index: 1050;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0.4s;
    visibility: hidden;
  }

  .nav-menu.active {
    transform: translateX(0);
    visibility: visible;
  }

  .nav-actions {
    display: none; /* inside menu in mobile */
  }

  .nav-menu .nav-actions-mobile {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 1rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
  }

  /* Frosted Glass Backdrop Overlay */
  .nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(10, 25, 47, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }

  .nav-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ==========================================
   Footer Component
   ========================================== */
.footer {
  background-color: var(--bg-dark);
  color: var(--text-white);
  padding: 5rem 0 2rem 0;
  border-top: 4px solid var(--secondary-color);
}

.footer h3, .footer h4 {
  color: var(--text-white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

@media (max-width: 992px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-about .logo-link {
  margin-bottom: 1.5rem;
}

.footer-about p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.social-links {
  display: flex;
  gap: 0.75rem;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: var(--bg-dark-hover);
  border-radius: var(--radius-full);
  color: var(--text-white);
  font-size: 1.2rem;
  transition: var(--transition-normal);
}

.social-icon:hover {
  background-color: var(--secondary-color);
  color: var(--text-white);
  transform: translateY(-3px);
}

.footer-links h4, .footer-contact h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-links h4::after, .footer-contact h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--secondary-color);
  border-radius: var(--radius-full);
}

/* Direction aware lines in footer */
[dir="rtl"] .footer-links h4::after, [dir="rtl"] .footer-contact h4::after {
  left: auto;
  right: 0;
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-light);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--secondary-color);
  padding-inline-start: 5px;
}

.footer-contact ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  color: var(--text-light);
  font-size: 0.95rem;
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-contact i {
  color: var(--secondary-color);
  font-size: 1.1rem;
}

.footer-newsletter p {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.newsletter-form {
  display: flex;
  border-radius: var(--radius-md);
  overflow: hidden;
  background-color: var(--bg-dark-hover);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-form input {
  border: none;
  background: none;
  padding: 0.75rem 1rem;
  color: var(--text-white);
  width: 100%;
}

.newsletter-form button {
  background-color: var(--secondary-color);
  color: var(--text-white);
  padding: 0 1.25rem;
  transition: var(--transition-fast);
}

.newsletter-form button:hover {
  background-color: var(--primary-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-light);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
  position: relative;
  background: linear-gradient(135deg, rgba(235, 242, 250, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%);
  overflow: hidden;
  padding: 6rem 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 4rem;
}

@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
}

.hero-tag {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--primary-color);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(11, 47, 100, 0.1);
}

.hero-title {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

@media (max-width: 576px) {
  .hero-title {
    font-size: 2.25rem;
  }
}

.hero-description {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

@media (max-width: 992px) {
  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }
  .hero-actions .btn {
    width: 100%;
  }
}

.hero-social-strip {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-top: 3rem;
}

@media (max-width: 992px) {
  .hero-social-strip {
    justify-content: center;
  }
}

.hero-social-strip span {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
}

.hero-image-wrapper {
  position: relative;
  z-index: 1;
}

.hero-img {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 4px solid var(--bg-primary);
  transform: rotate(-1.5deg);
  transition: var(--transition-normal);
}

.hero-img:hover {
  transform: rotate(0deg) scale(1.02);
}

/* Decorative circles */
.hero-circle-1 {
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, rgba(32, 115, 152, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: -1;
}

.hero-circle-2 {
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 400px;
  height: 400px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, rgba(11, 47, 100, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: -1;
}

/* ==========================================
   Services Grid & Cards
   ========================================== */
.service-card {
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 2.5rem 2rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background-color: var(--secondary-color);
  transition: var(--transition-fast);
}

[dir="rtl"] .service-card::before {
  left: auto;
  right: 0;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before {
  width: 8px;
  background-color: var(--primary-color);
}

.service-icon-box {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  background-color: var(--accent-color);
  color: var(--secondary-color);
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card:hover .service-icon-box {
  background-color: var(--primary-color);
  color: var(--text-white);
  transform: rotate(5deg);
  transition: var(--transition-fast);
}

.service-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.service-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.service-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-light);
  border-top: 1px solid var(--bg-tertiary);
  padding-top: 1rem;
}

.service-duration i {
  color: var(--secondary-color);
  margin-inline-end: 0.25rem;
}

.service-link {
  font-weight: 700;
  color: var(--secondary-color);
}

.service-link:hover {
  color: var(--primary-color);
}

/* ==========================================
   Float Widgets (WhatsApp & AI Agent)
   ========================================== */
.float-widgets-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 1000;
}

[dir="rtl"] .float-widgets-container {
  right: auto;
  left: 2rem;
}

/* WhatsApp Widget */
.widget-whatsapp {
  position: relative;
}

.btn-whatsapp-float {
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  font-size: 2rem;
  box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: var(--transition-normal);
}

.btn-whatsapp-float:hover {
  transform: scale(1.08);
}

.whatsapp-popup {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 320px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: var(--transition-normal);
}

[dir="rtl"] .whatsapp-popup {
  right: auto;
  left: 0;
}

.whatsapp-popup.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.whatsapp-pop-header {
  background-color: #075E54;
  color: var(--text-white);
  padding: 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.whatsapp-pop-header i {
  font-size: 1.5rem;
}

.whatsapp-pop-header h4 {
  color: var(--text-white);
  font-size: 1rem;
  margin-bottom: 0.1rem;
}

.whatsapp-pop-header p {
  font-size: 0.75rem;
  opacity: 0.8;
}

.whatsapp-pop-body {
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.whatsapp-input-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.whatsapp-input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.whatsapp-input-group input, .whatsapp-input-group textarea {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.whatsapp-input-group input:focus, .whatsapp-input-group textarea:focus {
  border-color: #25D366;
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.1);
}

.btn-whatsapp-send {
  background-color: #25D366;
  color: var(--text-white);
  padding: 0.65rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-align: center;
  transition: var(--transition-fast);
}

.btn-whatsapp-send:hover {
  background-color: #128C7E;
}

/* AI Avatar Widget */
.widget-ai-agent {
  position: relative;
}

.btn-ai-float {
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  box-shadow: 0 4px 10px rgba(11, 47, 100, 0.4);
  cursor: pointer;
  transition: var(--transition-normal);
  border: 2px solid var(--secondary-color);
  overflow: hidden;
}

.btn-ai-float img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn-ai-float:hover {
  transform: scale(1.08);
}

.ai-tooltip {
  position: absolute;
  right: 75px;
  top: 15px;
  white-space: nowrap;
  background-color: var(--primary-color);
  color: var(--text-white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateX(10px);
  transition: var(--transition-normal);
  pointer-events: none;
}

[dir="rtl"] .ai-tooltip {
  right: auto;
  left: 75px;
  transform: translateX(-10px);
}

.ai-tooltip.active {
  opacity: 1;
  transform: translateX(0);
}

.ai-chat-window {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 360px;
  height: 480px;
  background-color: var(--bg-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: var(--transition-normal);
}

[dir="rtl"] .ai-chat-window {
  right: auto;
  left: 0;
}

.ai-chat-window.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ai-chat-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: var(--text-white);
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-chat-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ai-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  border: 2px solid rgba(255, 255, 255, 0.5);
  object-fit: cover;
}

.ai-chat-header-info h4 {
  color: var(--text-white);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.ai-chat-status {
  font-size: 0.75rem;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.ai-chat-status::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--success);
  border-radius: var(--radius-full);
}

.btn-ai-close {
  color: var(--text-white);
  font-size: 1.25rem;
}

.ai-chat-body {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  background-color: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ai-msg {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.4;
}

.ai-msg-bot {
  background-color: var(--bg-primary);
  color: var(--text-dark);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  border: 1px solid var(--border-color);
}

[dir="rtl"] .ai-msg-bot {
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: 2px;
}

.ai-msg-user {
  background-color: var(--primary-color);
  color: var(--text-white);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}

[dir="rtl"] .ai-msg-user {
  border-bottom-right-radius: var(--radius-md);
  border-bottom-left-radius: 2px;
}

.ai-chat-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  display: flex;
  gap: 0.5rem;
}

.ai-chat-input {
  flex-grow: 1;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.ai-chat-input:focus {
  border-color: var(--primary-color);
}

.btn-ai-send {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background-color: var(--primary-color);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-ai-send:hover {
  background-color: var(--secondary-color);
}

@media (max-width: 480px) {
  .ai-chat-window, .whatsapp-popup {
    width: calc(100vw - 2rem);
    position: fixed;
    bottom: 90px;
    right: 1rem;
    left: 1rem;
  }
}

/* ==========================================
   Responsive Video Player Utilities
   ========================================== */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  background-color: var(--bg-dark);
}

.video-container iframe, .video-container video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Paid Video Security & Watermark Overlay */
.paid-video-wrapper {
  position: relative;
  overflow: hidden;
}

.video-watermark {
  position: absolute;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.2);
  pointer-events: none;
  user-select: none;
  z-index: 100;
  transition: all 1s ease-in-out;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  white-space: nowrap;
}

/* Card Image Styles (Full Image display, no clipping) */
.card-image-banner, .course-card-banner, .blog-card-banner, .book-card-banner, .testimonial-card-banner {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1rem;
}

.card-image-banner img, .course-card-banner img, .blog-card-banner img, .book-card-banner img, .testimonial-card-banner img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain !important;
}

/* Custom interactive tabs styles */
.test-tab-btn {
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  background-color: var(--bg-primary);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition-fast);
}

.test-tab-btn:hover, .test-tab-btn.active {
  background-color: var(--secondary-color);
  color: var(--text-white);
  border-color: var(--secondary-color);
  transform: translateY(-1px);
}

/* ==========================================
   Form Layouts & Inputs (Fix Overlapping)
   ========================================== */
.db-form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 576px) {
  .db-form-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

.db-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  width: 100%;
}

.db-form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
}

.db-form-group input, 
.db-form-group select, 
.db-form-group textarea {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  background-color: var(--bg-primary);
  color: var(--text-dark);
  transition: var(--transition-fast);
  width: 100%;
  box-sizing: border-box;
}

.db-form-group input:focus, 
.db-form-group select:focus, 
.db-form-group textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(32, 115, 152, 0.15);
}

/* ==========================================
   Premium Animations System (Stage 7)
   ========================================== */

/* Floating Blurred Glassmorphic Background Blobs */
.background-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.65;
  pointer-events: none;
  transition: all 1s ease-in-out;
}

.bg-blob-1 {
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(32, 115, 152, 0.08) 0%, rgba(235, 242, 250, 0.02) 100%);
  top: -10vw;
  left: -10vw;
  animation: float-blob-1 28s infinite alternate ease-in-out;
}

.bg-blob-2 {
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(11, 47, 100, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
  bottom: -15vw;
  right: -10vw;
  animation: float-blob-2 32s infinite alternate ease-in-out;
}

.bg-blob-3 {
  width: 35vw;
  height: 35vw;
  background: radial-gradient(circle, rgba(165, 180, 252, 0.07) 0%, rgba(255, 255, 255, 0) 100%);
  top: 35vh;
  right: 12vw;
  animation: float-blob-3 24s infinite alternate ease-in-out;
}

@keyframes float-blob-1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(6vw, 4vh) scale(1.08); }
  100% { transform: translate(-3vw, 8vh) scale(0.95); }
}

@keyframes float-blob-2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-7vw, -5vh) scale(0.92); }
  100% { transform: translate(4vw, 3vh) scale(1.05); }
}

@keyframes float-blob-3 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(4vw, -7vh) scale(1.1); }
  100% { transform: translate(-5vw, 2vh) scale(0.98); }
}

/* Scroll Reveal Animations (Hardware Accelerated) */
.reveal, .reveal-left, .reveal-right {
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 1s cubic-bezier(0.215, 0.61, 0.355, 1), transform 1s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.reveal {
  transform: translateY(40px);
}

.reveal-left {
  transform: translateX(-50px);
}

.reveal-right {
  transform: translateX(50px);
}

.reveal.revealed, .reveal-left.revealed, .reveal-right.revealed {
  opacity: 1;
  transform: translate(0, 0);
}

/* Interactive hover effects for cards & components */
.service-card, .course-card, .student-course-card, .book-card, .blog-card {
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), border-color 0.4s ease;
}

.service-card:hover, .course-card:hover, .student-course-card:hover, .book-card:hover, .blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(11, 47, 100, 0.08);
  border-color: rgba(32, 115, 152, 0.25) !important;
}

/* Section transition delays for staggered elements list */
.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }
.reveal-delay-4 { transition-delay: 0.6s; }

/* Subtle pulse animation for medical badge highlights */
@keyframes accent-pulse {
  0% { box-shadow: 0 0 0 0 rgba(32, 115, 152, 0.2); }
  70% { box-shadow: 0 0 0 10px rgba(32, 115, 152, 0); }
  100% { box-shadow: 0 0 0 0 rgba(32, 115, 152, 0); }
}

.hero-tag {
  animation: accent-pulse 3s infinite;
}

/* Floating Medical/Doctor Elements */
.floating-medical-icons {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}

/* Ensure all website content blocks sit on top of the background elements */
section, footer, .hero, .banner, main {
  position: relative;
  z-index: 10;
}

/* Make standard content sections transparent so the background gradient and floating medical icons show through */
section.section-padding, .section-padding {
  background-color: transparent !important;
}

.med-icon {
  position: absolute;
  color: rgba(32, 115, 152, 0.12); /* Increased opacity to make them clearly visible but elegant */
  pointer-events: none;
  font-size: 2.25rem;
  will-change: transform;
}

@media (max-width: 768px) {
  .med-icon {
    font-size: 1.35rem !important; /* Scale down on mobile */
    color: rgba(32, 115, 152, 0.08) !important; /* Make more subtle on mobile */
  }
}

/* Slow-motion translation & rotation animations */
@keyframes float-icon-slow-1 {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(40px, -90px) rotate(180deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes float-icon-slow-2 {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  50% { transform: translate(-60px, 80px) rotate(-180deg) scale(1.2); }
  100% { transform: translate(0, 0) rotate(-360deg) scale(1); }
}

@keyframes float-icon-slow-3 {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(80px, -60px) rotate(120deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

@keyframes float-icon-slow-4 {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); }
  50% { transform: translate(-70px, -70px) rotate(-150deg) scale(0.85); }
  100% { transform: translate(0, 0) rotate(-360deg) scale(1); }
}

