/* BUTTON */
.cssbuttons-io-button {
  font-family: "DM Mono", monospace;
  font-weight: 600;
  background: transparent; /* now transparent background */
  font-style: italic;
  font-size: 16px;
  color: #5f5c60;
  padding: 0.35em 3.3em 0.35em 1.2em;
  font-weight: 500;
  border: #5f5c60 solid 3px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  height: 2.8em;
  cursor: pointer;
  transition: color 0.3s ease; /* smooth color fade */
}

.cssbuttons-io-button:hover {
  color: transparent; /* text disappears on hover */
}

.cssbuttons-io-button .icon {
  background: transparent;
  margin-left: 1em;
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 2.2em;
  width: 2.2em;
  right: 0.3em;
  transition: all 0.3s;
}

.cssbuttons-io-button:hover .icon {
  width: calc(100% - 0.6em);
}

.cssbuttons-io-button .icon svg {
  width: 1.1em;
  transition: transform 0.3s;
  color: #5f5c60;
}

.cssbuttons-io-button:hover .icon svg {
  transform: translateX(0.1em);
}

.cssbuttons-io-button:active .icon {
  transform: scale(0.95);
}

.cssbuttons-io-button-white {
  color: white;
  border: white solid 3px !important;
  transition: color 0.3s ease;
}

.cssbuttons-io-button-white .icon svg {
  color: white;
}

.cssbuttons-io-button.reverse {
  flex-direction: row-reverse; /* text right, icon left */
  padding: 0.35em 1.2em 0.35em 3.3em; /* mirror padding */
}

.cssbuttons-io-button.reverse .icon {
  left: -0.4em; /* stick to left instead of right */
  right: auto;
}

.cssbuttons-io-button.reverse:hover .icon svg {
  transform: translateX(-0.1em); /* move arrow rightwards on hover */
}

/* DROPDOWN MENU */
/* basic layout */
.nav {
  display: flex;
  gap: 48px;
  align-items: center;
}

.has-dropdown {
  position: relative;
}

/* --- hover bridge to prevent flicker --- */
.has-dropdown {
  --gap: 16px;
} /* visual space between link and panel */
.has-dropdown::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: var(--gap); /* invisible strip bridging the gap */
}

/* arrow rotation */
.dropdown-arrow svg {
  transition: transform 200ms ease;
}

/* dropdown panel */
.dropdown {
  position: absolute;
  top: calc(100% + var(--gap)); /* sits below the link with a gap */
  left: -10px;
  width: 350px;
  padding: 0;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  list-style: none;
  margin: 0;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none; /* avoid accidental hovers when hidden */
  transition: opacity 150ms ease, transform 150ms ease;
  z-index: 10;
}

/* show dropdown + rotate arrow (hover or keyboard focus) */
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.has-dropdown:hover .dropdown-arrow svg,
.has-dropdown:focus-within .dropdown-arrow svg {
  transform: rotate(180deg);
}

/* dropdown items */
.dropdown li a {
  display: flex;
  padding: 1rem 0.875rem;
  color: #333;
  text-decoration: none;
  gap: 16px;
  align-items: center;
}

.dropdown li:not(:last-child) {
  border-bottom: 1px solid #ddd;
}

/* CAROUSEL */
:root {
  --items-per-page: 8;
}

.carousel {
  width: 100%;
  overflow: hidden;
  position: relative;
}

.carousel-container {
  /* Prevent logos from wrapping to the next line */
  white-space: nowrap;
}

.carousel-item {
  display: inline-block;
  width: calc(100% / var(--items-per-page));
  box-sizing: border-box;
  padding: 28px;
}

.carousel-item img {
  max-width: 100%;
  opacity: 0.6;
}

@media (max-width: 768px) {
  :root {
    --items-per-page: 3.5;
  }

  .carousel-item {
    padding: 8px 16px;
  }
}

/* MOBILE MENU OVERLAY */
.mobile-menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  overflow-y: auto;
  background: rgba(255, 255, 255);
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.mobile-menu-overlay.open {
  display: block;
  opacity: 1;
}
.mobile-menu-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  justify-content: flex-start;
  align-items: flex-start;
  padding: 20px;
  box-sizing: border-box;
  transform: translateX(-100%);
  transition: transform 0.35s ease;
}
.mobile-menu-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
}

.mobile-menu-header img {
  height: 30px;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}
.mobile-nav-links a {
  font-size: 28px;
  text-decoration: none;
  padding: 8px 0;
  transition: color 0.2s;
}
.mobile-nav-links a:hover {
  color: #e24bf9;
}
.mobile-dropdown {
  width: 100%;
}
.mobile-dropdown-toggle {
  font-size: 28px;
  font-family: "DM Mono", monospace;
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding: 8px 0;
}
.mobile-dropdown-menu {
  display: none;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
  margin-bottom: 12px;
  font-size: 16px !important;
}

.mobile-dropdown-menu a {
  font-size: 20px !important;
  color: #636363;
  display: flex;
  align-items: center;
  gap: 12px;
}

.mobile-dropdown-menu a img {
  height: 30px;
}

.mobile-dropdown svg {
  margin-left: 16px !important;
}

.mobile-dropdown.open .mobile-dropdown-menu {
  display: flex;
  animation: fadeInDropdown 0.3s;
}
@keyframes fadeInDropdown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media screen and (min-width: 1200px) {
  .mobile-menu-overlay {
    display: none !important;
  }
}

/* rotate the chevron smoothly */
.mobile-dropdown-toggle svg {
  transition: transform 0.25s ease;
  transform-origin: 50% 50%;
  display: inline-block; /* ensures smooth transform in all browsers */
}

.mobile-dropdown.open .mobile-dropdown-toggle svg {
  transform: rotate(180deg);
}

.mobile-menu-overlay.open {
  display: block;
  opacity: 1;
}
.mobile-menu-overlay.open .mobile-menu-content {
  transform: translateX(0);
}

/* Optional: smoother closing animation (wait for transition before hiding) */
.mobile-menu-overlay.closing .mobile-menu-content {
  transform: translateX(-100%);
}

.faq {
  max-width: 900px;
  margin: 0 auto;
  margin-bottom: 128px;
  color: #565656;
}

.faq__title {
  margin-bottom: 32px;
}

.faq__accordion {
  display: grid;
  gap: 0.5rem;
}

.faq__item {
  overflow: hidden;
  padding: 16px;
}

.faq__item:not(:last-child) {
  border-bottom: 1px solid #ddd;
}

.faq__header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1rem;
  border: none;
  cursor: pointer;
  background: white;
  font-family: "Lexend Deca", monospace;
  font-size: 18px;
}

.faq__chevron {
  transition: transform 0.25s ease;
  display: inline-block;
  margin-left: 4px;
}

.faq__item[aria-expanded="true"] .faq__chevron {
  transform: rotate(180deg);
}

.faq__content-wrapper {
  height: 0;
  overflow: hidden;
  transition: height 0.28s ease;
}

.faq__content {
  padding: 0.8rem 1rem 1rem;
  font-size: 0.95rem;
  color: #808080;
}

.fade-in-up {
  opacity: 0;
  transform: translateY(-12px);
  animation: fadeInUp 0.6s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#rotating-text {
  display: inline-block;
}
