:root {
      --leaf-green: #6a994e;
  --sage: #6a994e;
  --cream: #fefae0;
  --soil: #606c38;
  --accent: #283618;
    --primary: 134 239 172;
    --primary-dark: 34 197 94;
    --secondary: 148 163 184;
    --success: 34 197 94;
    --warning: 251 191 36;
    --danger: 239 68 68;
    --dark: 30 41 59;
    --light: 248 250 252;
    --white: 255 255 255;
    --background: 255 255 255;
    --text: 15 23 42;
    --text-muted: 100 116 139;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: rgb(var(--text));
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

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

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgb(var(--primary-dark)) 0%, rgb(var(--success)) 100%);
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="20" cy="80" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.min-vh-50 {
    min-height: 50vh;
}

/* Cards */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.category-card,
.article-card {
    transition: all 0.3s ease;
}

.category-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: rgb(var(--dark));
}

.article-content h2 {
    font-size: 1.75rem;
    border-bottom: 2px solid rgb(var(--primary));
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
    color: rgb(var(--primary-dark));
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid rgb(var(--primary));
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    background: rgb(var(--light));
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.article-content table {
    width: 100%;
    margin: 2rem 0;
    border-collapse: collapse;
}

.article-content th,
.article-content td {
    padding: 0.75rem;
    border: 1px solid rgb(var(--secondary));
    text-align: left;
}

.article-content th {
    background: rgb(var(--light));
    font-weight: 600;
}

/* Search Results */
.search-result-card {
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.search-result-card:hover {
    border-left-color: rgb(var(--primary-dark));
}

/* Social Sharing */
.social-sharing .btn {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Navigation */
.navbar-nav .nav-link {
  font-weight: 600;
  padding: 0.75rem 1rem;
  color: #283618 !important;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: #6a994e !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link:hover {
    color: rgb(var(--primary-dark)) !important;
}

/* Footer */
footer {
    background: rgb(var(--dark)) !important;
}

footer .social-links a {
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

footer .social-links a:hover {
    color: rgb(var(--primary)) !important;
}

.newsletter-form .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Back to Top Button */
.back-to-top {
    width: 50px;
    height: 50px;
    bottom: 2rem !important;
    right: 2rem !important;
    z-index: 1000;
    transition: all 0.3s ease;
}

.back-to-top:hover {
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .category-icon {
        height: 60px;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
}

/* Custom Bootstrap Overrides */
.btn-success {
    background-color: rgb(var(--primary-dark));
    border-color: rgb(var(--primary-dark));
}

.btn-success:hover {
    background-color: rgb(var(--success));
    border-color: rgb(var(--success));
}

.btn-outline-success {
    color: rgb(var(--primary-dark));
    border-color: rgb(var(--primary-dark));
}

.btn-outline-success:hover {
    background-color: rgb(var(--primary-dark));
    border-color: rgb(var(--primary-dark));
}

.text-success {
    color: rgb(var(--primary-dark)) !important;
}

.bg-success {
    background-color: rgb(var(--primary-dark)) !important;
}

.badge.bg-success {
    background-color: rgb(var(--primary-dark)) !important;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgb(var(--primary));
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .social-sharing,
    .back-to-top,
    .btn {
        display: none !important;
    }
    
    .article-content {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .article-content h2,
    .article-content h3 {
        page-break-after: avoid;
    }
    
    .article-content img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--primary-dark), 0.25);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid rgb(var(--dark));
    }
    
    .btn-outline-success {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
