/* Import Fonts - Using Montserrat & Poppins */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Poppins:wght@300;400;500;600;700&display=swap');

/* CSS Variables for Theme Control */
:root {
    /* Core Theme */
    --color-black: #000000;
    --color-off-black: #0a0a0a;
    --color-dark-grey: #1c1c1c;
    --color-mid-grey: #2f2f2f; /* Default header background */
    --color-light-grey: #a8a8a8;
    --color-text: #e0e0e0;
    --color-accent: #ffffff;
    --color-subtle-accent: #4a4a4a;
    /* Brand Colors */
    --brand-red: #D9363E;
    --brand-blue: #3A5DAE;
    --brand-green: #6DB365;
    /* Gradients */
    --gradient-dark-bg: linear-gradient(145deg, var(--color-dark-grey) 0%, var(--color-off-black) 100%);
    --gradient-light-bg: linear-gradient(145deg, var(--color-mid-grey) 0%, var(--color-dark-grey) 100%);
    --gradient-overlay: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.9));
    /* Gradient Tints */
    --gradient-red-tint-overlay: linear-gradient(135deg, rgba(217, 54, 62, 0.1) 0%, rgba(28, 28, 28, 0.15) 100%);
    --gradient-blue-tint-overlay: linear-gradient(135deg, rgba(58, 93, 174, 0.1) 0%, rgba(28, 28, 28, 0.15) 100%);
    --gradient-green-tint-overlay: linear-gradient(135deg, rgba(109, 179, 101, 0.1) 0%, rgba(28, 28, 28, 0.15) 100%);

    /* Fonts */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Poppins', sans-serif;
    /* Config */
    --spacing-unit: 1rem;
    --border-radius: 6px;
    --header-height: 75px;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-body), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    background-color: var(--color-off-black);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
    padding-top: var(--header-height);
    font-size: 1rem;
    position: relative;
}
/* Class to prevent body scrolling when modal is open */
body.no-scroll {
    overflow: hidden;
}
.container {
    max-width: 1140px;
    width: 90%; /* Default width */
    margin: 0 auto;
}

/* --- Loading Animation Styles --- */
#loader-wrapper {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--color-black);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
    opacity: 1; visibility: visible;
    transition: opacity 0.5s ease-out, visibility 0s linear 0.5s;
}
#loader-wrapper.loaded {
    opacity: 0; visibility: hidden; pointer-events: none;
}
.loader-ellipse {
    position: absolute; border-style: solid; border-color: transparent; border-radius: 50%;
    animation: rotate-loader 1.5s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}
.loader-ellipse.ellipse-1 { width: 100px; height: 100px; border-width: 5px; border-top-color: var(--brand-red); animation-delay: 0s; }
.loader-ellipse.ellipse-2 { width: 80px; height: 80px; border-width: 4px; border-top-color: var(--brand-blue); animation-delay: 0.1s; animation-direction: reverse; }
.loader-ellipse.ellipse-3 { width: 60px; height: 60px; border-width: 3px; border-top-color: var(--brand-green); animation-delay: 0.2s; }
@keyframes rotate-loader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* --- End Loader Styles --- */

/* --- Basic Scroll Fade-in Animation --- */
.fade-in-section {
    opacity: 0; transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}
.fade-in-section.is-visible {
    opacity: 1; transform: translateY(0);
}
/* --- End Scroll Animation --- */

/* Typography */
h1, h2 {
    font-family: var(--font-heading), sans-serif;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0; /* Adjusted margin, handled by wrapper now */
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.4);
}
h3, h4 {
    font-family: var(--font-body), sans-serif;
    font-weight: 500;
    color: var(--color-accent);
    margin-bottom: var(--spacing-unit);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}
h2 { font-size: calc(var(--spacing-unit) * 2); line-height: 1.3; } /* Removed margin-bottom */
h3 { font-size: calc(var(--spacing-unit) * 1.4); line-height: 1.4; font-weight: 600; }
h4 { font-size: calc(var(--spacing-unit) * 1.1); line-height: 1.4; font-weight: 500; }
p, li, select, textarea, input, button, label { font-family: var(--font-body), sans-serif; }
p { margin-bottom: var(--spacing-unit); color: var(--color-light-grey); max-width: 65ch; font-weight: 300; }
section p { margin-left: auto; margin-right: auto; }
/* Adjust paragraph following the header wrapper */
.section-header-wrapper + p {
    margin-top: calc(var(--spacing-unit)*1.5); /* Add space below header */
    margin-bottom: calc(var(--spacing-unit) * 2.5);
    font-size: 1.1rem;
    color: var(--color-text);
    font-weight: 400;
}
a { color: var(--color-accent); text-decoration: none; transition: color 0.3s ease; }
section a:hover { color: var(--brand-blue); }
img, video { max-width: 100%; height: auto; display: block; }

/* Header */
header {
    background: var(--color-black); height: var(--header-height);
    display: flex; align-items: center; position: fixed;
    width: 100%; top: 0; left: 0; z-index: 1000;
    border-bottom: 1px solid var(--color-subtle-accent);
    box-shadow: var(--shadow-md);
}
nav.container {
    display: flex; justify-content: space-between; align-items: center;
    width: 100%; padding: 0 5%; /* Use padding on container */
}
.logo {
    display: flex; align-items: center; height: calc(var(--header-height) * 0.75);
    max-width: 220px; overflow: hidden; margin-right: var(--spacing-unit);
    flex-shrink: 0; /* Prevent logo from shrinking */
}
.logo video { max-height: 100%; width: auto; object-fit: contain; cursor: pointer; }

/* DESKTOP Navigation */
nav ul.main-nav {
    list-style: none; display: flex; align-items: center;
    margin: 0; padding: 0; flex-grow: 1; justify-content: flex-end; min-width: 0;
    flex-wrap: nowrap; /* Prevent wrapping on desktop */
}
nav ul.main-nav li { margin-left: calc(var(--spacing-unit) * 2); }
nav ul.main-nav li a {
    font-family: var(--font-body), sans-serif; font-weight: 500; text-transform: uppercase;
    font-size: calc(var(--spacing-unit) * 0.9); letter-spacing: 1.5px; position: relative;
    padding: 5px 0; color: var(--color-accent); transition: color 0.3s ease;
    white-space: nowrap; /* Prevent link text wrapping */
}
nav ul.main-nav li a::after {
    content: ''; position: absolute; width: 0; height: 2px;
    bottom: 0; left: 0; transition: width 0.3s ease;
}
/* Nav Link Colors (Used for Header Logic) */
/* Home, Work (1st, 4th) -> Red */
nav ul.main-nav li:nth-child(3n+1) a::after { background-color: var(--brand-red); }
nav ul.main-nav li:nth-child(3n+1) a:hover { color: var(--brand-red); }
/* About, Contact (2nd, 5th) -> Blue */
nav ul.main-nav li:nth-child(3n+2) a::after { background-color: var(--brand-blue); }
nav ul.main-nav li:nth-child(3n+2) a:hover { color: var(--brand-blue); }
/* Services (3rd) -> Green */
nav ul.main-nav li:nth-child(3n+3) a::after { background-color: var(--brand-green); }
nav ul.main-nav li:nth-child(3n+3) a:hover { color: var(--brand-green); }

/* --- REMOVED Mobile Nav Toggle Button Styles --- */
/* --- REMOVED Mobile Menu Active State Styles --- */
/* --- REMOVED body.mobile-menu-open styles --- */

/* Hero Section */
.hero-section {
    min-height: 100vh; position: relative; display: flex;
    justify-content: center; align-items: center; text-align: center;
    padding: 120px 5%; overflow: hidden; color: var(--color-accent);
}
.hero-video-bg {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    min-width: 100%; min-height: 100%; width: auto; height: auto;
    z-index: -1; object-fit: cover;
}
.hero-section .overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: var(--gradient-overlay); z-index: 0;
}
.hero-section .hero-content { position: relative; z-index: 1; max-width: 850px; }
.hero-main-logo {
    display: block; max-width: 350px; width: 60%; height: auto;
    margin: 0 auto calc(var(--spacing-unit) * 2) auto;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
}

/* Parallax Section (General - Keep for other potential uses) */
.parallax-section {
    min-height: 60vh; display: flex; flex-direction: column;
    justify-content: center; align-items: center; text-align: center;
    padding: 100px 5%; position: relative; overflow: hidden;
    background-position: center center; background-repeat: no-repeat;
    background-size: cover; /* Default to cover */
    background-attachment: fixed; /* Default to fixed */
    color: var(--color-accent);
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.3), inset 0 -10px 20px rgba(0,0,0,0.3);
}
.parallax-section .parallax-content { position: relative; z-index: 2; max-width: 850px; }


/* --- Home CTA Section Specific Styles (#home-cta inherits from .parallax-section) --- */
#home-cta {
    position: relative; /* Ensure positioning context for children */
    overflow: hidden;   /* Keep video within bounds */
    background-image: none !important; /* Remove potential conflicting image */
    background-attachment: scroll; /* Make video scroll with page, overrides fixed */
}
.home-cta-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1; /* Place behind overlay and content */
    object-fit: cover;
}
/* Lighter overlay for #home-cta */
.home-cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5); /* Lighter overlay */
    z-index: 0; /* Place above video, behind content */
}
/* Ensure the original parallax content is above the video/overlay and centered */
#home-cta .parallax-content {
    position: relative; /* Ensure it stacks correctly */
    z-index: 1; /* Place above video and overlay */
    max-width: 850px; /* Keeps content contained */
    margin-left: auto;  /* Center content */
    margin-right: auto; /* Center content */
}
/* Remove Grey Box from Heading specifically in #home-cta */
#home-cta .parallax-content h2 {
    background-color: transparent; /* Remove the default grey background */
    box-shadow: none;             /* Remove the default shadow */
    padding: 0;                   /* Remove the default padding */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Add text shadow for readability */
    animation: none; /* Prevent glow animation */
    color: var(--color-accent); /* Ensure bright color */
}
/* Optional: Adjust paragraph color/shadow for readability in #home-cta */
#home-cta .parallax-content p {
    color: var(--color-text); /* Or var(--color-accent); for brighter text */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6); /* Add subtle shadow */
    margin-top: calc(var(--spacing-unit)*1.5);
    margin-bottom: calc(var(--spacing-unit) * 2.5);
}
/* Adjust CTA button colors specifically for #home-cta */
#home-cta .cta-button {
    border-color: var(--brand-red); /* Example: Red to match Hero */
    color: var(--brand-red);
}
#home-cta .cta-button:hover {
    background-color: var(--brand-red);
    border-color: var(--brand-red);
    color: var(--color-accent);
    box-shadow: 0 10px 20px rgba(217, 54, 62, 0.3);
}
/* --- End Home CTA Section Styles --- */


/* CTA Buttons (General Styling) */
.cta-button {
    display: inline-block; border: 2px solid; color: var(--color-accent);
    background-color: transparent;
    padding: calc(var(--spacing-unit) * 0.8) calc(var(--spacing-unit) * 2.2);
    font-family: var(--font-body), sans-serif; font-weight: 600; text-transform: uppercase;
    letter-spacing: 1.5px; margin-top: calc(var(--spacing-unit) * 1.5);
    border-radius: var(--border-radius);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer; text-align: center; position: relative;
    overflow: visible; z-index: 1; appearance: none; /* Added appearance */
}
/* Default Button Style (Blue) */
.cta-button { border-color: var(--brand-blue); color: var(--brand-blue); }
.cta-button:hover { background-color: var(--brand-blue); border-color: var(--brand-blue); color: var(--color-accent); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(58, 93, 174, 0.3); }
/* Specific Button Overrides */
#home .cta-button { border-color: var(--brand-red); color: var(--brand-red); }
#home .cta-button:hover { background-color: var(--brand-red); border-color: var(--brand-red); color: var(--color-accent); box-shadow: 0 10px 20px rgba(217, 54, 62, 0.3); }
#contact .cta-button, #portfolio .cta-button { border-color: var(--brand-green); color: var(--brand-green); }
#contact .cta-button:hover, #portfolio .cta-button:hover { background-color: var(--brand-green); border-color: var(--brand-green); color: var(--color-accent); box-shadow: 0 10px 20px rgba(109, 179, 101, 0.3); }
/* Ensure button type="button" also looks like cta-button if needed */
button.cta-button { /* Add specific styles if needed, inherits most from .cta-button */ }


/* General Section Styling */
section { padding: 100px 0; text-align: center; position: relative; }
.section-gradient-dark { background: var(--gradient-dark-bg); }
.section-gradient-light { background: var(--gradient-light-bg); }
#about { background: none; } /* Removed gradient, handled by background image */
hr.section-divider { border: none; border-top: 2px solid var(--color-subtle-accent); margin: calc(var(--spacing-unit) * 3) auto; max-width: 100px; }

/* --- Section Header Styling V2 --- */
.section-header-wrapper {
    display: inline-block;
    margin-bottom: calc(var(--spacing-unit)*1.5);
    position: relative;
}
/* --- About Section Background Image --- */
#about {
    position: relative; /* Needed for absolute positioning of overlay */
    overflow: hidden;   /* Optional: helps contain elements if needed */
    padding-top: 100px;
    padding-bottom: 100px;
    /* Set the new background image */
    background-image: url('Assets/Team Image.png'); /* ===>>> UPDATE FILENAME if using a different PNG image <<<=== */
    background-size: cover; /* Scale the image to cover the entire section */
    background-position: center center; /* Center the image */
    background-repeat: no-repeat;
    background-attachment: scroll; /* Or 'fixed' for parallax effect */
    color: var(--color-text); /* Ensure base text color is set */
}
.about-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.75); /* Adjust overlay darkness (0.75 = 75% opacity) */
    z-index: 0; /* Place above background, behind content */
}
.about-content-wrapper {
    position: relative; /* Position above overlay */
    z-index: 1; /* Ensure content is on top */
}
/* Ensure content within the container is styled correctly */
#about .container {
    position: relative;
    z-index: 1;
}
/* Hide the empty placeholder div if it remains */
#about .about-image {
    display: none; /* Hide the container that held the inline image */
}
/* Re-center the text block now that the image div is hidden */
#about .about-flex-container {
    justify-content: center; /* Center the remaining flex item (text) */
}
#about .about-text {
    flex-basis: 80%; /* Allow text to take up more width */
    max-width: 850px; /* Optional: Limit text width for readability */
    min-width: auto; /* Reset min-width */
    text-align: center; /* Center align the text block */
    margin-left: auto;
    margin-right: auto;
    padding: 0 var(--spacing-unit); /* Add horizontal padding for mobile */
}
#about .about-text h3 {
    text-align: center; /* Center the headings */
    margin-left: auto;
    margin-right: auto;
    color: var(--brand-blue); /* Keep heading color */
}
#about .about-text p {
    text-align: left; /* Keep paragraphs left-aligned */
    color: var(--color-text); /* Ensure paragraph text is light enough */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6); /* Add shadow for readability */
    /* Margin adjusted in media queries */
}
/* Ensure main header 'About Us' and the paragraph below it are readable */
#about .section-header-wrapper h2 {
     text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}
#about .section-header-wrapper + p {
    color: var(--color-accent); /* Make intro paragraph brighter */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    /* Margin adjusted in media queries */
}
/* --- End About Section Background Image --- */

/* General H2 Styling (excluding #home-cta) */
section:not(#home-cta) h2 {
    display: inline-block;
    color: var(--color-accent);
    padding: calc(var(--spacing-unit) * 0.6) calc(var(--spacing-unit) * 1.8);
    border-radius: var(--border-radius);
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin-bottom: 0;
    background-color: var(--color-mid-grey); /* Start grey */
    box-shadow: var(--shadow-md); /* Start with base shadow */
    transition: background-color 0.8s ease-out, box-shadow 0.8s ease-out;
    --glow-color-start: rgba(255, 255, 255, 0.1);
    --glow-color-end: rgba(255, 255, 255, 0.2);
}
/* Define the enhanced color glow animation */
@keyframes color-glow {
    0% {
        box-shadow: var(--shadow-md), /* Keep base shadow */
                    0 0 8px 2px var(--glow-color-start); /* Pulsing glow */
    }
    100% {
        box-shadow: var(--shadow-md), /* Keep base shadow */
                    0 0 18px 7px var(--glow-color-end); /* Pulsing glow - wider/brighter */
    }
}
/* Apply specific colors and trigger animation when section is visible */
#about.is-visible h2 {
    background-color: var(--brand-blue);
    --glow-color-start: rgba(58, 93, 174, 0.4); /* Blue glow */
    --glow-color-end: rgba(58, 93, 174, 0.7);
    animation: color-glow 2s ease-in-out infinite alternate;
}
#services.is-visible h2 {
    background-color: var(--brand-green);
    --glow-color-start: rgba(109, 179, 101, 0.4); /* Green glow */
    --glow-color-end: rgba(109, 179, 101, 0.7);
    animation: color-glow 2s ease-in-out infinite alternate;
}
#portfolio.is-visible h2 {
    background-color: var(--brand-red);
    --glow-color-start: rgba(217, 54, 62, 0.4); /* Red glow */
    --glow-color-end: rgba(217, 54, 62, 0.7);
    animation: color-glow 2s ease-in-out infinite alternate;
}
#contact.is-visible h2 {
    background-color: var(--brand-blue);
    --glow-color-start: rgba(58, 93, 174, 0.4); /* Blue glow */
    --glow-color-end: rgba(58, 93, 174, 0.7);
    animation: color-glow 2s ease-in-out infinite alternate;
}
/* --- End Section Header Styling V2 --- */


/* About Section Layout */
.about-flex-container {
    display: flex; flex-direction: row; flex-wrap: wrap;
    gap: calc(var(--spacing-unit)*3); margin-top: calc(var(--spacing-unit)*2);
    text-align: left; align-items: center;
}
.about-text, .about-image { flex: 1; min-width: 300px; }
#about h3 { /* Already centered */
    border-bottom: none; display: block; text-transform: uppercase;
    margin-top: var(--spacing-unit); color: var(--brand-blue);
    font-family: var(--font-body), sans-serif; font-weight: 600;
}

/* Services Section */
.services-container {
    max-width: 1140px; width: 90%; margin: calc(var(--spacing-unit) * 3) auto 0 auto;
    text-align: left; display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: calc(var(--spacing-unit) * 2);
}
@media (min-width: 992px) {
    .services-container { grid-template-columns: repeat(3, 1fr); }
}

.service-category {
    padding: calc(var(--spacing-unit) * 1.8); border: 1px solid var(--color-subtle-accent);
    border-radius: var(--border-radius); box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; overflow: hidden;
}
.service-category::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1; opacity: 0.8; transition: opacity 0.3s ease;
    background: inherit;
}
.service-category:hover { transform: translateY(-8px) scale(1.03); box-shadow: 0 15px 40px rgba(0,0,0,0.5); }
.service-category:hover::before { opacity: 1; }
/* Adjusted Nth child selectors for 3 items */
.service-category:nth-child(3n+1)::before { background: var(--gradient-blue-tint-overlay), var(--gradient-light-bg); }
.service-category:nth-child(3n+2)::before { background: var(--gradient-red-tint-overlay), var(--gradient-light-bg); }
.service-category:nth-child(3n+3)::before { background: var(--gradient-green-tint-overlay), var(--gradient-light-bg); }

.service-category-link { text-decoration: none; color: inherit; display: block; margin-bottom: calc(var(--spacing-unit) * 1.5); }
.service-category-link h3 {
    border-bottom: 3px solid; display: inline-block; padding-bottom: calc(var(--spacing-unit) * 0.4);
    text-transform: uppercase; font-family: var(--font-body), sans-serif; font-weight: 600;
    font-size: calc(var(--spacing-unit) * 1.3); position: relative;
    padding-left: calc(var(--spacing-unit) * 2.5); color: var(--color-accent);
    margin-bottom: 0; transition: color 0.3s ease, border-color 0.3s ease;
}
.service-category-link:hover h3 { color: var(--color-accent); }
/* Adjusted Nth child selectors */
.service-category:nth-child(3n+1) .service-category-link h3 { border-color: var(--brand-blue); }
.service-category:nth-child(3n+2) .service-category-link h3 { border-color: var(--brand-red); }
.service-category:nth-child(3n+3) .service-category-link h3 { border-color: var(--brand-green); }
.service-category:nth-child(3n+1) .service-category-link:hover h3 { color: var(--brand-blue); border-color: var(--brand-blue); }
.service-category:nth-child(3n+2) .service-category-link:hover h3 { color: var(--brand-red); border-color: var(--brand-red); }
.service-category:nth-child(3n+3) .service-category-link:hover h3 { color: var(--brand-green); border-color: var(--brand-green); }

.service-category-link h3::before {
    content: '◎'; font-family: sans-serif; position: absolute; left: 0; top: 50%;
    transform: translateY(-50%) rotate(0deg); font-size: 1.6em; line-height: 1;
    color: inherit; transition: color 0.3s ease, transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
/* Adjusted Nth child selectors */
.service-category:nth-child(3n+1) .service-category-link h3::before { color: var(--brand-blue); }
.service-category:nth-child(3n+2) .service-category-link h3::before { color: var(--brand-red); }
.service-category:nth-child(3n+3) .service-category-link h3::before { color: var(--brand-green); }
.service-category-link:hover h3::before { color: var(--color-accent); transform: translateY(-50%) rotate(180deg) scale(1.1); }

.service-category ul { list-style: none; padding-left: 0; margin-top: 0; }
.service-category li {
    color: var(--color-text); padding: calc(var(--spacing-unit) * 0.4) 0;
    font-size: 0.95rem; font-weight: 300; position: relative;
    padding-left: calc(var(--spacing-unit) * 1.5); cursor: default;
}
.service-category li::before {
    content: '›'; position: absolute; left: 0; color: inherit;
    font-size: 1.2em; font-weight: 700; top: 50%; transform: translateY(-50%);
}
/* Adjusted Nth child selectors */
.service-category:nth-child(3n+1) li::before { color: var(--brand-blue); }
.service-category:nth-child(3n+2) li::before { color: var(--brand-red); }
.service-category:nth-child(3n+3) li::before { color: var(--brand-green); }

/* --- Portfolio Section --- */
#portfolio { background: var(--gradient-light-bg); } /* Give portfolio a background */
.portfolio-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: calc(var(--spacing-unit) * 1.5); margin-top: calc(var(--spacing-unit) * 3);
    grid-auto-rows: auto;
}
.portfolio-item { width: 100%; max-width: 100%; overflow: hidden; position: relative; border-radius: var(--border-radius); }
.portfolio-image-container {
    position: relative; overflow: hidden; border-radius: inherit;
    background-color: var(--color-dark-grey); display: block; box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 16 / 9; width: 100%; max-width: 100%;
}
.portfolio-image-container:hover { transform: scale(1.03); box-shadow: var(--shadow-lg); }
.portfolio-image-container img {
    display: block; width: 100%; height: 100%; object-fit: cover;
    border-radius: inherit; transition: transform 0.3s ease;
}
.portfolio-image-container .overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(5, 5, 5, 0.85); color: var(--color-accent);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.4s ease; text-align: center;
    padding: var(--spacing-unit); z-index: 2; cursor: pointer;
}
.portfolio-image-container:hover .overlay { opacity: 1; }
.portfolio-image-container .overlay h4 {
    font-family: var(--font-body), sans-serif; font-weight: 600;
    margin-bottom: calc(var(--spacing-unit) * 0.5); font-size: 1.2rem; text-transform: uppercase;
}
.portfolio-image-container .overlay p {
    color: var(--color-light-grey); margin-bottom: 0; font-size: 0.9rem;
    text-transform: none; font-weight: 300;
}
/* --- End Portfolio Section --- */

/* --- Contact Section --- */
#contact {
    position: relative; /* Needed for absolute positioning of children */
    overflow: hidden;   /* Keep video within bounds */
    padding-top: 100px; /* Adjust padding as needed */
    padding-bottom: 100px; /* Adjust padding as needed */
    background: none; /* Remove any previous background */
}
.contact-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: -1; /* Place behind overlay and content */
    object-fit: cover;
}
.contact-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 10, 0.75); /* Dark overlay, adjust opacity (0.75) as needed */
    z-index: 0; /* Place above video, behind content */
}
.contact-content-wrapper {
    position: relative; /* Position above video and overlay */
    z-index: 1; /* Ensure content is on top */
}
.contact-flex-container {
    display: flex; flex-direction: row; flex-wrap: wrap;
    gap: calc(var(--spacing-unit) * 3); margin-top: calc(var(--spacing-unit) * 3);
    text-align: left; align-items: flex-start;
}
.contact-details, .contact-form-container { flex: 1; min-width: 300px; }
.contact-details h3, .contact-form-container h3 {
    margin-bottom: calc(var(--spacing-unit) * 1.5);
    color: var(--color-accent); /* Keep details heading bright */
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}
.contact-details p {
    margin-bottom: calc(var(--spacing-unit) * 0.8);
    color: var(--color-text); /* Ensuring text remains readable */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* Add subtle shadow */
}
.contact-details p strong { color: var(--color-text); font-weight: 500; }
.contact-details a {
     color: var(--brand-green); /* Use green for links to stand out */
     text-shadow: none; /* Remove shadow from links if desired */
     word-break: break-word;
}
.contact-details a:hover { color: var(--color-accent); text-decoration: underline; }
.social-links-text { color: var(--brand-green); text-decoration: none; font-weight: 500; }
.social-links-text:hover { text-decoration: underline; }
/* --- REMOVED contact-graphic-img styles --- */

.contact-form { width: 100%; }
.form-group { margin-bottom: calc(var(--spacing-unit) * 1.5); }
.form-group label {
    display: block; margin-bottom: calc(var(--spacing-unit) * 0.5);
    color: var(--color-text); /* Ensure label is readable */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5); /* Add subtle shadow */
    font-weight: 500; font-size: 0.9rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%; padding: calc(var(--spacing-unit) * 0.9);
    border: 1px solid var(--color-subtle-accent);
    background-color: rgba(47, 47, 47, 0.7); /* Slightly transparent dark background */
    color: var(--color-text); border-radius: var(--border-radius); font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none; border-color: var(--brand-green); /* Use green to match button */
    box-shadow: 0 0 0 3px rgba(109, 179, 101, 0.3);
}
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a8a8a8' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right calc(var(--spacing-unit) * 0.8) center;
    background-size: 1em; padding-right: calc(var(--spacing-unit) * 2.5);
}
.form-group textarea { resize: vertical; min-height: 120px; }
#contact .contact-form button[type="submit"] { width: 100%; margin-top: var(--spacing-unit); border-color: var(--brand-green); color: var(--brand-green); } /* Ensure button color matches */
#contact .contact-form button[type="submit"]:hover { background-color: var(--brand-green); color: var(--color-accent); border-color: var(--brand-green);}
/* Style for status message paragraph added by JS */
.form-status-message {
    margin-top: 1em;
    font-weight: 500;
    text-align: center;
    min-height: 1.2em; /* Prevent layout shift */
}
/* --- End Contact Section --- */


/* Footer */
footer {
    background-color: var(--color-black); padding: calc(var(--spacing-unit) * 3) 5%;
    text-align: center; border-top: 1px solid var(--color-subtle-accent);
    color: var(--color-light-grey); font-size: 0.9rem;
}
footer p { margin-bottom: calc(var(--spacing-unit) * 0.5); max-width: none; }
footer a { color: var(--color-text); text-decoration: underline; }
footer a:hover { color: var(--brand-blue); }
.social-links { margin-top: var(--spacing-unit); }
.social-links a { display: inline-block; margin: 0 calc(var(--spacing-unit) * 0.7); text-decoration: none; font-weight: bold; }
/* --- End Footer --- */

/* --- Modal Styles --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.8); /* Black w/ opacity */
    align-items: center; /* Center vertically */
    justify-content: center; /* Center horizontally */
}
.modal.modal-open {
    display: flex; /* Show the modal */
}
.modal-content {
    position: relative;
    background-color: var(--color-dark-grey);
    margin: auto;
    padding: 40px; /* Increased padding */
    border: 1px solid var(--color-subtle-accent);
    width: 90%; /* Could be more specific */
    max-width: 600px; /* Adjust max-width if needed */
    min-height: 150px; /* Adjusted min-height */
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    animation: modal-appear 0.3s ease-out; /* Simple appear animation */
    display: flex; /* Use flex for content alignment */
    align-items: center;
    justify-content: center;
}
@keyframes modal-appear {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}
/* Removed modal video styles */

/* Style for placeholder link in modal */
.modal-placeholder {
    color: var(--color-light-grey); /* Start with light grey */
    font-size: 1.1rem;
    text-align: center;
    text-decoration: none; /* Remove default underline */
    transition: color 0.3s ease, text-decoration 0.3s ease; /* Smooth transition */
}
.modal-placeholder:hover {
    color: var(--brand-green); /* Change color on hover */
    text-decoration: underline; /* Add underline on hover */
}


.close-modal-btn {
    position: absolute;
    top: 5px;
    right: 15px;
    color: var(--color-light-grey);
    background: none;
    border: none;
    font-size: 2.5rem; /* Make it larger */
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    z-index: 2001;
    transition: color 0.2s ease;
}
.close-modal-btn:hover,
.close-modal-btn:focus {
    color: var(--color-accent);
    text-decoration: none;
    outline: none;
}
/* --- End Modal Styles --- */


/* ======================================== */
/* Tablet Breakpoint (<= 1024px)            */
/* ======================================== */
@media (max-width: 1024px) {
    .container { width: 92%; }
    h2 { font-size: calc(var(--spacing-unit) * 1.8); }
    h3 { font-size: calc(var(--spacing-unit) * 1.3); }
    section { padding: 80px 0; }

    .services-container { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: calc(var(--spacing-unit) * 1.8); }
    .portfolio-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .contact-flex-container { gap: calc(var(--spacing-unit) * 2); }

    /* Adjust header nav for tablet */
    nav ul.main-nav {
        justify-content: flex-end; /* Keep to right */
    }
    nav ul.main-nav li { margin-left: calc(var(--spacing-unit) * 1.5); }
    nav ul.main-nav li a { font-size: calc(var(--spacing-unit) * 0.85); }
    .logo { max-width: 180px; }

    .hero-section .hero-content { max-width: 700px; }
    .hero-main-logo { max-width: 300px; }

    section:not(#home-cta) h2 { padding: calc(var(--spacing-unit) * 0.5) calc(var(--spacing-unit) * 1.5); }

    /* Add padding to about text on tablet */
    #about .about-text {
        padding: 0 calc(var(--spacing-unit) * 1.5); /* Add more padding */
    }
    #about .about-text p,
    #about .section-header-wrapper + p {
        margin-left: 0; /* Remove specific side margins */
        margin-right: 0;
    }
}

/* ======================================== */
/* Mobile Breakpoint (<= 768px)           */
/* ======================================== */
@media (max-width: 768px) {
     .container { width: 90%; } /* Use container width */
     :root { --header-height: 65px; }
     body { padding-top: var(--header-height); }

     h1, h2 { font-size: calc(var(--spacing-unit) * 1.6); line-height: 1.2; }
     h3 { font-size: calc(var(--spacing-unit) * 1.2); }
     h4 { font-size: calc(var(--spacing-unit) * 1.0); }
     .section-header-wrapper + p { font-size: 1rem; margin-bottom: calc(var(--spacing-unit) * 2); }
     section { padding: 60px 0; }

     section:not(#home-cta) h2 { padding: calc(var(--spacing-unit) * 0.4) calc(var(--spacing-unit) * 1.2); }
     /* Ensure padding is reset for #home-cta h2 on mobile too */
     #home-cta .parallax-content h2 { padding: 0; }

     nav.container { padding: 0 5%; } /* Keep padding */
     .logo { height: calc(var(--header-height) * 0.7); max-width: 150px; margin-right: auto; /* Push nav links right */}

     /* --- Mobile Navigation Styles (Simplified) --- */
     nav ul.main-nav {
         display: flex; /* Keep as flex row */
         flex-wrap: wrap; /* Allow wrapping */
         justify-content: flex-end; /* Align to the right */
         align-items: center;
         position: static;
         width: auto;
         background: none;
         padding: 0;
         box-shadow: none;
         transform: none;
         overflow-y: visible;
         flex-grow: 1; /* Allow it to take space */
     }
     nav ul.main-nav li {
         margin: 5px 0 5px calc(var(--spacing-unit) * 1.2); /* Adjust margin for wrapping */
         width: auto; /* Reset width */
         text-align: right;
     }
     nav ul.main-nav li a {
         font-size: calc(var(--spacing-unit) * 0.8); /* Slightly smaller font */
         padding: 5px; /* Adjust padding */
         display: inline-block; /* Allow padding */
         width: auto;
         letter-spacing: 1px;
     }
     nav ul.main-nav li a::after { display: none; } /* Remove underline effect */
     nav ul.main-nav li a:hover { color: var(--brand-blue); } /* Simple hover */
     /* --- End Mobile Navigation Styles --- */

     .hero-section { min-height: 85vh; padding: 80px 5%; }
     .hero-section .hero-content .hero-main-logo { max-width: 200px; width: 50%; }
     .parallax-section { background-attachment: scroll; min-height: 40vh; padding: 80px 5%; }
     #home-cta { background-attachment: scroll; } /* Ensure scroll override persists */

     .services-container { grid-template-columns: 1fr; gap: calc(var(--spacing-unit) * 1.5); }
     .portfolio-grid { grid-template-columns: 1fr; gap: calc(var(--spacing-unit) * 1.5); }
     .portfolio-item { width: 100%; max-width: 100%; }
     .portfolio-image-container { max-width: 100%; }

     .about-flex-container { flex-direction: column; gap: calc(var(--spacing-unit)*1.5); }
     /* Add padding/margin for about text on mobile */
     #about .about-text {
         padding: 0 calc(var(--spacing-unit)); /* Use padding for spacing */
     }
     #about .about-text p,
     #about .section-header-wrapper + p {
         margin-left: 0; /* Remove specific side margins, rely on padding */
         margin-right: 0;
     }

     .contact-flex-container { flex-direction: column; gap: calc(var(--spacing-unit) * 2.5); align-items: center; }
     .contact-details, .contact-form-container { width: 100%; max-width: 500px; text-align: left; flex-basis: auto; }
     .contact-details { text-align: center; }
     .contact-details p { margin-left: auto; margin-right: auto; }
     .contact-form-container { margin-left: auto; margin-right: auto; }
}

/* ======================================== */
/* Small Mobile Breakpoint (<= 480px)     */
/* ======================================== */
@media (max-width: 480px) {
    h1, h2 { font-size: calc(var(--spacing-unit) * 1.4); }
    h3 { font-size: calc(var(--spacing-unit) * 1.1); }
    h4 { font-size: calc(var(--spacing-unit) * 0.9); }
    body { font-size: 0.95rem; }
    .section-header-wrapper + p { font-size: 0.95rem; }

    .container { width: 92%; }
    section { padding: 40px 0; }
    .hero-section { padding: 60px 5%; min-height: 80vh; }
    .parallax-section { padding: 60px 5%; min-height: 35vh; }

    .logo { max-width: 120px; }
    /* Adjust nav links further if needed */
    nav ul.main-nav li { margin-left: calc(var(--spacing-unit) * 0.8); }
    nav ul.main-nav li a { font-size: calc(var(--spacing-unit) * 0.75); padding: 3px; }

    .hero-main-logo { max-width: 160px; width: 45%; }
    .cta-button { padding: calc(var(--spacing-unit) * 0.7) calc(var(--spacing-unit) * 1.8); font-size: 0.8rem; letter-spacing: 1px;}

    .service-category { padding: calc(var(--spacing-unit) * 1.5); }
    .service-category-link h3 { font-size: calc(var(--spacing-unit) * 1.2); }
    .service-category li { font-size: 0.9rem; }

    .contact-form-container { padding: var(--spacing-unit); max-width: 100%; }
    .form-group input, .form-group select, .form-group textarea { padding: calc(var(--spacing-unit) * 0.7); font-size: 0.9rem; }

    footer { padding: calc(var(--spacing-unit) * 2) 5%; font-size: 0.85rem; }

    .portfolio-grid { gap: var(--spacing-unit); }

    section:not(#home-cta) h2 { padding: calc(var(--spacing-unit) * 0.3) calc(var(--spacing-unit) * 1.0); }
    /* Ensure padding is reset for #home-cta h2 on small mobile too */
    #home-cta .parallax-content h2 { padding: 0; }

    /* Ensure about text has padding */
     #about .about-text {
         padding: 0 var(--spacing-unit); /* Horizontal padding */
     }
}

/* === Particle Effect Styling (Button) === */
.particle {
    position: absolute; width: 5px; height: 5px; border-radius: 50%;
    pointer-events: none; z-index: 0; opacity: 1;
    will-change: transform, opacity;
}
@keyframes sparks-animation {
    0% { opacity: 1; transform: translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(var(--particle-x, 0), var(--particle-y, 0)) scale(0); }
}
/* === End Button Particle Styling === */

/* === Cursor Particle Effect Styles === */
.cursor-particle {
    position: fixed; width: 6px; height: 6px; border-radius: 50%;
    pointer-events: none; z-index: 9997; opacity: 0.8;
    transform: translate(-50%, -50%); will-change: transform, opacity;
}
@keyframes cursor-particle-anim {
    0% { opacity: 0.8; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
}
/* --- End Cursor Particle Styles --- */
