/* 1. Strip backgrounds when the header is in its default (top) position */
.site-header:not(.site-header-sticky-active), .top-bar {
    background-color: transparent !important;
}

/* 2. Anchor the gradient container */
.site-wrapper {
    position: relative;
}

/* 3. Apply the gradient ONLY to the homepage */
.home .site-wrapper::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 280px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 49 !important; 
    pointer-events: none;
}

/* 4. Elevate the top bar and header above the new gradient layer */
.top-bar, .site-header {
    position: relative;
    z-index: 50 !important;
}

/* 5. Restore the solid white when scrolling */
.site-header.site-header-sticky-active {
    background-color: #ffffff !important;
    z-index: 9999 !important;
}

/* 6. Turn top-bar text and icons black on all non-homepage URLs */
body:not(.home) .top-bar, 
body:not(.home) .top-bar a, 
body:not(.home) .top-bar i {
    color: #000000 !important;
}
/* 4. Restore the solid white background and ensure top visibility when scrolling */
.site-header.site-header-sticky-active {
    background-color: #ffffff !important;
    z-index: 9999 !important;
}

/* Replace flat yellow buttons with a gold gradient */
.sr7-btn, .portfolio-modern__cta,  input[type="submit"], .btn {
    background: linear-gradient(135deg, #A67C00 0%, #F4D068 50%, #8A5A19 100%) !important;
    color: #111111 !important;
    border: none !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3); /* Ensures text remains legible against the bright gold */
}
/* Shift the gold gradient on hover */
.vc_btn3:hover, .sr7-btn:hover, input[type="submit"]:hover, .btn:hover {
    background: linear-gradient(135deg, #8A5A19 0%, #F4D068 50%, #A67C00 100%) !important;
}

/* Remove the gold gradient and shadow from Read More text links */
a.btn.style-4 {
    background: transparent !important;
    border: none !important;
    text-shadow: none !important;
    color: #A67C00 !important; /* Sets the text to your gold brand color */
    padding: 0 !important;
}

/* Prevent the background from reappearing on hover */
a.btn.style-4:hover {
    background: transparent !important;
    color: #111111 !important; /* Shifts text to charcoal on hover */
}

@media (max-width: 767px) {
    /* 1. Convert the Isotope container into a flexible grid */
    .wpb_wrapper .isotope {
        display: flex !important;
        flex-wrap: wrap !important;
        height: auto !important;
    }
    
    /* 2. Force 2 columns and stop the jumping animations */
    .wpb_wrapper .isotope .isotope-item,
    .wpb_wrapper .portfolio .col-xs-6 {
        width: 50% !important;
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important; 
        transition: none !important;
        animation: none !important;
    }
    
    /* 3. NEW: Force filtered-out items to disappear and collapse their empty space */
    .wpb_wrapper .isotope .isotope-item[style*="opacity: 0"],
    .wpb_wrapper .isotope .isotope-item[style*="opacity:0"],
    .wpb_wrapper .isotope .isotope-hidden {
        display: none !important;
    }
}
@media (max-width: 991px) {
    /* 1. Pull the hero image up ONLY on the homepage */
    .home .site-header {
        margin-bottom: -130px !important;
    }

    /* 2. Reinforce gradient visibility above the mobile slider */
    .home .site-wrapper::before {
        content: "" !important;
        display: block !important;
        height: 180px !important;
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 100%) !important;
        z-index: 49 !important;
    }

    /* 3. Strip all background colors from the main structural wrappers */
    .top-bar, 
    .top-bar.active,
    .top-bar .container, 
    .top-bar .row {
        background-color: transparent !important;
    }

    /* 4. Target the specific mobile dropdown containers to force black */
    .top-bar .collapse.in,
    .top-bar-collapse,
    .top-bar .widget {
        background-color: #000000 !important;
    }
    
    .top-bar .widget {
        padding-bottom: 25px !important;
        padding-top: 10px !important;
        margin-bottom: 0 !important;
    }

    /* 5. Force the dropdown text and icons to be white on ALL pages */
    .top-bar .widget,
    .top-bar .widget a,
    .top-bar .widget span,
    .top-bar .widget i {
        color: #ffffff !important;
    }
    
    /* 6. Force the toggle arrow to be black on subpages */
    body:not(.home) .top-bar-toggle,
    body:not(.home) .top-bar-toggle i {
        color: #000000 !important;
    }

    /* 7. Ensure homepage toggle arrow stays white */
    .home .top-bar-toggle,
    .home .top-bar-toggle i {
        color: #ffffff !important;
    }
}