/* by Creasant */
@media (max-width: 768px) {
  /* Section item spacing */
  .mtpc-section-item {
    margin-bottom: 80px;
  }
  .mtpc-section-item:last-child {
    margin-bottom: 160px;
  }

  /* Decorative bg pattern-1 — reposition + shrink for mobile */
  .region-content::before {
    top: 460px;
    right: -8px;
    width: 60px;
  }

  /* Card grid */
  .card-grid .mtpc-2col-item .field__items::after {
    height: 60%;
  }
  .card-grid .mtpc-2col-item .field__items > .field__item:last-child {
    padding: 45px 35px;
  }

  /* Top banner */
  .top-banner.mtpc-1col-section {
    margin-bottom: -30px;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0% 100%);
  }

  .top-banner .mtpc-1col-section-wrapper {
    padding: 20px 0 50px;
  }

  .top-banner > img {
    width: calc(100% + 30px);
    height: 300px;
    margin: 0 -15px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 85%);
  }

  /* Companies — tighter spacing at mobile */
  .companies-grid .view-content {
    gap: 15px;
  }
  .companies-filter {
    margin-bottom: 30px;
  }

  /* Logo grid — 2-up at mobile */
  .logo-grid .mtpc-block-image-grid-item-wrapper.mtpc-image-grid-layout-small > .mtpc-image-grid-block-item {
    width: calc(50% - 20px);
    margin: 10px;
    padding: 40px;
  }

  /* News & Events detail — mobile typography + padding */
  .node--type-news-event.node--view-mode-full .node__content {
    padding: 0 15px;
    margin-bottom: 160px;
  }
  .node--type-news-event.node--view-mode-full .field--name-field-date {
    font-size: 21px;
    line-height: 36px;
  }
  .node--type-news-event.node--view-mode-full .ne-detail__title {
    font-size: 32px;
    line-height: 42px;
    color: #003366;
  }
  .node--type-news-event.node--view-mode-full .field--name-field-banner img {
    aspect-ratio: 521 / 152;
  }
  .node--type-news-event.node--view-mode-full .field--name-body p {
    font-size: 24px;
    line-height: 38px;
    letter-spacing: 0.72px;
  }
  .node--type-news-event.node--view-mode-full .ne-detail__sidebar {
    padding: 20px 24px;
  }
  .node--type-news-event.node--view-mode-full .ne-detail__tag {
    font-size: 18px;
    line-height: 26px;
    letter-spacing: 0;
  }
  .node--type-news-event.node--view-mode-full .ne-detail__back {
    padding: 10px 17px;
  }

  /* News & Events — filter: stack vertically, full width */
  .news-events-grid .view-filters {
    margin-bottom: 20px;
  }
  .news-events-grid .views-exposed-form .form--inline {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  .news-events-grid .views-exposed-form #edit-field-date-value,
  .news-events-grid .views-exposed-form #edit-field-categories-target-id,
  .news-events-grid .views-exposed-form .form-select {
    width: 100%;
    max-width: 362px;
    height: 63px;
    font-size: 24px;
    line-height: 38px;
    letter-spacing: 0.72px;
  }

  /* News & Events — 1-col grid, rectangle small + square big */
  .news-events-grid .view-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  /* Reset desktop col placements; row height comes from natural overlay
     content (5-line clamped title) instead of a fixed aspect ratio. */
  .news-events-grid .view-content > .views-row {
    grid-column: span 2;
    grid-row: auto;
    aspect-ratio: unset;
  }
  .news-events-grid .view-content > .views-row .ne-card__link {
    position: static;
    display: flex;
    height: 100%;
  }
  /* Small card layout: image left 48%; overlay covers full card with
     left→right gradient so the dark block fades into the image edge. */
  .news-events-grid .view-content > .views-row .ne-card {
    background: transparent;
  }
  .news-events-grid .view-content > .views-row .ne-card__img {
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    bottom: 0;
    width: calc(250 / 520 * 100%);
    height: auto;
  }
  .news-events-grid .view-content > .views-row .ne-card__overlay {
    box-sizing: border-box;
    min-height: 250px;
    position: static;
    padding: 20px 24px 20px calc(250 / 520 * 100%);
    display: flex;
    align-items: flex-start;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 1) 48%, rgba(0, 0, 0, 1) 100%);
  }
  .news-events-grid .view-content > .views-row .ne-card__overlay::before {
    display: none;
  }
  .news-events-grid .view-content > .views-row .ne-card__title {
    font-size: 24px;
    line-height: 38px;
    letter-spacing: 0.72px;
  }
  /* Big card overrides: square + full image + bottom-anchored title */
  .news-events-grid .view-content > .views-row:is(:nth-child(18n + 3), :nth-child(18n + 4), :nth-child(18n + 7), :nth-child(18n + 16), :nth-child(18n + 17), :nth-child(18n + 18)) {
    aspect-ratio: 1 / 1;
  }
  .news-events-grid .view-content > .views-row:is(:nth-child(18n + 3), :nth-child(18n + 4), :nth-child(18n + 7), :nth-child(18n + 16), :nth-child(18n + 17), :nth-child(18n + 18)) .ne-card__img {
    inset: 0;
    width: 100%;
    height: 100%;
  }
  .news-events-grid .view-content > .views-row:is(:nth-child(18n + 3), :nth-child(18n + 4), :nth-child(18n + 7), :nth-child(18n + 16), :nth-child(18n + 17), :nth-child(18n + 18)) .ne-card__overlay {
    position: relative;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 30px 30px 26px;
    min-height: unset;
    margin-top: auto;
    background: transparent;
  }
  .news-events-grid .view-content > .views-row:is(:nth-child(18n + 3), :nth-child(18n + 4), :nth-child(18n + 7), :nth-child(18n + 16), :nth-child(18n + 17), :nth-child(18n + 18)) .ne-card__overlay::before {
    content: "";
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(100% + 200px);
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 1) 100%);
    z-index: -1;
  }

  /* News & Events — Home featured block. 1-col, small-card layout
     (image left, overlay right, horizontal gradient). Mirrors grid mobile small. */
  .home-news-events-section.mtpc-1col-section {
    padding-bottom: 150px;
    clip-path: polygon(0 0, 100% 0, 100% 95%, 0% 100%);
  }
  .news-events-home .view-content {
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
  }
  .news-events-home .view-content > .views-row {
    aspect-ratio: unset;
  }
  .news-events-home .view-content > .views-row .ne-card__link {
    position: static;
    display: flex;
    height: 100%;
  }
  .news-events-home .view-content > .views-row .ne-card {
    background: transparent;
  }
  .news-events-home .view-content > .views-row .ne-card__img {
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    bottom: 0;
    width: calc(250 / 520 * 100%);
    height: auto;
  }
  .news-events-home .view-content > .views-row .ne-card__overlay {
    box-sizing: border-box;
    min-height: 250px;
    position: static;
    padding: 20px 24px 20px calc(250 / 520 * 100%);
    display: flex;
    align-items: flex-start;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 1) 48%, rgba(0, 0, 0, 1) 100%);
  }
  .news-events-home .view-content > .views-row .ne-card__overlay::before {
    display: none;
  }
  .news-events-home .view-content > .views-row .ne-card__title {
    font-size: 24px;
    line-height: 38px;
    letter-spacing: 0.72px;
  }

  /* Image wrapper — stack images on mobile */
  .img-wrapper {
    flex-direction: column;
    gap: 20px;
  }

  /* Home Companies — smaller cards on mobile per Figma */
  .home-companies-swiper {
    margin-top: 30px;
    margin-bottom: 60px;
  }

  .home-company-card {
    width: 226px;
    height: 150px;
    padding: 18px;
  }
}

@media (max-width: 480px) {
  /* Body text */
  body {
    font-size: 18px;
    line-height: 26px;
  }

  /* Decorative bg pattern-1 — reposition for small mobile */
  .region-content::before {
    top: 440px;
    right: -30px;
  }

  /* Heading tags */
  h1 {
    font-size: 42px;
  }
  h2 {
    font-size: 32px;
  }
  h3 {
    font-size: 26px;
  }
  h4 {
    font-size: 22px;
  }
  h5 {
    font-size: 20px;
  }
  h6 {
    font-size: 18px;
  }

  /* Utility typography classes */
  .h1 {
    font-size: 42px;
  }
  .h2 {
    font-size: 32px;
  }
  .h3 {
    font-size: 26px;
  }
  .h4 {
    font-size: 22px;
  }
  .h5 {
    font-size: 20px;
  }
  .h6 {
    font-size: 18px;
  }
  .h7 {
    font-size: 14px;
  }
  .h8 {
    font-size: 12px;
  }

  .team-member-value {
    font-size: 21px;
  }

  /* Logo grid — tighter padding at small mobile */
  .logo-grid .mtpc-block-image-grid-item-wrapper.mtpc-image-grid-layout-small > .mtpc-image-grid-block-item {
    padding: 20px;
  }

  /* Header — compact logos + icons at small mobile */
  header .mtpc_header .header {
    padding-right: 10px;
  }
  header .mtpc_header .header .wrapper .logos {
    padding-left: 4px;
  }
  header .mtpc_header .header .wrapper .logos .logos_left .logo_one img {
    height: 28px;
  }
  header .mtpc_header .header .wrapper .logos .logos_left .logo_one {
    padding-right: 8px;
  }
  header .mtpc_header .header .wrapper .logos .logos_left .logo_one.show_vertical_line {
    margin-right: 8px;
  }
  header .mtpc_header .header .wrapper .logos .logos_left .logo_two {
    min-width: unset;
  }
  header .mtpc_header .header .wrapper .logos .logos_left .logo_two.text_logo a {
    font-size: 10px;
  }
  .mtpc_lang_btn {
    height: 24px;
  }
  .mtpc_lang_btn .lang_toggle svg {
    width: 24px;
    height: 24px;
  }
  header .mtpc_header .header .wrapper .logos .search_icon {
    margin-left: 16px;
  }
  .mtpc_header .search_icon a i.fa-search {
    width: 24px;
    height: 24px;
  }
  header .mtpc_header .header .wrapper .logos .logos_right .responsive-menu-toggle {
    margin-left: 16px;
  }
  header .config_pages--type--header-block .mobile_menu_wrapper .mobile_navigation {
    right: 10px;
  }

  /* Companies — tighter card on small mobile */
  .company-card__overlay {
    padding: 16px;
  }
  .company-card__title {
    font-size: 18px;
    line-height: 24px;
  }

  /* News & Events detail — smaller body type on small mobile */
  .node--type-news-event.node--view-mode-full .field--name-body p {
    font-size: 18px;
    line-height: 28px;
  }

  /* Number-item — smaller body copy on small mobile */
  .number-item__content p {
    font-size: 18px;
    line-height: 28px;
  }
}
