/* Base Styles */
:root {
  --primary-color: #2E8B57;
  --secondary-color: #3CB371;
  --accent-color: #90EE90;
  --text-color: #333;
  --light-text: #666;
  --lighter-text: #999;
  --background: #fff;
  --light-background: #f0f8f5;
  --border-color: #d0e8dc;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --hover-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
  --transition: all 0.3s ease;
}

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

body {
  font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--light-background);
}

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

a:hover {
  color: var(--secondary-color);
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.button {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.button:hover {
  background-color: var(--secondary-color);
  color: white;
  transform: translateY(-2px);
}

/* Header Styles */
header {
  background-color: var(--background);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo img {
  height: 40px;
}

.main-nav {
  display: flex;
  align-items: center;
  z-index: 99;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  padding: 5px 10px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.nav-links a:hover {
  background-color: var(--primary-color);
  color: white;
}

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

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 60px 0;
  text-align: center;
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.95;
}

/* Content Grid */
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

/* Card Styles */
.card {
  background-color: var(--background);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

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

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 20px;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--text-color);
  font-weight: 600;
}

.card-meta {
  color: var(--light-text);
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.card-description {
  color: var(--light-text);
  line-height: 1.8;
  margin-bottom: 15px;
}

.card-link {
  color: var(--primary-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.card-link:hover {
  color: var(--secondary-color);
  gap: 10px;
}

/* Featured Post Styles */
.featured-post {
  margin-bottom: 40px;
  background: var(--background);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.featured-post-content {
  position: relative;
  overflow: hidden;
}

.featured-image {
  position: relative;
  height: 400px;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

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

.featured-text {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: white;
  padding: 60px 40px 40px;
}

.featured-text h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.featured-text .post-meta {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
  opacity: 0.9;
  margin-top: 16px;
}

.featured-text .post-meta span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-badge {
  position: absolute;
  top: 24px;
  left: 24px;
  background: var(--primary-color);
  color: white;
  padding: 8px 16px;
  border-radius: var(--border-radius);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow);
}

/* Article Styles */
.article {
  background-color: var(--background);
  border-radius: var(--border-radius);
  padding: 40px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.article-header {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border-color);
}

.article h1 {
  font-size: 2.2rem;
  margin-bottom: 15px;
  color: var(--text-color);
}

.article-meta {
  display: flex;
  gap: 20px;
  color: var(--light-text);
  font-size: 0.95rem;
  flex-wrap: wrap;
}

.article-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-content {
  line-height: 1.8;
  font-size: 1.05rem;
}

.article-content h2 {
  font-size: 1.8rem;
  margin: 30px 0 15px;
  color: var(--primary-color);
}

.article-content h3 {
  font-size: 1.4rem;
  margin: 25px 0 12px;
  color: var(--text-color);
}

.article-content p {
  margin-bottom: 20px;
  color: var(--text-color);
}

.article-content ul, 
.article-content ol {
  margin: 20px 0;
  padding-left: 30px;
}

.article-content li {
  margin-bottom: 10px;
}

.article-content blockquote {
  margin: 25px 0;
  padding: 20px;
  background-color: var(--light-background);
  border-left: 4px solid var(--primary-color);
  font-style: italic;
  color: var(--light-text);
}

.article-content code {
  background-color: var(--light-background);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.95em;
}

.article-content pre {
  background-color: var(--light-background);
  padding: 20px;
  border-radius: var(--border-radius);
  overflow-x: auto;
  margin: 20px 0;
}

.article-content pre code {
  background: none;
  padding: 0;
}

/* Category Badge */
.category-badge {
  display: inline-block;
  background-color: var(--primary-color);
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 10px;
  margin-bottom: 10px;
}

/* Sidebar */
.sidebar {
  background-color: var(--background);
  border-radius: var(--border-radius);
  padding: 25px;
  box-shadow: var(--shadow);
}

.sidebar-section {
  margin-bottom: 30px;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar h3 {
  font-size: 1.2rem;
  margin-bottom: 15px;
  color: var(--text-color);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
}

.sidebar ul {
  list-style: none;
}

.sidebar li {
  margin-bottom: 10px;
}

.sidebar a {
  color: var(--light-text);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.sidebar a:hover {
  background-color: var(--light-background);
  color: var(--primary-color);
  padding-left: 18px;
}

/* Footer */
footer {
  background-color: var(--text-color);
  color: white;
  padding: 40px 0 20px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer-section h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  color: white;
}

.footer-section p,
.footer-section ul {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
}

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

.footer-section li {
  margin-bottom: 8px;
}

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

.footer-section a:hover {
  color: white;
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

/* Social Links */
.social-links {
  display: flex;
  gap: 15px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--background);
    flex-direction: column;
    padding: 20px;
    box-shadow: var(--shadow);
  }

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

  .nav-links li {
    margin: 10px 0;
  }

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

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

  .article {
    padding: 20px;
  }

  .article h1 {
    font-size: 1.8rem;
  }

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

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

  .featured-image {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .hero {
    padding: 40px 0;
  }

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

  .article h1 {
    font-size: 1.5rem;
  }

  .article-content {
    font-size: 1rem;
  }

  .featured-image {
    height: 250px;
  }

  .featured-text {
    padding: 40px 24px 24px;
  }
}

/* Loading Spinner */
.spinner {
  border: 3px solid var(--border-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 20px auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--light-text);
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.py-1 { padding: 10px 0; }
.py-2 { padding: 20px 0; }
.py-3 { padding: 30px 0; }

.hidden {
  display: none;
}

.flex {
  display: flex;
}

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

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

.grid {
  display: grid;
}

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

.fade-in {
  animation: fadeIn 0.5s ease-out;
}
