/**
 * ThBlog - Blog Listing Styles - Gastro Theme
 */

/* ========= Articles Grid ========= */
.thblog-articles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

/* ========= Blog Card ========= */
.thblog-page .thblog-card {
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: none;
}

.thblog-page .thblog-card {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    backface-visibility: hidden;
}

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

/* ========= Card Image ========= */
.thblog-page .thblog-card-image {
    height: 200px;
    overflow: hidden;
}

.thblog-page .thblog-card-image img {
    transition: transform 0.3s ease;
    image-rendering: auto;
    content-visibility: auto;
}

.thblog-page .thblog-card:hover .thblog-card-image img {
    transform: scale(1.05);
}

/* ========= Card Body ========= */
.thblog-page .card-body {
    padding: 16px;
}

/* ========= Card Meta ========= */
.thblog-page .thblog-card-meta {
    font-size: 0.85rem;
    color: #6c757d;
    font-family: 'Inter', sans-serif;
}

.thblog-card-date-inline,
.thblog-card-author-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #6c757d;
}

.thblog-card-comments-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #6c757d;
}

.thblog-card-author-inline svg,
.thblog-card-comments-inline svg {
    color: var(--th-color-main-green, #1EC3A4);
}

.thblog-card-author-inline svg,
.thblog-card-comments-inline svg {
    flex-shrink: 0;
}

.thblog-card-date-inline .material-icons,
.thblog-card-author-inline .material-icons,
.thblog-card-comments-inline .material-icons {
    color: var(--th-color-main-green, #1EC3A4);
}

/* ========= Card Title ========= */
.thblog-page .thblog-card-title {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.thblog-page .thblog-card-title a {
    color: var(--th-color-dark-blue, #00181C);
    text-decoration: none;
    transition: color 0.3s ease;
}

.thblog-page .thblog-card-title a:hover {
    color: var(--th-color-main-green, #1EC3A4);
}

/* ========= Card Excerpt ========= */
.thblog-card-excerpt {
    font-size: 14px;
    color: #9AA8AE;
    line-height: 1.5;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

/* ========= Card Read More ========= */
.thblog-page .thblog-card-readmore {
    padding-top: 12px;
}

.thblog-page .thblog-card-readmore a {
    color: var(--th-color-main-green, #1EC3A4);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.3s;
}

.thblog-page .thblog-card-readmore a .material-icons {
    font-size: 14px;
    line-height: 1;
}

.thblog-page .thblog-card-readmore a:hover {
    color: var(--th-color-dark-blue, #00181C);
}

/* ========= Sidebar ========= */
.thblog-sidebar {
    gap: 20px;
}

.thblog-widget-title {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #777;
    border-bottom: 1px solid var(--th-color-light-grey, #D6D4D4);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.thblog-search-input {
    border: 1px solid var(--th-color-light-grey, #D6D4D4);
    border-radius: 4px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.thblog-search-input button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.thblog-search-input svg {
    flex-shrink: 0;
}

.thblog-search-input input {
    font-family: 'Inter', sans-serif;
    min-width: 0;
    font-size: 13px;
    color: #777;
    padding: 4px 0 !important;
    height: auto !important;
    line-height: 1.3;
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
    background-color: transparent !important;
}

.thblog-search-input input:-webkit-autofill,
.thblog-search-input input:-webkit-autofill:hover,
.thblog-search-input input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: inherit !important;
    background-color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}

.thblog-latest-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.thblog-latest-title {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #777;
    margin: 0;
    line-height: 1.3;
}

.thblog-latest-date {
    font-size: 12px;
    color: #777;
}

.thblog-latest-item:hover .thblog-latest-title {
    color: var(--th-color-main-green, #1EC3A4);
}

.thblog-categories-list li {
    padding: 6px 0;
    border-bottom: 1px solid var(--th-color-light-grey, #D6D4D4);
}

.thblog-categories-list li a {
    color: #777;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: color 0.3s;
}

.thblog-categories-list li a:hover,
.thblog-categories-list li a.active {
    color: var(--th-color-main-green, #1EC3A4);
}

/* ========= Desktop / Mobile visibility ========= */
.thblog-mobile-only {
    display: none;
}

@media (max-width: 991.98px) {
    .thblog-desktop-only {
        display: none;
    }

    .thblog-mobile-only {
        display: block;
    }

    .thblog-sidebar {
        margin-bottom: 24px;
    }
}

/* ========= Categories dropdown (mobile) ========= */
.thblog-categories-dropdown {
    width: 100%;
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #777;
    border: 1px solid var(--th-color-light-grey, #D6D4D4);
    border-radius: 4px;
    background-color: #fff;
    appearance: auto;
    cursor: pointer;
}

.thblog-categories-dropdown:focus {
    outline: none;
    border-color: var(--th-color-main-green, #1EC3A4);
    transition: border-color 0.2s ease;
}

/* ========= Pagination - Gastro Style ========= */
.thblog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 20px 0;
}

.thblog-pagination-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    background-color: #fff;
    border: 1px solid var(--th-color-text-gray, #373435);
    border-radius: 8px;
    color: var(--th-color-main-green, #1EC3A4);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 12px;
    line-height: 1.4;
    transition: all 0.2s ease;
}

.thblog-pagination-btn:hover {
    text-decoration: none;
    color: var(--th-color-main-green, #1EC3A4);
    border-color: var(--th-color-main-green, #1EC3A4);
}

.thblog-pagination-btn--active {
    background-color: var(--th-color-main-green, #1EC3A4);
    color: #fff;
    border-color: var(--th-color-main-green, #1EC3A4);
}

.thblog-pagination-btn--active:hover {
    background-color: var(--th-color-main-green, #1EC3A4);
    color: #fff;
}

.thblog-pagination-btn--disabled {
    color: var(--th-color-text-gray, #373435);
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.4;
}

.thblog-pagination-btn .material-icons {
    font-size: 16px;
}

/* ========= Responsive ========= */
@media (max-width: 991.98px) {
    .thblog-page .thblog-card-image {
        height: 180px;
    }
}

@media (max-width: 767.98px) {
    .thblog-articles-grid {
        grid-template-columns: 1fr;
    }

    .thblog-page .thblog-card-image {
        height: 200px;
    }
}
