/* OGC v12 refinement: mega-menu spacing, photographic sidebar, and calmer category artwork. */

/* About OGC mega-menu: balanced three-column information grid. */
.ogc-header-v2 .ogc-nav-item--about .ogc-mega-panel {
  grid-template-columns: minmax(285px, 20vw) minmax(0, 1fr) !important;
}
.ogc-header-v2 #ogcAboutMega .ogc-mega-main {
  padding: 27px clamp(24px, 3.4vw, 58px) !important;
}
.ogc-header-v2 #ogcAboutMega .ogc-mega-about-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 11px !important;
}
.ogc-header-v2 #ogcAboutMega .ogc-mega-link {
  min-height: 82px !important;
  align-items: center !important;
  gap: 13px !important;
  padding: 13px 16px !important;
}
.ogc-header-v2 #ogcAboutMega .ogc-mega-link-icon {
  flex: 0 0 40px !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 10px !important;
  font-size: 15px !important;
}
.ogc-header-v2 #ogcAboutMega .ogc-mega-link > span:last-child {
  min-width: 0;
}
.ogc-header-v2 #ogcAboutMega .ogc-mega-link strong {
  font-size: 12px !important;
  line-height: 1.3 !important;
}
.ogc-header-v2 #ogcAboutMega .ogc-mega-link small {
  font-size: 10px !important;
  line-height: 1.4 !important;
}
.ogc-header-v2 #ogcAboutMega .ogc-mega-icon--campus {
  background: #e8f5f0 !important;
  color: #168765 !important;
}
.ogc-header-v2 #ogcAboutMega .ogc-mega-icon--portfolio {
  background: #edf0f8 !important;
  color: #526b9c !important;
}

/* Better inset and breathing room for the Discover OGC action. */
.ogc-header-v2 #ogcAboutMega .ogc-about-mega-aside .ogc-mega-cta {
  min-height: 48px !important;
  min-width: 170px !important;
  padding: 12px 17px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  border-radius: 9px !important;
  box-sizing: border-box !important;
}
.ogc-header-v2 #ogcAboutMega .ogc-about-mega-aside .ogc-mega-cta span {
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}
.ogc-header-v2 #ogcAboutMega .ogc-about-mega-aside .ogc-mega-cta i {
  flex: 0 0 auto !important;
  margin-left: auto !important;
}

/* Courses menu: continue the photographic treatment used by About OGC. */
.ogc-header-v2 #ogcCoursesMega .ogc-courses-mega-aside {
  position: relative !important;
  min-height: 305px !important;
  padding: 30px 28px !important;
  overflow: hidden !important;
  background-color: #102f38 !important;
  background-image:
    linear-gradient(180deg, rgba(7, 31, 38, .83) 0%, rgba(8, 40, 45, .70) 52%, rgba(7, 35, 40, .93) 100%),
    url('../images/ogc-about-geospatial.webp') !important;
  background-size: cover !important;
  background-position: 58% center !important;
  color: #fff !important;
}
.ogc-header-v2 #ogcCoursesMega .ogc-courses-mega-aside > div,
.ogc-header-v2 #ogcCoursesMega .ogc-courses-mega-aside > .ogc-mega-cta {
  position: relative !important;
  z-index: 1 !important;
}
.ogc-header-v2 #ogcCoursesMega .ogc-courses-mega-aside .ogc-mega-cta {
  min-height: 48px !important;
  min-width: 190px !important;
  padding: 12px 17px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 18px !important;
  border-radius: 9px !important;
  box-sizing: border-box !important;
}
.ogc-header-v2 #ogcCoursesMega .ogc-courses-mega-aside .ogc-mega-cta span {
  margin: 0 !important;
  padding: 0 !important;
  text-align: left !important;
}
.ogc-header-v2 #ogcCoursesMega .ogc-courses-mega-aside .ogc-mega-cta i {
  flex: 0 0 auto !important;
  margin-left: auto !important;
}

/* Training-area artwork: retain the same card/image height but reduce the SVG artwork scale. */
.ogc-home .oh-area-image {
  position: relative !important;
  background: #dcebe5 !important;
}
.ogc-home .oh-area-image img {
  position: absolute !important;
  top: 8% !important;
  left: 8% !important;
  width: 84% !important;
  height: 84% !important;
  object-fit: contain !important;
  transform: none !important;
}
.ogc-home .oh-area-card:hover .oh-area-image img {
  transform: scale(1.02) !important;
}

/* Real, non-generated featured-programme imagery. */
.ogc-home .oh-course-image {
  background: #dce9e5 !important;
}
.ogc-home .oh-course-image img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center 46% !important;
  filter: saturate(.92) contrast(1.02) !important;
}
.ogc-home .oh-course-image:after {
  inset: 48% 0 0 !important;
  background: linear-gradient(180deg, rgba(5,26,34,0), rgba(5,26,34,.66)) !important;
}
.ogc-home .oh-course-image span {
  z-index: 2 !important;
}

@media (max-width: 1180px) {
  .ogc-header-v2 #ogcAboutMega .ogc-mega-about-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .ogc-header-v2 #ogcCoursesMega .ogc-courses-mega-aside {
    min-height: 220px !important;
  }
}
@media (max-width: 760px) {
  .ogc-header-v2 #ogcAboutMega .ogc-mega-about-grid {
    grid-template-columns: 1fr !important;
  }
  .ogc-header-v2 #ogcAboutMega .ogc-mega-main {
    padding: 17px 14px 20px !important;
  }
  .ogc-header-v2 #ogcAboutMega .ogc-mega-link {
    min-height: 68px !important;
    padding: 12px 14px !important;
  }
  .ogc-header-v2 #ogcCoursesMega .ogc-courses-mega-aside {
    min-height: 230px !important;
    padding: 24px 20px !important;
  }
  .ogc-home .oh-area-image img {
    top: 9% !important;
    left: 9% !important;
    width: 82% !important;
    height: 82% !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ogc-home .oh-area-image img,
  .ogc-home .oh-course-image img {
    transition: none !important;
  }
}

/* Compact, accessible attribution disclosure for third-party featured images. */
.ogc-home .oh-featured-image-credits {
  margin: 15px 0 0;
  color: #657b78;
  font-size: 10px;
  line-height: 1.55;
}
.ogc-home .oh-featured-image-credits summary {
  width: fit-content;
  cursor: pointer;
  color: #168b70;
  font-weight: 700;
  text-underline-offset: 3px;
}
.ogc-home .oh-featured-image-credits > div {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  padding: 8px 0 0;
}
.ogc-home .oh-featured-image-credits a {
  color: #287c69;
  text-decoration: underline;
  text-underline-offset: 2px;
}
