/* Estilos personalizados para o CatalogoNovo Blog */

:root {
    --primary-color: #28a745;
    --secondary-color: #6c757d;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fff;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
}

[data-theme="dark"] {
    --text-color: #e9ecef;
    --text-light: #adb5bd;
    --bg-color: #212529;
    --bg-light: #343a40;
    --border-color: #495057;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header */
.header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.logo h1 a {
    color: var(--text-color);
    text-decoration: none;
}

.tagline {
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
    text-align: center;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

/* Post Cards */
.post-card {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
}

.post-card:hover {
    box-shadow: var(--shadow-hover);
}

.post-category {
    font-size: 0.8rem;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.post-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-color);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.post-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.divider {
    height: 1px;
    background: var(--border-color);
    margin: 1rem 0;
}

/* Post com imagem */
.post-with-image {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1.5rem;
    align-items: center;
}

.post-image {
    width: 100%;
    margin-bottom: 2rem;
}

.post-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 120px;
}

.widget {
    background:#cccccc;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
}

.search-form button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

.widget-list {
    list-style: none;
    padding: 0;
}

.widget-list li {
    margin-bottom: 0.8rem;
}

.widget-list a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
}

.widget-list a:hover {
    color: var(--primary-color);
}

.top-list {
    counter-reset: item;
}

.top-list li {
    position: relative;
    padding-left: 2rem;
}

.top-list li::before {
    counter-increment: item;
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--primary-color);
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Promo Card */
.promo-card {
    background: linear-gradient(135deg, var(--primary-color), #20c997);
    color: white;
    text-align: center;
    padding: 2rem;
}

.promo-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.promo-card p {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.btn-promo {
    background: white;
    color: var(--primary-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.btn-promo:hover {
    transform: translateY(-2px);
}

/* Search Modal */
.search-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.search-modal.active {
    display: flex;
}

.search-modal-content {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close-search {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

/* Single Post */
.post-header {
    margin-bottom: 2rem;
}

.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 3rem;
}

.post-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: var(--text-color);
}

.post-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1.5rem 0 1rem;
    color: var(--text-color);
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

/* Post Detail */
.post-detail {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.post-header {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-image {
    width: 100%;
    margin-bottom: 2rem !important;
    position: relative;
    display: block;
}

.post-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-top: 0;
    padding-top: 2rem;
    position: relative;
    z-index: 1;
}

.post-content::before {
    content: '';
    display: table;
    clear: both;
    height: 0;
    overflow: hidden;
}

/* Share Box */
.share-box {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    margin: 3rem 0;
}

/* Share Sticky - Botões Flutuantes */
.share-sticky {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

/* Category Page Styles */
.category-header {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}

.category-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.category-description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.posts-list {
    margin-bottom: 2rem;
}

.no-posts {
    text-align: center;
    padding: 3rem;
    background: var(--bg-light);
    border-radius: 12px;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Sidebar Widgets */
.widget {
    background: #cccccc;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-list li {
    margin-bottom: 0.5rem;
}

.categories-list li:last-child {
    margin-bottom: 0;
}

.categories-list li a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.categories-list li a:hover {
    background: var(--bg-color);
    color: var(--text-color);
    border-left-color: var(--primary-color);
}

.categories-list li.active a {
    background: var(--primary-color);
    color: white;
    border-left-color: var(--primary-color);
}

.recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recent-posts li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.recent-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-posts li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    display: block;
    margin-bottom: 0.25rem;
    transition: color 0.3s ease;
}

.recent-posts li a:hover {
    color: var(--primary-color);
}

.recent-posts li small {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Share Bar Fixa */
.share-bar {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.share-sticky-title {
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-button {
    position: relative;
    margin: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.share-button:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.share-button:active {
    transform: scale(0.95);
}

.share-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-mobile {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 12px;
    margin: 2rem 0;
}

/* Responsive styles for sticky share buttons */
@media (max-width: 1200px) {
    .share-sticky {
        left: 1rem;
    }
    
    .share-bar {
        right: 1rem;
    }
}

@media (max-width: 992px) {
    .share-sticky {
        display: none;
    }
    
    .share-bar {
        display: none;
    }
    
    .share-mobile {
        display: block !important;
    }
}

@media (min-width: 993px) {
    .share-sticky {
        display: flex;
    }
    
    .share-bar {
        display: flex;
    }
    
    .share-mobile {
        display: none !important;
    }
}

.share-button:hover {
    transform: scale(1.1);
}

.share-facebook { background: #1877f2; color: white; }
.share-twitter { background: #1da1f2; color: white; }
.share-whatsapp { background: #25d366; color: white; }

/* Comments */
.comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.comment-form {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-color);
    color: var(--text-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-submit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.btn-submit:hover {
    background: #218838;
}

/* Related Posts */
.related-posts {
    margin-top: 3rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.related-card {
    background: var(--bg-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.related-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.related-card a {
    color: var(--text-color);
    text-decoration: none;
}

.related-card a:hover {
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--bg-light);
    padding: 2rem 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Admin Styles */
.admin-header {
    background: #343a40;
    color: white;
    padding: 1rem 0;
}

.admin-nav {
    background: #495057;
    padding: 0.5rem 0;
}

.admin-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.admin-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.admin-nav a:hover {
    background: #6c757d;
}

.admin-content {
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .post-with-image {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .share-bar {
        position: static;
        flex-direction: row;
        justify-content: center;
        margin: 2rem 0;
        transform: none;
    }
    
    .sidebar {
        position: static;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .post-card {
        padding: 1rem;
    }
    
    .widget {
        padding: 1rem;
    }
    
    .search-modal-content {
        width: 95%;
        padding: 1rem;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-uppercase { text-transform: uppercase; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #28a745;
    --bs-btn-border-color: #28a745;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #28a745;
    --bs-btn-hover-border-color: #28a745;
    --bs-btn-focus-shadow-rgb: 49, 132, 253;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg:#28a745;
    --bs-btn-active-border-color: #28a745;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #28a745;
    --bs-btn-disabled-border-color: #28a745;
}
/* Ler mais button custom green */
.btn-read-more {
  background-color: #28a745;
  border-color: #28a745;
  color: #fff;
}
.btn-read-more:hover {
  background-color: #218838;
  border-color: #1e7e34;
  color: #fff;
}
.btn-read-more:focus {
  box-shadow: 0 0 0 0.25rem rgba(40, 167, 69, 0.25);
}
.btn-read-more.disabled,
.btn-read-more:disabled {
  background-color: #28a745;
  border-color: #28a745;
}
