/*
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme/
Description: Hello Elementor Child - CTB Digital
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 1.0.2
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
*/

/* ============================================================
   SELECT DROPDOWN - [ctb_artigos_select]
   ============================================================ */
.ctb-select-wrapper {
    max-width: 600px;
    margin: 0 auto;
}
.ctb-article-select {
    width: 100%;
    padding: 14px 40px 14px 16px;
    font-size: 16px;
    color: #333;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 8px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' stroke-width='2' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    cursor: pointer;
    transition: border-color 0.2s;
}
.ctb-article-select:hover { border-color: #999; }
.ctb-article-select:focus {
    outline: none;
    border-color: #1a3a5c;
    box-shadow: 0 0 0 2px rgba(26,58,92,0.15);
}

/* ============================================================
   ARTIGO LAYOUT - [ctb_artigo_content]
   ============================================================ */
.ctb-artigo-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}
.ctb-artigo-main {
    flex: 1;
    min-width: 0;
}
.ctb-artigo-capitulo h2 {
    font-size: 22px;
    font-weight: 700;
    color: #222;
    margin: 0 0 5px;
    line-height: 1.3;
}
.ctb-artigo-capitulo h3 {
    font-size: 16px;
    font-weight: 600;
    color: #444;
    margin: 0 0 15px;
}
.ctb-artigo-subtitulo {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px;
}
.ctb-artigo-texto {
    font-size: 15px;
    line-height: 1.75;
    color: #333;
}
.ctb-artigo-texto p { margin-bottom: 15px; }
.ctb-artigo-texto strong { font-weight: 700; }

/* Sidebar */
.ctb-artigo-sidebar {
    width: 340px;
    flex-shrink: 0;
    background: #f5f5f5;
    border-radius: 10px;
    padding: 25px;
}
.ctb-sidebar-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}
.ctb-sidebar-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.ctb-sidebar-title {
    color: #1a3a5c;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 12px;
}
.ctb-sidebar-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px 15px;
    margin-bottom: 8px;
    transition: background 0.2s, border-color 0.2s;
}
.ctb-sidebar-card:last-child { margin-bottom: 0; }
.ctb-sidebar-card:hover {
    background: #f0f4f8;
    border-color: #1a3a5c;
}
.ctb-sidebar-card a {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    display: block;
}
.ctb-empty {
    font-size: 13px;
    color: #999;
    font-style: italic;
}

/* ============================================================
   COMENTÁRIO / ART COMENTARISTA - [ctb_comentario_content]
   ============================================================ */
.ctb-comentario-wrap {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.ctb-comentario-titulo {
    color: #1a3a5c;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 25px;
    line-height: 1.3;
}
.ctb-comentario-texto {
    font-size: 15px;
    line-height: 1.75;
    color: #333;
    text-align: justify;
}
.ctb-comentario-texto p { margin-bottom: 15px; }
.ctb-comentario-autor {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 14px;
    color: #444;
}
.ctb-comentario-aviso {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 12px;
    color: #888;
    line-height: 1.5;
}
.ctb-comentario-aviso p {
    margin: 0 0 8px;
}
.ctb-comentario-aviso p:last-child { margin: 0; }

/* Botões */
.ctb-comentario-botoes {
    margin-top: 30px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.ctb-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s;
    text-align: center;
}
.ctb-btn-primary {
    background-color: #1a3a5c;
    color: #fff;
}
.ctb-btn-primary:hover {
    background-color: #2a5a8c;
    color: #fff;
}
.ctb-btn-secondary {
    background-color: #333;
    color: #fff;
}
.ctb-btn-secondary:hover {
    background-color: #555;
    color: #fff;
}

/* Botão voltar antigo (compatibilidade) */
.ctb-back-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #1a3a5c;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s;
    font-size: 14px;
}
.ctb-back-button:hover {
    background-color: #2a5a8c;
    color: #fff;
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 768px) {
    .ctb-artigo-layout {
        flex-direction: column;
    }
    .ctb-artigo-sidebar {
        width: 100%;
    }
    .ctb-select-wrapper {
        max-width: 100%;
    }
    .ctb-comentario-wrap {
        padding: 20px;
    }
    .ctb-comentario-titulo {
        font-size: 20px;
    }
    .ctb-comentario-botoes {
        flex-direction: column;
    }
    .ctb-btn {
        width: 100%;
    }
}

/* Card preview comentário (como site antigo) */
.ctb-sidebar-card-preview a {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.ctb-sidebar-card-preview strong {
    font-size: 14px;
    color: #222;
}
.ctb-card-preview {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ctb-card-autor {
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

/* ============================================================
   COMENTARISTAS - [ctb_comentaristas]
   ============================================================ */
.ctb-comentarista-row {
    display: flex;
    gap: 25px;
    align-items: flex-start;
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid #eee;
}
.ctb-comentarista-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.ctb-comentarista-foto {
    width: 180px;
    flex-shrink: 0;
}
.ctb-comentarista-foto img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}
.ctb-comentarista-info {
    flex: 1;
}
.ctb-comentarista-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a3a5c;
    margin: 0 0 12px;
}
.ctb-comentarista-bio {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    text-align: justify;
}
.ctb-comentarista-bio p {
    margin-bottom: 10px;
}
@media (max-width: 768px) {
    .ctb-comentarista-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .ctb-comentarista-foto {
        width: 150px;
    }
    .ctb-comentarista-bio {
        text-align: left;
    }
}

/* ============================================================
   ARTIGOS COMENTADOS - [ctb_artigos_comentados]
   ============================================================ */
.ctb-comentados-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}
.ctb-comentado-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s;
}
.ctb-comentado-card:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}
.ctb-comentado-titulo {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.3;
}
.ctb-comentado-titulo a {
    color: #1a3a5c;
    text-decoration: none;
}
.ctb-comentado-titulo a:hover {
    color: #2a5a8c;
}
.ctb-comentado-preview {
    font-size: 14px;
    line-height: 1.6;
    color: #555;
    flex: 1;
    margin-bottom: 20px;
}
.ctb-comentado-btn {
    display: inline-block;
    padding: 12px 24px;
    background-color: #1a3a5c;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s;
    align-self: flex-start;
}
.ctb-comentado-btn:hover {
    background-color: #2a5a8c;
    color: #fff;
}
.ctb-comentados-load-more {
    text-align: center;
    margin-top: 30px;
}
@media (max-width: 768px) {
    .ctb-comentados-grid {
        grid-template-columns: 1fr;
    }
}
