/* VISUAL FIXES */

/* 1. REMOVE MISPLACED QR CODE IN HERO/ABOUT */
/* The Zelle QR code appears in the "100%" stat card in the About section. */
.about-badge-card img[src*="ZELLE"],
.about-stats img[src*="ZELLE"],
.stat-card img[src*="ZELLE"] {
    display: none !important;
}

/* 2. FIX HERO MAIN IMAGE */
/* Force uniform sizing for the main image on the right. */
.hero-image img,
section#home img.hero-bg,
/* Modified selector to match existing HTML structure better */
section#home .hero-slide img {
    width: 100%;
    height: 500px;
    /* Fixed height */
    object-fit: cover;
    border-radius: 20px;
}

/* 3. FIX SERVICE CARDS (Professional Cleaning Solutions) */
/* Force all cards to be equal height. */
.service-card .service-image img,
/* Adjusted selector to match existing HTML structure */
.service-card .card-img-top,
#services img.service-image {
    height: 250px !important;
    width: 100%;
    object-fit: cover;
}

/* 4. HEADER LOGO FIX */
/* Hide the duplicate text next to the logo. */
.navbar-brand span,
.logo-text {
    display: none !important;
}

/* Ensure logo image is sized correctly */
.navbar-brand img,
.logo-img {
    max-height: 50px;
    width: auto;
}

/* 5. WHATSAPP BUTTON COLOR */
/* Change background to WhatsApp Green. */
.whatsapp-float,
#whatsapp-btn {
    background-color: #25D366 !important;
}

/* 6. FOOTER LOGO FIX */
/* Make it smaller. */
footer .footer-logo,
footer img[src*="LOGO"] {
    max-width: 150px;
    height: auto;
}

/* 7. ZELLE QR IN PAYMENT SECTION */
/* Fix giant size in the modal/payment section. */
.zelle-qr-img,
#payment-modal img[src*="ZELLE"],
.payment-methods img[src*="ZELLE"] {
    max-width: 180px !important;
    height: auto;
}

/* ======================================================== */
/* ADDITIONAL VISUAL FIXES (Updated Request) */
/* ======================================================== */

/* 1. HERO SECTION (Blue Overlay Fix & Border) */
.hero-overlay,
.overlay {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.85) 0%, rgba(37, 99, 235, 0.4) 50%, rgba(37, 99, 235, 0.85) 100%) !important;
}

.hero-image {
    border-left: 10px solid var(--primary-color);
    border-right: 10px solid var(--primary-color);
}

/* 2. ABOUT SECTION (Image Height Fix) */
.about-content,
.row.align-items-center {
    display: flex;
    align-items: stretch;
    /* Forces equal height */
}

.about-image img {
    height: 100% !important;
    max-height: 500px;
    /* Prevent infinite growing */
    object-fit: cover;
    border-radius: 12px;
}

/* 3. SERVICE CARDS (White Crop Fix & Layout) */
.service-card {
    overflow: hidden;
    /* Contains the image */
    border: none !important;
    padding: 0 !important;
    position: relative;
    /* Ensure stacking context */
}

.service-card .card-img-top,
.service-card img,
.service-image img {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
    margin: 0 !important;
    border-radius: 12px 12px 0 0 !important;
    /* Round top corners only */
    display: block;
}

/* Remove any pseudo-elements creating white space */
.service-card::before,
.service-card::after {
    display: none !important;
}

/* 4. REMOVE BLUE OVERLAY ON CARDS (Reinforce) */
.service-card .overlay,
.card-overlay,
.service-card .service-overlay {
    background: transparent !important;
    opacity: 0 !important;
    display: none !important;
    /* Hide to prevent blocking clicks */
    display: none !important;
    /* Hide to prevent blocking clicks */
}

/* ======================================================== */
/* EMERGENCY LAYOUT FIXES (About & Cards) */
/* ======================================================== */

/* 1. FIX ABOUT SECTION TEXT LAYOUT */
.about-content p,
.about-text {
    column-count: 1 !important;
    columns: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

/* Fix the flex container behavior */
.row.align-items-center {
    flex-wrap: wrap;
    /* Allow stacking on mobile */
}

/* Force 50% width on desktop for the grid columns if bootstrap grid is used, 
   or general responsive behavior */
@media (min-width: 768px) {
    .about-grid {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 30px;
    }
}

/* 2. FIX SERVICE CARDS (REMOVE WHITE CROP) */
.service-card {
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    /* Adding shadow back since border is gone */
    border-radius: 12px;
}

.service-card .card-body,
.service-content {
    background: white;
    /* Only text part is white */
    padding: 20px;
}

.service-card img,
.service-image img {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
    margin: 0 !important;
    display: block !important;
    border-radius: 12px 12px 0 0 !important;
}

/* 4. HERO OVERLAY FIX (Updated: REMOVE COMPLETELY) */
.hero-overlay,
.overlay,
.hero-section::before,
.hero-section::after {
    background: transparent !important;
    background-image: none !important;
    display: none !important;
    opacity: 0 !important;
}

.hero-image img,
.hero-slider img {
    opacity: 1 !important;
    filter: none !important;
}

/* ======================================================== */
/* EMERGENCY FIXES ROUND 2 (Aggressive Overrides) */
/* ======================================================== */

/* 2. REMOVE WHITE CROP ON CARDS (Aggressive CSS) */
/* Reset container */
.service-card,
.service-card .card-body,
.service-card img {
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
}

/* Force Image Display */
.service-card .card-img-top,
.service-card img,
.service-image img {
    width: 100% !important;
    height: 280px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 12px 12px 0 0 !important;
    max-width: none !important;
    /* Ensure it fills container */
}

/* Restore Card Body Text Area background */
.service-card .card-body {
    background: #FFFFFF !important;
    padding: 20px !important;
    border-radius: 0 0 12px 12px !important;
}

/* 3. FIX ABOUT SECTION COLUMNS (Text splitting) */
.about-text,
.about-content,
.about-content p {
    column-count: auto !important;
    columns: auto !important;
    column-gap: normal !important;
    display: block !important;
    width: 100% !important;
}

/* Fix alignment */
.row.align-items-center {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
}

@media (min-width: 768px) {

    /* ONLY apply to About section to avoid breaking other grids */
    .about-content .col-md-6,
    .about-section .col-md-6 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* ======================================================== */
/* FORCE SERVICE GRID LAYOUT */
/* ======================================================== */
@media (min-width: 992px) {
    #services .col-lg-3 {
        width: 25% !important;
        flex: 0 0 25% !important;
        max-width: 25% !important;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    #services .col-md-6 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* ======================================================== */
/* CLICKABILITY FIXES */
/* ======================================================== */

/* Ensure overlays never block clicks */
.hero-overlay,
.overlay,
.service-overlay,
.section-overlay {
    pointer-events: none !important;
    user-select: none !important;
}

/* Ensure content above overlays is clickable */
.hero-content,
.hero-text,
.service-content,
.about-content {
    pointer-events: none !important;
    /* Let clicks pass through container */
    position: relative !important;
    z-index: 50 !important;
}

/* Re-enable pointer events for interactive elements */
.hero-content .btn,
.hero-content a,
.hero-content button,
.service-content .btn,
.about-content .btn,
.about-content a {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 100 !important;
}

/* RESTORATION & FINAL POLISH */
/* ======================================================== */

/* 1. RESTORE HERO BUTTONS */
.hero-content .btn,
.hero-section .btn {
    pointer-events: auto !important;
    display: inline-block !important;
    z-index: 100 !important;
    padding: 12px 30px !important;
}

/* 2. RESTORE ABOUT SECTION STYLE */
.about-image img,
.about-section img {
    border-radius: 20px !important;
    /* Restore curve */
    height: auto !important;
    width: 100% !important;
    max-height: 500px !important;
    /* Cap height but allow it to be decent */
    object-fit: cover !important;
    /* Revert to cover for better aesthetics */
}

/* Restore badge visibility */
.about-badge,
.stat-card,
.about-badge-card {
    display: block !important;
    opacity: 1 !important;
    position: absolute !important;
    bottom: 20px;
    right: -20px;
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

/* Ensure the Zelle QR stays hidden in the badge per previous request */
.about-badge-card img[src*="ZELLE"],
.stat-card img[src*="ZELLE"] {
    display: none !important;
}

/* Ensure the image container is relative for absolute positioning of badge */
.about-image-container {
    position: relative !important;
}

/* 3. FIX SERVICE CARD IMAGES (No white crop - Aggressive) */
.card-img-top {
    width: 100% !important;
    margin: 0 !important;
    border-top-left-radius: calc(0.25rem - 1px);
    border-top-right-radius: calc(0.25rem - 1px);
}

.service-card .card-body {
    padding-top: 20px !important;
}

/* ======================================================== */
/* NUCLEAR SERVICE CARD FIXES */
/* ======================================================== */
.service-card-wrapper img {
    transition: transform 0.3s ease;
}

.service-card-wrapper:hover img {
    transform: scale(1.05);
}

/* ======================================================== */
/* HERO NAVIGATION CLEANUP (Targeted) */
/* ======================================================== */
#home .owl-nav,
#home .owl-dots,
.hero-slider .owl-nav,
.hero-section .carousel-control-prev,
.hero-section .carousel-control-next {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ======================================================== */
/* PROTECT SERVICE BUTTONS & RESTORE STYLE */
/* ======================================================== */
.service-card-wrapper .btn,
.service-card-wrapper button,
.service-card .btn,
.service-card button {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 100 !important;
    width: 100% !important;
    background-color: #2563EB !important;
    /* Primary Blue */
    color: white !important;
    padding: 12px !important;
    border-radius: 6px !important;
    font-weight: bold !important;
    text-align: center !important;
    margin-top: auto !important;
    border: none !important;
}

/* ======================================================== */
/* FINAL IMAGE & CARD POLISH */
/* ======================================================== */
.service-card-wrapper,
.service-card {
    border: 1px solid #eee !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
}

.service-card-wrapper .img-area,
.service-card-wrapper img,
.service-card img {
    width: 100% !important;
    height: 200px !important;
    /* Slightly shorter */
    object-fit: cover !important;
    border-radius: 12px 12px 0 0 !important;
}

.service-card .btn,
.service-card button {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 100 !important;
}

/* ======================================================== */
/* ======================================================== */
/* REDESIGN: HORIZONTAL SPLIT CARDS (Image Left / Text Right) */
/* ======================================================== */

.service-card-wrapper {
    display: flex !important;
    flex-direction: row !important;
    /* Side by side */
    align-items: stretch !important;
    /* Equal height */
    justify-content: flex-start !important;
    background: white !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 30px !important;
    height: 350px !important;
    /* Fixed height for consistency */
    width: 100% !important;
    border: 1px solid #eee !important;
}

/* Image Container (Left Side) - 45% width */
.service-card-wrapper .img-area,
.image-column {
    width: 45% !important;
    height: 100% !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
}

.service-card-wrapper img,
.service-card-wrapper .img-area img {
    height: 100% !important;
    width: 100% !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    /* No rounded corners needed on side */
    display: block !important;
    max-width: none !important;
    margin: 0 !important;
}

/* Content Container (Right Side) - 55% width */
.service-card-wrapper .content-area,
.text-column {
    width: 55% !important;
    height: 100% !important;
    padding: 30px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    text-align: left !important;
    background: white !important;
    overflow-y: auto !important;
    /* Scroll if text is long */
}

/* Ensure buttons are properly sized/positioned in this layout */
.service-card-wrapper .btn {
    width: auto !important;
    display: block !important;
    width: 100% !important;
    margin-top: auto !important;
    /* Push to bottom */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .service-card-wrapper {
        flex-direction: column !important;
        /* Stack on mobile */
        height: auto !important;
        /* Allow auto height on mobile */
    }

    .service-card-wrapper .img-area,
    .service-card-wrapper .content-area {
        width: 100% !important;
    }

    .service-card-wrapper .img-area {
        height: 250px !important;
    }
}