:root {
  /* Corrected color palette */
  --neembu-green: #008c15;
  --lemon-yellow: #ffe31f;
  --tea-green: #edfce0;
  --pale-yellow: #fffce9;
  --black-bean: #1d1205;

  /* Using the brand colors for our design system */
  --primary-color: var(--lemon-yellow);
  --text-dark: var(--black-bean);
  --text-light: #666666;
  --white: #ffffff;
  --light-bg: var(--pale-yellow);
  --green: var(--neembu-green);

  /* Color variations (can be used as needed) */
  --green-90: rgba(0, 140, 21, 0.9);
  --green-80: rgba(0, 140, 21, 0.8);
  --green-60: rgba(0, 140, 21, 0.6);
  --green-20: rgba(0, 140, 21, 0.2);

  --yellow-90: rgba(255, 227, 31, 0.9);
  --yellow-80: rgba(255, 227, 31, 0.8);
  --yellow-60: rgba(255, 227, 31, 0.6);
  --yellow-20: rgba(255, 227, 31, 0.2);
}

/* Custom Scrollbar */
/* For Webkit browsers (Chrome, Safari, newer Edge) */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(237, 252, 224, 0.3); /* Updated to use tea-green */
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 140, 21, 0.5); /* Updated to use neembu-green */
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 140, 21, 0.7); /* Updated to use neembu-green */
}

/* For Firefox */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 140, 21, 0.5) rgba(237, 252, 224, 0.3); /* Updated colors */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  /* Updated to use Montserrat as primary font with fallbacks */
  font-family: "Montserrat", "Poppins", sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  position: relative; /* Added for absolute positioning context */
}

/* Add this to the top-level styles to prevent horizontal scrolling */
html,
body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Background image as a pseudo-element to cover just the top portion */
body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 90vh; /* Cover the top half of the viewport */
  background-image: url("images/hero-background.png");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 0; /* Place behind content */
}

/* Header styles */
.header {
  position: relative;
  z-index: 9999; /* Ensure header is above everything */
  padding: 0; /* Remove padding from main header */
}

/* Top bar (desktop) */
.top-bar {
  padding: 10px 0;
  background: var(--primary-color); /* yellow bar */
}

.top-bar .container {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.top-bar-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}

.top-bar-link {
  color: var(--text-dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}

.top-bar-link:hover {
  text-decoration: underline;
}

.top-bar-sep {
  color: rgba(29, 18, 5, 0.55);
}

/* Language dropdown (desktop) */
.language-dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.language-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  background: transparent;
  border: none;
  cursor: pointer;

  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-dark);
  padding: 6px 8px;
}

.language-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 64px;

  background: var(--white);
  border: 1px solid rgba(29, 18, 5, 0.14);
  border-radius: 10px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.12);

  padding: 6px;
  display: none;
  z-index: 10001;
}

.language-dropdown.is-open .language-dropdown-menu {
  display: grid;
  gap: 4px;
}

/* Make the dropdown options look like simple menu items */
.language-dropdown-menu .lang-btn {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 1;
}

.language-dropdown-menu .lang-btn:hover {
  background: rgba(29, 18, 5, 0.06);
}

.language-dropdown-menu .lang-btn.active::after {
  content: none;
}

/* Keep mobile unchanged: mobile CSS already hides .top-bar */

.main-header {
  padding: 30px 0;
  background-color: transparent;
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Make sure container has padding */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px; /* This ensures horizontal padding */
}

.header .container {
  display: flex;
  align-items: center;
}

.logo a {
  text-decoration: none;
  color: var(--text-dark);
  display: flex;
  align-items: center;
}

.logo img {
  max-height: 59px;
  width: auto;
}

.main-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 70px;
}

.main-nav .nav-item {
  text-decoration: none;
  font-size: 18px;
  color: var(--text-dark);
  font-weight: 600;
  position: relative;
  transition: transform 0.3s ease;
  display: inline-block;
}

/* Top navigation caret (used on Products dropdown trigger) */
.main-nav .nav-item.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.main-nav .nav-item .nav-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  transform: translateY(1px);
  transition: transform 0.2s ease;
}

/* Rotate caret when dropdown is expanded */
.main-nav .nav-item.nav-dropdown-trigger[aria-expanded="true"] .nav-caret {
  transform: translateY(1px) rotate(180deg);
}

/* Avoid showing the caret in the mobile drawer */
@media (max-width: 768px) {
  .main-nav .nav-item .nav-caret {
    display: none;
  }
}

/* Underline effect on hover */
.main-nav .nav-item::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--green);
  transition: width 0.3s ease;
}

.main-nav .nav-item:hover::after {
  width: 100%;
}

/* Jumping animation on hover */
.main-nav .nav-item:hover {
  transform: translateY(-3px);
  animation: navJump 0.5s ease;
}

@keyframes navJump {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(-3px);
  }
}

/* Hero section */
.hero {
  padding: 200px 0 20px;
  text-align: left;
  position: relative; /* For stacking context */
  z-index: 1; /* Above background but below header */
  min-height: 90vh;
}

.hero .container {
  position: relative;
}

.hero h1 {
  font-size: 72px;
  max-width: 800px;
  margin: 0 0 40px;
  line-height: 1.2;
  animation-delay: 0.3s;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  height: 52px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
}

.primary-btn {
  background-color: var(--primary-color);
  color: var(--text-dark);
}

/* Features section */
.features {
  padding: 60px 0 80px;
  margin-top: -20px;
  position: relative;
  z-index: 2;
}

.features h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 48px;
  line-height: 48px;
  font-weight: 700; /* match product title thickness */
  margin-bottom: 60px;
  position: relative;
  display: inline-block;
}

.features h2::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--lemon-yellow);
}

.features-intro {
  font-size: 18px;
  line-height: 28px;
  font-weight: 400;
  margin-bottom: 40px;
  max-width: 460px; /* align intro width with the features list column */
}

.features-content {
  margin-top: auto;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  align-items: stretch;
}

.features .container {
  position: relative; /* anchor for the section-level image container */
  height: 800px;
  display: flex;
  flex-direction: column;
}

/* Section-level background image container (sibling of the grid) */
.features .feature-image-container {
  position: absolute;
  top: auto;
  left: auto;
  /* align it to the right column area; keep prior visual behavior */
  right: calc(-60vw + 50% - 20px);
  bottom: 0px; /* lines up with padding-bottom of .features */
  width: 60vw;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  clip-path: url(#featureImageClip);
}

.features .feature-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Feature list on the left */
.features-list {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  padding-top: 0;
  height: 480px; /* 3 items × 138px */
}

.feature-item {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 28px;
  transition: all 0.3s ease;
  text-align: left;
  width: 100%;
  height: 160px;
  color: rgba(29, 18, 5, 0.45); /* greyed out by default */
}

.feature-item:hover {
  opacity: 0.8;
}

.feature-item.active {
  color: var(--text-dark);
}

.feature-icon-wrapper {
  /* Don't reserve space when not active so text aligns flush-left */
  width: 46px;
  height: 66px;
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: flex-start;
}

.feature-item.active .feature-icon-wrapper {
  display: flex;
}

.feature-leaf-icon {
  width: 46px;
  height: 66px;
  opacity: 0;
  transition: opacity 0.3s ease;
  transform: translateX(-6px) scale(0.96);
  transform-origin: left center;
}

.feature-item.active .feature-leaf-icon {
  opacity: 1;
  transform: translateX(0) scale(1);
  animation: leafPopIn 0.35s ease-out;
}

@keyframes leafPopIn {
  0% {
    opacity: 0;
    transform: translateX(-10px) scale(0.9);
  }
  60% {
    opacity: 1;
    transform: translateX(0) scale(1.06);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.feature-item-text {
  flex: 1;
}

.feature-item-text h3 {
  font-family: "Montserrat", sans-serif;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.4;
  color: currentColor; /* inherit greyed/active color from .feature-item */
  margin: 0;
  text-align: left;
}

.feature-item.active .feature-item-text h3 {
  font-weight: 700;
}

.feature-separator {
  height: 3px;
  width: 100%;
  border: none;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(29, 18, 5, 0.28) 0 10px,   /* dash length */
    transparent 10px 20px          /* gap length */
  );
}

/* Feature display area on the right */
.features-display {
  position: relative;
  height: 480px; /* 3 items × 138px */
  display: flex;
  flex-direction: column;
  z-index: 1; /* above the section-level image */
}

/* Remove old nested image container rules applying inside features-display */
.features-display > .feature-image-container {
  display: none;
}

/* Floating card */
.feature-content {
  position: absolute;
  bottom: -20px;
  left: 0;
  z-index: 2;
  display: none;
  /* Desktop: do NOT animate the whole container; animate text only */
  animation: none;
  width: 90%;
  max-width: 500px;
  margin-top: -20px;
}

.feature-content.active {
  display: block;
}

/* Desktop: animate only the text inside the feature card */
.feature-content.active .feature-card p {
  animation: fadeInSlide 0.5s ease;
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateX(60px) translateY(20px) scale(0.48);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
  }
}

.feature-card {
  background: var(--white);
  border-radius: 12px;
  padding: 48px 60px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.feature-card p {
  font-size: 16px;
  line-height: 24px;
  margin-bottom: 30px;
  color: var(--text-dark);
}

.feature-cta {
  display: inline-block;
  padding: 12px 24px;
  height: 52px;
  background-color: var(--primary-color);
  color: var(--text-dark);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
}

/* Navigation arrows container */
.feature-nav-container {
  position: absolute;
  right: 0;
  bottom: -20px;
  display: flex;
  gap: 30px;
  z-index: 3;
}

.feature-nav {
  width: 100px;
  height: 70px;
  background-color: var(--lemon-yellow);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  color: var(--text-dark);
}

.feature-nav-icon {
  display: block;
  width: 34px;
  height: 18px;
}

.feature-nav:hover {
  background-color: var(--neembu-green);
  color: var(--white);
  transform: translateY(-2px);
}

/* Products section */
.products {
  padding: 60px 0;
  position: relative; /* Add positioning context */
  margin-bottom: 60px;
  isolation: isolate;
}

/* Desktop-only background area (from Products start down to end of UPortal) */
@media (min-width: 769px) {
  /* 
  .partners::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 100vw;
    height: 100%;
    transform: translateX(-50%);

    background-image: url("images/partners-desktop-background.svg");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;

    z-index: -1;
    pointer-events: none;
  }
  */

  .products::before {
    content: "";
    position: absolute;
    top: -100px;
    left: 50%;
    width: 100vw;
    height: 1300px;
    bottom: 0;
    transform: translateX(-50%);

    background-image: url("images/uportal-desktop-background.svg");
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;

    z-index: -1;
    pointer-events: none;
  }
}

.products h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 48px;
  line-height: 48px;
  font-weight: 700; /* match product title thickness */
  margin-bottom: 180px;
  position: relative;
  display: inline-block;
  animation-delay: 0.3s;
}

.products h2::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--lemon-yellow);
}

/* Modern product title (UPortal) */
.product-title {
  font-family: "Montserrat", sans-serif;
  font-size: 60px;
  line-height: 1.05;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 18px;
  padding-left: 0; /* override edge-line-heading */
  flex-wrap: wrap;
}

.product-title [data-lang] {
  display: none;
}

body.lang-nl .product-title [data-lang="nl"],
body.lang-fr .product-title [data-lang="fr"],
body.lang-en .product-title [data-lang="en"] {
  display: inline;
}

/* remove the green line for titles that use the leaf */
.product-title::before {
  content: none !important;
}

.product-title-leaf {
  width: 46px;
  height: 66px;
  flex: 0 0 auto;
}

/* Heading with line from absolute edge of the screen */
.line-from-edge {
  position: relative;
  margin-bottom: 30px;
  padding-left: 20px; /* Space for the line */
  display: flex;
  align-items: center;
}

.line-from-edge::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%; /* Extend to the left of the text */
  width: 100vw; /* Full viewport width */
  height: 3px;
  background-color: var(--green);
  transform: translateY(-50%);
}

/* Remove previous container styles that are no longer needed */
.full-width-container {
  width: 100%;
}

.edge-line {
  display: none;
}

/* UPay flow image area (used in HTML) */
.product-upay-flow {
  position: relative;
  width: 100%;
  margin-top: 40px;
}

.product-upay-flow img {
  width: 100%;
  height: auto;
}

/* About section */
.about {
  padding: 120px 0;
  margin-bottom: 100px;
}

.about-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-direction: row-reverse; /* image left, text right (matches current HTML order) */
  gap: 60px;
}

.about-text {
  max-width: 500px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* About heading: match other section titles (e.g. Features) */
.about-text h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 50px;
  line-height: 50px;
  font-weight: 700; /* match product title thickness */
  margin-bottom: 60px;
  position: relative;
  display: inline-block;
}

.about-text h2::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 60px;
  height: 4px;
  background-color: var(--lemon-yellow);
}

/* About CTA */
.about-cta {
  margin-top: 30px;
  display: flex;
  align-items: stretch;
  gap: 16px;
  flex-wrap: nowrap;
}

.phone-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--text-dark);
  background-color: transparent;
  height: 52px;
  white-space: nowrap;
}

.phone-number:hover {
  background-color: var(--primary-color);
}

/* About body: 3 paragraphs with comfortable spacing (per screenshot) */
.about-body p {
  margin: 0 0 26px;
  font-size: 20px;
  font-weight: 400;
  line-height: 32px;
  color: var(--text-dark);
}

.about-img {
  padding-right: 0;
  padding-left: 40px; /* keep the visual spacing but on the correct side */
  position: relative; /* anchor absolute-positioned decorative leaves */
}

.about-img > .about-image {
  position: relative;
  z-index: 1;
  width: 700px;
}

.about-leaf {
  position: absolute;
  z-index: 2; /* above the About image */
  width: 88px;
  height: auto;
  pointer-events: none;
  user-select: none;
}

/* Bottom-left leaf */
.about-leaf--bottom-left {
  left: 0;
  bottom: 50px;
  transform: scaleX(-1);
  rotate: 15deg;
}

/* Top-right leaf (mirrored) */
.about-leaf--top-right {
  right: -50px;
  top: 50px;
  rotate: -25deg;
}

/* Footer (new layout) */
.footer {
  padding: 70px 0 40px;
  margin-top: 60px;

  /* Footer background image, anchored to bottom and ending 100px above bottom */
  position: relative;
  isolation: isolate; /* ensures ::before stays behind footer content */
}

.footer::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 100vw;
  height: calc(100% + 100px);
  transform: translateX(-50%);

  background-image: url("images/footer-desktop-background.svg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;

  z-index: -1;
  pointer-events: none;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 34px;
  align-items: start;
}

.footer-logo {
  justify-self: start;
}

.footer-logo img {
  max-width: 220px;
  height: auto;
  display: block;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 56px;
}

.footer-col h4 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text-dark);
}

.footer-col a {
  display: block;
  text-decoration: none;
  color: var(--text-dark);
  opacity: 0.85;
  font-size: 16px;
  line-height: 28px;
  margin: 6px 0;
}

.footer-col a:hover {
  color: var(--green);
  opacity: 1;
}

.footer-col--newsletter p {
  margin: 0 0 18px;
  color: var(--text-dark);
  opacity: 0.85;
  line-height: 26px;
  font-size: 16px;
}

.footer-newsletter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.footer-newsletter input {
  height: 44px;
  border-radius: 6px;
  border: 2px solid rgba(29, 18, 5, 0.35);
  padding: 0 14px;
  font-size: 16px;
  background: transparent;
  color: var(--text-dark);
  outline: none;
}

.footer-newsletter input:focus {
  border-color: rgba(29, 18, 5, 0.7);
}

.footer-newsletter button {
  height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  border: none;
  background: #0b0b12;
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.footer-newsletter button:hover {
  background: var(--text-dark);
}

.footer-social {
  display: flex;
  gap: 18px;
  align-items: center;
}

.footer-social-link {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-dark);
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.footer-social-icon {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  padding: 6px;
  box-sizing: border-box;
  filter: none; /* avoid making icons too light/invisible */
  opacity: 1;
}

.footer-social-link:hover {
  background: rgba(29, 18, 5, 0.08);
  color: var(--green);
  transform: translateY(-1px);
}

.footer-social-link:hover .footer-social-icon {
  filter: none;
}

.footer-bottom {
  margin-top: 46px;
  padding-top: 22px;
  text-align: center;
  color: rgba(29, 18, 5, 0.55);
  font-size: 15px;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Footer responsive */
@media (max-width: 1100px) {
  .footer-top {
    grid-template-columns: 1fr;
    row-gap: 34px;
  }

  .footer-columns {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .footer-logo img {
    max-width: 200px;
  }
}

@media (max-width: 768px) {
  .footer {
    padding: 50px 0 30px;
  }

  .footer-columns {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-newsletter {
    grid-template-columns: 1fr;
  }

  .footer-newsletter button {
    width: 100%;
  }
}

/* Footer mobile icons */
.footer-icon.mobile-only {
  display: none; /* Hidden on desktop */
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.contact-item {
  display: flex;
  align-items: center;
}

/* Style contact links */
.contact-item a {
  text-decoration: none;
  color: var(--text-dark);
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--green);
}

/* Language selector styles */
.language-selector {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px; /* Add spacing between buttons */
}

.lang-btn {
  background: none;
  border: none;
  font-family: "Montserrat", sans-serif;
  font-size: 16px; /* Larger font */
  font-weight: 600;
  color: var(--text-dark);
  padding: 8px 12px; /* Increased padding */
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.lang-btn:hover {
  opacity: 0.9;
}

.lang-btn.active {
  opacity: 1;
  position: relative;
}

.lang-btn.active::after {
  content: "";
  position: absolute;
  bottom: 2px; /* Adjust bottom position */
  left: 8px;
  right: 8px;
  height: 2px;
  background-color: var(--green);
}

/* Language content display */
[data-lang] {
  display: none;
}

body.lang-nl [data-lang="nl"],
body.lang-en [data-lang="en"],
body.lang-fr [data-lang="fr"] {
  display: inline-block;
}

/* Ensure language buttons are always visible regardless of current language */
.lang-btn[data-lang] {
  display: inline-block !important;
}

.logo {
  flex: 0 0 auto;
}

.main-nav {
  flex: 0 0 auto;
  margin-left: auto;
}

/* Language selector placement variants */
.language-selector--drawer {
  display: none; /* hidden on desktop */
}

@media (max-width: 768px) {
  /* Hide top-bar language selector on mobile */
  .language-selector--topbar {
    display: none;
  }

  /* Show language selector inside the drawer */
  .language-selector--drawer {
    display: flex;
    justify-content: center;
    padding: 18px 0 0;
    margin-top: 10px;
  }

  /* Make the main logo as big as the hamburger icon */
  .logo img {
    height: 30px;
    max-height: 30px;
    width: auto;
  }
}

/* Animation keyframes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Apply fade-in animation to text elements */
.hero h1,
.hero .btn,
.products h2,
.product-intro,
.product-section h3,
.product-info p,
.about-text h2,
.about-body p {
  opacity: 0;
  animation: fadeIn 0.8s ease forwards;
}

/* Staggered animation delays for different elements */
.hero .btn {
  animation-delay: 0.6s;
}

.about-text h2 {
  animation-delay: 0.3s;
}

/* About paragraphs are styled via .about-body p */
.about-body p {
  animation-delay: 0.5s;
}

/* Updated product section layout */
#uportal {
  display: flex;
  flex-direction: row;
  gap: 60px;
  margin-bottom: 120px;
  position: relative;
  align-items: flex-start;
}

#uportal .product-title-bullet {
  flex: 0 0 auto;
  padding-top: 2px;
}

#uportal .product-title-leaf {
  width: 46px;
  height: 66px;
  display: block;
}

/* Restore UPortal desktop layout (keep image next to text) */
#uportal {
  display: flex;
  flex-direction: row;
}

#uportal .uportal-left {
  display: flex;
}

/* Mobile-only: stack UPortal text then image */
@media (max-width: 768px) {
  #uportal {
    flex-direction: column;
  }

  #uportal .uportal-left {
    display: block;
  }
}

/* UPay layout (matches screenshot): title row on top, content+image row below */
#upay {
  display: flex;
  flex-direction: column;
  gap: 40px;
  align-items: stretch;
  padding-left: 0;
}

#upay .product-title {
  padding-right: 600px;
}

#upay .upay-left {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

/* Make the title span full width (above the two-column row) */
#upay .upay-left .product-text {
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 24px;
  width: 100%;
}

#upay .upay-left .product-text > div:first-child {
  /* title wrapper */
  width: 100%;
}

#upay .upay-left .product-text > div:first-child .product-title {
  width: 100%;
  max-width: none;
}

/* The second block (info + CTA) + the image become a two-column row */
#upay .upay-content-row {
  display: grid;
  grid-template-columns: 420px 1fr;
  column-gap: 60px;
  align-items: start;
  margin-top: 60px;
}

#upay .upay-content-row .product-info {
  margin: 0;
  padding: 0;
}

.product-info {
  font-size: 20px;
  line-height: 28px;
  color: var(--text-dark);
}

#upay .upay-right.upay-image-container {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

#upay .upay-hero-image {
  width: 100%;
  height: auto;
  max-width: 900px;
  display: block;
}


/* Tablet sizing */
@media (max-width: 1100px) {
  #upay .upay-content-row {
    grid-template-columns: 420px 1fr;
    column-gap: 40px;
  }
}

@media (max-width: 1100px) {
  #upay .upay-left {
    flex-basis: 600px;
    max-width: 600px;
    padding-right: 50px;
  }
}

@media (max-width: 768px) {
  #upay {
    flex-direction: column;
    gap: 24px;
    margin-bottom: 0px;
    position: relative;
  }

  #upay .upay-left {
    align-items: flex-start;
    flex: 1 1 auto;
    max-width: 100%;
    padding-right: 50px;
  }

  #upay .upay-content-row {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 0;
  }

  #upay .product-title {
    padding-right: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 35px;
  }

  #upay .upay-right.upay-image-container {
    width: 100%;
    justify-content: flex-start;
  }

  #upay .upay-hero-image {
    width: 100%;
    height: auto;
    display: block;
  }

  #upay .product-info {
    font-size: 12px;
    line-height: 18px;
    margin-left: 0;
  }

  #upay .buttons-container {
    width: 100%;
    align-items: stretch;
  }

  #upay .buttons-container > a {
    width: 100%;
  }

  #upay .upay-right.upay-image-container {
    justify-content: center;
  }

  #upay .upay-hero-image {
    transform: none;
  }
}

/* UPay: mobile-only stacked images (keeps desktop unchanged) */
.upay-hero-images--mobile {
  display: none;
}

@media (max-width: 768px) {
  /* Swap UPay hero graphic for 2 stacked images on mobile */
  #upay .upay-hero-image--desktop {
    display: none;
  }

  #upay .upay-hero-images--mobile {
    display: flex;
    flex-direction: column;
    gap: -20px;
    width: 100%;
  }

  #upay .upay-hero-image--mobile {
    width: 100%;
    height: auto;
    display: block;
  }
}

.uportal-bg {
  position: absolute;
  bottom: 0;
  width: 100vw;
  background-color: var(--light-bg);
  height: 350px;
  z-index: -2;
  left: 50%;
  transform: translateX(-50%);
  margin-right: -50vw;
}

/* Scroll Reveal Animations */
.scroll-reveal {
  transition: transform 0.8s ease, opacity 0.8s ease;
}

.reveal-hidden {
  opacity: 0;
  transform: translateY(30px);
}

.reveal-active {
  opacity: 1;
  transform: translateY(0);
}

/* Different animation directions */
.reveal-from-left {
  transform: translateX(-50px);
}

.reveal-from-right {
  transform: translateX(50px);
}

.reveal-from-left.reveal-active,
.reveal-from-right.reveal-active {
  transform: translateX(0);
}

/* Different animation delays for sequential animations */
.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

.reveal-delay-3 {
  transition-delay: 0.3s;
}

.reveal-delay-4 {
  transition-delay: 0.4s;
}

/* Mobile Navigation Styles */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1000;
  padding: 10px;
}

.menu-icon {
  width: 30px;
  height: 20px;
  position: relative;
}

.menu-icon span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--text-dark);
  border-radius: 3px;
  opacity: 1;
  left: 0;
  transition: 0.25s ease-in-out;
}

.menu-icon span:nth-child(1) {
  top: 0px;
}

.menu-icon span:nth-child(2),
.menu-icon span:nth-child(3) {
  top: 9px;
}

.menu-icon span:nth-child(4) {
  top: 18px;
}

/* Menu open state */
.menu-open .menu-icon span:nth-child(1) {
  top: 9px;
  width: 0%;
  left: 50%;
}

.menu-open .menu-icon span:nth-child(2) {
  transform: rotate(45deg);
}

.menu-open .menu-icon span:nth-child(3) {
  transform: rotate(-45deg);
}

.menu-open .menu-icon span:nth-child(4) {
  top: 9px;
  width: 0%;
  left: 50%;
}

/* Fix z-index and overlay issues */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9990;
  display: none;
}

.menu-open .menu-overlay {
  display: block;
}

body.menu-open {
  overflow: hidden; /* Prevent scrolling when menu is open */
  height: 100vh;
  touch-action: none;
  overscroll-behavior: contain;
}

/* Desktop nav dropdown (Products) */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  /* Centered mega menu anchored to header container width */
  position: absolute;
  top: calc(100% + 20px);
  left: 50%;
  transform: translate(-50%, -6px);

  width: min(1400px, calc(100vw - 40px));
  padding: 28px 26px;

  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(29, 18, 5, 0.10);
  border-radius: 30px 50px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 28px;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
  z-index: 10000;
}

/* Real separator element between the two dropdown cards */
.nav-dropdown-separator {
  height: 100%;
  width: 2px;
  border: none;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(29, 18, 5, 0.28) 0 5px,   /* dash length */
    transparent 10px 20px          /* gap length */
  );
}

/* Remove pseudo divider now that we use a real element */
.nav-dropdown-menu::after {
  content: none;
}

.nav-dropdown-item {
  /* Card-like product tile */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;

  width: 100%;
  padding: 95px 70px;
  min-height: 400px;

  background: var(--pale-yellow);
  border-radius: 0 50px 0 50px;
  text-decoration: none;
  color: var(--text-dark);

  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.nav-dropdown-item:hover,
.nav-dropdown-item:focus-visible {
  background: var(--pale-yellow);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.10);
  outline: none;
}

.nav-dropdown-title {
  font-family: "Montserrat", sans-serif;
  font-size: 36px;
  line-height: 1.15;
  font-weight: 700;
}

.nav-dropdown-desc {
  margin: 0;
  font-size: 16px;
  line-height: 1.75;
  font-weight: 400;
  color: rgba(29, 18, 5, 0.85);
  max-width: 62ch;
}

.nav-dropdown-desc strong {
  font-weight: 700;
}

.nav-dropdown-cta {
  /* make the link look/behave like the other primary buttons */
  width: fit-content;
  max-width: 100%;
  align-self: flex-start;


  /* match primary button sizing */
  height: 48px;
  padding: 12px 24px;
  border-radius: 4px;

  background-color: var(--primary-color);
  color: var(--text-dark);
}

/* Open on hover, keyboard focus, or JS click toggle */
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-70%, 0);
}

/* Desktop only: hide the dropdown UI on mobile, keep the link working */
@media (max-width: 768px) {
  .nav-dropdown-menu {
    display: none;
  }
}

/* Slightly smaller mega menu on small laptops */
@media (max-width: 1024px) {
  .nav-dropdown-item {
    padding: 34px 34px;
    min-height: 280px;
  }

  .nav-dropdown-title {
    font-size: 30px;
  }
}

/* ----------------------------
   Responsive (mobile)
   Consolidated rules
   ---------------------------- */
@media (max-width: 768px) {
  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: block;
  }

  .top-bar {
    display: none;
  }

  body::before {
    height: 80vh; /* Smaller height to keep aspect ratio */
    background-position: center 25%; /* Adjust vertical position */
    opacity: 0.8; /* Slightly reduce opacity for better text readability */
    background-image: url("images/hero-background-mobile.png");
  }

  /* Adjust hero section spacing to move content up */
  .hero {
    padding: 40px 0 20px;
    min-height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .features {
    margin-top: -20px;
  }

  .features h2 {
    margin-top: 16px; /* smaller, but still spaced out on mobile */
  }

  .features-intro {
    max-width: 80%; /* avoid an overly narrow paragraph on mobile */
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    transition: right 0.3s ease;
    z-index: 999;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    padding: 100px 20px 20px;
  }

  .menu-open .main-nav {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 20px;
  }

  .main-nav .nav-item {
    font-size: 20px;
    padding: 10px 0;
  }

  /* Responsive layout adjustments */
  .hero h1 {
    font-size: 42px;
    margin-bottom: 30px;
  }

  .hero .btn {
    text-align: center;
    font-size: 14px;
  }

  /* Features section mobile styles */
  .features .container {
    height: auto;
  }

  .features .feature-image-container {
    display: none;
  }

  .features-content {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  /* Tabs row (scrollable left-to-right) */
  .features-list {
    order: 1;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    height: auto;
    width: 100%;

    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;

    padding: 8px 4px 14px;

    /* Firefox scrollbar */
    scrollbar-width: thin;
    scrollbar-color: #6b6b6b #d9d9d9; /* thumb / track */
  }

  /* WebKit scrollbar (iOS/Chrome/Safari) */
  .features-list::-webkit-scrollbar {
    height: 8px;
  }

  .features-list::-webkit-scrollbar-track {
    background: #d9d9d9; /* light gray track */
    border-radius: 999px;
  }

  .features-list::-webkit-scrollbar-thumb {
    background: #6b6b6b; /* dark gray handle */
    border-radius: 999px;
  }

  .features-list::-webkit-scrollbar-thumb:hover {
    background: #555555;
  }

  .feature-item {
    flex: 0 0 auto;
    height: auto;
    min-height: 0;
    padding: 0;

    scroll-snap-align: start;
  }

  .feature-icon-wrapper {
    display: none !important;
  }

  .feature-item.active .feature-icon-wrapper {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 40px;
    flex: 0 0 28px;
  }

  .feature-item.active .feature-leaf-icon {
    width: 28px;
    height: 40px;
    display: block;
  }

  .features-list {
    gap: 14px;
    padding: 8px 12px 14px;
  }

  .feature-item {
    flex: 0 0 auto;
    min-width: 44vw; /* ~2 items visible in the viewport */
    max-width: 60vw;
    padding: 10px 12px;
    border-radius: 12px;
  }

  .feature-item-text h3 {
    white-space: normal;
  }

  .features-display {
    height: auto;
    min-height: 0;
  }

  .feature-content {
    width: 100%;
    margin: 0;
  }

  .feature-card {
    width: 100%;
    margin: 0;
    padding: 24px 18px 92px; /* reserve space for arrow row */
    border-radius: 18px;

    position: relative;
    overflow: hidden;

    /* ensure any absolutely-positioned children align with card */
    box-sizing: border-box;
  }

  .feature-nav-container {
    position: absolute;
    right: 14px;
    bottom: 14px;

    display: inline-flex;
    gap: 12px;
    padding: 8px;

    border-radius: 14px;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(29, 18, 5, 0.10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    z-index: 2;
  }

  .feature-nav {
    width: 52px;
    height: 44px;
    border-radius: 12px;
  }

  .feature-item-text h3 {
    font-size: 18px;
    line-height: 1.15;
    white-space: nowrap;
  }

  /* Use the existing dashed separator as a vertical divider between tabs */
  .features-list .feature-separator {
    width: 1px;
    height: 40px;
    flex: 0 0 1px;
    align-self: center;
    background-image: repeating-linear-gradient(
      0deg,
      rgba(29, 18, 5, 1) 0 3px,
      transparent 3px 6px
    );
  }

  /* Cards area */
  .features-display {
    order: 2;
    height: auto;
    min-height: 420px;
  }

  .feature-content {
    position: relative;
    left: auto;
    bottom: auto;
    width: 100%;
    max-width: none;
    margin-top: 0;

    /* only show active (JS controlled) */
    display: none;
    animation: none;
  }

  .feature-content.active {
    display: block;
  }

  .feature-card {
    padding: 28px 22px 92px; /* extra bottom room for arrows */
    border-radius: 14px;
  }

  /* Nav arrows pinned to bottom-right of the card */
  .feature-nav-container {
    right: 18px;
    bottom: 18px;
    gap: 14px;
  }

  .feature-nav {
    width: 72px;
    height: 56px;
    border-radius: 10px;
  }

  .features-list {
    height: auto;
  }

  .features-display {
    height: 400px;
  }

  .feature-image-container {
    position: relative;
    right: 0;
    width: 100%;
    height: 400px;
  }

  .feature-item {
    height: auto;
    min-height: 100px;
  }

  .feature-nav-container {
    right: 20px;
  }

  .feature-content {
    width: 95%;
    max-width: none;
  }

  .feature-card {
    padding: 30px 20px;
  }

  .feature-card p {
    font-size: 15px;
  }

  .feature-nav-container {
    bottom: 20px;
    right: 20px;
  }

  .feature-nav {
    width: 45px;
    height: 45px;
  }

  .product-section {
    flex-direction: column;
  }

  .product-info {
    padding-right: 0px;
  }

  .products {
    padding: 30px 0;
  }

  #uportal {
    flex-direction: column;
    gap: 0px;
    margin-bottom: 0px;
    position: relative;
  }

  .uportal-image-container {
    min-height: 400px;
    margin-top: 40px; /* more breathing room above the photo on mobile */
    transform: none; /* cancel desktop lift */
  }

  .uportal-bg {
    display: none;
  }

  .want-to-know {
    width: 100%;
    text-align: center;
  }

  #upay {
    padding-left: 0;
  }

  .about {
    padding: 0;
  }

  .about-content {
    flex-direction: column;
  }

  .about-img {
    display: block;
    padding-left: 0;
    width: 100%;
    max-width: 520px;
    margin: 24px auto 0;
  }

  .about-img > .about-image {
    width: 100%;
    height: auto;
    display: block;
  }

  .about-leaf--bottom-left {
    left: -24px;
    bottom: 12px;
  }

  .about-leaf--top-right {
    right: -36px;
    top: 12px;
  }

  .about-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .about-cta a {
    width: 100%;
    text-align: center;
  }

  .about-cta p {
    width: 100%;
    text-align: center;
  }

  .footer .container {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .contact-info {
    flex-direction: column;
    gap: 10px;
  }

  /* Section titles: 40px / 48px */
  .features h2,
  .products h2,
  .about-text h2 {
    font-size: 40px;
    line-height: 48px;
  }

  .products h2 {
    margin-bottom: 80px;
  }

  /* Product titles (UPortal/UPay) */
  #uportal .product-title,
  #upay .product-title {
    font-size: 35px;
    line-height: 35px;
  }

  /* Intro/sub-text: 18px / 25px */
  .features-intro,
  .product-intro,
  .product-info,
  .about-body p {
    font-size: 18px;
    line-height: 25px;
  }

  #uportal .product-info,
  #upay .product-info {
    font-size: 12px;
    line-height: 18px;
  }

  #uportal .uportal-image-container {
    transform: none; /* cancel desktop lift */
    min-height: 0;  /* allow container to size to image */
  }

  #uportal .uportal-image-container img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
  }

  /* Mobile: smaller product title leaf bullets (UPortal & UPay) */
  #uportal .product-title-bullet,
  #upay .product-title-bullet {
    width: 28px;
    height: 40px;
    flex: 0 0 28px;
    padding-top: 0;
  }

  #uportal .product-title-leaf,
  #upay .product-title-leaf {
    width: 28px;
    height: 40px;
    display: block;
  }

  /* Mobile-only Features card (new) */
  .features-mobile {
    display: block;
    width: 100%;
    order: 2;
    margin-top: 14px;
  }

  /* Hide the current (desktop) card + arrows on mobile */
  .features-display,
  .feature-nav-container {
    display: none !important;
  }

  .features-mobile-card {
    width: 100%;
    max-width: 560px; /* a bit wider than before to fit content/buttons */
    margin: 0;

    background: var(--white);
    border-radius: 40px 0px 10px 0px; /* top-left & bottom-right: 40px */
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.10);

    padding: 44px; /* requested */
    text-align: left; /* left-align content */
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    min-height: 200px; /* keep card height stable across languages */
  }

  .feature-mobile-content {
    display: none;
    text-align: left;
    opacity: 1; /* don't fade the whole block */
  }

  .feature-mobile-content.active {
    display: block;
    opacity: 1;
    animation: none;
  }

  .features-mobile-card h3 {
    margin: 0 0 12px;
    font-family: "Montserrat", sans-serif;
    font-size: 16px; /* bold text size requested */
    line-height: 1.25;
    font-weight: 700;
    color: var(--text-dark);
  }

  .features-mobile-card p {
    margin: 0 0 18px;
    font-size: 11px; /* regular text size requested */
    line-height: 1.5;
    font-weight: 400;
    color: rgba(29, 18, 5, 0.85);
  }

  /* CTA inside mobile card */
  .features-mobile-card .feature-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 14px;
    border-radius: 8px;
    background: var(--primary-color);
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
    max-width: 100%;
    white-space: nowrap;
  }

  /* Buttons anchored to the new card */
  .features-mobile-nav {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 36px;
    display: inline-flex;
    gap: 12px;
    border-radius: 14px;

    z-index: 2;
  }

  .feature-nav.feature-nav--mobile {
    width: 63px;
    height: 36px;
    border-radius: 10px 0 10px 0;
  }

  /* Keep the existing arrow styling */
  .feature-nav.feature-nav--mobile .feature-nav-icon {
    width: 32px;
    height: 16px;
  }
}

/* Ensure new mobile card is hidden on desktop */
@media (min-width: 769px) {
  .features-mobile {
    display: none;
  }
}

/* Tablet-ish tweak for UPortal text column */
@media (max-width: 1100px) {
  #uportal .uportal-left {
    flex-basis: 350px;
    max-width: 600px;
    padding-right: 50px;
  }
}

/* Updated product section layout: UPortal (two-column) */
#uportal .uportal-left {
  display: flex;
  gap: 24px;
}

#uportal .uportal-image-container {
  /* Maintain aspect ratio for UPortal image */
  flex: 1 1 auto;
  /* Lift the image a bit higher */
  transform: translateY(-60px);
}

/* Title stays a normal flex row: [leaf] + [text] */
#uportal .product-title {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.product-text {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Base CTA button used in Products (UPortal/UPay) */
.want-to-know {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-dark);
  background-color: var(--primary-color);
  margin-top: 16px;
  font-size: 16px;
}

/* UPortal product section background (desktop only) */
@media (min-width: 769px) {
  #uportal::before {
    content: none;
  }
}

/* Partners section */
.partners {
  padding: 60px 0 80px; /* keep the same top/bottom rhythm as Features */
  position: relative;
  z-index: 2;
}

/* Mobile-only Partners background (behind everything, edge-to-edge) */
@media (max-width: 768px) {
  .partners {
    position: relative;
    isolation: isolate; /* ensures ::before stays behind section content */
  }

  .partners::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 100vw;
    height: 100%;
    transform: translateX(-50%);

    background-image: url("images/partners-mobile-background.svg");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;

    z-index: -1;
    pointer-events: none;
  }

  .partners::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -40px;
    width: 100vw;
    height: 100%;
    transform: translateX(-50%);

    background-image: url("images/partners-bottom-mobile-background.svg");
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;

    z-index: -2;
    pointer-events: none;
  }
}

/* Desktop-only Partners background (behind everything, edge-to-edge) */
@media (min-width: 769px) {
  .partners {
    position: relative;
    isolation: isolate; /* ensures ::before stays behind section content */
  }

  .partners::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 100vw;
    height: 100%;
    transform: translateX(-50%);

    background-image: url("images/partners-desktop-background.svg");
    background-repeat: no-repeat;
    background-position: center top;
    background-size: cover;

    z-index: -1;
    pointer-events: none;
  }
}

.partners .container {
  height: 800px; /* match “raw dimensions” of Features */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.partners-content {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 80px;
}

/* Left side: cards */
.partners-cards {
  flex: 1 1 0;
  min-height: 520px;
}

/* New: fixed 2x2 grid that defines the available quadrants */
.partners-cards-grid {
  width: 100%;
  height: 100%;
  min-height: inherit;

  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 24px;

  position: relative;
}

/* Each cell is a bounding box for its card */
.partners-card-cell {
  position: relative;
  overflow: visible; /* allow soft shadow to render fully */
}

.partner-card {
  position: absolute;
  width: 85%;
  max-width: 360px;
  height: 90%;

  background: var(--white);
  border: 1px solid rgba(29, 18, 5, 0.12);
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.10);
  overflow: hidden;
  display: flex;
  flex-direction: column;

  /* hover lift */
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  will-change: transform;
}

.partner-card:hover,
.partner-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14);
}

.partner-card-logo img {
  max-width: 100%;
  height: auto;
  display: block;

  /* grayscale by default */
  filter: grayscale(100%);
  transition: filter 0.22s ease;
}

.partner-card:hover .partner-card-logo img,
.partner-card:focus-within .partner-card-logo img {
  filter: grayscale(0%);
}

.partner-card-logo {
  height: 50%;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  padding: 20px 24px;
  border-bottom: 1px solid rgba(29, 18, 5, 0.10);
}

.partner-card-logo img {
  max-width: 100%;
  height: auto;
  display: block;
}

.partner-card-body {
  height: 50%;
  min-height: 0;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.partner-card-body h3 {
  font-size: 16px;
  line-height: 1.2;
}

.partner-card-body p {
  font-size: 10px;
  line-height: 1.45;
}

/* Absolute positions INSIDE EACH CELL (per request) */
.partner-card--tl {
  top: 0;
  left: 0;
}

/* card in the top-right quadrant aligned bottom-left of its cell */
.partner-card--tr {
  bottom: 0;
  left: 0;
}

/* card in the bottom-left quadrant aligned top-right of its cell */
.partner-card--bl {
  top: 0;
  right: 0;
}

.partner-card--br {
  bottom: 0;
  right: 0;
}

/* Right side: text */
.partners-text {
  flex: 0 1 550px;
  max-width: 550px;
  margin-left: auto;
  text-align: left; /* right column, but left-aligned text */
}

.partners-text h2 {
  font-family: "Montserrat", sans-serif;
  font-size: 60px;
  line-height: 1.05;
  font-weight: 700;
  margin-bottom: 28px;
  position: relative;
  display: block;
}

/* No yellow underline for this title only */
.partners-text h2::after {
  content: none;
}

.partners-text p {
  font-size: 18px;
  font-weight: 400;
  margin: 0 0 36px;
  max-width: 640px;
}

@media (max-width: 1024px) {
  /* Let Partners size to its content on mobile/tablet (prevents overlap with Products) */
  .partners {
    padding-bottom: 60px;
  }

  .partners .container {
    height: auto;
    justify-content: flex-start;
  }

  .partners-cards {
    margin-top: 18px;
    min-height: 520px;
  }

  /* Ensure the cards stack participates in normal flow */
  .partners-cards-grid {
    padding-bottom: 6px;
    min-height: 520px;
  }

  /* Make the mobile cards a bit more square-ish (closer to desktop feel) */
  .partner-card {
    border-radius: 18px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.10);
    min-height: 237px;
    height: 237px;
  }

  .partners .container {
    height: auto;
  }

  .partners-content {
    flex-direction: column;
    align-items: stretch;
    gap: 28px;
  }

  /* On mobile/tablet: show cards AFTER text, in a centered single row (3 cards only) */
  .partners-cards {
    display: block; /* override previous display:none */
    order: 2;
    min-height: 700px;
    width: 100%;
    margin-top: 16px;
  }

  .partners-text {
    order: 1;
    margin-left: 0;
    max-width: 600px;
    font-size: 18px;
    line-height: 25px;
    flex: none;
  }

  /* Replace 2x2 grid with a vertical stack (centered) */
  .partners-cards-grid {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 24px;

    height: auto;
    min-height: 520px;
  }

  /* Each cell becomes a normal flow item */
  .partners-card-cell {
    position: static;
    flex: 0 0 auto;
    width: min(520px, 100%);
  }

  .partner-card {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: none;
    height: 237px;
    min-height: 237px;
  }

  /* Hide the 4th card on mobile/tablet */
  .partners-card-cell--br {
    display: none;
  }
}

@media (max-width: 768px) {
  /* Keep comfortable bottom spacing so the next section never visually collides */
  .partners {
    padding-bottom: 70px;
  }

  .partners-text h2 {
    font-size: 40px;
    line-height: 48px;
    margin-bottom: 20px;
  }

  .partner-card {
    border-radius: 16px;
    min-height: 237px;
    height: 237px;
  }

  .partners-cards-grid {
    gap: 24px;
  }

  .partners-card-cell {
    width: min(336px, 100%);
  }

  .partner-card {
    min-height: 237px;
    height: 237px;
  }

  /* Slightly smaller text so cards are readable at tighter widths */
  .partner-card-body {
    padding: 12px 24px 24px;
    gap: 8px;
  }

  .partner-card-body h3 {
    font-size: 16px;
  }

  .partner-card-body p {
    font-size: 10px;
  }
}
/* Meeting modal */
.meeting-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.meeting-modal.is-open {
  display: flex;
}

.meeting-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.meeting-modal-content {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow: auto;
  padding: 40px 16px 16px;
  z-index: 1;
}

.meeting-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #333;
}

.meeting-modal-close:hover {
  color: #000;
}
