/* ==========================================================================
   1. GLOBAL KEYFRAME ENTRY ANIMATIONS
   ========================================================================== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Global Reset for layout stability */
html, body {
  overflow-x: hidden;
  width: 100%;
}

/* Fix dynamic timestamp layout shifts (No-glitch rendering) */
#today-date, #live-time {
  font-variant-numeric: tabular-nums;
  display: inline-block;
  min-width: 90px;
  text-align: left;
}

/* ==========================================================================
   2. HERO CAROUSEL STYLING
   ========================================================================== */
.carousel-container,
#mainCarousel,
#hero-carousel-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: min(500px, 60vh);
  min-height: 320px;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: none !important;
  border: none !important;
  background: #0d1117 !important;
}

.carousel,
.carousel-inner,
.carousel-item {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border: none !important;
  background: transparent !important;
  height: 100%;
}

.carousel-track {
  display: flex;
  height: 100%;
  background: transparent !important;
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide,
.custom-carousel-item {
  min-width: 100%;
  height: 100% !important;
  position: relative;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 80px;
  border: none !important;
  outline: none !important;
  box-sizing: border-box;
}

.slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.2) 0%, rgba(10, 15, 30, 0.75) 100%);
  z-index: 1;
}

.content-box {
  position: relative;
  z-index: 2;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.title-card {
  background: rgba(0, 56, 147, 0.85);
  backdrop-filter: blur(8px);
  padding: 24px 32px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.title-card h2 {
  color: #ffffff;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.title-card p {
  color: #e2e8f0;
  font-size: 1.1rem;
  margin: 0;
}

.sub-text {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.2rem;
  outline: none !important;
  transition: all 0.3s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: #ffffff;
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }

/* ==========================================================================
   3. WHAT WE DO SECTION
   ========================================================================== */
.what-we-do-section {
  padding: 60px 10%;
  background-color: #ffffff;
  overflow: hidden;
  margin-top: 0 !important;
}

.section-header-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 15px;
  margin-bottom: 40px;
  position: relative;
}

.section-main-title {
  font-size: 2rem;
  font-weight: 700;
  color: #003893;
  margin: 0;
  position: relative;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  width: 100%;
}

.service-item-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  animation: fadeInUp 0.8s ease-out forwards;
}

.services-grid .service-item-card:nth-child(1) { animation-delay: 0.2s; }
.services-grid .service-item-card:nth-child(2) { animation-delay: 0.4s; }
.services-grid .service-item-card:nth-child(3) { animation-delay: 0.6s; }

.card-img-wrapper {
  width: 100%;
  height: 190px;
  overflow: hidden;
  border-bottom: 1px solid #edf2f7;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.service-item-card:hover .card-img-wrapper img {
  transform: scale(1.06);
}

.card-details-pane {
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-details-pane h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #333333;
  margin-bottom: 12px;
}

.card-details-pane p {
  font-size: 0.9rem;
  color: #555555;
  line-height: 1.6;
  margin-bottom: 0;
  flex-grow: 1;
}

/* ==========================================================================
   4. WHY CHOOSE US SECTION
   ========================================================================== */
.why-choose-us-section {
  padding: 80px 10%;
  background-color: #ffffff;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow: hidden;
}

.choose-us-container {
  max-width: 1200px;
  margin: 0 auto;
}

.choose-us-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
  align-items: center;
}

.text-paragraphs p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: #555555;
  margin-bottom: 18px;
}

.investor-features {
  display: flex;
  flex-wrap: wrap; 
  gap: 20px 40px; 
  margin-top: 30px;
  width: 100%;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 calc(50% - 20px); 
  box-sizing: border-box; 
}

.square-icon {
  color: #d9383a; 
  font-weight: bold;
  font-size: 1.1rem;
}

.feature-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #333333;
}

.choose-us-image-wrapper {
  position: relative;
}

.image-frame {
  position: relative;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.image-frame img {
  width: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.choose-us-image-wrapper:hover .image-frame img {
  transform: scale(1.03);
}

/* ==========================================================================
   5. SCROLL INTERSECTION ANIMATIONS
   ========================================================================== */
.scroll-fade-down {
  opacity: 0;
  transform: translateY(-30px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.scroll-fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.scroll-fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.scroll-fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.scroll-animate-trigger.visible .scroll-fade-down,
.scroll-animate-trigger.visible .scroll-fade-up,
.scroll-animate-trigger.visible .scroll-fade-left,
.scroll-animate-trigger.visible .scroll-fade-right {
  opacity: 1;
  transform: translate(0, 0);
}

/* ==========================================================================
   6. RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 992px) {
  .choose-us-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .why-choose-us-section,
  .what-we-do-section {
    padding: 60px 5%;
  }
  .slide, .custom-carousel-item {
    padding: 0 40px;
    justify-content: center;
  }
  .title-card h2 { font-size: 1.6rem; }
  .title-card p, .sub-text { font-size: 1rem; }
}

@media (max-width: 576px) {
  .slide, .custom-carousel-item {
    padding: 0 16px;
  }
  .title-card {
    padding: 16px 20px;
  }
  .title-card h2 {
    font-size: 1.3rem;
  }
  .sub-text {
    font-size: 0.95rem;
  }
  .nav-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .prev-btn { left: 8px; }
  .next-btn { right: 8px; }

  .investor-features {
    flex-direction: column;
    gap: 12px;
  }
  .feature-item {
    flex: 1 1 100%;
  }
  .section-main-title {
    font-size: 1.5rem;
  }
}