/* BLOG SPECIFIC STYLES */

html {
    scroll-behavior: smooth;
}

:root {
    --blog-card-bg: rgba(15, 15, 15, 0.6);
}

/* HERO SECTION - BLOG */
.hero-blog {
    padding: clamp(80px, 12vh, 120px) 0 60px;
    text-align: center;
    background: radial-gradient(circle at center, rgba(210, 255, 0, 0.05) 0%, transparent 70%);
}

.hero-blog h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin-bottom: 20px;
}

.hero-blog p {
    font-size: clamp(1.1rem, 1.5vw, 1.3rem);
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--text-muted);
}

/* SEARCH BAR */
.search-container {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 18px 30px;
    padding-right: 60px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 20px rgba(210, 255, 0, 0.1);
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background: #fff;
}

/* CATEGORIES */
.blog-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.cat-btn {
    padding: 10px 24px;
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.cat-btn:hover,
.cat-btn.active {
    background: var(--primary-dim);
    color: var(--primary);
    border-color: var(--primary);
}

/* GRID LAYOUT */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

/* POST CARDS */
.post-card {
    background: var(--blog-card-bg);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.post-card:hover {
    transform: translateY(-10px);
    border-color: rgba(210, 255, 0, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.post-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.post-cat-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--primary);
    color: #000;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 800;
    z-index: 2;
}

.post-body {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    gap: 15px;
}

.post-card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: #fff;
    line-height: 1.3;
    transition: var(--transition);
}

.post-card:hover h3 {
    color: var(--primary);
}

.post-card p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    line-clamp: 3;
    overflow: hidden;
}

.post-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.read-more-link {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.read-more-link svg {
    width: 18px;
    transition: transform 0.3s ease;
}

.post-card:hover .read-more-link svg {
    transform: translateX(5px);
}

/* COLUNISTAS SECTION */
.columnists-section {
    padding: 80px 0;
    background: rgba(210, 255, 0, 0.02);
    border-radius: 40px;
    margin: 40px 0;
}

.columnists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.columnist-card {
    background: var(--bg-card);
    padding: 40px 30px;
    border-radius: 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.columnist-card:hover {
    border-color: var(--primary-dim);
    transform: translateY(-5px);
}

.columnist-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 3px solid var(--primary);
    padding: 5px;
    background: #000;
}

.columnist-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.columnist-card h4 {
    font-size: 1.4rem;
    margin-bottom: 5px;
    color: #fff;
}

.columnist-role {
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 15px;
    display: block;
}

.columnist-bio {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

/* NEWSLETTER BLOCK */
.newsletter-block {
    background: linear-gradient(135deg, rgba(210, 255, 0, 0.1) 0%, rgba(0, 0, 0, 0.8) 100%);
    padding: 80px 40px;
    border-radius: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(210, 255, 0, 0.2);
    margin-bottom: 80px;
}

.newsletter-block h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 15px;
}

.newsletter-block p {
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.newsletter-form {
    display: flex;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 16px 25px;
    border-radius: 100px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-family: inherit;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.spam-notice {
    display: block;
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.6;
}

/* POST SINGLE PAGE */
.post-header {
    padding: 100px 0 60px;
    text-align: center;
}

.post-header-cat {
    color: var(--primary);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    margin-bottom: 20px;
    display: block;
}

.post-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.post-author-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.author-mini {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-mini-img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.author-mini-info {
    text-align: left;
}

.author-name {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
}

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

.post-featured-img {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    border-radius: 30px;
    margin-bottom: 60px;
}

/* POST LAYOUT - Using Flexbox for better sticky control */
.post-layout {
    display: flex;
    align-items: flex-start;
    gap: 60px;
    position: relative;
    /* Ensure it's a positioning context if needed */
}

/* Sidebar width when in flex */
.post-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: -webkit-sticky;
    position: sticky;
    top: 100px;
    /* 90px Header + 10px gap */
    z-index: 10;
    height: fit-content;
    /* Critical for sticky to stop at end of container */
    max-height: calc(100vh - 140px);
    /* Prevent it from being taller than viewport */
    overflow-y: auto;
    /* Allow internal scrolling if sidebar is too tall */
}

.post-content {
    flex: 1;
    min-width: 0;
    /* Prevent flex overflow issues */
}

/* TABLE OF CONTENTS */
/* Removed previous sidebar definition to avoid conflicts */

.toc-card {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.toc-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

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

.toc-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    display: block;
}

.toc-link:hover,
.toc-link.active {
    color: var(--primary);
    transform: translateX(5px);
    font-weight: 700;
}

/* POST CONTENT AREA */
.post-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #e0e0e0;
}

.post-content p {
    margin-bottom: 30px;
}

.post-content h2 {
    font-size: 2.2rem;
    margin: 60px 0 30px;
    color: #fff;
}

.post-content h3 {
    font-size: 1.6rem;
    margin: 40px 0 20px;
    color: #fff;
}

.post-content blockquote {
    background: rgba(210, 255, 0, 0.05);
    border-left: 4px solid var(--primary);
    padding: 40px;
    border-radius: 0 20px 20px 0;
    margin: 40px 0;
    font-style: italic;
    color: #fff;
    font-size: 1.4rem;
}

.post-content img {
    width: 100%;
    border-radius: 20px;
    margin: 40px 0;
}

/* FINAL CTA IN POST */
.post-final-cta {
    background: var(--bg-card);
    padding: 60px;
    border-radius: 30px;
    text-align: center;
    margin-top: 80px;
    border: 1px solid var(--primary-dim);
}

/* RESPONSIVE */
@media (max-width: 992px) {
    .post-layout {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .post-sidebar {
        width: 100%;
        position: relative;
        top: 0;
        height: auto;
        max-height: none;
        overflow-y: visible;
        order: -1;
    }

    .toc-card {
        background: var(--bg-card);
        border: 1px solid var(--primary-dim);
    }

    .newsletter-form {
        flex-direction: column;
    }

    .newsletter-form button {
        width: 100%;
    }
}

/* VIDEO CONTAINER */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    margin: 30px auto 0;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

@media (max-width: 480px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}