/* ========== GLOBAL RESET & VARIABLES ========== */
:root {
    --primary-orange: #7e00a7;
    --primary-orange-dark: #864c9a;
    --primary-orange-light: #fcf5ff;
    --primary-blue: #7e00a7;
    --primary-blue-dark: #6a0090;
    --bg-white: #ffffff;
    --body-bg-white: linear-gradient(to bottom, #ffffff, #f4d6ff);
    --bg-light: #fcf5ff;
    --text-dark: #37436b;
    --text-gray: #454c63;
    --text-light: #959bac;
    --border-light: rgba(126, 0, 167, 0.2);
    --shadow-sm: 0 2px 8px rgba(126, 0, 167, 0.08);
    --shadow-md: 0 6px 20px rgba(126, 0, 167, 0.12);
    --shadow-lg: 0 12px 36px rgba(126, 0, 167, 0.18);
    --transition: all 0.25s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--body-bg-white);
    font-family: "Inter", sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* ========== BANNER ========== */
.blog-banner {
    position: relative;
    background: linear-gradient(135deg, #864c9a 0%, #7e00a7 50%, #a020d4 100%);
    color: white;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    border-bottom: 1px solid var(--border-light);
}

.blog-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.banner-content {
    position: relative;
    z-index: 2;
    padding: 2rem 1rem;
}

.banner-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 1.2rem;
    border-radius: 40px;
    letter-spacing: 0.3px;
    margin-bottom: 1rem;
}

.banner-content h1 {
    font-family: var(--font);
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 12px;
}

.banner-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    max-width: 520px;
    margin: 0 auto;
}

/* ========== CATEGORY BAR ========== */
.category-bar {
    background: rgba(251, 242, 255, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(126, 0, 167, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
    box-shadow: var(--shadow-sm);
}

.category-inner {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cat-btn {
    background: transparent;
    border-radius: 100px;
    border: 1px solid rgba(126, 0, 167, 0.3);
    color: #b7bfca;
    font-family: "Inter", sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.4rem 1.2rem;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.cat-btn:hover {
    border-color: var(--primary-orange);
    color: var(--primary-orange);
    background: var(--primary-orange-light);
}

.cat-btn.active {
    background: var(--primary-orange);
    border-color: var(--primary-orange);
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
}

/* ========== MAIN CONTAINER WITH INDEPENDENT SCROLLING ========== */
.main-blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    height: calc(100vh - 320px);
    min-height: 600px;
}

.scrollable-row {
    height: 100%;
    display: flex;
    gap: 2rem;
}

/* LEFT SECTION - Independent Scroll */
.left-scrollable {
    flex: 3;
    height: 100%;
    overflow-y: scroll;
    padding-right: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.left-scrollable::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* RIGHT SECTION - Independent Scroll */
.right-scrollable {
    flex: 1;
    height: 100%;
    overflow-y: scroll;
    padding-right: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.right-scrollable {
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    .scrollable-row {
        display: flex;
        flex-direction: column;
    }

    .right-scrollable {
        order: -1;
    }
}

.right-scrollable::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

/* LEFT SIDE: TWO CARDS LAYOUT (GRID) */
.blog-left-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding-bottom: 1rem;
}

/* ========== BLOG CARDS ========== */
.blog-card {
    background: var(--bg-white);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-orange-light);
}

.blog-img-wrap {
    position: relative;
    width: 100%;
    background: #f3f4f6;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.blog-card:hover .blog-img-wrap img {
    transform: scale(1.03);
}

.blog-category-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    border-radius: 40px;
    padding: 0.2rem 0.9rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-orange);
    border: 1px solid var(--border-light);
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: var(--shadow-sm);
}

.blog-content {
    padding: 1.4rem 1.5rem 1.6rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    font-size: 0.75rem;
    color: var(--text-light);
    margin-bottom: 0.6rem;
}

.blog-date {
    color: var(--primary-orange);
    font-weight: 600;
}

.blog-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    transition: color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card:hover .blog-content h3 {
    color: var(--primary-orange);
}

.blog-content p {
    color: var(--text-gray);
    font-size: 0.85rem;
    line-height: 1.55;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-btn {
    align-self: flex-start;
    background: transparent;
    border: 1.5px solid var(--primary-blue);
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.45rem 1.2rem;
    border-radius: 40px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
    cursor: pointer;
    text-decoration: none;
}

.read-btn:hover {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(126, 0, 167, 0.25);
}

.read-btn .arrow {
    transition: transform 0.2s;
}

.read-btn:hover .arrow {
    transform: translateX(4px);
}

/* ========== PAGINATION ========== */

/* Custom Pagination Styles - Purple Theme */
.pagination-nav {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.pagination-custom {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
    align-items: center;
}

.pagination-custom .page-item {
    display: inline-block;
}

.pagination-custom .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #6b21a8; /* Purple text */
    border: 1px solid #e9d5ff;
    box-shadow: 0 2px 4px rgba(107, 33, 168, 0.1);
}

.pagination-custom .page-item.active .page-link {
    background: #7e00a7; /* Purple background */
    color: #ffffff;
    border-color: #7e00a7;
    font-weight: 600;
}

.pagination-custom .page-item:not(.active):not(.disabled) .page-link:hover {
    background: #f3e8ff;
    color: #6b21a8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 33, 168, 0.2);
}

.pagination-custom .page-item.disabled .page-link {
    background: #f8fafc;
    color: #cbd5e1;
    border-color: #e2e8f0;
    cursor: not-allowed;
}

/* Ellipsis styling if needed */
.pagination-custom .page-item.ellipsis .page-link {
    background: transparent;
    border: none;
    box-shadow: none;
    color: #94a3b8;
    cursor: default;
}

/* ========== RIGHT SIDEBAR ========== */
.sidebar-card {
    background: var(--bg-white);
    border-radius: 20px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: 1.4rem 1.2rem;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.sidebar-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-orange-light);
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    border-left: 4px solid var(--primary-orange);
    padding-left: 0.8rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-input {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 60px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    font-family: inherit;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: var(--primary-orange);
    outline: none;
    box-shadow: var(--shadow-sm);
}

.recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-item {
    display: flex;
    gap: 12px;
    margin-bottom: 1rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 14px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.recent-item:hover {
    background: var(--primary-orange-light);
    border-color: #864c9a;
    transform: translateX(3px);
}

.recent-thumb {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    overflow: hidden;
    background: #f3f4f6;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
}

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

.recent-info {
    flex: 1;
}

.recent-post-title {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
}

.recent-item:hover .recent-post-title {
    color: var(--primary-orange);
}

.recent-date {
    font-size: 0.7rem;
    color: var(--text-light);
}

.cat-list-side {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cat-item-side {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0.7rem;
    border-radius: 40px;
    margin-bottom: 0.3rem;
    cursor: pointer;
    transition: 0.2s;
    font-size: 0.85rem;
    color: var(--text-gray);
}

.cat-item-side:hover,
.cat-item-side.active-cat {
    background: var(--primary-orange-light);
    color: var(--primary-orange);
    font-weight: 500;
}

.cat-count-side {
    background: #f3f4f6;
    padding: 0.1rem 0.6rem;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-light);
}

.quick-subscribe-area {
    margin-top: 0.8rem;
}

.nl-input-mini {
    width: 100%;
    border-radius: 60px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    padding: 0.55rem 1rem;
    font-size: 0.8rem;
    margin-bottom: 0.6rem;
}

.nl-btn-mini {
    background: var(--primary-blue);
    border: none;
    padding: 0.5rem;
    width: 100%;
    border-radius: 60px;
    color: white;
    font-weight: 600;
    transition: 0.2s;
}

.nl-btn-mini:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-1px);
}

/* ========== NO RESULTS ========== */
.no-results {
    text-align: center;
    background: white;
    padding: 3rem;
    border-radius: 28px;
    color: var(--text-light);
    border: 1px solid var(--border-light);
    grid-column: span 2;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .main-blog-container {
        height: auto;
        min-height: auto;
        padding: 1.5rem 1rem;
    }

    .scrollable-row {
        flex-direction: column;
        gap: 2rem;
        height: auto;
    }

    .left-scrollable,
    .right-scrollable {
        height: auto;
        max-height: none;
        overflow-y: visible;
    }

    .blog-left-grid {
        grid-template-columns: 1fr;
    }

    .no-results {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .main-blog-container {
        padding: 1rem;
    }

    .blog-img-wrap {
        aspect-ratio: 16 / 9;
    }

    .category-inner {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 0.3rem;
    }

    .cat-btn {
        white-space: nowrap;
    }
}
