/* TABLET+ */

@media screen and (min-width: 29.99em) {
  .header-shell,
  .footer-shell,
  .site-container {
    padding-right: 2rem;
    padding-left: 2rem;
  }
}

/* SECTION CARD GRID */

@media screen and (min-width: 40em) {
  .section-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (min-width: 70em) {
  .section-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* BLOG LIST */

@media screen and (min-width: 60em) {
  .blog-post-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blog-post-card-featured-link {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 1.5rem;
    align-items: center;
  }

  .blog-post-card-featured-image-wrap {
    margin-bottom: 0;
  }
}

@media screen and (max-width: 59.99em) {
  .blog-post-list {
    grid-template-columns: 1fr;
  }

  .blog-post-card-featured-link {
    display: flex;
    flex-direction: column;
  }

  .blog-post-card-featured-image-wrap {
    margin-bottom: 0.85rem;
  }
  
  .home-search {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-search-form {
    width: 100%;
  }
}

/* EVENT LIST GRID */

@media screen and (min-width: 60em) {
  .events-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Desktop homepage card image matches right-side content height */

@media screen and (min-width: 70em) {
  .event-card-image-link {
    position: relative;
    align-self: stretch;
    height: 100%;
    min-height: 0;
  }

  .event-card-image-link .event-card-image {
    position: absolute;
    inset: 0;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
  }
}

/* MOBILE */

.menu-toggle,
.menu-close {
  display: none;
}

@media screen and (max-width: 59.99em) {
  .post-content p {
    text-align: left;
  }

  .nav-shell,
  .header-shell {
    width: 100%;
  }

  .site-shell {
    padding-right: 2rem;
    padding-left: 2rem;
  }

  .navbar {
    position: relative;
    display: block;
    width: 100%;
    min-height: 64px;
    padding-top: 0;
    padding-bottom: 0;
  }

  .menu-toggle {
    position: absolute;
    top: 50%;
    left: 0;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    transform: translateY(-50%);
  }

  .menu-toggle:hover,
  .menu-toggle:focus-visible {
    background: var(--color-primary);
  }

  .menu-toggle-bar {
    display: block;
    width: 1.5rem;
    height: 2px;
    margin: 0 auto;
    background: var(--color-primary);
  }

  .menu-toggle:hover .menu-toggle-bar,
  .menu-toggle:focus-visible .menu-toggle-bar {
    background: var(--color-on-bright);
  }

  .site-logo {
    position: absolute;
    top: 50%;
    left: calc(2.25rem + 1rem);
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transform: translateY(-50%);
  }

  .site-logo-img {
    display: block;
    max-width: 150px;
  }

  .nav-cta-desktop {
    position: absolute;
    top: 50%;
    right: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    white-space: nowrap;
    transform: translateY(-50%);
  }

  .nav-cta-mobile {
    display: none;
  }

  .nav-menu {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: min(22rem, 85vw);
    min-height: 100vh;
    margin-top: 0;
    padding: 4rem 2rem 2rem;
    border-left: 1px solid color-mix(
      in srgb,
      var(--color-headertext) 18%,
      transparent
    );
    background: var(--color-header);
    transform: translateX(100%);
    transition: transform 180ms ease;
  }

  .nav-menu,
  .nav-menu * {
    color: var(--color-headertext);
  }

  .nav-menu.is-open {
    transform: translateX(0);
  }

  .menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--color-headertext);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
  }

  .menu-close:hover,
  .menu-close:focus-visible {
    background: var(--color-primary);
    color: var(--color-on-bright);
  }

  .menu-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
  }

  .menu-item {
    width: 100%;
    border-bottom: 1px solid color-mix(
      in srgb,
      var(--color-headertext) 16%,
      transparent
    );
    text-align: left;
  }

  .menu-link {
    display: block;
    width: 100%;
    padding: 1rem 0;
    color: var(--color-headertext);
  }

  .menu-link:hover,
  .menu-link:focus-visible {
    color: var(--color-primary);
  }

  .submenu-list {
    position: static;
    display: block;
    min-width: 0;
    padding: 0 0 1rem 1rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    text-align: left;
    transform: none;
  }

  .submenu-link {
    display: block;
    padding: 0.4rem 0;
    color: var(--color-headertext);
  }

  .submenu-link:hover,
  .submenu-link:focus-visible {
    color: var(--color-primary);
  }

  .home-slider {
    border-radius: var(--radius-sm);
    margin-top:-3rem !important;
  }

  .featured-posts-list {
    display: flex;
    flex-direction: column;
  }

  /* EVENT LIST PAGE MOBILE */

  .events-list-grid {
    grid-template-columns: 1fr;
  }

  .event-list-card {
    width: 100%;
  }

  .event-list-card-title {
    align-items: flex-start;
    font-size: 1.2rem;
  }

  .event-list-card-layout {
    gap: 1rem;
  }

  .event-list-card-image {
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  .event-list-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .event-list-button {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* PAGE BANNER MOBILE */

@media screen and (max-width: 59.99em) {
  .page-banner {
    min-height: 260px;
  }

  .page-banner::before {
    background: rgba(255, 255, 255, 0.7);
  }

  .page-banner-content {
    width: 100%;
    padding: 1.75rem;
    border-left: 0;
    background-color: transparent;
    box-shadow: none;
  }
}

/* EVENT CARD STACKING */

@media screen and (max-width: 69.99em) {
  .home-next-event-layout,
  .event-card-layout {
    display: flex;
    flex-direction: column;
  }

  .home-next-event-info,
  .home-next-event-actions,
  .event-card-image-link,
  .event-card-info,
  .event-actions {
    width: 100%;
  }

  .event-card-image-link {
    position: static;
    display: block;
    align-self: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
  }

  .event-card-image-link .event-card-image,
  .event-card-image {
    position: static;
    inset: auto;
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 16 / 9;
    object-fit: cover;
  }

  .event-card .event-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    min-width: 0;
  }

  .event-card .event-actions > .event_button {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    text-align: center;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media screen and (max-width: 29.99em) {
  .header-shell,
  .footer-shell,
  .site-shell,
  .site-container {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  .site-header {
    margin-bottom: 2rem;
  }

  .recent-post-link {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .recent-post-date {
    justify-self: start;
    white-space: normal;
  }
}