/* ===== DriftMind Website Styles ===== */

:root {
    /* Color Palette - Dark Mode */
    --primary-gradient: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    --secondary-gradient: linear-gradient(135deg, #ec4899 0%, #be185d 100%);
    --accent-gradient: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    --dark-gradient: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    
    /* Theme Colors */
    --primary-color: #8b5cf6;
    --secondary-color: #7c3aed;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    /* Text Colors - Dark Mode */
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    /* Background Colors - Dark Mode */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-dark: #111827;
    --bg-darker: #020617;
    
    /* Border & Shadow - Dark Mode */
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6);
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.15s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* Prevent horizontal overflow on mobile */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video, canvas { max-width: 100%; height: auto; display: block; }
iframe { max-width: 100%; }
pre, code { max-width: 100%; overflow-x: auto; }
.hero-image { overflow: visible; }

/* Force layout stability and prevent FOUC (Flash of Unstyled Content) */
.navbar {
    min-height: 76px !important; /* Ensure consistent navbar height */
}

.navbar .container {
    min-height: 56px !important; /* Ensure consistent container height */
}

/* Ensure immediate proper mobile layout */
@media (max-width: 991.98px) {
    .navbar .container {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
    }
    /* Don't let the brand push the toggler out of view */
    .navbar-brand {
    min-width: 0; /* allow flex item to shrink below content width */
    flex: 1 1 auto; /* let brand take remaining space but be shrinkable */
        white-space: nowrap;
    max-width: calc(100% - 56px); /* 56px ~ toggler width + spacing */
        overflow: hidden;
        text-overflow: ellipsis;
    margin-right: .5rem;
    display: inline-block; /* required for text-overflow to work reliably */
        flex: 0 1 auto;
    }
    .navbar-toggler {
    flex: 0 0 auto;
        margin-left: auto;
        position: static; /* no absolute positioning */
        transform: none;
        order: 2;
        flex: 0 0 auto;
    }
}

/* Extra small devices: keep brand compact */
@media (max-width: 400px) {
    .navbar-brand { font-size: 1.25rem; }
}

/* ===== Typography ===== */
.display-1, .display-2, .display-3, .display-4 {
    font-weight: 700;
    line-height: 1.2;
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Prevent long content from causing overflow */
body { word-wrap: break-word; overflow-wrap: anywhere; }
pre, code { white-space: pre-wrap; }
.badge, .tech-badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

/* ===== Navigation ===== */
.navbar {
    background: rgba(2, 6, 23, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    padding: 1rem 0;
    /* Stabilize fixed element compositing on some mobile browsers */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
    z-index: 1050;
    width: 100%;
    left: 0;
    right: 0;
}

.navbar .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.5rem;
    color: white !important;
}

.navbar-toggler {
    border: none;
    color: white;
    background: transparent;
    padding: 0.25rem 0.5rem;
    margin-left: auto; /* push to right when space available */
}

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

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-collapse {
    flex-basis: 100%;
}

.navbar-nav {
    margin-left: auto;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover {
    color: white !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link:focus {
    outline: none !important;
    box-shadow: none !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gradient);
    transition: width 0.3s ease;
}

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

/* ===== Buttons ===== */
.btn {
    font-weight: 600;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    border: none;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-gradient {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

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

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

/* ===== Hero Section ===== */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e293b 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(118, 75, 162, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(79, 172, 254, 0.2) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

.hero-image {
    position: relative;
    height: 500px;
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    color: white;
    text-align: center;
    animation: float-card 6s ease-in-out infinite;
    box-shadow: var(--shadow-xl);
    z-index: 2;
}

.floating-card:nth-child(1) { animation-delay: 0s; }
.floating-card:nth-child(2) { animation-delay: 2s; }
.floating-card:nth-child(3) { animation-delay: 4s; }

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

.floating-card i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.floating-card h5 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.floating-card p {
    margin: 0;
    opacity: 0.8;
    font-size: 0.9rem;
}

.central-brain, .central-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(102, 126, 234, 0.4);
    animation: pulse 3s ease-in-out infinite;
}

.central-logo {
    width: 280px;
    height: 280px;
    background: transparent;
    border-radius: 0;
    border: none;
    padding: 0;
    box-shadow: none;
    z-index: 1;
}

.logo-image {
    width: 280px;
    height: 280px;
    object-fit: contain;
    filter: drop-shadow(0 0 30px rgba(102, 126, 234, 0.4));
    border-radius: 24px;
    opacity: 0.9;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.1); }
}

.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
}

/* ===== Feature Cards ===== */
.feature-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    background: rgba(30, 41, 59, 0.8);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.feature-card h4 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.feature-card ul li {
    padding: 0.25rem 0;
    font-size: 0.9rem;
}

/* ===== Architecture Section ===== */
.architecture-diagram {
    position: relative;
}

.layer {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.layer::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-gradient);
}

.layer[data-layer="frontend"]::before { background: var(--primary-gradient); }
.layer[data-layer="api"]::before { background: var(--secondary-gradient); }
.layer[data-layer="ai"]::before { background: var(--accent-gradient); }
.layer[data-layer="storage"]::before { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }

.layer:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-lg);
    background: rgba(30, 41, 59, 0.8);
}

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

.layer h5 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

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

.tech-badge {
    background: var(--bg-darker);
    color: var(--text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

/* ===== Performance Metrics ===== */
.metric-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.metric-card:hover::before {
    opacity: 0.1;
}

.metric-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    background: rgba(30, 41, 59, 0.8);
}

.metric-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 1;
}

.metric-icon i {
    font-size: 2rem;
    color: white;
}

.metric-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.metric-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

/* ===== Comparison Card ===== */
.comparison-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.comparison-side {
    padding: 1.5rem;
    border-radius: 12px;
    height: 100%;
}

.comparison-side.before {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.comparison-side.after {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.comparison-side h5 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.comparison-side ul li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* ===== Demo Section ===== */
.demo-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    height: 100%;
    transition: var(--transition);
}

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

.demo-header {
    display: flex;
    align-items: center;
    justify-content: between;
    margin-bottom: 1.5rem;
}

.demo-header h4 {
    color: white;
    margin: 0;
    flex: 1;
}

.demo-header h4 i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.demo-features {
    margin: 1.5rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-item i {
    color: var(--accent-color);
    font-size: 1.1rem;
}

/* ===== Code Demo ===== */
.code-demo {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header {
    background: #334155;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header span {
    color: white;
    font-weight: 500;
}

.copy-btn {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
}

.code-content {
    padding: 0;
}

.code-content pre {
    margin: 0;
    padding: 1.5rem;
    background: transparent;
    color: #e2e8f0;
    font-family: 'Fira Code', 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    overflow-x: auto;
}

.code-content code {
    color: inherit;
    background: transparent;
}

/* ===== Documentation Cards ===== */
.doc-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.doc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.doc-card:hover::before {
    transform: scaleX(1);
}

.doc-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    background: rgba(30, 41, 59, 0.8);
}

.doc-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.doc-icon i {
    font-size: 2rem;
    color: white;
}

.quick-steps, .api-endpoints, .config-items {
    margin: 1.5rem 0;
}

.step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.step:last-child {
    border-bottom: none;
}

.step-number {
    width: 30px;
    height: 30px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.endpoint {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

.method {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 60px;
    text-align: center;
}

.method.post {
    background: #10b981;
    color: white;
}

.method.get {
    background: #3b82f6;
    color: white;
}

.config-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.config-item:last-child {
    border-bottom: none;
}

.config-item i {
    color: var(--primary-color);
    width: 20px;
}

/* Ensure CTA buttons sit at the bottom and span full width */
#docs .doc-card { height: 100%; }
#docs .doc-card { padding-bottom: 5.25rem; }
#docs .doc-card .btn {
    position: absolute;
    left: 2rem;
    right: 2rem;
    bottom: 2rem;
    margin-top: 0 !important;
    width: auto;
    display: block;
}

/* Enforce equal-height columns in docs row for perfect bottom alignment */
#docs .row.g-4 { align-items: stretch; }
#docs .row.g-4 > [class^="col-"],
#docs .row.g-4 > [class*=" col-"] { display: flex; align-items: stretch; }
#docs .row.g-4 > [class^="col-"] > .doc-card,
#docs .row.g-4 > [class*=" col-"] > .doc-card { flex: 1 1 auto; }

/* ===== Examples Section ===== */
.examples-section {
    background: var(--bg-darker);
    border-radius: 16px;
    padding: 2rem;
}

.example-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.example-card h5 {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.example-card h5 i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.example-card pre {
    background: #1e293b;
    border-radius: 8px;
    padding: 1rem;
    margin: 0;
    color: #e2e8f0;
    font-size: 0.9rem;
    overflow-x: auto;
    flex: 1 1 auto;
}

/* ===== CTA Section ===== */
.cta-section {
    background: linear-gradient(135deg, #020617 0%, #0f172a 50%, #1e293b 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 30% 20%, rgba(139, 92, 246, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(124, 58, 237, 0.4) 0%, transparent 50%);
    animation: float 15s ease-in-out infinite;
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-darker) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a {
    transition: var(--transition);
}

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

/* ===== Mobile Navigation Tweaks ===== */
@media (max-width: 991.98px) {
    .navbar { padding: 0.5rem 0; backdrop-filter: none; }
    .navbar .container { padding-left: 1rem; padding-right: 1rem; }
    .navbar-collapse {
        margin-top: 1rem;
        background: rgba(2, 6, 23, 0.98);
        backdrop-filter: blur(15px);
        border-radius: 8px;
        padding: 1rem;
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
        width: 100%;
    }
    .navbar-nav { gap: 0.5rem; margin-left: 0; }
    .navbar-nav .nav-link { padding: 0.75rem 1rem; border-radius: 6px; margin: 0; text-align: center; }
    .navbar-nav .nav-link:hover { background: rgba(139, 92, 246, 0.1); transform: none; }
    .hero-section { padding-top: 80px; }
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .display-3 {
        font-size: 2.5rem;
    }
    
    .hero-image {
        height: 300px;
        margin-top: 3rem;
    }
    
    .floating-card {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .floating-card i {
        font-size: 1.5rem;
    }
    
    .central-brain, .central-logo {
        width: 80px;
        height: 80px;
    }
    
    .central-logo {
        width: 200px;
        height: 200px;
    }
    
    .logo-image {
        width: 200px;
        height: 200px;
        border-radius: 16px;
    }
    
    .metric-number {
        font-size: 2rem;
    }
    
    .btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .feature-card, .doc-card, .metric-card {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Additional mobile navigation fixes for small screens */
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .navbar-toggler {
        padding: 0.2rem 0.4rem;
        font-size: 1rem;
    }
    
    .navbar-collapse {
        margin-top: 0.5rem;
        padding: 0.75rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .hero-section {
        padding-top: 70px; /* Adjusted for smaller navbar */
    }
    
    .display-3 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 0 !important;
    }
    
    .floating-card {
    position: relative !important;
        margin: 1rem 0;
        top: auto !important;
        left: auto !important;
        right: auto !important;
    transform: none !important; /* disable any transforms on small screens */
    }
    
    .hero-image {
        display: none;
    }
}

/* ===== Smooth Animations ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-darker);
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-gradient);
}

/* ===== Loading Animation ===== */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Utility Classes ===== */
.text-white-50 {
    color: rgba(255, 255, 255, 0.5) !important;
}

.bg-gradient {
    background: var(--primary-gradient);
}

.border-gradient {
    border: 2px solid;
    border-image: var(--primary-gradient) 1;
}

.shadow-custom {
    box-shadow: var(--shadow-xl);
}

.rounded-custom {
    border-radius: 16px;
}

/* Print Styles */
@media print {
    .navbar, .footer, .cta-section {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
        min-height: auto !important;
    }
    
    .hero-section * {
        color: black !important;
    }
}

/* ===== Section Spacing for Fixed Navigation ===== */
section:not(.hero-section) {
    scroll-margin-top: 80px; /* Prevents fixed navbar from covering section content when scrolling */
}

/* ===== Dark Mode Specific Enhancements ===== */
.text-muted {
    color: var(--text-muted) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

/* Enhanced card shadows for dark mode */
.feature-card:hover,
.doc-card:hover,
.metric-card:hover {
    box-shadow: 0 25px 50px rgba(139, 92, 246, 0.15), 0 0 30px rgba(139, 92, 246, 0.1);
}

/* Better borders for dark elements */
.demo-card,
.code-demo,
.floating-card {
    border: 1px solid rgba(139, 92, 246, 0.2);
}

/* Enhanced gradients for dark mode */
.hero-gradient {
    background: 
        radial-gradient(circle at 20% 50%, rgba(139, 92, 246, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(6, 182, 212, 0.3) 0%, transparent 50%);
}

/* Better visibility for small text */
.small, small {
    color: var(--text-muted);
}

/* Enhanced focus states for dark mode */
.btn:focus,
.nav-link:focus {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

/* Dark mode form elements (if any are added later) */
input, textarea, select {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Enhanced visibility for code examples */
.code-content pre {
    background: #0f172a;
    border: 1px solid var(--border-color);
}

/* Better link colors for dark mode */
a {
    color: var(--accent-color);
}

a:hover {
    color: #22d3ee;
}

/* Removed link-disabled styles (links re-enabled) */
