/* 
  EndoCare+ Custom Styles
  Layouts, Components, and Pages
*/

@import url('design-system.css');

/* Topbar - Premium Design */
.topbar {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #02182b 100%);
    border-bottom: 1px solid rgba(36, 154, 160, 0.2);
    padding: 0.5rem 0;
    font-family: var(--font-en);
}
.topbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar-features {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}
.topbar-contact {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.topbar-contact a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}
.topbar-contact a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}
.topbar-contact a i {
    color: var(--secondary);
    font-size: 1rem;
    filter: drop-shadow(0 0 5px rgba(36,154,160,0.5));
}
.topbar-line {
    width: 1px;
    height: 14px;
    background-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 992px) {
  .topbar-features {
    display: none;
  }
  .topbar-container {
    justify-content: center;
  }
}

/* Navigation - Floating Glassmorphism */
.navbar {
  position: sticky;
  top: 15px; /* Floating gap */
  left: 0;
  width: 96%;
  max-width: 1300px;
  margin: 0 auto;
  z-index: 1000;
  padding: 0.8rem 2rem;
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 100px; /* Pill shape */
  box-shadow: 0 15px 35px rgba(4, 54, 100, 0.05);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@media (max-width: 992px) {
  .navbar {
    width: 100%;
    top: 0;
    border-radius: 0;
    padding: 1rem;
  }
}

.navbar.scrolled {
  top: 10px;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  box-shadow: 0 20px 40px rgba(4, 54, 100, 0.08);
  padding: 0.5rem 2rem;
  border-color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 992px) {
  .navbar.scrolled {
    top: 0;
    padding: 0.8rem 1rem;
  }
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand img {
  height: 50px;
  transition: height var(--transition-fast), transform var(--transition-normal);
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

.navbar.scrolled .navbar-brand img {
  height: 42px;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  margin-inline-start: 2rem;
  margin-inline-end: auto;
  align-items: center;
  list-style: none;
}

.nav-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-pill);
  transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
  background: rgba(4, 54, 100, 0.04);
}

/* Dropdown Menu */
.dropdown {
  position: relative;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: 110%; /* Slight gap for floating effect */
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 40px rgba(4, 54, 100, 0.08);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  min-width: 220px;
  padding: 0.8rem;
  z-index: 1000;
  flex-direction: column;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}
.dropdown:hover .dropdown-menu {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.dropdown-item {
  padding: 0.8rem 1.2rem;
  color: var(--text-dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 500;
  border-radius: 12px;
  transition: all 0.3s ease;
}
.dropdown-item:hover {
  background: rgba(36, 154, 160, 0.05);
  color: var(--secondary);
  padding-right: 1.5rem;
}
html[dir="ltr"] .dropdown-menu {
  right: auto;
  left: 0;
}
html[dir="ltr"] .dropdown-item:hover {
  padding-right: 1.2rem;
  padding-left: 1.5rem;
}

.nav-cta {
  padding: 0.7rem 1.8rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  white-space: nowrap;
  background: linear-gradient(45deg, var(--secondary) 0%, var(--accent) 100%);
  color: #ffffff !important;
  border: none;
  box-shadow: 0 8px 20px rgba(36, 154, 160, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-cta:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 25px rgba(36, 154, 160, 0.4);
}

.nav-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--primary);
  cursor: pointer;
}

@media (max-width: 992px) {
  .nav-links {
    display: none; 
  }
  .nav-actions .lang-toggle, .nav-actions .nav-cta {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  
  .nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 15px 35px rgba(4,54,100,0.1);
    padding: 1.5rem 0;
    z-index: 999;
    border-top: 1px solid rgba(0,0,0,0.05);
  }
  
  .nav-links.active li {
    width: 100%;
    text-align: center;
    margin: 10px 0;
  }

  .nav-links.active .dropdown-menu {
    position: static;
    box-shadow: none;
    display: none;
    background: transparent;
  }
  
  .nav-links.active .dropdown:hover .dropdown-menu {
    display: flex;
  }
  
  .nav-links.active .dropdown-item {
    justify-content: center;
  }
  
  .mobile-toggle {
    display: block;
    position: relative;
    z-index: 1001; /* Ensure button is above menu */
  }
}

/* Hero Section */
.hero {
  position: relative;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  background-color: var(--bg-light);
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}

/* We will use a gradient background that feels medical and premium */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--bg-light) 0%, #ffffff 100%);
  z-index: 1;
}

.hero-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: hidden;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: float 10s infinite ease-in-out alternate;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background-color: rgba(36, 154, 160, 0.2); /* Secondary */
  top: -100px;
  right: -100px;
}

.shape-3 {
  width: 300px;
  height: 300px;
  background-color: rgba(231, 159, 160, 0.15); /* Accent Coral */
  bottom: 10%;
  right: 30%;
  animation-delay: -3s;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background-color: rgba(4, 54, 100, 0.1); /* Primary */
  bottom: -50px;
  left: -100px;
  animation-delay: -5s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(30px, 30px) scale(1.1); }
}

#hero-3d-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

#hero-3d-canvas canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text-content {
  max-width: 600px;
}

.hero-tagline {
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1.5rem;
  display: inline-block;
  font-family: var(--font-en);
  padding: 0.5rem 1.5rem;
  background: rgba(231, 159, 160, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  box-shadow: 0 5px 15px rgba(231, 159, 160, 0.15);
  border: 1px solid rgba(231, 159, 160, 0.3);
}

.hero-title {
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.hero-title span {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-body);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.hero-image-wrapper {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(4, 54, 100, 0.08);
  transform: translateY(0);
  transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.hero-image-wrapper::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 24px;
  border: 1px solid rgba(0,0,0,0.04);
  pointer-events: none;
}

.hero-image-wrapper:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(4, 54, 100, 0.12);
}

.hero-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 992px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text-content {
    margin: 0 auto;
  }
  .hero-image-wrapper {
    transform: none;
  }
  .hero-image-wrapper:hover {
    transform: none;
  }
}

/* Feature Cards (محفظة المواد الفعالة) */
.feature-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(0,0,0,0.03);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.feature-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.08);
  border-color: transparent;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  width: 80px;
  height: 80px;
  background: rgba(36, 154, 160, 0.05);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  color: var(--primary);
  font-size: 2.2rem;
  transition: all 0.4s ease;
}

.feature-card:hover .feature-icon {
  background: var(--primary);
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 0 10px 20px rgba(4, 54, 100, 0.2);
}

.feature-card:nth-child(even) .feature-icon {
  background: rgba(231, 159, 160, 0.08);
  color: var(--accent-dark);
}

.feature-card:nth-child(even):hover .feature-icon {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(231, 159, 160, 0.3);
}

.feature-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-family: var(--font-en);
  transition: color var(--transition-normal);
}

.feature-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  transition: color var(--transition-normal);
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--transition-normal);
}

/* Strategic Partners Marquee */
.partners-section {
  background: linear-gradient(to bottom, #ffffff, #f8fbfd, #ffffff);
  border-top: 1px solid rgba(0,0,0,0.02);
  border-bottom: 1px solid rgba(0,0,0,0.02);
  overflow: hidden;
  padding: 3.5rem 0;
  position: relative;
}

.partners-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url('../assets/images/logo/logo-watermark.png') center/500px no-repeat;
  opacity: 0.02;
  pointer-events: none;
}

.marquee-container {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: 0;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  padding: 1rem 0;
  margin-top: 1rem;
}

.marquee-content {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-around;
  animation: scroll-left 35s linear infinite;
}

.marquee-container:hover .marquee-content {
  animation-play-state: paused;
}

.partner-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3rem;
  transition: all 0.4s ease;
  cursor: pointer;
  height: 60px;
}

.partner-logo-img {
  max-width: 150px;
  max-height: 55px;
  filter: grayscale(100%) opacity(0.6);
  mix-blend-mode: multiply;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  object-fit: contain;
}

.partner-item:hover .partner-logo-img {
  filter: grayscale(0%) opacity(1) drop-shadow(0 10px 15px rgba(4,54,100,0.1));
  transform: scale(1.1);
}

.partner-text-logo {
  font-family: var(--font-en), Arial, sans-serif;
  font-weight: 800;
  font-size: 1.6rem;
  color: #a0aab5;
  margin: 0;
  opacity: 0.7;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  letter-spacing: 0.5px;
}

.partner-item:hover .partner-text-logo {
  color: var(--primary);
  opacity: 1;
  transform: scale(1.15);
  text-shadow: 0 10px 15px rgba(4,54,100,0.1);
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(100%); }
}

/* =============================================
   Premium Page Hero - Inner Pages
   ============================================= */
.page-hero {
  position: relative;
  text-align: center;
  padding: 7rem 0 4.5rem;
  background: linear-gradient(135deg, #043664 0%, #032a4f 40%, #0a1628 100%);
  color: #ffffff;
  overflow: hidden;
}

.page-hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: 
    radial-gradient(ellipse at 80% 20%, rgba(36, 154, 160, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(231, 159, 160, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,0.02) 0%, transparent 60%);
  pointer-events: none;
  z-index: 1;
}

.page-hero-bg::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 40px,
    rgba(255,255,255,0.008) 40px,
    rgba(255,255,255,0.008) 80px
  );
  animation: heroShimmer 30s linear infinite;
  pointer-events: none;
}

@keyframes heroShimmer {
  0% { transform: translate(0, 0); }
  100% { transform: translate(80px, 80px); }
}

.page-hero h1 {
  font-weight: 900;
  letter-spacing: -0.02em;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.75);
}

/* Info Section (Quality & Compliance) */
.info-section {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--bg-dark) 100%);
  color: var(--bg-white);
  position: relative;
  overflow: hidden;
}

.info-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: radial-gradient(circle at 80% 20%, rgba(255,255,255,0.05) 0%, transparent 40%),
                    radial-gradient(circle at 20% 80%, rgba(13, 202, 240, 0.05) 0%, transparent 40%);
  pointer-events: none;
}

.info-section h2 {
  color: var(--bg-white);
}

.info-section p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  position: relative;
  z-index: 2;
}

.info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal), background var(--transition-normal);
}

.info-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.3);
  background: linear-gradient(145deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.05) 100%);
}

.info-icon-wrapper {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--secondary);
  border: 1px solid rgba(255,255,255,0.2);
  margin-bottom: 1rem;
  transition: all var(--transition-normal);
}

.info-item:hover .info-icon-wrapper {
  background: var(--secondary);
  color: var(--bg-white);
  border-color: var(--secondary);
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(13, 202, 240, 0.4);
}

.quality-image-wrapper {
  position: relative;
  height: 100%;
  min-height: 480px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.3);
  border: 4px solid rgba(255,255,255,0.1);
  transform: perspective(1000px) rotateY(-5deg);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.quality-image-wrapper:hover {
  transform: perspective(1000px) rotateY(0deg);
}

.quality-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.quality-image-wrapper:hover img {
  transform: scale(1.05);
}

@media (max-width: 992px) {
  .info-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 576px) {
  .info-grid { grid-template-columns: 1fr; }
}

/* Pharma Segments Cards - Premium Accordion */
.segments-accordion {
  display: flex;
  height: 550px;
  gap: 1rem;
  width: 100%;
}

.segment-card {
  flex: 1;
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--bg-white);
  transition: all 0.7s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  cursor: pointer;
}

.segment-card:hover {
  flex: 2.5;
  box-shadow: 0 25px 50px rgba(0,0,0,0.25);
  transform: translateY(0);
}

.segment-bg {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 1s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1;
}

.segment-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to top, rgba(4, 54, 100, 0.95) 0%, rgba(4, 54, 100, 0.5) 60%, transparent 100%);
  z-index: 2;
  transition: background 0.6s ease;
}

.segment-card:hover .segment-overlay {
  background: linear-gradient(to top, rgba(4, 54, 100, 0.98) 0%, rgba(4, 54, 100, 0.7) 60%, rgba(4, 54, 100, 0.2) 100%);
}

.segment-card:hover .segment-bg {
  transform: scale(1.08);
}

.segment-content {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.segment-category {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  padding: 0.4rem 1.25rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1rem;
  align-self: flex-start;
  box-shadow: 0 4px 15px rgba(231, 159, 160, 0.3);
  transition: transform 0.4s ease;
}

.segment-card:hover .segment-category {
  transform: translateY(-5px);
}

.segment-title {
  color: var(--bg-white);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  font-weight: 800;
  transition: color 0.4s ease;
}

.segment-card:hover .segment-title {
  color: var(--accent-light);
}

.segment-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(20px);
  flex-wrap: wrap;
  transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
  transition-delay: 0s;
  max-height: 0;
  overflow: hidden;
}

.segment-card:hover .segment-meta {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
  max-height: 50px;
}

.segment-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.segment-meta span:not(:first-child)::before {
  content: "•";
  color: var(--accent);
}

@media (max-width: 992px) {
  .segments-accordion {
    flex-direction: column;
    height: auto;
  }
  .segment-card {
    height: 350px;
  }
  .segment-card:hover {
    flex: 1;
  }
  .segment-meta {
    opacity: 1;
    transform: translateY(0);
    max-height: 100px;
  }
}

/* CTA Widget */
.cta-widget {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--secondary) 100%);
  border-radius: var(--radius-xl);
  padding: 4rem;
  color: var(--bg-white);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--accent);
}

.cta-widget::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.cta-content {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cta-text {
  max-width: 600px;
}

.cta-text h2 {
  color: var(--bg-white);
}

@media (max-width: 992px) {
  .cta-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.05);
  color: var(--primary);
  font-weight: 600;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: var(--transition-fast);
  text-decoration: none;
}
.lang-toggle:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--primary-dark);
}
.navbar.scrolled .lang-toggle {
  background: rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #02182b 0%, var(--bg-dark) 100%);
  position: relative;
  color: rgba(255, 255, 255, 0.7);
  padding-top: 6rem;
  padding-bottom: 2rem;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--secondary) 0%, var(--accent) 100%);
  z-index: 2;
}

.footer::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  height: 80%;
  background-image: url('../assets/images/logo/logo3.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  opacity: 0.03;
  pointer-events: none;
}

.footer h4 {
  color: var(--bg-white);
  margin-bottom: 1.5rem;
  font-weight: 800;
  position: relative;
  display: inline-block;
}

.footer h4::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 0; /* RTL default */
  width: 40px;
  height: 3px;
  background: var(--secondary);
  border-radius: 2px;
}
html[dir="ltr"] .footer h4::after {
  right: auto;
  left: 0;
}

.footer-logo {
  height: 90px;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 10px 15px rgba(0,0,0,0.2));
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.8rem 1.2rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  transition: var(--transition-normal);
  color: rgba(255,255,255,0.9) !important;
  text-decoration: none !important;
}

.footer-contact-item:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.footer-contact-item i {
  font-size: 1.2rem;
  color: var(--secondary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a::before {
  content: "→";
  font-size: 0.9rem;
  color: var(--secondary);
  opacity: 0;
  transform: translateX(10px);
  transition: all var(--transition-fast);
}
html[dir="ltr"] .footer-links a::before {
  transform: translateX(-10px);
}

.footer-links a:hover {
  color: var(--secondary);
  transform: translateX(-5px);
}
html[dir="ltr"] .footer-links a:hover {
  transform: translateX(5px);
}

.footer-links a:hover::before {
  opacity: 1;
  transform: translateX(0);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--bg-white);
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-normal);
}

.social-link:hover {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  border-color: transparent;
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(36, 154, 160, 0.3);
  color: white;
}

.newsletter-box {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 15px;
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 1rem;
}

.newsletter-box p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: rgba(255,255,255,0.7);
}

.newsletter-input-group {
  display: flex;
  gap: 0.5rem;
}

.newsletter-input-group input {
  flex: 1;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: white;
  outline: none;
}

.newsletter-input-group input::placeholder {
  color: rgba(255,255,255,0.4);
}

.newsletter-input-group input:focus {
  border-color: var(--secondary);
  background: rgba(255,255,255,0.1);
}

.newsletter-input-group button {
  padding: 0.8rem 1.2rem;
  background: var(--secondary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: var(--transition-fast);
}

.newsletter-input-group button:hover {
  background: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 2rem 0 1rem;
  margin-top: 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  position: relative;
  z-index: 2;
}

.footer-bottom p {
  margin: 0;
}

.dev-credit {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(255,255,255,0.05);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  transition: all var(--transition-fast);
}
.dev-credit:hover {
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 15px rgba(36,154,160,0.3);
}
.dev-credit span {
  color: var(--secondary);
  font-weight: 800;
  text-shadow: 0 0 10px rgba(36,154,160,0.5);
}

/* =============================================
   LTR / English Overrides
   Barlow font is used for English, so
   we scale down English-specific elements.
   ============================================= */
html[dir="ltr"] .display-1 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 800;
}

html[dir="ltr"] .display-2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 700;
}

html[dir="ltr"] .h1 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

html[dir="ltr"] .h2 {
  font-size: clamp(1.25rem, 2vw, 1.6rem);
}

html[dir="ltr"] .hero-desc {
  font-size: 1.05rem;
}

html[dir="ltr"] .body-lg {
  font-size: 1.05rem;
}

html[dir="ltr"] .nav-link::after {
  right: auto;
  left: 0;
}

html[dir="ltr"] .nav-link:hover::after,
html[dir="ltr"] .nav-link.active::after {
  left: 0;
  right: auto;
}

html[dir="ltr"] .btn {
  font-family: var(--font-en);
}

html[dir="ltr"] .feature-number {
  font-family: var(--font-en);
}

/* Watermark Background for All Pages */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/logo/logo3.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 50%;
  opacity: 0.05;
  z-index: -1;
  pointer-events: none;
}

/* =========================================
   PREMIUM WOW ADDITIONS
   ========================================= */

/* 1. Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-light); 
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--secondary); 
}

/* 2. Premium Text Selection */
::selection {
  background: var(--secondary);
  color: white;
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

/* 3. Floating Particles in Hero */
.hero-shapes .shape {
  animation: float 6s ease-in-out infinite;
}
.hero-shapes .shape-2 {
  animation-delay: 2s;
  animation-duration: 8s;
}
.hero-shapes .shape-3 {
  animation-delay: 4s;
  animation-duration: 7s;
}

@keyframes float {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(5deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

/* 4. Premium Hover Glow on Cards (Glassmorphism & 3D) */
.feature-card, .segment-card, .info-item {
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  position: relative;
  overflow: hidden;
}

.feature-card::after, .info-item::after {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.4s, transform 0.6s;
  pointer-events: none;
  z-index: 0;
}

.feature-card:hover, .info-item:hover, .segment-card:hover {
  transform: translateY(-12px) scale(1.02) !important;
  box-shadow: 0 25px 40px rgba(4, 54, 100, 0.15), 0 0 20px rgba(36, 154, 160, 0.2) !important;
  border-color: rgba(36, 154, 160, 0.5) !important;
}

.feature-card:hover::after, .info-item:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* 5. Pulsing CTA Button */
.cta-widget .btn {
  position: relative;
  animation: pulse-glow 2s infinite;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
}

@keyframes pulse-glow {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

/* 6. Shiny Button Effect */
.btn-primary {
  overflow: hidden;
  position: relative;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 50%; height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  animation: shine 4s infinite;
}

@keyframes shine {
  0% { left: -100%; }
  20% { left: 200%; }
  100% { left: 200%; }
}

/* =========================================
   7. Floating Action Buttons (FABs)
   ========================================= */
.floating-actions {
  position: fixed;
  bottom: 30px;
  right: 30px; /* Default for RTL (Arabic) is right side */
  left: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 99999;
}

html[dir="ltr"] .floating-actions {
  left: 30px; /* Switch to left side for LTR (English) */
  right: auto;
}

.fab-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white !important;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
  position: relative;
}

.fab-btn:hover {
  transform: scale(1.1) translateY(-5px);
  color: white;
}

/* Pharmacovigilance Button (Warning/Soft Red) */
.fab-pv {
  background: linear-gradient(135deg, #f28b82, #e57373);
  animation: pulse-glow-pv 2s infinite;
}
.fab-pv:hover {
  animation: none;
  box-shadow: 0 10px 25px rgba(229, 115, 115, 0.4);
}

@keyframes pulse-glow-pv {
  0% { box-shadow: 0 0 0 0 rgba(229, 115, 115, 0.6); }
  70% { box-shadow: 0 0 0 15px rgba(229, 115, 115, 0); }
  100% { box-shadow: 0 0 0 0 rgba(229, 115, 115, 0); }
}

/* Chatbot Button (Primary color) */
.fab-bot {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  animation: pulse-glow-bot 2s infinite;
}
.fab-bot:hover {
  animation: none;
  box-shadow: 0 10px 25px rgba(36, 154, 160, 0.4);
}

@keyframes pulse-glow-bot {
  0% { box-shadow: 0 0 0 0 rgba(36, 154, 160, 0.6); }
  70% { box-shadow: 0 0 0 15px rgba(36, 154, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(36, 154, 160, 0); }
}

/* Tooltips */
.fab-btn::before {
  content: attr(data-tooltip);
  position: absolute;
  right: 100%;
  margin-right: 15px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  pointer-events: none;
}

html[dir="ltr"] .fab-btn::before {
  left: 100%;
  right: auto;
  margin-left: 15px;
  margin-right: 0;
}

.fab-btn:hover::before {
  opacity: 1;
  visibility: visible;
}

/* =========================================
   8. Chatbot UI (Gemini Integration)
   ========================================= */
.chat-container {
  position: fixed;
  bottom: 100px;
  right: 30px; /* Default for RTL is right side */
  left: auto;
  width: 350px;
  height: 500px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 99999;
  transform: translateY(20px) scale(0.9);
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(36, 154, 160, 0.2);
}

.chat-container.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

html[dir="ltr"] .chat-container {
  left: 30px; /* Switch to left side for LTR */
  right: auto;
}

.chat-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
}

.chat-header button {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.chat-header button:hover {
  opacity: 1;
}

.chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chat-msg {
  display: flex;
  width: 100%;
}

.chat-msg.user {
  justify-content: flex-end;
}

.chat-msg.bot {
  justify-content: flex-start;
}

.msg-bubble {
  max-width: 80%;
  padding: 10px 15px;
  border-radius: 15px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-dark);
}

.chat-msg.user .msg-bubble {
  background: rgba(36, 154, 160, 0.15);
  border-bottom-left-radius: 2px;
  color: var(--primary);
  font-weight: 500;
}

html[dir="ltr"] .chat-msg.user .msg-bubble {
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 2px;
}

.chat-msg.bot .msg-bubble {
  background: #f8f9fa;
  border-bottom-right-radius: 2px;
  border: 1px solid #e9ecef;
}

html[dir="ltr"] .chat-msg.bot .msg-bubble {
  border-bottom-right-radius: 15px;
  border-bottom-left-radius: 2px;
}

.chat-input-area {
  padding: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  gap: 10px;
  background: white;
}

.chat-input-area input {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #dee2e6;
  border-radius: 20px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.3s;
}

.chat-input-area input:focus {
  border-color: var(--secondary);
}

.chat-input-area button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.chat-input-area button:hover {
  background: var(--secondary);
  transform: scale(1.05);
}

/* =========================================
   9. Responsive Design (Media Queries)
   ========================================= */

@media (max-width: 991px) {
  /* Navbar */
  .mobile-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--primary);
    cursor: pointer;
    z-index: 1000;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%; /* RTL default */
    width: 250px;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding-top: 80px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    transition: 0.3s ease-in-out;
    z-index: 999;
    align-items: flex-start;
  }
  
  html[dir="ltr"] .nav-links {
    right: auto;
    left: -100%;
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
  }

  .nav-links.active {
    right: 0;
  }
  
  html[dir="ltr"] .nav-links.active {
    left: 0;
    right: auto;
  }

  .nav-link {
    width: 100%;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
  }

  .nav-actions {
    display: none; /* Hide top actions, could move lang toggle to menu */
  }

  /* Hero Section */
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 100px;
    gap: 30px;
  }
  
  .hero-text-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-buttons {
    justify-content: center;
  }

  /* Grids */
  .services-grid, .features-grid, .footer-grid, .contact-grid {
    grid-template-columns: 1fr;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  /* Topbar */
  .topbar {
    display: none; /* Hide topbar on mobile to save space */
  }

  /* Hero */
  .hero {
    min-height: auto;
    padding-bottom: 50px;
  }
  
  .hero-text-content h1 {
    font-size: 2rem;
  }

  /* Chatbot UI */
  .chat-container {
    width: calc(100% - 40px);
    height: 400px;
    bottom: 80px;
    right: 20px; /* RTL */
    left: auto;
  }
  
  html[dir="ltr"] .chat-container {
    left: 20px;
    right: auto;
  }

  /* FABs smaller size */
  .floating-actions {
    bottom: 20px;
    right: 20px; /* RTL */
    left: auto;
  }
  
  html[dir="ltr"] .floating-actions {
    left: 20px;
    right: auto;
  }

  .fab-btn {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }
}


/* Portfolio Bento Layout */
.portfolio-bento {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  align-items: center;
}

.portfolio-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

@media (max-width: 992px) {
  .portfolio-bento {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .portfolio-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
  }
}

@media (max-width: 576px) {
  .portfolio-stats-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}




/* ==========================================================================
   Comprehensive Mobile Fixes (Injected V2)
   ========================================================================== */

@media (max-width: 992px) {
  /* 1. Navbar Layout Fix */
  .navbar-container {
    justify-content: space-between !important;
  }
  
  .mobile-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 2.2rem !important; /* Slightly bigger for easy tapping */
    color: var(--primary);
    cursor: pointer;
    z-index: 1002;
    padding: 0;
  }
  
  .nav-actions {
    display: flex !important;
    align-items: center;
    gap: 1rem;
  }
  
  /* Hide desktop buttons */
  .nav-actions .lang-toggle, .nav-actions .nav-cta {
    display: none !important;
  }

  /* 2. Side Drawer Menu (Overriding the 100% width) */
  .nav-links, .nav-links.active {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    top: 0 !important;
    height: 100vh !important;
    width: 280px !important; /* Side drawer width */
    background: white !important;
    padding-top: 80px !important;
    box-shadow: -10px 0 30px rgba(0,0,0,0.15) !important;
    transition: 0.3s ease-in-out !important;
    z-index: 1000 !important;
    align-items: flex-start !important;
    margin: 0 !important;
  }
  
  /* RTL (Arabic) Drawer Default State */
  .nav-links {
    right: -100% !important;
    left: auto !important;
  }
  
  /* RTL (Arabic) Drawer Active State */
  .nav-links.active {
    right: 0 !important;
  }
  
  /* LTR (English) Drawer States */
  html[dir="ltr"] .nav-links {
    left: -100% !important;
    right: auto !important;
    box-shadow: 10px 0 30px rgba(0,0,0,0.15) !important;
  }
  html[dir="ltr"] .nav-links.active {
    left: 0 !important;
    right: auto !important;
  }

  /* Menu Items */
  .nav-links li, .nav-links.active li {
    width: 100% !important;
    text-align: start !important;
    margin: 0 !important;
  }
  
  .nav-link {
    display: block !important;
    padding: 15px 25px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    font-size: 1.1rem !important;
    width: 100% !important;
  }

  /* 3. Hero Section Typography */
  .hero-title {
    font-size: 1.8rem !important; 
    line-height: 1.4 !important;
  }
  
  .hero-tagline {
    font-size: 0.8rem !important;
    padding: 0.5rem 1.2rem !important;
    margin-bottom: 2rem !important; 
    white-space: normal !important;
  }

  .hero-desc {
    font-size: 1rem !important;
    max-width: 100% !important;
  }
  
  /* 4. Hero Section Layout & Alignment */
  .hero-content {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
    text-align: center !important; 
    padding-top: 2rem !important;
  }
  
  .hero-text-content {
    text-align: center !important;
    margin-top: 0 !important; 
  }
  
  .hero-text-content > div[style*="display: flex"] {
    justify-content: center !important;
  }
  
  /* 5. Hero Image */
  .hero-image-wrapper {
    margin-top: 1rem !important;
  }
  
  .hero-image-wrapper > div[style*="position: absolute"] {
    display: none !important;
  }
  
  .hero-image-wrapper > div:last-child {
    bottom: 15px !important;
    right: 15px !important;
    left: auto !important;
    padding: 0.6rem 1.2rem !important;
    transform: scale(0.9) !important;
    transform-origin: bottom right !important;
  }
  
  /* 6. Watermark */
  .hero-watermark {
    font-size: 16vw !important; 
    top: 30% !important;
  }
}

@media (max-width: 575px) {
  .hero-title {
    font-size: 1.5rem !important;
  }
  .hero-content > div[style*="display: flex"] {
    flex-direction: column !important;
    align-items: center !important;
  }
  .hero-content > div[style*="display: flex"] a {
    width: 100% !important;
    text-align: center !important;
  }
}


/* ==========================================================================
   Transparency & Mobile Menu Enhancements
   ========================================================================== */

/* Navbar Glassmorphism */
.navbar {
    background-color: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3) !important;
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05) !important;
}

/* Hide floating actions when mobile menu is open */
body.menu-open .floating-actions {
    opacity: 0 !important;
    pointer-events: none !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
}


/* ==========================================================================
   Mobile Scale-Down (Making things less "huge" on phones)
   ========================================================================== */

@media (max-width: 991px) {
  /* 1. Global Spacing Reduction */
  section {
    padding: 3rem 0 !important; /* Reduce huge vertical gaps between sections */
  }
  
  .section-header {
    margin-bottom: 2rem !important;
  }
  
  .section-header h2 {
    font-size: 1.8rem !important;
  }

  /* 2. Hero Section Compactness */
  .hero-content {
    padding-top: 1rem !important;
    gap: 1.5rem !important;
  }
  
  /* Make the Hero Image smaller and less dominant on mobile */
  .hero-image-wrapper {
    max-height: 350px !important;
    border-radius: 16px !important;
  }
  
  .hero-image-wrapper img {
    height: 100% !important;
    object-fit: cover !important;
  }

  /* 3. Cards and Images Compactness */
  .service-card, .feature-card, .product-card {
    padding: 1.5rem !important; /* Less internal padding */
  }
  
  .service-card img, .feature-card img, .product-card img, .about-img-wrapper img {
    max-height: 250px !important; /* Prevent images from being massive */
    object-fit: cover !important;
  }
  
  /* 4. Base typography scaling */
  body {
    font-size: 0.95rem !important; /* Slightly smaller base font */
  }
  
  p {
    line-height: 1.6 !important;
  }
  
  /* 5. Buttons */
  .btn {
    padding: 0.6rem 1.4rem !important;
    font-size: 0.9rem !important;
  }
}

@media (max-width: 575px) {
  section {
    padding: 2.5rem 0 !important;
  }
  
  .hero-image-wrapper {
    max-height: 280px !important; /* Even smaller on very small phones */
  }
  
  .service-card img, .feature-card img, .product-card img, .about-img-wrapper img {
    max-height: 200px !important;
  }
}


/* ==========================================================================
   Premium Mobile Drawer (Injected)
   ========================================================================== */

@media (max-width: 992px) {
  /* The Drawer itself - Glassmorphism & Overlay */
  .nav-links, .nav-links.active {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(25px) !important;
    -webkit-backdrop-filter: blur(25px) !important;
    padding-top: 100px !important; /* Space for the header */
  }
  
  .nav-links.active {
    /* Creates a beautiful dark overlay over the rest of the page */
    box-shadow: 0 0 0 100vw rgba(4, 54, 100, 0.6), -10px 0 30px rgba(0,0,0,0.2) !important;
  }
  
  html[dir="ltr"] .nav-links.active {
    box-shadow: 0 0 0 100vw rgba(4, 54, 100, 0.6), 10px 0 30px rgba(0,0,0,0.2) !important;
  }

  /* Premium Links */
  .nav-link {
    display: flex !important;
    align-items: center !important;
    padding: 1.2rem 2.5rem !important; /* More breathing room */
    border-bottom: 1px solid rgba(4, 54, 100, 0.05) !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
    transition: all 0.3s ease !important;
  }
  
  /* Active Link State */
  .nav-link.active {
    color: var(--accent) !important;
    background: linear-gradient(90deg, rgba(231,159,160,0.15) 0%, transparent 100%) !important;
    border-inline-start: 5px solid var(--accent) !important;
  }
  
  html[dir="ltr"] .nav-link.active {
    background: linear-gradient(270deg, rgba(231,159,160,0.15) 0%, transparent 100%) !important;
  }

  /* Dropdown icon adjustment */
  .nav-link i.bi-chevron-down {
    margin-inline-start: auto !important;
    font-size: 1rem !important;
    color: var(--secondary) !important;
  }

  /* Dropdown Menu inside drawer */
  .nav-links.active .dropdown-menu {
    padding-inline-start: 1.5rem !important;
    background: rgba(4, 54, 100, 0.02) !important;
    border-radius: 0 !important;
    border-inline-start: 2px solid var(--border-light) !important;
  }
  
  .nav-links.active .dropdown-item {
    padding: 1rem 2rem !important;
    font-size: 1.1rem !important;
    color: var(--text-dark) !important;
    font-weight: 600 !important;
  }
  
  /* The X Button should look premium too */
  .mobile-toggle {
    color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
    transition: all 0.3s ease !important;
  }
  
  /* When menu is open, the X button is over the dark overlay, let's make it pop */
  body.menu-open .mobile-toggle {
    background: white !important;
    color: var(--accent) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
    transform: rotate(90deg);
  }
}


/* ==========================================================================
   Mobile Dropdown & Scroll Fix (Injected)
   ========================================================================== */

@media (max-width: 992px) {
  /* Allow scrolling inside the side menu */
  .nav-links, .nav-links.active {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-bottom: 2rem !important; /* Space at bottom */
  }

  /* Override hover for dropdown on mobile, rely on JS instead */
  .nav-links.active .dropdown:hover .dropdown-menu {
    display: none; /* Disable hover stuck state */
  }
  
  /* When JS adds display: flex inline, it will override this */
  
  /* Rotate chevron when open */
  .nav-links.active .dropdown.open .nav-link i.bi-chevron-down {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
  }
  
  .nav-link i.bi-chevron-down {
    transition: transform 0.3s ease;
  }
}


/* ==========================================================================
   Footer Compactness (Shrinking the footer across all pages)
   ========================================================================== */

.footer {
  padding-top: 3rem !important; /* Reduced from 5rem */
}

.footer-logo {
  height: 95px !important; 
  margin-bottom: 1.5rem !important;
}

.footer-grid {
  gap: 2rem !important; /* Reduce space between columns */
}

.footer h4 {
  margin-bottom: 1rem !important; /* Tighter heading margin */
  font-size: 1.1rem !important; /* Slightly smaller */
}

.footer-links li {
  margin-bottom: 0.5rem !important; /* Tighter link spacing */
}

.footer-contact li {
  margin-bottom: 0.8rem !important;
}

.footer p {
  font-size: 0.9rem !important;
  line-height: 1.6 !important;
}

.footer-bottom {
  margin-top: 2rem !important;
  padding-top: 1.5rem !important;
}

/* Mobile specific footer tightening */
@media (max-width: 991px) {
  .footer {
    padding-top: 2rem !important;
  }
  .footer-logo {
    height: 70px !important;
  }
  .footer-grid {
    gap: 1.5rem !important;
  }
}


/* ==========================================================================
   Premium Product Cards (Injected)
   ========================================================================== */

.premium-product-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid rgba(4, 54, 100, 0.05);
  box-shadow: 0 10px 30px rgba(4, 54, 100, 0.06);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.premium-product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.premium-product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(4, 54, 100, 0.12);
  border-color: rgba(4, 54, 100, 0.1);
}

.premium-product-card:hover::before {
  opacity: 1;
}

.premium-product-image-wrapper {
  background: linear-gradient(135deg, rgba(36, 154, 160, 0.05) 0%, rgba(4, 54, 100, 0.02) 100%);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 240px;
  position: relative;
  overflow: hidden;
}

.premium-product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
  filter: drop-shadow(0 15px 15px rgba(0,0,0,0.1));
}

.premium-product-card:hover .premium-product-image-wrapper img {
  transform: scale(1.15) rotate(-2deg);
}

.premium-product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: white;
  color: var(--secondary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: 50px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
html[dir="ltr"] .premium-product-badge {
  right: auto;
  left: 1rem;
}

.premium-product-title {
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.premium-product-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

.premium-product-desc {
  color: var(--text-body);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.premium-product-btn {
  margin-top: auto;
  width: 100%;
  background: var(--bg-light);
  color: var(--primary);
  border: none;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 0.8rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.premium-product-card:hover .premium-product-btn {
  background: var(--primary);
  color: white;
}


/* ==========================================================================
   Quality Section Upgrades (Injected)
   ========================================================================== */

.quality-hero {
  background: linear-gradient(135deg, var(--bg-light) 0%, #ffffff 100%);
  border-radius: var(--radius-lg);
  padding: 4rem;
  box-shadow: 0 15px 40px rgba(4, 54, 100, 0.05);
  border: 1px solid rgba(4, 54, 100, 0.05);
  position: relative;
  overflow: hidden;
  margin-bottom: 3rem;
}

.quality-hero::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(36, 154, 160, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  transform: translate(30%, -30%);
}
html[dir="ltr"] .quality-hero::after {
  right: auto;
  left: 0;
  transform: translate(-30%, -30%);
}

.quality-policy-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: var(--radius-lg);
  padding: 3.5rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(4, 54, 100, 0.2);
}

.quality-policy-card::before {
  content: '\F5BE'; /* bootstrap icon shield-check */
  font-family: 'bootstrap-icons';
  position: absolute;
  top: -20px;
  left: -20px;
  font-size: 15rem;
  color: rgba(255, 255, 255, 0.05);
  line-height: 1;
}
html[dir="ltr"] .quality-policy-card::before {
  left: auto;
  right: -20px;
}

.quality-policy-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

@media (max-width: 991px) {
  .quality-hero {
    padding: 2rem 1.5rem;
  }
  .quality-policy-card {
    padding: 2rem 1.5rem;
  }
  .quality-hero::after, .quality-policy-card::before {
    display: none; /* Hide decorative elements on mobile for clean look */
  }
}

