 /* Lato Regular Font Family */
 @import url('https://fonts.googleapis.com/css2?family=Lato:wght@400&display=swap');

 * {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
     font-family: 'Lato', sans-serif;
     font-weight: 400;
 }

 body {
     min-height: 100vh;
     overflow-x: hidden;
 }

 /* ===== Navbar Styles ===== */
 .top-navbar {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 8px 6%;
     background: #4361ee;
     color: white;
     position: fixed;
     top: 0;
     width: 100%;
     z-index: 1000;
     height: 45px;
     font-size: 0.9rem;
     transform: translateY(-100%);
     transition: transform 0.3s ease;
 }

 .top-navbar.show {
     transform: translateY(0);
 }

 .top-navbar a {
     font-size: 1rem;
     color: #ffffff;
     text-decoration: none;
     align-items: center;
 }

 .main-navbar {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 12px 6%;
     background-color: white;
     box-shadow: 0 1px 8px rgba(0, 0, 0, 0.1);
     position: fixed;
     top: 0;
     width: 100%;
     transition: top 0.3s ease;
     z-index: 999;
     height: 65px;
 }

 .main-navbar.move-down {
     top: 45px;
 }

 .logo-img {
     height: 40px;
     width: auto;
     transition: transform 0.3s;
 }

 .nav-links {
     display: flex;
     gap: 25px;
     align-items: center;
     font-size: 1rem;
 }

 .nav-links a {
     text-decoration: none;
     color: #333;
     font-weight: 500;
     transition: all 0.3s;
     position: relative;
 }

 .nav-links a:hover {
     color: #4361ee;
 }

 .nav-links a::after {
     content: '';
     position: absolute;
     width: 0;
     height: 2px;
     bottom: -4px;
     left: 0;
     background: #4361ee;
     transition: width 0.3s;
 }

 .nav-links a:hover::after {
     width: 100%;
 }

 .dropdown {
     position: relative;
 }

 .dropdown-btn {
     background: none;
     border: none;
     font-weight: 500;
     font-size: 1rem;
     cursor: pointer;
     display: flex;
     align-items: center;
     gap: 4px;
     color: #333;
     transition: all 0.3s;
 }

 .dropdown-btn:hover {
     color: #4361ee;
 }

 .dropdown-content {
     display: none;
     position: absolute;
     background-color: white;
     min-width: 250px;
     font-size: 0.9rem;
     box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
     z-index: 1;
     border-radius: 4px;
     top: 100%;
     left: 0;
     overflow: hidden;
 }

 .dropdown-content a {
     color: #333;
     padding: 10px 14px;
     text-decoration: none;
     display: block;
     transition: all 0.3s;
 }

 .dropdown-content a:hover {
     background: #4361ee;
     color: white;
     transform: translateX(4px);
 }

 .dropdown:hover .dropdown-content {
     display: block;
 }

 .get-connected-btn {
     padding: 8px 20px;
     color: #16213e;
     border-radius: 4px;
     cursor: pointer;
     font-weight: 600;
     font-size: 0.95rem;
     transition: all 0.3s ease;
 }

 .get-connected-btn:hover {
     color: #4361ee;
 }

 .mobile-menu-btn {
     display: none;
     background: none;
     border: none;
     font-size: 1.5rem;
     color: #333;
     cursor: pointer;
     z-index: 1001;
 }


   /* Back Button */
        .back-button {
            display: inline-flex;
            align-items: center;
            margin: 80px 20px 20px;
            padding: 10px 20px;
            background: #4361ee;
            color: white;
            text-decoration: none;
            border-radius: 4px;
            transition: all 0.3s ease;
            position: relative;
            z-index: 1;
        }
        
        .back-button i {
            margin-right: 8px;
        }
        
        .back-button:hover {
            transform: translateX(-2px);
            box-shadow: 0 4px 12px rgba(48, 96, 255, 0.2);
        }

 /* ===== Hero Section ===== */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  max-height: 1200px; /* Prevent overly tall hero on large screens */
  overflow: hidden;
  display: flex;
  align-items: center;
  margin-top: 65px;
  isolation: isolate; /* Creates new stacking context */
}

.hero-background {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1; /* Behind content but above default flow */
  background-color: #4361ee; /* Fallback color */
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: local; /* Better for performance than fixed */
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), 
              transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateX(100%);
  will-change: transform, opacity; /* Optimize for hardware acceleration */
  backface-visibility: hidden; /* Prevent flickering */
  image-rendering: -webkit-optimize-contrast; /* Better image quality */
  image-rendering: crisp-edges;
}

.slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3); /* Dark overlay for better text contrast */
  z-index: 1;
}

.slide.active {
  opacity: 1;
  transform: translateX(0);
  z-index: 1;
}

.slide.prev {
  transform: translateX(-100%);
  opacity: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(1200px, 90%);
  margin: 0 auto;
  padding: 2rem;
  color: white;
}

 .hero-text {
     max-width: 600px;
     color: #fff;
     text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
     animation: fadeInUp 1s ease-out;
 }

 .hero-text h1 {
     display: flex;
     flex-direction: column;
     line-height: 1.2;
     margin-bottom: 20px;
 }

 .welcome-text {
     font-size: clamp(1.2rem, 3vw, 1.5rem);
     font-weight: 400;
     letter-spacing: 1.5px;
     margin-bottom: 5px;
     color: #fff;
 }

 .main-title {
     font-size: 4.5rem;
     font-weight: 700;
     background: #4361ee;
     background-clip: text;
     color: #4361ee;
     padding: 7px;
     margin: 10px 0;
     line-height: 1.1;
 }

 .tagline {
     font-weight: 500;
     margin-top: 10px;
     color: #fff;
 }

 .hero-buttons {
     display: flex;
     gap: 15px;
 }

 .cta-button {
     padding: 12px 30px;
     font-size: 1rem;
     border-radius: 4px;
     cursor: pointer;
     transition: all 0.3s ease;
     font-weight: 600;
     border: none;
 }

 .primary-btn {
     background: #4361ee;
     color: white;
     border: 2px solid transparent;
     text-decoration: none;
 }

 .primary-btn:hover {
     color: #16213e;
     background: linear-gradient(135deg, transparent, transparent);
     border: 2px solid #4361ee;
 }

 /* Mobile Menu Styles */
 .mobile-nav {
     position: fixed;
     top: 0;
     right: -100%;
     width: 280px;
     height: 100vh;
     background: white;
     box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
     z-index: 1000;
     transition: right 0.3s ease;
     padding-top: 80px;
     overflow-y: auto;
 }

 .mobile-nav.active {
     right: 0;
 }

 .mobile-nav-links {
     display: flex;
     flex-direction: column;
     padding: 20px;
 }

 .mobile-nav-links a {
     padding: 12px 0;
     color: #333;
     text-decoration: none;
     border-bottom: 1px solid #eee;
     font-weight: 500;
 }

 .mobile-nav-links a:hover {
     color: #4361ee;
 }

 .mobile-dropdown-content {
     display: none;
     padding-left: 15px;
 }

 .mobile-dropdown-content a {
     font-size: 0.9rem;
     padding: 10px 0;
 }

 .mobile-dropdown.active .mobile-dropdown-content {
     display: block;
 }

 .overlay {
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background: rgba(0, 0, 0, 0.5);
     z-index: 999;
     opacity: 0;
     visibility: hidden;
     transition: all 0.3s ease;
 }

 .overlay.active {
     opacity: 1;
     visibility: visible;
 }

 /* Responsive Styles */
 @media (max-width: 1024px) {
     .top-navbar {
         justify-content: space-between;
         align-content: space-between;
         gap: 5rem;
         display: flex;
     }

     .main-navbar {
         padding: 8px 4%;
     }

     .nav-links {
         gap: 15px;
     }
 }

 @media (max-width: 768px) {
     .top-navbar {
         font-size: 0.8rem;
         justify-content: center;
         flex-wrap: wrap;
         height: auto;
         padding: 6px 2%;
     }

     .top-section a,
     .middle-section a,
     .end-section a {
         font-size: 0;
         /* Hide text */
     }

     .top-section i,
     .middle-section i,
     .end-section i {
         font-size: 1.2rem;
         /* Show only icons */
         margin-right: 0;
     }

     .top-section,
     .middle-section,
     .end-section {
         gap: 8px;
         padding: 2px 0;
     }

     .main-navbar {
         padding: 8px 4%;
         height: 60px;
     }

     .mobile-menu-btn {
         display: block;
     }

     .nav-links {
         display: none;
     }

     .get-connected-btn.desktop-only {
         display: none;
     }

     .hero {
         margin-top: 60px;
         height: 90vh;
         min-height: 500px;
         text-align: center;
     }

     .hero-text {
         margin: 0 auto;
         margin-top: 6rem;
         padding-top: 40px;
     }

     .hero-text h1 {
         align-items: center;
     }

     .hero-description {
         margin: 0 auto 30px;
     }

     .hero-buttons {
         justify-content: center;
     }

     .slide {
         background-position: top center;
     }
 }

 @media (max-width: 480px) {
     .hero {
         height: 85vh;
         min-height: 400px;
     }

     .hero-buttons {
         flex-direction: column;
         gap: 10px;
     }

     .cta-button {
         width: 100%;
     }

     .top-section,
     .middle-section,
     .end-section {
         padding: 5px;
     }
 }

 /* Animation */
 @keyframes fadeInUp {
     from {
         opacity: 0;
         transform: translateY(20px);
     }

     to {
         opacity: 1;
         transform: translateY(0);
     }
 }

 /* Mission & Vision Section Styles */
 .mission-vision {
     padding: 80px 20px;
     background: #f8f9ff;
 }

 .container {
     max-width: 1200px;
     margin: 0 auto;
 }

 .section-header {
     text-align: center;
     margin-bottom: 50px;
 }

 .section-title {
     font-size: 2.3rem;
     margin-bottom: 15px;
     background: #4361ee;
     -webkit-background-clip: text;
     background-clip: text;
     color: transparent;
 }

 .section-subtitle {
     font-size: 1.1rem;
     color: #666;
     max-width: 700px;
     margin: 0 auto;
     line-height: 1.6;
 }

 .mv-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
     gap: 30px;
     margin-top: 30px;
 }

 .mv-card {
     background: white;
     border-radius: 10px;
     padding: 40px;
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
     position: relative;
     transition: transform 0.3s ease;
 }

 .mv-card:hover {
     transform: translateY(-10px);
 }

 .mission {
     border-top: 4px solid #4361ee;
 }

 .vision {
     border-top: 4px solid #4361ee;
 }

 .mv-icon {
     width: 70px;
     height: 70px;
     background: #4361ee;
     color: white;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 1.8rem;
     margin: 0 auto 25px;
 }

 .vision .mv-icon {
     background: #4361ee;
 }

 .mv-card h3 {
     text-align: center;
     font-size: 1.6rem;
     margin-bottom: 20px;
     color: #333;
 }

 .mv-content p {
     color: #555;
     line-height: 1.8;
     text-align: center;
 }

 @media (max-width: 768px) {
     .mission-vision {
         padding: 60px 15px;
     }

     .section-title {
         font-size: 2rem;
     }

     .mv-grid {
         grid-template-columns: 1fr;
     }

     .mv-card {
         padding: 30px;
     }
 }

 @media (max-width: 480px) {
     .section-title {
         font-size: 1.8rem;
     }

     .mv-icon {
         width: 60px;
         height: 60px;
         font-size: 1.5rem;
     }

     .mv-card h3 {
         font-size: 1.4rem;
     }
 }

 /* Pride Section Styles */
 .pride-section {
     padding: 80px 20px;
     background: white;
 }

 .container {
     max-width: 1200px;
     margin: 0 auto;
 }

 .section-header {
     text-align: center;
     margin-bottom: 50px;
 }

 .section-title {
     font-size: 2.3rem;
     margin-bottom: 15px;
     background: #4361ee;
     -webkit-background-clip: text;
     background-clip: text;
     color: transparent;
 }

 .section-subtitle {
     font-size: 1.1rem;
     color: #666;
     max-width: 700px;
     margin: 0 auto;
     line-height: 1.6;
 }

 .services-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
     gap: 25px;
 }

 .service-card {
     background: #f8f9ff;
     border-radius: 10px;
     padding: 25px;
     display: flex;
     justify-content: space-between;
     align-items: center;
     transition: all 0.3s ease;
     border-left: 4px solid transparent;
 }

 .service-card:hover {
     transform: translateY(-5px);
     box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
     border-left: 4px solid #4361ee;
 }

 .service-content {
     flex: 1;
 }

 .service-content h3 {
     font-size: 1.3rem;
     color: #4361ee;
     margin-bottom: 10px;
 }

 .service-content p {
     color: #555;
     line-height: 1.6;
     font-size: 0.95rem;
 }

 .service-arrow {
     text-decoration: none;
     width: 40px;
     height: 40px;
     background: #4361ee;
     color: white;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     margin-left: 20px;
     transition: all 0.3s ease;
     flex-shrink: 0;
 }

 .service-arrow:hover {
     transform: translateX(5px);
     background: #4361ee;
 }

 @media (max-width: 768px) {
     .pride-section {
         padding: 60px 15px;
     }

     .section-title {
         font-size: 2rem;
     }

     .services-grid {
         grid-template-columns: 1fr;
     }
 }

 @media (max-width: 480px) {
     .section-title {
         font-size: 1.8rem;
     }

     .service-card {
         flex-direction: column;
         text-align: center;
         padding: 20px;
     }

     .service-arrow {
         margin: 15px 0 0 0;
     }
 }

 /* Footer Styles */
 .main-footer {
     background-color: #4361ee;
     color: white;
     padding: 60px 0 0;
 }

 .footer-container {
     max-width: 1200px;
     margin: 0 auto;
     padding: 0 20px;
 }

 .footer-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
     gap: 40px;
     margin-bottom: 40px;
 }

 .footer-column {
     margin-bottom: 30px;
 }

 .footer-logo {
     height: 40px;
     margin-bottom: 20px;
 }

 .footer-about {
     color: rgba(255, 255, 255, 0.7);
     line-height: 1.6;
     margin-bottom: 20px;
 }

 .footer-social {
     display: flex;
     gap: 15px;
 }

 .footer-social .social-icon {
     width: 36px;
     height: 36px;
     background: rgba(255, 255, 255, 0.1);
     color: white;
     border-radius: 50%;
     display: flex;
     text-decoration: none;
     align-items: center;
     justify-content: center;
     transition: all 0.3s ease;
 }

 .footer-social .social-icon:hover {
     background: #ffffff;
     color: #4361ee;
     transform: translateY(-3px);
 }

 .footer-heading {
     font-size: 1.2rem;
     margin-bottom: 20px;
     position: relative;
     padding-bottom: 10px;
 }

 .footer-heading::after {
     content: '';
     position: absolute;
     left: 0;
     bottom: 0;
     width: 50px;
     height: 2px;
     background: #4361ee;
 }

 .footer-links {
     list-style: none;
 }

 .footer-links li {
     margin-bottom: 12px;
 }

 .footer-links a {
     color: rgba(255, 255, 255, 0.7);
     text-decoration: none;
     transition: all 0.3s ease;
 }

 .footer-links a:hover {
     color: white;
     padding-left: 5px;
 }

 .footer-contact {
     list-style: none;
 }

 .footer-contact li {
     margin-bottom: 15px;
     display: flex;
     align-items: flex-start;
     color: rgba(255, 255, 255, 0.7);
 }

 .footer-contact i {
     margin-right: 10px;
     color: #ffffff;
 }

 .footer-bottom {
     border-top: 1px solid rgba(255, 255, 255, 0.1);
     padding: 20px 0;
     display: flex;
     flex-wrap: wrap;
     justify-content: space-between;
     align-items: center;
 }

 .footer-bottom p {
     color: rgba(255, 255, 255, 0.5);
     font-size: 0.9rem;
 }
 .footer-legal {
     display: flex;
     gap: 20px;
 }
 .footer-legal a {
     color: rgba(255, 255, 255, 0.5);
     text-decoration: none;
     font-size: 0.9rem;
     transition: color 0.3s ease;
 }
 .footer-legal a:hover {
     color: white;
 }
 @media (max-width: 768px) {
     .footer-grid {
         grid-template-columns: 1fr 1fr;
     }

     .footer-bottom {
         flex-direction: column;
         text-align: center;
         gap: 10px;
     }
 }
 @media (max-width: 480px) {
     .footer-grid {
         grid-template-columns: 1fr;
     }
 }
 /* Add these styles to your CSS */
 .service-card,
 .mv-card,
 .section-header,
 .pride-section .service-card {
     will-change: transform, opacity;
     /* Optimize for animation */
     transition: all 0.6s ease-out;
     /* Default transition */
 }

 /* Floating Message Widget Styles */
 .floating-message-container {
     position: fixed;
     bottom: 30px;
     right: 30px;
     z-index: 9999;
     font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
 }

 .message-icon {
     width: 60px;
     height: 60px;
     background: #4361ee;
     border-bottom-left-radius: 50%;
     border-top-left-radius: 50%;
     border-top-right-radius: 50%;
     border-bottom-right-radius: 10%;
     display: flex;
     align-items: center;
     color: #ffffff;
     font-size: 1.5rem;
     justify-content: center;
     cursor: pointer;
     box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
     transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
     animation: pulse 2s infinite;
     position: relative;
     overflow: hidden;
 }

 .message-icon:hover {
     transform: scale(1.1);
     box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
     animation: none;
 }

 .message-icon:active {
     transform: scale(0.95);
 }

 .message-icon i {
     color: white;
     font-size: 24px;
     transition: transform 0.3s ease;
 }

 .message-icon:hover i {
     transform: scale(1.2);
 }

 .message-icon::before {
     content: '';
     position: absolute;
     top: -50%;
     left: -50%;
     width: 200%;
     height: 200%;
     background: rgba(255, 255, 255, 0.1);
     transform: rotate(45deg);
     transition: all 0.5s ease;
     pointer-events: none;
 }

 .message-icon:hover::before {
     left: 100%;
     top: 100%;
 }

 .chat-box {
     position: absolute;
     bottom: 80px;
     right: 0;
     width: 350px;
     height: 500px;
     background: white;
     border-radius: 15px;
     box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
     overflow: hidden;
     transform: scale(0);
     transform-origin: bottom right;
     opacity: 0;
     transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
     display: flex;
     flex-direction: column;
 }

 .chat-box.active {
     transform: scale(1);
     opacity: 1;
 }

 .chat-header {
     background: #4361ee;
     color: white;
     padding: 15px 20px;
     display: flex;
     justify-content: space-between;
     align-items: center;
 }

 .chat-header h3 {
     margin: 0;
     font-size: 18px;
     font-weight: 600;
 }

 .close-chat {
     background: none;
     border: none;
     color: white;
     font-size: 20px;
     cursor: pointer;
     transition: transform 0.2s ease;
 }

 .close-chat:hover {
     transform: rotate(90deg);
 }

 .chat-body {
     flex: 1;
     padding: 20px;
     overflow-y: auto;
     background: #f9f9f9;
     display: flex;
     flex-direction: column;
 }

 .message {
     max-width: 80%;
     padding: 10px 15px;
     margin-bottom: 15px;
     border-radius: 18px;
     font-size: 14px;
     line-height: 1.4;
     position: relative;
     animation: fadeIn 0.3s ease-out;
 }

 .received {
     align-self: flex-start;
     background: #e5e5ea;
     color: #000;
     border-top-left-radius: 5px;
 }

 .sent {
     align-self: flex-end;
     background: #3060ff;
     color: white;
     border-top-right-radius: 5px;
 }

 .chat-footer {
     padding: 15px;
     background: white;
     border-top: 1px solid #eee;
     display: flex;
 }

 .message-input {
     flex: 1;
     padding: 12px 15px;
     border: 1px solid #ddd;
     border-radius: 30px;
     outline: none;
     font-size: 14px;
     transition: border 0.3s ease;
 }

 .message-input:focus {
     border-color: #3060ff;
 }

 .send-button {
     width: 45px;
     height: 45px;
     background: #3060ff;
     color: white;
     border: none;
     border-radius: 50%;
     margin-left: 10px;
     cursor: pointer;
     transition: all 0.3s ease;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .send-button:hover {
     background: #4361ee;
     transform: rotate(15deg);
 }

 .send-button i {
     font-size: 18px;
 }

 .typing-indicator {
     display: flex;
     align-self: flex-start;
     margin-bottom: 15px;
     padding: 10px 15px;
     background: #e5e5ea;
     border-radius: 18px;
     font-size: 12px;
     color: #666;
 }

 .typing-dots {
     display: flex;
     margin-left: 5px;
 }

 .typing-dots span {
     width: 6px;
     height: 6px;
     background: #666;
     border-radius: 50%;
     margin: 0 2px;
     animation: typing 1.4s infinite ease-in-out;
 }

 .typing-dots span:nth-child(2) {
     animation-delay: 0.2s;
 }

 .typing-dots span:nth-child(3) {
     animation-delay: 0.4s;
 }

 /* Animations */
 @keyframes pulse {
     0% {
         transform: scale(1);
         box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
     }

     50% {
         transform: scale(1.05);
         box-shadow: 0 6px 25px rgba(48, 96, 255, 0.3);
     }

     100% {
         transform: scale(1);
         box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
     }
 }

 @keyframes fadeIn {
     from {
         opacity: 0;
         transform: translateY(10px);
     }

     to {
         opacity: 1;
         transform: translateY(0);
     }
 }

 @keyframes typing {

     0%,
     60%,
     100% {
         transform: translateY(0);
     }

     30% {
         transform: translateY(-5px);
     }
 }

 /* Responsive */
 @media (max-width: 480px) {
     .chat-box {
         width: 300px;
         height: 450px;
     }

     .floating-message-container {
         bottom: 20px;
         right: 20px;
     }
 }

 /* LOADER */
 #loader-overlay {
     position: fixed;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     background-color: rgba(255, 255, 255, 0.8);
     /* Semi-transparent white */
     z-index: 9999;
     display: none;
     justify-content: center;
     align-items: center;
 }

 #loader {
     text-align: center;
 }

 #flipping-image {
     animation: flip 1.5s infinite;
     width: 100px;
     /* Adjust as needed */
     height: auto;
 }

 @keyframes flip {
     0% {
         transform: perspective(400px) rotateY(0);
     }

     50% {
         transform: perspective(400px) rotateY(180deg);
     }

     100% {
         transform: perspective(400px) rotateY(360deg);
     }
 }

 body.loading {
     opacity: 0.5;
     /* Make page content semi-transparent */
     transition: opacity 0.3s;
 }

 /* Enhanced styles with #4361ee color scheme */
 :root {
     --primary-color: #4361ee;
     --primary-light: #6c5ce7;
     --primary-dark: #3742fa;
     --primary-ultra-light: rgba(67, 97, 238, 0.1);
     --primary-medium: rgba(67, 97, 238, 0.8);
     --text-dark: #2d3436;
     --text-light: #ffffff;
     --text-gray: #636e72;
     --bg-gray: #f8f9fa;
     --border-color: #e9ecef;
     --success-color: #00b894;
     --warning-color: #fdcb6e;
 }

 /* Chat Widget Container */
 .chat-widget {
     position: fixed;
     bottom: 1.5rem;
     right: 0rem;
     z-index: 1000;
     display: flex;
     flex-direction: column;
     align-items: flex-end;
 }

 /* Chat Box - Initially Hidden */
 .chat-box {
     width: 20rem;
     height: 30rem;
     background: white;
     border-radius: 1rem;
     box-shadow: 0 25px 50px rgba(67, 97, 238, 0.15);
     margin-bottom: 0.75rem;
     display: flex;
     flex-direction: column;
     overflow: hidden;
     border: 2px solid var(--primary-ultra-light);
     /* Initial state for hidden/closed */
     opacity: 0;
     transform: translateY(10px) scale(0.95);
     visibility: hidden;
     pointer-events: none;
     /* Prevents interaction when hidden */
     transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
 }

 /* State for when chat box is open */
 .chat-box.open {
     opacity: 1;
     transform: translateY(0) scale(1);
     visibility: visible;
     pointer-events: auto;
 }

 /* Chat Header */
 .chat-header {
     background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
     color: var(--text-light);
     padding: 1.25rem 1.5rem;
     display: flex;
     justify-content: space-between;
     align-items: center;
     position: relative;
     overflow: hidden;
 }

 .chat-header::before {
     content: '';
     position: absolute;
     top: 0;
     left: -100%;
     width: 100%;
     height: 100%;
     background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
     transition: left 0.5s ease;
 }

 .chat-header:hover::before {
     left: 100%;
 }

 .chat-header-content h3 {
     font-weight: 700;
     font-size: 1.1rem;
     margin-bottom: 0.2rem;
 }

 .chat-header-content p {
     font-size: 0.8rem;
     opacity: 0.9;
 }

 .minimize-button {
     background: rgba(255, 255, 255, 0.2);
     border: none;
     color: var(--text-light);
     font-size: 1.1rem;
     cursor: pointer;
     padding: 0.4rem;
     border-radius: 50%;
     line-height: 1;
     transition: all 0.3s ease;
     width: 2.25rem;
     height: 2.25rem;
     display: flex;
     align-items: center;
     justify-content: center;
 }

 .minimize-button:hover {
     background: rgba(255, 255, 255, 0.3);
     transform: rotate(180deg);
 }

 /* Quick Actions */
 .quick-actions {
     padding: 0.75rem;
     background: var(--bg-gray);
     display: flex;
     gap: 0.4rem;
     flex-wrap: wrap;
     border-bottom: 1px solid var(--border-color);
     max-height: 7rem;
     overflow-y: auto;
 }

 .quick-action-btn {
     background: white;
     border: 1px solid var(--primary-color);
     color: var(--primary-color);
     padding: 0.4rem 0.6rem;
     border-radius: 0.8rem;
     font-size: 0.7rem;
     cursor: pointer;
     transition: all 0.3s ease;
     white-space: nowrap;
 }

 .quick-action-btn:hover {
     background: var(--primary-color);
     color: white;
     transform: translateY(-1px);
 }

 /* Chat Messages */
 .chat-messages {
     flex: 1;
     padding: 0.75rem;
     overflow-y: auto;
     background: var(--bg-gray);
     scroll-behavior: smooth;
 }

 .chat-messages::-webkit-scrollbar {
     width: 4px;
 }

 .chat-messages::-webkit-scrollbar-track {
     background: transparent;
 }

 .chat-messages::-webkit-scrollbar-thumb {
     background: var(--primary-color);
     border-radius: 2px;
 }

 .welcome-message {
     text-align: center;
     padding: 1.5rem 0.75rem;
     color: var(--text-gray);
 }

 .welcome-message h4 {
     color: var(--primary-color);
     margin-bottom: 0.4rem;
     font-size: 1rem;
 }

 .welcome-message p {
     font-size: 0.8rem;
 }

 .message {
     max-width: 85%;
     margin-bottom: 0.75rem;
     display: flex;
     flex-direction: column;
     animation: messageSlideIn 0.3s ease;
 }

 @keyframes messageSlideIn {
     from {
         opacity: 0;
         transform: translateY(1rem);
     }

     to {
         opacity: 1;
         transform: translateY(0);
     }
 }

 .message.user {
     align-self: flex-end;
 }

 .message-content {
     padding: 0.75rem 1rem;
     border-radius: 0.8rem;
     font-size: 0.85rem;
     line-height: 1.4;
     word-wrap: break-word;
     position: relative;
 }

 .message.user .message-content {
     background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
     color: var(--text-light);
     border-bottom-right-radius: 0.2rem;
     box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
 }

 .message.bot .message-content {
     background: white;
     color: var(--text-dark);
     border-bottom-left-radius: 0.2rem;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
     border-left: 3px solid var(--primary-color);
 }

 /* Style for links within chat messages */
 .message.bot .message-content a {
     color: var(--primary-color);
     text-decoration: underline;
     word-break: break-all;
     /* Ensures long links break correctly */
 }

 .message.bot .message-content a:hover {
     color: var(--primary-dark);
 }

 .message-time {
     font-size: 0.65rem;
     color: var(--text-gray);
     margin-top: 0.2rem;
     align-self: flex-end;
 }

 .message.bot .message-time {
     align-self: flex-start;
 }

 /* Chat Input */
 .chat-input-container {
     padding: 0.75rem;
     border-top: 1px solid var(--border-color);
     background: white;
 }

 #chat-form {
     display: flex;
     gap: 0.5rem;
     align-items: flex-end;
 }

 #message-input {
     flex: 1;
     padding: 0.75rem 1rem;
     border: 2px solid var(--border-color);
     border-radius: 1.25rem;
     outline: none;
     font-size: 0.85rem;
     transition: all 0.3s ease;
     resize: none;
     min-height: 2.5rem;
     max-height: 5rem;
     line-height: 1.4;
 }

 #message-input:focus {
     border-color: var(--primary-color);
     box-shadow: 0 0 0 3px var(--primary-ultra-light);
 }

 .send-button {
     width: 2.5rem;
     height: 2.5rem;
     border-radius: 50%;
     background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
     color: var(--text-light);
     border: none;
     cursor: pointer;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: all 0.3s ease;
     flex-shrink: 0;
 }

 .send-button:hover {
     transform: scale(1.1);
     box-shadow: 0 4px 12px rgba(67, 97, 238, 0.4);
 }

 .send-button:disabled {
     opacity: 0.5;
     cursor: not-allowed;
     transform: none;
 }

 /* Typing Indicator */
 .typing-indicator {
     display: flex;
     align-items: center;
     padding: 0.75rem 1rem;
     background: white;
     border-radius: 0.8rem;
     border-bottom-left-radius: 0.2rem;
     margin-bottom: 0.75rem;
     max-width: 85%;
     box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
     border-left: 3px solid var(--primary-color);
 }

 .typing-indicator span {
     color: var(--primary-color);
     font-size: 0.8rem;
     margin-right: 0.6rem;
     font-weight: 500;
 }

 .typing-dots {
     display: flex;
     gap: 0.2rem;
 }

 .dot {
     width: 0.4rem;
     height: 0.4rem;
     background: var(--primary-color);
     border-radius: 50%;
     animation: bounce 1.4s infinite ease-in-out;
 }

 .dot:nth-child(2) {
     animation-delay: -1.2s;
 }

 .dot:nth-child(3) {
     animation-delay: -1.0s;
 }

 @keyframes bounce {

     0%,
     80%,
     100% {
         transform: scale(0);
     }

     40% {
         transform: scale(1.0);
     }
 }

 #chat-toggle img {
     height: 70px;
     border: none;
     right: 0;
     margin-right: 5px;
     padding: 5px;
     cursor: pointer;
     transition: transform 0.5s ease;
     animation: popup 2s infinite;
 }

 #chat-toggle img:hover {
     transform: rotateY(180deg);
 }

 /* Example keyframes for 'popup' animation, modify as needed */
 @keyframes popup {

     0%,
     100% {
         transform: scale(1);
     }

     50% {
         transform: scale(1.1);
     }
 }


 /* Status Indicator */
 .status-indicator {
     position: absolute;
     top: -1px;
     left: -1px;
     width: 0.8rem;
     height: 0.8rem;
     background: var(--success-color);
     border: 2px solid white;
     border-radius: 50%;
     animation: pulse 2s infinite;
 }

 @keyframes pulse {
     0% {
         transform: scale(0.8);
         opacity: 0.7;
     }

     50% {
         transform: scale(1);
         opacity: 1;
     }

     100% {
         transform: scale(0.8);
         opacity: 0.7;
     }
 }

 /* Animation for the toggle button itself */
 @keyframes pulse-ring {
     0% {
         box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.4);
     }

     70% {
         box-shadow: 0 0 0 15px rgba(67, 97, 238, 0);
     }

     100% {
         box-shadow: 0 0 0 0 rgba(67, 97, 238, 0);
     }
 }

 /* Responsive Design */
 @media (max-width: 768px) {
     .chat-widget {
         bottom: 0.75rem;
         right: 0.75rem;
     }

     .chat-box {
         width: calc(100vw - 1.5rem);
         height: calc(75vh - 3rem);
         max-width: 18rem;
         border-radius: 0.75rem;
         margin-bottom: 0.5rem;
         /* Adjust margin for smaller screens */
     }

     .chat-header {
         padding: 1rem 1.25rem;
     }

     .chat-toggle {
         height: 10px;
     }

     .status-indicator {
         width: 0.7rem;
         height: 0.7rem;
     }
 }