/* Frontend Styles for Crypto News Block */

.crypto-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
    margin: 30px 0;
}

.crypto-news-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.crypto-news-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.crypto-news-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Card Image */
.crypto-news-card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.crypto-news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.crypto-news-card:hover .crypto-news-card-image img {
    transform: scale(1.05);
}

.crypto-news-card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
}

.placeholder-text {
    color: #999;
    font-size: 0.9rem;
    text-align: center;
}

/* Card Content */
.crypto-news-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Card Title */
.crypto-news-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    line-height: 1.4;
    min-height: 2.8em;
}

.crypto-news-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.crypto-news-card-title a:hover {
    color: #f97316;
}

/* Card Excerpt */
.crypto-news-card-excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Card Meta */
.crypto-news-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 16px 0;
    font-size: 0.85rem;
    color: #999;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

.crypto-news-card-category {
    background-color: #f0f0f0;
    color: #666;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.crypto-news-card-date {
    display: flex;
    align-items: center;
    color: #999;
}

/* Card Footer */
.crypto-news-card-footer {
    margin-top: auto;
    padding-top: 16px;
}

.crypto-news-read-more-btn {
    display: inline-block;
    background-color: #f97316;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid #f97316;
    cursor: pointer;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.crypto-news-read-more-btn:hover {
    background-color: #ea6317;
    border-color: #ea6317;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.crypto-news-read-more-btn:active {
    transform: translateY(0);
}

/* No Posts Message */
.crypto-news-no-posts {
    text-align: center;
    padding: 60px 20px;
    background-color: #f5f5f5;
    border-radius: 12px;
    color: #999;
    font-size: 1.1rem;
}

/* Responsive Design - Tablet */
@media (max-width: 768px) {
    .crypto-news-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
        margin: 20px 0;
    }

    .crypto-news-card-content {
        padding: 20px;
    }

    .crypto-news-card-title {
        font-size: 1.15rem;
        margin-bottom: 10px;
        min-height: 2.3em;
    }

    .crypto-news-card-excerpt {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    .crypto-news-card-image {
        height: 180px;
    }
}

/* Responsive Design - Mobile */
@media (max-width: 600px) {
    .crypto-news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 15px 0;
    }

    .crypto-news-card {
        border-radius: 8px;
    }

    .crypto-news-card-content {
        padding: 16px;
    }

    .crypto-news-card-title {
        font-size: 1.05rem;
        margin-bottom: 8px;
        min-height: auto;
    }

    .crypto-news-card-excerpt {
        font-size: 0.85rem;
        margin-bottom: 10px;
        -webkit-line-clamp: 2;
    }

    .crypto-news-card-image {
        height: 150px;
    }

    .crypto-news-card-meta {
        gap: 8px;
        margin: 12px 0;
        padding-top: 10px;
        font-size: 0.8rem;
    }

    .crypto-news-card-category {
        padding: 3px 8px;
        font-size: 0.7rem;
    }

    .crypto-news-read-more-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* Extra Small Devices */
@media (max-width: 400px) {
    .crypto-news-card-title {
        font-size: 1rem;
    }

    .crypto-news-card-excerpt {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
    }

    .crypto-news-card-meta {
        flex-direction: column;
        gap: 6px;
    }

    .crypto-news-card-footer {
        padding-top: 12px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .crypto-news-card {
        background-color: #2a2a2a;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .crypto-news-card-title a {
        color: #ffffff;
    }

    .crypto-news-card-excerpt {
        color: #ccc;
    }

    .crypto-news-card-meta {
        border-top-color: #3a3a3a;
        color: #999;
    }

    .crypto-news-card-category {
        background-color: #3a3a3a;
        color: #ccc;
    }

    .crypto-news-no-posts {
        background-color: #1a1a1a;
    }
}
