/* ============================================
   Developer Post Box with Tabs - Styles
   ============================================ */

/* Reset & Base */
.dpbt-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
}

.dpbt-wrapper *,
.dpbt-wrapper *::before,
.dpbt-wrapper *::after {
    box-sizing: border-box;
}

/* ---- TABS NAVIGATION ---- */
.dpbt-tabs-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.dpbt-tab-link {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.25s ease;
    margin-bottom: -2px;
    white-space: nowrap;
}

.dpbt-tab-link:hover {
    color: #00bcd4;
}

.dpbt-tab-link.active {
    color: #00bcd4;
    border-bottom-color: #00bcd4;
}

/* ---- LOADING SPINNER ---- */
.dpbt-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.dpbt-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e5e7eb;
    border-top-color: #00bcd4;
    border-radius: 50%;
    animation: dpbt-spin 0.7s linear infinite;
}

@keyframes dpbt-spin {
    to { transform: rotate(360deg); }
}

/* ---- BOXES ROW (Two Boxes Side by Side) ---- */
.dpbt-boxes-row {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
    align-items: start;
}

/* ---- BOX BASE ---- */
.dpbt-box {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

/* ---- BOX 1: Featured + Sidebar ---- */
.dpbt-box-1 {
    padding: 20px;
}

.dpbt-box1-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* Featured Column */
.dpbt-featured-col {
    display: flex;
    flex-direction: column;
}

.dpbt-featured-article {
    display: flex;
    flex-direction: column;
}

.dpbt-featured-img-link {
    display: block;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 14px;
}

.dpbt-featured-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.dpbt-featured-img-link:hover .dpbt-featured-img {
    transform: scale(1.03);
}

.dpbt-featured-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px;
}

.dpbt-featured-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s;
}

.dpbt-featured-title a:hover {
    color: #00bcd4;
}

.dpbt-featured-excerpt {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 14px;
}

.dpbt-featured-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #9ca3af;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f3f4f6;
}

.dpbt-featured-link a {
    color: #00bcd4;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
}

.dpbt-featured-link a:hover {
    text-decoration: underline;
}

.dpbt-featured-date {
    color: #9ca3af;
}

.dpbt-featured-shares {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #9ca3af;
}

.dpbt-featured-shares svg {
    flex-shrink: 0;
}

/* Sidebar Column */
.dpbt-sidebar-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dpbt-sidebar-article {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.dpbt-sidebar-img-link {
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    display: block;
    width: 100px;
    height: 70px;
}

.dpbt-sidebar-img {
    width: 100px;
    height: 70px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.dpbt-sidebar-img-link:hover .dpbt-sidebar-img {
    transform: scale(1.05);
}

.dpbt-sidebar-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dpbt-sidebar-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 4px;
}

.dpbt-sidebar-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s;
}

.dpbt-sidebar-title a:hover {
    color: #00bcd4;
}

.dpbt-sidebar-date {
    font-size: 12px;
    color: #9ca3af;
}

/* ---- BOX 2: Side Reads ---- */
.dpbt-box-2 {
    padding: 20px;
}

.dpbt-box2-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.dpbt-box2-posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dpbt-box2-article {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.dpbt-box2-img-link {
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
    display: block;
    width: 110px;
    height: 75px;
}

.dpbt-box2-img {
    width: 110px;
    height: 75px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.dpbt-box2-img-link:hover .dpbt-box2-img {
    transform: scale(1.05);
}

.dpbt-box2-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.dpbt-box2-post-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 6px;
}

.dpbt-box2-post-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s;
}

.dpbt-box2-post-title a:hover {
    color: #00bcd4;
}

.dpbt-box2-date {
    font-size: 12px;
    color: #9ca3af;
}

/* ---- PLACEHOLDERS ---- */
.dpbt-placeholder-img {
    width: 100%;
    height: 220px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
    border-radius: 6px;
}

.dpbt-placeholder-thumb {
    width: 100%;
    height: 100%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 11px;
}

.dpbt-no-posts {
    color: #9ca3af;
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .dpbt-boxes-row {
        grid-template-columns: 1fr 280px;
        gap: 16px;
    }

    .dpbt-sidebar-img-link,
    .dpbt-sidebar-img {
        width: 85px;
        height: 60px;
    }
}

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

    .dpbt-box1-inner {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .dpbt-tab-link {
        padding: 8px 14px;
        font-size: 14px;
    }

    .dpbt-featured-img {
        height: 180px;
    }

    .dpbt-sidebar-article {
        flex-direction: row;
    }

    .dpbt-sidebar-img-link,
    .dpbt-sidebar-img {
        width: 100px;
        height: 70px;
    }
}

@media (max-width: 480px) {
    .dpbt-tabs-nav {
        gap: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .dpbt-tabs-nav::-webkit-scrollbar {
        display: none;
    }

    .dpbt-tab-link {
        padding: 8px 12px;
        font-size: 13px;
    }

    .dpbt-featured-meta {
        gap: 10px;
    }

    .dpbt-box2-img-link,
    .dpbt-box2-img {
        width: 90px;
        height: 65px;
    }
}
