/* ================================== */
/* CSS VARIABLES & BASIC SETUP        */
/* ================================== */
:root {
    --primary-red: #e50914;
    --primary-black: #000;
    --primary-dark-grey: #1a1a1a;
    --primary-white: #fff;
    --text-grey-light: #ccc;
    --text-grey-dark: #aaa;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Roboto', sans-serif;

    /* --- NEW --- Added a gradient for modern accents */
    --accent-gradient: linear-gradient(90deg, #e50914, #f84951);
}

/* ================================== */
/* ALTERED SERVICES PAGE STYLES       */
/* ================================== */

/* --- MODIFIED --- Hero section with background image & overlay */
.services-hero {
    height: 100vh;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    flex-direction: column; /* To stack title and scroll indicator */
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
    
    /* --- NEW --- Background image for visual impact */
    /* IMPORTANT: Replace 'path/to/your/background-image.jpg' with an actual image path */
    background-image: url('../images/services-bg.jpg'); 
    background-size: cover;
    background-position: center center;
    background-attachment: fixed; /* Creates a parallax-like effect */
}

/* --- NEW --- Dark overlay for text readability over the background image */
.services-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Adjust opacity as needed */
    z-index: -1; /* Place it behind the text but in front of the image */
}

.services-hero h1 {
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    font-weight: 900;
    color: var(--primary-white);
    line-height: 1.1;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5); /* --- NEW --- Adds depth to text */
}

.services-hero p {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--text-grey-light);
    max-width: 650px;
    margin: 20px auto 0 auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5); /* --- NEW --- */
}

/* --- NEW --- "Scroll Down" indicator for better UX */
.services-hero::after {
    content: 'SCROLL DOWN';
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 0.8rem;
    color: var(--primary-white);
    position: absolute;
    bottom: 40px;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}


/* --- MODIFIED --- Grid section with a smoother transition */
.services-grid-section {
    position: relative; 
    z-index: 2; 
    background: var(--primary-black); 
    padding: 100px 5%;
    
    /* --- NEW --- Curved top edge for a smoother scroll-over effect */
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    margin-top: -40px; /* Pull it up to hide the straight edge behind the curve */
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5); /* Add shadow for depth */
}

.services-grid-section .container {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

/* --- MODIFIED --- Category title with a gradient and animated underline */
.category-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 60px;
    margin-top: 80px;
    display: inline-block;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 15px;

    /* --- NEW --- Gradient text color */
    color: transparent;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
}

/* --- NEW --- Animated underline using a pseudo-element */
.category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: width 0.3s ease-in-out;
}

.category-title:hover::after {
    width: 100%; /* Underline expands on hover */
}

.services-grid-section .container > .category-title:first-of-type {
    margin-top: 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    text-align: left;
}

/* --- MODIFIED --- Service card with gradient border and enhanced hover effect */
.service-card {
    background-color: var(--primary-dark-grey);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative; /* Needed for the gradient border pseudo-element */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 2px; /* Space for the gradient border */
    z-index: 1;
}

/* --- NEW --- Gradient border effect */
.service-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    background: linear-gradient(135deg, #333, #111); /* Default border color */
    border-radius: 12px;
    z-index: -2;
}

/* --- NEW --- Inner background to hide content spill */
.service-card::after {
    content: '';
    position: absolute;
    top: 2px; right: 2px; bottom: 2px; left: 2px;
    background: var(--primary-dark-grey);
    border-radius: 10px;
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* --- NEW --- Make the gradient border light up on hover */
.service-card:hover::before {
    background: var(--accent-gradient);
}

.service-card-image {
    width: calc(100% - 4px); /* Account for padding */
    margin: 2px 2px 0 2px; /* Position inside the border */
    height: 220px;
    object-fit: cover;
    display: block;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.service-card-content {
    padding: 25px;
    flex-grow: 1;
}

.service-card-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-white);
    margin-bottom: 15px;
}

.service-card-content p {
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-grey-dark);
    line-height: 1.6;
}