/* Custom CSS for AI Smart Studio */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    scroll-behavior: smooth;
}

.btn {
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

/* Navigation */
.navbar {
    background: var(--primary-color) !important;
    box-shadow: var(--box-shadow);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.logo {
    height: 40px;
    width: auto;
    margin-right: 10px;
}



.nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--brand-cyan) !important;
    text-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
    padding-top: 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(30, 58, 138, 0.1)" stroke-width="0.5"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)" /></svg>');
    pointer-events: none;
}

.hero-image img {
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.hero-image img:hover {
    transform: scale(1.05);
    box-shadow: var(--box-shadow-lg);
}

/* Automation Cards */
.automation-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: none;
    overflow: hidden;
    height: 100%;
}

.automation-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--box-shadow-lg);
}

.automation-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.automation-card:hover .card-img-top {
    transform: scale(1.1);
}

.automation-card .card-body {
    padding: 1.5rem;
}

.automation-card .price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--brand-blue);
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.automation-card .btn {
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
}

/* Video Demo */
.video-demo {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-top: 1rem;
}

.video-demo video {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.video-demo .play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.video-demo .play-overlay:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

/* Benefits Section */
.benefit-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
}

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

.benefit-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Case Studies */
.case-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

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

.case-card img {
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.metrics .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Contact Form */
.contact-form {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Chatbot */
.chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 50%, #6610f2 100%);
    color: white;
    border: 3px solid white;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.4), 0 0 0 0 rgba(13, 110, 253, 0.7);
    animation: chatbotPulse 3s infinite;
}

.chatbot-toggle:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 12px 35px rgba(13, 110, 253, 0.5), 0 0 30px rgba(13, 110, 253, 0.3);
    animation: none;
}

@keyframes chatbotPulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(13, 110, 253, 0.4), 0 0 0 0 rgba(13, 110, 253, 0.7);
    }
    50% {
        box-shadow: 0 8px 25px rgba(13, 110, 253, 0.4), 0 0 0 15px rgba(13, 110, 253, 0);
    }
}

.chatbot-widget {
    position: fixed;
    bottom: 110px;
    right: 20px;
    width: 380px;
    height: 550px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15), 0 0 0 2px rgba(13, 110, 253, 0.1);
    z-index: 999;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 3px solid transparent;
    background-image: linear-gradient(white, white), linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    transform: translateY(20px) scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-widget.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.chatbot-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 50%, #6610f2 100%);
    color: white;
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.chatbot-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: headerShine 3s infinite;
}

@keyframes headerShine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    flex: 1;
}

.chat-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 3px solid white;
    margin-right: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    animation: avatarFloat 4s ease-in-out infinite;
}

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

.chatbot-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chatbot-subtitle {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: 400;
}

.btn-close-white {
    opacity: 0.8;
    transition: var(--transition);
}

.btn-close-white:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.chatbot-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
}

.chatbot-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(to bottom, rgba(13, 110, 253, 0.05), transparent);
    pointer-events: none;
}

.chatbot-footer {
    padding: 1.2rem 1.5rem;
    border-top: 2px solid #e9ecef;
    background: white;
    position: relative;
}

.chatbot-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(13, 110, 253, 0.3), transparent);
}

.chat-message {
    margin-bottom: 1.2rem;
    padding: 0.9rem 1.1rem;
    border-radius: 18px;
    max-width: 85%;
    position: relative;
    animation: messageSlideIn 0.4s ease-out;
    word-wrap: break-word;
}

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

.bot-message {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    color: white;
    margin-right: auto;
    border-bottom-left-radius: 6px;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
    position: relative;
}

.bot-message::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 0 12px 8px;
    border-color: transparent transparent #6610f2 transparent;
}

.user-message {
    background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
    color: var(--dark-color);
    margin-left: auto;
    border-bottom-right-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid #dee2e6;
    position: relative;
}

.user-message::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -8px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 8px 12px 0;
    border-color: transparent #f8f9fa transparent transparent;
}

.chat-input-group {
    border-radius: 25px;
    overflow: hidden;
    border: 2px solid #e9ecef;
    transition: var(--transition);
}

.chat-input-group:focus-within {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.chat-input-group .form-control {
    border: none;
    border-radius: 0;
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
}

.chat-input-group .form-control:focus {
    box-shadow: none;
}

.chat-input-group .btn {
    border: none;
    border-radius: 0;
    padding: 0.8rem 1.2rem;
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
    transition: var(--transition);
}

.chat-input-group .btn:hover {
    background: linear-gradient(135deg, #0b5ed7 0%, #520dc2 100%);
    transform: scale(1.05);
}

/* Онлайн индикатор */
.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    background: #198754;
    border: 3px solid white;
    border-radius: 50%;
    animation: onlinePulse 2s infinite;
}

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

/* Language Toggle */
#lang-toggle {
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 80px;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .chatbot-widget {
        width: calc(100vw - 40px);
        height: 450px;
        right: 20px;
        left: 20px;
        bottom: 90px;
    }
    
    .chatbot-toggle {
        width: 65px;
        height: 65px;
        font-size: 1.6rem;
    }
    
    .chat-avatar {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
    
    .chatbot-title {
        font-size: 1rem;
    }
    
    .chatbot-subtitle {
        font-size: 0.75rem;
    }
    
    .automation-card .card-img-top {
        height: 150px;
    }
    
    .case-card img {
        height: 150px;
    }
}

@media (max-width: 576px) {
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .display-5 {
        font-size: 1.8rem;
    }
    
    .benefit-icon {
        height: 60px;
    }
    
    .benefit-icon i {
        font-size: 2rem !important;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Success/Error Messages */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
}

/* Admin Button */
.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%);
    border: none;
}

/* Smooth Scrolling Offset */
section {
    scroll-margin-top: 80px;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0b5ed7;
}

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

.animate-on-load {
    animation: fadeInUp 0.6s ease-out;
}

/* Product Grid Improvements */
#automations-grid .col-lg-4:nth-child(odd) .automation-card {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.05) 0%, rgba(108, 117, 125, 0.05) 100%);
}

/* Button Hover Effects */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    border: none;
}

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

/* Typography */
.display-4, .display-5 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

.lead {
    font-weight: 400;
    color: var(--secondary-color);
}

/* Social Links */
.social-links a {
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--warning-color) !important;
    transform: translateY(-2px);
}

/* Form Validation Styles */
.form-control.is-invalid {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

/* Enhanced Branding Styles */
.btn-primary {
    background: var(--gradient-primary);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-outline-primary {
    border-color: var(--brand-blue);
    color: var(--brand-blue);
}

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

/* Enhanced Cards */
.automation-card {
    border-top: 3px solid transparent;
    background-image: linear-gradient(white, white), var(--gradient-primary);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.automation-card:hover {
    border-top: 3px solid transparent;
    background-image: linear-gradient(white, white), var(--gradient-secondary);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.benefit-card {
    border-left: 4px solid var(--brand-cyan);
}

.benefit-card:hover {
    border-left: 4px solid var(--brand-blue);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.05) 0%, rgba(14, 165, 233, 0.05) 100%);
}

/* Logo Enhancement - merged with main navbar-logo styles above */

/* Brand Colors for Icons */
.text-primary {
    color: var(--brand-blue) !important;
}

.text-info {
    color: var(--brand-cyan) !important;
}

/* Enhanced Hero Section */
.hero-section .btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.hero-section .btn-lg:hover {
    box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
    transform: translateY(-2px);
}

/* Brand Badge */
.brand-badge {
    background: var(--gradient-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced Footer */
footer {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-cyan) 100%);
}

/* Scrollbar Brand Colors */
::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
}

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

/* Focus States */
.form-control:focus {
    border-color: var(--brand-cyan);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25);
}

/* Brand Animation */
@keyframes brandPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(30, 58, 138, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(30, 58, 138, 0);
    }
}

.pulse-brand {
    animation: brandPulse 2s infinite;
}

/* ================================
   NEW STYLES FOR ENHANCED FEATURES
   ================================ */

/* ROI Calculator */
.roi-calculator-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 2px solid #e9ecef;
}

.calculator-inputs h5,
.calculator-results h5 {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.result-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--primary-color);
}

.result-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-color);
}

.roi-positive {
    color: var(--success-color) !important;
}

.roi-negative {
    color: var(--danger-color) !important;
}

.form-range {
    height: 0.5rem;
}

.form-range::-webkit-slider-thumb {
    background: var(--primary-color);
    border: 2px solid white;
    box-shadow: var(--box-shadow);
}

.form-range::-moz-range-thumb {
    background: var(--primary-color);
    border: 2px solid white;
    box-shadow: var(--box-shadow);
}

/* Clickable Benefit Cards */
.clickable-card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.clickable-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 110, 253, 0.9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.clickable-card:hover .card-overlay {
    opacity: 1;
}

.clickable-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Enhanced Modal Styles */
.modal-content {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    border: none;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0b5ed7 100%);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-body img {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.modal-body ul {
    padding-left: 0;
    list-style: none;
}

.modal-body ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f4;
    position: relative;
    padding-left: 1.5rem;
}

.modal-body ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Enhanced Chatbot */
.typing-indicator {
    position: relative;
}

.typing-dots {
    display: inline-block;
    position: relative;
    width: 60px;
    height: 20px;
}

.typing-dots span {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    animation: typingAnimation 1.5s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
    left: 0;
    animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
    left: 20px;
    animation-delay: 0.3s;
}

.typing-dots span:nth-child(3) {
    left: 40px;
    animation-delay: 0.6s;
}

@keyframes typingAnimation {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

.chatbot-widget {
    border: 2px solid var(--primary-color);
}

.chat-message {
    animation: fadeInUp 0.3s ease-out;
}

/* Enhanced Form Validation */
.form-control.is-valid {
    border-color: var(--success-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.94-.94 1.36 1.36.94-.94L6.7 5.09l.94-.94L5.5 2.01 4.56.73 3.39 1.9 2.45 2.84l-.94-.94L.38 3.02l.94.94z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 2.4 2.4M8.2 4.6l-2.4 2.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

/* reCAPTCHA Styling */
.g-recaptcha {
    display: flex;
    justify-content: center;
}

/* Loading Animation Enhancement */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

/* Chart Container */
#roiChart {
    max-height: 300px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .roi-calculator-card {
        margin: 0 1rem;
    }
    
    .result-value {
        font-size: 1.2rem;
    }
    
    .clickable-card .card-overlay {
        opacity: 0.1;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
    
    .calculator-inputs,
    .calculator-results {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .result-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .result-label {
        font-size: 0.8rem;
    }
    
    .result-value {
        font-size: 1.1rem;
    }
    
    #roiChart {
        max-height: 200px;
    }
    
    .modal-body .row {
        margin: 0;
    }
    
    .modal-body .col-md-6 {
        padding: 0;
        margin-bottom: 1rem;
    }
}

/* Accessibility Improvements */
.clickable-card:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

.form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Print Styles */
@media print {
    .chatbot-container,
    .navbar,
    .modal,
    .alert {
        display: none !important;
    }
    
    .roi-calculator-card {
        break-inside: avoid;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .benefit-card,
    .roi-calculator-card,
    .result-card {
        border: 2px solid var(--dark-color);
    }
    
    .clickable-card .card-overlay {
        background: rgba(0, 0, 0, 0.9);
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .clickable-card,
    .benefit-card,
    .automation-card,
    .chat-message {
        transition: none;
        animation: none;
    }
    
    .typing-dots span {
        animation: none;
        opacity: 1;
    }
}

/* Testimonials Styles */
.testimonial-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #f0f0f0;
}

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

.testimonial-avatar {
    position: relative;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.testimonial-avatar img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.testimonial-avatar:hover img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,123,255,0.3);
}

.play-button:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,123,255,0.4);
}

.play-button i {
    font-size: 14px;
    margin-left: 2px;
}

.testimonial-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.testimonial-role {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    color: #6c757d !important;
}

.testimonial-quote {
    border: none;
    margin: 0 0 1.5rem 0;
    padding: 0;
}

.testimonial-quote p {
    color: #495057;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
    position: relative;
}

.testimonial-quote p:before {
    content: '"';
    font-size: 3rem;
    color: #007bff;
    position: absolute;
    left: -20px;
    top: -10px;
    font-family: serif;
    opacity: 0.3;
}

.testimonial-rating {
    font-size: 0.9rem;
}

.testimonial-rating i {
    margin-right: 2px;
}

/* Video Modal Styles */
#testimonialVideoModal .modal-content {
    border-radius: 15px;
    overflow: hidden;
    border: none;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

#testimonialVideoModal .modal-header {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

#testimonialVideoModal .modal-title {
    font-weight: 600;
}

#testimonialVideo {
    border-radius: 0 0 15px 15px;
}

/* Responsive adjustments for testimonials */
@media (max-width: 768px) {
    .testimonial-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .testimonial-avatar img {
        width: 80px;
        height: 80px;
    }
    
    .play-button {
        width: 35px;
        height: 35px;
    }
    
    .testimonial-quote p:before {
        font-size: 2rem;
        left: -15px;
        top: -5px;
    }
}