/**
 * Fragmentos Developer - Estilos extras para WordPress
 * Complementa o style.css do Intense/Fragmentos.
 * Inclui: sidebar, paginação, post-side, blog-article, comments, person, dividers.
 */

/* ============================================================
   Sidebar
   ============================================================ */
.sidebar .widget {
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 1px solid #e8e8e8;
}

.sidebar .widget:last-child {
    border-bottom: none;
}

.sidebar .list li a {
    color: #333;
    transition: color 0.3s;
}

.sidebar .list li a:hover {
    color: #27a9e6;
}

.sidebar .form-search {
    position: relative;
}

.sidebar .form-search .form-search-submit {
    position: absolute;
    right: 0;
    top: 0;
    background: none;
    border: none;
    padding: 8px 12px;
    font-size: 1.2rem;
    color: #27a9e6;
    cursor: pointer;
}

/* ============================================================
   Tag Cloud - nosso widget manual (badges cinza com hover azul)
   ============================================================ */
.tag-cloud {
    line-height: 2;
}

.tag-cloud a {
    display: inline-block;
    padding: 4px 12px;
    margin: 3px 2px;
    background: #f5f5f5;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    color: #555 !important;
    font-size: 12px !important;
    text-decoration: none;
    transition: all 0.3s;
}

.tag-cloud a:hover {
    background: #27a9e6;
    border-color: #27a9e6;
    color: #fff !important;
}

/* ============================================================
   Paginação (pag-simple - Intense)
   ============================================================ */
.pag-simple {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0;
    flex-wrap: wrap;
}

.pag-simple-item {
    display: inline-block;
}

.pag-simple-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    border: 1px solid #e8e8e8;
    border-right: none;
    transition: all 0.3s;
    gap: 5px;
}

.pag-simple-item:first-child .pag-simple-link {
    border-radius: 3px 0 0 3px;
}

.pag-simple-item:last-child .pag-simple-link {
    border-right: 1px solid #e8e8e8;
    border-radius: 0 3px 3px 0;
}

.pag-simple-link:hover {
    background: #27a9e6;
    border-color: #27a9e6;
    color: #fff;
}

.pag-simple-item.active .pag-simple-link {
    background: #27a9e6;
    border-color: #27a9e6;
    color: #fff;
}

.pag-simple-link.inactive {
    pointer-events: none;
    color: #999;
}

.pag-simple-link-prev,
.pag-simple-link-next {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pag-simple-link-prev .mdi,
.pag-simple-link-next .mdi {
    font-size: 16px;
}


/* ============================================================
   Post Side Layout (Blog listing)
   ============================================================ */
.post-side {
    display: flex;
    gap: 25px;
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e8e8e8;
}

.post-side .post-img-link {
    flex-shrink: 0;
    display: block;
    width: 270px;
    overflow: hidden;
    border-radius: 3px;
}

.post-side .post-img-link img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.post-side .post-img-link:hover img {
    transform: scale(1.05);
}

.post-side .post-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.divider-layout:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Post Meta */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 15px;
    margin-bottom: 10px;
}

.post-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #999;
}

.post-meta-icon {
    font-size: 15px;
    color: #27a9e6;
}

.post-meta-link {
    color: #666;
    text-decoration: none;
    transition: color 0.3s;
}

.post-meta-link:hover {
    color: #27a9e6;
}

.post-meta-link-primary {
    color: #27a9e6;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.03em;
}

.post-meta-link-primary:hover {
    color: #1e8bc3;
}

.post-meta-text {
    color: #666;
    font-size: 13px;
}

/* Post Title */
.post-title {
    margin: 0 0 10px;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.4;
}

.post-title a {
    color: #333;
    transition: color 0.3s;
}

.post-title a:hover {
    color: #27a9e6;
}

/* Post Text */
.post-text {
    font-size: 14px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 10px;
}

.post-sm .post-title {
    font-size: 2rem;
}

.post-sm .post-text {
    font-size: 13px;
}

/* Post Button */
.post-btn {
    font-size: 12px;
    padding: 6px 16px;
}

/* Responsive post-side */
@media (max-width: 767px) {
    .post-side {
        flex-direction: column;
        gap: 15px;
    }
    .post-side .post-img-link {
        width: 100%;
    }
}


/* ============================================================
   Post Meta Linkbox (badge style for categories/tags)
   ============================================================ */
.post-meta-linkbox {
    display: inline-block;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    transition: all 0.3s;
    text-decoration: none;
}

.post-meta-linkbox:hover {
    background: #27a9e6;
    border-color: #27a9e6;
    color: #fff;
}

.post-meta-linkbox-primary {
    background: #27a9e6;
    border-color: #27a9e6;
    color: #fff;
}

.post-meta-linkbox-primary:hover {
    background: #1e8bc3;
    border-color: #1e8bc3;
    color: #fff;
}

/* Post Meta Between (spaced) */
.post-meta-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 20px;
}

/* ============================================================
   Blog Article (Single Post)
   ============================================================ */
.blog-article {
    text-align: left;
}

.blog-article-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 15px 0 20px;
    color: #333;
}

.blog-article-image {
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 25px;
}

.blog-article-image img {
    width: 100%;
    height: auto;
}

.blog-article-content {
    font-size: 15px;
    line-height: 1.85;
    color: #555;
}

.blog-article-content h2,
.blog-article-content h3,
.blog-article-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
}

.blog-article-content p {
    margin-bottom: 15px;
}

.blog-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 3px;
}

.blog-article-content blockquote {
    border-left: 4px solid #27a9e6;
    padding: 15px 20px;
    margin: 20px 0;
    background: #f9f9f9;
    font-style: italic;
}

.blog-article-content pre {
    background: #2d2d2d;
    color: #e0e0e0;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.6;
}

.blog-article-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 14px;
}

.blog-article-content pre code {
    background: none;
    padding: 0;
}

.blog-article-footer {
    padding-top: 20px;
    border-top: 1px solid #e8e8e8;
}

.blog-article-subtitle {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 20px;
    color: #333;
}


/* ============================================================
   Divider
   ============================================================ */
.divider {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 35px 0;
}

.divider-sm {
    margin: 25px 0;
}

.post-single-divider {
    margin: 35px 0;
}

/* ============================================================
   Person (Author box)
   ============================================================ */
.person-side {
    display: flex;
    align-items: center;
    gap: 20px;
}

.person-side-sm {
    gap: 15px;
}

.person-side-lg {
    gap: 25px;
    padding: 25px 0;
}

.person-side-left img,
.person-img {
    border-radius: 50%;
    object-fit: cover;
}

.person-side-sm .person-side-left img {
    width: 50px;
    height: 50px;
}

.person-side-lg .person-side-left img {
    width: 120px;
    height: 120px;
}

.person-side-body {
    flex: 1;
}

.person-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.person-title a {
    color: #333;
    transition: color 0.3s;
}

.person-title a:hover {
    color: #27a9e6;
}

.person-subtitle {
    font-size: 13px;
    color: #999;
}

.person-text {
    font-size: 14px;
    line-height: 1.7;
    color: #666;
    margin-top: 10px;
}

.person-social {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.person-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #666;
    font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
}

.person-icon:hover {
    background: #27a9e6;
    color: #fff;
}

.align-items-start {
    align-items: flex-start !important;
}

/* ============================================================
   Post Navigation Boxes (Prev/Next)
   ============================================================ */
.post-nav-boxes {
    margin: 30px 0;
}

.post-nav-box {
    display: block;
    padding: 22px 25px;
    border: 2px solid #e8e8e8;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
    background: #fafbfc;
    height: 100%;
}

.post-nav-box:hover {
    border-color: #27a9e6;
    background: #fff;
    box-shadow: 0 5px 20px rgba(39, 169, 230, 0.12);
}

.post-nav-box-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #27a9e6;
    margin-bottom: 8px;
}

.post-nav-box-label .mdi {
    font-size: 14px;
    vertical-align: middle;
}

.post-nav-box-title {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    line-height: 1.5;
}

.post-nav-box:hover .post-nav-box-title {
    color: #27a9e6;
}

.post-nav-box-next {
    text-align: right;
}

@media (max-width: 575px) {
    .post-nav-boxes .cell-xs-6 {
        width: 100%;
        margin-bottom: 15px;
    }
}


/* ============================================================
   Comments - Intense comment-cloud style
   ============================================================ */
.comment.comment-cloud {
    margin-bottom: 25px;
}

.comment.comment-cloud .media {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.comment.comment-cloud .media-left {
    flex-shrink: 0;
}

.comment.comment-cloud .media-body {
    flex: 1;
    min-width: 0;
    position: relative;
    padding: 22px 28px;
    background: #f7f7f7;
    border: 1px solid #e8e8e9;
    border-radius: 8px;
    overflow: visible;
}

/* Seta do balão - estilo Intense skewed */
.comment.comment-cloud .media-body::before {
    position: absolute;
    content: '';
    top: 20px;
    left: 0;
    width: 20px;
    height: 16px;
    background: #f7f7f7;
    border-left: 1px solid #e8e8e9;
    border-top: 1px solid #e8e8e9;
    transform: translateX(-50%) skewX(45deg);
}

.comment.comment-cloud .comment-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.comment.comment-cloud .comment-meta {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px 15px;
    font-size: 13px;
    color: #999;
}

.comment.comment-cloud .comment-meta-item .fw-medium {
    font-weight: 600;
    color: #333;
}

.comment.comment-cloud .comment-link,
.comment.comment-cloud .comment-panel .reply a {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #27a9e6;
    text-decoration: none;
    transition: color 0.3s;
}

.comment.comment-cloud .comment-link:hover,
.comment.comment-cloud .comment-panel .reply a:hover {
    color: #1e8bc3;
}

.comment.comment-cloud .comment-text {
    font-size: 14px;
    line-height: 1.75;
    color: #555;
}

.comment.comment-cloud .comment-text p {
    margin: 0;
}

.comment.comment-cloud .comment-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e8e8e9;
    color: #999;
    font-size: 24px;
}

.comment.comment-cloud .comment-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

/* Nested comments (replies) - balão com seta para cima */
.comment.comment-cloud .comment.comment-cloud {
    margin-top: 20px;
    margin-left: 40px;
}

.comment.comment-cloud .comment.comment-cloud .media-body::before {
    top: 20px;
    left: 0;
    transform: translateX(-50%) skewX(45deg);
}

/* Children wrapper do WordPress */
.comment.comment-cloud .children {
    list-style: none;
    padding-left: 0;
}

.comment.comment-cloud .children .comment.comment-cloud {
    margin-left: 40px;
}

@media (max-width: 575px) {
    .comment.comment-cloud .media {
        flex-direction: column;
        gap: 0;
    }
    .comment.comment-cloud .media-left {
        margin-bottom: 10px;
    }
    .comment.comment-cloud .media-body::before {
        display: none;
    }
    .comment.comment-cloud .children .comment.comment-cloud {
        margin-left: 15px;
    }
}

/* blog-article spacing from Intense */
.blog-article *+.divider { margin-top: 2.5rem; }
.blog-article *+.comment { margin-top: 1.5rem; }
.blog-article *+.person-side { margin-top: 1.25rem; }
.blog-article *+.person-side-lg { margin-top: 2rem; }
.blog-article-subtitle { color: #27a9e6; }

@media (min-width: 992px) {
    .blog-article *+.divider { margin-top: 3.75rem; }
    .blog-article *+.comment { margin-top: 2rem; }
    .blog-article *+.person-side-lg { margin-top: 2.75rem; }
}

.fw-medium { font-weight: 600; }
.comment-link-wrap a { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; color: #27a9e6; text-decoration: none; }
.comment-link-wrap a:hover { color: #1e8bc3; }

/* ============================================================
   Comment Form
   ============================================================ */
.rd-mailform .form-group {
    margin-bottom: 20px;
}

.rd-mailform textarea.form-control {
    min-height: 130px;
    resize: vertical;
}

/* ============================================================
   WordPress Alignments & Misc
   ============================================================ */
.alignleft { float: left; margin-right: 20px; margin-bottom: 10px; }
.alignright { float: right; margin-left: 20px; margin-bottom: 10px; }
.aligncenter { display: block; margin: 20px auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: #999; text-align: center; margin-top: 5px; }

.page-loader .custom-logo-link { display: inline-block; }
.page-loader .custom-logo { max-width: 280px; height: auto; }

.text-picton-blue { color: #27a9e6 !important; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 767px) {
    .post-nav-boxes .range {
        display: block;
    }
    .post-nav-boxes .cell-xs-6 {
        margin-bottom: 15px;
    }
    .person-side-lg {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .person-social {
        justify-content: center;
    }
}

/* Print */
@media print {
    .page-head, .page-footer, .page-loader, .breadcrumb-classic, .sidebar { display: none !important; }
}


/* Fix alinhamento ícone X (Twitter) */
.fa-brands.fa-x-twitter {
    margin-top: 5px;
}


/* ============================================================
   Post Simple (sidebar recent posts)
   ============================================================ */
.post-simple {
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #e8e8e9;
}

.post-simple:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.post-simple .post-title {
    font-size: 1.1rem;
    margin: 0 0 8px;
    line-height: 1.5;
}

.post-area .post-meta {
    margin-bottom: 0;
}


/* ============================================================
   Post Share
   ============================================================ */
.post-share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-share-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.post-share-icons {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}


/* Sidebar post titles - garantir tamanho */
.sidebar .post-simple .post-title,
.sidebar .post-simple h5,
.sidebar .post-area .post-title,
.sidebar .post-area h5.post-title,
.sidebar h5.post-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
}

.post-simple .post-title {
    font-size: 14px !important;
}


/* ============================================================
   WordPress Widgets na Sidebar - mesmo visual do tema
   ============================================================ */

/* Containers */
.sidebar .widget_block,
.sidebar .widget_search,
.sidebar .widget_recent_entries,
.sidebar .widget_categories,
.sidebar .widget_archive,
.sidebar .widget_tag_cloud,
.sidebar .widget_pages,
.sidebar .widget_meta,
.sidebar .widget_nav_menu,
.sidebar .widget_text {
    padding-bottom: 25px;
    margin-bottom: 25px;
    border-bottom: 1px solid #e8e8e8;
}

.sidebar .widget_block:last-child,
.sidebar .widget_search:last-child,
.sidebar .widget_recent_entries:last-child,
.sidebar .widget_categories:last-child,
.sidebar .widget_archive:last-child,
.sidebar .widget_tag_cloud:last-child {
    border-bottom: none;
}

/* Títulos */
.sidebar .widget-title,
.sidebar .widgettitle,
.sidebar .widget_block h2,
.sidebar .widget_block h3,
.sidebar .widget_block h4,
.sidebar .widget_block h5,
.sidebar .widget_block h6,
.sidebar .wp-block-heading {
    font-size: 14px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 15px !important;
    color: #333;
}

/* Listas (categorias, arquivos, páginas, meta, nav) */
.sidebar .widget_categories ul,
.sidebar .widget_archive ul,
.sidebar .widget_pages ul,
.sidebar .widget_meta ul,
.sidebar .widget_nav_menu ul,
.sidebar .widget_recent_entries ul,
.sidebar .wp-block-categories,
.sidebar .wp-block-archives,
.sidebar .wp-block-latest-posts,
.sidebar .wp-block-page-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sidebar .widget_categories ul li,
.sidebar .widget_archive ul li,
.sidebar .widget_pages ul li,
.sidebar .widget_meta ul li,
.sidebar .widget_nav_menu ul li,
.sidebar .wp-block-categories li,
.sidebar .wp-block-archives li,
.sidebar .wp-block-page-list li {
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar .widget_categories ul li:last-child,
.sidebar .widget_archive ul li:last-child,
.sidebar .widget_pages ul li:last-child,
.sidebar .widget_meta ul li:last-child,
.sidebar .widget_nav_menu ul li:last-child,
.sidebar .wp-block-categories li:last-child,
.sidebar .wp-block-archives li:last-child,
.sidebar .wp-block-page-list li:last-child {
    border-bottom: none;
}

.sidebar .widget_categories ul li a,
.sidebar .widget_archive ul li a,
.sidebar .widget_pages ul li a,
.sidebar .widget_meta ul li a,
.sidebar .widget_nav_menu ul li a,
.sidebar .wp-block-categories li a,
.sidebar .wp-block-archives li a,
.sidebar .wp-block-page-list li a {
    color: #333;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar .widget_categories ul li a:hover,
.sidebar .widget_archive ul li a:hover,
.sidebar .widget_pages ul li a:hover,
.sidebar .widget_meta ul li a:hover,
.sidebar .widget_nav_menu ul li a:hover,
.sidebar .wp-block-categories li a:hover,
.sidebar .wp-block-archives li a:hover,
.sidebar .wp-block-page-list li a:hover {
    color: #27a9e6;
}

/* Últimos Posts WP */
.sidebar .widget_recent_entries ul li,
.sidebar .wp-block-latest-posts li {
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar .widget_recent_entries ul li:last-child,
.sidebar .wp-block-latest-posts li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar .widget_recent_entries ul li a,
.sidebar .wp-block-latest-posts li a {
    color: #333;
    font-weight: 600;
    font-size: 14px !important;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar .widget_recent_entries ul li a:hover,
.sidebar .wp-block-latest-posts li a:hover {
    color: #27a9e6;
}

.sidebar .widget_recent_entries ul li .post-date,
.sidebar .wp-block-latest-posts__post-date {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 3px;
}

/* Busca WP */
.sidebar .widget_search .search-form,
.sidebar .wp-block-search {
    position: relative;
}

.sidebar .widget_search .search-field,
.sidebar .wp-block-search__input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e8e8e8;
    border-radius: 3px;
    font-size: 14px;
}

.sidebar .widget_search .search-field:focus,
.sidebar .wp-block-search__input:focus {
    outline: none;
    border-color: #27a9e6;
}

.sidebar .widget_search .search-submit,
.sidebar .wp-block-search__button {
    background: #27a9e6;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.sidebar .widget_search .search-submit:hover,
.sidebar .wp-block-search__button:hover {
    background: #1e8bc3;
}

.sidebar .wp-block-search__inside-wrapper {
    display: flex;
    gap: 8px;
}

.sidebar .wp-block-search__inside-wrapper .wp-block-search__input {
    flex: 1;
}

/* Nuvem de Tags WP (widget do WordPress) - nuvem natural */
.sidebar .widget_tag_cloud .tagcloud a,
.sidebar .wp-block-tag-cloud a {
    display: inline !important;
    padding: 0 !important;
    margin: 0 2px !important;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    color: #27a9e6 !important;
    text-decoration: none !important;
    transition: color 0.3s;
    line-height: 1.8;
}

.sidebar .widget_tag_cloud .tagcloud a:hover,
.sidebar .wp-block-tag-cloud a:hover {
    color: #1e8bc3 !important;
    background: none !important;
    border: none !important;
}
