/* Resources Library Styles */

/* Hero Section */
.resources-hero {
    background: linear-gradient(to right, #e8f5e9, #c8e6c9);
    padding: 60px 0;
    margin-bottom: 40px;
}

.resources-hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.resources-hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #2e7d32;
}

.resources-hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #444;
}

/* Search Bar */
.search-container {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

#resource-search {
    flex: 1;
    padding: 12px 20px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
    transition: border-color 0.3s;
}

#resource-search:focus {
    border-color: #4a8f29;
}

#search-btn {
    padding: 12px 24px;
    border-radius: 0 4px 4px 0;
    font-size: 16px;
}

/* Articles Section */
.articles-section {
    padding: 40px 0 80px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.article-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2e7d32;
}

.article-content p {
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
}

.article-content .btn {
    align-self: flex-start;
    margin-top: auto;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 40px 0;
}

.no-results h3 {
    color: #2e7d32;
    margin-bottom: 10px;
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin-top: 50px;
}

/* CTA Section */
.cta-section {
    background-color: #e8f5e9;
    padding: 60px 0;
    margin-top: 40px;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #2e7d32;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #444;
}

/* Article Page Specific Styles */
.article-header {
    background: linear-gradient(to right, #e8f5e9, #c8e6c9);
    padding: 60px 0 40px;
}

.article-header .container {
    max-width: 900px;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #2e7d32;
}

.article-meta {
    color: #666;
    margin-bottom: 30px;
    font-size: 0.9rem;
}

.article-content-area {
    padding: 50px 0;
}

.article-content-area .container {
    max-width: 900px;
}

.article-body {
    background-color: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-body h2 {
    color: #2e7d32;
    margin: 30px 0 20px;
    font-size: 1.8rem;
}

.article-body h3 {
    color: #2e7d32;
    margin: 25px 0 15px;
    font-size: 1.4rem;
}

.article-body p {
    margin-bottom: 20px;
    line-height: 1.7;
}

.article-body ul, .article-body ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body img {
    max-width: 100%;
    border-radius: 4px;
    margin: 20px 0;
}

.article-body blockquote {
    border-left: 4px solid #4a8f29;
    padding: 15px 20px;
    background-color: #f9f9f9;
    margin: 20px 0;
    font-style: italic;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.article-body th, .article-body td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.article-body th {
    background-color: #e8f5e9;
    font-weight: 600;
}

/* Related Articles */
.related-articles {
    padding: 40px 0 60px;
    background-color: #f9f9f9;
}

.related-articles h2 {
    text-align: center;
    margin-bottom: 40px;
}

.related-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* Calculator Styles */
.calculator-container {
    background-color: #f1f8e9;
    padding: 30px;
    border-radius: 8px;
    margin: 30px 0;
}

.calculator-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
}

.calculator-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.calc-form-group {
    margin-bottom: 15px;
}

.calc-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.calc-form-group input, .calc-form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.calculator-results {
    margin-top: 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: none;
}

.calculator-results h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2e7d32;
}

.calculator-actions {
    margin-top: 20px;
    text-align: center;
}

@media (max-width: 992px) {
    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .resources-hero-content h1 {
        font-size: 2rem;
    }
    
    .search-container {
        flex-direction: column;
    }
    
    #resource-search {
        border-radius: 4px;
        margin-bottom: 10px;
    }
    
    #search-btn {
        border-radius: 4px;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .article-content h3 {
        font-size: 1.2rem;
    }
    
    .calculator-form {
        grid-template-columns: 1fr;
    }
}
