:root {
  --primary-color: #880ed3;
  --primary-color-dark: #6a0bac;
  --text-color: #333;
  --text-color-light: #666;
  --background-color: #ffffff;
  --light-gray: #f4f4f7;
  --border-color: #e0e0e0;
  --header-height: 74px;
  --focus-outline: 2px solid var(--primary-color-dark);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  background-color: var(--background-color);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }

a { color: var(--primary-color); text-decoration: none; transition: color 0.3s ease; }
a:hover { color: var(--primary-color-dark); }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 600; margin: 0; }
h2 { font-size: 2rem; color: var(--primary-color); }
h3 { font-size: 1.25rem; }

.container { width: 90%; max-width: 1200px; margin-inline: auto; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.skip-link { position: absolute; top: -100px; left: 0; background: var(--primary-color); color: white; padding: 1rem; z-index: 9999; transition: top 0.3s; }
.skip-link:focus { top: 0; }

a:focus-visible, button:focus-visible, input[type="search"]:focus-visible { outline: var(--focus-outline); outline-offset: 2px; }

.site-header { background-color: var(--background-color); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); position: sticky; border-top: 4px solid var(--primary-color); top: 0; z-index: 1000; height: var(--header-height); }
.header-container { display: flex; justify-content: space-between; align-items: center; height: 100%; }
.site-title { font-size: 1.5rem; font-weight: 700; margin: 0; }
.site-title img { width: 160px; height: auto; }
.main-nav { display: none; }
.mobile-menu-toggle { display: flex; flex-direction: column; justify-content: space-around; width: 30px; height: 25px; background: transparent; border: none; cursor: pointer; padding: 0; z-index: 10; }
.mobile-menu-toggle span { width: 30px; height: 3px; background: var(--text-color); border-radius: 10px; transition: all 0.3s linear; position: relative; transform-origin: 1px; }

body.nav-open .main-nav { display: flex; flex-direction: column; justify-content: center; align-items: center; position: fixed; inset: 0; background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(5px); }
body.nav-open .nav-links { list-style: none; padding: 0; text-align: center; }
body.nav-open .nav-links li { margin: 20px 0; }
body.nav-open .nav-links a { font-size: 1.5rem; font-weight: 500; color: var(--text-color); }
body.nav-open .mobile-menu-toggle span:nth-child(1) { transform: rotate(45deg); }
body.nav-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; transform: translateX(20px); }
body.nav-open .mobile-menu-toggle span:nth-child(3) { transform: rotate(-45deg); }

.hero-section { padding-block: 2rem; }
.hero-container { display: flex; flex-direction: column; gap: 2rem; }
.hero-main-post { position: relative; border-radius: 8px; overflow: hidden; color: #ffffff; display: flex; flex-direction: column; justify-content: flex-end; min-height: 400px; padding: 2rem; }
.hero-main-post__image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.hero-main-post::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.1) 100%); z-index: -1; }
.hero-main-content { position: relative; }
.post-category { display: inline-block; font-size: 0.8rem; font-weight: 700; color: #ffffff; opacity: 0.9; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.5rem; }
.hero-title { font-size: 1.8rem; margin: 0.5rem 0 1rem; color: #ffffff; }
.hero-title a { color: inherit; text-decoration: none; }
.hero-title a:hover { text-decoration: underline; }
.hero-excerpt { color: rgba(255, 255, 255, 0.9); }
.post-meta time { font-size: 0.85rem; color: rgba(255, 255, 255, 0.8); }

.hero-sidebar-posts { display: flex; flex-direction: column; gap: 1.5rem; }
.hero-post-small { display: block; color: inherit; text-decoration: none; }
.hero-post-small article { display: flex; align-items: center; gap: 1rem; }
.hero-post-thumb { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.hero-post-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.hero-post-info .post-meta { font-size: 0.8rem; color: var(--text-color-light); }
.hero-post-info time { color: var(--text-color-light); }

.main-content-area { display: flex; flex-direction: column; gap: 2rem; padding-block: 2rem; }
.blog-sections { flex: 3; }
.category-section { margin-bottom: 3rem; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 1.5rem; border-bottom: 2px solid var(--light-gray); padding-bottom: 0.5rem; }
.section-header h2 { font-size: 1.8rem; }
.view-all-link { font-weight: 600; }

.post-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.post-card-link { display: block; color: inherit; text-decoration: none; border-radius: 8px; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.post-card-link:hover, .post-card-link:focus-within { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07); }
.post-card { background: white; overflow: hidden; height: 100%; display: flex; flex-direction: column; border-radius: 8px; }
.post-card__image { height: 200px; width: 100%; object-fit: cover; }
.post-card__content { padding: 1rem; flex-grow: 1; }
.post-card__content h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.post-card__content p { font-size: 0.9rem; margin: 0; color: var(--text-color-light); }
.post-card__meta { padding: 0 1rem 1rem; font-size: 0.85rem; color: var(--text-color-light); }

.sidebar { flex: 1; max-width: 100%; }
.sidebar-inner { position: sticky; top: calc(var(--header-height) + 2rem); }
.sidebar .widget { background: var(--light-gray); padding: 1.5rem; border-radius: 8px; margin-bottom: 2rem; }
.widget-title { margin-top: 0; margin-bottom: 1rem; font-size: 1.2rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--border-color); }
.search-form { display: flex; }
.search-form input[type="search"] { flex-grow: 1; border: 1px solid var(--border-color); padding: 0.7rem; border-radius: 5px 0 0 5px; font-size: 1rem; -webkit-appearance: none; }
.search-form button { padding: 0.7rem 1rem; border: none; background: var(--primary-color); color: white; cursor: pointer; border-radius: 0 5px 5px 0; }
.about-image { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin: 0 auto 1rem; border: 3px solid white; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); }
.about-widget p { text-align: left; font-size: 0.9rem; }
.popular-posts-widget ul { list-style: none; padding: 0; margin: 0; }
.popular-posts-widget li { padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); }
.popular-posts-widget li:last-child { border-bottom: none; }
.popular-posts-widget a { color: var(--text-color); font-weight: 500; }
.popular-posts-widget a:hover { color: var(--primary-color); }

.page-header { background-color: var(--light-gray); padding-block: 2.5rem; text-align: center; border-bottom: 1px solid var(--border-color); margin-bottom: 2rem; }
.page-header h1 { font-size: 2.5rem; color: var(--primary-color); margin: 0 0 0.5rem; }
.page-header p { font-size: 1rem; color: var(--text-color-light); max-width: 600px; margin-inline: auto; }
.category-post-grid, .search-post-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }

.single-post-container { display: flex; flex-direction: column; gap: 2rem; }
.single-post { flex: 3; max-width: 100%; margin-top: 1rem;}
.post-header { margin-bottom: 2rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1.5rem; }
.post-header .post-category { color: var(--primary-color); opacity: 1; font-weight: 600; }
.post-title-main { font-size: 2.2rem; margin: 0.5rem 0; }
.post-meta-single { color: var(--text-color-light); font-size: 0.9rem; }
.post-featured-image { margin: 0; border-radius: 8px; overflow: hidden; }
.post-content { line-height: 1.7; font-size: 1.05rem; }
.post-content h2, .post-content h3, .post-content h4 { margin-top: 2.5rem; margin-bottom: 1rem; color: var(--text-color); }
.post-content h2 { font-size: 1.8rem; color: var(--primary-color); }
.post-content h3 { font-size: 1.5rem; }
.post-content p { margin-bottom: 1.5rem; }
.post-content ul, .post-content ol { padding-left: 25px; margin-bottom: 1.5rem; }
.post-content li { margin-bottom: 0.5rem; }
.post-content a { text-decoration: underline; text-decoration-color: var(--primary-color); }
.post-content a:hover { text-decoration-color: var(--primary-color-dark); }
.post-content blockquote { margin: 2rem 0; padding: 1.5rem; background-color: var(--light-gray); border-left: 4px solid var(--primary-color); font-style: italic; color: var(--text-color-light); }
.post-content blockquote p { margin-bottom: 0; }
.post-tags { margin-top: 2rem; }
.post-tags-list { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; }
.post-tags-list a { display: inline-block; padding: 0.4rem 0.8rem; background: var(--light-gray); border-radius: 5px; font-size: 0.8rem; color: var(--text-color-light); transition: all 0.3s ease; }
.post-tags-list a:hover { background: var(--primary-color); color: white; }

.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--light-gray);
}

.comments-title, .comment-reply-title {
  font-size: 1.2rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
}

.comments-list, .comment-replies {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment-replies {
  margin-left: 2rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border-color);
  margin-top: 1.5rem;
}

.comment-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.comment-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-image: url('../images/avatar/user.webp');
  background-size: contain;
  background-repeat: no-repeat;
}

.comment-avatar img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-body {
  flex: 1;
}

.comment-meta {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.comment-author {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-color);
}

.comment-date {
  font-size: 0.8rem;
  color: var(--text-color-light);
}

.comment-text p {
  margin: 0 0 0.5rem 0;
  line-height: 1.6;
}

.comment-reply-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
  transition: color 0.2s ease;
}
.comment-reply-link:hover {
  color: var(--primary-color-dark);
}

.comment-form-section {
  margin-top: 3rem;
  padding: 2rem;
  background-color: var(--light-gray);
  border-radius: 8px;
}

.comment-notes {
  font-size: 0.9rem;
  color: var(--text-color-light);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(136, 14, 211, 0.2);
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.submit-button {
  padding: 0.8rem 1.5rem;
  border: none;
  background-color: var(--primary-color);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.submit-button:hover {
  background-color: var(--primary-color-dark);
}

.form-message {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 5px;
  display: none;
  font-weight: 500;
}
.form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  display: block;
}
.form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  display: block;
}

.site-footer { background-color: var(--light-gray); padding-block: 2rem; margin-top: 2rem; color: var(--text-color-light); font-size: 0.9rem; }
.footer-container { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1.5rem; }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem; padding: 0; margin: 0; }

.text-center { text-align: center; }
.text-black { color: #000; }
.mb-2 { margin-bottom: 2rem; }

@media (min-width: 768px) {
  .container { width: 90%; }
  .mobile-menu-toggle { display: none; }
  .main-nav { display: block; }
  .nav-links { display: flex; list-style: none; gap: 1.5rem; padding: 0; margin: 0; }
  .nav-links a { font-weight: 500; color: var(--text-color); }
  .nav-links a:hover { color: var(--primary-color); }
  .hero-container { flex-direction: row; align-items: stretch; }
  .hero-main-post { flex: 2; }
  .hero-sidebar-posts { flex: 1; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .category-post-grid, .search-post-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-container { flex-direction: row; justify-content: space-between; }
  .page-header h1 { font-size: 3rem; }
  .post-title-main { font-size: 2.8rem; }
}

@media (min-width: 1024px) {
  h2 { font-size: 2.2rem; }
  .hero-title { font-size: 2.5rem; }
  .main-content-area, .single-post-container { flex-direction: row; gap: 3rem; align-items: flex-start; }
  .sidebar { max-width: 320px; }
  .post-grid.two-columns { grid-template-columns: repeat(2, 1fr); }
  .category-post-grid, { grid-template-columns: repeat(2, 1fr); }
  .search-post-grid { grid-template-columns: repeat(3, 1fr); }
  .single-post { max-width: calc(100% - 320px - 3rem); } /* İçeriğin çok geniş olmasını engeller */
  .post-content { font-size: 1.1rem; }
}