/* Core Web Vitals için optimize edilmiş CSS */
:root {
  --primary-color: #00e676;
  --secondary-color: #007e3a; /* Kontrast için daha koyu yeşil */
  --dark-bg: #121212;
  --card-bg: #1e1e1e;
  --text-color: #ffffff;
  --link-color: #00d369; /* Kontrast için ayarlandı */
  --border-radius: 10px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--dark-bg);
  color: var(--text-color);
  padding: 16px;
  line-height: 1.5;
  font-display: swap; /* Font yükleme optimizasyonu */
  min-height: 100vh;
  width: 100%;
}

h1, h2, h3, h4, h5, h6 {
  margin: 1em 0 0.5em;
  color: var(--primary-color);
  font-weight: 700;
}

h1 {
  font-size: 2em;
  text-align: center;
  margin-bottom: 1em;
  min-height: 40px; /* CLS için sabit yükseklik */
  contain: layout paint style;
}

h2 {
  min-height: 32px; /* CLS için sabit yükseklik */
  contain: layout paint style;
}

/* LCP Optimizasyonu - Önemli içerik daha hızlı yüklenir */
h1, .slogan, .card, .blog-card {
  content-visibility: auto;
}

p {
  margin-bottom: 1em;
}

a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-color);
}

/* CLS Optimizasyonu - Yerleşim kayması önlenir */
img {
  max-width: 100%;
  height: auto;
  display: block;
  aspect-ratio: attr(width) / attr(height);
  width: 60px; /* CLS için sabit genişlik */
  height: 24px; /* CLS için sabit yükseklik */
  object-fit: contain;
  content-visibility: auto;
  contain: size layout;
}

main {
  min-height: 400px; /* Ana içerik için minimum yükseklik */
  contain: layout size style; /* CLS optimizasyonu */
  width: 100%;
}

#liste {
  min-height: 600px; /* Liste için minimum yükseklik */
  contain: strict; /* CLS optimizasyonu - en katı kapsama */
  width: 100%;
}

.card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 15px;
  margin: 15px 0;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: transform 0.2s;
  height: 80px; /* CLS için sabit yükseklik */
  min-width: 280px; /* CLS için minimum genişlik */
  contain: size layout; /* CLS optimizasyonu */
  will-change: transform;
}

.card:hover {
  transform: translateY(-2px);
}

.card-text {
  flex: 1;
  margin-left: 15px;
  min-height: 40px; /* CLS için sabit yükseklik */
  contain: content;
}

.card-text h3 {
  margin: 0 0 5px;
  font-size: 18px;
  min-height: 22px; /* CLS için sabit yükseklik */
  contain: content;
}

.card-text p {
  margin: 0;
  font-size: 14px;
  color: #ccc;
  min-height: 16px; /* CLS için sabit yükseklik */
}

button, .button, .bonus-button {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
  min-width: 100px; /* CLS için sabit genişlik */
  min-height: 36px; /* CLS için sabit yükseklik */
  contain: layout; /* CLS optimizasyonu */
}

button:hover, .button:hover, .bonus-button:hover {
  background: var(--primary-color);
}

/* Blog card styles */
.blog-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 20px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  min-height: 150px; /* CLS için sabit yükseklik */
  contain: layout; /* CLS optimizasyonu */
}

.blog-card h2 {
  margin-top: 0;
  font-size: 1.5em;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.8em;
  color: #ccc;
  margin-bottom: 15px;
  min-height: 20px; /* CLS için sabit yükseklik */
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 0.9em;
  color: #ccc;
  margin-bottom: 1em;
  border-bottom: 1px solid #333;
  padding-bottom: 1em;
  min-height: 30px; /* CLS için sabit yükseklik */
}

.subtitle {
  font-weight: bold;
  color: #eee;
  margin-bottom: 10px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  min-height: 24px; /* CLS için sabit yükseklik */
}

.tag {
  background: #333;
  color: #ccc;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8em;
}

.read-more {
  display: inline-block;
  margin-top: 10px;
  font-weight: bold;
  color: var(--secondary-color);
}

/* Layout */
header, main, footer {
  max-width: 1200px;
  margin: 0 auto;
  contain: layout; /* CLS optimizasyonu */
  width: 100%;
}

header {
  margin-bottom: 2em;
  text-align: center;
  min-height: 70px; /* CLS için sabit yükseklik */
  contain: layout style;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  gap: 20px;
  margin: 15px 0;
  min-height: 40px; /* CLS için sabit yükseklik */
}

footer {
  margin-top: 3em;
  text-align: center;
  font-size: 0.9em;
  color: #999;
  padding-top: 1em;
  border-top: 1px solid #333;
  min-height: 50px; /* CLS için sabit yükseklik */
}

/* Article page */
.article-content {
  max-width: 800px;
  margin: 0 auto;
}

.article-body p {
  margin-bottom: 1em;
}

aside {
  max-width: 800px;
  margin: 3em auto;
}

.related-posts-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 1em;
  min-height: 150px; /* CLS için sabit yükseklik */
}

.related-post-card {
  background: #252525;
  padding: 15px;
  border-radius: var(--border-radius);
  min-height: 100px; /* CLS için sabit yükseklik */
}

.cta-box {
  background: #252525;
  padding: 20px;
  border-radius: var(--border-radius);
  margin-top: 2em;
  min-height: 100px; /* CLS için sabit yükseklik */
}

.cta-box ul {
  margin: 1em 0;
  padding-left: 20px;
}

.intro {
  margin-bottom: 2em;
  font-size: 1.1em;
  line-height: 1.6;
}

.popular-topics {
  margin-top: 3em;
}

.popular-topics ul {
  list-style: none;
  margin-top: 1em;
}

.popular-topics li {
  margin-bottom: 0.5em;
}

/* Mobile Responsive */
@media screen and (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .card {
    flex-direction: column;
    text-align: center;
    height: auto;
    min-height: 120px;
  }
  
  .card-text {
    margin: 10px 0;
  }
  
  .blog-meta, .article-meta {
    flex-direction: column;
    gap: 5px;
  }
}

/* Sayfa ilk yüklenirken içeriğin boyutunu belirle (CLS optimizasyonu) */
.blog-list {
  min-height: 500px;
}

/* İskelet yükleme stili - CLS önleme */
.skeleton-card {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 15px;
  margin: 15px 0;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  height: 80px;
  min-width: 280px;
  contain: strict;
}

.skeleton-img {
  width: 60px;
  height: 24px;
  background: #252525;
  border-radius: 4px;
  contain: strict;
}

.skeleton-content {
  flex: 1;
  margin-left: 15px;
  min-height: 40px;
  contain: layout;
}

.skeleton-title {
  width: 120px;
  height: 18px;
  background: #252525;
  border-radius: 4px;
  margin-bottom: 8px;
  contain: strict;
}

.skeleton-text {
  width: 180px;
  height: 14px;
  background: #252525;
  border-radius: 4px;
  contain: strict;
}

.skeleton-button {
  width: 100px;
  height: 36px;
  background: #252525;
  border-radius: 4px;
  contain: strict;
}

/* Critical CSS - En önemli stilleri inline eklemek için */
.slogan {
  color: #cccccc;
  font-size: 18px;
  margin-bottom: 30px;
  min-height: 27px; /* CLS için sabit yükseklik */
}

.info-section, .links-section {
  margin: 30px 0;
  padding: 20px;
  background: var(--card-bg);
  border-radius: var(--border-radius);
  min-height: 100px; /* CLS için sabit yükseklik */
  contain: layout; /* CLS optimizasyonu */
}

.faq-container {
  display: grid;
  gap: 20px;
  min-height: 200px; /* CLS için sabit yükseklik */
  contain: layout; /* CLS optimizasyonu */
}

.faq-item {
  background: #252525;
  padding: 15px;
  border-radius: 8px;
  min-height: 80px; /* CLS için sabit yükseklik */
}

.faq-item h3 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 18px;
  min-height: 22px; /* CLS için sabit yükseklik */
}

.link-list {
  list-style: none;
  margin: 15px 0;
  min-height: 150px; /* CLS için sabit yükseklik */
}

.link-list li {
  margin-bottom: 10px;
  min-height: 24px; /* CLS için sabit yükseklik */
}

/* Buton kontrast iyileştirmesi */
button, .button, .bonus-button {
  font-size: 14px;
  letter-spacing: 0.5px;
  font-weight: 700;
  padding: 10px 16px;
  background-color: #007e3a; /* Kontrast için daha koyu yeşil */
  color: #ffffff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

button:hover, .button:hover, .bonus-button:hover {
  background-color: #009245;
}

/* Font optimizasyonu */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfMZs.woff) format('woff');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuFuYMZs.woff) format('woff');
}
