/* Modern Color Palette */
:root {
    --primary: #4361ee;
    --primary-dark: #3a0ca3;
    --secondary: #f72585;
    --secondary-light: #ff9e00;
    --accent: #7209b7;
    --light: #f8f9fa;
    --dark: #212529;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
}

/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Montserrat:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--light);
    color: var(--gray-800);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Stop banner from moving on overscroll */
html, body { overscroll-behavior-y: none; }

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

/* Improve text visibility on colored backgrounds */
.text-white {
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
    color: #ffffff !important;
}

.hero-video {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    transform: none;
    z-index: -1;
    pointer-events: none;
}

/* Video Overlay with Gradient */
.video-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.3), rgba(114, 9, 183, 0.3));
    z-index: 0;
}

.hero-content {
    z-index: 1;
    position: relative;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    padding: 3rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 800px;
    width: 90%;
    transform: translateY(0);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.hero-content h1,
.hero-content p {
    color: #ffffff !important;
    text-shadow: 0 3px 8px rgba(0, 0, 0, 0.6);
}

.hero-content:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* Modern Text Gradient */
.text-gradient {
    background-image: linear-gradient(45deg, var(--secondary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-weight: 700;
}

/* Animation Effects */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Service Cards */
.service-card {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    height: 100%;
}

/* Ensure text is visible on white backgrounds */
.text-gray-700 {
    color: var(--gray-800) !important;
    font-weight: 500;
}

/* Fix for case study cards with white background */
.case-study-card {
    background-color: var(--light);
    border: 2px solid var(--primary);
}

.case-study-card .card-header {
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    border-bottom: none;
}

.case-study-card .card-header h2 {
    color: var(--light) !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7) !important;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    display: block;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Scroll Container */
.scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
    gap: 2rem;
    padding: 1rem 0;
}

.scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.scroll-container > div {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 80%; /* Adjust as needed */
    margin-right: 2rem;
}

@media (min-width: 768px) {
    .scroll-container {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 2rem;
        overflow-x: hidden;
    }
    .scroll-container > div {
        width: auto;
        margin-right: 0;
    }
}

/* Services Section */
#services {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

/* Footer Section */
footer {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

/* Case Studies Section */
#case-studies {
    position: relative;
    background: linear-gradient(135deg, #374151, #1f2937);
    padding: 6rem 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

#case-studies::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(55, 65, 81, 0.8), rgba(31, 41, 55, 0.8));
    backdrop-filter: blur(8px);
    z-index: 1;
}

/* Ensure text is visible in case studies section */
#case-studies h2,
#case-studies p {
    color: #ffffff !important;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.8);
    font-weight: 700;
    position: relative;
    z-index: 10;
}

#case-studies h2 {
    line-height: 1.1;
    margin-bottom: 1rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem 2rem;
    border-radius: 12px;
    display: inline-block;
}

#case-studies p {
    font-size: 1.25rem;
    line-height: 1.6;
    opacity: 0.95;
}

/* Floating Buttons */
.floating-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 100;
    cursor: pointer;
}

.floating-button:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

#whatsapp-button {
    background-color: #25D366;
    right: 2rem;
}

#email-button {
    background-color: var(--secondary);
    bottom: 6.5rem;
    right: 2rem;
}

/* Case Studies Page Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Override container width for full-width sections */
.hero-section .container,
#services .container,
#case-studies .container,
footer .container {
    max-width: none;
    width: 100%;
    padding: 0 1.5rem;
}

/* Full-width case study cards for case-studies page */
.case-study-card {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    margin-bottom: 3rem;
    position: relative;
    width: 100%;
    max-width: 100%;
}

.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.case-study-card .card-header {
    padding: 3rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    color: var(--light);
    text-align: center;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    position: relative;
    overflow: hidden;
}

.case-study-card .card-header h2 {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7) !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
}

.case-study-card .card-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background-color: #ffffff;
}

/* Simplified case study cards for home page */
#case-studies .case-study-card {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    margin-bottom: 0;
    position: relative;
    height: 100%;
}

#case-studies .case-study-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

#case-studies .case-study-card .card-header {
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    color: var(--light);
    text-align: center;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    position: relative;
    overflow: hidden;
}

#case-studies .case-study-card .card-header h2 {
    color: #ffffff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7) !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
}

#case-studies .case-study-card .card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background-color: #ffffff;
}

#case-studies .case-study-card .highlight-text {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--gray-800);
    font-weight: 600;
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
    background-color: rgba(67, 97, 238, 0.05);
    border-left: 4px solid var(--primary);
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border-radius: 8px;
}

.case-study-card {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease, max-height 0.7s ease-in-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    margin-bottom: 3rem;
    position: relative;
}

.case-study-card.expanded {
    max-height: 20000px; /* A very large value to ensure all content fits */
}

.case-study-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.card-header {
    padding: 3rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    color: var(--light);
    text-align: center;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    position: relative;
    overflow: hidden;
}

.card-header h2 {
    color: var(--light) !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
}

.card-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background-color: #ffffff;
}

.card-column {
    flex-basis: 33.33%;
    padding: 1.5rem 2rem;
    transition: transform 0.3s ease;
}

.card-column:hover {
    transform: translateY(-5px);
}

.card-column h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    padding-bottom: 0.75rem;
}

.card-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.card-column p {
    color: var(--gray-800);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
}

.highlight-text {
    font-style: italic;
    font-size: 1.25rem;
    color: var(--gray-800);
    font-weight: 600;
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
    background-color: rgba(67, 97, 238, 0.05);
    border-left: 4px solid var(--primary);
    text-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.full-details {
    padding: 2rem;
    border-top: 1px solid var(--gray-200);
    opacity: 1;
    transition: all 0.3s ease-in-out;
    background-color: var(--gray-100);
    max-height: 2000px;
    overflow: hidden;
}

.full-details.hidden {
    display: none;
    opacity: 0;
    max-height: 0;
    padding: 0 2rem;
}

.case-study-card.expanded .full-details {
    display: block;
    opacity: 1;
    animation: fadeIn 0.5s ease-in-out;
}

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

.details-section h3 {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1rem;
}

.details-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 4px;
}

.full-details p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--gray-700);
}

.fixed-top-search {
    position: sticky;
    top: 5rem;
    z-index: 40;
    padding: 1.5rem;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.fixed-top-search:focus-within {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
    transform: translateY(-3px);
}

.btn-secondary {
    background: linear-gradient(45deg, var(--secondary), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(247, 37, 133, 0.3);
}

.btn-secondary:hover {
    box-shadow: 0 8px 25px rgba(247, 37, 133, 0.4);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* Toggle Details Button */
.toggle-details {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, var(--primary), var(--accent));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.toggle-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--secondary), var(--secondary-light));
    transition: all 0.4s ease;
    z-index: -1;
}

.toggle-details:hover::before {
    left: 0;
}

.toggle-details:hover {
    box-shadow: 0 8px 25px rgba(114, 9, 183, 0.3);
    transform: translateY(-3px);
}

/* Modern Service Cards */
.service-card-modern {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 1px solid rgba(67, 97, 238, 0.1);
    position: relative;
    overflow: hidden;
}

.service-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card-modern:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.service-card-modern:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(114, 9, 183, 0.1));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.service-card-modern:hover .service-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.2), rgba(114, 9, 183, 0.2));
}

/* Hero Badge */
.hero-badge {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Hero Stats */
.hero-stats {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    background: linear-gradient(45deg, #ffffff, #f0f0f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Enhanced Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.slide-in-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Case Studies Page Styles */
.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.stat-number {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced Case Study Cards for Case Studies Page */
.case-study-card {
    background: white;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    overflow: hidden;
    border: 1px solid rgba(67, 97, 238, 0.1);
    position: relative;
}

.case-study-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.case-study-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.case-study-card:hover::before {
    transform: scaleX(1);
}

.case-study-card .card-header {
    padding: 3rem 3rem 2rem;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent));
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.case-study-card .card-header::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
}

.case-study-card .card-header h2 {
    color: white !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
    position: relative;
    z-index: 2;
}

.case-study-card .card-content {
    padding: 3rem;
    background: white;
}

.case-study-card .card-column {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.05), rgba(114, 9, 183, 0.05));
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid rgba(67, 97, 238, 0.1);
    transition: all 0.3s ease;
}

.case-study-card .card-column:hover {
    transform: translateY(-5px);
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(114, 9, 183, 0.1));
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.case-study-card .card-column h3 {
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.case-study-card .card-column h3 i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

.case-study-card .highlight-text {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.1), rgba(114, 9, 183, 0.1));
    border: 1px solid rgba(67, 97, 238, 0.2);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    text-align: center;
    font-style: italic;
    font-size: 1.2rem;
    color: var(--gray-800);
    font-weight: 600;
    position: relative;
}

.case-study-card .highlight-text::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.3;
    font-family: serif;
}

.case-study-card .toggle-details {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.case-study-card .toggle-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, var(--secondary), var(--accent));
    transition: all 0.4s ease;
    z-index: -1;
}

.case-study-card .toggle-details:hover::before {
    left: 0;
}

.case-study-card .toggle-details:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
}

.case-study-card .full-details {
    background: linear-gradient(135deg, rgba(67, 97, 238, 0.02), rgba(114, 9, 183, 0.02));
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.case-study-card .details-section h3 {
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.case-study-card .details-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 4px;
}

/* Loading Spinner Enhancement */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border: 0.3em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

/* Navigation Responsive Styles */
html, body {
    padding-top: 80px; /* Account for fixed navbar height */
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: border-box;
}

nav {
    transition: all 0.3s ease;
    width: 100vw;
    left: 0;
    right: 0;
    position: fixed;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 0;
    padding: 0;
}

nav .container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Mobile menu improvements */
#mobile-menu {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

#mobile-menu-button {
    transition: transform 0.3s ease;
}

#mobile-menu-button:hover {
    transform: scale(1.1);
}

/* Ensure logo is responsive */
nav img {
    max-height: 3.5rem;
    width: auto;
}

/* Mobile responsive adjustments for navbar */
@media (max-width: 768px) {
    html, body {
        padding-top: 70px; /* Adjust for smaller navbar on mobile */
        width: 100%;
        max-width: 100%;
    }
    
    nav .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    nav img {
        max-height: 3rem;
    }
    
    #mobile-menu {
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        width: 100%;
        left: 0;
        right: 0;
    }
    
    /* Hero Section Tablet */
    .hero-section {
        width: 100vw;
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Services Section Tablet */
    #services {
        width: 100vw;
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Case Studies Section Tablet */
    #case-studies {
        width: 100vw;
        margin-left: 0;
        margin-right: 0;
    }
    
    /* Footer Tablet */
    footer {
        width: 100vw;
        margin-left: 0;
        margin-right: 0;
    }
}

@media (max-width: 640px) {
    html, body {
        padding-top: 65px; /* Further adjust for smaller screens */
        width: 100%;
        max-width: 100%;
    }
    
    nav .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    nav img {
        max-height: 2.5rem;
    }
    
    /* Hero Section Mobile */
    .hero-section {
        width: 100vw;
        margin-left: 0;
        margin-right: 0;
    }
    
    .hero-content {
        width: 95%;
        max-width: none;
    }
    
    /* Services Section Mobile */
    #services {
        width: 100vw;
        margin-left: 0;
        margin-right: 0;
    }
    
    #services .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Case Studies Section Mobile */
    #case-studies {
        width: 100vw;
        margin-left: 0;
        margin-right: 0;
    }
    
    #case-studies .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Footer Mobile */
    footer {
        padding: 2rem 0;
        width: 100vw;
        margin-left: 0;
        margin-right: 0;
    }
    
    footer .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    footer .grid {
        gap: 2rem;
    }
    
    footer img {
        height: 2.5rem;
    }
    
    footer h3 {
        font-size: 1.125rem;
    }
    
    footer ul li {
        font-size: 0.875rem;
    }
    
    /* Loading Overlay Mobile */
    .loading-ai-icon {
        width: 60px;
        height: 60px;
    }
    
    .brain-circle {
        width: 45px;
        height: 45px;
    }
    
    .brain-pulse {
        width: 30px;
        height: 30px;
    }
    
    .brain-dots span {
        width: 3px;
        height: 3px;
    }
    
    #loading-overlay p {
        font-size: 0.875rem;
    }
}

/* Loading AI Icon Animation */
#loading-overlay {
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading-ai-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.ai-brain {
    position: relative;
    width: 100%;
    height: 100%;
}

.brain-circle {
    width: 60px;
    height: 60px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.brain-pulse {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s ease-in-out infinite;
}

.brain-dots {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.brain-dots span {
    display: block;
    width: 4px;
    height: 4px;
    background: #6366f1;
    border-radius: 50%;
    position: absolute;
    animation: brainThink 1.5s ease-in-out infinite;
}

.brain-dots span:nth-child(1) {
    top: -15px;
    left: -2px;
    animation-delay: 0s;
}

.brain-dots span:nth-child(2) {
    top: -5px;
    right: -15px;
    animation-delay: 0.5s;
}

.brain-dots span:nth-child(3) {
    bottom: -10px;
    left: -2px;
    animation-delay: 1s;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.8;
    }
}

@keyframes brainThink {
    0%, 100% { 
        opacity: 0.3;
        transform: scale(1);
    }
    50% { 
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Load More Button */
#load-more-btn {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    color: white;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

#load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

#load-more-btn:active {
    transform: translateY(0);
}

/* Mobile Responsive Adjustments */
@media (max-width: 640px) {
    /* Hero Section Mobile */
    .hero-content {
        padding: 1.5rem;
        width: 95%;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-content p {
        font-size: 1.25rem;
        line-height: 1.4;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }
    
    /* Case Studies Section Mobile */
    #case-studies h2 {
        padding: 0.75rem 1.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    #case-studies p {
        font-size: 1rem !important;
        padding: 0 1rem !important;
    }
    
    .hero-stats {
        padding: 1rem;
        margin-top: 2rem;
    }
    
    .stat-item {
        padding: 0.5rem;
    }
    
    /* Service Cards Mobile */
    .service-card-modern {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 1rem;
    }
    
    .service-icon i {
        font-size: 1.5rem;
    }
    
    /* Case Study Cards Mobile */
    .case-study-card .card-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .case-study-card .card-content {
        padding: 1.5rem;
    }
    
    .case-study-card .card-column {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .case-study-card .highlight-text {
        padding: 1rem;
        font-size: 1rem;
        margin: 1rem 0;
    }
    
    .case-study-card .toggle-details {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .case-study-card .full-details {
        padding: 1rem;
        margin-top: 1rem;
    }
    
    /* Stats Cards Mobile */
    .stat-card {
        padding: 1rem;
    }
    
    /* Button Mobile */
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Text Mobile */
    .text-5xl {
        font-size: 2.5rem;
    }
    
    .text-4xl {
        font-size: 2rem;
    }
    
    .text-3xl {
        font-size: 1.75rem;
    }
    
    .text-2xl {
        font-size: 1.5rem;
    }
    
    .text-xl {
        font-size: 1.25rem;
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding: 2rem;
        width: 95%;
    }
    
    .card-content {
        padding: 1.5rem;
    }
    
    .highlight-text {
        padding: 1.5rem;
        font-size: 1.1rem;
    }
    
    .service-card-modern {
        padding: 2rem;
    }
    
    .hero-stats {
        padding: 1.5rem;
    }
    
    /* Case Studies Section Tablet */
    #case-studies h2 {
        padding: 1rem 2rem !important;
    }
    
    #case-studies p {
        font-size: 1.125rem !important;
        padding: 0 1rem !important;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .case-study-card .card-header {
        padding: 2rem 2rem 1.5rem;
    }
    
    .case-study-card .card-content {
        padding: 2rem;
    }
    
    .case-study-card .card-column {
        padding: 1.5rem;
    }
    
    .stat-card {
        padding: 1.5rem;
    }
}

/* Tablet Responsive */
@media (min-width: 641px) and (max-width: 1024px) {
    .hero-content {
        padding: 2.5rem;
    }
    
    .service-card-modern {
        padding: 2.5rem;
    }
    
    .case-study-card .card-content {
        padding: 2.5rem;
    }
    
    .case-study-card .card-header {
        padding: 2.5rem 2.5rem 2rem;
    }
}