/* Custom CSS with specified color palette */
:root {
    /* Primary Color Palette */
    --slate-blue: #265077;
    --oxford-blue: #022140;
    --muted-purple-blue: #494B68;
    --dark-teal-blue: #1E4258;
    --dark-teal-green: #2D5F5D;
    
    /* Extended palette for UI elements */
    --white: #ffffff;
    --light-gray: #f7fafc;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

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

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--oxford-blue);
}

.gradient-text {
    background: linear-gradient(135deg, var(--slate-blue), var(--dark-teal-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Section with Geometric Pattern */
.hero-section {
    background: linear-gradient(135deg, var(--oxford-blue) 0%, var(--dark-teal-blue) 50%, var(--slate-blue) 100%);
    position: relative;
    overflow: hidden;
}

.geometric-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.1;
    background-image: 
        linear-gradient(45deg, transparent 45%, rgba(255,255,255,0.1) 49%, rgba(255,255,255,0.1) 51%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, rgba(255,255,255,0.1) 49%, rgba(255,255,255,0.1) 51%, transparent 55%);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
    animation: pattern-shift 20s linear infinite;
}

@keyframes pattern-shift {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(50px) translateY(50px); }
}

/* Additional geometric overlay for depth */
.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 35px,
        rgba(255,255,255,0.02) 35px,
        rgba(255,255,255,0.02) 70px
    );
    animation: slide 20s linear infinite;
    pointer-events: none;
}

@keyframes slide {
    0% { transform: translate(0, 0); }
    100% { transform: translate(70px, 70px); }
}

/* Navigation Styles */
.nav-link {
    color: var(--gray-700);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--slate-blue);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--slate-blue);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--slate-blue), var(--dark-teal-blue));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(38, 80, 119, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(38, 80, 119, 0.3);
}

.btn-secondary {
    background: var(--dark-teal-green);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--muted-purple-blue);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
}

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

.btn-white {
    background: white;
    color: var(--slate-blue);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-white:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.btn-outline-white {
    background: transparent;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    border: 2px solid white;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
}

.btn-outline-white:hover {
    background: white;
    color: var(--slate-blue);
}

/* Feature Cards */
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(38, 80, 119, 0.15);
    border-color: var(--slate-blue);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Workflow Container */
.workflow-container {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
    font-weight: 500;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--slate-blue);
    box-shadow: 0 0 0 3px rgba(38, 80, 119, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Case Study Cards */
.case-study-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
}

.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(38, 80, 119, 0.15);
}

.case-study-header {
    background: linear-gradient(135deg, var(--slate-blue), var(--dark-teal-blue));
    color: white;
    padding: 1.5rem;
}

.case-study-content {
    padding: 2rem;
}

.metric-card {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    border-left: 4px solid var(--dark-teal-green);
}

/* Solution Cards */
.solution-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    height: 100%;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-200);
    position: relative;
    overflow: hidden;
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--slate-blue), var(--dark-teal-green));
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(38, 80, 119, 0.15);
}

/* Timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-300);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--slate-blue);
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 0 0 4px var(--gray-200);
}

/* Contact Form */
.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Footer */
.bg-dark {
    background: var(--oxford-blue);
}

.bg-primary {
    background: var(--slate-blue);
}

.bg-secondary {
    background: var(--dark-teal-green);
}

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

.text-secondary {
    color: var(--dark-teal-green);
}

.text-accent {
    color: var(--dark-teal-green);
}

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

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-dot {
        left: 30px;
    }
    
    .geometric-pattern {
        background-size: 30px 30px;
    }
}

/* Loading Animation */
.loading-spinner {
    border: 3px solid var(--gray-300);
    border-top: 3px solid var(--slate-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--slate-blue);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

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

.scroll-to-top:hover {
    background: var(--dark-teal-blue);
    transform: translateY(-5px);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--slate-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-teal-blue);
}

/* Workflow Diagram Styles */
.flow-diagram-container {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* Single column for mobile */
    max-width: 80rem; /* Max width for large screens */
    margin: auto;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

/* Media query for medium screens and up to switch to a 4-column layout */
@media (min-width: 768px) {
    .flow-diagram-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Styling for each column in the diagram */
.flow-column {
    position: relative;
    padding: 2.5rem 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid #e2e8f0; /* Separator for mobile view */
}

@media (min-width: 768px) {
    .flow-column {
        border-bottom: none;
        border-right: 1px solid #e2e8f0; /* Separator for desktop view */
    }
    .flow-column:last-child {
        border-right: none;
    }
}

/* Styling for column titles */
.column-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 5rem;
    height: 2rem;
}

/* Base style for content boxes */
.content-box {
    width: 100%;
    max-width: 220px;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #ffffff;
}

/* Arrow connecting columns on larger screens */
.flow-arrow {
    display: none; /* Hidden on mobile */
}

@media (min-width: 768px) {
    .flow-arrow {
        display: block;
        position: absolute;
        top: 50%;
        right: -1.25rem;
        transform: translateY(-50%);
        color: #94a3b8;
        background-color: white;
        padding: 0 0.5rem;
    }
}
