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

/* Font Display Optimization for Icon Fonts */
.bi::before,
[class^="bi-"]::before,
[class*=" bi-"]::before {
    font-display: swap;
}

.fa,
.fas,
.far,
.fal,
.fab {
    font-display: swap;
}

/* Fallback font stack for better loading experience */
body,
.navbar,
.modal-content,
.card-unified {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-display: swap;
}

/* Smooth transition when fonts load */
.font-loaded * {
    transition: font-family 0.3s ease;
}

/* Network-aware loading indicators */
.slow-connection .loading::after {
    animation-duration: 1.5s; /* Slower animation for slow networks */
}

/* Reduce motion on slow connections */
.slow-connection * {
    animation-duration: 0.5s !important;
    transition-duration: 0.2s !important;
}

/* Combined Styles for AI Sandbox */

/* ========== Shared Component Styles ========== */

/* Body padding for fixed navbar */
body {
    padding-top: 80px;
}

/* Navbar Styles */
.navbar {
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, #667eea, #764ba2) 1;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: #495057 !important;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
    margin: 0 0.25rem;
    padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link.fw-bold {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white !important;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Ensure navbar items are vertically centered when wrapping */
.navbar-collapse {
    align-items: center;
}

.navbar-nav {
    align-items: center;
    align-self: center;
}

.navbar-nav.me-auto,
.navbar-nav.ms-auto {
    display: flex;
    align-items: center;
}

/* When navbar is expanded, ensure proper vertical centering */
.navbar-expand-lg .navbar-collapse.show {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}

/* On large screens, always show as flex */
@media (min-width: 992px) {
    .navbar-expand-lg .navbar-collapse {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
    }
}

.navbar-expand-lg .navbar-nav {
    display: flex;
    align-items: center;
}

/* Additional alignment for when items wrap */
@media (max-width: 991.98px) {
    .navbar-collapse .navbar-nav {
        align-items: center;
        justify-content: center;
    }
}

/* Modal Styles */
.modal-content {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: none;
    border-radius: 1.5rem;
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.5rem 2rem;
}

.modal-header .modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.modal-header .btn-close {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    opacity: 1;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    position: relative;
}

.modal-header .btn-close::before {
    content: '✕';
    color: #495057;
    font-size: 1rem;
    font-weight: bold;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    line-height: 1;
}

.modal-header .btn-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    transition: all 0.2s ease;
}

.modal-header .btn-close:hover::before {
    color: #dc3545;
}

.modal-body {
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.modal-body .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.modal-body .form-control {
    border: 2px solid #e9ecef;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.modal-body .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
    transform: translateY(-2px);
}

.modal-body .btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 1rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.modal-body .btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8, #6b42a1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.modal-body .btn-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border: none;
    border-radius: 1rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.modal-body .btn-success:hover {
    background: linear-gradient(135deg, #218838, #1da187);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.modal-body .alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 2px solid #f5c6cb;
    border-radius: 1rem;
    color: #721c24;
    padding: 1rem;
    font-weight: 500;
}

.modal-body .alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 2px solid #c3e6cb;
    border-radius: 1rem;
    color: #155724;
    padding: 1rem;
    font-weight: 500;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    margin-top: -80px;
    padding-top: calc(4rem + 80px);
    margin-bottom: 2rem;
    border-radius: 0 0 2rem 2rem;
    position: relative;
    overflow: hidden;
}

/* Hero Section Headers with Icons */
.hero-section h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-section h1 i.display-1 {
    font-size: 3rem !important;
    line-height: 1;
}

.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 1000 1000"><defs><radialGradient id="grad"><stop offset="0%" stop-color="rgba(255,255,255,0.1)"/><stop offset="100%" stop-color="rgba(255,255,255,0)"/></radialGradient></defs><circle cx="200" cy="300" r="150" fill="url(%23grad)"/><circle cx="800" cy="700" r="200" fill="url(%23grad)"/><circle cx="600" cy="200" r="100" fill="url(%23grad)"/></svg>') no-repeat;
    background-size: cover;
    opacity: 0.3;
    pointer-events: none;
}

.hero-badge {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.badge-text {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    display: inline-block;
}

.text-highlight {
    background: linear-gradient(45deg, #ff6b9d, #ffd93d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.hero-buttons {
    margin-bottom: 2rem;
}

.hero-buttons .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-buttons .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    color: white;
    transform: translateY(-2px);
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-feature {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-feature i {
    color: #ffd93d;
    font-size: 1.1rem;
}

/* Feature cards now use unified card system */

.gradient-card {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 50%, #4facfe 100%);
    color: white;
    border: none;
}

/* Icons */
.icon-large {
    font-size: 3rem;
    margin-bottom: 1rem;
    margin-right: 1.5rem;
    color: #667eea;
    line-height: 1;
    display: block;
}

/* Colorful Bootstrap Icons */
.bi-primary { color: #667eea !important; }
.bi-secondary { color: #764ba2 !important; }
.bi-success { color: #28a745 !important; }
.bi-danger { color: #dc3545 !important; }
.bi-warning { color: #ffc107 !important; }
.bi-info { color: #17a2b8 !important; }

/* Icon Category Colors */
.bi-rocket { color: #fd7e14 !important; }
.bi-lightning { color: #ffc107 !important; }
.bi-bullseye { color: #28a745 !important; }
.bi-gear { color: #6c757d !important; }
.bi-tools { color: #fd7e14 !important; }
.bi-stars { color: #e83e8c !important; }
.bi-trophy { color: #ffc107 !important; }
.bi-question-circle { color: #17a2b8 !important; }

/* Communication & Contact Icons */
.bi-volume-up { color: #667eea !important; }
.bi-telephone { color: #28a745 !important; }
.bi-chat-text { color: #17a2b8 !important; }
.bi-mic { color: #dc3545 !important; }
.bi-file-music { color: #e83e8c !important; }

/* Document & File Icons */
.bi-file-text { color: #fd7e14 !important; }
.bi-file-earmark { color: #6f42c1 !important; }
.bi-clipboard { color: #20c997 !important; }
.bi-briefcase { color: #495057 !important; }
.bi-receipt { color: #28a745 !important; }

/* User & People Icons */
.bi-person { color: #667eea !important; }
.bi-people { color: #6f42c1 !important; }
.bi-person-plus { color: #28a745 !important; }
.bi-box-arrow-in-right { color: #17a2b8 !important; }

/* Tech & Analysis Icons */
.bi-lightbulb { color: #ffc107 !important; }
.bi-bar-chart { color: #fd7e14 !important; }
.bi-camera { color: #e83e8c !important; }
.bi-building { color: #6c757d !important; }
.bi-check-square { color: #28a745 !important; }
.bi-tag { color: #dc3545 !important; }
.bi-exclamation-triangle { color: #ffc107 !important; }
.bi-search { color: #667eea !important; }
.bi-shield-check { color: #28a745 !important; }

/* Number Circle Icons */
.bi-1-circle { color: #667eea !important; }
.bi-2-circle { color: #6f42c1 !important; }
.bi-3-circle { color: #e83e8c !important; }
.bi-4-circle { color: #fd7e14 !important; }

/* Currency & Business Icons */
.bi-currency-dollar { color: #28a745 !important; }

/* Animated Icons */
.bi-rocket:hover { 
    color: #ff6b9d !important; 
    transform: scale(1.1);
    transition: all 0.3s ease;
}

.bi-stars:hover { 
    color: #ff6b9d !important; 
    animation: sparkle 1s ease-in-out infinite;
}

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

/* White Icons on Dark Backgrounds */
.hero-section [class*="bi-"],
.modal-header [class*="bi-"],
.btn-tool [class*="bi-"],
.btn-cta [class*="bi-"],
.btn-primary [class*="bi-"],
.navbar-nav .nav-link.fw-bold [class*="bi-"],
.gradient-card [class*="bi-"] {
    color: white !important;
}

/* Specific dark background overrides */
.hero-section .bi-rocket,
.hero-section .bi-stars,
.modal-header .bi-person-plus,
.modal-header .bi-box-arrow-in-right,
.btn-tool .bi-rocket,
.btn-cta .bi-stars {
    color: white !important;
}

/* Maintain hover effects on dark backgrounds */
.hero-section .bi-rocket:hover,
.btn-tool .bi-rocket:hover,
.btn-cta .bi-stars:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    transform: scale(1.1);
}

/* Step numbers now use card-icon in unified system */

/* Badge Category */
.badge-category {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* Divider */
.divider {
    border: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, #667eea, transparent);
    margin: 2rem 0;
}

/* Input Section */
.input-section {
    margin-bottom: 2rem;
}

/* Required Indicator */
.required-indicator {
    color: #dc3545;
}

/* Required Field Styling */
.required-field {
    border-left: 4px solid #dc3545 !important;
    position: relative;
}

.required-field:focus {
    border-left: 4px solid #dc3545 !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.1), 0 0 0 0.25rem rgba(102, 126, 234, 0.25) !important;
}

/* Required field labels with asterisk styling */
.form-label .text-danger {
    font-weight: 700;
    font-size: 1.1em;
    margin-left: 0.25rem;
}

/* Enhanced visual feedback for required fields */
.required-field::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(135deg, #dc3545 0%, #fd5c70 100%);
    border-radius: 0 4px 4px 0;
}

/* Required field validation states */
.required-field.is-valid {
    border-left-color: #28a745 !important;
}

.required-field.is-valid::before {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
}

/* Required field placeholder enhancement */
.required-field::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* Required fields container highlighting */
.mb-3:has(.required-field),
.col-md-6:has(.required-field),
.col-lg-9:has(.required-field) {
    position: relative;
}

.mb-3:has(.required-field)::after,
.col-md-6:has(.required-field)::after,
.col-lg-9:has(.required-field)::after {
    content: 'Обязательное поле';
    position: absolute;
    top: -8px;
    right: 8px;
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mb-3:hover::after,
.col-md-6:hover::after,
.col-lg-9:hover::after {
    opacity: 1;
}

/* Prevent required fields with values from showing as invalid on page load */
.required-field[required]:not(:placeholder-shown):valid {
    border-color: #ced4da !important;
}

/* Specifically handle the classification parameter fields that have default values */
#typeOptions[required]:valid,
#topicOptions[required]:valid, 
#priorityOptions[required]:valid {
    border-color: #ced4da !important;
}

/* Only show invalid styling when explicitly marked with is-invalid class */
.required-field.is-invalid {
    border-color: #dc3545 !important;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Required field placeholder enhancement */
.required-field::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* Required fields container highlighting */
.mb-3:has(.required-field),
.col-md-6:has(.required-field) {
    position: relative;
}

.mb-3:has(.required-field)::after,
.col-md-6:has(.required-field)::after {
    content: 'Обязательное поле';
    position: absolute;
    top: -8px;
    right: 8px;
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mb-3:hover::after,
.col-md-6:hover::after {
    opacity: 1;
}

/* ========== Component Specific Styles ========== */

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 4rem 0;
    margin-top: 2rem;
    position: relative;
    z-index: 2;
}

.stats-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 1.5rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 3px solid transparent;
    background-clip: padding-box;
}

.stats-card:hover {
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.stats-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 1.1rem;
    color: #6c757d;
    font-weight: 500;
}

/* Tools Section */
.tools-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #6c757d;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* Unified Card System */
.card-unified {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 1.5rem;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 3px solid transparent;
    background-clip: padding-box;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

.card-unified:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Unified Card Components */
.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.card-icon {
    font-size: 2rem;
    color: #0d6efd;
    flex-shrink: 0;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
}

.card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body .mb-3 {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body textarea.form-control {
    flex: 1;
    min-height: 120px;
    resize: none;
}

.card-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.card-description {
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: auto;
}

.btn-tool {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    width: 100%;
    display: block;
}

.btn-tool:hover {
    color: white;
}

/* Ensure form elements have consistent spacing */
.card-body .form-label {
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.card-body .form-text {
    margin-top: 0.5rem;
    color: #6c757d;
}

/* Feature Badge */
.feature-badge {
    display: inline-block;
    background: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
    padding: 0.5rem 1rem;
    border-radius: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0.25rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.feature-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
    background: #e9ecef;
    color: #495057;
}

.feature-badge i {
    font-size: 0.875rem;
}

/* How It Works Section */
.how-it-works-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Steps Section */
.steps-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.steps-section .section-title,
.steps-section .section-subtitle {
    color: white;
}

/* Step card styles merged into unified card system */

/* Examples Section */
.examples-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.examples-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.example-tag {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 2rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #495057;
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    font-size: 0.9rem;
    line-height: 1.3;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.example-tag:hover {
    border-color: #667eea;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.25);
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    color: #495057;
    text-decoration: none;
}

.example-tag strong {
    color: #2c3e50;
}

.example-tag i {
    opacity: 0.7;
    transition: opacity 0.3s ease;
    flex-shrink: 0;
}

.example-tag:hover i {
    opacity: 1;
}

/* CTA Box */
.cta-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2rem;
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    margin-top: 4rem;
}

.cta-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.cta-highlight {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2rem 0;
}

.btn-cta {
    background: linear-gradient(135deg, #f093fb, #f5576c);
    border: none;
    border-radius: 2rem;
    padding: 1rem 3rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-cta:hover {
    background: linear-gradient(135deg, #e081f7, #f44762);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(240, 147, 251, 0.5);
    color: white;
    text-decoration: none;
}

/* FAQ Section */
.faq-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.faq-accordion .accordion-item {
    border: none;
    border-radius: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.faq-accordion .accordion-button {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: none;
    font-weight: 600;
    padding: 1.5rem;
    color: #2c3e50;
}

.faq-accordion .accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: none;
}

.faq-accordion .accordion-button:focus {
    box-shadow: none;
}

.faq-accordion .accordion-body {
    background: white;
    padding: 1.5rem;
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Hero Emoji Animation */
#main-hero-emoji {
    font-size: 5rem;
    margin-bottom: 2rem;
    display: inline-block;
    animation: hero-bounce 2s infinite;
}

@keyframes hero-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Text Decoration Hover */
.text-decoration-underline-hover:hover,
.text-decoration-underline-hover:focus {
    text-decoration: underline !important;
}

.form-section {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.form-section-header .emoji {
    font-size: 1.5rem;
    line-height: 1;
}

.form-section-header h3 {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
}

.form-group-inline {
    margin-bottom: 1rem;
}

.form-group-inline .input-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin-bottom: 0.25rem;
}

.form-group-inline label {
    flex: 0 0 200px;
    margin-bottom: 0;
    font-weight: 500;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group-inline .input-wrapper {
    flex: 1;
    min-width: 0;
}

.form-group-inline .form-control {
    width: 100%;
}

.form-group-inline .form-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin: 0.25rem 0 0 200px;  /* Align with input, accounting for label width */
    padding-left: 1rem;  /* Match the gap between label and input */
}

/* Override Bootstrap's default margin-bottom for form-group */
.form-group {
    margin-bottom: 1rem;
}

/* Make form controls more compact but still readable */
.form-control,
.form-select {
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
}

.input-method-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    height: auto;
    display: flex;
    flex-direction: column;
}

.input-method-card textarea {
    resize: vertical;
    min-height: 100px;
    max-height: 300px;
}

.input-method-card .btn {
    margin-top: 1rem;
}

.input-method-card.file-upload {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}



.why-use-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem 0;
}

/* Legacy card styles removed - all cards now use unified system */

/* Testimonials Section */
.testimonials-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 5rem 0;
    margin: 3rem 0;
}

.testimonial-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

.testimonial-content {
    flex-grow: 1;
}

.testimonial-stars {
    color: #ffc107;
    font-size: 1.1rem;
}

.testimonial-text {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #495057;
    font-style: italic;
    margin-bottom: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
}

.author-avatar {
    font-size: 3rem;
    color: #667eea;
    line-height: 1;
}

.author-name {
    font-weight: 600;
    color: #495057;
    font-size: 1.1rem;
}

.author-title {
    color: #6c757d;
    font-size: 0.9rem;
}



/* Service Badge */
.service-badge {
    display: inline-block;
    margin-bottom: 1.5rem;
}

.service-badge .badge-text {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    display: inline-block;
}

/* Form Section Improvements */
.form-section {
    background: white;
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.form-section:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.form-section-title {
    color: #495057;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Enhanced Form Controls */
.form-control, .form-select {
    border: 2px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fff;
}

/* Ensure proper height for select elements to match input fields */
.form-select {
    height: calc(1rem * 1.5 + 0.875rem * 2 + 2px * 2);
    line-height: 1.5;
}

/* Ensure dropdown options are properly sized */
.form-select option {
    padding: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

.form-control:hover, .form-select:hover {
    border-color: #667eea;
}

/* Form Labels */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.75rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Text */
.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Groups */
.mb-3, .mb-4 {
    position: relative;
}

/* File Input Styling */
.form-control[type="file"] {
    padding: 0.75rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #ced4da;
    transition: all 0.3s ease;
}

.form-control[type="file"]:hover {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f3ff 0%, #e6ecff 100%);
}

/* Textarea Enhancements */
textarea.form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Button Improvements */
.btn-primary, .btn-tool {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    border-radius: 0.75rem;
    padding: 0.875rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before, .btn-tool::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, .btn-tool:hover::before {
    left: 100%;
}

.btn-primary:hover, .btn-tool:hover {
    background: linear-gradient(135deg, #5a6fd8, #6b42a1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Input Groups with Icons */
.input-group-text {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    border-radius: 0.75rem 0 0 0.75rem;
}

/* Form Validation Styles */
.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.15);
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.15);
}

/* Progress Indicators */
.form-step {
    position: relative;
    margin-bottom: 2rem;
}

.form-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.form-step.step-1::before { width: 25%; }
.form-step.step-2::before { width: 50%; }
.form-step.step-3::before { width: 75%; }
.form-step.step-4::before { width: 100%; }

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    transform: translateY(100px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.scroll-to-top.show {
    opacity: 1;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: linear-gradient(135deg, #5a6fd8, #6b42a1);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #667eea;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Enhanced Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(248, 249, 250, 0.95) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

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

/* Focus Indicators for Accessibility */
.btn:focus, 
.form-control:focus,
.form-select:focus,
.nav-link:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #667eea;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1001;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
    color: white;
}

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

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

/* Improved Mobile Menu */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: 2px solid #667eea;
}

/* Enhanced Cards Hover Effects */
.card-unified, .testimonial-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Footer */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%) !important;
}

footer a:hover {
    color: #667eea !important;
}

/* Responsive testimonials and hero */
@media (max-width: 768px) {
    .testimonials-section {
        padding: 3rem 0;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .hero-features {
        gap: 1rem;
    }
    
    .hero-feature {
        font-size: 0.85rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
    
    .form-section {
        padding: 2rem 1.5rem;
        border-radius: 1rem;
    }
    
    .hero-section h1 {
        flex-wrap: wrap;
    }
    
    /* Fix navbar alignment on mobile - center all nav items */
    .navbar-collapse .navbar-nav {
        text-align: center;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    .navbar-collapse .navbar-nav .nav-item {
        text-align: center;
    }
    
    .navbar-collapse .navbar-nav .nav-link {
        text-align: center;
        padding: 0.75rem 1rem;
        justify-content: center;
        display: flex;
    }
}

/* JSON Viewer Styling */
.json-viewer {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    overflow-x: auto;
    white-space: pre-wrap;
}

.json-key {
    color: #0066cc;
    font-weight: 600;
}

.json-string {
    color: #008000;
}

.json-number {
    color: #ff6600;
}

.json-boolean {
    color: #cc0066;
    font-weight: 600;
}

.json-null {
    color: #999999;
    font-style: italic;
}

.json-bracket {
    color: #333333;
    font-weight: bold;
}

/* Result text styling */
.result-text {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1rem;
    line-height: 1.6;
}

/* Checkbox validation styling */
#extractionOptions.is-invalid {
    border: 2px solid #dc3545;
    border-radius: 0.5rem;
    padding: 0.5rem;
    background-color: rgba(220, 53, 69, 0.05);
}

#extractionOptions.is-invalid .form-check-label {
    color: #dc3545;
}

/* Enhanced form check styling */
.form-check {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.form-check:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.form-check-input:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
    border-color: #667eea;
}

.form-check-label {
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.form-check-input:checked + .form-check-label {
    color: #667eea;
    font-weight: 600;
}