/* Logo animation */
.wp-block-navigation .custom-logo {
    transition: transform 0.3s ease;
    transform-origin: center;
}
body.header-scrolled .wp-block-navigation .custom-logo {
    transform: scale(1.35);
}

/* Full width header */
.wp-block-template-part > .wp-block-group {
    width: 100%;
    max-width: 100%;
    padding-left: 20px;
    padding-right: 20px;
}

/* Sticky header */
header,
.site-header,
#masthead,
.wp-block-template-part {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Header scroll shadow */
body.header-scrolled .wp-block-template-part {
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

/* Fix overflow and scrolling */
html, body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

* {
    box-sizing: border-box;
}

img, iframe, embed, video, picture, svg {
    max-width: 100%;
    height: auto;
}

/* Column alignment */
.wp-block-columns .wp-block-column {
    text-align: left !important;
}

/* Contact form */
.wpcf7 {
    background-color: #00000087;
    max-width: 500px !important;
    margin: 0 auto !important;
    padding: 20px !important;
    border-radius: 8px;
}

.wpcf7 input[type="submit"] {
    display: block !important;
    margin: 10px auto !important;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
    width: 60% !important;
    display: block !important;
    margin: 5px auto !important;
    padding: 8px !important;
}

.wpcf7 p {
    margin: 5px 0 !important;
}

/* Image quality */
img {
    image-rendering: high-quality;
}
@media (max-width: 1024px) {
    .wp-block-html {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }
    
    .wp-block-html * {
        max-height: none !important;
        overflow: visible !important;
    }
}



/* ============================================
   PPW SEO FIXES - April 2026
   ============================================ */

/* FIX: hm-why image section - image should fill column height, not overflow */
.hm-why-img {
    overflow: visible;
}
.hm-why-img img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}
.hm-why-split {
    /* max-height removed: was cutting off point boxes on narrow screens */
}
.hm-why-inner {
    /* max-height removed: was cutting off point boxes on narrow screens */
}

/* FIX: Oversized images in service grid - contain them properly */
.hm-svc-grid img,
.hm-svc-item img {
    width: 100% !important;
    max-width: 300px !important;
    height: auto !important;
    max-height: 300px !important;
    object-fit: cover !important;
}

/* FIX: Logo in wrong-header pages - ensure it renders */
.site-header img,
header img.custom-logo,
.main-header img {
    display: block !important;
    max-height: 80px !important;
    width: auto !important;
    max-width: 200px !important;
}

/* FIX: Images on all pages - prevent over-zooming/cropping */
.stk-block img {
    max-height: 500px !important;
    object-fit: cover !important;
    width: 100% !important;
}

/* FIX: Hero section images */
[class*="hero"] img:not(.custom-logo) {
    object-position: center center !important;
}

/* ============================================
   CORE WEB VITALS - CLS PREVENTION
   ============================================ */

/* Prevent layout shift from lazy-loaded images */
img[loading="lazy"] {
    min-height: 1px !important;
}

/* ============================================
   HEADER PHONE BUTTON STYLE CONSISTENCY
   (For pages with alternate header template)
   ============================================ */
.header-cta-phone a,
a[href^="tel"].header-btn,
.nav-phone-link {
    background-color: #f5c518 !important;
    color: #0d1b2a !important;
    font-weight: 700 !important;
    padding: 10px 20px !important;
    border-radius: 4px !important;
    text-decoration: none !important;
}