/* 1. Page Section Spacing & Global */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; 
    background-color: #ffffff; /* Global white background */
}

/* Ensure the main wrapper is pure white with no borders */
.services-main {
    padding: 120px 0 0 0; 
    background-color: #ffffff !important;
    border: none;
}

/* Force all sections inside to be seamless */
.waas-utility-section, 
.service-row {
    width: 100%;
    background-color: #ffffff !important; /* Forces background to match */
    border: none !important;             /* Removes any lingering lines */
    margin: 0;
    padding: 100px 0;                     /* Standardized vertical spacing */
}

/* This is the inner container that keeps text/images centered */
.services-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 2. Keyframe Animations */
@keyframes appleFadeIn {
    0% { opacity: 0; transform: translateY(30px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* 3. WaaS Hero & Logo */
.section-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 80px;
}

.intro-text {
    display: block;
    font-size: 25px;
    letter-spacing: 1px;
    font-weight: 600;
    color: #555555;
    margin-bottom: 25px;
    opacity: 0;
    animation: appleFadeIn 1.2s ease-out forwards;
}

.brand-badge {
    max-width: 100%;
    height: 200px;
    width: auto;
    margin-bottom: 30px;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.05)); /* Subtle lift */
}

/* 4. Grid Cards Styling (Keeping cards distinct on white BG) */
.waas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.waas-card {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    /* Softened shadow to blend better with white background */
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border: 1px solid #e0e0e0; 
}

.waas-card.active {
    background-color: #004a99;
    color: white;
    border: none;
    box-shadow: 0 15px 35px rgba(0, 74, 153, 0.2);
}

/* 4. Product Row Layout (Recycling & Waste - All White) */
.service-row {
    padding: 100px 0;
    background-color: #ffffff; /* Uniform white background */
    border-top: 1px solid #eee; /* Subtle divider between sections */
}

.row-flex {
    display: flex;
    align-items: center;
    gap: 80px;
}

.row-flex.reverse {
    flex-direction: row-reverse;
}

.row-image, .row-text {
    flex: 1;
}

.row-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 30px 50px rgba(0,0,0,0.1)); /* High quality visual lift */
    border-radius: 0; /* Removing radius for a flatter product-style look if preferred */
}

/* 5. Typography */
.service-tag {
    color: #000000;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;         /* Slightly smaller for badges */
    letter-spacing: 2px;
    margin-bottom: 0px;
    display: inline-block;   /* Changed from block to fit text width */
    
    /* Border Styling */
    border: 1px solid #d70707;
    padding: 4px 12px;
    border-radius: 50px;     /* Makes it a pill shape */
}

/* The Main Heading */
.row-text h2 {
    font-size: 3rem;           /* Large, bold product-style heading */
    font-weight: 700;
    color: #1d1d1f;            /* Apple-style deep black/gray */
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

/* The Body Text */
.row-text p {
    font-size: 1.15rem;
    line-height: 1.6;
    color: #424245;            /* Soft neutral gray for readability */
    margin-bottom: 20px;
}

/* Ensure the list items don't have heavy dividers if you want them cleaner */
.row-list li {
    font-size: 1.1rem;
    color: #424245;
    padding: 12px 0;
    display: flex;
    align-items: center;
}

.row-list li::before {
    content: "✓";
    color: #d70707;
    font-weight: bold;
    margin-right: 15px;
    font-size: 1.5rem;
}


/* Updated Primary Button: Black to Red */
.btn-primary {
    display: inline-block;
    padding: 15px 35px;
    background-color: #000000; /* Black background */
    color: #ffffff;            /* White font */
    text-decoration: none;
    border-radius: 50px;       /* Keeps the pill shape */
    font-weight: 600;
    margin-top: 25px;
    border: none;              /* Removes all borders */
    transition: all 0.3s ease; /* Smooth transition for color and scale */
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #FF0000; /* Changes to Red on hover */
    color: #ffffff;            /* Ensures font stays white */
    transform: translateY(-2px); /* Subtle lift effect */
    box-shadow: 0 10px 20px rgba(255, 0, 0, 0.2); /* Optional: Red glow on hover */
}

/* Cinema Reveal Effect */
.reveal {
    opacity: 0;
    transform: translateY(50px) scale(0.95); /* Starts lower and slightly smaller */
    transition: all 1.5s cubic-bezier(0.25, 1, 0.5, 1); /* Ultra-smooth "Apple-style" curve */
    transition-delay: 0.4s;
    visibility: hidden; /* Prevents flashing before animation */
}

.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1); /* Glides into place at full size */
    visibility: visible;
}

/* Add a delay to the grid so the header appears first */
.waas-grid.reveal.active {
    transition-delay: 0.8s;
}

/* 3. Staggered Delay for Product Rows */
/* This makes the image appear first, then the text column follows shortly after */
.service-row .row-image.reveal.active {
    transition-delay: 0.3s;
}

.service-row .row-text.reveal.active {
    transition-delay: 0.6s;
}



/* --- Large Image Row (Enhanced) --- */
.large-img-row {
    display: flex;
    align-items: center;
    gap: 40px; /* Tightened gap for a more integrated look */
}

.large-img-row .row-image {
    flex: 1.6; /* Increased visual weight of the image */
}

.large-img-row .row-text {
    flex: 1;
}

.large-img-row .row-image img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 30px 60px rgba(0,0,0,0.12));
    border-radius: 8px; /* Slight rounding for a modern feel */
    transition: transform 0.5s ease;
}

/* --- Large Image Desktop "Bleed" Effect --- */
@media (min-width: 1200px) {
    /* When image is on the left (Water Recycling) */
    .row-flex:not(.reverse) .row-image {
        margin-left: -60px;
    }
    /* When image is on the right (Scheduled Waste) */
    .row-flex.reverse .row-image {
        margin-right: -60px;
    }
}

/* --- Mobile Adjustments (Consolidated) --- */
@media (max-width: 900px) {
    .row-flex, .row-flex.reverse, .large-img-row {
        flex-direction: column !important;
        gap: 50px;
        text-align: center;
    }
    
    .row-text h2 { 
        font-size: 2.2rem; 
    }
    
    .row-list li { 
        justify-content: center; 
    }

    .large-img-row .row-image img {
        transform: scale(1);
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .services-main {
        padding-top: 100px;
    }

    .brand-badge {
        height: 120px;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .intro-text {
        font-size: 18px;
    }
}