/* Beas Rule Engine - Modern Web Design */

:root {
    --primary-color: #1e40af;
    --secondary-color: #475569;
    --success-color: #059669;
    --info-color: #0891b2;
    --warning-color: #d97706;
    --danger-color: #dc2626;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    --gradient-secondary: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

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

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

/* Navigation */
.navbar {
    background: var(--primary-color) !important;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.navbar-brand img {
    filter: brightness(0) invert(1);
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--info-color) !important;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-image {
    position: relative;
}

.code-window {
    background: var(--dark-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.3s ease;
}

.code-window:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.code-header {
    background: #2d3748;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.code-dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27ca3f; }

.code-title {
    color: #a0aec0;
    font-size: 0.9rem;
    font-weight: 500;
}

.code-content {
    padding: 20px;
    background: #1a202c;
}

.code-content pre {
    margin: 0;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Features Section */
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

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

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

/* Architecture Section */
.architecture-diagram {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.layer {
    margin-bottom: 2rem;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.layer:last-child {
    margin-bottom: 0;
}

.layer h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.components {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.component {
    background: var(--light-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-color);
}

/* Quick Start Section */
.step-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    position: relative;
}

.step-number {
    position: absolute;
    top: -15px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.step-card h4 {
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.step-card pre {
    background: var(--light-color);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* API Section */
.api-endpoint {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.method {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.method.post {
    background: var(--success-color);
    color: white;
}

.path {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.endpoint-description {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.endpoint-example {
    margin-bottom: 1.5rem;
}

.endpoint-example h6 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.endpoint-example pre {
    background: var(--light-color);
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Documentation Section */
.doc-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

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

.doc-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: white;
}

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

/* Security Section */
.security-feature {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.security-feature h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* Contact Section */
.contact-info {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 10px;
    background: var(--light-color);
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item i {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.contact-item h5 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.contact-item p {
    margin: 0;
    color: var(--secondary-color);
}

/* Footer */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--info-color) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
        padding: 2rem 0;
    }
    
    .hero-image {
        margin-top: 2rem;
    }
    
    .code-window {
        transform: none;
    }
    
    .components {
        justify-content: center;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
}

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

.feature-card,
.step-card,
.doc-card {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Code Highlighting Customization */
pre[class*="language-"] {
    background: #1a202c !important;
    border-radius: 8px;
    margin: 0;
}

code[class*="language-"] {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

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

::-webkit-scrollbar-track {
    background: var(--light-color);
}

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

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* 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: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Button Hover Effects */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

/* Card Hover Effects */
.feature-card,
.doc-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before,
.doc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(102, 126, 234, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before,
.doc-card:hover::before {
    opacity: 1;
}

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

.lead {
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Section Spacing */
section {
    padding: 5rem 0;
}

section:first-of-type {
    padding-top: 0;
}

/* Background Patterns */
.bg-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}

/* Enhanced Shadows */
.shadow-custom {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
} 