/* Homepage project carousel and responsive cards. */
#page-home .gallery-wrap { width: calc(100% - 32px); max-width: 1296px; margin: 24px auto 72px; }
#page-home .gallery-wrap:not(.mgd-project-carousel) { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
#page-home .mgd-project-carousel { overflow: hidden; padding: 4px 0 64px; position: relative; }
#page-home .mgd-project-carousel .swiper-wrapper { align-items: stretch; }
#page-home .gallery-wrap .gallery-item { float: none; margin: 0; padding: 0; height: auto; min-width: 0; border: 1px solid #e4e9ef; border-radius: 16px; overflow: hidden; background: var(--bs-body-bg, #fff); }
#page-home .gallery-wrap .img-wrap a { display: block !important; width: 100%; }
#page-home .gallery-wrap .img-wrap img { display: block; width: 100%; aspect-ratio: 8 / 5; object-fit: cover; }
#page-home .gallery-wrap .gallery-detail { padding: 20px; }
#page-home .gallery-wrap .gallery-title { font-size: 19px; line-height: 1.45; font-weight: 600; overflow-wrap: anywhere; }
#page-home .gallery-wrap .gallery-title a { color: var(--bs-body-color, #10284a); }
.mgd-gallery-controls { position: absolute; bottom: 0; left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 18px; }
.mgd-gallery-controls button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid #d8e1ed; border-radius: 50%; background: #fff; color: #10284a; font-size: 28px; cursor: pointer; }
.mgd-gallery-controls button:focus-visible { outline: 3px solid #327ac5; outline-offset: 3px; }
.mgd-gallery-controls .swiper-button-disabled { opacity: .4; cursor: default; }
.mgd-gallery-pagination { width: auto; min-width: 48px; text-align: center; font-size: 15px; }
#page-home .mgd-gallery-heading .pt-110 { display: none; }
/* Keep the initial hero from stacking before scripts initialize. */
.shortcode-simple-slider .swiper:not(.swiper-initialized) .swiper-slide:not(:first-child) { display: none; }
.shortcode-simple-slider .slider-two-swiper-pagination { max-width: calc(100% - 32px); left: 50%; transform: translateX(-50%); }
@media (max-width: 767px) {
 #page-home .gallery-wrap:not(.mgd-project-carousel) { grid-template-columns: 1fr; }
 #page-home .gallery-wrap { margin-bottom: 48px; }
 #page-home .gallery-wrap .gallery-title { font-size: 17px; }
 .section-hero-5 .img-pull .backdrop-filter.p-8.rounded-3 { margin-left: 0; min-height: 0; max-width: 100%; padding: 24px !important; }
 .section-hero-5 .img-pull .ds-3 { font-size: clamp(24px, 6vw, 36px) !important; line-height: 1.2; overflow-wrap: anywhere; }
 .shortcode-simple-slider .swiper-pagination-bullet { width: 8px; height: 8px; margin: 0 3px !important; }
}
@media (min-width: 768px) and (max-width: 1199px) { #page-home .gallery-wrap:not(.mgd-project-carousel) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) {
 .shortcode-simple-slider.section-hero-5 .img-pull .backdrop-filter.p-8.rounded-3 { margin-left: 0; min-height: 0; }
}
@media (max-width: 575px) {
 header .navbar > .container-fluid { flex-wrap: nowrap; }
 header .navbar .main-logo { margin-right: 8px; flex-shrink: 1; }
 header .navbar .main-logo img { width: min(210px, calc(100vw - 180px)); height: auto; }
 .header-top a { font-size: 12px; }
}
