/* ===================================
   BLOG STYLES - DESIGN MODERNO E LIMPO
   =================================== */

/* Fix para rodapé no final da página */
html {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

header {
    flex-shrink: 0;
}

.blog-header {
    flex-shrink: 0;
}

.blog-content {
    flex: 1 0 auto;
}

.footer {
    flex-shrink: 0;
    margin-top: auto;
    background: #1a1a1a;
}

/* Blog Header */
.blog-header {
    padding: 120px 0 80px;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    margin-top: 60px;
}

.blog-header h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.blog-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    margin-bottom: 3rem;
    font-weight: 400;
}

.blog-search {
    max-width: 600px;
    margin: 0 auto;
}

.blog-search form {
    position: relative;
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.blog-search input {
    flex: 1;
    padding: 18px 30px;
    border: none;
    font-size: 1.05rem;
    outline: none;
    color: var(--text-primary);
    background: white;
}

.blog-search button {
    background: var(--accent-blue);
    border: none;
    padding: 18px 30px;
    cursor: pointer;
    color: white;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-search button:hover {
    background: var(--accent-blue-dark);
    transform: scale(1.05);
}

/* Blog Content Layout */
.blog-content {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.blog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    align-items: start;
    padding-bottom: 50px;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 120px;
    align-self: start;
}

.sidebar-widget {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.sidebar-widget h3 {
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: var(--accent-blue);
    font-weight: 700;
}

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

.categories-list li {
    margin-bottom: 12px;
}

.categories-list li.active a {
    color: var(--accent-blue);
    font-weight: 700;
    background: var(--bg-tertiary);
    padding: 8px 15px;
    border-radius: 8px;
    display: block;
}

.categories-list a {
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.2s;
    display: block;
    padding: 8px 15px;
    border-radius: 8px;
}

.categories-list a:hover {
    color: var(--accent-blue);
    background: var(--bg-tertiary);
    transform: translateX(5px);
}

.featured-posts {
    list-style: none;
}

.featured-posts li {
    margin-bottom: 20px;
}

.featured-posts a {
    display: flex;
    gap: 15px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s;
}

.featured-posts a:hover {
    transform: translateY(-2px);
}

.featured-posts img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.featured-post-info h4 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    line-height: 1.4;
    color: var(--text-primary);
}

.featured-post-info time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Main Content */
.blog-main {
    min-height: 500px;
}

.search-info {
    background: var(--card-bg);
    padding: 20px 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--border-color);
}

.search-info p {
    margin: 0;
    color: var(--text-primary);
}

.search-info a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
}

.search-info a:hover {
    text-decoration: underline;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 35px;
    max-width: 100%;
}

.post-card {
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
}

.post-card:hover {
    transform: translateY(-8px);
}

.post-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
    transition: all 0.3s;
}

.post-card-link:hover {
    color: inherit;
}

.post-card-link:hover .post-title {
    color: var(--accent-blue);
}

.post-image {
    display: block;
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.post-card:hover .post-image img {
    transform: scale(1.1);
}

.post-content {
    padding: 30px;
    background: transparent;
    flex: 1;
}

.post-category {
    display: inline-block;
    padding: 6px 16px;
    background: var(--bg-tertiary);
    color: var(--accent-blue);
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 20px;
    margin-bottom: 15px;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    line-height: 1.4;
    color: var(--text-primary);
    transition: color 0.3s;
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.post-meta {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.post-author,
.post-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 60px;
}

.pagination-btn,
.pagination-number {
    padding: 12px 20px;
    background: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.pagination-btn:hover,
.pagination-number:hover {
    background: var(--accent-blue);
    color: white;
    transform: translateY(-2px);
}

.pagination-number.active {
    background: var(--accent-blue);
    color: white;
    pointer-events: none;
}

.pagination-numbers {
    display: flex;
    gap: 10px;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 80px 20px;
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.no-posts svg {
    color: var(--text-secondary);
    opacity: 0.5;
    margin-bottom: 25px;
}

.no-posts h3 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.no-posts p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.no-posts .btn-primary {
    display: inline-block;
    padding: 15px 40px;
    background: var(--accent-blue);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
    transition: all 0.3s;
}

.no-posts .btn-primary:hover {
    background: var(--accent-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 200, 255, 0.3);
}

/* ===================================
   POST PAGE STYLES
   =================================== */

.post-page {
    background: var(--bg-secondary);
}

/* Post Hero */
.post-hero {
    position: relative;
    min-height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 77px;
    overflow: hidden;
}

.post-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(3px);
    transform: scale(1.1);
}

.post-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(0, 153, 204, 0.95) 0%,
        rgba(0, 200, 255, 0.85) 100%);
}

.post-hero-content {
    position: relative;
    z-index: 10;
    max-width: 900px;
    width: 100%;
    padding: 60px 20px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 30px;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateX(-5px);
}

.post-category-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s;
}

.post-category-badge:hover {
    background: rgba(255, 255, 255, 0.3);
}

.post-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: white;
    line-height: 1.2;
    margin-bottom: 30px;
    letter-spacing: -1.5px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.post-meta {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 25px;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.meta-item svg {
    flex-shrink: 0;
}

/* Post Content Section */
.post-content-section {
    padding: 80px 0;
}

.post-wrapper {
    max-width: 850px;
    margin: 0 auto;
}

.post-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 60px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px var(--shadow-sm);
    border: 1px solid var(--border-color);
    line-height: 1.8;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.post-content h2 {
    font-size: 2.2rem;
    margin: 50px 0 25px;
    color: var(--text-primary);
    font-weight: 800;
    line-height: 1.3;
}

.post-content h2:first-child {
    margin-top: 0;
}

.post-content h3 {
    font-size: 1.7rem;
    margin: 40px 0 20px;
    color: var(--text-primary);
    font-weight: 700;
}

.post-content p {
    margin-bottom: 25px;
    color: var(--text-primary);
}

.post-content ul,
.post-content ol {
    margin: 25px 0;
    padding-left: 40px;
}

.post-content ul {
    list-style-type: none;
}

.post-content ul li {
    position: relative;
    margin-bottom: 15px;
    padding-left: 10px;
}

.post-content ul li::before {
    content: "→";
    position: absolute;
    left: -30px;
    color: var(--accent-blue);
    font-weight: bold;
    font-size: 1.2em;
}

.post-content ol li {
    margin-bottom: 15px;
}

.post-content li strong {
    color: var(--accent-blue);
    font-weight: 700;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    margin: 40px 0;
    box-shadow: 0 10px 30px var(--shadow-md);
}

.post-content blockquote {
    border-left: 5px solid var(--accent-blue);
    background: var(--bg-tertiary);
    padding: 25px 30px;
    margin: 35px 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 1.15rem;
    border-radius: 10px;
}

.post-content code {
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: var(--accent-blue);
    font-weight: 600;
}

.post-content pre {
    background: var(--bg-tertiary);
    padding: 25px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 35px 0;
    border: 1px solid var(--border-color);
}

.post-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
    font-weight: normal;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}

.post-content table th,
.post-content table td {
    padding: 12px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.post-content table th {
    background: var(--bg-tertiary);
    font-weight: 700;
}

/* Tags Section */
.post-tags-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.post-tags-section strong {
    display: block;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-item {
    display: inline-block;
    padding: 8px 18px;
    background: var(--bg-tertiary);
    color: var(--accent-blue);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.tag-item:hover {
    background: var(--accent-blue);
    color: white;
    transform: translateY(-2px);
}

/* Share Section */
.post-share-section {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 20px var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.post-share-section strong {
    display: block;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1.05rem;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.share-facebook {
    background: #1877f2;
}

.share-twitter {
    background: #1da1f2;
}

.share-linkedin {
    background: #0a66c2;
}

.share-whatsapp {
    background: #25d366;
}

/* Related Posts */
.related-posts-section {
    padding: 60px 0;
    background: var(--bg-primary);
}

.related-posts-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-primary);
    font-weight: 800;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 35px;
}

.related-card {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px var(--shadow-sm);
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-md);
}

.related-image {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

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

.related-content {
    padding: 25px;
}

.related-category {
    display: inline-block;
    padding: 5px 14px;
    background: var(--bg-tertiary);
    color: var(--accent-blue);
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 15px;
    margin-bottom: 12px;
}

.related-title {
    font-size: 1.2rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.related-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color 0.3s;
}

.related-title a:hover {
    color: var(--accent-blue);
}

.related-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* CTA Section */
.post-cta-section {
    padding: 80px 0;
    background: var(--bg-secondary);
}

.cta-box {
    background: linear-gradient(135deg, #0099cc 0%, #00c8ff 100%);
    color: white;
    text-align: center;
    padding: 80px 50px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 200, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.cta-box h3 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.cta-box p {
    font-size: 1.3rem;
    margin-bottom: 35px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.cta-button {
    display: inline-block;
    padding: 18px 50px;
    background: white;
    color: var(--accent-blue);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 800;
    font-size: 1.1rem;
    transition: all 0.3s;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 250px 1fr;
        gap: 35px;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 30px;
    }

    .post-title {
        font-size: 3rem;
    }

    .post-content {
        padding: 45px;
    }
}

@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .blog-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .post-hero {
        min-height: 450px;
    }

    .post-title {
        font-size: 2.5rem;
    }

    .post-content {
        padding: 40px 35px;
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .blog-header {
        padding: 100px 0 60px;
    }

    .blog-header h1 {
        font-size: 2.5rem;
    }

    .blog-subtitle {
        font-size: 1.1rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-hero {
        min-height: 400px;
    }

    .post-hero-content {
        padding: 40px 20px;
    }

    .post-title {
        font-size: 2.2rem;
    }

    .post-meta {
        gap: 15px;
    }

    .meta-item {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .post-content {
        padding: 35px 25px;
        font-size: 1.08rem;
    }

    .post-content h2 {
        font-size: 1.8rem;
    }

    .post-content h3 {
        font-size: 1.5rem;
    }

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

    .cta-box {
        padding: 60px 35px;
    }

    .cta-box h3 {
        font-size: 2.2rem;
    }

    .cta-box p {
        font-size: 1.15rem;
    }
}

@media (max-width: 480px) {
    .blog-header h1 {
        font-size: 2rem;
    }

    .blog-sidebar {
        grid-template-columns: 1fr;
    }

    .post-hero {
        min-height: 350px;
    }

    .post-title {
        font-size: 1.8rem;
    }

    .post-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .post-content {
        padding: 25px 20px;
        font-size: 1.05rem;
    }

    .post-content h2 {
        font-size: 1.6rem;
    }

    .post-content h3 {
        font-size: 1.3rem;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }

    .cta-box {
        padding: 50px 25px;
    }

    .cta-box h3 {
        font-size: 1.8rem;
    }

    .cta-box p {
        font-size: 1rem;
    }

    .cta-button {
        padding: 16px 40px;
        font-size: 1rem;
    }
}
