/**
 * Block styles for Calcala theme
 * Shared styles for both frontend and editor
 */

/* Related Articles Block */
.wp-block-calcala-related-articles {
    margin: 2rem 0;
}

.wp-block-calcala-related-articles .related-articles-container {
    display: grid;
    gap: 1.5rem;
}

.wp-block-calcala-related-articles .related-article-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s ease;
}

.wp-block-calcala-related-articles .related-article-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.wp-block-calcala-related-articles .related-article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
}

.wp-block-calcala-related-articles .related-article-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.wp-block-calcala-related-articles .related-article-title:hover {
    color: #3b82f6;
}

.wp-block-calcala-related-articles .related-article-excerpt {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.wp-block-calcala-related-articles .related-article-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #94a3b8;
    font-size: 0.75rem;
}

/* Market Trends Block */
.wp-block-calcala-market-trends {
    margin: 2rem 0;
}

.wp-block-calcala-market-trends .market-trends-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.wp-block-calcala-market-trends .market-trends-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1.5rem;
    text-align: center;
}

.wp-block-calcala-market-trends .trend-item {
    margin-bottom: 2rem;
}

.wp-block-calcala-market-trends .trend-item:last-child {
    margin-bottom: 0;
}

.wp-block-calcala-market-trends .trend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.wp-block-calcala-market-trends .trend-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.wp-block-calcala-market-trends .trend-change {
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
}
:root :where(.wp-block-image.is-style-rounded img,.wp-block-image .is-style-rounded img) {
    border-radius: 0.5rem
}

.wp-block-calcala-market-trends .trend-change.positive {
    background: #dcfce7;
    color: #166534;
}

.wp-block-calcala-market-trends .trend-change.negative {
    background: #fee2e2;
    color: #dc2626;
}

.wp-block-calcala-market-trends .trend-chart {
    height: 200px;
    margin-bottom: 1rem;
}

.wp-block-calcala-market-trends .trend-description {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wp-block-calcala-related-articles .related-articles-container {
        grid-template-columns: 1fr;
    }

    .wp-block-calcala-related-articles .related-article-image {
        height: 150px;
    }

    .wp-block-calcala-market-trends .market-trends-container {
        padding: 1rem;
    }

    .wp-block-calcala-market-trends .trend-chart {
        height: 150px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .wp-block-calcala-related-articles .related-articles-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1025px) {
    .wp-block-calcala-related-articles .related-articles-container {
        grid-template-columns: repeat(3, 1fr);
    }
}