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

:root {
  --primary: #1a2b4a;
  --secondary: #2d5a8c;
  --accent: #f97316;
  --text-dark: #1f2937;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --white: #ffffff;
  --border: #e5e7eb;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-light);
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: all 0.3s ease;
}

nav.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  z-index: 1001;
}

.logo img {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.brand-name {
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
  white-space: nowrap;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--accent);
}

.cta-btn {
  background: var(--accent);
  color: var(--white);
  padding: 0.7rem 1.8rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  white-space: nowrap;
}

.cta-btn:hover {
  background: #ea580c;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--primary);
  transition: all 0.3s ease;
}

/* Hero Section */
.blog-hero {
  margin-top: 3rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  padding: 5rem 2rem 4rem;
  text-align: center;
  color: var(--white);
}

.blog-hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.blog-hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto;
  opacity: 0.95;
}

/* Search & Filter */
.blog-controls {
  max-width: 1200px;
  margin: -2rem auto 3rem;
  padding: 0 2rem;
}

.controls-wrapper {
  background: var(--white);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 0.9rem 1rem 0.9rem 3rem;
  border: 2px solid var(--border);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.filter-buttons {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.7rem 1.5rem;
  border: 2px solid var(--border);
  background: var(--white);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  color: var(--text-dark);
}

.filter-btn:hover,
.filter-btn.active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--white);
}

/* Blog Grid */
.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.blog-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

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

.blog-image {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  position: relative;
  overflow: hidden;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--accent);
  color: var(--white);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.blog-content {
  padding: 1.8rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--text-light);
  font-size: 0.9rem;
}

.blog-meta i {
  color: var(--accent);
}

.blog-title {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
}

.blog-excerpt {
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex: 1;
}

.blog-read-more {
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s ease;
}

.blog-card:hover .blog-read-more {
  gap: 1rem;
}

/* Loading State */
.loading-container {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem;
  color: var(--text-light);
}

.spinner {
  border: 3px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.no-posts {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-light);
}

.no-posts i {
  font-size: 4rem;
  color: var(--border);
  margin-bottom: 1rem;
}

/* Footer */
footer {
  background: #0f1419;
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
}

.footer-about h3 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-section h4 {
  color: var(--white);
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.7rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* Responsive */
@media (max-width: 978px) {
  .nav-container {
    padding: 1rem 1.5rem;
  }

  .nav-links {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    flex-direction: column;
    background: var(--white);
    width: 280px;
    text-align: left;
    transition: left 0.3s ease;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
    padding: 100px 2rem 2rem;
    gap: 1.5rem;
    align-items: flex-start;
    overflow-y: auto;
  }

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

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.5rem;
  }

  .menu-toggle {
    display: flex;
  }

  .blog-hero h1 {
    font-size: 2.5rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .controls-wrapper {
    flex-direction: column;
    padding: 1rem;
  }

  .search-box {
    width: 100%;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .nav-container {
    padding: 1rem;
  }
  .brand-name {
    font-size: 1.1rem;
  }
}
@media (max-width: 380px) {
  .controls-wrapper {
    padding: 0.5rem;
    width: 100%;
  }

  .filter-buttons {
    width: 100%;
  }

  #searchInput {
    width: 100%;
    max-width: 281px;
  }
}
@media (max-width: 350px) {
  .controls-wrapper {
    padding: 0.5rem;
    width: 100%;
  }

  .filter-buttons {
    width: 100%;
  }

  #searchInput {
    width: 100%;
    max-width: 265px;
  }
}
