:root {
  --primary: #25D366;
  --secondary: #128C7E;
  --dark: #1a1a2e;
  --light: #f8f9fa;
  --accent: #667eea;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: #fff;
}

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

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
  transition: background-color 0.3s ease;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  will-change: transform;
}

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

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo {
  height: 140px;
  width: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
}

.logo img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: contain;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  color: #64748b;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
  background: rgba(37, 211, 102, 0.05);
}

.nav-cta {
  background: var(--primary);
  color: white !important;
  padding: 10px 20px !important;
  border-radius: 8px;
  font-weight: 600;
  margin-left: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.nav-cta:hover {
  background: #128C7E;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.bar {
  width: 24px;
  height: 3px;
  background: var(--dark);
  border-radius: 2px;
  transition: 0.3s;
}

/* Hero Section */
.blog-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 150px 0 60px;
  text-align: center;
  margin-top: 70px;
}

.hero-content h1 {
  font-size: 48px;
  margin-bottom: 16px;
  font-weight: 800;
}

.hero-content p {
  font-size: 20px;
  opacity: 0.95;
  margin-bottom: 32px;
}

.search-box {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  background: white;
  padding: 8px;
  border-radius: 50px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.search-box input {
  flex: 1;
  border: none;
  padding: 12px 20px;
  font-size: 16px;
  outline: none;
  background: transparent;
}

.search-box button {
  background: var(--primary);
  border: none;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 20px;
  cursor: pointer;
  transition: transform 0.2s;
}

.search-box button:hover {
  transform: scale(1.05);
}

/* Categories */
.categories-section {
  padding: 32px 0;
  background: #f8f9fa;
}

.categories-pills {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.category-pill {
  padding: 10px 20px;
  border: 2px solid #e0e0e0;
  background: white;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s;
  font-size: 14px;
}

.category-pill:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.category-pill.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Posts Section */
.posts-section {
  padding: 60px 0;
  min-height: 400px;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.post-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: all 0.3s;
  cursor: pointer;
  animation: fadeIn 0.5s ease-in;
}

.post-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.post-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.post-content {
  padding: 24px;
}

.post-category {
  display: inline-block;
  padding: 6px 12px;
  background: var(--primary);
  color: white;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.post-content h3 {
  font-size: 20px;
  margin-bottom: 12px;
  color: var(--dark);
  line-height: 1.4;
}

.post-excerpt {
  color: #666;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #999;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Loading */
.loading {
  text-align: center;
  padding: 60px 0;
  grid-column: 1 / -1;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f0f0f0;
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.no-posts {
  text-align: center;
  padding: 80px 20px;
  color: #999;
}

.no-posts h3 {
  font-size: 24px;
  margin-bottom: 8px;
  color: #666;
}

/* Newsletter */
.newsletter-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 60px 0;
}

.newsletter-box {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  color: white;
}

.newsletter-box h3 {
  font-size: 32px;
  margin-bottom: 12px;
}

.newsletter-box p {
  font-size: 18px;
  opacity: 0.95;
  margin-bottom: 24px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  outline: none;
}

.newsletter-form button {
  padding: 14px 32px;
  background: white;
  color: var(--accent);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.newsletter-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Footer */
.blog-footer {
  background: #1a1a2e;
  color: white;
  padding: 32px 0;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: white;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-social p {
  opacity: 0.6;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    gap: 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .nav-menu li {
    margin: 8px 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  
  .hero-content h1 {
    font-size: 32px;
  }
  
  .hero-content p {
    font-size: 16px;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}