/*
Theme Name: SP Certificado Blog Theme
Theme URI: https://spcertificadodigital.com.br
Author: SP Certificado Digital
Author URI: https://spcertificadodigital.com.br
Description: Template elegante e otimizado para SEO/GEO para blog de Certificado Digital ICP-Brasil. Design moderno com foco em performance, acessibilidade e otimização para motores de busca tradicionais e generativos.
Version: 1.0.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: sp-certificado-blog
Tags: blog, two-columns, right-sidebar, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, full-width-template, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, accessibility-ready

SP Certificado Blog Theme, Copyright 2025 SP Certificado Digital
SP Certificado Blog Theme is distributed under the terms of the GNU GPL
*/

/* ==========================================================================
   Reset e Base Styles
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #1F2937;
    background-color: #FFFFFF;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #5B21B6;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover,
a:focus {
    color: #7C3AED;
    text-decoration: underline;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #111827;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin: 2rem 0;
}

.main-content {
    min-width: 0;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
    background-color: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.site-branding {
    display: flex;
    align-items: center;
}

.custom-logo-link {
    display: block;
}

.custom-logo {
    max-height: 60px;
    width: auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: #5B21B6;
}

.site-title a:hover {
    text-decoration: none;
    color: #7C3AED;
}

.site-description {
    font-size: 0.875rem;
    color: #6B7280;
    margin: 0;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.main-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: #1F2937;
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current-menu-item > a {
    color: #5B21B6;
    text-decoration: none;
}

/* Submenu */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #FFFFFF;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 0.5rem 0;
    min-width: 200px;
    display: none;
    flex-direction: column;
    gap: 0;
}

.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul {
    display: flex;
}

.main-navigation ul ul a {
    padding: 0.5rem 1rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background-color: #5B21B6;
    color: #FFFFFF;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
}

.menu-toggle:hover {
    background-color: #7C3AED;
}

/* ==========================================================================
   Search Form
   ========================================================================== */

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form label {
    flex: 1;
    display: flex;
}

.search-form .search-field {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.search-form .search-submit {
    background-color: #5B21B6;
    color: #FFFFFF;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.search-form .search-submit:hover {
    background-color: #7C3AED;
}

/* ==========================================================================
   Posts Grid
   ========================================================================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* ==========================================================================
   Post Card
   ========================================================================== */

.post-card {
    background-color: #FFFFFF;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content-wrapper {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.post-categories a {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #5B21B6;
    color: #FFFFFF;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-categories a:hover {
    background-color: #7C3AED;
    text-decoration: none;
}

.post-card .entry-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.post-card .entry-title a {
    color: #111827;
}

.post-card .entry-title a:hover {
    color: #5B21B6;
    text-decoration: none;
}

.post-excerpt {
    color: #6B7280;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex: 1;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6B7280;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

.post-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.read-more {
    display: inline-block;
    color: #5B21B6;
    font-weight: 600;
    font-size: 0.875rem;
}

.read-more:hover {
    color: #7C3AED;
}

/* ==========================================================================
   Single Post
   ========================================================================== */

.single-post .entry-header {
    margin-bottom: 2rem;
}

.breadcrumbs {
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 1rem;
}

.breadcrumbs a {
    color: #5B21B6;
}

.breadcrumbs span {
    margin: 0 0.5rem;
}

.single-post .entry-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 1.5rem;
}

.entry-meta .author,
.entry-meta .posted-on,
.entry-meta .reading-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.single-post .post-thumbnail {
    margin-bottom: 2rem;
    border-radius: 0.75rem;
    overflow: hidden;
}

.single-post .post-thumbnail img {
    width: 100%;
    height: auto;
}

/* ==========================================================================
   Entry Content
   ========================================================================== */

.entry-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #374151;
}

.entry-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #111827;
}

.entry-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #111827;
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.entry-content li {
    margin-bottom: 0.5rem;
}

.entry-content blockquote {
    border-left: 4px solid #5B21B6;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6B7280;
}

.entry-content img {
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
}

.entry-content th,
.entry-content td {
    padding: 0.75rem;
    border: 1px solid #E5E7EB;
    text-align: left;
}

.entry-content th {
    background-color: #F9FAFB;
    font-weight: 600;
}

.entry-content code {
    background-color: #F3F4F6;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875em;
    font-family: 'Courier New', monospace;
}

.entry-content pre {
    background-color: #1F2937;
    color: #F9FAFB;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.entry-content pre code {
    background-color: transparent;
    padding: 0;
    color: inherit;
}

/* ==========================================================================
   Tags
   ========================================================================== */

.entry-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #E5E7EB;
}

.tags-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tags-links a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #F3F4F6;
    color: #6B7280;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.tags-links a:hover {
    background-color: #E5E7EB;
    color: #1F2937;
    text-decoration: none;
}

/* ==========================================================================
   Post Navigation
   ========================================================================== */

.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
}

.post-navigation a {
    display: block;
    padding: 1rem;
    background-color: #F9FAFB;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
}

.post-navigation a:hover {
    background-color: #F3F4F6;
    text-decoration: none;
}

.post-navigation .nav-previous {
    text-align: left;
}

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

.post-navigation .nav-subtitle {
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 0.5rem;
}

.post-navigation .nav-title {
    font-weight: 600;
    color: #111827;
}

/* ==========================================================================
   Related Posts
   ========================================================================== */

.related-posts {
    margin: 3rem 0;
}

.related-posts h2 {
    margin-bottom: 2rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.widget {
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #111827;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #5B21B6;
}

.widget ul {
    list-style: none;
}

.widget li {
    margin-bottom: 0.75rem;
}

.widget a {
    color: #374151;
    display: block;
    transition: color 0.3s ease;
}

.widget a:hover {
    color: #5B21B6;
    text-decoration: none;
}

/* Widget Search */
.widget_search .search-form {
    display: flex;
    gap: 0.5rem;
}

.widget_search .search-field {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
}

.widget_search .search-submit {
    background-color: #5B21B6;
    color: #FFFFFF;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
}

.widget_search .search-submit:hover {
    background-color: #7C3AED;
}

/* Widget Recent Posts */
.widget_recent_entries ul {
    list-style: none;
}

.widget_recent_entries li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E5E7EB;
}

.widget_recent_entries li:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.widget_recent_entries .post-thumbnail {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    border-radius: 0.375rem;
    overflow: hidden;
}

.widget_recent_entries .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.widget_recent_entries .post-info {
    flex: 1;
}

.widget_recent_entries a {
    font-weight: 500;
    color: #111827;
    line-height: 1.4;
}

.widget_recent_entries .post-date {
    font-size: 0.75rem;
    color: #6B7280;
    margin-top: 0.25rem;
}

/* Widget Categories */
.widget_categories ul {
    list-style: none;
}

.widget_categories li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #E5E7EB;
}

.widget_categories li:last-child {
    border-bottom: none;
}

.widget_categories .post-count {
    background-color: #F3F4F6;
    color: #6B7280;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Widget Tag Cloud */
.tagcloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tagcloud a {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: #F3F4F6;
    color: #6B7280;
    border-radius: 0.375rem;
    font-size: 0.875rem !important;
    font-weight: 500;
}

.tagcloud a:hover {
    background-color: #E5E7EB;
    color: #1F2937;
    text-decoration: none;
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #E5E7EB;
}

.comments-title {
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
}

.comment {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #F9FAFB;
    border-radius: 0.5rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author img {
    border-radius: 50%;
}

.comment-metadata {
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 1rem;
}

.comment-content p {
    margin-bottom: 0.5rem;
}

.reply {
    margin-top: 1rem;
}

.reply a {
    font-size: 0.875rem;
    font-weight: 600;
    color: #5B21B6;
}

.comment-respond {
    margin-top: 3rem;
}

.comment-form {
    display: grid;
    gap: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.375rem;
    font-family: inherit;
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form input[type="submit"] {
    background-color: #84CC16;
    color: #FFFFFF;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.comment-form input[type="submit"]:hover {
    background-color: #65A30D;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem;
    background-color: #F9FAFB;
    color: #374151;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination .page-numbers:hover {
    background-color: #E5E7EB;
    text-decoration: none;
}

.pagination .page-numbers.current {
    background-color: #5B21B6;
    color: #FFFFFF;
}

.pagination .page-numbers.dots {
    background-color: transparent;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: #1F2937;
    color: #D1D5DB;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.footer-widget {
    color: #D1D5DB;
}

.footer-widget .widget-title {
    color: #FFFFFF;
    border-bottom-color: #84CC16;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget a {
    color: #D1D5DB;
}

.footer-widget a:hover {
    color: #FFFFFF;
}

.site-info {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    font-size: 0.875rem;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.site-info a {
    color: #84CC16;
}

.site-info a:hover {
    color: #65A30D;
}

/* ==========================================================================
   CTA Widget
   ========================================================================== */

.cta-widget {
    background: linear-gradient(135deg, #5B21B6 0%, #7C3AED 100%);
    color: #FFFFFF;
    padding: 2rem;
    border-radius: 0.75rem;
    text-align: center;
}

.cta-widget .widget-title {
    color: #FFFFFF;
    border-bottom-color: #84CC16;
}

.cta-widget p {
    margin-bottom: 1.5rem;
}

.cta-button {
    display: inline-block;
    background-color: #84CC16;
    color: #FFFFFF;
    padding: 0.75rem 2rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #65A30D;
    text-decoration: none;
}

/* ==========================================================================
   404 Page
   ========================================================================== */

.error-404 {
    text-align: center;
    padding: 4rem 1rem;
}

.error-404 .page-title {
    font-size: 6rem;
    color: #5B21B6;
    margin-bottom: 1rem;
}

.error-404 .page-content {
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #F9FAFB;
    border-radius: 0.25rem;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #5B21B6;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .content-area {
        grid-template-columns: 1fr 300px;
    }
    
    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .content-area {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #FFFFFF;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }
    
    .main-navigation.toggled {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation ul ul {
        position: static;
        box-shadow: none;
        padding-left: 1rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .single-post .entry-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .site-container {
        padding: 0 0.75rem;
    }
    
    .post-card {
        margin-bottom: 1.5rem;
    }
    
    .widget {
        padding: 1rem;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .site-header,
    .main-navigation,
    .sidebar,
    .site-footer,
    .post-navigation,
    .comments-area {
        display: none;
    }
    
    .content-area {
        grid-template-columns: 1fr;
    }
    
    body {
        font-size: 12pt;
    }
    
    a {
        text-decoration: underline;
    }
}
