/*---------------------------------------------------------------------*/
/* 0. GLOBAL STYLES & VARIABLES                                        */
/*---------------------------------------------------------------------*/

/* CSS Reset - A good starting point for consistent styling */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Smooth scroll behavior for anchor links */
html {
    scroll-behavior: smooth;
}

/* Root variables for easy theme management - Light Theme Default */
:root {
    /* --- Color Palette --- */
    --primary-color: #070e37; /* Deep Blue (Dark) */
    --secondary-color: #f5910d; /* Vibrant Orange/Gold */
    --white-color: #ffffff; /* Explicit white for hero text etc. */

    /* Themed Colors (Light Mode Default) */
    --bg-color: #ffffff;             /* Main background */
    --text-color-primary: var(--primary-color); /* Headings, strong text */
    --text-color-secondary: #333;    /* Body text */
    --light-text-color: #555;        /* Slightly lighter text for paragraphs */
    --card-bg: #ffffff;              /* Background for cards/sections on --bg-color */
    --section-alt-bg: #f0f2f5;       /* Background for alternate sections */
    --border-default: #e0e0e0;       /* Borders */
    --input-bg: #f0f2f5;             /* Input field background */
    --footer-bg: var(--primary-color); /* Footer background */
    --footer-text: rgba(255, 255, 255, 0.95);
    --hero-overlay-start: rgba(7, 14, 55, 0.95);
    --hero-overlay-end: rgba(7, 14, 55, 0.8);
    --hero-bg-color: var(--primary-color); /* Used as part of hero gradient */
    --hero-particles-color: #ffffff;
    --hero-text-color: var(--white-color); /* Explicitly white text for hero */


    --error-color: #dc3545; /* Red for error messages */
    --success-color: #28a745; /* Green for success messages */

    /* --- Shadows for Depth --- */
    --shadow-light: 0 5px 20px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.2);
    --shadow-header: 0 6px 20px rgba(0, 0, 0, 0.12);

    /* --- Spacing System (based on 1rem = 16px) --- */
    --spacing-xs: 0.5rem;   /* 8px */
    --spacing-sm: 1rem;     /* 16px */
    --spacing-md: 2rem;     /* 32px */
    --spacing-lg: 3rem;     /* 48px */
    --spacing-xl: 4rem;     /* 64px */
    --spacing-xxl: 6rem;    /* 96px */

    /* --- Typography --- */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    --font-size-base: 1rem; /* 16px */
}

/* Dark Mode Variables */
body.dark-mode {
    --bg-color: #121212;
    --text-color-primary: #f0f0f0;
    --text-color-secondary: #e0e0e0;
    --light-text-color: #c0c0c0;
    --card-bg: #1e1e1e;
    --section-alt-bg: #282828;
    --border-default: #333;
    --input-bg: #282828;
    --footer-bg: #0d1230; /* Slightly lighter than hero dark overlay */
    --footer-text: rgba(255, 255, 255, 0.95);
    --hero-overlay-start: rgba(0, 0, 0, 0.85);
    --hero-overlay-end: rgba(0, 0, 0, 0.7);
    --hero-bg-color: #121212;
    --hero-particles-color: rgba(255, 255, 255, 0.7);
    --hero-text-color: var(--white-color); /* Stays white in dark mode */

    --shadow-light: 0 5px 20px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 10px 30px rgba(0, 0, 0, 0.6);
    --shadow-header: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Body and global text styling */
body {
    font-family: var(--font-body);
    line-height: 1.7; /* Improved line height for readability */
    color: var(--text-color-secondary);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased; /* Smoother text rendering for WebKit browsers */
    -moz-osx-font-smoothing: grayscale; /* Smoother text rendering for Firefox */
    position: relative; /* For the back-to-top button */
    /* Subtle noise texture */
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIj48ZmlsdGVyIGlkPSJub2lzZSI+PGZlVHVyYmVsZW5jZSB0eXBlPSJmcmFjdGFsTm9pc2UiIGJhc2ljRnJlcXVlbmN5PSIwLjc1IiBudW1PY3RhdmVzPSIxIiBzdGl0Y2hUaWxlcz0ic3RpdGNoIi8+PGZlQ29sb3JNYXRyaXggdHlwZT0ic2F0dXJhdGUiIHZhbHVlcz0iMCAwIC0xIDAgMC44NSIvPjwvZmlsdGVyPjxyZWN0IHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiBmaWxsPSIjZjVmNWY1IiBmaWx0ZXI9InVybCgjbm9pc2UpIi8%3EPC9zdmc%3E'); /* A very light grey noise */
    background-size: 100px 100px;
    background-blend-mode: overlay;
    transition: background-color 0.5s ease; /* Smooth transition for dark mode */
}

/* Class added to body when mobile nav is open */
body.no-scroll {
    overflow: hidden;
}

/* Max width for content to prevent overly wide lines, centered */
.container {
    max-width: 1200px;
    margin: 0 auto;
    /* Adjusted padding to push content more to the left/right */
    padding: 0 var(--spacing-lg); /* Increased padding on sides for more space from edges */
}

/* Headings Base Styles */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-color-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.2;
    font-weight: 700; /* Bold by default */
    letter-spacing: -0.5px; /* Slightly tighter letter spacing for modern look */
    transition: color 0.5s ease; /* Smooth transition for dark mode */
}

/* Specific heading sizes for visual hierarchy */
h1 { font-size: 3rem; } /* Adjusted from 3.2rem to 3rem */
h2 { font-size: 2.3rem; } /* Adjusted from 2.5rem to 2.3rem */
h3 { font-size: 1.9rem; } /* Adjusted from 2rem to 1.9rem */
p  {
    margin-bottom: var(--spacing-sm);
    font-weight: 400; /* Regular weight for paragraphs */
    transition: color 0.5s ease; /* Smooth transition for dark mode */
}

/* Lead text style */
.lead-text {
    font-size: 1.4rem; /* Adjusted from 1.5rem to 1.4rem */
    font-weight: 300; /* Lighter weight for lead text */
    line-height: 1.5;
    color: var(--light-text-color);
    transition: color 0.5s ease; /* Smooth transition for dark mode */
}


/* Link Base Styles */
a {
    color: var(--secondary-color); /* Default link color - bright accent */
    text-decoration: none;
    transition: color 0.3s ease; /* Smooth color transition on hover */
}

a:hover {
    color: var(--primary-color); /* Change color on hover */
}

/* Remove default list styling */
ul {
    list-style: none;
}

/* Global Section Padding */
.section-padding {
    padding: var(--spacing-xxl) 0; /* Generous vertical padding for sections */
}

/* Page Header Sections for Portfolio/Blog/Pricing */
.page-hero-section {
    background: linear-gradient(to right, var(--primary-color), #1b2f8a);
    color: var(--white-color);
    text-align: center;
    padding: var(--spacing-xxl) 0;
    min-height: 350px; /* Shorter than main hero, but still impactful */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    /* This padding-top will be set dynamically by JS to clear the fixed header */
    /* Will be set by JS: --page-hero-padding-top */
}
.page-hero-section h1 {
    color: var(--white-color);
    font-size: 3.2rem; /* Adjusted from 3.5rem to 3.2rem */
    margin-bottom: var(--spacing-sm);
    text-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}
.page-hero-section .lead-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem; /* Adjusted from 1.3rem to 1.2rem */
    max-width: 800px;
}
.pricing-hero { /* Specific style for pricing hero if needed */
    background: linear-gradient(to right, #0056b3, var(--primary-color)); /* A slightly different gradient for variety */
}


/* Alternate background color for some sections */
.section-alt {
    background-color: var(--section-alt-bg);
    /* Subtle geometric pattern */
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23e0e0e0' fill-opacity='0.6' fill-rule='evenodd'%3E%3Cpath d='M0 60 L60 60 L60 0 L0 0 L0 60 Z M15 0 L15 60 M30 0 L30 60 M45 0 L45 60 M0 15 L60 15 M0 30 L60 30 M0 45 L60 45' stroke-width='0.5' stroke='%23d0d0d0' /%3E%3C/g%3E%3C/svg%3E"); /* More defined grid pattern */
    background-blend-mode: overlay;
    transition: background-color 0.5s ease; /* Smooth transition for dark mode */
    background-size: 60px 60px; /* Adjust size of pattern */
    animation: backgroundPan 60s linear infinite; /* Subtle continuous movement */
}

body.dark-mode .section-alt {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23333' fill-opacity='0.6' fill-rule='evenodd'%3E%3Cpath d='M0 60 L60 60 L60 0 L0 0 L0 60 Z M15 0 L15 60 M30 0 L30 60 M45 0 L45 60 M0 15 L60 15 M0 30 L60 30 M0 45 L60 45' stroke-width='0.5' stroke='%23222' /%3E%3C/g%3E%3C/svg%3E"); /* Darker pattern for dark mode */
}

@keyframes backgroundPan {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 60px 60px; /* Moves by one tile size */
    }
}


/* --- Centering Utilities --- */
.text-center {
    text-align: center;
}


/* Section Title and Description common styles */
.section-title {
    text-align: center;
    margin-bottom: var(--spacing-xs);
    position: relative;
    padding-bottom: 10px;
    font-size: 2.6rem; /* Adjusted from 2.8rem to 2.6rem */
    transition: color 0.5s ease, text-shadow 0.3s ease; /* Add text-shadow transition */
}

.section-title:hover {
    color: var(--secondary-color); /* Change color on hover */
    text-shadow: 0 0 15px rgba(245, 145, 13, 0.6); /* Soft glow on hover */
}


.section-title::after {
    content: '';
    display: block;
    width: 80px; /* Length of the accent underline */
    height: 5px; /* Thickness of the accent underline */
    background-color: var(--secondary-color); /* Matches accent color */
    margin: 0.8rem auto 0; /* Centered, with space below */
    border-radius: 3px;
    transition: width 0.3s ease; /* Animate width of underline */
}
.section-title:hover::after {
    width: 120px; /* Expand underline on hover */
}


.section-description {
    text-align: center;
    font-size: 1.05rem; /* Adjusted from 1.1rem to 1.05rem */
    color: var(--light-text-color);
    max-width: 800px; /* Constrain width for readability */
    margin: 0 auto var(--spacing-lg); /* Centered, with space below */
    line-height: 1.6;
}

.section-subtitle { /* For review section subheading */
    text-align: center;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    font-size: 1.7rem; /* Adjusted from 1.8rem to 1.7rem */
    color: var(--text-color-primary);
}


/*---------------------------------------------------------------------*/
/* 1. BUTTON STYLES                                                    */
/*---------------------------------------------------------------------*/

.btn {
    display: inline-block;
    padding: 0.95rem 2.5rem; /* Vertical and horizontal padding */
    border-radius: 50px; /* Pill shape for buttons */
    font-weight: 700; /* Bold button text */
    text-align: center;
    cursor: pointer;
    text-decoration: none;
    font-size: 1.05rem;
    letter-spacing: 0.8px;
    text-transform: uppercase; /* Uppercase text for impact */
    position: relative; /* For hover effect */
    overflow: hidden; /* For hover effect */
    z-index: 1; /* For hover effect */
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--secondary-color); /* Fill color on hover (default) */
    border-radius: 50%;
    transition: width 0.4s ease-out, height 0.4s ease-out, top 0.4s ease-out, left 0.4s ease-out;
    transform: translate(-50%, -50%);
    z-index: -1;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
    border: 2px solid var(--primary-color);
    transition: color 0.4s ease; /* For text color change */
}

.btn-primary:hover {
    color: var(--primary-color); /* Dark text on orange hover */
    transform: translateY(-5px); /* Lift button on hover */
    box-shadow: var(--shadow-hover); /* Stronger shadow on hover */
}

.btn-primary:hover::before {
    width: 250%; /* Make it large enough to cover the button */
    height: 250%;
}

.btn-secondary {
    background-color: transparent; /* Transparent background */
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    transition: color 0.4s ease;
}

.btn-secondary:hover {
    color: var(--white-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary:hover::before {
    background: var(--primary-color); /* Fill with primary color for secondary btn */
    width: 250%;
    height: 250%;
}

/* --- Hero Section Specific Buttons (Bright Color) --- */
.btn-hero-primary {
    background-color: var(--secondary-color); /* Solid Orange */
    color: var(--primary-color); /* Dark text on orange */
    border: 2px solid var(--secondary-color);
    transition: color 0.4s ease;
}
.btn-hero-primary::before {
    background: var(--primary-color); /* Fill with primary color on hover */
}
.btn-hero-primary:hover {
    color: var(--white-color); /* White text on dark hover */
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.btn-hero-secondary {
    background-color: transparent;
    color: var(--secondary-color); /* Orange outline */
    border: 2px solid var(--secondary-color);
    transition: color 0.4s ease;
}
.btn-hero-secondary::before {
    background: var(--secondary-color); /* Fill with orange on hover */
}
.btn-hero-secondary:hover {
    color: var(--primary-color); /* Dark text on orange hover */
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}


/* Larger button size for hero section, etc. */
.btn-large {
    padding: 1.2rem 3rem;
    font-size: 1.2rem;
}
.btn-small { /* For cookie consent banner */
    padding: 0.7rem 1.5rem;
    font-size: 0.9rem;
}


/*---------------------------------------------------------------------*/
/* 2. HEADER & NAVIGATION (Artistic Update)                          */
/*---------------------------------------------------------------------*/

.main-header {
    /* Slightly more opaque initial background for better shimmer contrast */
    background-color: rgba(255, 255, 255, 0.9);
    padding: 2.2rem 0; /* Slightly more initial padding for a bolder feel */
    border-bottom: 1px solid var(--border-default);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-header);
    transition: background-color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease, filter 0.4s ease, transform 0.4s ease; /* Added filter and transform to transition */
    backdrop-filter: blur(12px); /* Slightly stronger blur */
    -webkit-backdrop-filter: blur(12px);

    /* Subtle SVG Noise Pattern - makes it less flat and animates it */
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    background-size: 100px 100px;
    background-blend-mode: multiply; /* Blends noise with the background color */
    animation: headerNoiseMove 30s linear infinite alternate; /* Continuous subtle background movement */
}

/* Dark mode header background with different noise opacity */
body.dark-mode .main-header {
    background-color: rgba(30, 30, 30, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23333' fill-opacity='0.4' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E"); /* Slightly higher opacity for darker noise */
}

/* Keyframes for continuous header noise movement */
@keyframes headerNoiseMove {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}


/* Animation for subtle "digital shimmer/glitch" on scroll */
@keyframes headerShimmer {
    0% { filter: brightness(1) saturate(1) skewX(0deg); transform: translateY(0); }
    25% { filter: brightness(1.1) saturate(1.2); transform: translateY(-1px) skewX(0.5deg); } /* Noticeable boost */
    50% { filter: brightness(0.95) saturate(0.9); transform: translateY(1px) skewX(-0.5deg); } /* Slight dip/shift */
    75% { filter: brightness(1.05) saturate(1.1); transform: translateY(-0.5px) skewX(0.2deg); }
    100% { filter: brightness(1) saturate(1) skewX(0deg); transform: translateY(0); }
}

/* Shrink header on scroll - applies the shimmer briefly */
.main-header.scrolled {
    padding: 1.1rem 0; /* Reduced padding on scroll */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    /* Apply the shimmer animation only when scrolled class is added */
    animation: headerShimmer 0.6s ease-in-out forwards; /* Longer duration to notice effect */
}

body.dark-mode .main-header.scrolled {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* Ensure the animation resets for when the class is removed to allow re-triggering */
.main-header:not(.scrolled) {
    animation-name: headerNoiseMove; /* Only noise movement when not scrolled */
}


/* Adjust top padding for hero section to account for fixed header.
   This will be dynamically set by JS on load and resize. */
.hero-section {
    /* padding-top will be set by JS dynamically */
    transition: padding-top 0.4s ease; /* Smooth transition if header height changes */
}


.main-header .container {
    display: flex;
    justify-content: space-between; /* Logo on left, nav on right */
    align-items: center; /* Vertically align items */
    padding: 0 var(--spacing-lg); /* Adjusted padding for more space on the left */
}

.logo a {
    font-family: var(--font-heading);
    font-size: 2.4rem; /* Slightly larger logo for more presence */
    font-weight: 700;
    color: var(--text-color-primary); /* Use primary text color */
    text-decoration: none;
    letter-spacing: -1.5px; /* Tighter letter spacing for logo */
    transition: color 0.5s ease; /* Smooth transition */
}

.logo span {
    color: var(--secondary-color); /* Accent color for 'Solutions' */
}

.main-nav ul {
    display: flex;
    gap: var(--spacing-md); /* Space between nav items */
}

.main-nav a {
    color: var(--text-color-secondary); /* Use secondary text color */
    font-weight: 600; /* Bolder navigation links */
    font-size: 1.05rem; /* Slightly larger text for nav links */
    transition: color 0.3s ease, transform 0.2s ease;
    padding: 5px 0; /* Padding for hover effect area */
    position: relative; /* For underline animation */
}

/* Active navigation link style */
.main-nav a.active,
.main-nav a:hover {
    color: var(--text-color-primary); /* Primary text color on active/hover */
    transform: translateY(-3px); /* Subtle lift on hover */
}

/* Underline effect for standard nav links (not buttons) */
.main-nav a:not(.btn)::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0; /* Start with no width */
    height: 4px; /* Slightly thicker underline */
    background-color: var(--secondary-color);
    transition: width 0.3s ease; /* Animate width on hover */
    border-radius: 2px;
}

.main-nav a:not(.btn):hover::after,
.main-nav a.active:not(.btn)::after { /* Apply underline to active state as well */
    width: 100%; /* Expand to full width on hover */
}

/* Styling for "Contact" link now that it's not a button */
.main-nav a[href="#contact"] {
    /* Inherit base nav link styles, override button specific styles */
    padding: 5px 0; /* Align with other nav links */
    border: none; /* Ensure no border */
    background: none; /* Ensure no background */
    color: var(--text-color-secondary); /* Inherit default nav link color */
    /* Remove any button-specific hover effects like ::before overlay */
}
.main-nav a[href="#contact"]::before {
    display: none; /* Hide the overlay effect for this link */
}
/* Ensure hover/active states for contact link are consistent with other nav links */
.main-nav a[href="#contact"]:hover,
.main-nav a[href="#contact"].active {
    color: var(--text-color-primary);
    transform: translateY(-3px);
    box-shadow: none; /* Remove button shadow */
}
.main-nav a[href="#contact"]:hover::after,
.main-nav a[href="#contact"].active::after {
    width: 100%; /* Keep the underline effect */
}


/* Dark Mode Toggle Button Styling */
.dark-mode-toggle {
    background-color: transparent;
    border: none;
    color: var(--text-color-primary);
    font-size: 1.4rem;
    cursor: pointer;
    margin-left: var(--spacing-md);
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex; /* To center icon */
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 50%;
}
.dark-mode-toggle:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
}
.dark-mode-toggle:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}


/* Hamburger Menu Toggle */
.menu-toggle {
    display: none; /* Hidden by default on desktop */
    width: 30px;
    height: 20px;
    position: relative;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1001; /* Above nav when open */
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--text-color-primary); /* Hamburger color adjusts with theme */
    border-radius: 2px;
    transition: all 0.3s ease, background-color 0.5s ease;
}

.hamburger::before {
    position: absolute;
    top: -8px;
}

.hamburger::after {
    position: absolute;
    top: 8px;
}

/* Animation for active hamburger */
.menu-toggle.active .hamburger {
    background-color: transparent;
}

.menu-toggle.active .hamburger::before {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .hamburger::after {
    transform: translateY(-8px) rotate(-45deg);
}


/*---------------------------------------------------------------------*/
/* 3. HERO SECTION                                                     */
/*---------------------------------------------------------------------*/

.hero-section {
    /* Background with linear gradient overlay for text readability */
    background: linear-gradient(to right, var(--hero-overlay-start), var(--hero-overlay-end)),
                url('https://images.unsplash.com/photo-1510519138101-570d1dca3d66?q=80&w=2069&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D') no-repeat center center/cover;
    color: var(--white-color);
    text-align: center;
    padding: var(--spacing-xxl) 0;
    min-height: 650px; /* Ensures a good height */
    display: flex;
    flex-direction: column; /* Stack particles and container */
    align-items: center; /* Vertically center content */
    justify-content: center; /* Horizontally center content */
    position: relative;
    overflow: hidden; /* Important for containing any parallax or animation effects */
    transition: background-color 0.5s ease; /* For gradient background change */
}

/* Particles.js container styling */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0; /* Below all other hero content */
}

/* Subtle animated background overlay for hero (above particles, below text) */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(245, 145, 13, 0.1), var(--hero-bg-color)); /* Animates with hero bg color */
    background-size: 200% 200%;
    animation: moveGradient 15s ease infinite alternate; /* Animates the gradient */
    z-index: 1; /* Above particles, below text */
}
.hero-section .container {
    position: relative;
    z-index: 2; /* Ensure text and buttons are above all overlays */
}

@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}


.hero-section h1 {
    color: var(--hero-text-color); /* Explicitly white text for hero */
    font-size: 3.8rem; /* Adjusted from 4.2rem to 3.8rem */
    margin-bottom: var(--spacing-sm);
    text-shadow: 3px 3px 6px rgba(0,0,0,0.4); /* Stronger text shadow for contrast */
    font-weight: 700;
}

.hero-section h1:hover {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 30px rgba(245, 145, 13, 0.7); /* White and orange glow on hover */
    color: var(--white-color);
}


.hero-section .lead-text {
    color: var(--hero-text-color); /* Explicitly white text for hero */
    font-size: 1.4rem; /* Adjusted from 1.5rem to 1.4rem */
    margin-bottom: var(--spacing-lg);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    opacity: 0.95; /* Slightly transparent for softness */
    font-weight: 300; /* Lighter font weight for lead text */
}

.hero-section .hero-buttons .btn {
    margin: 0 var(--spacing-sm); /* Space between the two hero buttons */
}


/*---------------------------------------------------------------------*/
/* 4. SERVICES SECTION (Icon Update)                                   */
/*---------------------------------------------------------------------*/

.services-grid {
    display: grid;
    /* Responsive grid: columns will automatically fit, min 280px wide */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg); /* Space between grid items */
    margin-top: var(--spacing-xxl); /* Space below section description */
}

.service-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-default);
    border-radius: 15px;
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--shadow-light);
    /* Smooth transition for hover effects */
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease, background-color 0.5s ease;
    position: relative;
    overflow: hidden;
    /* Inner border effect on hover */
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 3px solid transparent;
    border-radius: 15px;
    transition: border-color 0.4s ease, transform 0.4s ease, opacity 0.4s ease;
    pointer-events: none; /* Allows clicks to pass through */
    opacity: 0;
    transform: scale(0.95);
    z-index: 2; /* Above content, below card */
}

.service-item:hover {
    transform: translateY(-10px); /* Lifts item significantly on hover */
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color); /* Accent border on hover */
}

.service-item:hover::before {
    border-color: var(--secondary-color);
    transform: scale(1);
    opacity: 1;
}

.service-item h3 {
    color: var(--text-color-primary);
    font-size: 1.6rem; /* Adjusted from 1.7rem to 1.6rem */
    margin-bottom: var(--spacing-xs);
    font-weight: 700;
}

.service-item p {
    font-size: 0.95rem; /* Adjusted from 1rem to 0.95rem */
    line-height: 1.6;
    color: var(--text-color-secondary);
}

/* Circular icon background for service items - UPDATED */
.icon-circle {
    width: 90px;
    height: 90px;
    background-color: transparent; /* Transparent background */
    border: 5px solid var(--secondary-color); /* Thick orange border */
    border-radius: 50%; /* Makes it a perfect circle */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md); /* Centers and adds space below */
    color: var(--primary-color); /* Icon color - explicitly primary color */
    font-size: 2.8rem; /* Icon size */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); /* Shadow for the circle */
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease; /* Added background and color transition */
    position: relative; /* For inner glow */
    overflow: hidden;
}

.service-item:hover .icon-circle {
    transform: translateY(-5px) scale(1.05); /* Slight lift and scale */
    border-color: var(--primary-color); /* Border changes to primary on hover */
    background-color: var(--secondary-color); /* Background fills with secondary color */
    color: var(--white-color); /* Icon color changes to white on hover */
    box-shadow: 0 8px 25px rgba(245, 145, 13, 0.5); /* Glowing shadow on hover */
}


/*---------------------------------------------------------------------*/
/* 5. ANIMATED STATISTICS SECTION (NEW)                                */
/*---------------------------------------------------------------------*/
.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.statistic-item {
    background-color: var(--card-bg);
    padding: var(--spacing-md);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease;
    position: relative;
    overflow: hidden;
}

.statistic-item::after { /* Subtle overlay on hover */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(7, 14, 55, 0.05), rgba(245, 145, 13, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.statistic-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}
.statistic-item:hover::after {
    opacity: 1;
}

.statistic-item .counter-value {
    font-family: var(--font-heading);
    font-size: 3rem; /* Adjusted from 3.2rem to 3rem */
    font-weight: 700;
    color: var(--secondary-color); /* Bright accent color for numbers */
    display: block;
    margin-bottom: var(--spacing-xs);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}
.statistic-item:hover .counter-value {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(7, 14, 55, 0.4);
}


.statistic-item h3 {
    font-size: 1.4rem; /* Adjusted from 1.5rem to 1.4rem */
    margin-bottom: var(--spacing-xs);
    color: var(--text-color-primary);
}

.statistic-item p {
    font-size: 0.85rem; /* Adjusted from 0.9rem to 0.85rem */
    color: var(--light-text-color);
}


/*---------------------------------------------------------------------*/
/* 6. WHY CHOOSE US SECTION                                            */
/*---------------------------------------------------------------------*/

.why-choose-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xxl);
}

.why-item {
    text-align: center;
    padding: var(--spacing-lg);
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease;
    position: relative;
    overflow: hidden;
}

.why-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.why-item::before { /* Border highlight on hover */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: 15px;
    transition: border-color 0.3s ease;
    pointer-events: none;
    z-index: 1;
}
.why-item:hover::before {
    border-color: var(--primary-color);
}


/* Smaller circular icons for this section - UPDATED */
.icon-small-circle {
    width: 70px;
    height: 70px;
    background-color: transparent; /* Transparent background */
    border: 3px solid var(--primary-color); /* Primary color border */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-sm);
    color: var(--secondary-color); /* Icon color - explicitly secondary */
    font-size: 2rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, border-color 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}
.why-item:hover .icon-small-circle {
    transform: scale(1.1);
    border-color: var(--secondary-color); /* Border changes to secondary on hover */
    background-color: var(--primary-color); /* Background fills with primary */
    color: var(--white-color); /* Icon color changes to white */
    box-shadow: 0 5px 20px rgba(7, 14, 55, 0.4); /* Glowing shadow on hover */
}


.why-item h3 {
    font-size: 1.5rem; /* Adjusted from 1.6rem to 1.5rem */
    color: var(--text-color-primary);
    margin-bottom: var(--spacing-xs);
}

.why-item p {
    font-size: 0.9rem; /* Adjusted from 0.95rem to 0.9rem */
    color: var(--text-color-secondary);
    line-height: 1.6;
}


/*---------------------------------------------------------------------*/
/* 7. CALL TO ACTION SECTION                                           */
/*---------------------------------------------------------------------*/

.cta-section {
    text-align: center;
    /* Gradient background using primary color */
    background: linear-gradient(135deg, var(--primary-color), #1b2f8a, #070e37); /* More complex gradient */
    background-size: 400% 400%; /* Larger background for animation */
    animation: gradientShift 15s ease infinite alternate; /* Animated gradient */
    color: var(--white-color);
    padding: var(--spacing-xxl) 0;
    position: relative;
    overflow: hidden;
    transition: background 0.5s ease; /* For dark mode transition */
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


.cta-section h2 {
    color: var(--white-color);
    font-size: 2.6rem; /* Adjusted from 2.8rem to 2.6rem */
    margin-bottom: var(--spacing-sm);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}

.cta-section .lead-text {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-xl);
    font-size: 1.15rem; /* Adjusted from 1.2rem to 1.15rem */
}


/*---------------------------------------------------------------------*/
/* 8. PORTFOLIO SECTION (Only on portfolio.html now)                   */
/*---------------------------------------------------------------------*/

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xxl);
}

.portfolio-item {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden; /* Ensures image zoom stays within bounds */
    box-shadow: var(--shadow-light);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), background-color 0.5s ease;
    display: flex;
    flex-direction: column; /* Stacks image and info vertically */
    position: relative;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.portfolio-item img {
    width: 100%;
    height: 280px; /* Fixed height for consistent look */
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1); /* Slower, more pronounced zoom */
    position: relative; /* For pseudo-element overlay */
    z-index: 0;
}

/* Subtle Duotone/Color Overlay for portfolio images */
.portfolio-item::before { /* Use ::before on the item itself for full overlay */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top right, var(--primary-color), var(--secondary-color)); /* Your brand colors */
    mix-blend-mode: multiply; /* Blends colors with the image */
    opacity: 0; /* Hidden by default */
    transition: opacity 0.5s ease-in-out;
    z-index: 1; /* Above image, below info */
}
.portfolio-item:hover::before {
    opacity: 0.3; /* Show overlay on hover */
}


.portfolio-item:hover img {
    transform: scale(1.15); /* More significant zoom on hover */
}

.portfolio-info {
    padding: var(--spacing-md);
    flex-grow: 1; /* Allows info block to expand to fill space */
}

.portfolio-item h3 {
    font-size: 1.45rem; /* Adjusted from 1.5rem to 1.45rem */
    margin-top: 0;
    margin-bottom: var(--spacing-xs);
    color: var(--text-color-primary);
}

.portfolio-item p {
    font-size: 0.9rem; /* Adjusted from 0.95rem to 0.9rem */
    color: var(--text-color-secondary);
    line-height: 1.5;
}

.read-more-link {
    display: inline-block;
    margin-top: var(--spacing-xs);
    font-weight: 600;
    color: var(--secondary-color);
    transition: color 0.3s ease, transform 0.3s ease;
}

.read-more-link:hover {
    color: var(--primary-color);
    transform: translateX(5px); /* Moves link slightly on hover */
}
.read-more-link i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}
.read-more-link:hover i {
    transform: translateX(3px); /* Moves arrow slightly on hover */
}


/*---------------------------------------------------------------------*/
/* 9. CLIENT TESTIMONIALS SECTION (NOW A SWIPER CAROUSEL)              */
/*---------------------------------------------------------------------*/

/* Testimonials grid (now Swiper-specific) */
.mySwiper {
    width: 100%;
    height: auto; /* Adjust height based on content */
    margin-top: var(--spacing-xxl);
    padding-bottom: var(--spacing-lg); /* Space for pagination dots */
    overflow: hidden; /* Ensure content is clipped by swiper */
}

.testimonials-grid { /* This is now the swiper-wrapper */
    display: flex; /* Swiper makes it flex */
}

.testimonial-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-light);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease;
    display: flex;
    flex-direction: column; /* Stacks content vertically */
    align-items: center; /* Centers content horizontally */
    height: auto; /* Allow card height to be dynamic */
    box-sizing: border-box; /* Include padding in height */
    /* Swiper slide specific styles */
    min-height: 300px; /* Minimum height for cards */
    padding: var(--spacing-xl);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.testimonial-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--secondary-color); /* Accent border around avatar */
    margin-bottom: var(--spacing-sm);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    filter: saturate(0) brightness(1.1); /* Desaturate for a uniform look */
    transition: filter 0.4s ease;
}

.testimonial-card:hover .testimonial-avatar {
    filter: saturate(1) brightness(1.2); /* Bring back some color or lighten on hover */
}

.quote {
    font-size: 1.05rem; /* Adjusted from 1.1rem to 1.05rem */
    font-style: italic; /* Italicize quotes */
    color: var(--text-color-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
}

.client-name {
    font-weight: 700;
    color: var(--text-color-primary);
    font-size: 0.95rem; /* Adjusted from 1rem to 0.95rem */
    margin-top: auto; /* Pushes name to bottom if quotes have varying lengths */
}

/* Swiper Navigation and Pagination */
.swiper-button-next,
.swiper-button-prev {
    color: var(--secondary-color); /* Bright color for arrows */
    width: 40px;
    height: 40px;
    background-color: var(--primary-color); /* Dark background for arrows */
    border-radius: 50%;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
    background-color: var(--secondary-color); /* Invert colors on hover */
    color: var(--primary-color);
}
.swiper-button-next::after,
.swiper-button-prev::after {
    font-size: 1.2rem;
    font-weight: 900; /* Make arrow icon bolder */
}

.swiper-pagination-bullet {
    background: var(--border-default); /* Default dot color */
    opacity: 1;
    transition: background-color 0.3s ease;
}
.swiper-pagination-bullet-active {
    background: var(--secondary-color); /* Active dot color */
}


/*---------------------------------------------------------------------*/
/* 10. PRICING SECTION (NEW)                                           */
/*---------------------------------------------------------------------*/
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    align-items: stretch; /* Ensures cards in a row have equal height */
}

.pricing-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    text-align: center;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Pushes button to bottom */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease, background-color 0.5s ease;
    border: 2px solid transparent; /* Default transparent border */
}

.pricing-card.featured {
    border-color: var(--secondary-color); /* Highlight for featured card */
    transform: translateY(-10px) scale(1.02); /* Lift and slight scale for featured */
    box-shadow: 0 10px 30px rgba(245, 145, 13, 0.2); /* Stronger, colored shadow */
}

.pricing-card.featured .card-header {
    background: linear-gradient(to right, var(--primary-color), #1b2f8a); /* Gradient for featured header */
    color: var(--white-color);
    padding: var(--spacing-md);
    margin: calc(-1 * var(--spacing-lg)) calc(-1 * var(--spacing-lg)) var(--spacing-lg) calc(-1 * var(--spacing-lg)); /* Extend to edges */
    border-top-left-radius: 13px;
    border-top-right-radius: 13px;
    position: relative;
    overflow: hidden;
}

body.dark-mode .pricing-card.featured .card-header {
    background: linear-gradient(to right, #0d1230, #0a1120); /* Darker gradient for dark mode featured */
}


.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color); /* Highlight border on hover */
}
.pricing-card.featured:hover { /* Override hover for featured to be more subtle */
    border-color: var(--secondary-color);
    transform: translateY(-12px) scale(1.03); /* Slightly more lift */
    box-shadow: 0 12px 35px rgba(245, 145, 13, 0.3);
}


.pricing-card .card-header h3 {
    font-size: 1.7rem; /* Adjusted from 1.8rem to 1.7rem */
    margin-bottom: var(--spacing-xs);
    color: inherit; /* Inherit color from card-header */
}

.pricing-card .price {
    font-family: var(--font-heading);
    font-size: 3rem; /* Adjusted from 3.2rem to 3rem */
    font-weight: 700;
    color: var(--primary-color); /* Primary for price */
    margin-bottom: var(--spacing-md);
    line-height: 1;
}
.pricing-card.featured .price {
    color: var(--secondary-color); /* Orange for price in featured card */
}

.pricing-card .price span {
    font-size: 0.9rem; /* Adjusted from 0.95rem to 0.9rem */
    font-weight: 400;
    color: var(--light-text-color);
}
.pricing-card.featured .price span {
    color: rgba(255, 255, 255, 0.8); /* Lighter text for span in featured */
}

.pricing-card .card-body ul {
    text-align: left;
    margin-bottom: var(--spacing-lg);
    flex-grow: 1; /* Allows list to take up available space */
}

.pricing-card .card-body li {
    padding: 8px 0;
    font-size: 0.95rem; /* Adjusted from 1rem to 0.95rem */
    color: var(--text-color-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px dashed var(--border-default);
}
.pricing-card .card-body li:last-child {
    border-bottom: none;
}

.pricing-card .card-body li i {
    color: var(--success-color); /* Checkmark green */
    font-size: 1.1rem;
}
.pricing-card .card-body li.faded i {
    color: var(--error-color); /* Cross red */
}
.pricing-card .card-body li.faded {
    opacity: 0.6; /* Fade out unavailable features */
    text-decoration: line-through;
}

.pricing-card .btn {
    width: 100%; /* Make button full width of card */
    margin-top: auto; /* Push button to the bottom */
}

.pricing-card .tag { /* For "Most Popular", "Recommended" */
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.pricing-card.featured .card-header .tag {
    position: absolute;
    top: -10px; /* Adjust position */
    right: 20px;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 8px 20px;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    font-size: 0.9rem;
    box-shadow: none; /* Remove shadow from tag itself on featured */
}


.note-section {
    margin-top: var(--spacing-xxl);
    font-size: 1rem; /* Adjusted from 1.05rem to 1rem */
    color: var(--light-text-color);
}
.note-section a {
    font-weight: 600;
}


/*---------------------------------------------------------------------*/
/* 11. INTERACTIVE FAQ SECTION                                         */
/*---------------------------------------------------------------------*/
.accordion-container {
    max-width: 800px;
    margin: var(--spacing-lg) auto;
    border: 1px solid var(--border-default);
    border-radius: 12px;
    overflow: hidden; /* Ensures rounded corners clip internal borders */
    box-shadow: var(--shadow-light);
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.accordion-item {
    border-bottom: 1px solid var(--border-default);
    transition: background-color 0.3s ease, border-color 0.5s ease;
}

.accordion-item:last-child {
    border-bottom: none; /* No border on the last item */
}

.accordion-header {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: var(--card-bg);
    color: var(--text-color-primary);
    font-size: 1.05rem; /* Adjusted from 1.1rem to 1.05rem */
    font-weight: 600;
    text-align: left;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.accordion-header:hover,
.accordion-header[aria-expanded="true"] {
    background-color: var(--section-alt-bg);
    color: var(--primary-color);
}

.accordion-header:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: -2px;
}


.accordion-icon {
    margin-left: var(--spacing-sm);
    transition: transform 0.3s ease;
}

.accordion-header[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg); /* Rotate arrow when expanded */
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out; /* Animate height and padding */
    padding: 0 var(--spacing-lg); /* Padding always applies, height transition shows it */
    background-color: var(--card-bg); /* Same as header, or slightly different */
    border-top: 1px solid var(--border-default); /* Separator */
}

.accordion-content p {
    padding-bottom: var(--spacing-md); /* Add padding to text within content */
    margin-bottom: 0; /* Remove default paragraph margin */
    color: var(--text-color-secondary);
    font-size: 0.9rem; /* Adjusted from 0.95rem to 0.9rem */
}

.accordion-item.active .accordion-content {
    max-height: 500px; /* Adjust based on expected maximum content height */
    padding-top: var(--spacing-md);
}

/* Dark mode adjustments for accordion */
body.dark-mode .accordion-header {
    color: var(--text-color-primary);
}
body.dark-mode .accordion-header:hover,
body.dark-mode .accordion-header[aria-expanded="true"] {
    background-color: #333; /* Darker background for expanded/hovered in dark mode */
    color: var(--secondary-color);
}
body.dark-mode .accordion-content {
    background-color: var(--card-bg);
    border-top-color: #333;
}


/*---------------------------------------------------------------------*/
/* 12. BLOG/LATEST ARTICLES SECTION (Full list on blog.html, teaser on index.html) */
/*---------------------------------------------------------------------*/
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xxl);
}

.blog-post-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.blog-post-card::before { /* Subtle border glow on hover */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 2px solid transparent;
    border-radius: 12px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    pointer-events: none;
    z-index: 1;
}
.blog-post-card:hover::before {
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(245, 145, 13, 0.4); /* Soft glow */
}


.blog-post-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.blog-post-card:hover img {
    transform: scale(1.05);
}

.post-info {
    padding: var(--spacing-md);
    flex-grow: 1;
}

.post-info h4 {
    font-size: 1.25rem; /* Adjusted from 1.3rem to 1.25rem */
    margin-top: 0;
    margin-bottom: var(--spacing-xs);
}

.post-info h4 a {
    color: var(--text-color-primary);
    transition: color 0.3s ease;
}
.post-info h4 a:hover {
    color: var(--secondary-color);
}

.post-meta {
    font-size: 0.8rem; /* Adjusted from 0.85rem to 0.8rem */
    color: var(--light-text-color);
    margin-bottom: var(--spacing-sm);
    font-style: italic;
    transition: color 0.5s ease;
}

.blog-post-card p {
    font-size: 0.9rem; /* Adjusted from 0.95rem to 0.9rem */
    color: var(--text-color-secondary);
    line-height: 1.5;
}


/*---------------------------------------------------------------------*/
/* 13. CONTACT FORM SECTION                                            */
/*---------------------------------------------------------------------*/

.contact-form {
    max-width: 750px;
    margin: var(--spacing-lg) auto;
    background-color: var(--card-bg);
    padding: var(--spacing-xl);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    transition: background-color 0.5s ease, box-shadow 0.5s ease;
}

.form-group {
    margin-bottom: var(--spacing-md); /* Space between form fields */
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--text-color-primary);
    font-size: 0.95rem; /* Adjusted from 1rem to 0.95rem */
    transition: color 0.5s ease;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="subject"],
.form-group textarea {
    width: 100%;
    padding: 1.1rem;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    font-size: var(--font-size-base);
    font-family: var(--font-body);
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background-color 0.5s ease, color 0.5s ease;
    background-color: var(--input-bg);
    color: var(--text-color-secondary);
}

/* Improved form element focus state */
.form-group input:focus,
.form-group textarea:focus {
    outline: none; /* Remove default outline */
    border-color: var(--secondary-color); /* Orange border on focus */
    box-shadow: 0 0 0 5px rgba(245, 145, 13, 0.25); /* Stronger glow effect on focus */
    background-color: var(--card-bg); /* White/card bg on focus */
}

.form-group textarea {
    resize: vertical; /* Allow vertical resizing only */
    min-height: 150px;
}

.contact-form button.btn-primary {
    width: 100%;
    padding: 1.3rem; /* Adjusted from 1.4rem to 1.3rem */
    font-size: 1.15rem; /* Adjusted from 1.2rem to 1.15rem */
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 700;
}

/* Error and success messages for form validation */
.error-message {
    color: var(--error-color);
    font-size: 0.9rem;
    margin-top: 5px;
    display: none; /* Hidden by default, shown by JS */
}
.form-group.error input,
.form-group.error textarea,
.form-group.error .rating { /* Also apply error to rating group */
    border-color: var(--error-color);
}
.form-group.error .rating {
     box-shadow: 0 0 0 1px var(--error-color);
     padding: 5px; /* Add padding for shadow to be visible */
     border-radius: 8px;
}


.form-message {
    margin-top: var(--spacing-md);
    padding: var(--spacing-sm);
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.form-message.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    opacity: 1;
    visibility: visible;
}

.form-message.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
    opacity: 1;
    visibility: visible;
}


/*---------------------------------------------------------------------*/
/* 14. FOOTER                                                          */
/*---------------------------------------------------------------------*/

.main-footer {
    background-color: var(--footer-bg); /* Use footer bg variable */
    color: var(--footer-text); /* Use footer text variable */
    padding: var(--spacing-lg) 0;
    text-align: center;
    border-top: 5px solid var(--secondary-color); /* Accent color border at the top */
    transition: background-color 0.5s ease, color 0.5s ease;
}

.main-footer .container {
    display: flex;
    flex-direction: column; /* Stack items vertically */
    align-items: center; /* Center items horizontally */
    gap: var(--spacing-sm); /* Space between footer elements */
}

.main-footer p {
    margin-bottom: 0;
    font-size: 0.85rem; /* Adjusted from 0.9rem to 0.85rem */
    color: inherit; /* Inherit color from parent for dark mode */
}

.footer-links a {
    color: var(--white-color);
    margin: 0 var(--spacing-xs);
    opacity: 0.9;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--secondary-color); /* Change link color on hover */
}

/* Social Icons in Footer */
.social-icons {
    margin-top: var(--spacing-sm);
    display: flex;
    gap: var(--spacing-md);
}

.social-icons a {
    color: var(--white-color);
    font-size: 1.35rem; /* Adjusted from 1.4rem to 1.35rem */
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-icons a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px) scale(1.1);
}


/*---------------------------------------------------------------------*/
/* 15. PROJECT MODAL STYLES (now only applies to portfolio.html)       */
/*---------------------------------------------------------------------*/

.modal {
    display: none; /* Hidden by default in CSS, managed by JS */
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top (higher than header) */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if content is too long */
    background-color: rgba(0, 0, 0, 0.8); /* Black w/ opacity */
    display: flex; /* Use flexbox to center content */
    align-items: center; /* Center vertically */
    justify-content: center; /* Horizontally center content */
    opacity: 0; /* Start invisible for animation */
    pointer-events: none; /* Allows clicks through when hidden */
    transition: opacity 0.3s ease-in-out; /* Fade in/out effect */
}

.modal.active {
    opacity: 1;
    pointer-events: all; /* Enable clicks when active */
    display: flex; /* Ensure it's displayed when active */
}

.modal-content {
    background-color: var(--card-bg); /* Use card-bg for modal */
    margin: auto;
    padding: var(--spacing-lg);
    border-radius: 12px;
    width: 90%; /* Responsive width */
    max-width: 800px; /* Max width for large screens */
    box-shadow: var(--shadow-hover); /* Stronger shadow for modal */
    position: relative;
    transform: translateY(20px); /* Start slightly below for animation */
    transition: transform 0.3s ease-in-out, background-color 0.5s ease; /* Slide in/out effect, dark mode */
}

.modal.active .modal-content {
    transform: translateY(0); /* Slide to original position */
}


.modal-content img {
    width: 100%;
    max-height: 400px; /* Limit image height */
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: var(--spacing-md);
}

.modal-content h3 {
    font-size: 1.9rem; /* Adjusted from 2rem to 1.9rem */
    color: var(--text-color-primary);
    margin-bottom: var(--spacing-sm);
}

.modal-content p {
    font-size: 1.05rem; /* Adjusted from 1.1rem to 1.05rem */
    color: var(--text-color-secondary);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
}

.close-button {
    color: var(--text-color-primary);
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover,
.close-button:focus {
    color: var(--secondary-color);
    text-decoration: none;
    cursor: pointer;
}

.modal-cta-btn {
    width: auto; /* Allow button to size naturally */
    padding: 0.9rem 2.2rem;
    font-size: 1rem;
}


/*---------------------------------------------------------------------*/
/* 16. BACK TO TOP BUTTON                                              */
/*---------------------------------------------------------------------*/

.back-to-top {
    position: fixed;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    background-color: var(--secondary-color);
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-light);
    opacity: 0; /* Hidden by default */
    visibility: hidden; /* Hidden by default */
    transform: translateY(100px); /* Slide in from bottom */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 999; /* Below modal, above content */
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--primary-color); /* Primary color on hover */
    color: var(--white-color);
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-hover);
}


/*---------------------------------------------------------------------*/
/* 17. RESPONSIVE DESIGN (MEDIA QUERIES)                               */
/*---------------------------------------------------------------------*/

/* Large devices (laptops, desktops) */
@media (max-width: 992px) {
    h1 { font-size: 2.8rem; } /* Adjusted from 3rem to 2.8rem */
    h2 { font-size: 2.1rem; } /* Adjusted from 2.2rem to 2.1rem */
    .section-title { font-size: 2.1rem; } /* Adjusted from 2.2rem to 2.1rem */
    .hero-section h1 { font-size: 3.5rem; } /* Adjusted from 3.8rem to 3.5rem */
    .page-hero-section h1 { font-size: 3rem;} /* Adjusted from 3.2rem to 3rem */
    .hero-section .lead-text, .page-hero-section .lead-text { font-size: 1.25rem; } /* Adjusted from 1.3rem to 1.25rem */
    .main-nav ul {
        gap: var(--spacing-sm); /* Reduce gap in nav for narrower screens */
    }
    .statistic-item .counter-value {
        font-size: 2.6rem; /* Adjusted from 2.8rem to 2.6rem */
    }
    .pricing-card .card-header h3 {
        font-size: 1.5rem; /* Adjusted from 1.6rem to 1.5rem */
    }
    .pricing-card .price {
        font-size: 2.6rem; /* Adjusted from 2.8rem to 2.6rem */
    }
    .pricing-card .card-body li {
        font-size: 0.9rem; /* Adjusted from 0.95rem to 0.9rem */
    }
}

/* Medium devices (tablets, small desktops) */
@media (max-width: 768px) {
    .main-header .container {
        /* Revert to row for header to allow hamburger to be separate */
        flex-direction: row;
        justify-content: space-between;
        padding: 0 var(--spacing-md); /* Adjust padding for mobile */
    }
    /* Mobile header less padding, no noise animation to save performance */
    .main-header {
        padding: 1.5rem 0; /* Adjust initial padding for mobile */
        animation: none !important; /* Disable noise animation for mobile header to improve performance */
    }
    .main-header.scrolled {
        padding: 1rem 0; /* Even smaller padding when scrolled on mobile */
    }


    .main-nav {
        position: fixed;
        top: 0;
        left: -100%; /* Off-screen by default */
        width: 100%;
        height: 100%;
        background-color: rgba(7, 14, 55, 0.95); /* Dark overlay for mobile nav */
        transition: left 0.4s ease-in-out;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 998; /* Below modal, above content */
    }
    body.dark-mode .main-nav {
        background-color: rgba(0, 0, 0, 0.95); /* Darker overlay in dark mode */
    }

    .main-nav.active {
        left: 0; /* Slide in */
    }

    .main-nav ul {
        flex-direction: column; /* Stack nav links vertically */
        gap: var(--spacing-md);
        margin-top: 0;
        width: 100%;
        text-align: center;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        display: block;
        padding: 15px 0;
        font-size: 1.35rem; /* Adjusted from 1.4rem to 1.35rem */
        color: var(--white-color); /* White text on dark mobile nav */
        transition: color 0.3s ease, background-color 0.3s ease;
    }

    .main-nav a:not(.btn)::after {
        background-color: var(--secondary-color); /* Accent underline on mobile */
    }
    .main-nav a:not(.btn):hover::after,
    .main-nav a.active:not(.btn)::after {
        background-color: var(--secondary-color);
    }


    .main-nav a.btn { /* Still apply button styles if any btn class is explicitly used */
        margin-top: var(--spacing-md);
        width: 80%; /* Make button wider for mobile */
        margin-left: auto;
        margin-right: auto;
    }

    .menu-toggle {
        display: flex; /* Show hamburger on mobile */
    }
    .dark-mode-toggle {
        order: -1; /* Place dark mode toggle before logo on mobile */
        margin-right: var(--spacing-md);
        margin-left: 0;
    }


    .hero-section, .page-hero-section {
        min-height: 500px;
        padding: var(--spacing-lg) 0;
        /* Padding-top handled by JS */
    }
    .hero-section h1, .page-hero-section h1 {
        font-size: 2.6rem; /* Adjusted from 2.8rem to 2.6rem */
    }
    .hero-section .lead-text, .page-hero-section .lead-text {
        font-size: 1.05rem; /* Adjusted from 1.1rem to 1.05rem */
    }
    .hero-section .hero-buttons .btn { /* Target hero buttons specifically */
        display: block; /* Stack hero buttons */
        margin-bottom: var(--spacing-sm);
        width: 80%;
        margin-left: auto;
        margin-right: auto;
    }

    .section-padding {
        padding: var(--spacing-lg) 0; /* Adjust section padding */
    }

    .section-title {
        font-size: 1.9rem; /* Adjusted from 2rem to 1.9rem */
    }
    .section-description {
        font-size: 0.95rem; /* Adjusted from 1rem to 0.95rem */
    }

    /* Stack all grid layouts into a single column, but not Swiper */
    .services-grid,
    .why-choose-us-grid,
    .portfolio-grid,
    .blog-grid,
    .statistics-grid, /* Added for responsive statistics */
    .pricing-grid { /* Added for responsive pricing */
        grid-template-columns: 1fr;
    }

    /* Add side padding to grid items when stacked */
    .service-item,
    .why-item,
    .portfolio-item,
    .blog-post-card,
    .statistic-item, /* Added for responsive statistics */
    .pricing-card /* Added for responsive pricing */ {
        margin-left: var(--spacing-sm);
        margin-right: var(--spacing-sm);
    }
    /* Swiper does not need this margin as it handles spacing internally */

    .contact-form, .accordion-container { /* Removed .review-form */
        padding: var(--spacing-md);
        margin-left: var(--spacing-sm);
        margin-right: var(--spacing-sm);
        width: auto; /* Reset to auto for proper margin/padding handling */
    }

    /* Modal responsiveness */
    .modal-content {
        padding: var(--spacing-md);
    }
    .modal-content h3 {
        font-size: 1.55rem; /* Adjusted from 1.6rem to 1.55rem */
    }
    .modal-content p {
        font-size: 0.9rem; /* Adjusted from 0.95rem to 0.9rem */
    }
    .close-button {
        font-size: 30px;
        top: 10px;
        right: 15px;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        bottom: var(--spacing-sm);
        right: var(--spacing-sm);
    }

    /* Swiper arrows on mobile */
    .swiper-button-next,
    .swiper-button-prev {
        display: none !important; /* Hide arrows on very small screens if they crowd content */
    }

    .accordion-header {
        font-size: 1rem; /* Adjusted from 1rem to 1rem (no change, just confirming) */
        padding: var(--spacing-sm) var(--spacing-md);
    }
    .accordion-content p {
        font-size: 0.85rem; /* Adjusted from 0.9rem to 0.85rem */
        padding-bottom: var(--spacing-sm);
    }
    .accordion-item.active .accordion-content {
        padding-top: var(--spacing-sm);
    }
    .pricing-card.featured {
        transform: translateY(-8px) scale(1.01); /* Less aggressive lift for featured on mobile */
    }
}

/* Small devices (phones) */
@media (max-width: 480px) {
    h1 { font-size: 2rem; } /* Adjusted from 2.2rem to 2rem */
    h2 { font-size: 1.6rem; } /* Adjusted from 1.8rem to 1.6rem */
    h3 { font-size: 1.45rem; } /* Adjusted from 1.6rem to 1.45rem */
    .hero-section h1, .page-hero-section h1 { font-size: 2rem; } /* Adjusted from 2.2rem to 2rem */
    .hero-section .lead-text, .page-hero-section .lead-text { font-size: 0.95rem; } /* Adjusted from 1rem to 0.95rem */

    .btn-large {
        padding: 0.8rem 1.8rem; /* Adjusted padding */
        font-size: 0.95rem; /* Adjusted from 1rem to 0.95rem */
    }

    /* Further adjust padding for very small screens */
    .contact-form, .accordion-container {
        padding: var(--spacing-sm);
    }
    .statistic-item .counter-value {
        font-size: 2rem; /* Adjusted from 2.2rem to 2rem */
    }
    .pricing-card .card-header h3 {
        font-size: 1.35rem; /* Adjusted from 1.4rem to 1.35rem */
    }
    .pricing-card .price {
        font-size: 2.2rem; /* Adjusted from 2.5rem to 2.2rem */
    }
}
