:root {
    /* Updated Color Scheme - Yellow Header with Grey Content */
    --royal-yellow: #FFD700;         /* Primary brand color */
    --royal-yellow-light: #FFE44D;   /* Lighter yellow */
    --royal-yellow-dark: #D4AF37;    /* Darker yellow */
    --dark-bg: #2D2D2D;              /* Dark background */
    --darker-bg: #1F1F1F;            /* Even darker for contrast */
    --light-bg: #F5F5F5;             /* Light background */
    --grey-bg: #E5E5E5;              /* Grey background */
    --text-dark: #333333;            /* Dark text */
    --text-medium: #666666;          /* Medium text */
    --text-light: #F5F5F5;           /* Light text */
    --shadow-color: rgba(0, 0, 0, 0.1);
    --gray-light: #D3D3D3;           /* Used in pagination */
     --filter-chip-bg: var(--royal-yellow-light);
    --filter-chip-active-bg: var(--royal-yellow-dark);
    --filter-chip-text: var(--dark-bg);
    --filter-chip-active-text: var(--text-light);
    
    /* Updated variable assignments */
    --primary-color: var(--royal-yellow);
    --primary-light: var(--royal-yellow-light);
    --primary-dark: var(--royal-yellow-dark);
    --secondary-color: var(--dark-bg);
    --text-color: var(--text-dark);
    --text-inverse: var(--text-light);
    --bg-color: var(--grey-bg);
    --white: var(--light-bg);
    --transition: all 0.3s ease;
    --fast-transition: all 0.2s ease-out; /* Added for quicker animations */
    --slow-transition: all 0.5s ease-in-out; /* Added for smoother, longer animations */
    
    /* Updated Font Variables based on your HTML (Poppins) */
    --heading-font: 'Poppins', sans-serif; /* Poppins for headings */
    --body-font: 'Poppins', sans-serif;    /* Poppins for body text */
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--body-font); /* Use Poppins for body */
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
}

/* --- Container for general content, NOT FLEXED BY DEFAULT --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - Yellow */
.header {
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--royal-yellow);
    box-shadow: none; /* Changed from 0 2px 10px rgba(0, 0, 0, 0.2) to none */
    z-index: 1000;
    padding: 20px 0;
    transition: background-color var(--fast-transition), box-shadow var(--fast-transition);
}

/* New: Header background change when menu is open */
.header.menu-open {
    background-color: var(--royal-yellow-dark); /* Darken header when menu is open */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* --- ONLY THE HEADER'S CONTAINER IS FLEXED --- */
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header.scrolled {
    background-color: var(--royal-yellow-dark); /* Darker on scroll */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); /* This shadow remains on scroll */
}

/* Ubiqora - Logo Styling */
.logo {
    display: inline-block;
    height: 40px; /* Adjust based on your logo's aspect ratio */
    transition: transform 0.3s ease;
    z-index: 1001; /* Ensure it stays above other elements */
}

/* New: Logo click animation */
.logo.logo-animate {
    animation: logoPulse 0.5s ease-out;
}

@keyframes logoPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}


.logo-image {
    height: 200%;
    margin-top: -15px;
    width: auto;
    max-width: 180px; /* Prevent logo from being too wide */
    object-fit: contain;
    transition: var(--fast-transition);
}

/* For mobile */
@media (max-width: 768px) {
    .logo {
        height: 30px; /* Smaller logo on mobile */
    }
}

.logo:hover {
    color: var(--dark-bg);
    transform: scale(1.02); /* Slight hover scale */
}

/* Subtle logo underline on load/hover */
.logo::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--royal-yellow-dark);
    opacity: 0;
    transform: scaleX(0);
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}

.logo:hover::after {
    transform: scaleX(1);
    opacity: 1;
}

.nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-bg);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding-bottom: 5px; /* Added for underline animation */
}

.nav-link.active,
.nav-link:hover {
    color: var(--darker-bg);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; /* Changed from -5px to 0 for smoother animation */
    left: 0;
    width: 0; /* Start with 0 width */
    height: 2px;
    background-color: var(--darker-bg);
    transition: width 0.3s ease-out; /* Animation for width */
}

.nav-link.active::after,
.nav-link:hover::after {
    width: 100%; /* Expand on hover/active */
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: var(--dark-bg);
    transition: transform var(--fast-transition);
}

/* Enhanced menu-toggle span animation */
.menu-toggle span {
    display: block;
    width: 25px; /* Default width for top and bottom lines */
    height: 3px;
    background-color: var(--dark-bg);
    margin: 5px 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* Bouncier transition */
    transform-origin: center; /* Ensure transformations are from the center */
}

/* Make the middle line shorter and slightly offset */
.menu-toggle span:nth-child(2) {
    width: 20px; /* Shorter width for the middle line */
    transform: translateX(-5px); /* Offset to the left */
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0); /* Still hide with scale effect */
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Section Styling */
.section {
    padding: 5rem 0;
    position: relative;
    background-color: var(--white);
    border-bottom: 1px solid var(--grey-bg);
    /* The opacity, transform, and transition lines have been removed. */
}


/* Remove border-bottom from the first section (showcase) */
#showcase {
    border-bottom: none;
}

/* === Section Title - Modern & Catchy Look === */
.section-title {
    font-family: var(--heading-font);
    font-size: 2.8rem; /* Slightly larger for impact */
    margin-bottom: 2rem; /* More space below for description */
    text-align: center;
    width: 100%;
    position: relative;
    display: block;
    color: var(--darker-bg); /* Stronger color */
    font-weight: 700; /* Bolder */
    letter-spacing: -0.5px; /* Tighter for modern feel */
    text-transform: capitalize; /* Ensure first letter capital */
    
    /* Add a subtle 3D effect */
    text-shadow: 3px 3px 0px var(--royal-yellow-light); /* Yellow shadow */
    transition: text-shadow 0.4s ease-out;
}

.section-title:hover {
    text-shadow: 4px 4px 0px var(--royal-yellow-dark); /* Deeper shadow on hover */
}

/* Underline effect for section titles */
.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px; /* Adjusted position */
    left: 50%;
    transform: translateX(-50%) scaleX(0); /* Start hidden, scaled down */
    width: 80px; /* Wider line */
    height: 4px; /* Thicker line */
    background-color: var(--royal-yellow);
    border-radius: 2px; /* Slightly rounded edges */
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* Bouncier animation */
}

.section.visible .section-title::after {
    transform: translateX(-50%) scaleX(1); /* Expand on visible */
}


.section-description {
    font-size: 1.15rem;
    color: var(--text-medium);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto; /* Center and add margin below */
}

/* Showcase/Hero Section - Yellow */
.showcase {
    background: var(--royal-yellow);
    text-align: center;
    min-height: calc(100vh - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 80px;
    color: var(--dark-bg);
    position: relative;
    overflow: hidden; /* For background animation */
}

/* Subtle background animation for showcase */
.showcase::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at center, var(--royal-yellow-light) 0%, var(--royal-yellow) 70%, var(--royal-yellow-dark) 100%);
    opacity: 0.2;
    filter: blur(5px); /* Soften the gradient */
    z-index: 0;
    animation: pulseBackground 15s infinite alternate ease-in-out;
}

@keyframes pulseBackground {
    0% { transform: scale(1) rotate(0deg); opacity: 0.2; }
    50% { transform: scale(1.05) rotate(2deg); opacity: 0.3; }
    100% { transform: scale(1) rotate(0deg); opacity: 0.2; }
}

.showcase-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative; /* Above pseudo-element */
    z-index: 1;
}

.showcase-title {
    font-family: auto; 
    font-size: 3.5rem; /* Even larger for impact */
    margin-bottom: 20px;
    line-height: 1.2;
    letter-spacing: 1px; /* Subtle spacing for title */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); /* Soft shadow for depth */
    animation: slideInTop 0.8s ease-out forwards; /* Keep animation */
}

/* Showcase subtitle - changed back to regular font weight */
.showcase-subtitle {
    font-family: fantasy;
    font-size: 1.25rem; /* Reverted to original size, slightly smaller for mobile in media query */
    font-weight: 400; /* Changed to regular weight */
    color: rgba(45, 45, 45, 0.8); /* Maintain existing color or adjust as needed */
    margin-bottom: 30px;
    animation: slideInBottom 0.8s ease-out forwards 0.2s; /* Keep existing animation */
    opacity: 0; /* Start hidden for animation */
}

@keyframes slideInTop {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInBottom {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    position: relative; /* For button hover effect */
    overflow: hidden; /* For button hover effect */
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2); /* Light overlay for hover */
    transition: all 0.3s ease;
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn-primary {
    background-color: var(--dark-bg);
    color: var(--royal-yellow);
    border: 2px solid var(--dark-bg);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--dark-bg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--dark-bg);
    border: 2px solid var(--dark-bg);
}

.btn-secondary:hover {
    background-color: var(--dark-bg);
    color: var(--royal-yellow);
}

/* Portfolio/Work Section */
.portfolio-container {
    position: relative;
    width: 100%;
    overflow: hidden; /* Keeps scrollbar inside */
}

.projects-grid {
    display: flex;
    gap: 30px;
    padding-top: 20px; /* Keep vertical padding */
    padding-bottom: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar for horizontal grids */
.projects-grid::-webkit-scrollbar,
.team-grid::-webkit-scrollbar,
.clients-grid::-webkit-scrollbar {
    height: 8px;
}

.projects-grid::-webkit-scrollbar-thumb,
.team-grid::-webkit-scrollbar-thumb,
.clients-grid::-webkit-scrollbar-thumb {
    background-color: var(--royal-yellow-dark);
    border-radius: 10px;
}

.projects-grid::-webkit-scrollbar-track,
.team-grid::-webkit-scrollbar-track,
.clients-grid::-webkit-scrollbar-track {
    background-color: var(--grey-bg);
}

.project-card {
    scroll-snap-align: start;
    flex: 0 0 calc(50% - 15px); /* Adjusted to account for new gap logic */
    min-width: 300px;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    background-color: var(--light-bg); /* Slightly lighter on hover */
}

/* Shine effect on project card hover */
.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    transform: skewX(-20deg);
    transition: all 0.5s ease-in-out;
}

.project-card:hover::before {
    left: 125%;
}

.project-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease; /* Zoom effect */
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.project-info h3 {
    font-family: var(--heading-font); /* Apply Poppins to project titles */
    font-size: 1.5rem;
    margin-bottom: 5px; /* Reduce space after title */
}

.project-info p {
    font-size: 0.95rem; /* Ensure readability for descriptions */
    color: var(--text-medium);
}


.client-testimonial {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--gray-light);
    font-style: italic;
    color: var(--text-medium);
    font-size: 0.9rem; /* Ensure testimonial text is readable */
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.pagination .btn {
    transition: var(--transition);
}

.pagination .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background-color: var(--gray-light);
    color: var(--text-medium);
    border-color: var(--gray-light);
}

/* Services Section - NEW STYLES */
.services-content-wrapper {
    display: flex;
    flex-direction: column; /* Default to column for mobile */
    gap: 4rem; /* More space between Solution and Capabilities sections */
    margin-top: 3rem; /* Space below the main section description */
}

/* === Subsection Title - Modern & Catchy Look === */
.subsection-title {
    font-family: var(--heading-font);
    font-size: 2.2rem; /* Slightly larger than before */
    color: var(--dark-bg); /* Darker for better contrast */
    text-align: center;
    margin-bottom: 1.5rem; /* Increased margin */
    position: relative;
    padding-bottom: 15px; /* Space for the underline */
    font-weight: 600; /* Semi-bold */
    letter-spacing: -0.2px; /* Subtle tighter spacing */
    
    /* Animation for background glow */
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.subsection-title:hover {
    color: var(--royal-yellow-dark); /* Color change on hover */
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
}

.subsection-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, var(--royal-yellow-light) 0%, transparent 70%);
    opacity: 0;
    z-index: 0;
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.subsection-title:hover::before {
    opacity: 0.2;
    transform: translateX(-50%) scale(1.05);
}

.subsection-title::after {
    content: '';
    position: absolute;
    bottom: 0; /* Line at the bottom */
    left: 50%;
    transform: translateX(-50%) scaleX(0); /* Start hidden */
    width: 50px; /* Line width */
    height: 3px;
    background-color: var(--royal-yellow);
    border-radius: 5px;
    transition: transform 0.5s ease-out;
    z-index: 1; /* Above the glow */
}

/* On hover or visible, expand the line */
.subsection-title:hover::after,
.section.visible .subsection-title::after { /* Make it visible when parent section is visible */
    transform: translateX(-50%) scaleX(1);
}

.subsection-description {
    font-size: 1.1rem;
    color: var(--text-medium);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem auto;
}

.solutions-area,
.capabilities-area {
    background-color: var(--white);
    padding: 3rem;
    border-radius: 15px; /* More rounded corners */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); /* Softer, larger shadow */
    transition: transform 0.4s ease-out, box-shadow 0.4s ease-out;
    position: relative;
    overflow: hidden; /* For decorative elements */
    z-index: 1;
}

/* Playful background shapes for Solutions Area */
.solutions-area::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 80px;
    height: 80px;
    background-color: var(--royal-yellow-light);
    border-radius: 50%;
    opacity: 0.4;
    filter: blur(10px);
    transition: all 0.5s ease-in-out;
    z-index: 0;
}

.solutions-area::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    background-color: var(--royal-yellow);
    opacity: 0.2;
    transform: rotate(45deg);
    transition: all 0.5s ease-in-out;
    z-index: 0;
}

.solutions-area:hover::before {
    transform: translate(-10px, 10px) scale(1.1);
    opacity: 0.6;
}
.solutions-area:hover::after {
    transform: rotate(60deg) scale(1.1) translate(10px, -10px);
    opacity: 0.3;
}


/* Modern background patterns for Capabilities Area */
.capabilities-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at top left, var(--royal-yellow-light) 0%, transparent 20%),
        radial-gradient(circle at bottom right, var(--royal-yellow) 0%, transparent 20%);
    background-size: 50px 50px;
    opacity: 0.05;
    z-index: 0;
    transition: all 0.5s ease;
}

.capabilities-area:hover::before {
    background-size: 60px 60px;
    opacity: 0.1;
    transform: scale(1.01);
}

.solutions-area > *,
.capabilities-area > * {
    position: relative;
    z-index: 1; /* Ensure content is above decorative elements */
}


.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0; /* Adjusted margin */
}

.category-card {
    background-color: var(--light-bg); /* Lighter card background for contrast */
    padding: 30px;
    border-radius: 10px; /* Slightly more rounded */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Lighter, subtle shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--grey-bg); /* Subtle border */
}

.category-card:hover {
    transform: translateY(-10px) scale(1.03); /* More pronounced lift and scale */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2); /* Deeper shadow on hover */
    background-color: var(--royal-yellow-light); /* Yellow tint on hover */
    border-color: var(--royal-yellow);
}

/* Wavy border effect on hover for category cards */
.category-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, transparent 0%, var(--royal-yellow-dark) 50%, transparent 100%);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.4s ease-out;
}

.category-card:hover::after {
    transform: scaleX(1);
}

.category-card h3 {
    margin-bottom: 20px;
    color: var(--darker-bg); /* Darker heading for contrast on light background */
    transition: color 0.3s ease;
    font-family: var(--heading-font); /* Apply Poppins */
    font-size: 1.5rem; /* Ensure readable size */
}

.category-card:hover h3 {
    color: var(--dark-bg); /* Even darker on hover */
}

.category-card ul {
    list-style-position: inside;
    padding-left: 0;
}

.category-card li {
    margin-bottom: 10px;
    list-style-type: none;
    position: relative;
    padding-left: 25px; /* More space for icon/bullet */
    transition: color 0.3s ease;
    font-size: 1rem; /* Ensure readability */
    color: var(--text-dark); /* Ensure readable text */
}

.category-card li::before {
    content: "\f00c"; /* Font Awesome checkmark icon */
    font-family: 'Font Awesome 6 Free'; /* Make sure font awesome is applied */
    font-weight: 900; /* For solid icon */
    color: var(--dark-bg); /* CHANGED from --royal-yellow */
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%); /* Center vertically */
    transition: transform 0.3s ease; /* For bullet point animation */
}

.category-card:hover li::before {
    color: var(--royal-yellow-dark); /* Darker on hover */
    transform: translateY(-50%) translateX(5px) scale(1.1); /* Move and slightly scale icon */
}

.capabilities { /* This is the UL wrapper for capabilities */
    background-color: transparent; /* No background as it's now inside capabilities-area */
    padding: 0; /* No padding here as it's handled by capabilities-area */
    border-radius: 0;
    margin-top: 0;
    box-shadow: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Grid for capabilities list items */
    gap: 20px; /* Gap between capabilities list items */
}

.capabilities:hover {
    transform: none; /* No transform for the wrapper */
    box-shadow: none;
}

.capabilities h3 { /* This rule is now redundant with .subsection-title */
    display: none; /* Hide if subsection-title is used */
}

.capabilities ul {
    padding-left: 0;
    list-style: none; /* Remove default list style */
}

.capabilities li {
    font-size: 1rem; /* Ensure readability */
    margin-bottom: 0; /* Handled by grid gap */
    background-color: var(--grey-bg); /* Background for each capability item */
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    color: var(--text-dark);
}

.capabilities li:hover {
    background-color: var(--royal-yellow-light);
    color: var(--dark-bg);
    transform: translateX(5px); /* Slight shift on hover */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.capabilities li::before {
    content: "\f13b"; /* Font Awesome lightbulb icon for ideas/capabilities */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 10px;
    color: var(--royal-yellow-dark);
    font-size: 1.2rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.capabilities li:hover::before {
    transform: rotate(10deg) scale(1.1);
    color: var(--dark-bg);
}


/* Team Section */
.team-grid {
    display: flex;
    gap: 30px;
    padding-top: 20px; /* Keep vertical padding */
    padding-bottom: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.team-member {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 280px; /* Fixed width for better control */
    height: 380px; /* Fixed height to accommodate flip effect */
    perspective: 1000px; /* For 3D flip effect */
    position: relative;
    background-color: transparent; /* Card itself is transparent */
    box-shadow: none; /* Remove outer shadow for the container */
    transition: none; /* No transition on container */
}

.team-member-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* More engaging transition */
    transform-style: preserve-3d; /* Required for 3D effect */
    box-shadow: 0 4px 12px var(--shadow-color); /* Add shadow to the inner card */
    border-radius: 8px; /* Apply border-radius here */
}

.team-member:hover .team-member-inner {
    transform: rotateY(180deg);
}

.team-member-front,
.team-member-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden; /* Hide the back of the element when facing away */
    backface-visibility: hidden;
    background-color: var(--white);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.team-member-front {
    z-index: 2;
    transform: rotateY(0deg);
}

.team-member-back {
    transform: rotateY(180deg);
    background-color: var(--dark-bg); /* Darker background for the back */
    color: var(--text-light); /* Light text for contrast */
}

.member-photo {
    width: 120px; /* Slightly smaller photo */
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px; /* Reduced margin */
    border: 3px solid var(--royal-yellow); /* Yellow border */
    box-shadow: 0 0 0 5px rgba(255, 215, 0, 0.3); /* Soft outer glow */
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.team-member-front h3 {
    font-family: var(--heading-font);
    font-size: 1.4rem; /* More prominent name */
    margin-bottom: 5px;
    color: var(--text-dark);
}

.team-member-front p { /* Role */
    font-size: 1rem;
    color: var(--royal-yellow-dark); /* Yellow for role */
    font-weight: 600; /* Bold role */
    margin-bottom: 15px;
}

.team-member-back h4 {
    font-family: var(--heading-font);
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--royal-yellow);
}

.team-member-back p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

.team-member-back .social-link {
    margin-top: 20px;
    display: inline-block;
    color: var(--royal-yellow);
    font-size: 24px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.team-member-back .social-link:hover {
    color: var(--royal-yellow-light);
    transform: scale(1.2);
}

/* Clients Section */
.clients-grid {
    display: flex;
    gap: 40px;
    padding-top: 20px; /* Keep vertical padding */
    padding-bottom: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    align-items: center;
}

/* Style for clickable names */
.client-name-link {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 10px;
    color: inherit;
    text-decoration: none;
    font-weight: bold;
    text-align: center;
    transition: var(--fast-transition);
}

.client-name-link:hover {
    color: var(--primary-color); /* Or your brand color */
}

/* Style for non-clickable names */
.client-name {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 10px;
    font-weight: bold;
    text-align: center;
}

.client-logo {
    scroll-snap-align: start;
    flex: 0 0 auto;
    width: 180px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: transform 0.3s ease;
}

.client-logo:hover {
    transform: translateY(-5px);
}

.client-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    filter: grayscale(100%) contrast(0.5);
    opacity: 0.8;
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.client-logo:hover img {
    filter: grayscale(0) contrast(1);
    opacity: 1;
    transform: scale(1.1); /* Zoom effect on hover */
}

/* Connect Section / Footer */
footer#connect {
    text-align: center;
    padding-bottom: 3rem; 
}

/* New: Contact Info Container */
.contact-info-container {
    display: flex;
    flex-direction: column; /* Stack contact items vertically */
    align-items: center;
    gap: 15px; /* Space between contact items */
    margin: 30px auto; /* Space above and below contact info */
    max-width: 600px; /* Limit width for readability */
}

/* New: Individual Contact Info Item */
.contact-item {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between icon and text */
    font-size: 1.1rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
}

.contact-item:hover {
    color: var(--royal-yellow-dark);
    transform: translateX(5px); /* Subtle shift on hover */
}

.contact-item i {
    color: var(--royal-yellow);
    font-size: 1.4rem;
    transition: color 0.3s ease;
}

.contact-item:hover i {
    color: var(--dark-bg);
}

/* New: Footer Logo */
.footer-logo {
    margin-top: 40px; /* Space above the logo */
    margin-bottom: 20px; /* Space below the logo */
}

.footer-logo img {
    max-width: 150px; /* Control logo size */
    height: auto;
    filter: drop-shadow(2px 2px 5px rgba(0,0,0,0.1)); /* Subtle shadow for logo */
    transition: transform 0.3s ease;
}

.footer-logo img:hover {
    transform: scale(1.05); /* Slight scale on hover */
}


/* Social Icons Styles */
.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--dark-bg);
    color: var(--royal-yellow);
    font-size: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.social-icon:hover {
    background-color: var(--royal-yellow);
    color: var(--dark-bg);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Pulse effect on social icons */
.social-icon:hover::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    opacity: 0;
    animation: pulse 0.5s ease-out forwards;
}

@keyframes pulse {
    0% { width: 0; height: 0; opacity: 0.5; }
    50% { width: 100%; height: 100%; opacity: 0; transform: translate(-50%, -50%); }
}

.social-icon.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
    background-color: var(--gray-light);
    color: var(--text-medium);
}

.social-icon.disabled::after {
    content: "Coming Soon";
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    white-space: nowrap;
    color: var(--text-medium);
}

.copyright {
    text-align: center;
    color: var(--text-medium);
    margin-top: 20px;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--royal-yellow);
    color: var(--dark-bg);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    font-size: 1.2rem;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--dark-bg);
    color: var(--royal-yellow);
    transform: translateY(-5px) scale(1.1); /* More pronounced lift and scale */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* section > * animation is already good, consider adding staggered delays in JS if needed */

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out; /* Fade in animation */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loading-spinner.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--royal-yellow);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite, pulseSpinner 1.5s infinite ease-in-out; /* Added pulse */
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulseSpinner {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Enhanced Mobile Menu */
.nav {
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s ease;
}

.menu-toggle {
    transition: transform 0.3s ease;
    z-index: 1001; /* Ensure it's above the menu when active */
}

.menu-toggle.active {
    transform: rotate(90deg);
}

/* Mobile Styles */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    body {
        width: 100vw;
        overflow-x: hidden;
        position: relative;
    }

    /* Important: Adjusted container padding on mobile */
    .container {
        max-width: 100vw;
        padding: 0 15px; /* Ensures content doesn't touch edges */
    }

    .header {
        padding: 15px 0;
    }
    
    .nav {
        position: fixed;
        top: 60px; /* Adjusted based on header height */
        left: 0;
        width: 100%;
        background-color: var(--royal-yellow);
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
        transform: translateY(-150%) scale(0.9);
        opacity: 0;
        /* Adjusted cubic-bezier for a more 'bouncy' entrance */
        transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease;
        z-index: 999; /* Ensure menu is below toggle but above content */
    }

    .nav.active {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    .nav-list {
        flex-direction: column;
        gap: 15px;
    }

    .menu-toggle {
        display: block;
    }

    .section {
        padding: 3rem 0; /* Reduced padding for general sections on mobile */
        overflow: hidden; /* Keep section overflow for content that scrolls horizontally */
    }

    .showcase {
        min-height: calc(100vh - 60px);
        padding: 100px 20px 60px;
    }

    .showcase-title {
        font-size: 2.2rem; /* Adjusted for mobile */
    }

    .showcase-subtitle {
        font-size: 1.1rem; /* Adjusted for mobile */
    }

    /* Smaller font size for section titles on mobile */
    .section-title {
        font-size: 1.8rem; /* Adjusted for mobile, slightly smaller */
        margin-bottom: 1.5rem; /* Adjusted margin */
        text-shadow: 3px 3px 0px var(--royal-yellow-light), 6px 6px 8px rgba(0,0,0,0.1);
    }

    .section-title::after {
        width: 50px; /* Smaller line for mobile */
        bottom: -10px; /* Adjusted position */
    }


    .section-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    /* Enhanced Mobile Horizontal Grids */
    .projects-grid,
    .team-grid,
    .clients-grid {
        padding-left: 15px; /* Align with container padding */
        padding-right: 15px; /* Align with container padding */
        width: auto; /* Allow content to dictate width, not fixed calc */
    }

    .project-card {
        flex: 0 0 calc(100% - 30px); /* 100% width minus the gap between cards */
        min-width: unset; /* Remove minimum width constraint for better responsiveness */
        width: calc(100% - 30px); /* Ensure cards take up full width minus gap */
    }

    .team-member {
        width: calc(100% - 30px); /* Ensure team cards take up full width minus gap */
        height: 350px; /* Adjust height for mobile */
    }

    .client-logo {
        width: 150px;
        height: 80px;
    }

    .project-card h3,
    .team-member-front h3 {
        font-size: 1.25rem;
    }

    .project-card p,
    .team-member-front p {
        font-size: 0.9rem;
    }

    /* Services section mobile adjustments */
    .services-content-wrapper {
        gap: 3rem; /* Reduced gap on mobile */
    }

    /* Smaller font size for subsection titles on mobile */
    .subsection-title {
        font-size: 1.5rem; /* Adjusted for mobile */
        margin-bottom: 1rem;
        padding-bottom: 10px;
    }

    .subsection-title::after {
        width: 30px; /* Smaller line for mobile */
    }

    .subsection-description {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .solutions-area,
    .capabilities-area {
        padding: 2rem 1.5rem; /* Reduced padding on mobile */
    }

    .categories-grid {
        gap: 20px; /* Slightly smaller gap between category cards */
        margin: 20px 0; /* Reduced margin */
    }

    .category-card {
        padding: 20px; /* Reduced padding inside cards */
    }

    .category-card h3 {
        font-size: 1.3rem; /* Slightly smaller heading for categories */
        margin-bottom: 15px; /* Reduced margin */
    }

    .category-card li {
        font-size: 0.95rem; /* Slightly smaller text for list items */
        padding-left: 20px; /* Adjust padding for smaller screen */
        margin-bottom: 8px; /* Reduced margin between list items */
    }

    .category-card li::before {
        font-size: 0.9rem; /* Smaller icon */
    }

    .capabilities {
        gap: 15px; /* Reduced gap for capability items */
    }

    .capabilities li {
        font-size: 0.95rem;
        padding: 12px 15px; /* Adjust padding */
    }

    .capabilities li::before {
        font-size: 1rem; /* Smaller icon */
        margin-right: 8px; /* Adjust margin */
    }

    .pagination {
        flex-wrap: wrap;
    }

    .scroll-to-top {
        width: 2.5rem;
        height: 2.5rem;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 1rem;
    }

    .social-links {
        gap: 12px;
        margin: 30px 0;
    }

    .social-icon {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .social-icon.disabled::after {
        bottom: -22px;
        font-size: 0.6rem;
    }
}

@media (min-width: 769px) {
    .nav {
        position: static;
        transform: none;
        opacity: 1;
        background-color: transparent;
        box-shadow: none;
        padding: 0;
    }

    .nav-list {
        display: flex;
        flex-direction: row;
    }

    .menu-toggle {
        display: none;
    }

    /* Restore desktop project card width */
    .project-card {
        flex: 0 0 calc(50% - 15px); /* Adjusted to account for new gap logic */
        min-width: 300px;
    }
    
    .team-member {
        width: 280px; /* Fixed width for better control */
    }
    
    
}

/* Filter Chips */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-chip {
    background-color: var(--filter-chip-bg);
    color: var(--filter-chip-text);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    user-select: none;
    border: 1px solid var(--royal-yellow-dark);
}

.filter-chip:hover {
    background-color: var(--royal-yellow);
    transform: translateY(-2px);
}

.filter-chip.active {
    background-color: var(--filter-chip-active-bg);
    color: var(--filter-chip-active-text);
    border-color: var(--dark-bg);
}

.filter-chip.all.active {
    background-color: var(--filter-chip-active-bg);
    color: var(--filter-chip-active-text);
}

/* Update projects-grid for horizontal scrolling */
.projects-grid {
    display: flex;
    gap: 30px;
    padding: 20px 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--royal-yellow-dark) var(--grey-bg);
}

.projects-grid::-webkit-scrollbar {
    height: 8px;
}

.projects-grid::-webkit-scrollbar-thumb {
    background-color: var(--royal-yellow-dark);
    border-radius: 10px;
}

.projects-grid::-webkit-scrollbar-track {
    background-color: var(--grey-bg);
}

.project-card {
    scroll-snap-align: start;
    flex: 0 0 calc(50% - 15px); /* Two cards per view on desktop */
    min-width: 300px;
    background-color: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    position: relative;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .projects-grid {
        padding: 20px 15px;
    }

    .project-card {
        flex: 0 0 calc(100% - 30px); /* Full width minus gap */
        min-width: unset;
        width: calc(100% - 30px);
    }

    .filter-chips {
        gap: 8px;
        margin-bottom: 20px;
    }

    .filter-chip {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
}

/* About Section */
.about {
    background-color: var(--white);
    text-align: center;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.author-byline {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 1.5rem;
    font-size: 1rem;
    color: var(--text-medium);
}

.author-name {
    font-family: var(--heading-font);
    font-weight: 500;
    color: var(--darker-bg);
}

.author-byline .social-links {
    display: flex;
    gap: 8px;
}

.author-byline .social-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
    background-color: var(--royal-yellow);
    color: var(--dark-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.author-byline .social-icon:hover {
    background-color: var(--dark-bg);
    color: var(--royal-yellow);
    transform: scale(1.1);
}

/* Mobile Styles */
@media (max-width: 768px) {
    .about {
        padding: 3rem 0;
    }
    .author-byline {
        font-size: 0.9rem;
        flex-wrap: wrap;
        gap: 8px;
    }
    .author-byline .social-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}


/* --- NEW: 4-Column Footer Styles --- */

footer#connect {
    background-color: var(--dark-bg);
    color: var(--text-light);
    padding: 5rem 0 0 0; /* More top padding, no bottom padding */
    text-align: left; /* Change text alignment for columns */
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding-bottom: 4rem;
}

.footer-column h4.footer-title {
    font-family: var(--heading-font);
    font-size: 1.25rem;
    color: var(--royal-yellow);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-logo-img {
    max-width: 150px;
    margin-bottom: 1rem;
}

.footer-tagline {
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-link:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-contact-item {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: color 0.2s ease;
}

.footer-contact-item:hover {
    color: var(--royal-yellow);
}

.footer-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Re-style social icons for dark background */
.footer-social-links .social-icon {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--royal-yellow);
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.footer-social-links .social-icon:hover {
    background-color: var(--royal-yellow);
    color: var(--dark-bg);
}

.footer-bottom-bar {
    background-color: var(--darker-bg);
    padding: 1.5rem 20px;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Mobile responsive styles for the footer */
@media (max-width: 768px) {
    footer#connect {
        text-align: center; /* Center text on mobile */
    }

    .footer-grid {
        grid-template-columns: 1fr; /* Stack columns */
        gap: 2.5rem;
    }
    
    .footer-brand, .footer-contact-items {
        align-items: center; /* Center items inside flex containers */
    }

    .footer-social-links {
        justify-content: center; /* Center social icons */
    }

    .footer-link:hover {
        padding-left: 0; /* Disable padding shift on mobile hover */
    }
}

/* --- FIX: Make logo text visible on dark footer --- */

footer#connect .footer-logo-img {
    /* This applies multiple, non-blurred drop-shadows to create a crisp 1px outline effect. */
    filter: drop-shadow(1px 1px 0 white)
            drop-shadow(-1px -1px 0 white)
            drop-shadow(1px -1px 0 white)
            drop-shadow(-1px 1px 0 white);
}


/* --- NEW: Avatar Styles for About Section --- */

.about-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap; /* Allows stacking on mobile */
    margin-top: 3rem;
}

.about-image-container {
    flex: 0 0 250px; /* Set a fixed size for the image container */
}

.about-avatar {
    width: 100%;
    border-radius: 50%; /* Makes the avatar circular */
    border: 5px solid var(--royal-yellow);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.about-text-container {
    flex: 1;
    max-width: 600px;
    text-align: left; /* Align text to the left in this new layout */
}

.about-text-container .section-description {
    text-align: left; /* Override the default centered description */
    margin-left: 0;
    margin-right: 0;
}

.about-text-container .author-byline {
    justify-content: flex-start; /* Align byline to the left */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .about-content-wrapper {
     flex-direction: column; 
        gap: 2rem;
    }
    .about-image-container {
        flex-basis: 120px; /* Smaller avatar on mobile */
    }
    .about-text-container,
    .about-text-container .section-description,
    .about-text-container .author-byline {
        text-align: center; /* Re-center text when stacked on mobile */
        justify-content: center;
    }
}
