/* ========================================
   VARIABLES
======================================== */
/* Root variables are defined globally in style.css */

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
}

/* ========================================
   CATEGORY HERO BANNER
======================================== */

.cat-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #0a0a0a;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* decorative grid lines */
.cat-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(224, 162, 66, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(224, 162, 66, .04) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

/* gold glow orb */
.cat-hero::after {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 240px;
    background: radial-gradient(ellipse, rgba(224, 162, 66, .12) 0%, transparent 70%);
    pointer-events: none;
}


.cat-hero-banner-img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .cat-hero-banner-img {
        max-height: 200px;
    }
}

/* ========================================
   ALL CATEGORIES STRIP (top chips)
======================================== */
.all-cats-strip {
    background: rgba(255, 255, 255, .02);
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.all-cats-container {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

/* Fading overlays for premium horizontal scroll transition */
.all-cats-container::before,
.all-cats-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.all-cats-container::before {
    left: 0;
    background: linear-gradient(to right, #0a0a0a 20%, transparent 100%);
}

.all-cats-container::after {
    right: 0;
    background: linear-gradient(to left, #0a0a0a 20%, transparent 100%);
}

.all-cats-container.has-prev::before {
    opacity: 1;
}

.all-cats-container.has-next::after {
    opacity: 1;
}

.all-cats-inner {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    width: 100%;
}

.all-cats-inner::-webkit-scrollbar {
    display: none;
}

/* Navigation buttons styling */
.all-cats-container .scroll-btn {
    position: absolute;
    top: 47%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    /* border-radius: 50%; */
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    /* border: 1px solid var(--gold-border, rgba(224, 162, 66, 0.4)); */
    color: var(--gold, #e0a242);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.all-cats-container .scroll-btn:hover {
    /* background: var(--gold, #e0a242); */
    /* color: #000; */
    /* border-color: var(--gold, #e0a242); */
    /* transform: translateY(-50%) scale(1.05); */
    /* box-shadow: 0 4px 20px rgba(224, 162, 66, 0.4); */
}

.all-cats-container .scroll-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.all-cats-container .scroll-btn.prev-btn {
    left: 0px;
}

.all-cats-container .scroll-btn.next-btn {
    right: 0px;
}

.all-cats-container .scroll-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    /* color: var(--text-secondary); */
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.all-cats-inner .cat-chip:first-child {
    padding-left: 0;
}

/* Hide scroll-btn and gradients on mobile/tablet views */
@media (max-width: 768px) {
    .all-cats-container .scroll-btn {
        display: none !important;
    }

    .all-cats-container::before,
    .all-cats-container::after {
        display: none !important;
    }
}

.cat-chip i {
    font-size: .75rem;
}

.cat-chip:hover {
    color: var(--gold);
    border-bottom-color: var(--gold-dark);
}

.cat-chip.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    background: var(--gold-glow);
}

/* ========================================
   MAIN LAYOUT
======================================== */


.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 25px;
    align-items: start;
}

/* ========================================
   TOOLBAR (sort / filter / view toggle)
======================================== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.toolbar-label {
    /* font-size: .78rem;
    color: var(--text-muted); */
    font-weight: 500;
}

.toolbar-label strong {
    color: var(--gold);
}

.sort-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--bg-card);
    border: 1px solid var(--border-mid);
    border-radius: var(--radius);
    padding: 7px 32px 7px 12px;
    font-size: .78rem;
    color: var(--text-secondary);
    cursor: pointer;
    outline: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23e0a242'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: var(--transition);
}

.sort-select:focus {
    border-color: var(--gold-border);
}

.view-toggle {
    display: flex;
    gap: 4px;
}

.view-btn {
    width: 34px;
    height: 34px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.view-btn.active,
.view-btn:hover {
    border-color: var(--gold-border);
    color: var(--gold);
    background: var(--gold-glow);
}

/* ========================================
   FEATURED POST (pinned top)
======================================== */
.featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 32px;
    background: var(--bg-card);
    transition: var(--transition);
    position: relative;
}

/* .featured-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-dark));
    z-index: 1;
} */

.featured-post:hover {
    border-color: var(--gold-border);
    box-shadow: 0 8px 40px rgba(224, 162, 66, .08);
}

.featured-thumb {
    position: relative;
    overflow: hidden;
    min-height: 280px;
}

.featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.featured-post:hover .featured-thumb img {
    transform: scale(1.04);
}

.featured-thumb-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 60%, rgba(17, 17, 17, .8) 100%);
    pointer-events: none;
}

.featured-content {
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.featured-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .7rem;
    font-weight: 700;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: .07em;
    line-height: 1;
}

.featured-cat .cat-thumb {
    width: 20px;
    height: 20px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.featured-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.35;
    transition: var(--transition);
}

.featured-post:hover .featured-title {
    color: var(--gold);
}

.featured-excerpt {
    /* font-size: .84rem; */
    color: rgba(255, 255, 255, .7);
    font-size: 14px;
    line-height: 1.75;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.featured-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    /* font-size: .74rem;
    color: var(--text-muted); */
    color: rgba(255, 255, 255, .7);
}

.featured-meta-item i {
    color: var(--gold);
    font-size: .72rem;
}

.featured-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: #000;
    font-size: .78rem;
    font-weight: 700;
    border-radius: var(--radius);
    letter-spacing: .03em;
    text-transform: uppercase;
    transition: var(--transition);
    align-self: flex-start;
}

.featured-read-more:hover {
    opacity: .88;
    transform: translateY(-2px);
}

/* ========================================
   POST GRID — card view
======================================== */
/* --- POST CARD (GRID & LIST VIEW) (Moved to style.css) --- */

/* ========== LIST VIEW featured-post override ========== */
.featured-post.list-view {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.featured-post.list-view .featured-thumb {
    width: 220px;
    min-height: unset;
    flex-shrink: 0;
    border-radius: 0;
}

.featured-post.list-view .featured-thumb-overlay {
    background: linear-gradient(90deg, transparent 60%, rgba(17, 17, 17, .8) 100%);
}

.featured-post.list-view .featured-content {
    padding: 20px 22px;
}

@media (max-width: 768px) {
    .featured-post.list-view {
        flex-direction: column;
    }

    .featured-post.list-view .featured-thumb {
        width: 100%;
        min-height: 200px;
    }

    .featured-post.list-view .featured-thumb-overlay {
        background: linear-gradient(to top, rgba(17, 17, 17, .8) 0%, transparent 60%);
    }

    .featured-post.list-view .featured-content {
        padding: 22px 20px;
    }
}



/* ========================================
   SIDEBAR (Moved to style.css)
======================================== */


/* ========================================
   ANIMATIONS
======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeInUp .4s ease both;
}

.post-card:nth-child(1) {
    animation-delay: .04s;
}

.post-card:nth-child(2) {
    animation-delay: .08s;
}

.post-card:nth-child(3) {
    animation-delay: .12s;
}

.post-card:nth-child(4) {
    animation-delay: .16s;
}

.post-card:nth-child(5) {
    animation-delay: .20s;
}

.post-card:nth-child(6) {
    animation-delay: .24s;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr 270px;
        gap: 28px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .posts-grid.list-view .post-card {
        flex-direction: row;
    }

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

    .featured-thumb {
        min-height: 220px;
    }

    .featured-thumb-overlay {
        background: linear-gradient(to top, rgba(17, 17, 17, .8) 0%, transparent 60%);
    }
}

@media (max-width: 992px) {
    .view-toggle {
        display: none;
    }
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .toolbar-label {
        display: block;
        width: 100%;
    }

    .sidebar {
        position: static;
    }

    .cat-hero-stats {
        gap: 16px;
    }

    .stat-box {
        padding: 12px 14px;
        min-width: 72px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .page-wrapper {
        padding: 25px 0px 25px;
    }

    .breadcrumb-inner {
        padding: 0 16px;
    }

    .all-cats-inner {
        padding: 0 16px;
    }

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

    .featured-content {
        padding: 22px 20px;
    }

    .featured-thumb {
        min-height: 200px;
    }

    .posts-grid.list-view .post-card {
        flex-direction: column;
    }

    .posts-grid.list-view .post-card-thumb {
        width: 100%;
        aspect-ratio: 16/9;
    }

    .toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .featured-title {
        font-size: 18px;
    }
}

@media (max-width: 480px) {


    .cat-hero-stats {
        display: none;
    }

    .cat-hero-title {
        font-size: 1.7rem;
    }

    .posts-grid {
        gap: 14px;
    }
}


@media (max-width: 380px) {
    .search-input-wrap {
        width: 100%;
    }
}
