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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Header styles */
header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.navbar h1 {
  font-size: 2rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.navbar .tagline {
  font-size: 1rem;
  opacity: 0.9;
  margin-top: 5px;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
}

nav ul li {
  display: inline;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 10px 15px;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
}

nav ul li a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Post grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin: 30px 0;
}

.post-card {
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
}

.post-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.post-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover img {
  transform: scale(1.05);
}

.post-content {
  padding: 25px;
}

.post-content h2 {
  margin-bottom: 12px;
  color: #2c3e50;
  font-size: 1.4rem;
  transition: color 0.3s ease;
}

.post-card:hover .post-content h2 {
  color: #667eea;
}

.post-content p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 15px;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #999;
  font-size: 0.85rem;
  border-top: 1px solid #eee;
  padding-top: 15px;
}

.read-more {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.read-more:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Single post page */
.post-page {
  max-width: 800px;
  margin: 30px auto;
  background: white;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
}

.post-page img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
  border-radius: 10px;
  margin: 25px 0;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.post-page h1 {
  margin: 25px 0;
  color: #2c3e50;
  font-size: 2.2rem;
  line-height: 1.3;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.post-meta {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-content-full {
  line-height: 1.8;
  color: #444;
  font-size: 1.1rem;
}

.post-content-full p {
  margin-bottom: 20px;
}

.ad-placeholder {
  background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
  padding: 30px;
  text-align: center;
  margin: 30px 0;
  border: 2px dashed #ccc;
  border-radius: 10px;
  color: #888;
  font-weight: 500;
  font-size: 1.1rem;
}

.ad-placeholder.top {
  background: linear-gradient(135deg, #e8f4fd 0%, #d4ecfb 100%);
}

.ad-placeholder.mid {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcf7e0 100%);
}

.ad-placeholder.bottom {
  background: linear-gradient(135deg, #fdf0fd 0%, #f7dcf0 100%);
}

.related-posts {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 2px solid #f0f0f0;
}

.related-posts h3 {
  margin-bottom: 20px;
  color: #2c3e50;
  font-size: 1.4rem;
}

.related-posts ul {
  list-style: none;
}

.related-posts ul li {
  margin-bottom: 15px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.related-posts ul li a {
  text-decoration: none;
  color: #007bff;
  font-weight: 500;
  transition: color 0.3s ease;
}

.related-posts ul li a:hover {
  color: #667eea;
  text-decoration: underline;
}

/* Tags styling */
.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.tag {
  display: inline-block;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* Footer */
footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  text-align: center;
  padding: 30px;
  margin-top: 60px;
}

footer p {
  margin: 5px 0;
}

/* Responsive design */
@media (max-width: 768px) {
  .post-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .navbar {
    flex-direction: column;
    gap: 15px;
  }
  
  .post-page {
    margin: 20px;
    padding: 25px;
  }
  
  nav ul {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .post-page h1 {
    font-size: 1.8rem;
  }
}

/* Animation for loading */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-card {
  animation: fadeIn 0.6s ease-out;
}

/* Content styling */
.post-content-full h2,
.post-content-full h3 {
  color: #2c3e50;
  margin: 25px 0 15px 0;
}

.post-content-full ul,
.post-content-full ol {
  margin: 15px 0;
  padding-left: 30px;
}

.post-content-full li {
  margin-bottom: 8px;
}

.post-content-full blockquote {
  border-left: 4px solid #667eea;
  padding: 15px 20px;
  margin: 20px 0;
  background: #f8f9fa;
  font-style: italic;
  color: #666;
}