/*
Theme Name: DevBetortiz Astra Child
Theme URI: https://blog.devbetortiz.com.br/
Description: Child theme do Astra para o DevBetortiz.
Author: DevBetortiz
Template: astra
Version: 1.0.0
Text Domain: devbetortiz-astra-child
*/


/* ==========================================================
   DevBetortiz — Related Posts
   ========================================================== */

.db-related-posts {
    max-width: 980px;
    margin: 64px auto 20px;
    padding-top: 40px;
    border-top: 1px solid #292f35;
}

.db-related-heading {
    margin-bottom: 24px;
}

.db-related-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #b7ff3c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
}

.db-related-heading h2 {
    margin: 0;
    color: #f5f7f8;
    font-size: clamp(26px, 4vw, 38px);
}

.db-related-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.db-related-card {
    overflow: hidden;
    background: #101317;
    border: 1px solid #292f35;
    border-radius: 18px;
    transition: transform .2s ease, border-color .2s ease;
}

.db-related-card:hover {
    transform: translateY(-4px);
    border-color: #b7ff3c;
}

.db-related-image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.db-related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.db-related-card:hover .db-related-image img {
    transform: scale(1.04);
}

.db-related-content {
    padding: 20px;
}

.db-related-category {
    display: block;
    margin-bottom: 10px;
    color: #b7ff3c;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.db-related-content h3 {
    margin: 0 0 18px;
    font-size: 18px;
    line-height: 1.35;
}

.db-related-content h3 a {
    color: #f5f7f8;
    text-decoration: none;
}

.db-related-link {
    color: #b7ff3c;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 768px) {
    .db-related-posts {
        margin-top: 42px;
        padding-top: 30px;
    }

    .db-related-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================
   DevBetortiz — Refinamento dos artigos relacionados
   ========================================================== */

.single-post .db-related-card .db-related-content h3 a,
.single-post .db-related-card .db-related-content h3 a:visited {
    color: #f5f7f8;
    text-decoration: none;
}

.single-post .db-related-card .db-related-content h3 a:hover,
.single-post .db-related-card .db-related-content h3 a:focus {
    color: #b7ff3c;
}

.single-post .db-related-card .db-related-link,
.single-post .db-related-card .db-related-link:visited {
    color: #b7ff3c;
    text-decoration: none;
}

.single-post .db-related-card .db-related-link:hover {
    text-decoration: underline;
}

/* Faz 1, 2 ou 3 cards ocuparem melhor o espaço disponível */
.single-post .db-related-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}


/* ==========================================================
   DevBetortiz — Metadados editoriais
   ========================================================== */

.single-post .db-editorial-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    max-width: 780px;
    margin: 14px auto 26px;
    color: #9ba3ad;
    font-size: 13px;
    line-height: 1.5;
}

.single-post .db-editorial-category,
.single-post .db-editorial-category:visited {
    color: #b7ff3c;
    font-weight: 700;
    letter-spacing: .04em;
    text-decoration: none;
}

.single-post .db-editorial-category:hover {
    text-decoration: underline;
}

.single-post .db-editorial-separator {
    color: #59616a;
}

.single-post .db-reading-time {
    color: #9ba3ad;
}


/* ==========================================================
   DevBetortiz — Meta editorial no header
   ========================================================== */

.single-post .entry-meta .db-meta-category,
.single-post .entry-meta .db-meta-category:visited {
    color: #b7ff3c;
    font-weight: 600;
    text-decoration: none;
}

.single-post .entry-meta .db-meta-category:hover {
    text-decoration: underline;
}

.single-post .entry-meta .db-reading-time {
    color: #9ba3ad;
}

.single-post .entry-meta .db-meta-separator {
    color: #66707a;
}

/* Related posts — simplificação do cabeçalho */
.single-post .db-related-eyebrow {
    display: none;
}


/* ==========================================================
   DevBetortiz — Navbar global
   ========================================================== */

:root {
    --db-navbar-bg: #090a0c;
    --db-navbar-border: #292f35;
    --db-navbar-text: #a9adb4;
    --db-navbar-white: #f5f7f8;
    --db-navbar-accent: #b7ff3c;
}

/* Header */
#masthead,
.site-header,
.ast-primary-header-bar {
    background: var(--db-navbar-bg);
}

.ast-primary-header-bar {
    min-height: 92px;
    border-bottom: 1px solid var(--db-navbar-border);
}

/* Container */
.ast-primary-header-bar .site-primary-header-wrap {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Marca */
.db-navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--db-navbar-white);
    text-decoration: none;
}

.db-navbar-brand:hover,
.db-navbar-brand:focus {
    color: var(--db-navbar-white);
}

.db-navbar-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;

    background: var(--db-navbar-accent);
    color: #101216;

    border-radius: 8px 5px 8px 5px;

    font-size: 23px;
    font-weight: 900;
    font-style: italic;
    line-height: 1;

    transform: skew(-5deg);
}

.db-navbar-name {
    color: var(--db-navbar-white);
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

.db-navbar-name span {
    color: var(--db-navbar-accent);
}

/* Menu */
.ast-builder-menu-1 .menu-item > .menu-link {
    color: var(--db-navbar-text);
    font-size: 15px;
    font-weight: 600;
    transition:
        color .2s ease,
        border-color .2s ease,
        background .2s ease;
}

.ast-builder-menu-1 .menu-item > .menu-link:hover,
.ast-builder-menu-1 .current-menu-item > .menu-link {
    color: var(--db-navbar-white);
}

/* CTA — último item */
.ast-builder-menu-1 .main-header-menu > .menu-item:last-child > .menu-link {
    height: 44px;
    margin-left: 14px;
    padding: 0 22px;

    border: 1px solid var(--db-navbar-accent);
    border-radius: 999px;

    color: var(--db-navbar-white);
    background: transparent;
}

.ast-builder-menu-1 .main-header-menu > .menu-item:last-child > .menu-link:hover {
    color: #101216;
    background: var(--db-navbar-accent);
}

/* Mobile */
@media (max-width: 921px) {

    .ast-primary-header-bar {
        min-height: 72px;
    }

    .db-navbar-symbol {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }

    .db-navbar-name {
        font-size: 18px;
    }
}

/* Navbar — correção definitiva do CTA */
.ast-builder-menu-1 .main-header-menu > .menu-item:last-child > .menu-link,
.ast-builder-menu-1 .main-header-menu > .menu-item:last-child > .menu-link:visited {
    color: #f5f7f8 !important;
    background: transparent !important;
    border-color: #b7ff3c;
}

.ast-builder-menu-1 .main-header-menu > .menu-item:last-child > .menu-link:hover,
.ast-builder-menu-1 .main-header-menu > .menu-item:last-child > .menu-link:focus {
    color: #090a0c !important;
    background: #b7ff3c !important;
}
