/* ================================
   CSS Variables
   ================================ */
:root {
    --primary-color: #007dc0;
    --primary-dark: #005a8b;
    --primary-light: #e6f4fd;
    --secondary-color: #2c3e50;
    --accent-color: #f39c12;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --text-white: #ffffff;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #2c3e50;
    --border-light: #e9ecef;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max-width: 1200px;
    --section-padding: 80px 0;
    --mobile-padding: 40px 0;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    font-size: 16px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ================================
   Typography
   ================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 1.75rem);
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* ================================
   Buttons
   ================================ */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    font-size: 16px;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

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

/* ================================
   Navigation
   ================================ */
.navbar {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.cta-button {
    background-color: var(--primary-color);
    color: var(--text-white) !important;
    padding: 10px 20px;
    border-radius: var(--border-radius);
}

.cta-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    border-radius: var(--border-radius);
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 100;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    border-bottom: 1px solid var(--border-light);
}

.dropdown-menu li:last-child {
    border-bottom: none;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Mobile Navigation */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.nav-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: var(--transition);
}

/* ================================
   Hero Section
   ================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-white) 100%);
    padding: 120px 0 80px;
    margin-top: 80px;
}

.hero-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-title {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.integration-flow {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.flow-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.flow-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
}

.flow-icon.success {
    background-color: var(--accent-color);
}

.flow-arrow {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.hero-sidebar {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.sidebar-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.journey-points {
    list-style: none;
}

.journey-points li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.journey-points i {
    color: var(--primary-color);
}

/* ================================
   Credibility Bar
   ================================ */
.credibility-bar {
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: 40px 0;
    text-align: center;
}

.credibility-content h2 {
    color: var(--text-white);
    margin-bottom: 1rem;
}

.credibility-bar p,
.credibility-bar h4 {
    color: var(--text-white);
}

.capability h4 {
    color: var(--text-white);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.capability p {
    color: var(--text-white);
    opacity: 0.9;
}

.capabilities {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin: 2rem 0;
}

.capability {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.capability i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ================================
   Sections
   ================================ */
.services,
.integration-advantage,
.publications {
    padding: var(--section-padding);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ================================
   Services Grid
   ================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-features {
    list-style: none;
    margin: 1.5rem 0;
    text-align: left;
}

.service-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-light);
}

.service-features li:last-child {
    border-bottom: none;
}

.service-link {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.service-link:hover {
    text-decoration: underline;
}

/* ================================
   Integration Advantage
   ================================ */
.integration-advantage {
    background-color: var(--bg-light);
}

.integration-advantage h2 {
    text-align: center;
    margin-bottom: 3rem;
}

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

.advantage-item {
    text-align: center;
    padding: 1.5rem;
}

.advantage-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.advantage-item h4 {
    color: var(--text-dark);
}

.cta-center {
    text-align: center;
}

/* ================================
   Publications
   ================================ */
.publications {
    text-align: center;
}

.publications h2 {
    margin-bottom: 1rem;
}

.publications p {
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.publications-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.publication-item {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.publication-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.publication-image {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: var(--primary-light);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 1rem;
}

.publication-item h4 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.publication-item p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ================================
   Footer
   ================================ */
.footer {
    background-color: var(--bg-dark);
    color: var(--text-white);
    padding: 60px 0 20px;
}

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

.footer-section h3,
.footer-section h4 {
    color: var(--text-white);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 768px) {
    :root {
        --section-padding: var(--mobile-padding);
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-white);
        box-shadow: var(--shadow);
        transform: scaleY(0);
        transform-origin: top;
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: scaleY(1);
    }
    
    .nav-list {
        flex-direction: column;
        padding: 2rem 0;
        gap: 1rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .integration-flow {
        justify-content: center;
    }
    
    .flow-arrow {
        display: none;
    }
    
    .capabilities {
        flex-direction: column;
        gap: 1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .advantage-grid {
        grid-template-columns: 1fr;
    }
    
    .publications-showcase {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-sidebar {
        padding: 1.5rem;
    }
    
    .service-card,
    .publication-item {
        padding: 1.5rem;
    }
}

/* ================================
   Service Page Styles
   ================================ */
.service-highlights {
    display: flex;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.publication-stats {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.publication-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.publication-stats i {
    color: var(--primary-color);
}

.highlight {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.highlight i {
    font-size: 1.25rem;
}

.service-details {
    padding: var(--section-padding);
}

.details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

.details-content {
    max-width: none;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.content-section ul {
    margin-top: 1rem;
}

.content-section ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    list-style: none;
    position: relative;
    padding-left: 1.5rem;
}

.content-section ul li:before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}

.content-section ul li:last-child {
    border-bottom: none;
}

.details-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.pricing-card,
.results-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.pricing-card h3,
.results-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.price-range {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 0.5rem;
}

.pricing-card p {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.pricing-features {
    list-style: none;
    margin-bottom: 2rem;
}

.pricing-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light);
    position: relative;
    padding-left: 1.5rem;
}

.pricing-features li:before {
    content: '✓';
    color: var(--primary-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.btn-full {
    width: 100%;
    text-align: center;
}

.result-stat {
    text-align: center;
    margin-bottom: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.how-it-works {
    padding: var(--section-padding);
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 5; /* Lower z-index so chaos text appears above */
}

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem;
    background-color: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.step-number {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: var(--text-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.perfect-for {
    padding: var(--section-padding);
}

.perfect-for h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.business-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.business-type {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.business-type:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.type-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.business-type h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--text-white);
    padding: var(--section-padding);
    text-align: center;
}

.cta-content h2 {
    color: var(--text-white);
    margin-bottom: 1rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-actions .btn-outline {
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--text-white);
}

.cta-actions .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--text-white);
}

/* ================================
   Utility Classes
   ================================ */
.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-color);
}

.bg-light {
    background-color: var(--bg-light);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}

/* ================================
   Animation & Effects
   ================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Smooth scrolling for all links */
html {
    scroll-padding-top: 100px;
}

/* ================================
   Accessibility Features
   ================================ */
/* Skip Navigation Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--text-white);
    padding: 8px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}

/* Focus states for accessibility */
.btn:focus,
.nav-link:focus,
a:focus,
button:focus,
[tabindex]:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(0, 125, 192, 0.3);
}

/* Ensure focus is visible on interactive elements */
.service-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border-width: 2px;
        font-weight: 600;
    }
    
    .nav-link {
        text-decoration: underline;
        font-weight: 500;
    }
    
    .text-light {
        color: #666666; /* Darker for better contrast */
    }
    
    .service-card {
        border: 2px solid var(--border-light);
    }
}

/* Ensure minimum color contrast ratios */
.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    border-color: var(--primary-dark);
    background-color: var(--primary-dark);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Loading states */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* ================================
   Case Study Styles
   ================================ */
.case-study-preview {
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.case-study-preview:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.case-study-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.case-study-preview:hover .case-study-image {
    transform: scale(1.02);
}

.case-study-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

.case-study-type {
    font-size: 0.875rem;
    color: var(--text-light);
    background: var(--primary-light);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

.service-card .case-study-actions .btn {
    margin: 0;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* Resource page specific adjustments */
.resources-page .service-card {
    height: auto;
}

.resources-page .service-card h3 {
    margin-top: 0;
}