/**
 * PT Blog Styles
 * BEM naming convention
 */

/* ==========================================================================
   BLOG LIST (home.php)
   ========================================================================== */

.pt-blog-list {
    padding: 40px 0;
}

.pt-blog-list__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.pt-blog-list__header {
    text-align: center;
    margin-bottom: 40px;
}

.pt-blog-list__title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
}

.pt-blog-list__description {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Grid */
.pt-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .pt-blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .pt-blog-grid {
        grid-template-columns: 1fr;
    }
}

/* Card */
.pt-blog-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
}

.pt-blog-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.pt-blog-card__image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.pt-blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pt-blog-card:hover .pt-blog-card__image img {
    transform: scale(1.05);
}

.pt-blog-card__content {
    padding: 20px;
}

.pt-blog-card__title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
}

.pt-blog-card__title a {
    color: #333;
    text-decoration: none;
}

.pt-blog-card__title a:hover {
    color: #0066cc;
}

.pt-blog-card__excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.pt-blog-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pt-blog-card__date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #999;
}

.pt-blog-card__date svg {
    opacity: 0.7;
}

.pt-blog-card__button {
    display: inline-block;
    padding: 8px 16px;
    background: #0066cc;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.pt-blog-card__button:hover {
    background: #0052a3;
    color: #fff;
}

/* Pagination */
.pt-blog-pagination {
    margin-top: 40px;
    text-align: center;
}

.pt-blog-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pt-blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ddd;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
}

.pt-blog-pagination .page-numbers.current,
.pt-blog-pagination .page-numbers:hover {
    background: #0066cc;
    border-color: #0066cc;
    color: #fff;
}

/* ==========================================================================
   BLOG SINGLE (single.php)
   ========================================================================== */

.pt-blog-single {
    padding: 40px 0;
}

.pt-blog-single__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.pt-blog-single__wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

@media (max-width: 992px) {
    .pt-blog-single__wrapper {
        grid-template-columns: 1fr;
    }
}

/* Content */
.pt-blog-content {
    min-width: 0;
}

.pt-blog-content__meta {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.pt-blog-content__category {
    display: inline-block;
    padding: 4px 12px;
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
}

.pt-blog-content__category:hover {
    background: #e0e0e0;
}

.pt-blog-content__image {
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.pt-blog-content__image img {
    width: 100%;
    height: auto;
}

.pt-blog-content__date {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #999;
    margin-bottom: 15px;
}

.pt-blog-content__title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 20px;
}

.pt-blog-content__body {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

.pt-blog-content__body p {
    margin-bottom: 20px;
}

.pt-blog-content__body h2,
.pt-blog-content__body h3 {
    margin: 30px 0 15px;
}

/* Related Posts */
.pt-blog-related {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.pt-blog-related__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 576px) {
    .pt-blog-related__grid {
        grid-template-columns: 1fr;
    }
}

.pt-blog-related__card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.pt-blog-related__image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.pt-blog-related__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pt-blog-related__content {
    padding: 15px;
}

.pt-blog-related__title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
}

.pt-blog-related__title a {
    color: #333;
    text-decoration: none;
}

.pt-blog-related__excerpt {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.pt-blog-related__button {
    display: inline-block;
    padding: 6px 14px;
    background: #0066cc;
    color: #fff;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
}

/* Sidebar */
.pt-blog-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.pt-blog-sidebar__search {
    display: flex;
    margin-bottom: 25px;
}

.pt-blog-sidebar__input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

.pt-blog-sidebar__input:focus {
    outline: none;
    border-color: #0066cc;
}

.pt-blog-sidebar__search-btn {
    padding: 0 14px;
    background: #fff;
    border: 1px solid #ddd;
    border-left: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.pt-blog-sidebar__section {
    margin-bottom: 25px;
}

.pt-blog-sidebar__heading {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0066cc;
}

.pt-blog-sidebar__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pt-blog-sidebar__item {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.pt-blog-sidebar__item:last-child {
    border-bottom: none;
}

.pt-blog-sidebar__item a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.pt-blog-sidebar__item a:hover {
    color: #0066cc;
}
