/* Inner pages + Ultra mega menu (ported to header) */

.ex-page-hero {
  padding: 8.5rem 0 4rem;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 165, 0, 0.14), transparent 34%),
    radial-gradient(circle at 88% 20%, rgba(43, 24, 222, 0.1), transparent 28%),
    linear-gradient(180deg, #101010 0%, #0b0b0b 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ex-page-hero__inner {
  max-width: 720px;
}

.ex-page-hero h1 {
  font-family: var(--ex-font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  margin: 0.6rem 0 1rem;
  letter-spacing: -0.03em;
}

.ex-page-hero p:last-child {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.08rem;
  max-width: 54ch;
}

/* Mega: lives as direct child of .ex-site-header after JS portal */
.ex-site-header > .ex-mega,
.ex-has-mega > .ex-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  width: 100%;
  margin: 0;
  padding: 0.9rem clamp(1rem, 3vw, 2.5rem) 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 1001;
}

.ex-site-header > .ex-mega.is-open,
.ex-has-mega:hover > .ex-mega,
.ex-has-mega:focus-within > .ex-mega,
.ex-has-mega.is-open > .ex-mega,
.ex-site-header.mega-open > .ex-mega.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.ex-mega__shell {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 1.35rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at 10% 0%, rgba(255, 165, 0, 0.14), transparent 36%),
    linear-gradient(180deg, rgba(18, 18, 20, 0.98), rgba(10, 10, 12, 0.98));
  border: 1px solid rgba(255, 165, 0, 0.3);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(18px);
}

.ex-mega__layout {
  display: grid;
  gap: 1.1rem;
  align-items: stretch;
  min-width: 0;
}

.ex-mega__layout--demos {
  grid-template-columns: 260px minmax(0, 1fr) 220px;
}

.ex-mega__layout--features {
  grid-template-columns: minmax(0, 1fr) 280px;
}

.ex-mega__layout--commerce,
.ex-mega__layout--resources {
  grid-template-columns: 280px minmax(0, 1fr) 220px;
}

.ex-mega__features-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  min-width: 0;
}

.ex-mega__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.ex-mega__head strong {
  display: block;
  color: #fff;
  font-family: var(--ex-font-display);
  font-size: 1.2rem;
  margin-top: 0.2rem;
  line-height: 1.2;
}

.ex-mega__main {
  min-width: 0;
}

.ex-mega__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  min-width: 0;
}

.ex-mega__grid--list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ex-mega__card,
.ex-mega__feature,
.ex-mega-widget a {
  text-decoration: none;
  color: #fff;
}

.ex-mega__card {
  display: grid;
  gap: 0.35rem;
  padding: 0.5rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.ex-mega__card:hover {
  border-color: rgba(255, 165, 0, 0.45);
  background: rgba(255, 165, 0, 0.08);
  transform: translateY(-2px);
}

.ex-mega__card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.ex-mega__card span,
.ex-mega-widget > span,
.ex-mega-widget--featured span,
.ex-mega-widget--promo span,
.ex-mega-widget--cta span,
.ex-mega-widget--group > span,
.ex-mega-widget--list > span {
  color: var(--ex-gold, #ffa500);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

.ex-mega__card strong {
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ex-mega__feature {
  display: grid;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  min-width: 0;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.ex-mega__feature:hover {
  border-color: rgba(255, 165, 0, 0.4);
  background: rgba(255, 165, 0, 0.08);
}

.ex-mega__feature span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.88rem;
  line-height: 1.4;
}

.ex-mega-widget {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
  color: #fff;
  min-width: 0;
}

.ex-mega-widget--featured {
  display: grid;
  gap: 0.85rem;
  align-content: start;
  overflow: hidden;
  padding: 0.7rem;
  background:
    linear-gradient(180deg, rgba(255, 165, 0, 0.1), transparent 42%),
    rgba(255, 255, 255, 0.03);
}

.ex-mega-widget--featured img,
.ex-mega-widget--promo img {
  width: 100%;
  border-radius: 12px;
  display: block;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.ex-mega-widget--featured strong,
.ex-mega-widget--promo strong,
.ex-mega-widget--cta strong {
  display: block;
  font-family: var(--ex-font-display);
  font-size: 1.15rem;
  margin: 0.35rem 0;
  line-height: 1.2;
}

.ex-mega-widget--featured p,
.ex-mega-widget--cta p,
.ex-mega-widget--promo p {
  color: rgba(255, 255, 255, 0.68);
  margin: 0 0 0.85rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.ex-mega-widget--featured em {
  color: var(--ex-gold, #ffa500);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ex-mega-rail {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.ex-mega-widget--list {
  display: grid;
  gap: 0.2rem;
}

.ex-mega-widget--list a {
  color: rgba(255, 255, 255, 0.82);
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.92rem;
}

.ex-mega-widget--list a:hover {
  color: #fff;
}

.ex-mega-widget--group {
  display: grid;
  gap: 0.15rem;
  align-content: start;
}

.ex-mega-widget--group a {
  display: grid;
  gap: 0.2rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ex-mega-widget--group a:last-child {
  border-bottom: 0;
}

.ex-mega-widget--group a:hover strong {
  color: var(--ex-gold, #ffa500);
}

.ex-mega-widget--group em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.84rem;
  line-height: 1.4;
}

.ex-mega-widget--promo,
.ex-mega-widget--cta {
  display: grid;
  align-content: start;
  gap: 0.35rem;
}

.ex-mega-widget--cta strong {
  font-size: 2rem;
  color: var(--ex-gold, #ffa500);
}

.ex-mega-widget--promo .ex-button,
.ex-mega-widget--cta .ex-button {
  margin-top: 0.35rem;
}

/* Inner pages */
.ex-demo-card__blurb {
  margin: 0.75rem 1.1rem 1.2rem;
  color: rgba(20, 20, 20, 0.66);
  font-size: 0.95rem;
}

.ex-feature-groups {
  display: grid;
  gap: 2rem;
}

.ex-feature-group h2 {
  font-family: var(--ex-font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 1rem;
}

.ex-feature-group__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.ex-feature-group__grid > div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  padding: 1.1rem;
  border: 1px solid rgba(11, 11, 11, 0.08);
  border-radius: 16px;
  background: #fff;
}

.ex-feature-group__grid svg {
  width: 18px;
  height: 18px;
  stroke: var(--ex-gold);
  fill: none;
  stroke-width: 1.8;
  margin-top: 0.2rem;
}

.ex-feature-group__grid strong {
  display: block;
  margin-bottom: 0.25rem;
}

.ex-feature-group__grid p {
  margin: 0;
  color: rgba(20, 20, 20, 0.66);
}

.ex-contact-grid,
.ex-docs-grid {
  display: grid;
  gap: 1.5rem;
}

.ex-contact-grid {
  grid-template-columns: 1.1fr 0.9fr;
  align-items: start;
}

.ex-contact-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.ex-contact-list li {
  display: grid;
  gap: 0.2rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(11, 11, 11, 0.08);
}

.ex-contact-form {
  display: grid;
  gap: 0.9rem;
  padding: 1.35rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(11, 11, 11, 0.08);
}

.ex-contact-form label {
  display: grid;
  gap: 0.35rem;
}

.ex-contact-form span {
  font-size: 0.85rem;
  font-weight: 600;
}

.ex-contact-form input,
.ex-contact-form textarea {
  width: 100%;
  border: 1px solid rgba(11, 11, 11, 0.14);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  font: inherit;
  background: #fafafa;
}

.ex-docs-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ex-docs-card {
  padding: 1.4rem;
  border-radius: 18px;
  background: #fff;
  border: 1px solid rgba(11, 11, 11, 0.08);
}

.ex-docs-card > span {
  color: var(--ex-gold);
  font-family: var(--ex-font-display);
  font-size: 1.4rem;
}

.ex-docs-card h2 {
  margin: 0.5rem 0;
  font-size: 1.35rem;
}

.ex-project-layout {
  display: grid;
  gap: 1.5rem;
}

.ex-project-media img {
  width: 100%;
  border-radius: 18px;
  display: block;
}

.ex-project-content {
  max-width: 72ch;
}

.ex-woo .woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ex-woo .woocommerce ul.products::before,
.ex-woo .woocommerce ul.products::after {
  display: none;
}

.ex-woo .woocommerce ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  padding: 1rem;
  border: 1px solid rgba(11, 11, 11, 0.08);
  border-radius: 16px;
  background: #fff;
}

@media (max-width: 1100px) {
  .ex-mega__layout--demos,
  .ex-mega__layout--commerce,
  .ex-mega__layout--resources {
    grid-template-columns: 1fr 1fr;
  }

  .ex-mega__layout--demos .ex-mega-rail,
  .ex-mega__layout--commerce .ex-mega-widget--cta,
  .ex-mega__layout--resources .ex-mega-widget--promo {
    grid-column: 1 / -1;
  }

  .ex-mega__features-groups {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1100px) {
  .ex-site-header > .ex-mega {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    padding: 0.5rem 0 0;
    display: none;
  }

  .ex-has-mega.is-open > .ex-mega,
  .ex-primary-nav .ex-has-mega.is-open > .ex-mega {
    display: block;
  }

  .ex-mega__shell {
    border-radius: 14px;
    box-shadow: none;
    padding: 0.85rem;
  }

  .ex-mega__layout--demos,
  .ex-mega__layout--features,
  .ex-mega__layout--commerce,
  .ex-mega__layout--resources,
  .ex-mega__features-groups,
  .ex-mega__grid,
  .ex-mega__grid--list,
  .ex-feature-group__grid,
  .ex-contact-grid,
  .ex-docs-grid,
  .ex-woo .woocommerce ul.products {
    grid-template-columns: 1fr;
  }
}
