/*
Theme Name: UnitGenie Blog Theme
Description: Custom WordPress theme matching unitgenie.app design with ad spaces
Version: 1.0
Author: Your Name
*/

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Roboto', Arial, sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background-color: #ffffff;
  transition: all 0.2s ease;
}

/* Dark mode styles */
body.dark-mode {
  background-color: #111827;
  color: #f3f4f6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
}

a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #2980b9;
}

/* Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
  padding: 2rem 0;
}

/* Header */
.site-header {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.dark-mode .site-header {
  background: #1f2937;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: bold;
  color: #1f2937;
}

.dark-mode .site-logo {
  color: #f3f4f6;
}

.site-logo img {
  width: 32px;
  height: 32px;
  margin-right: 0.5rem;
  object-fit: contain;
}

.dark-mode .site-logo img {
  filter: brightness(0) invert(1);
}

/* Navigation */
.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  color: #6b7280;
  font-weight: 500;
  transition: color 0.2s ease;
}

.main-navigation a:hover {
  color: #3498db;
}

.dark-mode .main-navigation a {
  color: #d1d5db;
}

.dark-mode .main-navigation a:hover {
  color: #60a5fa;
}

/* Theme toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background-color 0.2s ease;
}

.theme-toggle:hover {
  background: #f3f4f6;
}

.dark-mode .theme-toggle:hover {
  background: #374151;
}

/* Ad spaces */
.ad-space {
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
  color: #6b7280;
  font-style: italic;
}

.dark-mode .ad-space {
  background: #1f2937;
  border-color: #374151;
  color: #9ca3af;
}

.ad-space.header-ad {
  margin-top: 1rem;
  margin-bottom: 0;
}

.ad-space.sidebar-ad {
  margin: 1rem 0;
  padding: 1.5rem;
}

.ad-space.footer-ad {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Main content layout */
.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }
}

/* Blog posts */
.post {
  background: #ffffff;
  border-radius: 0.5rem;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark-mode .post {
  background: #1f2937;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.post-title {
  margin-bottom: 1rem;
}

.post-title a {
  color: #1f2937;
}

.dark-mode .post-title a {
  color: #f3f4f6;
}

.post-meta {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.dark-mode .post-meta {
  color: #9ca3af;
}

.post-excerpt {
  color: #4b5563;
  line-height: 1.7;
}

.dark-mode .post-excerpt {
  color: #d1d5db;
}

/* Sidebar */
.sidebar {
  background: #ffffff;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  height: fit-content;
  position: sticky;
  top: 100px;
}

.dark-mode .sidebar {
  background: #1f2937;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.widget {
  margin-bottom: 2rem;
}

.widget:last-child {
  margin-bottom: 0;
}

.widget-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1f2937;
}

.dark-mode .widget-title {
  color: #f3f4f6;
}

.widget ul {
  list-style: none;
}

.widget li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.dark-mode .widget li {
  border-bottom-color: #374151;
}

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

/* Footer */
.site-footer {
  background: #f9fafb;
  padding: 2rem 0 1rem;
  margin-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.dark-mode .site-footer {
  background: #0f172a;
  border-top-color: #1e293b;
}

.footer-content {
  text-align: center;
  color: #6b7280;
  font-size: 0.875rem;
}

.dark-mode .footer-content {
  color: #9ca3af;
}

/* Responsive design */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }
  
  .main-navigation ul {
    flex-direction: column;
    gap: 1rem;
  }
  
  .container {
    padding: 0 0.5rem;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
  text-decoration: none;
}

.btn:hover {
  background: #2980b9;
  color: white;
}

.btn-secondary {
  background: #2ecc71;
}

.btn-secondary:hover {
  background: #27ae60;
}

/* Forms */
input, textarea, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  background: white;
}

.dark-mode input,
.dark-mode textarea,
.dark-mode select {
  background: #374151;
  border-color: #4b5563;
  color: #f3f4f6;
}

/* Comments */
.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.dark-mode .comments-area {
  border-top-color: #374151;
}

.comment {
  background: #f9fafb;
  padding: 1.5rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
}

.dark-mode .comment {
  background: #374151;
}