/* Custom CSS for Mechanical Engineering Blog */

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

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Enhanced Typography - Prose Styles */
.prose {
    max-width: none;
    color: #374151;
    line-height: 1.7;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.prose h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    margin-top: 2rem;
    line-height: 1.2;
    border-bottom: 3px solid #3b82f6;
    padding-bottom: 0.5rem;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

.prose h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 1rem;
    margin-top: 2rem;
    line-height: 1.3;
    position: relative;
    padding-left: 1rem;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

.prose h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 4px;
    height: 1.5rem;
    background: linear-gradient(to bottom, #3b82f6, #60a5fa);
    border-radius: 2px;
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    line-height: 1.4;
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

.prose p {
    color: #4b5563;
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
    text-align: justify;
    
}

.prose p:first-of-type {
    font-size: 1.2rem;
    font-weight: 400;
    color: #374151;
}

/* Liste Stilleri - Düzeltilmiş */
.prose ul, .prose ol {
    margin-bottom: 1.5rem;
    padding-left: 0;
    list-style: none;
}

/* Unordered List Stilleri */
.prose ul li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    color: #4b5563;
    line-height: 1.7;
    position: relative;
    list-style: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.prose ul li:before {
    content: "•";
    color: #3b82f6;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0.1rem;
    font-size: 1.2rem;
    line-height: 1;
    width: 1rem;
    text-align: center;
}

/* Ordered List Stilleri */
.prose ol {
    counter-reset: item;
}

.prose ol li {
    margin-bottom: 0.75rem;
    color: #4b5563;
    line-height: 1.7;
    padding-left: 1.5rem;
    position: relative;
    counter-increment: item;
    list-style: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.prose ol li:before {
    content: counter(item) ".";
    color: #3b82f6;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0.1rem;
    line-height: 1;
    min-width: 1.2rem;
    text-align: left;
}

/* İç İçe Liste Stilleri */
.prose ul ul, .prose ol ol, .prose ul ol, .prose ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
}

.prose ul ul li, .prose ol ol li, .prose ul ol li, .prose ol ul li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* İç içe unordered listler için farklı bullet */
.prose ul ul li:before {
    content: "◦";
    font-size: 1rem;
    top: 0.2rem;
}

.prose ul ul ul li:before {
    content: "▪";
    font-size: 0.8rem;
    top: 0.3rem;
}

.prose strong, .prose b {
    font-weight: 600 !important;
    color: #111827 !important;
    font-family: 'Helvetica Neue', 'Arial', sans-serif !important;
}

/* Liste içindeki strong elementler için özel düzenleme */
.prose li strong, .prose li b {
    display: inline;
    font-weight: 600 !important;
    color: #1f2937 !important;
    margin-right: 0.25rem;
}

.prose em, .prose i {
    font-style: italic;
    color: #374151;
}

.prose blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1.5rem;
    padding-right: 1rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
    font-style: italic;
    color: #4b5563;
    margin: 1.5rem 0;
    background: linear-gradient(to right, #eff6ff, #f8fafc);
    border-radius: 0 8px 8px 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.prose a {
    color: #2563eb;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.prose a:hover {
    color: #1d4ed8;
    text-decoration-thickness: 2px;
}

/* Mobile optimizations */
/* Mobile Menu Improvements */
#mobile-menu {
    transition: all 0.3s ease-in-out;
    overflow: hidden;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

#mobile-menu.hidden {
    max-height: 0;
    overflow: hidden;
}

#mobile-menu .container {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

#mobile-categories {
    transition: all 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

#mobile-categories.show {
    max-height: 40vh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Mobil kategoriler ve menü scroll bar'ı */
#mobile-categories::-webkit-scrollbar,
#mobile-menu::-webkit-scrollbar,
#mobile-menu .container::-webkit-scrollbar {
    width: 4px;
}

#mobile-categories::-webkit-scrollbar-track,
#mobile-menu::-webkit-scrollbar-track,
#mobile-menu .container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 2px;
}

#mobile-categories::-webkit-scrollbar-thumb,
#mobile-menu::-webkit-scrollbar-thumb,
#mobile-menu .container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 2px;
}

#mobile-categories::-webkit-scrollbar-thumb:hover,
#mobile-menu::-webkit-scrollbar-thumb:hover,
#mobile-menu .container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Mobile menu button improvements */
#mobile-menu-btn {
    transition: all 0.2s ease;
}

#mobile-menu-btn:hover {
    background-color: #f3f4f6;
    transform: scale(1.05);
}

/* Mobile categories button improvements */
#mobile-categories-btn {
    transition: all 0.2s ease;
    padding: 0.75rem 0;
    border-radius: 0.5rem;
}

#mobile-categories-btn:hover {
    background-color: #f9fafb;
    padding-left: 0.5rem;
}

#mobile-categories-btn svg {
    transition: transform 0.3s ease;
}

/* Mobile category links improvements */
#mobile-categories a {
    transition: all 0.2s ease;
    padding: 0.5rem 0;
    border-radius: 0.25rem;
    margin: 0.125rem 0;
    display: block;
}

#mobile-categories a:hover {
    background-color: #eff6ff;
    padding-left: 0.5rem;
    transform: translateX(4px);
}

/* Touch target improvements */
@media (max-width: 768px) {
    #mobile-menu-btn,
    #mobile-categories-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    #mobile-categories a {
        min-height: 40px;
        display: flex;
        align-items: center;
    }
    
    .prose h1 {
        font-size: 2rem;
    }
    
    .prose h2 {
        font-size: 1.75rem;
    }
    
    .prose h3 {
        font-size: 1.5rem;
    }
    
    .prose p {
        font-size: 1rem;
        text-align: left;
    }
    
    .prose p:first-of-type {
        font-size: 1.1rem;
    }
    
    .prose ul li, .prose ol li {
        padding-left: 1.2rem;
    }
    
    .prose ul li:before {
        font-size: 1rem;
    }
    
    .prose ol li:before {
        min-width: 1rem;
    }
    
    .prose ul ul, .prose ol ol, .prose ul ol, .prose ol ul {
        padding-left: 1.2rem;
    }
}