/* Additional CSS for tool cards and category sections */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
    margin-bottom: 30px;
}

.tool-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.tool-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
}

.tool-card h4 a {
    color: var(--primary-color);
    text-decoration: none;
}

.tool-card p {
    color: #555555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.tool-card .button {
    align-self: flex-start;
}

.category-section {
    margin-bottom: 40px;
}

.category-section h3 {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--background-dark);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Q&A styles */
.qa-list {
    list-style-type: none;
    padding-left: 0;
}

.qa-list li {
    margin-bottom: 15px;
    padding: 15px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qa-list li:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.qa-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: block;
}

.qa-list a:hover {
    color: var(--primary-dark);
}

/* Expert card styles */
.featured-experts {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.featured-experts h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
}

.expert-card {
    margin-bottom: 20px;
    text-align: center;
}

.expert-card:last-child {
    margin-bottom: 0;
}

.expert-card .expert-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    margin-bottom: 10px;
}

.expert-card h4 {
    margin: 10px 0 5px;
    color: var(--text-color);
}

.expert-card .expert-title {
    color: #555555;
    font-size: 0.9rem;
    margin: 0 0 5px;
}

.expert-card .image-attribution {
    font-size: 0.7rem;
    color: #777777;
}

/* News styles */
.category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.category-button {
    background-color: var(--background-light);
    border: none;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.category-button:hover {
    background-color: var(--background-dark);
}

.category-button.active {
    background-color: var(--primary-color);
    color: white;
}

.trending-list {
    list-style-type: none;
    padding-left: 0;
}

.trending-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--background-dark);
}

.trending-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.trending-list a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.trending-list a:hover {
    color: var(--primary-color);
}

.newsletter-sidebar {
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-bottom: 30px;
}

.newsletter-sidebar h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.newsletter-form-sidebar {
    display: flex;
    flex-direction: column;
}

.newsletter-form-sidebar input {
    padding: 10px;
    border: 1px solid var(--background-dark);
    border-radius: var(--border-radius);
    margin-bottom: 10px;
}

.newsletter-form-sidebar button {
    align-self: flex-start;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .category-buttons {
        justify-content: center;
    }
}
