/* --- HERO SECTION SIZE CONSTRAINTS --- */
.bg-half,
section.bg-half,
section.col-12.bg-half {
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0;
  margin-right: 0;
  overflow-x: hidden;
  position: relative;
  box-sizing: border-box;
  /* Set explicit height constraints */
  min-height: auto !important;
  max-height: none !important;
}

/* Fix for the container alignment with strict width control */
.bg-half > .container,
.bg-half .container.position-relative,
section.bg-half > .container {
  padding-left: 15px;
  padding-right: 15px;
  max-width: 1140px;
  width: 100% !important;
  margin: 0 auto;
  /* Prevent container expansion */
  box-sizing: border-box;
}

/* Constrain vertical padding */
.container.position-relative.py-5 {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

/* Constrain row dimensions */
.bg-half .row {
  margin-left: 0;
  margin-right: 0;
  width: 100%;
}

/* Fix for the content alignment on mobile with adjusted spacing */
@media (max-width: 991.98px) {
  .bg-half .title-heading {
    text-align: center !important;
    padding: 0 !important;
    margin: 0 auto !important;
    max-width: 100% !important;
  }
  
  .bg-half .para-desc {
    text-align: center !important;
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 1.5rem !important;
  }
  
  .bg-half .mt-4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 1rem !important;
  }
  
  .bg-half .mt-4 i.fas.fa-arrow-right {
    display: none; /* Hide arrow on mobile */
  }
  
  /* Adjust column spacing */
  .col-lg-7, .col-md-12 {
    padding: 0 10px !important;
  }
  
  /* Reduce vertical padding on mobile */
  .container.position-relative.py-5 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }
}

/* Fix for smaller mobile devices */
@media (max-width: 575.98px) {
  .title-heading h1 {
    font-size: 1.75rem !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
  }
  
  /* Fix for the <br> tags in headings on mobile */
  .title-heading h1 br {
    display: none;
  }
  
  /* Fix for the <br> tags in paragraphs on mobile */
  .para-desc br {
    display: none;
  }
  
  /* Further reduce vertical spacing */
  .container.position-relative.py-5 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
}

/* --- CONSTRAIN CAROUSEL SIZE --- */
.modern-app-bg-shape {
  width: 100%;
  position: relative;
  overflow: hidden;
  max-height: 500px; /* Set maximum height */
}



/* --- FIX ABSOLUTE POSITIONED ELEMENTS --- */
/* Ensure the absolutely positioned card elements don't overflow */
.modern-app-absolute-left,
.modern-app-absolute-right {
  position: absolute;
  max-width: 200px; /* Explicit max width */
  z-index: 2;
  /* Position adjustment */
  top: auto !important;
  bottom: 10% !important;
}

.modern-app-absolute-left {
  left: 5% !important;
}

.modern-app-absolute-right {
  right: 5% !important;
}

@media (max-width: 767.98px) {
  .modern-app-absolute-left,
  .modern-app-absolute-right {
    display: none; /* Hide on smaller screens to prevent layout issues */
  }
}

/* --- GENERAL -- */
body, html {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Fix for the marquee text in the header */
.custom-marquee {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  box-sizing: border-box;
  padding: 8px 0;
  height: auto !important;
}

/* Fix the CTA button alignment and size */
.cta-button {
  padding: 10px 20px;
  border-radius: 5px;
  white-space: nowrap;
  width: auto !important;
  display: inline-block;
}

/* Fix for any elements with extra margins */
.bg-half .mb-3 {
  margin-bottom: 1rem !important;
}

/* Fix the misplaced backslash in container div */
.container.position-relative.py-5[\\] {
  /* Remove the backslash */
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

/* --------------- HERO ONLY -------------------------------- */
#hero .title-heading .heading {
  font-size: clamp(1.9rem, 1.2rem + 2vw, 3.1rem);
  line-height: 1.25;
}

#hero .para-desc {
  max-width: 44rem;
}

@media (max-width: 991.98px) {   /* md & below */
  #hero .modern-app-bg-shape {
    max-height: 380px;
  }
  #hero .modern-app-absolute-left,
  #hero .modern-app-absolute-right {
    display: none !important;
  }
}

@media (max-width: 575.98px) {   /* xs */
  #hero .cta-button {
    display: block;
    width: 100%;
    text-align: center;
  }
  #hero .custom-marquee p {
    font-size: .85rem;
  }
}


.close-btn {
  font-size: 20px; /* Increase font size */
  color: red; /* Change color to red */
  background-color: white; /* Add background color */
  border: 1px solid red; /* Add border */
  padding: 5px 10px; /* Increase padding */
  border-radius: 50%; /* Make it circular */
  cursor: pointer; /* Change cursor to pointer */
}


/* --- MARQUEE SPECIFIC FIXES --- */
.custom-marquee {
  width: 100%;
  overflow: hidden;
  padding: 10px 0;
  background-color: #f8f9fa; /* Optional: light background to make it stand out */
  position: relative;
  box-sizing: border-box;
}

.custom-marquee p {
  white-space: nowrap;
  display: inline-block;
  animation: marquee 20s linear infinite; /* Adjust speed as needed */
  margin: 0;
  padding: 0 20px;
  width: auto;
  font-size: 1rem;
}

/* Make the marquee responsive on different screen sizes */
@media (max-width: 991.98px) {
  .custom-marquee p {
    font-size: 0.95rem;
    animation-duration: 18s; /* Slightly faster on medium screens */
  }
}

@media (max-width: 767.98px) {
  .custom-marquee p {
    font-size: 0.9rem;
    animation-duration: 16s; /* Even faster on small screens */
  }
}

@media (max-width: 575.98px) {
  .custom-marquee {
    padding: 8px 0;
  }
  .custom-marquee p {
    font-size: 0.85rem;
    animation-duration: 14s; /* Fastest on extra small screens */
  }
}

/* Non-animated fallback for when animation isn't supported */
.no-animation .custom-marquee p {
  animation: none;
  text-align: center;
  width: 100%;
  white-space: normal; /* Allow text to wrap if needed */
  padding: 0 15px;
}

/* Marquee animation keyframes */
@keyframes marquee {
  0% {
    transform: translateX(100vw);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Optional: Pause animation on hover for better readability */
.custom-marquee:hover p {
  animation-play-state: paused;
}

/* Alternative scrolling solution if you prefer - just uncomment this and comment out animation above */
/*
.custom-marquee {
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */


.custom-marquee::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}
