/* Custom CSS for Agentic AI Integration Services */

/* Root variables for consistent theming */
:root {
    --primary-color: #012D61;
    --primary-light: #1a4c96;
    --primary-dark: #001b3d;
    --secondary-color: #2563eb;
    --text-light: #6b7280;
    --border-light: rgba(107, 114, 128, 0.2);
    --backdrop-blur: blur(8px);
    --transition-duration: 0.3s;
}

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Utility classes */
.backdrop-blur {
    backdrop-filter: var(--backdrop-blur);
}

.min-vh-100 {
    min-height: 100vh;
}

/* Header styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: var(--backdrop-blur);
    border-bottom: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-duration) ease;
    padding: 0.75rem 0;
}

.navbar.navbar-scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.logo-icon::after {
    content: '';
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 2px;
}

.navbar-nav .nav-link {
    color: #374151;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 0.5rem 1rem;
    position: relative;
}

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

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* Mobile menu styles */
#mobile-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: var(--backdrop-blur);
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--transition-duration) ease;
}

#mobile-menu.show {
    opacity: 1;
    transform: translateY(0);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    background: transparent;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Button styles */
.btn-outline-primary {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transition: all 0.2s ease;
}

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

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.2s ease;
}

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

.btn-light:hover {
    transform: translateY(-1px);
}

.btn-outline-light:hover {
    transform: translateY(-1px);
}

/* Hero section styles */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 50%, var(--secondary-color) 100%);
    overflow: visible;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-bg-decoration {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.6;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    opacity: 1 !important;
    transform: none !important;
}

.hero-content * {
    position: relative;
    z-index: inherit;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
}

@media (min-width: 992px) {
    .hero-title {
        font-size: 3.75rem;
    }
}

.hero-subtitle {
    color: #dbeafe;
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: default;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.02);
}

.feature-icon {
    font-size: 1.5rem;
    color: #dbeafe;
    margin-right: 12px;
    flex-shrink: 0;
}

.feature-text {
    color: white;
    font-weight: 500;
    font-size: 0.875rem;
    margin: 0;
}

/* Hero CTA Button */
.hero-cta-btn {
    background: white;
    color: var(--primary-color);
    border: none;
    transition: all 0.3s ease;
    transform: scale(1);
}

.hero-cta-btn:hover {
    background: #f8f9fa;
    color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Hero Image Styles */
.hero-image-container {
    position: relative;
    z-index: 2;
    margin-top: 2rem;
}

@media (min-width: 992px) {
    .hero-image-container {
        margin-top: 0;
        padding-left: 2rem;
    }
}

.hero-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(219, 234, 254, 0.2));
    border-radius: 1rem;
    transform: rotate(3deg);
    z-index: 1;
}

.hero-image-main {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-image-content {
    min-height: 350px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 2rem 1rem;
}

@media (min-width: 768px) {
    .hero-image-content {
        min-height: 400px;
        padding: 3rem 2rem;
    }
}

/* Floating elements */
.hero-float-1 {
    position: absolute;
    top: -1rem;
    right: -1rem;
    width: 5rem;
    height: 5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    filter: blur(20px);
    z-index: 0;
}

.hero-float-2 {
    position: absolute;
    bottom: -1.5rem;
    left: -1.5rem;
    width: 8rem;
    height: 8rem;
    background: rgba(219, 234, 254, 0.3);
    border-radius: 50%;
    filter: blur(40px);
    z-index: 0;
}

/* Responsive adjustments for hero */
@media (max-width: 991px) {
    .hero-section {
        min-height: auto;
        padding: 100px 0 60px;
    }
    
    .hero-image-container {
        margin-top: 3rem;
    }
    
    .hero-float-1,
    .hero-float-2 {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-image-content {
        min-height: 300px;
        padding: 1.5rem 1rem;
    }
    
    .feature-card {
        padding: 0.75rem;
    }
    
    .feature-text {
        font-size: 0.8rem;
    }
}

.hero-image-placeholder {
    position: relative;
}

.hero-image-placeholder .bg-light {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: var(--backdrop-blur);
}

/* Section spacing */
.section {
    padding: 80px 0;
    position: relative;
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Card styles */
.custom-card {
    border: 1px solid var(--border-light);
    border-radius: 16px;
    transition: all var(--transition-duration) ease;
    height: 100%;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.custom-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(1, 45, 97, 0.05), transparent);
    transition: all 0.6s ease;
}

.custom-card:hover::before {
    left: 100%;
}

.custom-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.custom-card .card-title {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.custom-card .card-text {
    color: var(--text-light);
    line-height: 1.6;
}

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

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

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease;
}

.fade-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease;
}

.fade-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.8s ease;
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

.stagger-animation {
    opacity: 0;
    transform: translateY(20px);
    animation: staggerFadeIn 0.6s ease forwards;
}

@keyframes staggerFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CTA section styles */
.cta-section {
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

.cta-section.variant-secondary {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.cta-section.variant-gradient,
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light), var(--secondary-color));
    color: white;
}

.cta-section.variant-gradient::before,
.bg-gradient-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.5;
}

.cta-section.variant-gradient .section-title,
.cta-section.variant-gradient .section-subtitle,
.bg-gradient-primary .section-title,
.bg-gradient-primary .section-subtitle {
    color: white;
}

.cta-section.variant-gradient .section-subtitle,
.bg-gradient-primary .section-subtitle {
    color: #dbeafe;
}

/* Footer styles */
.footer {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light), #0165b3);
    color: white;
    padding: 3rem 0 1rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 25px 25px;
    opacity: 0.6;
}

.footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer a {
    color: #dbeafe;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer a:hover {
    color: white;
    transform: translateX(3px);
}

.footer ul li {
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
}

.footer ul li:hover {
    transform: translateX(5px);
}

/* Accordion custom styles */
.accordion-button {
    background-color: transparent;
    border: none;
    box-shadow: none;
    font-weight: 600;
    color: var(--primary-color);
    padding: 1.5rem 1.25rem;
    font-size: 1.1rem;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(1, 45, 97, 0.05);
    color: var(--primary-color);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--border-light);
}

.accordion-item {
    border: 1px solid var(--border-light);
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    transition: all var(--transition-duration) ease;
}

.accordion-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.accordion-body {
    padding: 1.5rem 1.25rem;
    line-height: 1.7;
    color: #4b5563;
}

/* Process section styles */
.process-step {
    position: relative;
}

.process-step::after {
    content: '';
    position: absolute;
    top: 30px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), transparent);
    z-index: 0;
}

.process-step:last-child::after {
    display: none;
}

/* Counter animation */
.counter {
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

/* Loading spinner */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Form validation styles */
.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .hero-section {
        padding: 100px 0 60px;
        min-height: auto;
    }
    
    .section {
        padding: 60px 0;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-light);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .feature-card {
        margin-bottom: 0.5rem;
    }
    
    .hero-section {
        padding: 90px 0 50px;
    }
    
    .cta-section {
        padding: 60px 0;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .hero-section {
        padding: 80px 0 40px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .custom-card {
        margin-bottom: 1rem;
    }
    
    .feature-card {
        padding: 0.75rem;
    }
    
    .feature-text {
        font-size: 0.8rem;
    }
}

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

/* Focus styles for accessibility */
.btn:focus,
.nav-link:focus,
.accordion-button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    .btn {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
    }
    
    .hero-title,
    .section-title {
        color: black !important;
    }
}