/* Preserve the existing heading sizes while making the document hierarchy explicit. */
h1.pz-home-heading { font-size: 3.5rem; line-height: 4rem; }
h1.pz-home-heading:not(:last-child) { margin-bottom: 2.5rem; }
h2.pz-service-heading, h3.pz-service-heading { font-size: 1.875rem; line-height: 2.5rem; }
html { scroll-padding-top: calc(var(--pz-nav-height, 104px) + 16px); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 2px solid #9b6f50 !important;
    outline-offset: 4px;
}
#pz-navigation[hidden] { display: none !important; }
.pz-menu-toggle { display: none; }
.pz-native-select select { display: block; width: 100%; min-height: 56px; padding: 12px 40px 12px 16px; border: 1px solid #ccc; background: #fff; color: #394147; font: inherit; -webkit-appearance: menulist !important; appearance: auto; }
.mad-preloader { pointer-events: none; animation: pz-bubble-out 120ms ease-out both; }
.mad-preloader-circle.pz-page-transition { pointer-events: none; transition: none; animation: pz-bubble-in 120ms ease-in both; }
@keyframes pz-bubble-in { from { transform: scale3d(0, 0, 1); } to { transform: scale3d(1, 1, 1); } }
@keyframes pz-bubble-out { from { transform: scale3d(1, 1, 1); } to { transform: scale3d(0, 0, 1); } }
@keyframes pz-menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1200px) {
    #mad-header [class*="mad-header-section--sticky"] { padding: 10px 0; transition: box-shadow 160ms ease; }
    #mad-header .mad-header-section--sticked { box-shadow: 0 3px 14px rgba(0,0,0,.15); }
    #mad-header .pz-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: relative;
        width: 48px;
        height: 44px;
        padding: 10px;
        color: #fff;
        background: transparent;
        border: 1px solid rgba(255,255,255,.3);
        border-radius: 4px;
        cursor: pointer;
    }
    #mad-header .pz-menu-toggle[hidden] { display: none; }
    .pz-menu-toggle span, .pz-menu-toggle span::before, .pz-menu-toggle span::after {
        display: block;
        width: 26px;
        height: 2px;
        background: currentColor;
        transition: transform 160ms ease, background 160ms ease;
    }
    .pz-menu-toggle span::before, .pz-menu-toggle span::after { content: ''; position: absolute; }
    .pz-menu-toggle span::before { transform: translateY(-8px); }
    .pz-menu-toggle span::after { transform: translateY(8px); }
    .pz-menu-toggle[aria-expanded="true"] span { background: transparent; }
    .pz-menu-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
    .pz-menu-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg); }
    #mad-header #pz-navigation { margin: 0; max-height: calc(100vh - var(--pz-nav-height, 64px)); overflow-y: auto; overscroll-behavior: contain; }
    #mad-header #pz-navigation:not([hidden]) { display: block; animation: pz-menu-in 160ms ease-out; }
    #mad-header #pz-navigation > li > a { min-height: 48px; padding: 12px 24px; line-height: 24px; }
    #mad-header:not(.pz-nav-ready) #pz-navigation { position: static; }
}
@media (max-width: 767px) {
    #mad-footer .pz-brands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 0; }
    #mad-footer .pz-brands > [class*="col-"] { width: 100% !important; max-width: 100%; padding: 0; }
    #mad-footer .pz-brands a { display: flex; align-items: center; justify-content: center; min-height: 72px; padding: 12px 4px; }
    #mad-footer .pz-brands img { display: block; width: 100%; max-width: 190px; height: auto; max-height: 58px; object-fit: contain; }
}
@media (max-width: 480px) {
    h1.pz-home-heading { font-size: 2.5rem; line-height: 3rem; }
}
@media (prefers-reduced-motion: reduce) {
    .mad-preloader, .mad-preloader-circle { display: none !important; }
    #mad-header #pz-navigation:not([hidden]) { animation: none; }
    .pz-menu-toggle span, .pz-menu-toggle span::before, .pz-menu-toggle span::after { transition: none; }
}


/* Keep intrinsic image dimensions for layout stability, but scale both axes. */
img[width][height] { height: auto; }

/* Photo grids are limited to mobile; desktop keeps the theme's carousels. */
@media (max-width: 767px) {
    .mad-gallery.pz-responsive-gallery,
    .mad-instafeed.pz-responsive-gallery {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin: 0;
        align-items: start;
    }
    .pz-responsive-gallery > * { min-width: 0; width: auto; padding: 0; }
    .pz-responsive-gallery > * > a {
        display: block;
        position: relative;
        overflow: hidden;
        border-radius: var(--br-main);
    }
    .pz-responsive-gallery img { display: block; width: 100%; height: auto; }
    .mad-portfolio.pz-institut-gallery { margin: -6px; }
    .mad-portfolio.mad-grid--isotope.pz-institut-gallery > .mad-grid-item,
    .mad-portfolio.mad-grid--isotope.pz-institut-gallery > .mad-grid-sizer {
        width: 50%;
        padding: 6px;
    }
    .pz-institut-gallery img { display: block; width: 100%; height: auto; }
}


/* Owl's touch-action:none blocks native scrolling over draggable slides.
   Keep vertical page scrolling and pinch zoom, while Owl handles horizontal swipes. */
.owl-carousel .owl-stage,
.owl-carousel.owl-drag .owl-item {
    -ms-touch-action: pan-y;
    touch-action: pan-y pinch-zoom;
}
