/*
Theme Name: D3Blog
Theme URI: https://d3ecom.com.br
Description: Blog editorial D3ECOM
Version: 2.1
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── RESET ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: #F5F4F2 !important; }
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    font-size: 16px;
    line-height: 1.6;
    background: #F5F4F2 !important;
    color: #1a1a1a !important;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ─── WRAPPER ────────────────────────────────────────────── */
.d3blog-wrapper { min-height: 100vh; display: flex; flex-direction: column; background: #F5F4F2; }

/* ─── HEADER ─────────────────────────────────────────────── */
.d3blog-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 0 40px;
    height: 64px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.d3blog-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}
.d3blog-logo-img {
    height: 32px;
    width: auto;
    display: block;
}

.d3blog-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    overflow-x: auto;
}
.d3blog-nav::-webkit-scrollbar { display: none; }
.d3blog-nav a {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    color: #555;
    white-space: nowrap;
    transition: all .2s;
}
.d3blog-nav a:hover { color: #1a1a1a; background: #f4f4f4; }
.d3blog-nav a.active { color: #1a1a1a; font-weight: 600; }

.d3blog-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.d3blog-search-btn {
    width: 36px; height: 36px;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23444' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") center/18px no-repeat;
    border: 1.5px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all .2s;
}
.d3blog-search-btn:hover {
    background-color: #F2B705;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    border-color: #F2B705;
}

.d3blog-cta-btn {
    background: #1a1a1a;
    color: #fff;
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s;
    white-space: nowrap;
    display: inline-block;
}
.d3blog-cta-btn:hover { background: #F2B705; color: #000; }

/* search overlay */
.d3blog-search-overlay { background: rgba(0,0,0,0.5); }
.d3blog-search-overlay form {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    width: 90%;
    max-width: 560px;
    display: flex;
    gap: 12px;
    align-items: center;
}
.d3blog-search-overlay input[type="search"] {
    flex: 1;
    border: none;
    outline: none;
    font-size: 18px;
    font-family: inherit;
    color: #1a1a1a;
}
.d3blog-search-overlay button[type="submit"] {
    background: #1a1a1a;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 100px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: all .2s;
}
.d3blog-search-overlay button[type="submit"]:hover { background: #F2B705; color: #000; }

/* ─── HERO ───────────────────────────────────────────────── */
.d3blog-hero {
    background: #fff;
    padding: 72px 40px 60px;
    text-align: center;
    border-bottom: 1px solid #eee;
}
.d3blog-hero h1 {
    font-size: clamp(30px, 5vw, 48px);
    font-weight: 800;
    line-height: 1.15;
    color: #1a1a1a;
    max-width: 700px;
    margin: 0 auto 16px;
    letter-spacing: -0.5px;
}
.d3blog-hero h1 .accent { color: #F2B705; }
.d3blog-hero p {
    font-size: 16px;
    color: #666;
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ─── CATEGORY PILLS ─────────────────────────────────────── */
.d3blog-cats {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 40px;
    background: #fff;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
}
.d3blog-cats::-webkit-scrollbar { display: none; }
.d3blog-cat-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border: 1.5px solid #e8e8e8;
    color: #555;
    background: transparent;
    transition: all .2s;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.d3blog-cat-pill:hover { border-color: #1a1a1a; color: #1a1a1a; }
.d3blog-cat-pill.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

/* ─── MAIN LAYOUT ────────────────────────────────────────── */
.d3blog-main {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 40px 60px;
    width: 100%;
}
.d3blog-content { min-width: 0; }

/* ─── CARD GRID ──────────────────────────────────────────── */
.d3blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.d3blog-card {
    background: #fff;
    border: 1.5px solid #eee;
    border-radius: 16px;
    overflow: hidden;
    transition: all .2s;
    display: flex;
    flex-direction: column;
}
.d3blog-card:hover {
    border-color: #1a1a1a;
    box-shadow: 0 8px 32px rgba(0,0,0,0.10);
    transform: translateY(-3px);
}

.d3blog-card-img-wrap {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f4f4f4;
}
.d3blog-card-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.d3blog-card:hover .d3blog-card-img-wrap img { transform: scale(1.05); }

.d3blog-card-badge {
    position: absolute;
    top: 12px; left: 12px;
    background: #F2B705;
    color: #000;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 10px;
    border-radius: 100px;
}
.d3blog-card-time {
    position: absolute;
    bottom: 12px; right: 12px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.d3blog-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.d3blog-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.35;
    transition: color .2s;
    display: block;
}
.d3blog-card-title:hover { color: #F2B705; }
.d3blog-card-meta { font-size: 12px; color: #999; font-weight: 500; }
.d3blog-card-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* ─── SIDEBAR ────────────────────────────────────────────── */
.d3blog-sidebar { display: flex; flex-direction: column; gap: 28px; }

.d3blog-widget-title {
    font-size: 11px;
    font-weight: 800;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding-bottom: 12px;
    border-bottom: 2px solid #F2B705;
    margin-bottom: 16px;
    display: block;
}

.d3blog-about-widget {
    background: #fff;
    border: 1.5px solid #eee;
    border-radius: 16px;
    padding: 22px;
}
.d3blog-about-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.d3blog-about-avatar {
    width: 44px; height: 44px;
    background: #F2B705;
    color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}
.d3blog-about-name { font-weight: 700; font-size: 14px; color: #1a1a1a; }
.d3blog-about-role { font-size: 12px; color: #999; font-weight: 500; }
.d3blog-about-bio { font-size: 13px; color: #666; line-height: 1.6; margin-bottom: 16px; }
.d3blog-social-links { display: flex; gap: 8px; }
.d3blog-social-link {
    width: 32px; height: 32px;
    background: #f4f4f4;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all .2s;
}
.d3blog-social-link:hover { background: #F2B705; color: #000; }

.d3blog-featured-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    display: block;
    border: 1.5px solid #eee;
}
.d3blog-featured-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.d3blog-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    gap: 4px;
}
.d3blog-featured-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
}
.d3blog-featured-meta { font-size: 11px; color: rgba(255,255,255,0.6); }

.d3blog-recent-list { display: flex; flex-direction: column; gap: 14px; }
.d3blog-recent-item { display: flex; gap: 12px; align-items: flex-start; }
.d3blog-recent-img {
    width: 60px; height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f4f4f4;
}
.d3blog-recent-title {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .2s;
}
.d3blog-recent-title:hover { color: #F2B705; }
.d3blog-recent-date { font-size: 11px; color: #999; margin-top: 4px; }

.d3blog-sidebar-cta {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    color: #fff;
}
.d3blog-sidebar-cta p:first-child {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
}
.d3blog-sidebar-cta p:last-of-type {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    margin-bottom: 16px;
    line-height: 1.5;
}
.d3blog-sidebar-cta a {
    display: inline-block;
    background: #F2B705;
    color: #000;
    padding: 10px 22px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    transition: all .2s;
}
.d3blog-sidebar-cta a:hover { background: #E5A800; }

/* ─── SINGLE POST ────────────────────────────────────────── */
.d3blog-single-hero {
    position: relative;
    min-height: 460px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    background: #222;
}
.d3blog-single-hero img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
}
.d3blog-single-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 60px 40px 48px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
}
.d3blog-single-overlay > * {
    max-width: 820px;
}
.d3blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.55);
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.d3blog-breadcrumb a { color: rgba(255,255,255,0.55); transition: color .2s; }
.d3blog-breadcrumb a:hover { color: #F2B705; }

.d3blog-single-title {
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}
.d3blog-single-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.d3blog-single-cat {
    background: #F2B705;
    color: #000;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 12px;
    border-radius: 100px;
}

.d3blog-single-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 40px 60px;
    width: 100%;
}
.d3blog-single-content {
    min-width: 0;
    background: #fff;
    border-radius: 16px;
    padding: 36px 40px;
    border: 1.5px solid #eee;
}

.d3blog-read-time {
    float: right;
    margin: 0 0 16px 24px;
    width: 64px; height: 64px;
    background: #F2B705;
    color: #000;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
}

.d3blog-post-meta-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #888;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.d3blog-post-content {
    font-size: 17px;
    line-height: 1.8;
    color: #2a2a2a;
}
.d3blog-post-content h2 {
    font-size: 26px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 36px 0 14px;
    line-height: 1.3;
}
.d3blog-post-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 28px 0 10px;
}
.d3blog-post-content p { margin-bottom: 20px; }
.d3blog-post-content ul,
.d3blog-post-content ol { margin: 0 0 20px 24px; }
.d3blog-post-content li { margin-bottom: 8px; }
.d3blog-post-content strong { color: #1a1a1a; font-weight: 700; }
.d3blog-post-content a { color: #F2B705; text-underline-offset: 3px; }
.d3blog-post-content a:hover { color: #E5A800; }
.d3blog-post-content blockquote {
    border-left: 3px solid #F2B705;
    padding: 12px 20px;
    background: #fffbf0;
    border-radius: 0 8px 8px 0;
    margin: 24px 0;
    color: #555;
    font-style: italic;
}
.d3blog-post-content img { border-radius: 12px; margin: 24px 0; }

/* post tags */
.d3blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid #eee;
}
.d3blog-post-tag {
    padding: 5px 14px;
    background: #f4f4f4;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    transition: all .2s;
}
.d3blog-post-tag:hover { background: #F2B705; color: #000; }

/* post navigation */
.d3blog-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #eee;
}
.d3blog-post-nav a {
    padding: 20px;
    border: 1.5px solid #eee;
    border-radius: 14px;
    display: block;
    transition: border-color .2s;
    background: #fff;
}
.d3blog-post-nav a:hover { border-color: #1a1a1a; }
.d3blog-post-nav .nav-label {
    font-size: 11px;
    color: #999;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.d3blog-post-nav .nav-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}

/* ─── FOOTER ─────────────────────────────────────────────── */
.d3blog-footer {
    background: #fff;
    border-top: 1px solid #eee;
    padding: 24px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #888;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: auto;
}
.d3blog-footer a { color: #888; transition: color .2s; }
.d3blog-footer a:hover { color: #1a1a1a; }

/* ─── PAGINATION ─────────────────────────────────────────── */
.page-numbers { display: inline-flex; align-items: center; gap: 6px; }
.page-numbers li { list-style: none; }
.page-numbers a,
.page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    border-radius: 100px;
    border: 1.5px solid #e8e8e8;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #444;
    padding: 0 14px;
    transition: all .2s;
}
.page-numbers .current { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.page-numbers a:hover { background: #f4f4f4; }

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 960px) {
    .d3blog-main,
    .d3blog-single-body { grid-template-columns: 1fr; }
    .d3blog-sidebar { display: none; }
}
@media (max-width: 640px) {
    .d3blog-header { padding: 0 20px; gap: 16px; }
    .d3blog-nav { display: none; }
    .d3blog-hero { padding: 48px 20px 40px; }
    .d3blog-cats { padding: 14px 20px; }
    .d3blog-main,
    .d3blog-single-body { padding: 16px 16px 40px; }
    .d3blog-single-content { padding: 24px 20px; border-radius: 12px; }
    .d3blog-single-overlay { padding: 36px 20px 28px; }
    .d3blog-grid { grid-template-columns: 1fr; }
    .d3blog-footer { flex-direction: column; text-align: center; }
    .d3blog-post-content { padding: 0; }
}
