/* =========================================
   Tabbed Magazine Section
   Premium category-tabbed posts feed
   ========================================= */

/* ---- Section Wrapper ---- */
.blog-over-tabbed-magazine {
    padding: 48px 0;
}

/* ---- Section Header ---- */
.blog-over-tabbed-magazine-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

/* Tabs Positions */
.blog-over-tabbed-magazine-header.pos-center {
    flex-direction: column;
    align-items: flex-start;
}
.blog-over-tabbed-magazine-header.pos-center .blog-over-tabbed-nav-wrapper {
    align-self: center;
}

.blog-over-tabbed-magazine-header.pos-left {
    flex-direction: column;
    align-items: flex-start;
}
.blog-over-tabbed-magazine-header.pos-left .blog-over-tabbed-nav-wrapper {
    align-self: flex-start;
}

.blog-over-tabbed-magazine-header.pos-right {
    /* Default spacing - title left, tabs right */
    justify-content: space-between;
}

/* Remove margin from heading wrap when in column layout to avoid huge gap */
.blog-over-tabbed-magazine-header.pos-center .blog-over-section-heading-wrap,
.blog-over-tabbed-magazine-header.pos-left .blog-over-section-heading-wrap {
    margin-bottom: 20px; /* Small gap between title and tabs */
}

.blog-over-tabbed-magazine-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--blog-over-heading-color, #1e293b);
    margin: 0;
}

/* ---- Tab Navigation ---- */
.blog-over-tabbed-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 4px;
    background: var(--blog-over-bg-input, #f1f5f9);
    border-radius: 40px;
    flex-wrap: wrap;
    gap: 0;
}

.blog-over-tabbed-nav-item {
    margin: 0;
    padding: 0;
}

.blog-over-tabbed-nav-btn {
    display: inline-block;
    padding: 8px 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--blog-over-text-muted, #64748b);
    background: transparent;
    border: none;
    border-radius: 32px;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    font-family: inherit;
}

.blog-over-tabbed-nav-btn:hover {
    color: var(--blog-over-primary, #3b82f6);
    background: rgba(59, 130, 246, 0.08);
}

.blog-over-tabbed-nav-btn.active {
    background: var(--blog-over-primary, #3b82f6);
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

/* ---- Tab Content Panels ---- */
.blog-over-tabbed-panels {
    position: relative;
}

.blog-over-tabbed-panel {
    display: none;
    animation: blog-over-tab-fade-in 0.35s ease;
}

.blog-over-tabbed-panel.active {
    display: block;
}

@keyframes blog-over-tab-fade-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Posts Grid inside Tab ---- */
.blog-over-tabbed-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* default: 2 cols (cols-2) */
    gap: 16px;
}

/* ── Pro: Column Variants ─────────────────────────────── */
.blog-over-tabbed-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.blog-over-tabbed-grid.cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

/* ── Pro: Card Style — Overlay ───────────────────────── */
.blog-over-tabbed-grid.style-overlay .blog-over-tabbed-card {
    position: relative;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border: none;
}
.blog-over-tabbed-grid.style-overlay .blog-over-tabbed-card-thumb {
    width: 100%;
    height: 160px;
    border-radius: 0;
}
.blog-over-tabbed-grid.style-overlay .blog-over-tabbed-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 14px;
    background: linear-gradient(transparent, rgba(0,0,0,.7));
    color: #fff;
}
.blog-over-tabbed-grid.style-overlay .blog-over-tabbed-card-title a,
.blog-over-tabbed-grid.style-overlay .blog-over-tabbed-card-meta,
.blog-over-tabbed-grid.style-overlay .blog-over-tabbed-card-cat {
    color: #fff !important;
}

/* ── Pro: Card Style — Minimal ───────────────────────── */
.blog-over-tabbed-grid.style-minimal .blog-over-tabbed-card {
    border: none;
    background: transparent;
    padding: 10px 0;
    border-bottom: 1px solid var(--blog-over-border-color, #e2e8f0);
    border-radius: 0;
    box-shadow: none;
}
.blog-over-tabbed-grid.style-minimal .blog-over-tabbed-card:last-child {
    border-bottom: none;
}
.blog-over-tabbed-grid.style-minimal .blog-over-tabbed-card:hover {
    transform: none;
    box-shadow: none;
}

/* ---- Single Post Card in Tab ---- */
.blog-over-tabbed-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border-radius: 10px;
    background: var(--blog-over-bg-card, #fff);
    border: 1px solid var(--blog-over-border-color, #e2e8f0);
    transition: all 0.25s ease;
    text-decoration: none;
}

.blog-over-tabbed-card:hover {
    border-color: var(--blog-over-primary, #3b82f6);
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.10);
    transform: translateY(-3px);
}

.blog-over-tabbed-card-thumb {
    flex-shrink: 0;
    width: 90px;
    height: 72px;
    border-radius: 8px;
    overflow: hidden;
}

.blog-over-tabbed-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
    display: block;
}

.blog-over-tabbed-card:hover .blog-over-tabbed-card-thumb img {
    transform: scale(1.08);
}

/* Placeholder when no image */
.blog-over-tabbed-card-thumb-placeholder {
    width: 90px;
    height: 72px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--blog-over-primary, #3b82f6), var(--blog-over-secondary, #1e40af));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.blog-over-tabbed-card-thumb-placeholder i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.5rem;
}

.blog-over-tabbed-card-content {
    flex-grow: 1;
    min-width: 0;
}

.blog-over-tabbed-card-cat {
    display: inline-block;
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--blog-over-primary, #3b82f6);
    margin-bottom: 5px;
    text-decoration: none;
}

.blog-over-tabbed-card-cat:hover {
    color: var(--blog-over-secondary, #1e40af) !important;
}

.blog-over-tabbed-card-title {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.blog-over-tabbed-card-title a {
    color: var(--blog-over-heading-color, #111827);
    text-decoration: none;
    transition: color 0.2s ease;
}

.blog-over-tabbed-card-title a:hover {
    color: var(--blog-over-primary, #3b82f6);
}

.blog-over-tabbed-card-meta {
    font-size: 0.74rem;
    color: var(--blog-over-text-muted, #9ca3af);
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-over-tabbed-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ---- No Posts State ---- */
.blog-over-tabbed-no-posts {
    text-align: center;
    padding: 40px 20px;
    color: var(--blog-over-text-muted, #9ca3af);
    font-size: 0.9rem;
    grid-column: 1 / -1;
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 768px) {
    .blog-over-tabbed-magazine-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .blog-over-tabbed-nav {
        width: 100%;
    }
}

@media (max-width: 500px) {
    .blog-over-tabbed-magazine {
        padding: 32px 0;
    }

    .blog-over-tabbed-card {
        padding: 12px;
        gap: 12px;
    }

    .blog-over-tabbed-card-thumb,
    .blog-over-tabbed-card-thumb-placeholder {
        width: 72px;
        height: 58px;
    }
}
