/* MDM overrides: responsive header brand + gallery */
.mdm-brand-col { flex: 0 0 auto; width: auto; max-width: 60%; }
.mdm-brand { display: inline-block; line-height: 0; padding: 8px 0; }
.mdm-brand img {
  display: block; height: auto;
  width: clamp(150px, 17vw, 240px);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .45));
}
@media (max-width: 575.98px) {
  .mdm-brand img { width: clamp(128px, 42vw, 170px); }
  .site-navbar .service-btn, .site-navbar .btn-outline-light { padding: .35rem .7rem; font-size: .85rem; }
}

/* Portfolio photo grids: wide photo + pair, consistent crops (old grids and Our Latest Projects) */
#recent-projects .row > .col img, #gallery-1 .row > .col img, #gallery-2 .row > .col img {
  width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 60%; display: block;
}
#recent-projects .row > .col:only-child img, #gallery-1 .row > .col:only-child img, #gallery-2 .row > .col:only-child img {
  aspect-ratio: 4 / 3;
}
#recent-projects a { display: block; border-radius: .375rem; overflow: hidden; }
#recent-projects a img { transition: transform .35s ease; }
#recent-projects a:hover img { transform: scale(1.03); }

/* Mobile/tablet menu toggle (replaces the stacked header buttons below 992px) */
.mdm-menu-toggle {
  display: inline-flex; align-items: center; gap: 10px; margin-left: auto;
  background: none; border: 0; padding: 10px 0; color: #fff; cursor: pointer;
  font: 500 .78rem/1 'Poppins', sans-serif; letter-spacing: .18em; text-transform: uppercase;
}
.mdm-menu-toggle:hover { opacity: .75; }
.mdm-menu-toggle:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
@media (min-width: 992px) { .mdm-menu-toggle { display: none; } }

/* Full-screen menu */
.mdm-menu {
  position: fixed; inset: 0; z-index: 2000; display: flex;
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s;
}
.mdm-menu.is-open { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.mdm-menu__media { display: none; flex: 0 0 50%; background: #0b4b00 url('../img/gallery/bathrooms-01.webp') center / cover no-repeat; position: relative; }
.mdm-menu__media::after { content: ''; position: absolute; inset: 0; background: rgba(11, 75, 0, .18); }
@media (min-width: 768px) { .mdm-menu__media { display: block; } }
.mdm-menu__panel {
  flex: 1; background: #fff; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; justify-content: center; gap: 34px;
  padding: 96px 32px 40px; position: relative;
}
@media (min-width: 576px) { .mdm-menu__panel { padding: 110px 56px 48px; } }
.mdm-menu__top { position: absolute; top: 18px; left: 32px; right: 22px; display: flex; align-items: center; justify-content: space-between; }
@media (min-width: 576px) { .mdm-menu__top { left: 56px; right: 40px; top: 28px; } }
.mdm-menu__logo img { display: block; width: 118px; height: auto; }
.mdm-menu__close { background: none; border: 0; padding: 8px; color: #0b4b00; cursor: pointer; line-height: 0; }
.mdm-menu__close:hover { opacity: .6; }
.mdm-menu__eyebrow { margin: 0 0 12px; font: 500 .72rem/1 'Poppins', sans-serif; letter-spacing: .18em; text-transform: uppercase; color: rgba(11, 75, 0, .6); }
.mdm-menu ul { list-style: none; margin: 0; padding: 0; }
.mdm-menu li { opacity: 0; transform: translateY(12px); transition: opacity .4s ease, transform .4s ease; }
.mdm-menu.is-open li { opacity: 1; transform: none; }
.mdm-menu__primary li + li { margin-top: 6px; }
.mdm-menu__primary a {
  font-family: 'Playfair Display', Georgia, serif; font-weight: 600; font-size: clamp(2rem, 9vw, 3.1rem);
  line-height: 1.15; color: #0b4b00; text-decoration: none; transition: color .2s;
}
.mdm-menu__secondary li + li { margin-top: 10px; }
.mdm-menu__secondary a { font: 400 1.15rem/1.3 'Poppins', sans-serif; color: rgba(29, 29, 29, .8); text-decoration: none; transition: color .2s; }
.mdm-menu__primary a:hover, .mdm-menu__secondary a:hover { color: #1f8a3a; }
.mdm-menu a[aria-current="page"] { color: #1f8a3a; }
.mdm-menu__primary a[aria-current="page"]::after, .mdm-menu__secondary a[aria-current="page"]::after {
  content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-left: 10px; vertical-align: middle;
}
.mdm-menu__contact {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-top: 1px solid rgba(11, 75, 0, .15); padding-top: 22px;
  opacity: 0; transition: opacity .4s ease .5s;
}
.mdm-menu.is-open .mdm-menu__contact { opacity: 1; }
.mdm-menu__call { font: 600 1rem/1 'Poppins', sans-serif; color: #0b4b00; text-decoration: none; }
.mdm-menu__icons { display: flex; gap: 18px; }
.mdm-menu__icons a { color: #0b4b00; line-height: 0; }
.mdm-menu__icons a:hover, .mdm-menu__call:hover { color: #1f8a3a; }
@media (prefers-reduced-motion: reduce) { .mdm-menu, .mdm-menu li, .mdm-menu__contact { transition: none !important; } }

/* ---------- Alignment & spacing fixes (no design changes) ---------- */

/* Footer: sit on the same container grid as the rest of the page */
footer { padding-left: 0 !important; padding-right: 0 !important; }

/* Service-page heroes: align text with the logo/container edge, start a consistent distance below the header,
   and let the hero grow (from its 600px minimum) when the heading needs more room instead of overlapping */
.site-blocks-cover:has(.row.h-100) { height: auto !important; padding-bottom: 64px; }
.site-blocks-cover > .container:has(.row.h-100) { height: auto !important; padding-left: 15px !important; padding-right: 15px !important; }
.site-blocks-cover .row.h-100 { height: auto !important; }
.site-blocks-cover .row.h-100 > .col-md-6 {
  justify-content: flex-start !important; align-items: flex-start !important; padding-top: 0 !important;
  margin-top: 265px !important;
}
@media (min-width: 768px) { .site-blocks-cover .row.h-100 > .col-md-6 { margin-top: 262px !important; } }
@media (min-width: 992px) { .site-blocks-cover .row.h-100 > .col-md-6 { margin-top: min(calc(11.5vw + 119px), 285px) !important; } }

/* Portfolio intro: clear the taller desktop header */
@media (min-width: 1200px) { section#project[style*="padding-top: 216px"] { padding-top: 270px !important; } }

/* "Our Work" heading + button: stack cleanly on phones instead of squeezing side by side */
@media (max-width: 575.98px) {
  section .container > .d-flex.justify-content-between.align-items-center { flex-wrap: wrap; gap: 16px; }
}

/* Slider dots: keep on one line on phones */
@media (max-width: 575.98px) {
  .swiper-pagination-bullets .swiper-pagination-bullet { margin: 0 4px !important; width: 10px !important; height: 10px !important; }
}

/* Home: space between About "Contact Us" button and Testimonials on smaller screens */
#about-us + section#testimonial { padding-top: 56px !important; }

/* Contact: give the map a real height when it stacks under the form */
@media (max-width: 991.98px) { #contact iframe, .col-lg-6 > iframe[src*="google.com/maps"] { height: 340px !important; margin-top: 24px; } }

/* Portfolio: even spacing between "Our Latest Projects" and "Just to Show You a Bit More" */
section#gallery-1 { padding-top: 0 !important; }

/* Footer studio credit */
.footer-about p.mdm-credit { margin: 0; line-height: 1; }
.mdm-credit__mark {
  display: block; font: 600 15px/1 'Poppins', sans-serif; letter-spacing: .24em; text-transform: uppercase; color: #014508;
}
.mdm-credit__sub {
  display: block; margin-top: 10px; font: 400 12.5px/1.4 'Poppins', sans-serif; letter-spacing: .02em; color: rgba(1, 69, 8, .7);
}

/* Desktop "Services" parent: opens the dropdown only, never navigates */
.mdm-nav-parent { cursor: default; }
.site-menu .has-children:focus-within > .dropdown { visibility: visible; opacity: 1; }
