/* Main Wrapper */
.hm-news-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    font-family: inherit;
}

/* Filters */
.hm-news-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.hm-news-search {
    flex: 0 1 300px;
    max-width: 300px;
}

.hm-news-search input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    height: 42px;
}

.hm-news-filter-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hm-news-filter-select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    min-width: 140px;
    height: 42px;
    box-sizing: border-box;
}

/* Grid */
.hm-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* Card */
.hm-news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
    height: 100%;
}

.hm-news-card:hover {
    transform: translateY(-5px);
}

.hm-news-card-image {
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    overflow: hidden;
    position: relative;
}

.hm-news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hm-news-post-type-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--hm-accent-color);
    color: #fff;
    font-size: 0.75em;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hm-news-date {
    font-size: 0.85em;
    color: #666;
    margin: 15px 15px 5px;
    text-align: left;
}

.hm-news-title {
    margin: 5px 15px;
    font-size: 1.25em;
    line-height: 1.4;
}

.hm-news-title a {
    text-decoration: none;
    color: var(--hm-accent-color);
    transition: opacity 0.2s;
}

.hm-news-accent-text {
    color: var(--hm-accent-color) !important;
}

.hm-news-title a:hover {
    opacity: 0.8;
}

.hm-news-subheading {
    margin: 5px 15px 10px;
    font-size: 1.05em;
    font-weight: normal;
    color: #000000;
    line-height: 1.3;
}

/* Source line for external news */
.hm-news-source {
    margin: 10px 15px;
    font-size: 0.85em;
    color: #666;
}

.hm-news-source a {
    color: var(--hm-accent-color);
    text-decoration: none;
}

.hm-news-source a:hover {
    text-decoration: underline;
}

.hm-news-excerpt {
    padding: 0 15px;
    font-size: 0.95em;
    color: #444;
    flex-grow: 1;
    margin-bottom: 15px;
}

/* Footer (Tags & Button) */
.hm-news-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 15px;
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
}

.hm-news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    max-width: 65%;
}

.hm-news-card-tag {
    background: #f0f0f0;
    color: #666;
    font-size: 0.75em;
    padding: 3px 8px;
    border-radius: 12px;
}

.hm-news-read-more {
    display: inline-block;
    padding: 8px 16px;
    background-color: var(--hm-accent-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 600;
    transition: opacity 0.2s;
}

.hm-news-read-more:hover {
    opacity: 0.9;
    color: #fff;
}

/* Footer right section for external news */
.hm-news-footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

/* External link notice */
.hm-news-external-notice {
    font-size: 0.7em;
    color: #888;
    display: flex;
    align-items: center;
    gap: 3px;
}

.hm-news-external-notice::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* External card styling */
.hm-news-card-external {
    position: relative;
}

/* Pagination */
.hm-news-pagination {
    margin-top: 40px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.hm-news-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s;
}

.hm-news-pagination .page-numbers.current,
.hm-news-pagination .page-numbers:hover {
    background-color: var(--hm-accent-color);
    color: #fff;
    border-color: var(--hm-accent-color);
}