/* WordPress block markup adapters. The visual source values live in site.css. */
.wp-site-blocks,
.wp-site-blocks > * {
  margin-block-start: 0;
}

.wp-site-blocks {
  overflow: clip;
}

.wp-block-template-part {
  margin-block: 0;
}

.kymenmatkat-site-header .wp-block-group.kymenmatkat-site-header__inner {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 18px;
  justify-content: space-between;
}

.kymenmatkat-header-logo {
  flex: 0 0 190px;
  margin: 0;
}

.kymenmatkat-header-logo img {
  max-height: 49px;
  object-fit: contain;
  width: 190px;
}

.kymenmatkat-main-navigation {
  flex: 1 1 auto;
  justify-content: flex-end;
}

@media (min-width: 1241px) {
  .kymenmatkat-main-navigation {
    justify-content: flex-start;
    margin-left: 12px;
  }

  .kymenmatkat-main-navigation .wp-block-navigation__container {
    gap: 14px;
    justify-content: flex-start;
  }

  .kymenmatkat-main-navigation
    .wp-block-navigation__container
    > .wp-block-navigation-submenu
    > .wp-block-navigation__submenu-container {
    left: 0 !important;
    right: auto !important;
  }
}

/* The linked logo is the home control on desktop; keep Home in the open mobile menu. */
.kymenmatkat-main-navigation .kymenmatkat-mobile-home-link {
  display: none;
}

.kymenmatkat-main-navigation
  .wp-block-navigation__responsive-container.is-menu-open
  .kymenmatkat-mobile-home-link,
.editor-styles-wrapper
  .kymenmatkat-main-navigation
  .kymenmatkat-mobile-home-link {
  display: flex;
}

.kymenmatkat-main-navigation .wp-block-navigation-item__content {
  color: var(--kymenmatkat-ink);
  text-decoration: none;
}

.kymenmatkat-main-navigation .wp-block-navigation-item__content:hover,
.kymenmatkat-main-navigation .current-menu-item > .wp-block-navigation-item__content {
  color: var(--kymenmatkat-blue);
}

.kymenmatkat-main-navigation .wp-block-navigation__submenu-container {
  background: #fff;
  border: 1px solid var(--kymenmatkat-line);
  border-radius: var(--kymenmatkat-radius);
  box-shadow: var(--kymenmatkat-shadow);
  min-width: 260px !important;
  padding: 10px;
}

.kymenmatkat-main-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  border-radius: 5px;
  padding: 9px 11px;
}

.kymenmatkat-main-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover {
  background: var(--kymenmatkat-mint-light);
}

.kymenmatkat-language-link {
  color: var(--kymenmatkat-ink);
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 850;
  text-decoration: none;
}

.kymenmatkat-header-cta {
  flex: 0 0 auto;
  margin: 0;
}

.wp-element-button,
.wp-block-button__link {
  align-items: center;
  background: var(--kymenmatkat-mint);
  border: 2px solid transparent;
  border-radius: var(--kymenmatkat-radius);
  color: #fff;
  display: inline-flex;
  font-size: 0.95rem;
  font-weight: 750;
  gap: 10px;
  justify-content: center;
  line-height: 1.2;
  min-height: 48px;
  padding: 0.65rem 1.35rem;
  text-decoration: none;
  transition: background-color 150ms ease, color 150ms ease, transform 150ms ease;
}

.wp-element-button:hover,
.wp-block-button__link:hover {
  background: #005e55;
  color: #fff;
  transform: translateY(-1px);
}

.is-style-kymenmatkat-secondary .wp-block-button__link {
  background: #fff;
  border-color: var(--kymenmatkat-mint);
  color: var(--kymenmatkat-mint);
}

.is-style-kymenmatkat-secondary .wp-block-button__link:hover {
  background: var(--kymenmatkat-mint-light);
  color: var(--kymenmatkat-mint);
}

.is-style-kymenmatkat-light .wp-block-button__link {
  background: #fff;
  border-color: #667987;
  color: var(--kymenmatkat-blue-dark);
}

.is-style-kymenmatkat-light .wp-block-button__link:hover {
  background: #fff;
  color: var(--kymenmatkat-blue-dark);
}

.is-style-kymenmatkat-card {
  background: #fff;
  border: 1px solid var(--kymenmatkat-line);
  border-radius: var(--kymenmatkat-radius);
  box-shadow: var(--kymenmatkat-shadow);
  padding: clamp(24px, 4vw, 40px);
}

.kymenmatkat-hero {
  background-image:
    linear-gradient(90deg, rgba(5, 43, 67, 0.94) 0%, rgba(5, 43, 67, 0.7) 52%, rgba(5, 43, 67, 0.12) 100%),
    var(--kymenmatkat-hero-image);
}

.kymenmatkat-hero--home {
  background-image:
    linear-gradient(90deg, rgba(5, 43, 67, 0.95) 0%, rgba(5, 43, 67, 0.72) 52%, rgba(5, 43, 67, 0.08) 100%),
    var(--kymenmatkat-hero-image);
}

.kymenmatkat-section.wp-block-group {
  margin-block: 0;
}

/*
 * WordPress constrains direct children of a constrained Group to contentSize
 * (930px). The HTML reference uses the full 1180px container for these visual
 * modules, so explicitly opt those modules back into the wide container.
 */
.kymenmatkat-section > .kymenmatkat-container > :where(
    .kymenmatkat-section-heading,
    .kymenmatkat-destination-grid,
    .kymenmatkat-theme-grid,
    .kymenmatkat-calendar-grid,
    .kymenmatkat-campaign-list,
    .kymenmatkat-card-grid,
    .kymenmatkat-notice-grid,
    .kymenmatkat-service-grid,
    .kymenmatkat-form-layout,
    .kymenmatkat-full-cta,
    .wp-block-buttons
  ) {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
  width: 100%;
}

/* Keep the hero copy on the container's left edge as in the HTML reference. */
.kymenmatkat-hero__inner > * {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.kymenmatkat-hero__inner > :where(
    .kymenmatkat-hero-slogan,
    .kymenmatkat-breadcrumbs,
    .kymenmatkat-button-row
  ) {
  max-width: none !important;
  width: 100%;
}

/* The React/HTML heading component wraps its copy; the block pattern does not. */
.kymenmatkat-section-heading.wp-block-group {
  display: block;
}

.kymenmatkat-section-heading.wp-block-group > * {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.kymenmatkat-section-heading.wp-block-group > .wp-block-heading {
  max-width: none !important;
  width: 100%;
}

.kymenmatkat-section-heading.wp-block-group > p {
  max-width: 930px !important;
}

/* The icon and its copy use the same two-column row as the HTML reference. */
.kymenmatkat-trust-strip.wp-block-group {
  gap: 0 !important;
}

.kymenmatkat-trust-strip article.wp-block-group {
  display: flex;
}

.kymenmatkat-trust-strip article.wp-block-group > .kymenmatkat-icon,
.kymenmatkat-trust-strip article.wp-block-group > .wp-block-group {
  margin: 0 !important;
  max-width: none !important;
}

.kymenmatkat-trust-strip article.wp-block-group > .wp-block-group > .wp-block-heading {
  margin: 0 0 5px !important;
}

.kymenmatkat-trust-strip article.wp-block-group > .wp-block-group > p {
  margin: 0 !important;
}

/*
 * Core Image and constrained Group wrappers must not add their intrinsic
 * dimensions or block gaps to the reference card grids.
 */
.kymenmatkat-campaign-list > .kymenmatkat-image-card,
.kymenmatkat-theme-grid > .kymenmatkat-image-card {
  margin-block-start: 0 !important;
}

.kymenmatkat-image-card--horizontal > .kymenmatkat-image-card__media,
.kymenmatkat-image-card--horizontal > .kymenmatkat-image-card__content,
.kymenmatkat-theme-grid .kymenmatkat-image-card__media,
.kymenmatkat-theme-grid .kymenmatkat-image-card__content {
  margin: 0 !important;
  max-width: none !important;
  width: 100% !important;
}

.kymenmatkat-image-card--horizontal > .kymenmatkat-image-card__media {
  height: 100% !important;
}

.kymenmatkat-image-card--horizontal .kymenmatkat-image-card__media > a,
.kymenmatkat-theme-grid .kymenmatkat-image-card__media > a {
  display: block;
  height: 100%;
  width: 100%;
}

.kymenmatkat-image-card--horizontal .kymenmatkat-image-card__media img,
.kymenmatkat-theme-grid .kymenmatkat-image-card__media img {
  display: block;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  width: 100% !important;
}

.kymenmatkat-image-card--horizontal .kymenmatkat-image-card__content > *,
.kymenmatkat-theme-grid .kymenmatkat-image-card__content > * {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
}

.kymenmatkat-image-card--horizontal .kymenmatkat-card-label--content {
  font-size: 0.67rem !important;
  margin: 0 0 15px !important;
}

.kymenmatkat-image-card--horizontal .kymenmatkat-image-card__content > .wp-block-heading,
.kymenmatkat-theme-grid .kymenmatkat-image-card__content > .wp-block-heading {
  margin: 0 0 10px !important;
}

.kymenmatkat-image-card--horizontal .kymenmatkat-image-card__content > p:not(.kymenmatkat-card-label),
.kymenmatkat-theme-grid .kymenmatkat-image-card__content > p {
  margin: 0 0 18px !important;
}

.kymenmatkat-button-row.wp-block-buttons {
  gap: 12px;
}

.kymenmatkat-search-panel__fields {
  grid-template-columns: 1.05fr 1.05fr 1.05fr 1.2fr 0.8fr;
}

.kymenmatkat-search-panel__value {
  grid-template-columns: 30px minmax(0, 1fr);
}

.kymenmatkat-search-panel__value .kymenmatkat-icon--compass {
  color: var(--kymenmatkat-teal);
}

.kymenmatkat-image-card .wp-block-image,
.kymenmatkat-staff-cta .wp-block-image {
  margin: 0;
}

.kymenmatkat-calendar-date {
  align-items: center;
  background: #eef8f6;
  border: 1px solid #b8dcd6;
  border-radius: var(--kymenmatkat-radius);
  display: flex;
  flex-direction: column;
  height: 96px;
  justify-content: center;
  line-height: 1;
  text-align: center;
  width: 74px;
}

.kymenmatkat-calendar-date p {
  margin: 0;
}

.kymenmatkat-calendar-date strong {
  color: var(--kymenmatkat-ink);
  font-family: var(--kymenmatkat-font-heading);
  font-size: 1rem;
}

.kymenmatkat-calendar-grid > .kymenmatkat-calendar-card {
  display: grid !important;
  margin-block-start: 0 !important;
}

.kymenmatkat-calendar-card > .kymenmatkat-calendar-date,
.kymenmatkat-calendar-card > .kymenmatkat-calendar-card__body,
.kymenmatkat-calendar-card > .kymenmatkat-calendar-card__cta {
  margin: 0 !important;
  max-width: none !important;
}

.kymenmatkat-calendar-card__body {
  width: 100%;
}

.kymenmatkat-calendar-card__body > * {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
}

.kymenmatkat-calendar-card__body > .wp-block-heading {
  margin: 0 0 7px !important;
}

.kymenmatkat-calendar-card__body > .kymenmatkat-calendar-card__meta {
  margin: 0 !important;
}

.kymenmatkat-calendar-card__body > p {
  margin: 8px 0 0 !important;
}

.kymenmatkat-calendar-card > .kymenmatkat-calendar-card__cta {
  color: #fff !important;
  margin: 0 !important;
  text-decoration: none;
}

@media (max-width: 760px) {
  .kymenmatkat-calendar-card > .kymenmatkat-calendar-card__cta {
    margin-top: 4px !important;
  }
}

.kymenmatkat-notice > p:first-child {
  margin: 0;
}

.kymenmatkat-notice > p:first-child span {
  background: #fff;
  border-radius: 6px;
  color: var(--kymenmatkat-accent);
  display: inline-block;
  font-size: 0.67rem;
  font-weight: 850;
  padding: 5px 9px;
  text-transform: uppercase;
}

.kymenmatkat-service-grid--support .kymenmatkat-service-grid__cta {
  background: transparent;
  border: 0;
  margin: auto 0 0 !important;
  max-width: none !important;
  padding: 0;
}

.kymenmatkat-service-grid--support .kymenmatkat-service-grid__cta a {
  align-items: center;
  background: #fff;
  border: 1px solid var(--kymenmatkat-service-accent);
  border-radius: var(--kymenmatkat-radius);
  color: var(--kymenmatkat-service-accent);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
  min-height: 42px;
  padding: 9px 13px;
  text-decoration: none;
}

.kymenmatkat-service-grid--support article > .kymenmatkat-icon,
.kymenmatkat-service-grid--support article > .wp-block-heading,
.kymenmatkat-service-grid--support article > p {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
}

.kymenmatkat-service-grid--support article > .kymenmatkat-icon {
  margin-bottom: 16px !important;
}

.kymenmatkat-service-grid--support article > .wp-block-heading {
  margin-bottom: 10px !important;
  margin-top: 0 !important;
}

.kymenmatkat-service-grid--support article > p:not(.kymenmatkat-service-grid__cta) {
  margin-bottom: 20px !important;
  margin-top: 0 !important;
}

.kymenmatkat-staff-cta > figure {
  height: 438px;
  width: 100%;
}

.kymenmatkat-staff-cta > figure img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.kymenmatkat-site-footer .kymenmatkat-container > :where(
    .kymenmatkat-site-footer__grid,
    .kymenmatkat-site-footer__bar,
    .kymenmatkat-site-footer__legal
  ) {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: none !important;
  width: 100%;
}

.kymenmatkat-site-footer__grid.wp-block-columns {
  display: grid !important;
}

.kymenmatkat-site-footer__grid > .wp-block-column {
  margin: 0 !important;
  min-width: 0;
}

.kymenmatkat-site-footer__grid > .wp-block-column:first-child > .wp-block-heading {
  margin: 0 0 0.83em !important;
}

.kymenmatkat-site-footer__grid > .wp-block-column:first-child > address {
  margin: 0 !important;
}

.kymenmatkat-site-footer__grid .kymenmatkat-footer-phone {
  color: inherit;
}

.kymenmatkat-site-footer__grid > .wp-block-column:not(:first-child) {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.kymenmatkat-site-footer__grid > .wp-block-column:not(:first-child) > .wp-block-heading {
  margin: 0 0 0.8rem !important;
}

.kymenmatkat-site-footer__grid .wp-block-navigation {
  margin: 0 !important;
}

.kymenmatkat-site-footer__grid .wp-block-navigation__container {
  align-items: flex-start;
  gap: 7px !important;
}

.kymenmatkat-site-footer__grid .wp-block-navigation-item__content {
  color: var(--kymenmatkat-blue) !important;
  font-size: 0.84rem;
  font-weight: 700;
}

.kymenmatkat-site-footer__bar > p {
  align-items: center;
  display: flex;
  gap: 34px;
  margin: 0 !important;
}

.kymenmatkat-card-grid > .wp-block-post-template,
.kymenmatkat-card-grid.wp-block-post-template {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  list-style: none;
  padding: 0;
}

.kymenmatkat-post-card {
  background: #fff;
  border: 1px solid var(--kymenmatkat-line);
  border-radius: var(--kymenmatkat-radius);
  box-shadow: 0 10px 30px rgba(16, 47, 68, 0.08);
  height: 100%;
  overflow: hidden;
}

.kymenmatkat-post-card .wp-block-post-featured-image {
  margin: 0;
}

.kymenmatkat-post-card .wp-block-post-featured-image img {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.kymenmatkat-post-card__body {
  padding: 24px;
}

.kymenmatkat-post-card__body .wp-block-post-title a {
  color: inherit;
  text-decoration: none;
}

.kymenmatkat-prose > * {
  max-width: 760px;
}

.kymenmatkat-prose > .alignwide,
.kymenmatkat-prose > .alignfull {
  max-width: none;
}

.kymenmatkat-prose .wp-block-image img {
  border-radius: var(--kymenmatkat-radius);
}

.kymenmatkat-archive-pagination {
  margin-top: 42px;
}

.kymenmatkat-empty-state,
.kymenmatkat-integration-note {
  background: var(--kymenmatkat-cream);
  border: 1px solid #edd8a6;
  border-radius: var(--kymenmatkat-radius);
  padding: 24px;
}

.kymenmatkat-integration-note code {
  overflow-wrap: anywhere;
}

/* Gravity Forms Orbital / Theme Framework integration. */
.kymenmatkat-form-shell .gform-theme--framework {
  --gf-color-primary: var(--kymenmatkat-blue);
  --gf-ctrl-bg-color: #fff;
  --gf-ctrl-border-color: #b9cdd5;
  --gf-ctrl-border-color-focus: var(--kymenmatkat-teal);
  --gf-ctrl-color: var(--kymenmatkat-ink);
  --gf-ctrl-label-color-primary: var(--kymenmatkat-ink);
  --gf-ctrl-radius: var(--kymenmatkat-radius);
  --gf-ctrl-size: 52px;
  --gf-ctrl-btn-bg-color-primary: var(--kymenmatkat-coral);
  --gf-ctrl-btn-color-primary: #fff;
  --gf-form-gap-x: 18px;
  --gf-form-gap-y: 20px;
}

.kymenmatkat-form-shell .gform_wrapper {
  background: #fff;
  border: 1px solid var(--kymenmatkat-line);
  border-radius: var(--kymenmatkat-radius);
  box-shadow: var(--kymenmatkat-shadow);
  padding: clamp(24px, 4vw, 42px);
}

.kymenmatkat-form-shell .gform_heading {
  margin-bottom: 28px;
}

.kymenmatkat-form-shell .gform_title {
  font-family: var(--kymenmatkat-font-heading);
  font-size: clamp(1.8rem, 2.4vw, 2.25rem);
}

.kymenmatkat-form-shell .gsection {
  border-bottom-color: var(--kymenmatkat-line);
  margin-top: 18px;
  padding-bottom: 12px;
}

.kymenmatkat-form-shell .gsection_title {
  color: var(--kymenmatkat-blue-dark);
  font-family: var(--kymenmatkat-font-heading);
}

.kymenmatkat-form-shell .gform_button {
  background: var(--kymenmatkat-coral) !important;
  border: 2px solid var(--kymenmatkat-coral) !important;
  border-radius: var(--kymenmatkat-radius) !important;
  color: #fff !important;
  font-weight: 800 !important;
  min-height: 52px !important;
  padding-inline: 22px !important;
}

.kymenmatkat-form-shell .gform_confirmation_message {
  background: var(--kymenmatkat-mint-light);
  border: 1px solid var(--kymenmatkat-mint);
  border-radius: var(--kymenmatkat-radius);
  color: var(--kymenmatkat-ink);
  padding: 24px;
}

.kymenmatkat-form-shell .gform_validation_errors,
.kymenmatkat-form-shell .gfield_validation_message {
  border-radius: var(--kymenmatkat-radius);
}

@media (max-width: 1240px) {
  .kymenmatkat-site-header .wp-block-group.kymenmatkat-site-header__inner {
    min-height: 82px;
  }

  .kymenmatkat-main-navigation {
    order: 4;
  }

  .kymenmatkat-main-navigation .wp-block-navigation__responsive-container.is-menu-open {
    background: #fff;
    color: var(--kymenmatkat-ink);
    padding: 28px 24px;
  }

  .kymenmatkat-main-navigation .wp-block-navigation__responsive-container-content {
    align-items: stretch;
  }

  .kymenmatkat-main-navigation .wp-block-navigation__container {
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .kymenmatkat-main-navigation .wp-block-navigation-item {
    align-items: stretch;
    border-bottom: 1px solid var(--kymenmatkat-line);
    width: 100%;
  }

  .kymenmatkat-main-navigation .wp-block-navigation-item__content {
    padding: 12px 0;
    width: 100%;
  }

  .kymenmatkat-main-navigation .wp-block-navigation__submenu-container {
    border: 0;
    box-shadow: none;
    padding: 0 0 8px 18px;
  }
}

@media (max-width: 1100px) {
  .kymenmatkat-search-panel__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kymenmatkat-search-panel .kymenmatkat-button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 800px) {
  .kymenmatkat-container {
    width: calc(100% - 32px);
  }

  .kymenmatkat-header-logo,
  .kymenmatkat-header-logo img {
    width: 155px;
  }

  .kymenmatkat-language-link {
    display: none;
  }

  .kymenmatkat-header-cta {
    display: none;
  }

  .kymenmatkat-card-grid > .wp-block-post-template,
  .kymenmatkat-card-grid.wp-block-post-template {
    grid-template-columns: 1fr;
  }

  .kymenmatkat-search-panel__fields {
    grid-template-columns: 1fr;
  }

  .kymenmatkat-search-panel .kymenmatkat-button {
    grid-column: auto;
  }

  .kymenmatkat-staff-cta > figure {
    height: 290px;
  }

  .kymenmatkat-section-heading.wp-block-group {
    align-items: start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
