/* Cris UGC 0.2 — Elementor-first framework. Keep theme CSS structural, not content-specific. */

html, body { width: 100%; }
body { overflow-x: clip; }

.cris-site-content,
.cris-site-content > .elementor,
.cris-site-content .elementor-page,
body.elementor-page .cris-site-content {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

/* Do not impose legacy theme widths on Elementor containers. */
.elementor-page .elementor-section-wrap,
.elementor-page .elementor-inner,
.elementor-page .elementor-section,
.elementor-page .e-con {
  max-width: none;
}

.cris-skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 99999;
  transform: translateY(-180%);
  padding: 10px 14px;
  background: var(--cris-teal);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
}
.cris-skip-link:focus { transform: translateY(0); }

/* Fallback header only appears when no Elementor header exists and something is configured. */
.cris-site-header { width: 100%; background: var(--cris-white); }
.cris-header-inner {
  width: 100%;
  min-height: 72px;
  padding-inline: var(--cris-page-gutter);
  display: flex;
  align-items: center;
  gap: 24px;
}
.cris-brand { margin-right: auto; line-height: 0; }
.custom-logo { display: block; width: auto; max-height: 48px; }
.cris-primary-nav ul,
.cris-site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}
.cris-primary-nav a,
.cris-site-footer a { text-decoration: none; }
.cris-primary-nav a:hover,
.cris-primary-nav a:focus-visible,
.cris-site-footer a:hover,
.cris-site-footer a:focus-visible { text-decoration: underline; text-underline-offset: .25em; }

.cris-menu-toggle {
  display: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 10px;
  font-size: 1.35rem;
}

/* Footer fallback is deliberately minimal. */
.cris-site-footer {
  width: 100%;
  padding: 24px var(--cris-page-gutter);
}

/* Non-Elementor fallback only. */
.cris-fallback-content {
  width: 100%;
  padding: 40px var(--cris-page-gutter);
}

/* Basic accessible focus treatment without overriding Elementor design choices. */
:where(a, button, input, textarea, select):focus-visible {
  outline: 2px solid var(--cris-orange);
  outline-offset: 3px;
}

/* Keep embedded media responsive without forcing presentation styles. */
iframe, video { max-width: 100%; }

@media (max-width: 767px) {
  .cris-header-inner { min-height: 64px; }
  .cris-menu-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .cris-primary-nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 14px var(--cris-page-gutter) 20px;
    background: var(--cris-white);
  }
  .cris-primary-nav.is-open { display: block; }
  .cris-primary-nav ul { align-items: stretch; flex-direction: column; gap: 0; }
  .cris-primary-nav a { display: block; padding-block: 10px; }
  .custom-logo { max-height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
