/* Modern Frontiers in Home Gardening - Main Stylesheet */

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

/* CSS Variables for Design System */
:root {
  --primary: #2d5016;
  --primary-light: #4a7c2a;
  --secondary: #8fbc3f;
  --accent: #f5a623;
  --background: #fafaf8;
  --text: #333333;
  --text-light: #666666;
  --white: #ffffff;
  --border: #e0e0d8;

  --heading-font: 'Poppins', sans-serif;
  --body-font: 'Open Sans', sans-serif;

  --transition: all 0.3s ease;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--body-font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--background);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-light);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--heading-font);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--primary);
}

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

p {
  margin-bottom: 1rem;
}

/* Header */
.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: var(--white);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-md);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--heading-font);
  color: var(--white);
  text-decoration: none;
}

.site-logo i {
  font-size: 2rem;
  color: var(--secondary);
}

.site-logo:hover {
  color: var(--secondary);
}

/* Navigation */
.main-nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

.nav-menu {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
}

.nav-menu li {
  position: relative;
}

.nav-menu > li > a {
  color: var(--white);
  padding: 0.75rem 1rem;
  display: block;
  border-radius: 8px;
  font-weight: 600;
  transition: var(--transition);
}

.nav-menu > li > a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--secondary);
}

/* Dropdown Menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  min-width: 250px;
  box-shadow: var(--shadow-lg);
  border-radius: 8px;
  padding: 0.5rem 0;
  display: none;
  z-index: 1001;
}

.nav-menu li:hover .dropdown-menu {
  display: block;
}

.dropdown-menu li a {
  color: var(--text);
  padding: 0.75rem 1rem;
  display: block;
  transition: var(--transition);
}

.dropdown-menu li a:hover {
  background-color: var(--background);
  color: var(--primary);
  padding-left: 1.5rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, rgba(45, 80, 22, 0.9) 0%, rgba(74, 124, 42, 0.9) 100%),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><rect fill="%234a7c2a" width="1200" height="400"/></svg>');
  background-size: cover;
  background-position: center;
  color: var(--white);
  padding: 4rem 1rem;
  text-align: center;
}

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

.hero h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-image {
  margin: 2rem auto;
  max-width: 900px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-family: var(--heading-font);
}

.btn-primary {
  background-color: var(--secondary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--accent);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--white);
  color: var(--white);
}

.btn-outline:hover {
  background-color: var(--white);
  color: var(--primary);
}

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

/* Grid Layout */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.category-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid var(--border);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.category-card i {
  font-size: 3rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.category-card h3 {
  margin-bottom: 0.75rem;
}

.category-card p {
  color: var(--text-light);
  margin-bottom: 1rem;
}

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

.main-content {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: var(--white);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}

.sidebar-widget h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--secondary);
}

.sidebar-widget ul {
  list-style: none;
}

.sidebar-widget ul li {
  margin-bottom: 0.5rem;
}

.sidebar-widget ul li a {
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: 6px;
  transition: var(--transition);
}

.sidebar-widget ul li a:hover {
  background-color: var(--background);
  color: var(--primary);
  padding-left: 1rem;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.9rem;
  color: var(--text-light);
}

.breadcrumbs a {
  color: var(--primary);
}

.breadcrumbs span {
  margin: 0 0.5rem;
}

/* Callout Boxes */
.callout {
  padding: 1.5rem;
  border-radius: 8px;
  margin: 2rem 0;
  border-left: 4px solid;
}

.callout-tip {
  background-color: #e8f5e9;
  border-color: var(--secondary);
}

.callout-warning {
  background-color: #fff3e0;
  border-color: var(--accent);
}

.callout-info {
  background-color: #e3f2fd;
  border-color: #2196f3;
}

.callout h4 {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Article Images */
.article-image {
  margin: 2rem 0;
  text-align: center;
}

.article-image img {
  box-shadow: var(--shadow-md);
}

.article-image figcaption {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-light);
  font-style: italic;
}

/* Lists */
.content-list {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.content-list li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

/* Quick Reference Cards */
.quick-ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.quick-ref-card {
  background: var(--background);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  border: 2px solid var(--border);
}

.quick-ref-card i {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 0.5rem;
}

.quick-ref-card strong {
  display: block;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

/* Footer */
.site-footer {
  background-color: var(--primary);
  color: var(--white);
  padding: 3rem 1rem 1rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--secondary);
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

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

.footer-section ul li a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-section ul li a:hover {
  color: var(--white);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 992px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--primary);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
  }

  .nav-menu.active {
    display: flex;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.1);
    margin-top: 0.5rem;
  }

  .dropdown-menu li a {
    color: rgba(255, 255, 255, 0.9);
  }

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

  .hero p {
    font-size: 1rem;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.35rem; }

  .main-content {
    padding: 1.5rem;
  }
}

@media (max-width: 576px) {
  .category-grid {
    grid-template-columns: 1fr;
  }

  .quick-ref-grid {
    grid-template-columns: 1fr;
  }
}
