/* ========================================
   KNOWLEDGE BASE (BILGI BANKASI) STYLES
   Modern, Professional, Documentation-Focused Design
   ======================================== */

/* Knowledge Base Page Layout */
.knowledge-base-page {
    background: var(--light-color);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Main Container */
.main-container {
    padding: var(--spacing-xl) 0 var(--spacing-xxl) 0;
    background: var(--light-color);
}

/* Content Section */
.content-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

.content-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.content-section h2 {
    color: var(--text-primary);
    font-size: 1.75rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-lg);
    position: relative;
    padding-bottom: var(--spacing-sm);
}

.content-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-sm);
}

/* Documentation Categories Grid */
.doc-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

/* Individual Category Card */
.doc-category {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.doc-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.03) 0%, rgba(255, 123, 0, 0.03) 100%);
    transition: left var(--transition-smooth);
    z-index: 0;
}

.doc-category:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.doc-category:hover::before {
    left: 0;
}

.doc-category h4 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.doc-category h4::before {
    content: '📁';
    font-size: 1.5rem;
    opacity: 0.8;
}

/* Category Links List */
.doc-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
}

.doc-category li {
    margin-bottom: var(--spacing-sm);
    position: relative;
    padding-left: var(--spacing-lg);
    transition: all var(--transition-normal);
}

.doc-category li::before {
    content: '→';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-weight: var(--font-weight-bold);
    transition: all var(--transition-normal);
}

.doc-category li:hover::before {
    transform: translateY(-50%) translateX(4px);
    color: var(--accent-color);
}

.doc-category li:last-child {
    margin-bottom: 0;
}

.doc-category a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-normal);
    position: relative;
    display: inline-block;
}

.doc-category a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width var(--transition-normal);
}

.doc-category a:hover {
    color: var(--primary-color);
    transform: translateX(2px);
}

.doc-category a:hover::after {
    width: 100%;
}

/* Sidebar Styling */
.sidebar {
    position: sticky;
    top: var(--spacing-xl);
}

.sidebar-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    position: relative;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: all var(--transition-normal);
}

.sidebar-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.sidebar-section:hover {
    border-color: rgba(34, 139, 34, 0.3);
    box-shadow: var(--shadow-md);
}

.sidebar-section h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.sidebar-section h3::before {
    content: '🎯';
    font-size: 1.25rem;
}

/* Contact Box in Sidebar */
.contact-box {
    background: linear-gradient(135deg, rgba(34, 139, 34, 0.05) 0%, rgba(255, 123, 0, 0.05) 100%);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="25" cy="25" r="1" fill="rgba(34,139,34,0.1)"/><circle cx="75" cy="75" r="1.5" fill="rgba(255,123,0,0.1)"/><circle cx="85" cy="20" r="0.8" fill="rgba(34,139,34,0.08)"/></svg>');
    opacity: 0.6;
    animation: float 20s infinite linear;
    pointer-events: none;
}

.contact-box p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.contact-box .btn {
    position: relative;
    z-index: 1;
    font-weight: var(--font-weight-medium);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    min-width: 140px;
}

/* Enhanced Documentation Icon System */
.doc-category[data-category="installation"] h4::before {
    content: '⚙️';
}

.doc-category[data-category="usage"] h4::before {
    content: '📖';
}

.doc-category[data-category="api"] h4::before {
    content: '🔗';
}

/* Quick Access Section */
.quick-access {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.quick-access::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"><circle cx="25" cy="25" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1.5" fill="rgba(255,255,255,0.08)"/></svg>');
    opacity: 0.6;
    animation: float 15s infinite linear;
}

.quick-access h4 {
    color: var(--white);
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

.quick-access p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.quick-access .btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 1;
}

.quick-access .btn:hover {
    background: var(--white);
    color: var(--primary-color);
    border-color: var(--white);
}

/* External Link Indicators */
.doc-category a[href^="http"]::after {
    content: ' ↗';
    font-size: 0.8em;
    opacity: 0.7;
    margin-left: 4px;
}

.doc-category a[href$=".pdf"]::before {
    content: '📄 ';
    margin-right: 4px;
}

.doc-category a[href$=".zip"]::before {
    content: '📦 ';
    margin-right: 4px;
}

.doc-category a[href*="youtube.com"]::before {
    content: '▶️ ';
    margin-right: 4px;
}

/* Video Links Styling */
.video-links ul li a:hover {
    color: var(--primary-color) !important;
    transform: translateX(4px);
}

/* Related Links Styling */
.related-links ul li a:hover {
    color: var(--primary-color) !important;
    transform: translateX(4px);
}

.download-links ul li a:hover {
    color: var(--accent-color) !important;
    transform: translateX(4px);
}

/* Animations */
@keyframes float {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

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

/* Stagger animation for categories */
.doc-category:nth-child(1) {
    animation: fadeInUp 0.6s ease-out 0.1s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.doc-category:nth-child(2) {
    animation: fadeInUp 0.6s ease-out 0.2s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.doc-category:nth-child(3) {
    animation: fadeInUp 0.6s ease-out 0.3s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.doc-category:nth-child(4) {
    animation: fadeInUp 0.6s ease-out 0.4s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.doc-category:nth-child(5) {
    animation: fadeInUp 0.6s ease-out 0.5s;
    opacity: 0;
    animation-fill-mode: forwards;
}

.doc-category:nth-child(6) {
    animation: fadeInUp 0.6s ease-out 0.6s;
    opacity: 0;
    animation-fill-mode: forwards;
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-container {
        padding: var(--spacing-lg) 0;
    }
    
    .doc-categories {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .sidebar {
        position: static;
        margin-top: var(--spacing-xl);
    }
}

@media (max-width: 768px) {
    .content-section {
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-lg);
    }
    
    .doc-category {
        padding: var(--spacing-md);
    }
    
    .doc-category h4 {
        font-size: 1.125rem;
    }
    
    .sidebar-section {
        padding: var(--spacing-md);
    }
}

@media (max-width: 576px) {
    .content-section {
        padding: var(--spacing-md);
        border-radius: var(--radius-md);
    }
    
    .doc-category {
        padding: var(--spacing-sm) var(--spacing-md);
    }
    
    .doc-category h4::before {
        font-size: 1.25rem;
    }
    
    .contact-box {
        padding: var(--spacing-md);
    }
    
    .quick-access {
        padding: var(--spacing-md);
    }
    
    .kb-search {
        padding: var(--spacing-sm);
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .contact-box,
    .quick-access,
    .kb-search {
        display: none;
    }
    
    .content-section {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .doc-category {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .doc-category a {
        color: #000 !important;
        text-decoration: underline;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    .doc-category,
    .sidebar-section,
    .contact-box,
    .quick-access {
        animation: none;
        transition: none;
    }
    
    .doc-category::before,
    .quick-access::before,
    .contact-box::before {
        animation: none;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .doc-category {
        border-width: 3px;
    }
    
    .sidebar-section {
        border-width: 3px;
    }
    
    .doc-category a {
        text-decoration: underline;
    }
}

/* Focus Styles for Accessibility */
.doc-category a:focus,
.contact-box .btn:focus,
.kb-search input:focus {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Additional Grid Support */
.col-md-8, .col-md-4 {
    padding: 0 15px;
}

@media (min-width: 768px) {
    .col-md-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }
    
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (max-width: 767px) {
    .col-md-8, .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
} 