/* ==========================================================================
   BiasCheck AI - Main CSS
   Modern, Responsive, Bootstrap 5 Based Styles
   ========================================================================== */

/* Color Variables */
:root {
    --primary-color: #6366f1;
    --primary-light: #a5b4fc;
    --primary-dark: #4338ca;
    
    --secondary-color: #f3f4f6;
    --secondary-light: #f9fafb;
    --secondary-dark: #e5e7eb;
    
    --success-color: #10b981;
    --success-light: #6ee7b7;
    --success-dark: #059669;
    
    --warning-color: #f59e0b;
    --warning-light: #fcd34d;
    --warning-dark: #d97706;
    
    --danger-color: #ef4444;
    --danger-light: #fca5a5;
    --danger-dark: #dc2626;
    
    /* Text Colors */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    /* Background Colors */
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --bg-dark: #1f2937;
    
    /* Border Colors */
    --border-light: #e5e7eb;
    --border-dark: #374151;
    
    /* Shadow */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Typography */
    --font-size-base: 1rem;
    --font-size-sm: 0.875rem;
    --font-size-lg: 1.125rem;
    --line-height-base: 1.6;
    
    /* Spacing */
    --section-padding: 5rem 0;
    --content-max-width: 1200px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: var(--line-height-base);
    color: var(--text-primary);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color) !important;
}

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

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

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

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

.btn-outline-secondary {
    border: 2px solid var(--secondary-dark);
    color: var(--text-primary);
}

.btn-outline-secondary:hover {
    background-color: var(--secondary-dark);
    color: white;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
}

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

/* Cards */
.card {
    border-radius: 1rem;
    border: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.card-img-top {
    transition: transform 0.3s ease;
}

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

/* Sections */
section {
    padding: var(--section-padding);
}

.section-title {
    margin-bottom: 3rem;
}

/* Hero Section */
#hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

#hero::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="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
    pointer-events: none;
}

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

/* Services Section */
#services .card {
    border: 1px solid var(--border-light);
    height: 100%;
}

#services .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* About Section */
#about {
    background-color: var(--bg-light);
}

/* Team Section */
#team .card {
    background: transparent;
}

#team .card-img-top {
    border: 4px solid var(--primary-color);
    object-fit: cover;
}

/* Gallery Section */
#gallery img {
    transition: all 0.3s ease;
    cursor: pointer;
}

#gallery img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Reviews Section */
#reviews .card {
    background: white;
    border: 1px solid var(--border-light);
}

/* FAQ Section */
#faq .card {
    background: white;
    border: 1px solid var(--border-light);
}

#faq .card-title {
    color: var(--primary-color);
}

/* Contact Section */
#contact-form {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.form-control {
    border-radius: 0.5rem;
    border: 1px solid var(--border-light);
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Footer */
#footer {
    background-color: var(--bg-dark) !important;
    color: white;
}

#footer h5, #footer h6 {
    color: white;
    margin-bottom: 1rem;
}

#footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

#footer a:hover {
    color: white;
}

#footer .fab {
    transition: all 0.3s ease;
    cursor: pointer;
}

#footer .fab:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

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

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

/* Accessibility - Animations Disabled Globally */
* {
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
    animation-delay: 0ms !important;
    scroll-behavior: auto !important;
    transform: none !important;
}

*:hover {
    transform: none !important;
}

*::before,
*::after {
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
    animation-delay: 0ms !important;
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0ms !important;
        scroll-behavior: auto !important;
    }
}

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

/* Utilities */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-muted { color: var(--text-muted) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-light { background-color: var(--bg-light) !important; }

.border-light { border-color: var(--border-light) !important; }

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

/* Custom positioning and decorations */
.position-relative { position: relative; }
.position-absolute { position: absolute; }

.opacity-10 { opacity: 0.1; }
.opacity-20 { opacity: 0.2; }

/* Space theme specific styles for index_space.html */
.space-theme {
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.star-animation {
    animation: twinkle 2s infinite;
}

/* Breadcrumb styles */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item img {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.breadcrumb-item.active img {
    filter: none;
}

/* Additional page specific styles */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-light), transparent);
    margin: 2rem 0;
}

/* Print styles */
@media print {
    .navbar,
    #footer,
    .btn,
    .breadcrumb {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* Dark mode support (for future implementation) */