/*
 * Parent-theme integration layer.
 * Keeps WordPress-generated menus, classic templates, and editor output aligned
 * with the AIDigitalEx design system.
 */

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.screen-reader-text:focus {
  z-index: 100000;
  display: block;
  width: auto;
  height: auto;
  clip: auto;
  top: 8px;
  left: 8px;
  padding: 12px 16px;
  color: #070b1a;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(7, 11, 26, .18);
}

:root {
  --adx-heading-font: "Playfair Display", Georgia, "Times New Roman", serif;
  --adx-body-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body,
.adx-site,
.adx-site-header,
.adx-site-footer,
.adx-home,
.adx-main {
  font-family: var(--adx-body-font);
}

.adx-home h1,
.adx-home h2,
.adx-page-copy h1,
.adx-page-copy h2,
.adx-article-hero h1,
.adx-sd-hero-copy h1,
.adx-final-cta h2 {
  font-family: var(--adx-heading-font);
  letter-spacing: 0;
}

.adx-hero,
.adx-page-hero,
.adx-sd-hero {
  padding-top: clamp(28px, 5vw, 54px);
  padding-bottom: clamp(38px, 6vw, 72px);
}

.adx-hero-grid,
.adx-page-hero-grid,
.adx-sd-hero-grid {
  min-height: auto;
  align-items: center;
}

.adx-home h1,
.adx-hero-copy h1,
.adx-page-copy h1,
.adx-article-hero h1,
.adx-sd-hero-copy h1 {
  max-width: 900px;
  font-size: clamp(2.55rem, 4.8vw, 4.9rem);
  line-height: 1.02;
}

.adx-hero-copy .adx-lede,
.adx-page-copy .adx-lede,
.adx-article-hero .adx-lede,
.adx-sd-hero-copy .adx-lede {
  max-width: 720px;
  font-size: clamp(1rem, 1.15vw, 1.17rem);
  line-height: 1.62;
}

.adx-page-hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
}

.adx-sd-hero-grid {
  grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr);
}

.adx-desktop-nav .adx-menu,
.adx-mobile-menu-list {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.adx-desktop-nav {
  align-items: center;
}

.adx-desktop-nav > a,
.adx-desktop-nav .adx-menu-link,
.adx-desktop-nav .menu > .menu-item > a,
.adx-desktop-nav .adx-menu > .menu-item > a {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
}

.adx-desktop-nav .adx-menu-caret {
  width: 16px;
  height: 16px;
  margin-left: 6px;
}

.adx-desktop-nav .adx-menu-item,
.adx-desktop-nav .menu-item {
  position: relative;
}

.adx-desktop-nav .adx-nav-dropdown-panel,
.adx-desktop-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  z-index: 1000;
  display: grid;
  min-width: min(420px, calc(100vw - 32px));
  gap: 4px;
  padding: 12px;
  margin: 0;
  list-style: none;
  background: #ffffff;
  border: 1px solid var(--adx-line);
  border-radius: var(--adx-radius);
  box-shadow: var(--adx-shadow-soft);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 10px) scale(.96);
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.adx-desktop-nav .adx-has-submenu::after,
.adx-desktop-nav .menu-item-has-children::after {
  content: "";
  position: absolute;
  left: -20px;
  right: -20px;
  top: 100%;
  height: 24px;
}

.adx-desktop-nav .adx-has-submenu:hover > .adx-nav-dropdown-panel,
.adx-desktop-nav .adx-has-submenu:focus-within > .adx-nav-dropdown-panel,
.adx-desktop-nav .adx-nav-dropdown-panel:hover,
.adx-desktop-nav .menu-item-has-children:hover > .sub-menu,
.adx-desktop-nav .menu-item-has-children:focus-within > .sub-menu,
.adx-desktop-nav .sub-menu:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.adx-desktop-nav .adx-nav-dropdown-panel a,
.adx-desktop-nav .sub-menu a {
  display: block;
  padding: 13px 14px;
  color: var(--adx-text);
  border-radius: 7px;
}

.adx-desktop-nav .adx-nav-dropdown-panel small {
  display: block;
  margin-top: 3px;
  color: var(--adx-muted);
  font-size: .82rem;
  font-weight: 750;
}

.adx-desktop-nav .adx-nav-dropdown-panel a:hover,
.adx-desktop-nav .adx-nav-dropdown-panel a:focus-visible,
.adx-desktop-nav .sub-menu a:hover,
.adx-desktop-nav .sub-menu a:focus-visible {
  color: var(--adx-blue);
  background: var(--adx-soft);
}

.adx-mobile-panel[hidden] {
  display: none;
}

.adx-mobile-panel {
  position: fixed;
  inset: 82px 0 0;
  z-index: 10030;
  padding: 24px;
  overflow-y: auto;
  background: rgba(255, 255, 255, .98);
  border-top: 1px solid var(--adx-line);
  box-shadow: 0 28px 70px rgba(7, 11, 26, .16);
}

.adx-mobile-panel:not([hidden]) {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
}

.adx-menu-open,
body.adx-menu-open {
  overflow: hidden;
}

.adx-mobile-toggle.is-open .adx-menu-icon i:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.adx-mobile-toggle.is-open .adx-menu-icon i:nth-child(2) {
  opacity: 0;
}

.adx-mobile-toggle.is-open .adx-menu-icon i:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.adx-mobile-menu-list {
  display: grid;
  gap: 0;
}

.adx-mobile-menu-list,
.adx-mobile-menu-list ul {
  padding-left: 0;
  margin: 0;
  list-style: none;
}

.adx-mobile-menu-list a,
.adx-mobile-quote {
  display: flex;
  min-height: 46px;
  align-items: center;
  color: var(--adx-ink);
  text-decoration: none;
  font-weight: 850;
}

.adx-mobile-menu-list .sub-menu {
  display: grid;
  gap: 2px;
  padding: 4px 0 10px 16px;
}

.adx-mobile-menu-list .sub-menu a {
  min-height: 40px;
  color: var(--adx-muted);
  font-size: .95rem;
  font-weight: 780;
}

.adx-service-card .adx-card-link,
.adx-service-card .adx-service-link,
.adx-service-card .wp-block-button__link,
.adx-service-card > a:last-child {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: fit-content;
  margin-top: auto;
  padding: 0 18px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--adx-violet), var(--adx-blue));
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(47, 107, 255, .22);
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.adx-service-card .adx-card-link::after,
.adx-service-card .adx-service-link::after,
.adx-service-card .wp-block-button__link::after,
.adx-service-card > a:last-child::after {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.adx-service-card .adx-card-link:hover,
.adx-service-card .adx-card-link:focus-visible,
.adx-service-card .adx-service-link:hover,
.adx-service-card .adx-service-link:focus-visible,
.adx-service-card .wp-block-button__link:hover,
.adx-service-card .wp-block-button__link:focus-visible,
.adx-service-card > a:last-child:hover,
.adx-service-card > a:last-child:focus-visible {
  color: #ffffff;
  background: linear-gradient(135deg, var(--adx-blue), var(--adx-violet));
  box-shadow: 0 18px 38px rgba(47, 107, 255, .3);
  transform: translateY(-2px);
}

.adx-js .adx-reveal,
.adx-js .adx-service-card,
.adx-js .adx-process-card,
.adx-js .adx-proof-card,
.adx-js .adx-testimonial-card,
.adx-js .adx-mini-feature,
.adx-js .adx-stat,
.adx-js .adx-chip,
.adx-js .adx-brand-pill,
.adx-js .adx-faq details,
.adx-js .adx-cta-band,
.adx-js .adx-form-panel {
  opacity: 1;
  transform: none;
}

.adx-main {
  min-height: 55vh;
}

.adx-page-content > .entry-content > .adx-home {
  width: 100%;
  max-width: none;
}

.adx-search-form {
  display: flex;
  gap: 10px;
  align-items: center;
  max-width: 620px;
}

.adx-search-form label {
  flex: 1;
}

.adx-search-form input[type="search"] {
  width: 100%;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--adx-line);
  border-radius: 999px;
}

.adx-search-form button {
  min-height: 48px;
  padding: 0 20px;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--adx-violet), var(--adx-blue));
  font-weight: 900;
}

@media (max-width: 1200px) {
  .adx-desktop-nav {
    display: none;
  }

  .adx-site-header .adx-header-cta {
    display: none !important;
  }

  .adx-site-header .adx-mobile-toggle {
    display: inline-grid !important;
    place-items: center !important;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    margin-left: auto !important;
    padding: 0 !important;
    color: #ffffff !important;
    background: #080d1f !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: 0 14px 34px rgba(8, 13, 31, .22) !important;
    cursor: pointer !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 10040 !important;
  }

  .adx-site-header .adx-mobile-toggle .adx-menu-icon {
    display: grid !important;
    gap: 4px !important;
    width: 18px !important;
  }

  .adx-site-header .adx-mobile-toggle .adx-menu-icon i {
    display: block !important;
    width: 18px !important;
    height: 2px !important;
    background: currentColor !important;
    border-radius: 999px !important;
    transition: transform .2s ease, opacity .2s ease !important;
  }

  .adx-hero-grid,
  .adx-page-hero-grid,
  .adx-sd-hero-grid {
    grid-template-columns: 1fr;
  }

  .adx-hero-copy,
  .adx-page-copy,
  .adx-sd-hero-copy,
  .adx-article-hero {
    max-width: 820px;
  }
}

@keyframes adxRevealPolish {
  from {
    opacity: .001;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.adx-js .adx-reveal,
.adx-js .adx-service-card,
.adx-js .adx-process-card,
.adx-js .adx-proof-card,
.adx-js .adx-testimonial-card,
.adx-js .adx-mini-feature,
.adx-js .adx-stat,
.adx-js .adx-chip,
.adx-js .adx-brand-pill,
.adx-js .adx-faq details,
.adx-js .adx-cta-band,
.adx-js .adx-form-panel,
.adx-js.adx-reveal-ready .adx-reveal:not(.is-visible),
.adx-js.adx-reveal-ready .adx-service-card:not(.is-visible),
.adx-js.adx-reveal-ready .adx-process-card:not(.is-visible),
.adx-js.adx-reveal-ready .adx-proof-card:not(.is-visible),
.adx-js.adx-reveal-ready .adx-testimonial-card:not(.is-visible),
.adx-js.adx-reveal-ready .adx-mini-feature:not(.is-visible),
.adx-js.adx-reveal-ready .adx-stat:not(.is-visible),
.adx-js.adx-reveal-ready .adx-chip:not(.is-visible),
.adx-js.adx-reveal-ready .adx-brand-pill:not(.is-visible),
.adx-js.adx-reveal-ready .adx-faq details:not(.is-visible),
.adx-js.adx-reveal-ready .adx-cta-band:not(.is-visible),
.adx-js.adx-reveal-ready .adx-form-panel:not(.is-visible) {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

.adx-js .is-visible {
  animation: adxRevealPolish .5s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .adx-js .is-visible {
    animation: none;
  }
}

@media (max-width: 782px) {
  .adx-mobile-panel {
    inset: 72px 0 0;
    padding: 18px;
  }

  .adx-hero,
  .adx-page-hero,
  .adx-sd-hero {
    padding-top: 22px;
    padding-bottom: 42px;
  }

  .adx-home h1,
  .adx-hero-copy h1,
  .adx-page-copy h1,
  .adx-article-hero h1,
  .adx-sd-hero-copy h1 {
    font-size: clamp(2.05rem, 10vw, 3rem);
    line-height: 1.08;
  }

  .adx-hero-proof,
  .adx-proof-mini,
  .adx-sd-proof-row {
    grid-template-columns: 1fr;
  }
}

/* Compact hero system shared by pages, services, archives, search and posts. */
.adx-hero,
.adx-page-hero,
.adx-sd-hero,
.adx-article-hero {
  box-sizing: border-box;
  height: auto !important;
  min-height: 0 !important;
  padding-block: clamp(32px, 4.2vw, 58px) !important;
  overflow: clip;
}

.adx-hero-grid,
.adx-page-hero-grid,
.adx-sd-hero-grid {
  width: 100%;
  min-height: 0 !important;
  align-items: center;
  gap: clamp(28px, 4vw, 58px);
}

.adx-hero-copy,
.adx-page-copy,
.adx-sd-hero-copy,
.adx-article-hero {
  min-width: 0;
}

.adx-home .adx-hero-copy h1,
.adx-hero-copy h1,
.adx-page-copy h1,
.adx-sd-hero-copy h1,
.adx-article-hero h1 {
  max-width: 780px;
  margin-block: 14px 16px;
  font-size: clamp(2.25rem, 3.3vw, 3.25rem) !important;
  line-height: 1.08 !important;
  overflow-wrap: anywhere;
}

.adx-hero-copy .adx-lede,
.adx-page-copy .adx-lede,
.adx-sd-hero-copy .adx-lede,
.adx-article-hero .adx-lede,
.adx-article-hero > p {
  max-width: 680px;
  margin-block: 0 20px;
  font-size: clamp(.96rem, 1vw, 1.08rem) !important;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.adx-hero .adx-actions,
.adx-page-hero .adx-actions,
.adx-sd-hero .adx-actions,
.adx-article-hero .adx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.adx-hero-visual,
.adx-page-visual,
.adx-sd-hero-visual {
  width: 100%;
  min-width: 0;
  min-height: 0 !important;
  max-height: 520px;
}

.adx-hero-visual img,
.adx-page-visual img,
.adx-sd-hero-visual img {
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
}

@media (max-width: 1200px) {
  .adx-hero,
  .adx-page-hero,
  .adx-sd-hero,
  .adx-article-hero {
    padding-block: 36px !important;
  }

  .adx-home .adx-hero-copy h1,
  .adx-hero-copy h1,
  .adx-page-copy h1,
  .adx-sd-hero-copy h1,
  .adx-article-hero h1 {
    font-size: clamp(2.15rem, 4.5vw, 2.75rem) !important;
  }

  .adx-hero-visual,
  .adx-page-visual,
  .adx-sd-hero-visual {
    max-height: none;
  }
}

@media (max-width: 782px) {
  .adx-hero,
  .adx-page-hero,
  .adx-sd-hero,
  .adx-article-hero {
    padding-block: 28px 34px !important;
  }

  .adx-home .adx-hero-copy h1,
  .adx-hero-copy h1,
  .adx-page-copy h1,
  .adx-sd-hero-copy h1,
  .adx-article-hero h1 {
    margin-block: 12px 14px;
    font-size: clamp(1.9rem, 8.5vw, 2.2rem) !important;
    line-height: 1.12 !important;
  }

  .adx-hero-copy .adx-lede,
  .adx-page-copy .adx-lede,
  .adx-sd-hero-copy .adx-lede,
  .adx-article-hero .adx-lede,
  .adx-article-hero > p {
    margin-bottom: 18px;
    font-size: .96rem !important;
    line-height: 1.55;
  }

  .adx-hero-grid,
  .adx-page-hero-grid,
  .adx-sd-hero-grid {
    gap: 24px;
  }
}

@media (max-width: 390px) {
  .adx-home .adx-hero-copy h1,
  .adx-hero-copy h1,
  .adx-page-copy h1,
  .adx-sd-hero-copy h1,
  .adx-article-hero h1 {
    font-size: 1.85rem !important;
  }
}

.adx-home > .adx-hero,
.adx-home .adx-hero {
  width: 100%;
  max-width: 100%;
}

.adx-home .adx-hero > .adx-wrap,
.adx-home .adx-hero-grid.adx-wrap {
  width: min(1180px, calc(100% - 48px)) !important;
  max-width: 1180px !important;
  margin-inline: auto !important;
}

.adx-mobile-menu-list > li {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  align-items: center;
  border-bottom: 1px solid rgba(18, 28, 58, .09);
}

.adx-mobile-menu-list > li:not(.menu-item-has-children) > a {
  grid-column: 1 / -1;
}

.adx-mobile-menu-list > li > a {
  min-width: 0;
  min-height: 56px;
  padding-inline: 4px 12px;
  font-size: 1rem;
  font-weight: 800;
}

.adx-submenu-toggle {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  justify-self: end;
  padding: 0;
  color: var(--adx-ink);
  background: var(--adx-soft);
  border: 1px solid rgba(18, 28, 58, .1);
  border-radius: 8px;
  cursor: pointer;
}

.adx-submenu-toggle span {
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease;
}

.adx-submenu-toggle[aria-expanded="true"] span {
  transform: translateY(2px) rotate(225deg);
}

.adx-mobile-menu-list .sub-menu {
  grid-column: 1 / -1;
  width: 100%;
  padding: 4px 0 12px 14px;
}

.adx-mobile-menu-list .sub-menu[hidden] {
  display: none !important;
}

.adx-mobile-menu-list .sub-menu li {
  border-left: 2px solid rgba(47, 107, 255, .14);
}

.adx-mobile-menu-list .sub-menu a {
  min-height: 44px;
  padding: 7px 12px;
  border-radius: 6px;
}

.adx-mobile-menu-list .sub-menu a:hover,
.adx-mobile-menu-list .sub-menu a:focus-visible {
  color: var(--adx-blue);
  background: rgba(47, 107, 255, .07);
}

.adx-site-header .adx-mobile-toggle.is-open .adx-menu-icon i:nth-child(1) {
  transform: translateY(6px) rotate(45deg) !important;
}

.adx-site-header .adx-mobile-toggle.is-open .adx-menu-icon i:nth-child(2) {
  opacity: 0 !important;
}

.adx-site-header .adx-mobile-toggle.is-open .adx-menu-icon i:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg) !important;
}

.adx-lead-form [aria-invalid="true"],
.adx-contact-form [aria-invalid="true"] {
  border-color: #b42318;
}

@media (max-width: 782px) {
  .adx-home .adx-hero > .adx-wrap,
  .adx-home .adx-hero-grid.adx-wrap {
    width: calc(100% - 32px) !important;
  }

  .adx-mobile-panel {
    padding: 14px 18px 24px;
  }
}

body.aidigitalex-expansion-page .adx-page-copy h1,
body.aidigitalex-service-page .adx-page-copy h1,
body.aidigitalex-blog-post .adx-article-hero h1 {
  font-size: clamp(2.25rem, 3.3vw, 3.25rem) !important;
  line-height: 1.08 !important;
}

body.aidigitalex-expansion-page .adx-page-hero,
body.aidigitalex-service-page .adx-page-hero,
body.aidigitalex-blog-post .adx-article-hero {
  min-height: 0 !important;
  padding-block: clamp(32px, 4.2vw, 58px) !important;
}

@media (max-width: 1180px) {
  body.aidigitalex-expansion-page .adx-page-copy h1,
  body.aidigitalex-service-page .adx-page-copy h1,
  body.aidigitalex-blog-post .adx-article-hero h1 {
    font-size: clamp(2.15rem, 4.5vw, 2.75rem) !important;
    line-height: 1.1 !important;
  }

  body.aidigitalex-expansion-page .adx-page-hero,
  body.aidigitalex-service-page .adx-page-hero,
  body.aidigitalex-blog-post .adx-article-hero {
    padding-block: 36px !important;
  }
}

@media (max-width: 760px) {
  body.aidigitalex-expansion-page .adx-page-copy h1,
  body.aidigitalex-service-page .adx-page-copy h1,
  body.aidigitalex-blog-post .adx-article-hero h1 {
    font-size: clamp(1.85rem, 8.2vw, 2.15rem) !important;
    line-height: 1.12 !important;
  }

  body.aidigitalex-expansion-page .adx-page-hero,
  body.aidigitalex-service-page .adx-page-hero,
  body.aidigitalex-blog-post .adx-article-hero {
    padding-block: 28px 34px !important;
  }

  body.aidigitalex-expansion-page .adx-page-hero-grid,
  body.aidigitalex-service-page .adx-page-hero-grid {
    gap: 18px !important;
  }

  body.aidigitalex-expansion-page .adx-visual-system,
  body.aidigitalex-service-page .adx-visual-system {
    min-height: 0 !important;
    padding: 12px !important;
  }

  body.aidigitalex-expansion-page .adx-visual-grid,
  body.aidigitalex-service-page .adx-visual-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.aidigitalex-expansion-page .adx-visual-card,
  body.aidigitalex-service-page .adx-visual-card {
    min-height: 76px !important;
    padding: 10px !important;
  }

  body.aidigitalex-expansion-page .adx-visual-card .adx-spark,
  body.aidigitalex-service-page .adx-visual-card .adx-spark {
    display: none;
  }
}

@media (max-width: 390px) {
  body.aidigitalex-expansion-page .adx-page-copy h1,
  body.aidigitalex-service-page .adx-page-copy h1,
  body.aidigitalex-blog-post .adx-article-hero h1 {
    font-size: 1.85rem !important;
  }
}
