/* ============================================
   S4 Digital · Blog styles
   ============================================ */

/* Restaurar cursor default en el blog (el custom cursor solo corre en el home) */
body { cursor: auto !important; }
a, button, summary, .post-card, [role="button"] { cursor: pointer !important; }
input, textarea, select { cursor: text !important; }

/* Blog Index (listado de posts) */
.blog-hero {
    padding: 160px 0 80px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.blog-hero::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 500px;
    background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 60%);
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
}
.blog-hero .container { position: relative; z-index: 1; }
.blog-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--fg);
    margin-bottom: 32px;
    background: rgba(255, 255, 255, 0.03);
    font-weight: 500;
}
.blog-title {
    font-size: clamp(40px, 6vw, 82px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 24px;
    max-width: 20ch;
}
.blog-subtitle {
    font-size: clamp(16px, 1.4vw, 20px);
    color: var(--fg-muted);
    max-width: 60ch;
    line-height: 1.5;
}

/* Post list */
.blog-list {
    padding: 100px 0 160px;
    background: var(--bg);
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}
@media (max-width: 900px) { .blog-grid { grid-template-columns: 1fr; gap: 20px; } }

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-3);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.4s var(--ease-out), border-color 0.3s ease;
}
.post-card:hover {
    transform: translateY(-6px);
    border-color: rgba(157, 206, 219, 0.4);
}
.post-card-thumb {
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #26224D 0%, #755599 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.15);
    font-family: var(--font-mono);
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -0.03em;
    position: relative;
    overflow: hidden;
}
.post-card-thumb::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 30%, rgba(157, 206, 219, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(176, 74, 142, 0.25) 0%, transparent 50%);
}
.post-card-thumb-2 { background: linear-gradient(135deg, #755599 0%, #B04A8E 100%); }
.post-card-thumb-3 { background: linear-gradient(135deg, #E07F3D 0%, #B04A8E 100%); }
.post-card-thumb-4 { background: linear-gradient(135deg, #26224D 0%, #9DCEDB 100%); }
.post-card-thumb-5 { background: linear-gradient(135deg, #B04A8E 0%, #26224D 100%); }
.post-card-thumb span {
    position: relative;
    z-index: 1;
}
.post-card-body {
    padding: 28px 26px 30px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.post-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 16px;
    font-weight: 500;
}
.post-card-meta-sep { color: var(--fg-dim); }
.post-card-meta-date { color: var(--fg-muted); text-transform: none; letter-spacing: 0.02em; }
.post-card-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 14px;
    color: var(--fg);
}
.post-card-excerpt {
    font-size: 14px;
    color: var(--fg-muted);
    line-height: 1.55;
    margin-bottom: 22px;
    flex: 1;
}
.post-card-cta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--fg);
    letter-spacing: 0.04em;
    transition: color 0.2s ease, transform 0.3s ease;
    align-self: flex-start;
}
.post-card:hover .post-card-cta {
    color: var(--accent);
    transform: translateX(3px);
}

/* Post individual */
.post-hero {
    padding: 160px 0 60px;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}
.post-hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    filter: blur(90px);
    opacity: 0.4;
    pointer-events: none;
}
.post-hero .container { position: relative; z-index: 1; max-width: 900px; }
.post-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--fg-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 30px;
    transition: color 0.2s ease;
}
.post-back:hover { color: var(--accent); }
.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--fg-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.post-meta-category {
    padding: 5px 12px;
    background: rgba(157, 206, 219, 0.12);
    color: var(--accent);
    border: 1px solid rgba(157, 206, 219, 0.3);
    border-radius: 999px;
    font-weight: 500;
}
.post-title {
    font-size: clamp(32px, 5vw, 60px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin-bottom: 24px;
    color: var(--fg);
    max-width: 24ch;
}
.post-excerpt {
    font-size: clamp(17px, 1.5vw, 21px);
    color: var(--fg-muted);
    line-height: 1.5;
    margin-bottom: 40px;
    max-width: 62ch;
}
.post-author {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}
.post-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
}
.post-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.post-author-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--fg);
}
.post-author-role {
    font-size: 12px;
    color: var(--fg-muted);
}

/* Post content */
.post-content {
    padding: 40px 0 120px;
    background: var(--bg);
}
.post-content .container {
    max-width: 780px;
}
.post-body {
    font-size: 17px;
    line-height: 1.75;
    color: var(--fg);
    opacity: 0.9;
}
.post-body p {
    margin-bottom: 24px;
}
.post-body h2 {
    font-size: clamp(24px, 2.6vw, 34px);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: var(--fg);
    margin: 60px 0 20px;
    opacity: 1;
}
.post-body h3 {
    font-size: clamp(19px, 2vw, 24px);
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.3;
    color: var(--fg);
    margin: 40px 0 16px;
    opacity: 1;
}
.post-body ul, .post-body ol {
    margin-bottom: 24px;
    padding-left: 24px;
    color: var(--fg);
    opacity: 0.9;
}
.post-body li {
    margin-bottom: 10px;
    line-height: 1.65;
}
.post-body strong {
    color: var(--fg);
    font-weight: 700;
    opacity: 1;
}
.post-body em {
    color: var(--accent);
    font-style: italic;
    opacity: 1;
}
.post-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}
.post-body a:hover { opacity: 0.75; }
.post-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 8px 0 8px 24px;
    margin: 30px 0;
    font-size: 19px;
    color: var(--fg);
    font-style: italic;
    line-height: 1.5;
    opacity: 1;
}
.post-body code {
    background: var(--bg-3);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.9em;
}
.post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    font-size: 15px;
}
.post-body th {
    background: var(--bg-3);
    color: var(--fg);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    border: 1px solid var(--border-strong);
}
.post-body td {
    padding: 12px 16px;
    border: 1px solid var(--border);
    color: var(--fg-muted);
}

/* Post CTA */
.post-cta {
    background: var(--bg-3);
    border: 1px solid rgba(157, 206, 219, 0.3);
    border-radius: var(--radius-lg);
    padding: 40px 34px;
    margin: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.post-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    filter: blur(60px);
    pointer-events: none;
}
.post-cta-title {
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--fg);
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}
.post-cta-desc {
    font-size: 16px;
    color: var(--fg-muted);
    max-width: 50ch;
    margin: 0 auto 24px;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}
.post-cta .btn {
    position: relative;
    z-index: 1;
}

/* Related posts */
.related-posts {
    padding: 100px 0;
    background: var(--bg-2);
    border-top: 1px solid var(--border);
}
.related-title {
    font-size: clamp(24px, 2.6vw, 34px);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin-bottom: 40px;
    text-align: center;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 900px) { .related-grid { grid-template-columns: 1fr; } }

/* Mobile */
@media (max-width: 600px) {
    .blog-hero { padding: 110px 0 50px; }
    .blog-list { padding: 60px 0 100px; }
    .post-hero { padding: 100px 0 40px; }
    .post-content { padding: 20px 0 80px; }
    .related-posts { padding: 60px 0; }
    .post-body { font-size: 16px; }
    .post-cta { padding: 30px 24px; }
}
