/* Best Practices Hub Styles - Adapted for AI Tools Dashboard Dark Theme */

/* Base Styles - More specific selector to override main styles.css */
html body {
    background: var(--bp-dark) !important;
    color: var(--bp-text-primary) !important;
}

:root {
    /* Override main design tokens for this page */
    --color-bg-primary: #0F172A !important;
    --color-bg-secondary: #1E293B !important;
    --color-bg-tertiary: #334155 !important;
    --color-text-primary: #ffffff !important;
    --color-text-secondary: #94A3B8 !important;
    --color-border-primary: #334155 !important;
    --color-primary: #3B82F6 !important;
    
    /* Also override any generic variables that might be used */
    --bg-primary: #0F172A !important;
    --bg-card: #1E293B !important;
    --bg-secondary: #1E293B !important;
    --text-primary: #ffffff !important;
    --text-secondary: #94A3B8 !important;
    --border: #334155 !important;
    --primary: #3B82F6 !important;
    
    /* Primary Brand Colors - Matching Unified Dashboard */
    --bp-primary: #3B82F6;          /* Electric Blue (was #007bff) */
    --bp-primary-dark: #2563EB;     /* Darker blue for hover states */
    --bp-primary-light: #60A5FA;    /* Lighter blue for accents */
    
    /* Semantic Colors - Aligned with Dashboard */
    --bp-success: #10B981;          /* Emerald */
    --bp-warning: #F59E0B;          /* Amber */
    --bp-danger: #EF4444;           /* Red */
    --bp-info: #3B82F6;             /* Blue */
    
    /* Neutral Palette - Matching Dashboard Grays */
    --bp-dark: #0F172A;             /* Main background (was #0a0a0a) */
    --bp-card-bg: #1E293B;          /* Card backgrounds (was #1a1a1a) */
    --bp-border: #334155;           /* Borders/dividers (was #2a2a2a) */
    --bp-hover-bg: #2a3f5f;         /* Hover state background */
    --bp-gray: #64748B;             /* Medium gray */
    --bp-text-primary: #ffffff;     /* Primary text */
    --bp-text-secondary: #94A3B8;   /* Secondary text (was #b0b0b0) */
    --bp-white: #ffffff;
    
    /* Legacy variables for compatibility */
    --bp-secondary: #2563EB;        /* Using primary-dark */
    --bp-light: #1E293B;            /* Using card-bg */
    
    /* Typography and Styling */
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Monaco', 'Consolas', monospace;
    --radius: 12px;                 /* Updated from 8px to match dashboard */
    --shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Base Styles */
body {
    background: var(--bp-dark) !important;
    color: var(--bp-text-primary) !important;
}

.best-practices-hub {
    background: var(--bp-dark);
    color: var(--bp-text-primary);
    min-height: 100vh;
}

.bp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - Integrated with existing site header */
.bp-header {
    background: var(--bp-light);
    border-bottom: 1px solid var(--bp-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.bp-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.bp-nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.bp-nav-links a {
    color: var(--bp-text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.bp-nav-links a:hover,
.bp-nav-links a.active {
    color: var(--bp-primary);
}

/* Hero Section */
.bp-hero {
    /* Dark subtle gradient instead of bright blue */
    background: linear-gradient(135deg, #1a2744 0%, #0F172A 100%);
    color: var(--bp-white);
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

/* Add subtle background pattern */
.bp-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    z-index: 1;
}

.bp-hero > * {
    position: relative;
    z-index: 2;
}

.bp-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #ffffff;
}

.bp-hero p {
    font-size: 1.125rem;
    color: #94A3B8;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.bp-search-box {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
}

.bp-search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1rem;
    font-size: 1rem;
    border: 1px solid #334155;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    color: var(--bp-text-primary);
    transition: all 0.2s ease;
}

.bp-search-input:focus {
    outline: none;
    border-color: #3B82F6;
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.bp-search-input::placeholder {
    color: #64748B;
}

.bp-search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bp-text-secondary);
}

/* Learning Paths */
.bp-learning-paths {
    padding: 4rem 0;
}

.bp-section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.bp-section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--bp-text-primary);
}

.bp-section-header p {
    color: var(--bp-text-secondary);
    font-size: 1.125rem;
}

.bp-paths-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.bp-path-card {
    background: var(--bp-card-bg);
    border: 1px solid var(--bp-border);
    border-radius: var(--radius);
    padding: 24px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.bp-path-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--bp-primary);
    background: rgba(59, 130, 246, 0.02);
}

.bp-path-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    transition: transform 0.2s ease;
}

.bp-path-card:hover .bp-path-icon {
    transform: scale(1.05);
}

.bp-path-card.beginner .bp-path-icon { 
    background: rgba(59, 130, 246, 0.15); 
    color: var(--bp-primary); 
}

.bp-path-card.intermediate .bp-path-icon { 
    background: rgba(245, 158, 11, 0.15); 
    color: var(--bp-warning); 
}

.bp-path-card.advanced .bp-path-icon { 
    background: rgba(239, 68, 68, 0.15); 
    color: var(--bp-danger); 
}

.bp-path-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--bp-text-primary);
}

.bp-path-description {
    color: var(--bp-text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.bp-path-stats {
    display: flex;
    gap: 2rem;
    font-size: 0.875rem;
    color: var(--bp-text-secondary);
}

/* Featured Guides */
.bp-featured-guides {
    background: var(--bp-dark);
    padding: 4rem 0;
}

.bp-guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.bp-guide-card {
    background: var(--bp-card-bg);
    border: 1px solid var(--bp-border);
    border-radius: var(--radius);
    padding: 24px;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    display: block;
}

.bp-guide-card:hover {
    transform: translateY(-2px);  /* Add elevation */
    border-color: var(--bp-primary);
    box-shadow: var(--shadow-lg);
    background: rgba(59, 130, 246, 0.02);  /* Subtle highlight */
}

.bp-guide-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
}

.bp-guide-badge {
    padding: 0.25rem 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    font-weight: 600;
    color: var(--bp-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-size: 0.75rem;
}

.bp-guide-badge.beginner { 
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA; 
}
.bp-guide-badge.intermediate { 
    background: rgba(245, 158, 11, 0.15);
    color: #FCD34D; 
}
.bp-guide-badge.advanced { 
    background: rgba(239, 68, 68, 0.15);
    color: #F87171; 
}

.bp-guide-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--bp-text-primary);
}

.bp-guide-excerpt {
    font-size: 0.875rem;
    color: var(--bp-text-secondary);
    line-height: 1.5;
}

/* Hidden Gems Section */
.bp-hidden-gems {
    background: var(--bp-card-bg);
    padding: 4rem 0;
    border-top: 1px solid var(--bp-border);
}

.bp-gems-carousel {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: var(--bp-border) var(--bp-dark);
}

.bp-gems-carousel::-webkit-scrollbar {
    height: 8px;
}

.bp-gems-carousel::-webkit-scrollbar-track {
    background: var(--bp-dark);
}

.bp-gems-carousel::-webkit-scrollbar-thumb {
    background: var(--bp-border);
    border-radius: 4px;
}

.bp-gem-card {
    flex: 0 0 320px;
    background: var(--bp-dark);
    border: 1px solid var(--bp-border);
    border-radius: var(--radius);
    padding: 24px;
    scroll-snap-align: start;
    transition: all 0.2s;
}

.bp-gem-card:hover {
    border-color: var(--bp-primary);
    box-shadow: var(--shadow-md);
}

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

.bp-gem-icon {
    width: 48px;
    height: 48px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--bp-primary);
}

.bp-gem-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--bp-text-primary);
}

.bp-gem-content {
    margin-bottom: 1rem;
    color: var(--bp-text-secondary);
    line-height: 1.6;
}

.bp-gem-example {
    background: var(--bp-dark);
    border: 1px solid var(--bp-border);
    padding: 1rem;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    margin: 1rem 0;
    overflow-x: auto;
    color: var(--bp-text-primary);
}

.bp-try-button {
    background: var(--bp-primary);
    color: var(--bp-white);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.bp-try-button:hover {
    background: var(--bp-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Footer */
.bp-footer {
    background: var(--bp-light);
    border-top: 1px solid var(--bp-border);
    padding: 2rem 0;
    margin-top: 4rem;
}

.bp-footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bp-footer-links {
    display: flex;
    gap: 2rem;
}

.bp-footer-links a {
    color: var(--bp-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.bp-footer-links a:hover {
    color: var(--bp-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .bp-hero h1 {
        font-size: 2rem;
    }
    
    .bp-paths-grid {
        grid-template-columns: 1fr;
    }
    
    .bp-guides-grid {
        grid-template-columns: 1fr;
    }
    
    .bp-gem-card {
        flex: 0 0 280px;
    }
    
    .bp-footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}