/* ==========================================================================
   GAIN Softwares Custom Styles (Complements UIdeck Play Bootstrap)
   ========================================================================== */

/* Brand styling in Navbar */
.gain-navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.gain-navbar-brand .brand-logo-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: contain;
  background: #ffffff;
  padding: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
}

.gain-navbar-brand:hover .brand-logo-img {
  transform: scale(1.05) rotate(4deg);
}

.gain-navbar-brand .brand-text-wrapper {
  display: flex;
  flex-direction: column;
}

.gain-navbar-brand .brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.1;
  color: #ffffff;
  transition: color 0.3s ease;
}

.gain-navbar-brand .brand-subtitle {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

/* When header is sticky */
.ud-header.sticky .gain-navbar-brand .brand-title {
  color: #212b36;
}

.ud-header.sticky .gain-navbar-brand .brand-subtitle {
  color: #3056d3;
}

/* Navbar Nav Layout & No-Wrap Fixes */
.navbar-nav {
  align-items: center;
}

.navbar-nav .nav-item {
  padding: 0 8px !important;
}

@media only screen and (min-width: 992px) and (max-width: 1200px) {
  .navbar-nav .nav-item {
    padding: 0 5px !important;
  }
}

.navbar-nav .nav-item > a {
  white-space: nowrap !important;
  font-size: 14.5px !important;
  font-weight: 500 !important;
  padding: 24px 6px !important;
  display: inline-block;
  transition: all 0.25s ease !important;
}

/* Active and Hover styling in Transparent Hero Header */
.ud-header:not(.sticky) .navbar-nav .nav-item > a {
  color: rgba(255, 255, 255, 0.85) !important;
  opacity: 1 !important;
}

.ud-header:not(.sticky) .navbar-nav .nav-item > a:hover,
.ud-header:not(.sticky) .navbar-nav .nav-item > a.active {
  color: #ffffff !important;
  opacity: 1 !important;
  font-weight: 700 !important;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

/* Active and Hover styling in Sticky White Header */
.ud-header.sticky .navbar-nav .nav-item > a {
  color: #212b36 !important;
  opacity: 1 !important;
}

.ud-header.sticky .navbar-nav .nav-item > a:hover,
.ud-header.sticky .navbar-nav .nav-item > a.active {
  color: #3056d3 !important;
  opacity: 1 !important;
  font-weight: 700 !important;
}

/* Brand responsiveness on mobile screens */
@media (max-width: 575px) {
  .gain-navbar-brand {
    gap: 8px !important;
  }
  .gain-navbar-brand .brand-logo-img {
    width: 36px !important;
    height: 36px !important;
  }
  .gain-navbar-brand .brand-title {
    font-size: 19px !important;
  }
  .gain-navbar-brand .brand-subtitle {
    font-size: 9px !important;
    letter-spacing: 1.2px !important;
  }
}

/* Navbar Action Buttons - Desktop Only (>= 992px) */
@media (min-width: 992px) {
  .navbar-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    margin: 0 !important;
  }

  .navbar-btn .ud-main-btn {
    padding: 9px 18px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    transition: all 0.3s ease !important;
  }

  .ud-header:not(.sticky) .navbar-btn .ud-login-btn {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
    backdrop-filter: blur(4px);
  }

  .ud-header:not(.sticky) .navbar-btn .ud-login-btn:hover {
    background: rgba(255, 255, 255, 0.25) !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
  }

  .ud-header:not(.sticky) .navbar-btn .ud-white-btn {
    background: #ffffff !important;
    color: #3056d3 !important;
    border: 1px solid #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
  }

  .ud-header:not(.sticky) .navbar-btn .ud-white-btn:hover {
    background: #f0f4ff !important;
    color: #1d3fb5 !important;
    transform: translateY(-1px);
  }

  /* Sticky Navbar Buttons */
  .ud-header.sticky .navbar-btn .ud-login-btn {
    background: transparent !important;
    border: 1px solid #3056d3 !important;
    color: #3056d3 !important;
  }

  .ud-header.sticky .navbar-btn .ud-login-btn:hover {
    background: #eff4ff !important;
  }

  .ud-header.sticky .navbar-btn .ud-white-btn {
    background: #3056d3 !important;
    border: 1px solid #3056d3 !important;
    color: #ffffff !important;
  }

  .ud-header.sticky .navbar-btn .ud-white-btn:hover {
    background: #212b36 !important;
    border-color: #212b36 !important;
    color: #ffffff !important;
  }
}

/* Explicitly hide desktop buttons on mobile header to eliminate overlap */
@media (max-width: 991.98px) {
  .navbar-btn {
    display: none !important;
  }
}

/* Mobile Navbar Dropdown Styling */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background: #ffffff !important;
    border-radius: 14px !important;
    padding: 16px 20px !important;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.2) !important;
    border: 1px solid #edf2f7 !important;
    position: absolute !important;
    top: 100% !important;
    left: 12px !important;
    right: 12px !important;
    max-width: calc(100% - 24px) !important;
    z-index: 1000 !important;
  }
  .navbar-collapse .navbar-nav {
    align-items: flex-start !important;
    padding: 0 !important;
    width: 100% !important;
  }
  .navbar-collapse .nav-item {
    padding: 0 !important;
    width: 100% !important;
  }
  .navbar-collapse .nav-item > a {
    color: #212b36 !important;
    padding: 10px 0 !important;
    display: block !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    border-bottom: 1px solid #f1f5f9;
  }
  .navbar-collapse .nav-item:last-child > a {
    border-bottom: none;
  }
  .navbar-collapse .nav-item > a:hover,
  .navbar-collapse .nav-item > a.active {
    color: #3056d3 !important;
    font-weight: 700 !important;
    text-shadow: none !important;
  }
}

/* Hero Badge */
.hero-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}

.hero-tag-badge .pulse-dot {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Hero Image Screen Mockup Frame */
.gain-hero-screen-card {
  position: relative;
  background: #ffffff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.gain-hero-screen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.gain-window-dots {
  display: flex;
  gap: 6px;
}

.gain-window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.gain-window-dots .dot-red { background: #ef4444; }
.gain-window-dots .dot-yellow { background: #f59e0b; }
.gain-window-dots .dot-green { background: #10b981; }

.gain-window-title {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: 0.5px;
}

.gain-hero-screen-img {
  width: 100%;
  height: auto;
  display: block;
}

/* Floating Hero Badges */
.floating-hero-pill {
  position: absolute;
  background: #ffffff;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3;
  animation: floatSlow 4s ease-in-out infinite alternate;
}

.floating-hero-pill.pill-left {
  bottom: 25px;
  left: -20px;
}

.floating-hero-pill.pill-right {
  top: 35px;
  right: -20px;
  animation-delay: 2s;
}

@keyframes floatSlow {
  0% { transform: translateY(0px); }
  100% { transform: translateY(-10px); }
}

@media (max-width: 991px) {
  .floating-hero-pill {
    display: none;
  }
}

/* Markets Trust Row */
.textile-markets-strip {
  margin-top: 35px;
  margin-bottom: 25px;
  text-align: center;
}

.textile-markets-title {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.textile-markets-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.textile-market-tag {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.textile-market-tag:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* Feature Icon enhancements */
.ud-single-feature:hover .ud-feature-icon {
  background: #3056d3;
  color: #ffffff;
  transform: translateY(-5px);
}

.ud-feature-icon {
  transition: all 0.3s ease;
}

/* Download Filter Tabs */
.download-filters-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.download-filter-btn {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #475569;
  padding: 8px 20px;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  cursor: pointer;
}

.download-filter-btn:hover {
  background: #eff4ff;
  border-color: #3056d3;
  color: #3056d3;
}

.download-filter-btn.active {
  background: #3056d3;
  border-color: #3056d3;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(48, 86, 211, 0.3);
}

/* Downloads Card */
.download-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 26px 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  border: 1px solid #edf2f7;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.download-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(48, 86, 211, 0.12);
  border-color: #3056d3;
}

.download-icon-box {
  width: 56px;
  height: 56px;
  background: #eff4ff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #3056d3;
  margin-bottom: 20px;
}

/* Interactive Party Ledger Search Simulator */
.interactive-simulator-card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  padding: 30px;
}

.party-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.party-item-row:hover, .party-item-row.active {
  background: #eff4ff;
  border-color: #3056d3;
}

/* WhatsApp Floating Action Button */
.whatsapp-floating-btn {
  position: fixed;
  left: 30px;
  bottom: 30px;
  z-index: 99;
  background: #25d366;
  color: #ffffff;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  transition: all 0.3s ease;
  text-decoration: none;
}

.whatsapp-floating-btn:hover {
  background: #1eb956;
  color: #ffffff;
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.6);
}

/* WhatsApp Verified Badge */
.meta-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e8f9ee;
  color: #0d8a3e;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid #b7ebd0;
}

/* ==========================================================================
   Comprehensive Mobile & Tablet Responsiveness (< 992px and < 576px)
   ========================================================================== */

@media (max-width: 991.98px) {
  /* Prevent any horizontal screen scroll */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
  }

  /* Compact section spacing on tablets & phones */
  .ud-features,
  .ud-about,
  .ud-pricing,
  .ud-faq,
  .ud-testimonials,
  .ud-contact {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
  }

  /* Floating hero pills hide cleanly */
  .floating-hero-pill {
    display: none !important;
  }
}

@media (max-width: 767.98px) {
  /* Hero Section Mobile Polish */
  .ud-hero {
    padding-top: 110px !important;
    padding-bottom: 50px !important;
  }

  .hero-tag-badge {
    font-size: 11px !important;
    padding: 6px 14px !important;
    margin-bottom: 16px !important;
    max-width: 96% !important;
    line-height: 1.4 !important;
    text-align: center !important;
  }

  .ud-hero-title {
    font-size: 26px !important;
    line-height: 1.25 !important;
    margin-bottom: 14px !important;
  }

  .ud-hero-desc {
    font-size: 14px !important;
    line-height: 22px !important;
    margin-bottom: 22px !important;
    padding: 0 4px !important;
  }

  /* Hero CTA Buttons on Mobile */
  .ud-hero-buttons {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 25px !important;
    padding: 0 !important;
  }

  .ud-hero-buttons li {
    width: 100% !important;
    max-width: 290px !important;
    margin: 0 !important;
  }

  .ud-hero-buttons .ud-main-btn {
    width: 100% !important;
    justify-content: center !important;
    padding: 12px 18px !important;
    font-size: 14px !important;
    border-radius: 8px !important;
  }

  /* Industry Badges Strip on Mobile */
  .textile-markets-strip {
    margin-top: 20px !important;
    margin-bottom: 25px !important;
  }

  .textile-markets-title {
    font-size: 11px !important;
    letter-spacing: 0.6px !important;
    margin-bottom: 10px !important;
  }

  .textile-markets-badges {
    gap: 7px !important;
  }

  .textile-market-tag {
    font-size: 11px !important;
    padding: 5px 11px !important;
  }

  /* Hero Mockup Card on Mobile */
  .gain-hero-screen-card {
    border-radius: 12px !important;
  }

  .gain-hero-screen-header {
    padding: 8px 12px !important;
  }

  .gain-window-title {
    font-size: 11px !important;
    max-width: 170px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Section Titles on Mobile */
  .ud-section-title {
    margin-bottom: 30px !important;
  }

  .ud-section-title h2 {
    font-size: 23px !important;
    line-height: 1.3 !important;
    margin-bottom: 10px !important;
  }

  .ud-section-title p {
    font-size: 14px !important;
    line-height: 21px !important;
  }

  /* e-Way & e-Invoice Card on Mobile */
  #eway-einvoice h2 {
    font-size: 23px !important;
    line-height: 1.3 !important;
  }

  /* Simulator Card on Mobile */
  .interactive-simulator-card {
    padding: 16px !important;
    border-radius: 12px !important;
  }

  /* Floating WhatsApp Button on Mobile */
  .whatsapp-floating-btn {
    left: 14px !important;
    bottom: 16px !important;
    width: 46px !important;
    height: 46px !important;
    font-size: 24px !important;
  }

  /* Back to Top Button on Mobile */
  .back-to-top {
    right: 14px !important;
    bottom: 16px !important;
    width: 38px !important;
    height: 38px !important;
    line-height: 38px !important;
    font-size: 16px !important;
  }

  /* Form wrapper on mobile */
  .ud-contact-form-wrapper {
    padding: 24px 18px !important;
    border-radius: 14px !important;
  }
}

@media (max-width: 400px) {
  .ud-hero-title {
    font-size: 22px !important;
  }
  .gain-window-title {
    max-width: 135px !important;
  }
}
