/* Ensure top-level elements have stacking context */
html, body {
  isolation: isolate;
}

/* General Reset */
body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(to right, #f3e1e7, #d9e8f3);
  overflow-x: hidden;
  padding-top: 80px; /* Added padding to prevent content hiding behind navbar */
  position: relative; /* Create stacking context */
}

/* Navbar - Fixed Position with proper z-index */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #000080;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999 !important; /* Force above social icons, but below modal */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 5%;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  transition: all 0.3s ease;
}

/* Ensure header has consistent z-index with navbar */
header {
  position: relative;
  z-index: 999 !important;
}

/* When modal is open */
body.modal-open .navbar {
  z-index: -1 !important; /* Lower than modal, force with !important */
}

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000; /* Higher than navbar */
  justify-content: center;
  align-items: center;
}

/* Modal container */
.modal {
  position: relative;
  z-index: 2001; /* Higher than overlay */
  background: linear-gradient(to right, #f3e1e7, #d9e8f3);
  max-width: 500px;
  width: 95%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.3s ease;
}

/* Rest of your existing styles remain the same */
.navbar .logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar .logo i {
  color: #87CEEB; /* Sky blue */
  font-size: 1.8rem;
}

.navbar .nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

/* Refined Navbar Link Styling with Subtle Underline Animation */
.navbar .nav-links li a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  position: relative; /* Required for positioning the underline */
}

/* Create the refined underline effect that matches the image */
.navbar .nav-links li a::after {
  content: '';
  position: absolute;
  width: 0; /* Start with no width */
  height: 1px; /* Thinner line to match the image */
  bottom: -4px; /* Position further below the text */
  left: 10%; /* Start from left side with slight inset */
  background: linear-gradient(to right, 
    rgba(135, 206, 235, 0.2), 
    rgba(135, 206, 235, 0.8) 50%, 
    rgba(135, 206, 235, 0.2)
  ); /* Gradient for subtle fade-in/out effect */
  transition: all 0.3s ease; /* Smooth transition */
  transform: none; /* Remove transform to allow left-based animation */
  opacity: 0; /* Start invisible */
}

/* Hover effect - expand the underline and change text color */
.navbar .nav-links li a:hover {
  color: #87CEEB; /* Change text to sky blue on hover */
  background: transparent; /* Remove previous background hover effect */
}

.navbar .nav-links li a:hover::after {
  width: 80%; /* Expand to this width on hover */
  opacity: 1; /* Make visible */
}

/* Active state styling for currently selected page */
.navbar .nav-links li a.active {
  color: #87CEEB; /* Sky blue for active page */
}

.navbar .nav-links li a.active::after {
  width: 80%; /* Show underline for active page */
  opacity: 1;
}

.support-links {
  display: flex;
  gap: 1rem;
}

.support-links .btn {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #fff;
  border-radius: 5px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.support-links .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Hero Section */
.hero {
  position: relative;
  text-align: center;
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  overflow: visible; /* Changed to visible to allow icons to be closer */
}

/* Specific rule to ensure social icons ALWAYS stay below the navbar */
.social-icons-left, .social-icons-right {
  position: absolute;
  top: 250px;
  z-index: 99 !important; /* MUCH lower than navbar, with !important */
}

/* When chatbot is open, hide social icons */
body.chat-open .social-icons-left,
body.chat-open .social-icons-right {
  z-index: 0 !important; /* Force below chatbot */
}

/* .social-icons-left {
  left: 40px;
}

.social-icons-right {
  right: 40px;
} */

/* Individual Social Icon Styling - Updated Design with Larger Icons */
/* .social-icon {
  font-size: 3.2rem; /* Increased icon size */
  /* width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 1;
  color: white;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  animation: gentleFloat 5s ease-in-out infinite;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  text-decoration: none; 
} */ */

/* Facebook Icon - Updated Style */
/* .social-icons-right .social-icon {
  background: #1877f2; 
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(24, 119, 242, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
} */

/* Instagram Icon - Keeping original vibrant style */
/* .social-icons-left .social-icon {
  background: radial-gradient(circle at 30% 107%, 
    #fdf497 0%, #fdf497 5%, 
    #fd5949 45%, #d6249f 60%, 
    #285AEB 90%);
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(225, 48, 108, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}
 */
/* Remove any dots or default styling */
/* .social-icons-left a, .social-icons-right a {
  text-decoration: none;
  display: block;
} */

/* Ensure icons don't have additional styling */
/* .fa-facebook, .fa-instagram {
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: none; /* Remove any background from the icon itself 
} */

/* Refined Hover Effect */
/* .social-icon:hover {
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
  filter: brightness(1.1);
} */

/* Floating Animation */
@keyframes gentleFloat {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Different animation timing for visual interest */
.social-icons-left .social-icon {
  animation-delay: 0.5s;
}

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

.hero-text h1 {
  font-weight: bold;
  font-size: 3rem;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

.hero-text .highlight-blue {
  color: #000080;
}

.hero-text p {
  font-size: 1.2rem;
  color: #555;
  margin: 1rem 0 2rem;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cta-buttons .btn {
  padding: 0.8rem 1.8rem;
  text-decoration: none;
  color: #fff;
  background-color: #1877f2;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cta-buttons .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cta-buttons .btn:nth-child(2) {
  background-color: #5865f2;
}

.cta-buttons .btn:nth-child(4) {
  background-color: #ff4d4d;
}

/* Make sure chatbot is above everything except modals */
.chat-container {
  z-index: 99999 !important; 
  position: fixed;
}

/* Define CSS variables used in other CSS files */
:root {
  --gradient-dark: #000080; /* Changed to solid navy blue to match navbar */
  --primary-blue: #1877f2;
  --primary-light: #87CEEB;
  --transition: all 0.3s ease;
}

/* Fix for footer social icons to differentiate them from the main social icons */
.footer-social .social-icons {
  position: static;
  transform: none;
  flex-direction: row;
  gap: 15px;
  justify-content: flex-start;
  margin-top: 10px;
}

.footer-social .social-icons a {
  font-size: 1.2rem;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.3s ease;
  box-shadow: none;
  animation: none;
}

.footer-social .social-icons a:hover {
  background: #1877f2;
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(24, 119, 242, 0.4);
}

.footer-social .social-icons a i {
  font-size: 1.2rem;
  background: none;
  border: none;
  box-shadow: none;
  animation: none;
}

/* Modal elements should have high z-index */
html.modal-is-open .modal-header,
html.modal-is-open .modal-body,
html.modal-is-open .modal-footer,
html.modal-is-open .modal-close,
html.modal-is-open .copy-button,
html.modal-is-open .contact-button {
  z-index: 1000001 !important;
}

/* Enhanced Responsive Adjustments */
/* Large Screens */
@media screen and (min-width: 1600px) {
  .hero {
    max-width: 1400px;
    padding: 6rem 2rem;
  }
  
  .hero-text h1 {
    font-size: 3.5rem;
  }
  
  .hero-text p {
    font-size: 1.4rem;
  }
  
  .social-icons-left {
    left: calc(50% - 700px);
  }
  
  .social-icons-right {
    right: calc(50% - 700px);
  }
}

/* Desktop/Laptop */
@media screen and (max-width: 1200px) {
  .social-icons-left {
    left: 20px;
  }
  
  .social-icons-right {
    right: 20px;
  }
  
  .hero {
    padding: 4rem 2rem;
  }
  
  .hero-text h1 {
    font-size: 2.8rem;
  }
}

/* Tablets */
@media screen and (max-width: 992px) {
  body {
    padding-top: 70px;
  }
  
  .navbar {
    padding: 0.8rem 4%;
  }
  
  .navbar .nav-links {
    gap: 0.8rem;
  }
  
  .navbar .nav-links li a {
    padding: 0.4rem 0.8rem;
  }
  
  .social-icons-left, .social-icons-right {
    top: 200px;
  }
  
  .social-icon {
    width: 70px;
    height: 70px;
    font-size: 2.8rem;
  }
  
  .hero-text h1 {
    font-size: 2.5rem;
  }
}

/* Small Tablets */
@media screen and (max-width: 768px) {
  .navbar {
    flex-direction: column;
    padding: 0.5rem 3%;
  }
  
  .navbar .logo {
    margin-bottom: 0.5rem;
  }
  
  .navbar .nav-links {
    margin-top: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .navbar .nav-links li a {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
  }
  
  .hero {
    padding: 3rem 1.5rem;
  }
  
  .hero-text h1 {
    font-size: 2.2rem;
  }
  
  .hero-text p {
    font-size: 1.1rem;
  }
  
  .social-icons-left, .social-icons-right {
    top: 180px;
  }
  
  .social-icon {
    width: 60px;
    height: 60px;
    font-size: 2.4rem;
  }
}

/* Mobile Landscape */
@media screen and (max-width: 576px) {
  body {
    padding-top: 60px;
  }
  
  .navbar {
    padding: 0.5rem 2%;
  }
  
  .navbar .logo {
    font-size: 1.3rem;
  }
  
  .navbar .logo i {
    font-size: 1.5rem;
  }
  
  .hero {
    padding: 2.5rem 1rem;
  }
  
  .hero-text h1 {
    font-size: 1.8rem;
  }
  
  .hero-text p {
    font-size: 1rem;
  }
  
  .social-icons-left {
    left: 10px;
  }
  
  .social-icons-right {
    right: 10px;
  }
  
  .social-icon {
    width: 50px;
    height: 50px;
    font-size: 2rem;
    border-radius: 15px;
  }
  
  /* Modified positioning for social icons */
  .social-icons-left, .social-icons-right {
    position: absolute;
    top: 140px; /* Fixed position relative to top instead of bottom */
  }
}

/* Mobile Portrait */
@media screen and (max-width: 380px) {
  .navbar .nav-links {
    gap: 0.2rem;
  }
  
  .navbar .nav-links li a {
    padding: 0.3rem 0.4rem;
    font-size: 0.85rem;
  }
  
  .hero-text h1 {
    font-size: 1.6rem;
  }
  
  .hero-text p {
    font-size: 0.9rem;
    margin: 0.8rem 0 1.5rem;
  }
  
  .social-icon {
    width: 45px;
    height: 45px;
    font-size: 1.8rem;
    border-radius: 12px;
  }
  
  .cta-buttons .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

/* Handle extremely small screens */
@media screen and (max-width: 320px) {
  .navbar .logo {
    font-size: 1.2rem;
  }
  
  .navbar .nav-links li a {
    padding: 0.2rem 0.3rem;
    font-size: 0.8rem;
  }
  
  .social-icon {
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
  }
  
  .hero-text h1 {
    font-size: 1.5rem;
  }
}

/* Device-specific fixes */
/* For iPhone SE and other very small devices */
@media screen and (max-width: 360px) and (max-height: 640px) {
  .social-icons-left, .social-icons-right {
    top: 120px; /* Adjust for very small devices */
  }
  
  .social-icon {
    width: 38px;
    height: 38px;
    font-size: 1.5rem;
  }
}

/* Ensure social icons don't overlap on landscape orientation */
@media screen and (max-height: 500px) {
  .social-icons-left, .social-icons-right {
    top: 120px; /* Fixed position for landscape orientation */
  }
  
  .hero {
    padding-bottom: 80px;
  }
}

/* Support for foldable devices and unique screen ratios */
@supports (display: flex) {
  @media (max-width: 280px) {
    .navbar {
      padding: 0.4rem 1%;
    }
    
    .navbar .logo {
      font-size: 1.1rem;
    }
    
    .navbar .nav-links {
      flex-direction: column;
      align-items: center;
    }
  }
}

/* Specific highDPI screens (Retina displays) */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .navbar, .hero-text h1, .social-icon {
    text-rendering: optimizeLegibility;
  }
}

/* Support for dark mode preferences */
/* @media (prefers-color-scheme: dark) {
  body {
    background: linear-gradient(to right, #1a1a2e, #16213e);
  }
} */

/* Print styles - hide unnecessary elements when printing */
@media print {
  .social-icons-left, .social-icons-right, .navbar {
    display: none;
  }
  
  body {
    padding-top: 0;
    background: white;
  }
  
  .hero {
    padding: 1rem;
  }
}
/* Mobile Navigation Styles - Added for mobile hamburger menu */
.menu-toggle {
  display: none; /* Hidden by default on desktop */
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  width: 100%;
  height: 2px;
  background-color: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Mobile-specific styles */
@media screen and (max-width: 768px) {
  /* Reset some existing mobile styles for navbar */
  .navbar {
    flex-direction: row !important;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 5% !important;
  }
  
  .navbar .logo {
    margin-bottom: 0 !important;
  }
  
  /* Show hamburger menu */
  .menu-toggle {
    display: flex;
  }
  
  /* Full-screen mobile menu */
  .navbar .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000080;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 25px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    padding: 50px 0;
    margin: 0 !important;
  }
  
  .navbar .nav-links.active {
    transform: translateX(0);
  }
  
  .navbar .nav-links li {
    margin: 10px 0 !important;
  }
  
  .navbar .nav-links li a {
    font-size: 18px;
    padding: 12px 20px;
  }
  
  /* Hamburger animation */
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  
  /* Prevent body scrolling when menu is open */
  body.menu-open {
    overflow: hidden;
  }
}