/**
 *
 * Base styles and elements used across multiple blocks
 *
 *
 **/

:root {
  --container-padding: clamp(18px, 2vw, 32px);
  --rounded-corners: 1.25em;
  --font-size-xxs: clamp(10px, 0.82vw, 12px);
  --font-size-xs: clamp(14px, 0.85vw, 15px);
  --font-size-sm: clamp(15px, 1vw, 17px);
  --font-size-book: clamp(18.5px, 1.4vw, 19.5px);
  --font-size-md: clamp(21px, 1.7vw, 26px);
  --font-size-lg: clamp(24px, 2.3vw, 34px);
  --font-size-xl: clamp(32px, 2.9vw, 48px);
  --font-size-xxl: clamp(36px, 3.45vw, 60px);
  --font-size-xxxl: clamp(42px, 3.7vw, 75px);
  --font-size-xxxxl: clamp(42px, 4.9vw, 87px);
  --wp--preset--font-size--xxs: var(--font-size-xxs);
  --wp--preset--font-size--xs: var(--font-size-xs);
  --wp--preset--font-size--sm: var(--font-size-sm);
  --wp--preset--font-size--book: var(--font-size-book);
  --wp--preset--font-size--md: var(--font-size-md);
  --wp--preset--font-size--lg: var(--font-size-lg);
  --wp--preset--font-size--xl: var(--font-size-xl);
  --wp--preset--font-size--xxl: var(--font-size-xxl);
  --wp--preset--font-size--xxxl: var(--font-size-xxxl);
  --wp--preset--font-size--xxxxl: var(--font-size-xxxxl);
  --wp--preset--font-size--normal: var(--font-size-book);
  --spacing-xs: 0.4rem;
  --spacing-sm: 0.67rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;
  --wp--preset--spacing--xs: var(--spacing-xs);
  --wp--preset--spacing--sm: var(--spacing-sm);
  --wp--preset--spacing--md: var(--spacing-md);
  --wp--preset--spacing--lg: var(--spacing-lg);
  --wp--preset--spacing--xl: var(--spacing-xl);
  --site-header-height: 90px;
  --site-header-height-sm: 74px;
  --event-breadcrumb-header-height: 46px;
}

.has-headline-font-family.has-xs-font-size {
  font-size: clamp(21px, 1.35vw, 25px) !important;
}

.has-headline-font-family.has-sm-font-size {
  font-size: clamp(24px, 1.7vw, 30px) !important;
}

.has-headline-font-family.has-book-font-size {
  font-size: clamp(30px, 2.2vw, 38px) !important;
}

.has-headline-font-family.has-md-font-size {
  font-size: clamp(32px, 2.6vw, 42px) !important;
}

.has-headline-font-family.has-lg-font-size {
  font-size: clamp(38px, 3.7vw, 55px) !important;
}

.has-headline-font-family.has-xl-font-size {
  font-size: clamp(45px, 4.8vw, 65px) !important;
}

.has-headline-font-family.has-xxl-font-size {
  font-size: clamp(51px, 5.3vw, 77px) !important;
}

.has-headline-font-family.has-xxxl-font-size {
  font-size: clamp(57px, 5.9vw, 89px) !important;
}

.has-headline-font-family.has-xxxxl-font-size {
  font-size: clamp(57px, 6.5vw, 107px) !important;
}

html {
  scroll-padding-top: var(--site-header-height);
}

@media (max-width: 800px) {
  html {
    scroll-padding-top: var(--site-header-height-sm);
  }
}

body {
  font-family: "Interstate", sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-block-start: 0;
  margin-block-end: 0;
}

strong {
  font-weight: 700;
}

cite {
  font-style: normal;
}

/*
 * Site wrapper
 */

.wp-site-blocks,
.editor-styles-wrapper {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/*
 * Editor typography
 */

h1.editor-post-title {
  font-size: var(--font-size-xl);
  font-family: "interstate Compressed", sans-serif;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

body.post-type-page h1.editor-post-title,
body.post-type-tribe_events h1.editor-post-title {
  font-family: "Interstate", sans-serif;
  font-weight: 600 !important;
  font-size: 1.67rem !important;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  position: relative;
}

body.post-type-page h1.editor-post-title:after,
body.post-type-tribe_events h1.editor-post-title:after {
  content: "Internal only, not shown on page";
  position: absolute;
  left: 0;
  bottom: -1.5rem;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 0.2rem 0.8rem 0.3rem;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  font-weight: 600;
  outline: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: rgba(0, 0, 0, 0.1) 0 1px 5px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
  backdrop-filter: blur(10px);
}

body.post-type-page h1.editor-post-title:hover:after,
body.post-type-tribe_events h1.editor-post-title:hover:after {
  opacity: 1;
}

body.post-type-post .block-editor-block-list__layout {
  font-family: "Fabric Serif", "Georgia", sans-serif;
  font-size: 1.1rem;
  line-height: 1.5;
}

/*
 * Site header + footer
 */

/* Remove the header template-part wrapper and its inner 
	group from the box tree so .site-header's sticky 
	container becomes .wp-site-blocks (the full page). */
.wp-site-blocks > .wp-block-template-part:first-child,
.wp-site-blocks > .wp-block-template-part:first-child > .wp-block-group {
  display: contents;
}

.site-header {
  top: 0;
  position: sticky;
  width: 100%;
  display: flex;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.93);
  backdrop-filter: blur(15px);
  box-shadow: rgba(0, 0, 0, 0.1) 0 1px 8px;
  z-index: 10;
  height: var(--site-header-height-sm);
}

body.logged-in .site-header {
  top: 32px;
}

.site-header > .wp-block-custom-wrapper {
  flex: 1;
  width: 100%;
}

/* Prevent generic page headers (e.g. for Applied AI) from shrinking buttons */
header .wp-block-buttons {
  flex-shrink: 0;
}

@media (min-width: 801px) {
  .site-header {
    height: var(--site-header-height);
  }
  :is(.site-header, .applied-ai-header)
    .wp-block-navigation-item__content:hover {
    text-decoration: underline;
  }
}

@media (max-width: 800px) {
  .site-header .wp-block-site-logo,
  .site-logo /* Applied AI logo */ {
    width: 95px;
    height: 40px;
  }
  .site-header .wp-block-site-logo a,
  .site-logo a {
    display: block;
    width: 100%;
    height: 100%;
  }
  .site-header .wp-block-site-logo img,
  .site-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left center;
  }
}

.site-header .wp-block-site-tagline {
  width: 180px;
  line-height: 1.3;
  display: none;
}

.site-header nav li.current-menu-item > .wp-block-navigation-item__content span,
.site-header
  nav
  li.current-menu-parent
  > .wp-block-navigation-item__content
  span,
.site-header
  nav
  li.current-menu-ancestor
  > .wp-block-navigation-item__content
  span {
  color: var(--wp--preset--color--blue-700);
}

@media (max-width: 800px) {
  .site-header .wp-block-button a {
    font-size: 14px !important;
    padding: 0.4em 0.8em 0.55em;
  }
}

.site-header .wp-block-site-tagline:before {
  content: "";
  position: absolute;
  display: block;
  height: 64%;
  width: 1px;
  margin-left: -11px;
  background-color: #d2d2d2;
}

@media (min-width: 1201px) {
  .site-header .wp-block-site-tagline {
    display: block;
  }
}

.site-header .wp-block-buttons {
  flex-shrink: 0;
}

.applied-ai-header {
  background-color: rgba(25, 24, 29, 0.94) !important;
  box-shadow: rgba(0, 0, 0, 0.4) 0 1px 8px;
  backdrop-filter: blur(15px);
}

@media (max-width: 613px) {
  .ai-site-title {
    position: absolute;
    left: -9999px;
    width: 0;
    height: 0;
    overflow: hidden;
    z-index: -1;
    visibility: hidden;
  }
}

@media (min-width: 614px) {
  .wp-block-navigation__container {
    gap: 11px 17px;
  }

  .wp-block-navigation .wp-block-navigation-item__content {
    font-size: clamp(13px, 0.9rem, 16px);
  }
}

.wp-block-navigation__responsive-container.is-menu-open {
  min-height: 30vh;
  width: 80vw;
  left: 7vw;
  top: calc(var(--site-header-height-sm) - 0.5rem);
  border-radius: 0.7rem;
  outline: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: rgba(0, 0, 0, 0.3) 0 14px 10px;
}

.wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__responsive-container-content {
  padding-top: 0.5rem;
}

.wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container {
  padding-top: 0.5rem;
}

.site-footer {
  margin: 0;
  z-index: 8;
}

.site-footer a {
  text-decoration: none;
  color: var(--wp--preset--color--gray-900);
}

.site-footer a:hover {
  text-decoration: underline;
}

html.block-editor-iframe__html .site-footer {
  margin-block-start: 0;
}

/*
 * Site wrapper
 */

.site-wrapper {
  margin: 0;
  z-index: 9;
  /* padding-top: var(--site-header-height-sm); */
}

@media (min-width: 801px) {
  .site-wrapper {
    /* padding-top: var(--site-header-height); */
  }
}

html.block-editor-iframe__html .site-wrapper {
  padding-top: 0;
  margin-block-start: 0;
}

/* Post meta */

.site-wrapper .post-meta {
  width: 100%;
}

@media (min-width: 1001px) {
  .site-wrapper .post-meta .wp-block-column {
    flex-grow: 0;
    flex-shrink: 0;
  }
}

@media (max-width: 1000px) {
  .site-wrapper .post-meta {
    flex-wrap: wrap;
    flex-direction: column-reverse;
    margin-top: -0.8rem;
  }
  .site-wrapper .post-content {
    padding: 0 !important;
  }
}

/* Post content */

.site-wrapper .post-content > * {
  margin-left: auto;
  margin-right: auto;
  flex-grow: 0;
  flex-shrink: 0;
}

.site-wrapper .post-sidebar {
  width: 33%;
  max-width: 625px;
  flex-grow: 0;
  flex-shrink: 0;
}

@media (max-width: 1000px) {
  .site-wrapper .post-content {
    flex-wrap: wrap;
    width: 100%;
  }
  .site-wrapper .post-content > *,
  .site-wrapper .post-sidebar {
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}
/*
 * Text links
 */

.site-wrapper
  :is(h1, h2, h3, h4, h5, h6, p, li)
  a:not([class*="wp-block"]):not([class*="wp-element"]) {
  color: var(--gray-700);
  text-decoration-line: underline;
  text-decoration-color: var(--wp--preset--color--blue-400);
}

:is(.wp-site-blocks, .wp-block-post-content) p a:hover,
:is(.wp-site-blocks, .wp-block-post-content)
  li:not(.wp-block-navigation-item)
  a:hover {
  text-decoration-color: var(--wp--preset--color--blue-800);
}
