/* Phone-width fixes for the temporary static site (applied at 767px and below). */
@media (max-width: 767.98px) {

  /* ---- Swipe rows replace the mouse-wheel carousels (see mobile-fixes.js) */
  html, body { overflow-x: clip; }
  .iu-swipe .swiper { overflow: hidden; width: 100%; max-width: 100vw; }
  .iu-swipe .swiper-wrapper {
    display: flex; width: 100%; box-sizing: border-box; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    transform: none !important; padding: 0 16px 14px; scroll-padding: 0 16px;
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.45) transparent;
  }
  .iu-swipe .swiper-slide { flex: 0 0 86%; width: 86% !important; max-width: 360px; scroll-snap-align: start; margin: 0 !important; height: auto; }
  .iu-swipe .swiper-button-next, .iu-swipe .swiper-button-prev, .iu-swipe .swiper-pagination, .iu-swipe .swiper-scrollbar { display: none !important; }
  .iu-swipe-hint {
    display: flex; align-items: center; gap: 8px; margin: 0 16px 10px; font-size: 13px; font-weight: 500; opacity: .8;
  }
  .iu-swipe-hint::after { content: "\2192"; font-size: 16px; }

  /* Capital propositions: image on top, text card below it */
  .mousescroll-carousel.iu-swipe .swiper-slide > img { height: 220px !important; min-height: 0 !important; width: 100%; object-fit: cover; }
  .mousescroll-carousel.iu-swipe .carousel-content {
    position: static !important; max-width: none !important; height: calc(100% - 220px); padding: 18px !important;
  }
  .mousescroll-carousel.iu-swipe .carousel-content h3 { font-size: 20px; }
  .mousescroll-carousel.iu-swipe .carousel-content p { font-size: 14px; }
  .mousescroll-carousel .iu-swipe-hint { color: #fff; }

  /* Sector carousel ("A region of world-leading research and innovation") */
  .dp-carousel.iu-swipe .swiper-wrapper { scrollbar-color: rgba(0,27,81,.4) transparent; }
  .dp-carousel.iu-swipe .post-thumb img { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; }
  .dp-carousel .iu-swipe-hint { color: #001B51; }

  /* ---- Midlands Mindforge banner: keep the logo in proportion */
  .call-to-action img[src*="mind-forge"] { max-width: 210px; width: 70%; height: auto; }
  .call-to-action h2 { font-size: 24px; }
  .call-to-action:has(img[src*="mind-forge"]) { height: auto !important; min-height: 0 !important; }

  /* ---- Prospectus downloads: compact rows, cover on the left */
  .services-block .row > [class*="col-"] { margin-bottom: 20px !important; }
  .services-block .service-block {
    display: grid; grid-template-columns: 38% minmax(0, 1fr); column-gap: 14px; align-items: start;
  }
  .services-block .service-block .image-wrap { grid-row: 1 / span 2; }
  .services-block .service-block .image-wrap img { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; }
  .services-block .service-block .image-wrap .service-text { display: none !important; }
  .services-block .service-text-below { margin-bottom: 6px !important; }
  .services-block .service-text-below p { font-size: 13px; line-height: 1.45; margin: 0; }
  .services-block .service-block h3 { font-size: 16px; margin: 0; }
  .services-block .service-block h3 a::after { content: " (PDF)"; font-weight: 400; }

  /* ---- Get in touch: even square photos and aligned names */
  .teams .team-block .image-wrap { aspect-ratio: 1 / 1; overflow: hidden; margin-bottom: 12px !important; }
  .teams .team-block .image-wrap img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
  .teams .team-content { font-size: 13px; line-height: 1.4; }
  .teams .team-content h3 { font-size: 14px; margin-bottom: 4px !important; }
  .teams .team-social:empty, .teams .team-social a[href=""] { display: none; }

  /* ---- Contact links under "Get in touch": stack instead of overlapping */
  .list-with-icon:has(a[href^="mailto:"]) { height: auto !important; min-height: 0 !important; padding-bottom: 32px !important; }
  .list-with-icon:has(a[href^="mailto:"]) .row > .col-6 { flex: 0 0 100%; max-width: 100%; }
  .list-with-icon:has(a[href^="mailto:"]) .icon-list h4 { font-size: 15px; overflow-wrap: anywhere; }
  .list-with-icon:has(a[href^="mailto:"]) .icon-list .icon-wrap { flex: none; }
}

/* SVG icons were exported by WordPress with width="1" height="1"; give them a real size (all widths). */
.icon-block .icon-content .image-wrap img[src$=".svg"] { width: 72px; height: 72px; object-fit: contain; }
.icon-block .icon img[src$=".svg"] { width: 120px; max-width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
@media (max-width: 767.98px) {
  .icon-block .icon-content .image-wrap img[src$=".svg"] { width: 56px; height: 56px; }
  .icon-block .icon img[src$=".svg"] { width: 80px; margin-bottom: 8px; }
}

/* Slides without a photo (see mobile-fixes.js) */
.swiper-slide.iu-noimg {
  background:
    radial-gradient(circle at 78% 30%, rgba(98, 211, 232, 0.22) 0, rgba(98, 211, 232, 0) 42%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 22px),
    linear-gradient(135deg, #0b2d6e 0%, #001B51 60%, #00113a 100%);
  min-height: 420px;
}
.swiper-slide.iu-noimg > img { visibility: hidden; }
[style*="background-image"].iu-nobg {
  background-image:
    radial-gradient(circle at 22% 40%, rgba(98, 211, 232, 0.2) 0, rgba(98, 211, 232, 0) 45%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.035) 0 2px, transparent 2px 22px),
    linear-gradient(135deg, #0b2d6e 0%, #001B51 60%, #00113a 100%) !important;
}

/* Images that were placed inside a button link (e.g. the prospectus cover) should not get the button outline */
a.btn:has(> img) { border: 0 !important; padding: 0 !important; border-radius: 0 !important; background: none !important; }

/* ---- News, missions and conference cards: one size for every card */
.iu-card .iu-card-img { aspect-ratio: 16 / 10; overflow: hidden; background: #e7ebf2; margin-bottom: 14px !important; }
.iu-card .iu-card-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.iu-card .iu-card-date { margin-bottom: 6px; color: #4a5670; }
.iu-card .iu-card-title { font-size: 17px; line-height: 1.3; font-weight: 700; }
.iu-card .iu-card-excerpt { font-size: 14.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.iu-empty-missions p { font-size: 17px; max-width: 760px; }
.iu-empty-missions a { color: inherit; text-decoration: underline; }
@media (max-width: 767.98px) { .iu-card .iu-card-title { font-size: 16px; } }

/* GREAT logo (vector) in the header: fixed proportions, never stretched */
.site-header .site-branding img.brand-img { width: 199px; height: auto; aspect-ratio: 801 / 330; display: block; }
@media (max-width: 767.98px) { .site-header .site-branding img.brand-img { width: 140px; max-width: 140px; } }

/* Hero video sound toggle */
.hero-video .iu-sound {
  position: absolute; left: 24px; bottom: auto; z-index: 5;
  /* keep it in the first screen even when the video is taller than the window */
  top: min(calc(100% - 66px), calc(100vh - var(--iu-hero-top, 150px) - 70px));
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border: 1px solid rgba(255,255,255,.35); border-radius: 0;
  background: rgba(0,27,81,.78); color: #fff; font: 600 14px/1 "Euclid Flex", arial, sans-serif; cursor: pointer;
  transition: background .2s, box-shadow .2s;
}
.hero-video .iu-sound:hover, .hero-video .iu-sound:focus-visible { background: #001B51; box-shadow: 0 0 0 2px #62d3e8; outline: none; }
.hero-video .iu-sound svg { width: 20px; height: 20px; }
@media (max-width: 767.98px) {
  .hero-video .iu-sound { left: 12px; top: auto; bottom: 12px; padding: 8px; }
  .hero-video .iu-sound span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
}

/* Missions menu icons are line drawings: same light-blue hover as the theme's filled icons */
.site-header .navbar-nav .mega-menu .iu-line-ico path,
.site-header .navbar-nav .mega-menu .iu-line-ico rect,
.site-header .navbar-nav .mega-menu .iu-line-ico circle { fill: none !important; transition: stroke .15s; }
.site-header .navbar-nav .mega-menu > .dropdown-menu > .menu-item > a:hover .iu-line-ico,
.site-header .navbar-nav .mega-menu > .dropdown-menu > .menu-item > a:focus .iu-line-ico { filter: none; }
.site-header .navbar-nav .mega-menu > .dropdown-menu > .menu-item > a:hover .iu-line-ico *,
.site-header .navbar-nav .mega-menu > .dropdown-menu > .menu-item > a:focus .iu-line-ico * { stroke: #59cbe8; }
