/*
 * an8nymous Blog - Theme v8.0
 * Standalone Custom Theme (no Casper dependency)
 */

/* ===================================
   CSS Variables
   =================================== */

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Colors */
    --an8-bg: #0a0a0a;
    --an8-bg-elevated: #111111;
    --an8-bg-card: rgba(255, 255, 255, 0.02);
    --an8-border: rgba(255, 255, 255, 0.08);
    --an8-border-hover: rgba(255, 255, 255, 0.15);
    --an8-text: #ffffff;
    --an8-text-secondary: rgba(255, 255, 255, 0.85);
    --an8-text-muted: rgba(255, 255, 255, 0.6);
    --an8-accent: #8b5cf6;
    --an8-accent-pink: #ec4899;

    --ghost-accent-color: #8b5cf6 !important;
}

/* ===================================
   Global Reset & Base
   =================================== */

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 100%; /* 16px base - NOT Casper's 62.5% */
}

body {
    margin: 0;
    padding: 0;
    padding-top: 64px; /* Navbar height mobile */
    background-color: var(--an8-bg);
    color: var(--an8-text);
    font-family: var(--font-sans);
    font-size: 18px; /* Base font size */
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===================================
   NAVBAR - Matching Landing Page
   =================================== */

.an8-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--an8-border);
}

.an8-navbar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.an8-navbar-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.an8-navbar-logo img {
    height: 32px;
    width: auto;
}

.an8-logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--an8-text);
}

/* Desktop Nav */
.an8-navbar-nav {
    display: none;
    align-items: center;
    gap: 0.25rem;
}

.an8-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--an8-text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.an8-nav-link:hover,
.an8-nav-link.an8-nav-active {
    color: var(--an8-text);
    background: rgba(255, 255, 255, 0.05);
}

.an8-nav-link svg {
    width: 16px;
    height: 16px;
}

/* Account Button */
.an8-navbar-account {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: var(--an8-text-secondary);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--an8-border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.an8-navbar-account:hover {
    color: var(--an8-text);
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--an8-border-hover);
}

.an8-navbar-account svg {
    width: 16px;
    height: 16px;
}

/* Mobile Burger */
.an8-navbar-burger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--an8-border);
    border-radius: 8px;
    color: var(--an8-text-secondary);
    cursor: pointer;
    margin-left: 0.5rem;
}

/* Mobile Menu */
.an8-navbar-mobile {
    display: none;
    padding: 1rem;
    border-top: 1px solid var(--an8-border);
}

.mobile-menu-open .an8-navbar-mobile {
    display: block;
}

.an8-mobile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--an8-text-secondary);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.an8-mobile-link:hover {
    color: var(--an8-text);
    background: rgba(255, 255, 255, 0.05);
}

/* Desktop breakpoint */
@media (min-width: 768px) {
    .an8-navbar-inner {
        padding: 0 1.5rem;
        height: 72px;
    }

    .an8-navbar-logo img {
        height: 38px;
    }

    .an8-navbar-nav {
        display: flex;
    }

    .an8-navbar-burger {
        display: none;
    }

    .an8-account-text {
        display: inline;
    }

    body {
        padding-top: 72px;
        font-size: 19px;
    }
}

@media (max-width: 767px) {
    .an8-account-text {
        display: none;
    }

    .an8-navbar-account {
        padding: 0.5rem;
    }
}

/* Right side container */
.an8-navbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Catálogo link */
.an8-nav-catalog {
    display: none;
    padding: 0.5rem 1rem;
    font-size: 15px;
    font-weight: 500;
    color: var(--an8-accent);
    transition: all 0.2s ease;
}

.an8-nav-catalog:hover {
    color: #a78bfa;
}

@media (min-width: 768px) {
    .an8-nav-catalog {
        display: block;
    }
}

/* Mobile divider */
.an8-mobile-divider {
    height: 1px;
    background: var(--an8-border);
    margin: 0.75rem 0;
}

/* ===================================
   BLOG HERO - Minimal
   =================================== */

.an8-blog-hero {
    background: var(--an8-bg);
    padding: 3rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--an8-border);
}

.an8-blog-hero-inner {
    max-width: 600px;
    margin: 0 auto;
}

.an8-blog-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--an8-text);
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.an8-blog-subtitle {
    font-size: 1rem;
    color: var(--an8-text-muted);
    margin: 0;
}

@media (min-width: 768px) {
    .an8-blog-hero {
        padding: 4rem 1.5rem;
    }

    .an8-blog-title {
        font-size: 2.5rem;
    }

    .an8-blog-subtitle {
        font-size: 1.125rem;
    }
}

/* ===================================
   BLOG MAIN & CONTAINER
   =================================== */

.an8-blog-main {
    background: var(--an8-bg);
    min-height: 60vh;
    padding: 2rem 1rem;
}

.an8-blog-container {
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .an8-blog-main {
        padding: 3rem 1.5rem;
    }
}

/* ===================================
   FEATURED POST
   =================================== */

.an8-post-featured {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--an8-border);
}

.an8-post-image-link {
    display: block;
    border-radius: 12px;
    overflow: hidden;
}

.an8-post-image-link img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.an8-post-featured:hover .an8-post-image-link img {
    transform: scale(1.02);
}

.an8-post-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.an8-post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.an8-post-tag {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--an8-accent);
}

.an8-post-badge {
    font-size: 14px;
    font-weight: 500;
    color: var(--an8-accent-pink);
}

.an8-post-title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
}

.an8-post-title a {
    color: var(--an8-text);
    transition: color 0.2s ease;
}

.an8-post-title a:hover {
    color: var(--an8-accent);
}

.an8-post-excerpt {
    font-size: 18px;
    color: var(--an8-text-secondary);
    line-height: 1.65;
    margin: 0;
}

.an8-post-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 15px;
    color: var(--an8-text-muted);
}

@media (min-width: 768px) {
    .an8-post-featured {
        grid-template-columns: 1fr 1fr;
        align-items: center;
    }

    .an8-post-title {
        font-size: 32px;
    }

    .an8-post-excerpt {
        font-size: 20px;
    }
}

/* ===================================
   POSTS GRID
   =================================== */

.an8-posts-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .an8-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .an8-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===================================
   POST CARD
   =================================== */

.an8-post-card {
    background: var(--an8-bg-card);
    border: 1px solid var(--an8-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
}

.an8-post-card:hover {
    border-color: var(--an8-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.an8-card-image {
    display: block;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.an8-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.an8-post-card:hover .an8-card-image img {
    transform: scale(1.05);
}

.an8-card-content {
    padding: 1.5rem; /* Increased padding for better spacing */
}

.an8-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.an8-card-tag {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--an8-accent);
}

.an8-card-badge {
    font-size: 13px;
    font-weight: 500;
    color: var(--an8-accent-pink);
    background: rgba(236, 72, 153, 0.1);
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
}

.an8-card-title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 0.75rem;
}

.an8-card-title a {
    color: var(--an8-text);
    transition: color 0.2s ease;
}

.an8-card-title a:hover {
    color: var(--an8-accent);
}

.an8-card-excerpt {
    font-size: 16px;
    color: var(--an8-text-secondary);
    line-height: 1.65;
    margin: 0 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.an8-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    color: var(--an8-text-muted);
}

/* ===================================
   PAGINATION
   =================================== */

.an8-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--an8-border);
}

.an8-pagination-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--an8-text);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--an8-border);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.an8-pagination-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--an8-border-hover);
}

.an8-pagination-info {
    font-size: 0.875rem;
    color: var(--an8-text-muted);
}

/* ===================================
   FOOTER
   =================================== */

.an8-footer {
    background: var(--an8-bg);
    border-top: 1px solid var(--an8-border);
    padding: 3rem 1rem;
}

.an8-footer-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.an8-footer-top {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--an8-border);
}

.an8-footer-brand {
    text-align: center;
}

.an8-footer-logo {
    display: inline-block;
    margin-bottom: 0.5rem;
}

.an8-footer-logo img {
    height: 24px;
}

.an8-footer-logo span {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--an8-text);
}

.an8-footer-tagline {
    font-size: 0.9375rem; /* 15px - increased from 14px */
    color: var(--an8-text-muted);
    margin: 0;
}

.an8-footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    text-align: center;
}

.an8-footer-col h4 {
    font-size: 0.8125rem; /* 13px - increased from 12px */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--an8-text-muted);
    margin: 0 0 1rem;
}

.an8-footer-col a {
    display: block;
    font-size: 0.9375rem; /* 15px - increased from 14px */
    color: var(--an8-text-secondary);
    padding: 0.375rem 0;
    transition: color 0.2s ease;
}

.an8-footer-col a:hover {
    color: var(--an8-text);
}

.an8-footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.an8-footer-copyright {
    font-size: 0.9375rem; /* 15px - increased from 13px */
    color: var(--an8-text-muted);
    margin: 0;
}

.an8-footer-account {
    font-size: 0.9375rem; /* 15px - increased from 14px */
    color: var(--an8-text-secondary);
    transition: color 0.2s ease;
}

.an8-footer-account:hover {
    color: var(--an8-text);
}

@media (min-width: 768px) {
    .an8-footer {
        padding: 4rem 1.5rem;
    }

    .an8-footer-top {
        grid-template-columns: 1fr auto;
        align-items: start;
        text-align: left;
    }

    .an8-footer-brand {
        text-align: left;
    }

    .an8-footer-links {
        text-align: left;
    }

    .an8-footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ===================================
   ARTICLE PAGE (Single Post)
   =================================== */

.article {
    background: var(--an8-bg);
    padding-bottom: 3rem;
}

.article-header {
    max-width: 720px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: center;
}

.article-tag {
    margin-bottom: 1rem;
}

.article-tag a {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--an8-accent);
}

.article-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--an8-text);
    margin: 0 0 1rem;
    letter-spacing: -0.02em;
}

.article-excerpt {
    font-size: 20px;
    color: var(--an8-text-secondary);
    margin: 0;
    line-height: 1.55;
}

.article-byline {
    margin-top: 1.5rem;
}

.article-byline-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.author-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.author-profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-byline-meta {
    text-align: left;
}

.author-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--an8-text);
    margin: 0;
}

.byline-meta-content {
    font-size: 15px;
    color: var(--an8-text-muted);
}

.article-image {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.article-image img {
    width: 100%;
    border-radius: 12px;
}

.article-image figcaption {
    font-size: 0.8125rem;
    color: var(--an8-text-muted);
    text-align: center;
    margin-top: 0.75rem;
}

@media (min-width: 768px) {
    .article-header {
        padding: 3rem 1.5rem;
    }

    .article-title {
        font-size: 42px;
    }

    .article-excerpt {
        font-size: 22px;
    }
}

/* ===================================
   ARTICLE CONTENT (gh-content)
   =================================== */

.gh-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1.25rem;
    font-size: 19px;
    line-height: 1.8;
    color: var(--an8-text-secondary);
}

.gh-content > * {
    margin-bottom: 1.75rem;
}

.gh-content h2,
.gh-content h3,
.gh-content h4 {
    color: var(--an8-text);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-top: 2.5rem;
}

.gh-content h2 { font-size: 28px; }
.gh-content h3 { font-size: 24px; }
.gh-content h4 { font-size: 20px; }

.gh-content p {
    font-size: 19px;
    line-height: 1.8;
    color: var(--an8-text-secondary);
}

.gh-content a {
    color: var(--an8-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gh-content a:hover {
    color: #a78bfa;
}

.gh-content strong {
    color: var(--an8-text);
    font-weight: 600;
}

.gh-content code {
    background: rgba(255, 255, 255, 0.08);
    color: #f472b6;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    font-size: 0.9em;
}

.gh-content pre {
    background: var(--an8-bg-elevated) !important;
    border: 1px solid var(--an8-border);
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
}

.gh-content pre code {
    background: transparent;
    color: #e2e8f0;
    padding: 0;
}

.gh-content blockquote {
    border-left: 3px solid var(--an8-accent);
    background: rgba(139, 92, 246, 0.05);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    font-style: normal;
}

.gh-content blockquote p {
    margin: 0;
}

.gh-content ul,
.gh-content ol {
    padding-left: 1.5rem;
}

.gh-content li {
    margin-bottom: 0.5rem;
}

.gh-content li::marker {
    color: var(--an8-accent);
}

.gh-content table {
    width: 100%;
    border: 1px solid var(--an8-border);
    border-radius: 8px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.gh-content th,
.gh-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--an8-border);
}

.gh-content th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--an8-text);
    font-weight: 600;
    font-size: 0.875rem;
}

.gh-content td {
    color: var(--an8-text-secondary);
    font-size: 0.9375rem;
}

.gh-content tr:last-child td {
    border-bottom: none;
}

.gh-content img {
    border-radius: 8px;
}

.gh-content hr {
    border: none;
    border-top: 1px solid var(--an8-border);
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .gh-content {
        padding: 0 1.5rem;
        font-size: 20px;
    }

    .gh-content p {
        font-size: 20px;
    }

    .gh-content h2 { font-size: 32px; }
    .gh-content h3 { font-size: 26px; }
    .gh-content h4 { font-size: 22px; }

    .gh-content li {
        font-size: 20px;
    }
}

/* ===================================
   CTA SECTION
   =================================== */

.an8-cta {
    max-width: 680px;
    margin: 3rem auto;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(236, 72, 153, 0.04));
    border: 1px solid var(--an8-border);
    border-radius: 12px;
    text-align: center;
}

.an8-cta-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--an8-text);
    margin: 0 0 0.5rem;
}

.an8-cta-description {
    font-size: 0.9375rem;
    color: var(--an8-text-muted);
    margin: 0 0 1.25rem;
}

.an8-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--an8-accent), #7c3aed);
    border-radius: 8px;
    transition: all 0.2s ease;
}

.an8-cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
    color: white;
}

/* ===================================
   READ MORE SECTION
   =================================== */

.read-more-wrap {
    background: var(--an8-bg);
    padding: 3rem 1rem;
    border-top: 1px solid var(--an8-border);
}

.read-more {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .read-more {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===================================
   HIDE CASPER DEFAULTS
   =================================== */

.site-header,
.site-header-content,
.site-header-cover,
.gh-head,
.site-footer,
.outer:not(.read-more-wrap),
.gh-powered-by {
    display: none !important;
}

/* Reset outer for read-more */
.read-more-wrap.outer {
    display: block !important;
}

/* ===================================
   EMPTY STATE
   =================================== */

.an8-empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.an8-empty-state p {
    font-size: 18px;
    color: var(--an8-text-muted);
    margin-bottom: 1.5rem;
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.gh-canvas {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .gh-canvas {
        padding: 0 1.5rem;
    }
}

/* ===================================
   TAG/AUTHOR PAGES
   =================================== */

.tag-template .an8-blog-hero,
.author-template .an8-blog-hero {
    display: none;
}

/* ===================================
   SCROLLBAR
   =================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--an8-bg);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}
