/* ============================================
   Blog Page - Specific Styles
   Extends new-top-style.css
   ============================================ */

/* Active nav */
.blog-nav-active {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
}

/* ===== Hero ===== */
.blog-hero {
    padding: 160px 0 50px;
    text-align: center;
    background: linear-gradient(180deg, #f0f9ff 0%, #f9fafb 100%);
}

.blog-hero__label {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.blog-hero__title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
}

/* ===== Layout ===== */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    padding: 50px 0 80px;
}

/* ===== Post Cards ===== */
.blog-posts {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.post-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f3f4f6;
    display: grid;
    grid-template-columns: 280px 1fr;
    transition: all 0.3s;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.post-card__image-link {
    display: block;
    overflow: hidden;
}

.post-card__image {
    width: 100%;
    height: 100%;
    min-height: 180px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.post-card__no-image {
    font-size: 0.85rem;
    color: var(--text-light);
}

.post-card__content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-card__category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.06);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    align-self: flex-start;
    transition: background 0.3s;
}

.post-card__category:hover {
    background: rgba(37, 99, 235, 0.12);
}

.post-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 8px;
}

.post-card__title a {
    color: var(--text-color);
    transition: color 0.3s;
}

.post-card__title a:hover {
    color: var(--primary-color);
}

.post-card__date {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ===== Pagination ===== */
.blog-pagination {
    margin-top: 30px;
}

.blog-pagination ul {
    display: flex;
    justify-content: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-pagination li {
    list-style: none;
}

.blog-pagination li::before {
    content: none !important;
    display: none !important;
}

.blog-pagination a,
.blog-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    background: var(--white);
    border: 1px solid #f3f4f6;
    color: var(--text-light);
    transition: all 0.3s;
}

.blog-pagination a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.blog-pagination .current {
    background: var(--primary-color);
    color: white !important;
    border-color: var(--primary-color);
}

.blog-pagination .prev,
.blog-pagination .next {
    width: auto;
    padding: 0 15px;
}

.blog-pagination .dots {
    border: none;
    background: none;
}

/* ===== Sidebar ===== */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.sidebar__widget {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #f3f4f6;
}

.sidebar__title {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: var(--font-heading);
    color: var(--text-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* YouTube Widget */
.sidebar__video-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #000;
}

.sidebar__video-wrap iframe {
    width: 100%;
    height: 100%;
}

.sidebar__video-caption {
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 5px;
}

/* CTA Widget */
.sidebar__cta {
    background: var(--primary-gradient);
    border-radius: 16px;
    padding: 30px 25px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
}

.sidebar__cta-title {
    color: white;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.5;
}

.sidebar__cta-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    margin-bottom: 18px;
    line-height: 1.6;
}

.sidebar__cta-btn {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.sidebar__cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Recommended Posts */
.sidebar__post-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar__post-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: opacity 0.3s;
}

.sidebar__post-item:hover {
    opacity: 0.8;
}

.sidebar__post-thumb {
    width: 70px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
}

.sidebar__post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar__post-title {
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-color);
}

/* Categories */
.sidebar__category-list {
    display: flex;
    flex-direction: column;
}

.sidebar__category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: color 0.3s;
}

.sidebar__category-item:last-child {
    border-bottom: none;
}

.sidebar__category-item:hover {
    color: var(--primary-color);
}

.sidebar__category-count {
    font-size: 0.75rem;
    background: var(--bg-gray);
    padding: 2px 8px;
    border-radius: 10px;
    color: var(--text-light);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .post-card {
        grid-template-columns: 1fr;
    }

    .post-card__image {
        height: 200px;
        min-height: auto;
    }
}
