/* Markdown & Code Highlighting Styles */
.markdown-content { 
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  max-width: 100%;
  text-align: justify;
  text-justify: inter-word;
}

.markdown-content h1, 
.markdown-content h2, 
.markdown-content h3, 
.markdown-content h4 { 
  color: #22c55e; 
  font-weight: 700; 
  margin-top: 1.5rem; 
  margin-bottom: 1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.markdown-content h1 { font-size: 2rem; line-height: 1.2; }
.markdown-content h2 { font-size: 1.75rem; line-height: 1.3; }
.markdown-content h3 { font-size: 1.5rem; line-height: 1.3; }
.markdown-content h4 { font-size: 1.25rem; line-height: 1.4; }

/* Mobil için başlık boyutları */
@media (max-width: 640px) {
  .markdown-content h1 { 
    font-size: 1.5rem !important; 
    line-height: 1.3;
    padding-right: 0.5rem;
  }
  .markdown-content h2 { 
    font-size: 1.35rem !important; 
    line-height: 1.3;
    padding-right: 0.5rem;
  }
  .markdown-content h3 { 
    font-size: 1.2rem !important; 
    line-height: 1.4;
    padding-right: 0.5rem;
  }
  .markdown-content h4 { 
    font-size: 1.1rem !important; 
    line-height: 1.4;
    padding-right: 0.5rem;
  }
}

.markdown-content p { 
  margin-bottom: 1rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  text-align: justify;
  text-justify: inter-word;
}

.markdown-content ul, 
.markdown-content ol { 
  margin-left: 1.5rem; 
  margin-bottom: 1rem; 
}

.markdown-content li { 
  margin-bottom: 0.5rem;
  text-align: justify;
  text-justify: inter-word;
}

.markdown-content a { 
  color: #22c55e; 
  text-decoration: underline; 
}

.markdown-content a:hover { 
  color: #16a34a; 
}

.markdown-content blockquote { 
  border-left: 4px solid #22c55e; 
  padding-left: 1rem; 
  margin: 1rem 0; 
  color: #9ca3af; 
  font-style: italic;
  text-align: justify;
  text-justify: inter-word;
}

.markdown-content table { 
  width: 100%; 
  border-collapse: collapse; 
  margin: 1rem 0; 
}

.markdown-content th, 
.markdown-content td { 
  border: 1px solid #333; 
  padding: 0.5rem; 
  text-align: left; 
}

.markdown-content th { 
  background: rgba(34, 197, 94, 0.1); 
  font-weight: 700; 
}

/* Resim Stilleri */
.markdown-content img {
  max-width: 100%;
  max-height: 500px;  /* Maksimum yükseklik */
  width: auto;
  height: auto;
  object-fit: contain;  /* Orantılı sığdır */
  display: block;
  margin: 1.5rem auto;
  border-radius: 8px;
  border: 2px solid rgba(34, 197, 94, 0.3);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.markdown-content img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 12px rgba(34, 197, 94, 0.4);
  border-color: rgba(34, 197, 94, 0.6);
}

/* Inline resimler için (satır arası) */
.post-image-inline {
  margin: 2rem 0;
}

.post-image-inline img {
  max-width: 100%;
  max-height: 500px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
  border: 2px solid rgba(34, 197, 94, 0.3);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.post-image-inline figcaption {
  text-align: center;
  color: #9ca3af;
  font-size: 0.9em;
  margin-top: 0.5rem;
  font-style: italic;
}

/* Resim alt yazıları için */
.markdown-content img + em {
  display: block;
  text-align: center;
  color: #9ca3af;
  font-size: 0.9em;
  margin-top: -1rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

/* Responsive - Mobil cihazlarda */
@media (max-width: 768px) {
  .markdown-content img,
  .post-image-inline img {
    max-height: 300px;
  }
}

.markdown-content code { 
  background: rgba(34, 197, 94, 0.1); 
  padding: 0.2rem 0.4rem; 
  border-radius: 4px; 
  font-family: 'Courier New', monospace; 
  font-size: 0.9em; 
  color: #86efac;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

.markdown-content pre { 
  background: #1a1a1a; 
  border: 1px solid #333; 
  border-radius: 8px; 
  padding: 1rem; 
  overflow-x: auto; 
  margin: 1rem 0;
  max-width: 100%;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.markdown-content pre code { 
  background: transparent; 
  padding: 0; 
  color: #e5e7eb;
  white-space: pre-wrap;
  word-wrap: break-word;
  display: block;
}

/* Pygments Syntax Highlighting - Monokai Theme */
.highlight { 
  background: #1a1a1a; 
  border-radius: 8px; 
  padding: 1rem; 
  overflow-x: auto;
  max-width: 100%;
}

.highlight pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
}

.highlight .hll { background-color: #49483e }
.highlight .c { color: #75715e } /* Comment */
.highlight .err { color: #960050; background-color: #1e0010 } /* Error */
.highlight .k { color: #66d9ef } /* Keyword */
.highlight .l { color: #ae81ff } /* Literal */
.highlight .n { color: #f8f8f2 } /* Name */
.highlight .o { color: #f92672 } /* Operator */
.highlight .p { color: #f8f8f2 } /* Punctuation */
.highlight .ch { color: #75715e } /* Comment.Hashbang */
.highlight .cm { color: #75715e } /* Comment.Multiline */
.highlight .cp { color: #75715e } /* Comment.Preproc */
.highlight .cpf { color: #75715e } /* Comment.PreprocFile */
.highlight .c1 { color: #75715e } /* Comment.Single */
.highlight .cs { color: #75715e } /* Comment.Special */
.highlight .gd { color: #f92672 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gi { color: #a6e22e } /* Generic.Inserted */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #75715e } /* Generic.Subheading */
.highlight .kc { color: #66d9ef } /* Keyword.Constant */
.highlight .kd { color: #66d9ef } /* Keyword.Declaration */
.highlight .kn { color: #f92672 } /* Keyword.Namespace */
.highlight .kp { color: #66d9ef } /* Keyword.Pseudo */
.highlight .kr { color: #66d9ef } /* Keyword.Reserved */
.highlight .kt { color: #66d9ef } /* Keyword.Type */
.highlight .ld { color: #e6db74 } /* Literal.Date */
.highlight .m { color: #ae81ff } /* Literal.Number */
.highlight .s { color: #e6db74 } /* Literal.String */
.highlight .na { color: #a6e22e } /* Name.Attribute */
.highlight .nb { color: #f8f8f2 } /* Name.Builtin */
.highlight .nc { color: #a6e22e } /* Name.Class */
.highlight .no { color: #66d9ef } /* Name.Constant */
.highlight .nd { color: #a6e22e } /* Name.Decorator */
.highlight .ni { color: #f8f8f2 } /* Name.Entity */
.highlight .ne { color: #a6e22e } /* Name.Exception */
.highlight .nf { color: #a6e22e } /* Name.Function */
.highlight .nl { color: #f8f8f2 } /* Name.Label */
.highlight .nn { color: #f8f8f2 } /* Name.Namespace */
.highlight .nx { color: #a6e22e } /* Name.Other */
.highlight .py { color: #f8f8f2 } /* Name.Property */
.highlight .nt { color: #f92672 } /* Name.Tag */
.highlight .nv { color: #f8f8f2 } /* Name.Variable */
.highlight .ow { color: #f92672 } /* Operator.Word */
.highlight .w { color: #f8f8f2 } /* Text.Whitespace */
.highlight .mb { color: #ae81ff } /* Literal.Number.Bin */
.highlight .mf { color: #ae81ff } /* Literal.Number.Float */
.highlight .mh { color: #ae81ff } /* Literal.Number.Hex */
.highlight .mi { color: #ae81ff } /* Literal.Number.Integer */
.highlight .mo { color: #ae81ff } /* Literal.Number.Oct */
.highlight .sa { color: #e6db74 } /* Literal.String.Affix */
.highlight .sb { color: #e6db74 } /* Literal.String.Backtick */
.highlight .sc { color: #e6db74 } /* Literal.String.Char */
.highlight .dl { color: #e6db74 } /* Literal.String.Delimiter */
.highlight .sd { color: #e6db74 } /* Literal.String.Doc */
.highlight .s2 { color: #e6db74 } /* Literal.String.Double */
.highlight .se { color: #ae81ff } /* Literal.String.Escape */
.highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */
.highlight .si { color: #e6db74 } /* Literal.String.Interpol */
.highlight .sx { color: #e6db74 } /* Literal.String.Other */
.highlight .sr { color: #e6db74 } /* Literal.String.Regex */
.highlight .s1 { color: #e6db74 } /* Literal.String.Single */
.highlight .ss { color: #e6db74 } /* Literal.String.Symbol */
.highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #a6e22e } /* Name.Function.Magic */
.highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */
.highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */
.highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */
.highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */
.highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */
