/* 1. GLOBAL FIX: Keep logo ratio intact and center image */
.logo-img img,
.nav-logo img {
    height: auto !important;
    max-width: 100% !important;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

/* 2. TABLET & MOBILE ADJUSTMENTS (Under 991px) */
@media (max-width: 991px) {
    
    /* SHRINK BACKGROUND: Reduce vertical padding on the header container */
    .header.main-header {
        padding-top: 5px !important;
        padding-bottom: 5px !important;
    }

    .header-inner {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        padding: 5px 0 !important;
        min-height: auto !important; /* Removes forced height from the background */
    }

    /* DOWNSCALE LOGO: Set to roughly 50% of previous size */
    .logo.logo-img {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        margin: 5px 0 !important;
    }

    .logo.logo-img img {
        width: 40% !important; /* This is the 50% downscale from the previous 80% */
        max-width: 180px;      /* Prevents it from getting too big on tablets */
    }

    /* RESTORE MENU SIZE: Ensure the navigation links are prominent again */
    .main-menu ul li a {
        font-size: 18px !important; /* Restores the menu's "glory" and readability */
        font-weight: 600 !important;
        padding: 12px 20px !important;
        display: block;
    }

    /* Fix the slide-out mobile menu logo size as well */
    .nav-logo img {
        width: 40% !important;
        max-width: 150px;
    }

    /* POSITION THE TOGGLER: Keep the hamburger menu centered vertically */
    .mobile-nav-toggler {
        position: absolute !important;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 99;
    }
}

/* 3. EXTRA SMALL MOBILE FIX (Under 480px) */
@media (max-width: 480px) {
    .logo.logo-img img {
        width: 50% !important; /* Slightly larger for very small phones */
    }
}

/* Hide custom cursor on mobile/touch devices */
@media (hover: none), (max-width: 991px) {
    .cursor,
    .cursor-follower {
        display: none !important;
    }
}

/* Target common WordPress slider classes for mobile */
@media screen and (max-width: 768px) {
    /* We target common names like .slider, .slideshow, and .hero */
    .slider, .slideshow, .hero, .banner, .wp-block-cover {
        max-height: 300px !important; /* Forces a shorter height */
        width: 100% !important;
        overflow: hidden !important;
    }

    .slider img, .slideshow img, .hero img, .banner img, .wp-block-cover img {
        height: 300px !important;
        width: 100% !important;
        object-fit: cover !important; /* Keeps the image from looking squished */
    }
}

/* Mobile Banner Shrink */
@media screen and (max-width: 767px) {
    /* 1. Target the main background wrapper */
    .sitemap {
        padding-top: 40px !important;    /* Reduces top spacing */
        padding-bottom: 40px !important; /* Reduces bottom spacing */
        min-height: auto !important;     /* Removes any forced large heights */
        height: auto !important;
    }

    /* 2. Target the container inside */
    .sitemap .main-container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* 3. Make the heading smaller so it doesn't push the height out */
    .sitemap-heading {
        font-size: 24px !important; 
        line-height: 1.2 !important;
        margin-bottom: 10px !important;
    }

    /* 4. Make the sub-text smaller */
    .stemap-text {
        font-size: 14px !important;
        line-height: 1.4 !important;
    }
}

@media screen and (max-width: 768px) {
    /* 1. Find the wrapper - we'll use a broad selector that worked before */
    div[class*="slider"], 
    div[class*="banner"], 
    section[class*="hero"] {
        /* We shrink the actual visual size to 60% */
        transform: scale(0.6) !important;
        /* We pull it up so it doesn't leave a huge gap */
        margin-top: -100px !important; 
        margin-bottom: -100px !important;
        transform-origin: center center;
        width: 100% !important;
    }

    /* 2. Fix the overlap issue you saw earlier */
    header, .header, #header {
        position: relative !important;
        z-index: 9999 !important;
    }
}