/* ═══════════════════════════════════════════════════════════════
   ILHAGEO BLOG — blog/css/blog.css
   Extensão do Design System GeoTech Cristal para conteúdo longo
   ═══════════════════════════════════════════════════════════════ */

/* ── Blog-Specific Design Tokens ────────────────────────────── */
:root {
    --blog-max-width: 780px;
    --blog-toc-width: 220px;
    --blog-font-size: 1.05rem;
    --blog-line-height: 1.78;
    --blog-heading-color: #f3f4f6;
}

/* ═════════════════════════════════════════════════════════════
   BLOG INDEX PAGE — Post Cards Grid
   ═════════════════════════════════════════════════════════════ */

.blog-hero {
    padding: 3rem 1.5rem 2rem;
    text-align: center;
    border-bottom: 1px solid var(--glass-border);
    background: linear-gradient(180deg, rgba(192, 132, 252, 0.03) 0%, transparent 100%);
}

.blog-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--text-bright);
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

.blog-hero-subtitle {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 600px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

/* Category Filter Pills */
.blog-filters {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 1.5rem 1rem;
    max-width: var(--container-max);
    margin: 0 auto;
}

.filter-pill {
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--muted);
    cursor: pointer;
    transition: all 0.2s var(--ease);
    text-decoration: none;
    font-family: var(--font-body);
}

.filter-pill:hover,
.filter-pill.active {
    border-color: var(--magenta);
    color: var(--magenta);
    background: var(--magenta-soft);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

/* Post Card */
.post-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: var(--glass-blur);
    transition: all 0.3s var(--ease);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(103, 232, 249, 0.35);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.post-card-image {
    height: 180px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.post-card-image.geo-bg {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(13, 11, 24, 0.9));
}

.post-card-image.ia-bg {
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.15), rgba(13, 11, 24, 0.9));
}

.post-card-image.legal-bg {
    background: linear-gradient(135deg, rgba(103, 232, 249, 0.15), rgba(13, 11, 24, 0.9));
}

.post-card-image.practical-bg {
    background: linear-gradient(135deg, rgba(250, 204, 21, 0.12), rgba(13, 11, 24, 0.9));
}

.post-card-body {
    padding: 1.25rem 1.5rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-category {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 0.6rem;
    font-weight: 500;
}

.post-card-category.educational {
    background: rgba(52, 211, 153, 0.12);
    color: var(--green);
}

.post-card-category.scientific {
    background: rgba(192, 132, 252, 0.12);
    color: var(--magenta);
}

.post-card-category.regulatory {
    background: rgba(103, 232, 249, 0.12);
    color: var(--cyan);
}

.post-card-category.practical {
    background: rgba(250, 204, 21, 0.12);
    color: #facc15;
}

.post-card-title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-bright);
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.post-card-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

.post-card-title a:hover {
    color: var(--cyan);
}

.post-card-excerpt {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.55;
    margin-bottom: 1rem;
    flex: 1;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--muted-deep);
    padding-top: 0.75rem;
    border-top: 1px solid rgba(61, 56, 96, 0.3);
}

.post-card-meta .read-time::before {
    content: '·';
    margin-right: 1rem;
}

/* Featured Post (first card spans 2 cols) */
.post-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

.post-card.featured .post-card-image {
    height: 100%;
    min-height: 280px;
}

@media (max-width: 768px) {
    .post-card.featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .post-card.featured .post-card-image {
        height: 180px;
        min-height: auto;
    }
}

/* CTA Banner no Blog Index */
.blog-cta-banner {
    max-width: var(--container-max);
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
}

.blog-cta-inner {
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.08), rgba(103, 232, 249, 0.05));
    border: 1px solid rgba(192, 132, 252, 0.2);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
    backdrop-filter: var(--glass-blur);
}

.blog-cta-inner h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text-bright);
}

.blog-cta-inner p {
    font-size: 0.95rem;
    color: var(--muted);
    margin-bottom: 1.25rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ═════════════════════════════════════════════════════════════
   ARTICLE POST PAGE
   ═════════════════════════════════════════════════════════════ */

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--gradient-hero);
    z-index: 1001;
    transition: width 0.15s linear;
}

/* Breadcrumbs */
.breadcrumbs {
    max-width: var(--blog-max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem 0;
    font-size: 0.82rem;
    color: var(--muted-deep);
}

.breadcrumbs a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: var(--cyan);
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
    color: var(--muted-deep);
}

/* Article Header */
.article-header {
    max-width: var(--blog-max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 1.5rem;
    text-align: center;
}

.article-category {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.article-category.educational {
    background: rgba(52, 211, 153, 0.12);
    color: var(--green);
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.article-category.scientific {
    background: rgba(192, 132, 252, 0.12);
    color: var(--magenta);
    border: 1px solid rgba(192, 132, 252, 0.2);
}

.article-category.regulatory {
    background: rgba(103, 232, 249, 0.12);
    color: var(--cyan);
    border: 1px solid rgba(103, 232, 249, 0.2);
}

.article-category.practical {
    background: rgba(250, 204, 21, 0.12);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.2);
}

.article-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.18;
    margin-bottom: 0.75rem;
    letter-spacing: -0.03em;
}

.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--muted);
}

.article-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.article-tags {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.article-tag {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    background: rgba(61, 56, 96, 0.4);
    color: var(--muted);
    text-decoration: none;
    transition: all 0.2s;
}

.article-tag:hover {
    background: rgba(192, 132, 252, 0.15);
    color: var(--magenta);
}

/* Article Layout: Content + Sidebar TOC */
.article-layout {
    max-width: calc(var(--blog-max-width) + var(--blog-toc-width) + 3rem);
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
    display: grid;
    grid-template-columns: 1fr var(--blog-toc-width);
    gap: 2.5rem;
    align-items: start;
}

/* Table of Contents Sidebar */
.article-toc {
    position: sticky;
    top: 90px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.25rem;
    backdrop-filter: var(--glass-blur);
}

.article-toc h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--glass-border);
}

.article-toc nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.article-toc a {
    font-size: 0.82rem;
    color: var(--muted-deep);
    text-decoration: none;
    padding: 0.25rem 0;
    transition: all 0.2s;
    border-left: 2px solid transparent;
    padding-left: 0.5rem;
    line-height: 1.35;
}

.article-toc a:hover,
.article-toc a.active {
    color: var(--cyan);
    border-left-color: var(--cyan);
}

.article-toc a.toc-h3 {
    padding-left: 1.25rem;
    font-size: 0.78rem;
}

/* TOC Mobile — accordion */
.toc-mobile-toggle {
    display: none;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    cursor: pointer;
    text-align: left;
    margin-bottom: 1rem;
}

@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-toc {
        position: static;
        display: none;
    }

    .article-toc.open {
        display: block;
    }

    .toc-mobile-toggle {
        display: block;
    }
}

/* Article Body Typography */
.article-body {
    font-size: var(--blog-font-size);
    line-height: var(--blog-line-height);
    color: #d1d5db;
}

.article-body h2 {
    font-size: 1.55rem;
    margin: 2.5rem 0 1rem;
    padding-top: 0.5rem;
    color: var(--blog-heading-color);
    letter-spacing: -0.02em;
}

.article-body h3 {
    font-size: 1.25rem;
    margin: 2rem 0 0.75rem;
    color: #e5e7eb;
    letter-spacing: -0.01em;
}

.article-body p {
    margin-bottom: 1.25rem;
}

.article-body strong {
    color: var(--text-bright);
    font-weight: 600;
}

.article-body a {
    color: var(--cyan);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.article-body a:hover {
    color: var(--magenta);
}

/* Blockquote */
.article-body blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 3px solid var(--magenta);
    background: rgba(192, 132, 252, 0.05);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: #c4b5fd;
    font-size: 0.95rem;
}

.article-body blockquote p:last-child {
    margin-bottom: 0;
}

/* Lists */
.article-body ul,
.article-body ol {
    margin: 0.75rem 0 1.25rem 1.5rem;
}

.article-body li {
    margin-bottom: 0.4rem;
    padding-left: 0.25rem;
}

.article-body ul li::marker {
    color: var(--green);
}

.article-body ol li::marker {
    color: var(--magenta);
    font-weight: 600;
}

/* Info/Warning/Tip Callout Boxes */
.callout {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    border-left: 4px solid;
    font-size: 0.92rem;
    line-height: 1.55;
}

.callout-info {
    background: rgba(103, 232, 249, 0.06);
    border-color: var(--cyan);
    color: #a5f3fc;
}

.callout-warning {
    background: rgba(250, 204, 21, 0.06);
    border-color: #facc15;
    color: #fde68a;
}

.callout-tip {
    background: rgba(52, 211, 153, 0.06);
    border-color: var(--green);
    color: #86efac;
}

.callout-title {
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    color: var(--text-bright);
}

/* Inline Code */
.article-body code {
    font-family: var(--font-mono);
    font-size: 0.85em;
    padding: 0.15em 0.4em;
    background: rgba(61, 56, 96, 0.5);
    border-radius: 4px;
    color: var(--cyan);
}

/* Code Block */
.article-body pre {
    margin: 1.25rem 0;
    padding: 1.25rem;
    background: rgba(13, 11, 24, 0.9);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.85rem;
}

.article-body pre code {
    background: none;
    padding: 0;
    color: #d1d5db;
}

/* Table */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.25rem 0;
    font-size: 0.9rem;
}

.article-body th {
    text-align: left;
    padding: 0.6rem 0.8rem;
    background: rgba(61, 56, 96, 0.4);
    border-bottom: 2px solid var(--glass-border);
    color: var(--text-bright);
    font-weight: 600;
}

.article-body td {
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(61, 56, 96, 0.3);
}

/* In-Article CTA Box */
.article-cta-box {
    margin: 2rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(192, 132, 252, 0.08), rgba(103, 232, 249, 0.04));
    border: 1px solid rgba(192, 132, 252, 0.25);
    border-radius: var(--radius-lg);
    text-align: center;
}

.article-cta-box p {
    color: var(--muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.article-cta-box .btn {
    margin: 0 auto;
}

/* Author Bio Card */
.author-card {
    margin: 2.5rem 0 1.5rem;
    padding: 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    backdrop-filter: var(--glass-blur);
}

.author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.author-info h4 {
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
    color: var(--text-bright);
}

.author-info p {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 0;
}

/* Related Posts */
.related-posts {
    margin: 2rem 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--glass-border);
}

.related-posts h4 {
    font-size: 0.95rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

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

.related-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: all 0.2s var(--ease);
    text-decoration: none;
    display: block;
}

.related-card:hover {
    border-color: rgba(103, 232, 249, 0.35);
    transform: translateY(-2px);
}

.related-card .related-cat {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--cyan);
    margin-bottom: 0.35rem;
}

.related-card h5 {
    font-size: 0.9rem;
    color: var(--text-bright);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.related-card .related-date {
    font-size: 0.72rem;
    color: var(--muted-deep);
}

/* ═════════════════════════════════════════════════════════════
   RESPONSIVE — Article
   ═════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .article-header {
        padding: 1.5rem 1rem 1rem;
        text-align: left;
    }

    .article-layout {
        padding: 0 1rem 2rem;
    }

    .article-body {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .article-body h2 {
        font-size: 1.3rem;
        margin: 2rem 0 0.75rem;
    }

    .article-body h3 {
        font-size: 1.1rem;
    }

    .author-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem 2rem;
    }

    .blog-hero {
        padding: 2rem 1rem 1.5rem;
    }
}

/* ═════════════════════════════════════════════════════════════
   NAVBAR — Blog link highlight
   ═════════════════════════════════════════════════════════════ */
.nav-links a[href*="blog"] {
    position: relative;
}

.nav-links a[href*="blog"]::after {
    content: 'novo';
    position: absolute;
    top: -8px;
    right: -24px;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    background: var(--magenta);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ═════════════════════════════════════════════════════════════
   PRINT STYLES
   ═════════════════════════════════════════════════════════════ */
@media print {

    .navbar,
    .footer,
    .floating-whatsapp-bar,
    .article-toc,
    .article-cta-box,
    .related-posts,
    .reading-progress {
        display: none !important;
    }

    .article-layout {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    body {
        background: #fff;
        color: #000;
    }

    .article-body {
        color: #000;
    }

    .article-body h2,
    .article-body h3 {
        color: #000;
    }
}