/*
Theme Name: Garden Chronicles
Description: A nature-inspired WordPress theme for gardening blogs, featuring wildlife-friendly design and organic layouts.
Author: Garden Chronicles
Version: 1.0
Text Domain: garden-chronicles
*/

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* CSS Variables - Bright nature-inspired color palette */
:root {
  --background: #ffffff;
  --foreground: #0f172a;
  --primary: #059669;
  --primary-foreground: #ffffff;
  --secondary: #fef3c7;
  --secondary-foreground: #0f172a;
  --accent: #8b5cf6;
  --accent-foreground: #ffffff;
  --muted: #f8fafc;
  --muted-foreground: #64748b;
  --card: #ffffff;
  --card-foreground: #0f172a;
  --border: #e2e8f0;
  --ring: #059669;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--foreground);
}

/* Container - Match React version */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header - Modern sticky design */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--foreground);
}

.logo-icon {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  padding: 0.5rem;
  border-radius: 50%;
  color: var(--primary-foreground);
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.site-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0;
  color: var(--foreground);
}

.site-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
  font-weight: 400;
}

/* Navigation */
.main-navigation {
  display: none;
}

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

.main-navigation a {
  color: var(--foreground);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
}

.main-navigation a:hover {
  color: var(--primary);
}

@media (min-width: 768px) {
  .main-navigation {
    display: block;
  }
}

/* Main Content */
main {
  padding: 2rem 0;
  min-height: calc(100vh - 200px);
}

/* Featured Post - Modern card design matching React */
.featured-post {
  background: var(--card);
  border-radius: 0.75rem;
  overflow: hidden;
  margin-bottom: 3rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.featured-post:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.featured-content {
  display: grid;
  gap: 0;
}

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

.featured-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.featured-post:hover .featured-image img {
  transform: scale(1.05);
}

.featured-text {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-badge {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: var(--primary-foreground);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  width: fit-content;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.featured-text h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.featured-text p {
  font-size: 1.125rem;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Blog Layout - Clean grid */
.blog-layout {
  display: grid;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .blog-layout {
    grid-template-columns: 2fr 1fr;
  }
}

.blog-posts {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .blog-posts {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Post Cards - Fixed styling to match React exactly */
.post-card {
  background: var(--card);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
}

/* Remove underlines from all content inside post cards */
.post-card * {
  text-decoration: none !important;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Improved image quality for post cards */
.post-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--muted);
}

.post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  transform: translateZ(0);
}

.post-card:hover .post-image img {
  transform: scale(1.05);
}

.post-content {
  padding: 1.5rem;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}

.post-category {
  background: var(--secondary);
  color: var(--secondary-foreground);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.post-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  transition: color 0.3s ease;
  line-height: 1.3;
  color: var(--foreground) !important; /* Force normal title color */
}

.post-card:hover .post-title {
  color: var(--primary) !important;
}

.post-excerpt {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-tag {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
}

.post-tag:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

/* Sidebar - Modern widget styling */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.widget {
  background: var(--card);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
}

.widget-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--foreground);
}

/* Footer */
.site-footer {
  background: var(--muted);
  margin-top: 4rem;
  padding: 3rem 0 1.5rem;
  border-top: 1px solid var(--border);
}

.footer-content {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

.footer-links a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
  font-weight: 500;
}

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

.footer-links h4 {
  color: var(--foreground);
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 1.5rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

/* Utility Classes */
.garden-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

/* Responsive Design */
@media (max-width: 767px) {
  .container {
    padding: 0 1rem;
  }
  
  .featured-text {
    padding: 1.5rem;
  }
  
  .post-content {
    padding: 1rem;
  }
  
  .widget {
    padding: 1rem;
  }
  
  .featured-text h2 {
    font-size: 1.5rem;
  }
}

/* Animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.6s ease-out;
}

/* Typography improvements */
.prose {
  font-size: 1rem;
  line-height: 1.7;
}

.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.prose p {
  margin-bottom: 1rem;
}

.prose a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
}

/* Enhanced image containment for post content */
.prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 2rem 0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  display: block;
}

/* Page navigation */
.page-numbers {
  display: inline-block;
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--foreground);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.page-numbers:hover,
.page-numbers.current {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.navigation.pagination {
  text-align: center;
  margin-top: 2rem;
}

/* Single Post Layout - Match React version */
.blog-layout-single {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1fr;
}

@media (min-width: 1024px) {
  .blog-layout-single {
    grid-template-columns: 2fr 1fr !important;
  }
}

/* Single post specific sidebar styling */
.single .sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (max-width: 1023px) {
  .single .sidebar {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
  }
}
