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

/* Variables */
:root {
  --color-yellow: #ffcf0b;
  --color-red: #ca3214;
  --color-dark: #1a1a1a;
  --color-text: #333;
  --color-light: #fff;
  --color-gray: #666;
  --color-border: #ddd;
  --font-heading: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, sans-serif;
  --max-width: 1100px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-light);
  line-height: 1.7;
  font-size: 17px;
}

a {
  color: var(--color-red);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.site-header {
  background: var(--color-yellow);
  padding: 28px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--color-dark);
}
.site-logo:hover {
  text-decoration: none;
}

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

.site-nav {
  display: flex;
  gap: 20px;
  align-items: center;
}

.site-nav a {
  color: var(--color-dark);
  font-size: 17px;
  font-weight: 400;
}
.site-nav a:hover {
  text-decoration: none;
  opacity: 0.7;
}

/* Posts Grid - Homepage */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 48px 0 0;
}

.post-card {
  background: none;
}

.post-card-image img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
}

.post-card-body {
  padding: 16px 0 0;
}

.post-card-body h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  margin-bottom: 10px;
  line-height: 1.3;
  font-weight: 700;
}

.post-card-body h2 a {
  color: var(--color-dark);
  text-decoration: none;
  background-image: linear-gradient(var(--color-yellow), var(--color-yellow));
  background-size: 0% 3px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s;
  padding-bottom: 2px;
}
.post-card-body h2 a:hover {
  text-decoration: none;
  color: var(--color-dark);
  background-size: 100% 3px;
}

.post-card-excerpt {
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.post-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: var(--color-red);
  align-items: center;
}

.post-card-meta svg {
  vertical-align: -2px;
  margin-right: 4px;
  color: var(--color-red);
  stroke: var(--color-red);
}

.meta-date, .meta-author {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Section Divider */
.section-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 50px 0 40px;
}

/* Homepage Footer Widgets */
.homepage-footer-widgets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-bottom: 60px;
}

.widget h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--color-dark);
  display: inline-block;
  background-image: linear-gradient(var(--color-yellow), var(--color-yellow));
  background-size: 0% 3px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s;
  padding-bottom: 2px;
  cursor: default;
}
.widget h3:hover {
  background-size: 100% 3px;
}

/* Recent Posts Widget */
.widget-recent-posts ul {
  list-style: none;
}

.widget-recent-posts li {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.widget-thumb {
  flex-shrink: 0;
}

.widget-thumb img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  display: block;
}

.widget-post-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.widget-post-info a {
  color: var(--color-dark);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  background-image: linear-gradient(var(--color-yellow), var(--color-yellow));
  background-size: 0% 3px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s;
  padding-bottom: 1px;
}
.widget-post-info a:hover {
  color: var(--color-dark);
  background-size: 100% 3px;
}

.widget-date {
  color: var(--color-gray);
  font-size: 13px;
}

/* Search Widget */
.search-form {
  display: flex;
  margin-bottom: 24px;
}

.search-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 15px;
}
.search-input:focus {
  outline: none;
  border-color: var(--color-gray);
}

.search-button {
  background: var(--color-red);
  color: #fff;
  border: none;
  padding: 8px 20px;
  font-family: var(--font-body);
  font-size: 15px;
  cursor: pointer;
}
.search-button:hover {
  opacity: 0.9;
}

/* Search Results */
.search-result {
  margin-bottom: 12px;
}

.search-result a {
  color: var(--color-dark);
  font-weight: 600;
  font-size: 15px;
}
.search-result a:hover {
  color: var(--color-red);
}

.search-result .widget-date {
  display: block;
}

.search-no-results {
  color: var(--color-gray);
  font-size: 14px;
}

/* Archives & Topics Widget */
.widget-archives, .widget-topics {
  margin-bottom: 24px;
}

.widget-archives p, .widget-topics p {
  margin-bottom: 4px;
}

.widget-archives a, .widget-topics a {
  color: var(--color-text);
  font-size: 15px;
  text-decoration: none;
  background-image: linear-gradient(var(--color-yellow), var(--color-yellow));
  background-size: 0% 3px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.3s;
  padding-bottom: 1px;
}
.widget-archives a:hover, .widget-topics a:hover {
  color: var(--color-text);
  background-size: 100% 3px;
}

/* Post Page */
.post-header {
  padding: 40px 0 20px;
}

.post-title {
  font-family: var(--font-heading);
  font-size: 36px;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--color-dark);
}

.post-meta {
  font-size: 14px;
  color: var(--color-red);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.post-meta svg {
  vertical-align: -2px;
  margin-right: 4px;
  stroke: var(--color-red);
}

.post-meta a {
  color: var(--color-red);
}

.post-image {
  margin: 0 0 32px;
}

.post-image img {
  width: 100%;
}

.post-content {
  max-width: 100%;
  padding-bottom: 48px;
}

.post-content h2 {
  font-family: var(--font-heading);
  font-size: 26px;
  margin: 36px 0 14px;
  color: var(--color-dark);
}

.post-content h3 {
  font-family: var(--font-heading);
  font-size: 20px;
  margin: 28px 0 10px;
  color: var(--color-dark);
}

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

.post-content img {
  margin: 16px 0;
}

.post-content blockquote {
  border-left: 4px solid var(--color-border);
  padding: 12px 20px;
  margin: 24px 0;
  color: var(--color-gray);
  font-style: italic;
}

.post-content ul, .post-content ol {
  margin: 16px 0;
  padding-left: 28px;
}

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

.post-tags {
  padding: 16px 0 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: var(--color-yellow);
  color: var(--color-dark);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 13px;
  font-weight: 600;
}

/* Page */
.page-header {
  padding: 40px 0 20px;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 36px;
}

.page-content {
  max-width: 100%;
  padding-bottom: 48px;
}

.page-content p {
  margin-bottom: 16px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 20px 0;
  font-size: 14px;
  color: var(--color-gray);
}

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

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

.footer-links a {
  color: var(--color-dark);
  font-size: 14px;
}
.footer-links a:hover {
  color: var(--color-red);
}

/* Responsive */
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    gap: 12px;
  }

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

  .homepage-footer-widgets {
    grid-template-columns: 1fr;
  }

  .post-title {
    font-size: 28px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}
