/* UtiliTsar Theme - Minimal Responsive CSS */

/* Reset and base styles */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  line-height: 1.6;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
  color: #1a1a2e;
  background: #fafafa;
}

a {
  color: #4361ee;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4 {
  margin: 0 0 1rem;
  line-height: 1.3;
}

p {
  margin: 0 0 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: #4361ee;
  color: #fff;
}

.btn-primary:hover {
  background: #3651d4;
}

.btn-secondary {
  background: #e9ecef;
  color: #1a1a2e;
}

.btn-secondary:hover {
  background: #dee2e6;
}

.btn-large {
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
}

/* Header and Navigation */
.site-header {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a2e;
}

.logo:hover {
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  flex: 1;
}

.nav-link {
  color: #495057;
  font-weight: 500;
}

.nav-link:hover {
  color: #4361ee;
}

.nav-link.active {
  color: #4361ee;
}

.nav-auth {
  display: flex;
  gap: 0.75rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
  color: #fff;
  padding: 6rem 1.5rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

.hero-description {
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn-primary {
  background: #fff;
  color: #4361ee;
}

.hero .btn-primary:hover {
  background: #f8f9fa;
}

.hero .btn-secondary {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}

.hero .btn-secondary:hover {
  background: rgba(255,255,255,0.25);
}

/* Recent Posts Section */
.recent-posts {
  padding: 4rem 1.5rem;
}

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

.recent-posts h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.post-card {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.post-card h3 {
  margin-bottom: 0.5rem;
}

.post-card time {
  font-size: 0.875rem;
  color: #6c757d;
  display: block;
  margin-bottom: 0.75rem;
}

.view-all {
  display: block;
  text-align: center;
  font-weight: 500;
}

/* List Page */
.list-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.list-header {
  margin-bottom: 2rem;
}

.list-description {
  color: #6c757d;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.post-item {
  padding-bottom: 2rem;
  border-bottom: 1px solid #e9ecef;
}

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

.post-item h2 {
  margin-bottom: 0.5rem;
}

.post-item time {
  font-size: 0.875rem;
  color: #6c757d;
  display: block;
  margin-bottom: 0.75rem;
}

.read-more {
  font-weight: 500;
}

.no-posts {
  color: #6c757d;
  text-align: center;
  padding: 2rem;
}

/* Single Post */
.single-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.post-header {
  margin-bottom: 2rem;
}

.post-header h1 {
  font-size: 2rem;
}

.post-meta {
  color: #6c757d;
  font-size: 0.875rem;
}

.post-meta .author {
  margin-left: 1rem;
}

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

.post-content h2, .post-content h3 {
  margin-top: 2rem;
}

.post-content pre {
  background: #1a1a2e;
  color: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
}

.post-content code {
  font-family: "SF Mono", Monaco, Consolas, monospace;
  font-size: 0.9em;
}

.post-content p code {
  background: #e9ecef;
  padding: 0.2em 0.4em;
  border-radius: 4px;
}

.post-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Footer */
.site-footer {
  background: #1a1a2e;
  color: #adb5bd;
  padding: 2rem 1.5rem;
  margin-top: 4rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.footer-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-link {
  color: #adb5bd;
}

.footer-link:hover {
  color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-container {
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    padding-top: 1rem;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero {
    padding: 4rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .nav-auth {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-auth .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }

  .hero-cta {
    flex-direction: column;
  }
}
