/* =========================
   MEGA MENUS
   ========================= */

.products-mega,
.guide-mega,
.journal-mega {
  position: fixed;
  top: calc(var(--banner-top) + var(--banner-height) + 12px);
  left: var(--banner-visual-side-gap);
  right: var(--banner-visual-side-gap);
  z-index: 99999;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-8px);

  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    visibility 0.22s ease;
}

.products-mega.is-open,
.guide-mega.is-open,
.journal-mega.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.products-mega-inner,
.guide-mega-inner,
.journal-mega-inner {
  width: min(1280px, 100%);
  max-width: 1280px;
  margin-inline: auto;
  padding: 20px;
  overflow: visible;

  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: rgba(18, 22, 28, 0.58);

  box-shadow:
    0 18px 50px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* =========================
   MEGA GRIDS
   ========================= */

.products-mega-grid.services-mega-grid,
.products-mega-grid.services-mega-grid--three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: center;
  gap: 18px;

  max-width: 1280px;
  margin-inline: auto;
}

.guide-mega-inner--info-grid,
.journal-mega-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, calc((100% - 36px) / 3)));
  justify-content: center;
  align-items: stretch;
  gap: 18px;
}

/* =========================
   MEGA CARDS
   ========================= */

.service-mega-card,
.journal-mega-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  align-items: stretch;
  gap: 10px;

  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 14px;
  overflow: hidden;

  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;

  color: #fff;
  font: inherit;
  text-align: left;
  text-decoration: none;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.105) 0%,
      rgba(255, 255, 255, 0.065) 100%
    );

  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 10px 28px rgba(0, 0, 0, 0.18);

  cursor: pointer;
  appearance: none;

  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.service-mega-card:hover,
.service-mega-card:focus-visible,
.guide-mega-panel:hover,
.guide-mega-panel:focus-visible,
.journal-mega-card:hover,
.journal-mega-card:focus-visible {
  border-color: rgba(250, 186, 0, 0.35);
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.135) 0%,
      rgba(255, 255, 255, 0.08) 100%
    );
  transform: translateY(-2px);
}

/* =========================
   MEGA IMAGES
   ========================= */

.service-mega-image-wrap,
.guide-mega-history-image-wrap,
.journal-mega-image-wrap {
  display: block;
  width: 100%;
  max-height: 180px;
  aspect-ratio: 2.1 / 1;
  overflow: hidden;

  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
}

.service-mega-image,
.guide-mega-history-image,
.journal-mega-image {
  display: block;
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

.service-mega-image-contain {
  object-fit: contain;
  padding: 8px;
  background: transparent;
}

.journal-mega-image-wrap {
  display: grid;
  place-items: center;
}

.journal-mega-image {
  width: 72%;
  height: 72%;
  object-fit: contain;
  object-position: center;
}

/* =========================
   MEGA TEXT
   ========================= */

.service-mega-content,
.guide-mega-content,
.journal-mega-content {
  position: relative;
  z-index: 1;

  display: block;
  width: 100%;
  min-width: 0;

  margin: 0;
  padding: 0;

  text-align: left;
}

.service-mega-content h3,
.guide-mega-content h3,
.journal-mega-content h3 {
  margin: 0 0 8px;

  color: #fff;
  font-family: var(--font-vollkorn);
  font-size: clamp(1rem, 1.2vw, 1.35rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.02em;
  text-transform: none;

  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.service-mega-content p,
.guide-mega-content p,
.journal-mega-content p {
  margin: 0;

  color: rgba(255, 255, 255, 0.94);
  font-family: var(--font-cormorant);
  font-size: clamp(0.9rem, 1vw, 1.05rem);
  line-height: 1.45;

  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.42);
}

.guide-mega-kicker {
  margin: 0 0 5px;

  color: rgba(250, 186, 0, 0.86);
  font-family: var(--font-inter);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* =========================
   PALVELUT MEGA
   ========================= */

.service-mega-card-wip .service-mega-image-wrap {
  position: relative;
}

.service-mega-card-wip .service-mega-image-wrap::after {
  content: "Work in progress";

  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;

  padding: 8px 18px;
  border: 2px solid rgba(250, 186, 0, 0.92);
  border-radius: 999px;

  color: var(--yellow);
  font-family: var(--font-inter);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;

  background: rgba(0, 0, 0, 0.72);

  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(250, 186, 0, 0.18);

  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-18deg);
}

.service-mega-card-wip .service-mega-image {
  filter: brightness(0.62) saturate(0.75);
}

.products-mega .services-mega-grid > :first-child {
  grid-column: span 1;
}

.products-mega .services-mega-grid > :first-child {
  grid-column: span 1;
}

.products-mega .services-mega-grid > :first-child {
  grid-column: span 1;
}

/* =========================
   INFO MEGA
   ========================= */

@media (min-width: 901px) {
  .guide-mega .guide-mega-inner,
  .guide-mega .guide-mega-inner--info-grid {
    height: auto;
    min-height: 0;
    align-items: stretch;
  }

  .guide-mega .guide-mega-panel {
    height: 100%;
    min-height: 245px;
    max-height: none;
    overflow: hidden;
  }
}

.guide-mega .guide-card {
  display: grid;
  grid-template-columns: clamp(108px, 36%, 150px) minmax(0, 1fr);
  grid-template-rows: auto auto auto auto;
  column-gap: clamp(10px, 2vw, 18px);
  row-gap: 0;

  width: 100%;
  height: 100%;
  min-height: 0;

  padding: 10px 12px;
  overflow: hidden;

  background: transparent;
}

.guide-mega .guide-card-media {
  position: relative;
  inset: auto;

  grid-column: 1;
  grid-row: 1;

  display: flex;
  align-items: flex-start;
  justify-content: flex-start;

  width: 100%;
  height: 108px;

  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.guide-mega .guide-card-photo,
.guide-mega .guide-card-media img {
  display: block;

  width: auto;
  height: 112px;
  max-width: 100%;

  object-fit: contain;
  object-position: left top;

  margin: 0;
  padding: 0;

  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: none;

  transform: translateY(-5px);
}

.guide-mega .guide-card-text {
  grid-column: 2;
  grid-row: 1;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;

  min-width: 0;
  width: 100%;
  max-width: none;

  padding: 0;
  margin: 0;
  overflow: visible;
}

.guide-mega .guide-card-kicker {
  margin: 0 0 3px;

  color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-cinzel, "Cinzel", serif);
  font-size: clamp(8px, 0.72vw, 10px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.guide-mega .guide-card-name {
  margin: 0 0 7px;

  color: rgba(255, 255, 255, 0.96);
  font-family: var(--font-cinzel, "Cinzel", serif);
  font-size: clamp(13px, 1.45vw, 20px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: visible;
  text-overflow: unset;
}

.guide-mega .guide-card-contact {
  display: grid;
  gap: 0;

  margin: 0;
  padding: 0;
  list-style: none;

  color: rgba(255, 255, 255, 0.72);
  font-family: var(--font-inter, "Inter", sans-serif);
  font-size: clamp(9px, 0.85vw, 11px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0;
}

.guide-mega .guide-card-contact li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.guide-mega .guide-card-contact a {
  color: inherit;
  text-decoration: none;
}

.guide-mega .guide-card-contact a:hover,
.guide-mega .guide-card-contact a:focus-visible {
  color: var(--yellow);
}

.guide-mega .guide-card-degree,
.guide-mega .guide-card-desc {
  grid-column: 1 / -1;
}

.guide-mega .guide-card > .guide-card-degree:first-of-type {
  margin-top: 2px;
}

.guide-mega .guide-card-degree {
  margin: 0;
  padding: 0;

  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-cormorant, "Cormorant Garamond", serif);
  font-size: clamp(11px, 0.95vw, 13px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;

  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.guide-mega .guide-card-degree + .guide-card-degree {
  margin-top: 1px;
}

.guide-mega .guide-card-degree--secondary {
  color: rgba(255, 255, 255, 0.66);
}

.guide-mega .guide-card-desc {
  margin-top: 2px;
  padding: 0;

  color: rgba(255, 255, 255, 0.88);
  font-family: var(--font-cormorant, "Cormorant Garamond", serif);
  font-size: clamp(11px, 0.95vw, 13px);
  font-weight: 500;
  line-height: 1;

  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}



@media (max-width: 1360px) {
  .products-mega,
  .guide-mega,
  .journal-mega {
    left: 12px;
    right: 12px;
  }

  .products-mega-inner,
  .guide-mega-inner,
  .journal-mega-inner {
    padding: 12px;
  }

  .products-mega-grid.services-mega-grid,
  .products-mega-grid.services-mega-grid--three,
  .guide-mega-inner--info-grid,
  .journal-mega-inner {
    gap: 10px;
  }

  .guide-mega-inner--info-grid,
  .journal-mega-inner {
    grid-template-columns: repeat(2, minmax(0, calc((100% - 20px) / 3)));
  }

  .service-mega-card,
  .guide-mega-panel,
  .journal-mega-card {
    padding: 10px;
  }

  .service-mega-image-wrap,
  .guide-mega-history-image-wrap,
  .journal-mega-image-wrap {
    max-height: 160px;
    aspect-ratio: 2.1 / 1;
  }

  .service-mega-content h3,
  .guide-mega-content h3,
  .journal-mega-content h3 {
    font-size: 0.9rem;
  }

  .service-mega-content p,
  .guide-mega-content p,
  .journal-mega-content p {
    font-size: 0.88rem;
  }

  .guide-mega .guide-mega-panel,
  .guide-mega .guide-mega-panel--history {
    min-height: 245px;
  }
}

@media (min-width: 1200px) and (max-width: 1400px) and (max-height: 650px) {
  .products-mega-grid.services-mega-grid,
  .products-mega-grid.services-mega-grid--three,
  .guide-mega-inner--info-grid,
  .journal-mega-inner {
    gap: 12px;
  }

  .guide-mega-inner--info-grid,
  .journal-mega-inner {
    grid-template-columns: repeat(2, minmax(0, calc((100% - 24px) / 3)));
  }

  .service-mega-image-wrap,
  .guide-mega-history-image-wrap,
  .journal-mega-image-wrap {
    max-height: 118px;
    aspect-ratio: 2.2 / 1;
  }

  .service-mega-content h3,
  .guide-mega-content h3,
  .journal-mega-content h3 {
    margin-bottom: 5px;
    font-size: 1rem;
    line-height: 1.05;
  }

  .service-mega-content p,
  .guide-mega-content p,
  .journal-mega-content p {
    font-size: 0.86rem;
    line-height: 1.25;
  }

  .guide-mega .guide-mega-panel,
  .guide-mega .guide-mega-panel--history {
    min-height: 226px;
  }
}

@media (max-width: 900px) {
  .products-mega,
  .guide-mega,
  .journal-mega {
    display: none;
  }
}
/* =========================================================
   INFO-MEGA: LOPULLINEN SIISTI VERSIO
   ========================================================= */

@media (min-width: 901px) {
  .guide-mega {
    top: calc(var(--banner-top) + var(--banner-height) + 12px);
    left: 12px;
    right: 12px;
  }

  .guide-mega .guide-mega-inner--info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 420px));
    justify-content: center;
    align-items: stretch;
    gap: 18px;

    width: min(860px, 100%);
    max-width: 860px;
    margin-inline: auto;
    padding: 12px;

    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    background: rgba(18, 22, 28, 0.72);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .guide-mega .guide-mega-panel {
    position: relative;
    display: block;

    width: 100%;
    height: 225px;
    min-height: 225px;
    max-height: 225px;

    padding: 0;
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.075);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.1),
      0 10px 28px rgba(0, 0, 0, 0.18);

    color: #fff;
    text-decoration: none;
  }

  .guide-mega .guide-card {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    column-gap: 16px;
    row-gap: 8px;

    width: 100%;
    height: 100%;
    padding: 18px 18px 16px;

    overflow: hidden;
    background: transparent;
  }

  .guide-mega .guide-card-media {
    grid-column: 1;
    grid-row: 1;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    width: 118px;
    height: 128px;
    overflow: visible;
  }

  .guide-mega .guide-card-photo {
    display: block;
    width: auto;
    height: 124px;
    max-width: 118px;

    object-fit: contain;
    object-position: top center;

    border: 0;
    background: transparent;
    box-shadow: none;

    transform: translateY(-4px);
  }

  .guide-mega .guide-card-text {
    grid-column: 2;
    grid-row: 1;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;

    min-width: 0;
    overflow: hidden;
  }

  .guide-mega .guide-card-name {
    margin: 0 0 12px;

    color: rgba(255, 255, 255, 0.96);
    font-family: var(--font-cinzel, "Cinzel", serif);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.05em;
    text-transform: uppercase;

    white-space: nowrap;
  }

  .guide-mega .guide-card-contact {
    display: grid;
    gap: 6px;

    margin: 0;
    padding: 0;
    list-style: none;
  }

  .guide-mega .guide-card-contact li {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr);
    align-items: center;
    gap: 8px;

    color: rgba(255, 255, 255, 0.78);
    font-family: var(--font-inter, "Inter", sans-serif);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
  }

  .guide-mega .guide-card-contact-icon {
    color: var(--yellow);
    font-size: 11px;
    line-height: 1;
  }

  .guide-mega .guide-card-contact a,
  .guide-mega .guide-card-contact span:not(.guide-card-contact-icon) {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .guide-mega .guide-card-degree {
    grid-column: 1 / -1;
    grid-row: 2;

    margin: 0;

    color: rgba(255, 255, 255, 0.78);
    font-family: var(--font-cormorant, "Cormorant Garamond", serif);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.1;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .guide-mega .guide-mega-panel--history {
    height: 225px;
    min-height: 225px;
    max-height: 225px;
  }

  .guide-mega .guide-mega-panel--history .guide-mega-history-image-wrap {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;

    border-radius: inherit;
  }

  .guide-mega .guide-mega-panel--history .guide-mega-history-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .guide-mega .guide-mega-panel--history .guide-mega-content {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 14px;
    z-index: 2;
  }
}