/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Open Sans', sans-serif;
  font-size: 17px;
  line-height: 1.8;
  color: #333;
  background: #fff;
}

a {
  color: #487da8;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #3cca98;
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  color: #333;
}

h1 { font-size: 2rem; margin-bottom: 0.5em; }
h2 { font-size: 1.5rem; margin: 1.5em 0 0.5em; }
h3 { font-size: 1.25rem; margin: 1.2em 0 0.4em; }

p { margin-bottom: 1em; }

/* === Container & Layout === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.layout {
  display: flex;
  gap: 40px;
  padding-top: 30px;
  padding-bottom: 60px;
}

.content {
  flex: 1;
  min-width: 0;
}

/* === Header === */
.site-header {
  background: #212222;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 71px;
}

.site-slogan {
  font-family: 'Open Sans', sans-serif;
  font-size: 13px;
  color: #ccc;
  margin-left: 20px;
  white-space: nowrap;
}

.site-logo img {
  height: 40px;
  width: auto;
}

.main-nav {
  display: flex;
  gap: 30px;
}

.main-nav a {
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  padding: 5px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: #000;
  border-bottom-color: transparent;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* === Post Card (List) === */
.post-card {
  margin-bottom: 40px;
  border-bottom: 1px solid #f1f1f1;
  padding-bottom: 40px;
}

.post-card:last-child {
  border-bottom: none;
}

.post-card-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 3px;
}

.post-card-content {
  padding-top: 15px;
}

.post-card h2 {
  margin: 0.3em 0;
  font-size: 1.5rem;
}

.post-card h2 a {
  color: #333;
}

.post-card h2 a:hover {
  color: #487da8;
}

.post-card p {
  color: #666;
  margin-bottom: 0.8em;
}

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

.post-category {
  background: #487da8;
  color: #fff !important;
  padding: 2px 10px;
  border-radius: 3px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-category:hover {
  background: #3cca98;
  color: #fff !important;
}

.read-more {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #487da8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.read-more:hover {
  color: #3cca98;
}

/* === Single Post === */
.post-single .post-header {
  margin-bottom: 20px;
}

.post-single h1 {
  font-size: 2rem;
  margin-top: 0.3em;
}

.post-featured-image {
  margin-bottom: 30px;
}

.post-featured-image img {
  width: 100%;
  border-radius: 3px;
}

.post-content {
  line-height: 1.8;
}

.post-content h2 {
  border-bottom: 1px solid #f1f1f1;
  padding-bottom: 0.3em;
}

.post-content img {
  border-radius: 3px;
  margin: 1em 0;
}

.post-content blockquote {
  border-left: 4px solid #487da8;
  margin: 1.5em 0;
  padding: 0.5em 1.5em;
  background: #f9f9f9;
  color: #555;
  font-style: italic;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}

.post-content th,
.post-content td {
  padding: 10px 15px;
  border: 1px solid #e0e0e0;
  text-align: left;
}

.post-content th {
  background: #487da8;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
}

.post-content tr:nth-child(even) {
  background: #f9f9f9;
}

.post-tags {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #f1f1f1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: #f1f1f1;
  color: #666;
  padding: 4px 12px;
  border-radius: 3px;
  font-size: 13px;
}

.tag:hover {
  background: #487da8;
  color: #fff;
}

.post-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #f1f1f1;
  font-size: 14px;
}

.reading-time {
  color: #999;
}

/* === Page === */
.page-single h1 {
  margin-bottom: 0.8em;
}

.page-title {
  margin-bottom: 1em;
}

/* === Sidebar === */
.sidebar {
  width: 300px;
  flex-shrink: 0;
}

.widget {
  margin-bottom: 30px;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 3px;
}

.widget h3 {
  font-size: 1rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #487da8;
}

.widget ul {
  list-style: none;
}

.widget li {
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.widget li:last-child {
  border-bottom: none;
}

.widget .date {
  display: block;
  font-size: 12px;
  color: #999;
}

/* === Pagination === */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 40px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
}

.pagination a {
  padding: 8px 16px;
  background: #487da8;
  color: #fff;
  border-radius: 3px;
}

.pagination a:hover {
  background: #3cca98;
  color: #fff;
}

/* === Footer === */
.site-footer {
  background: #313131;
  color: #aaa;
  padding: 30px 0;
  font-size: 14px;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  color: #aaa;
}

.footer-nav a:hover {
  color: #3cca98;
}

/* === Responsive === */
@media (max-width: 960px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

  .menu-toggle {
    display: flex;
  }

  .site-slogan {
    display: none;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 71px;
    left: 0;
    right: 0;
    background: #212222;
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
  }

  .main-nav.open {
    display: flex;
  }

  .site-footer .container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .post-card-image img {
    height: 200px;
  }

  .post-single h1 {
    font-size: 1.5rem;
  }

  .post-nav {
    flex-direction: column;
    gap: 10px;
  }
}
