/*
Theme Name: Devantia Insights
Theme URI: https://devantia.com
Author: Devantia
Author URI: https://devantia.com
Description: Tema corporativo minimalista para el blog de Devantia. Coherente con la identidad visual de devantia.com.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: devantia
*/

/* ═══ RESET & BASE ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #334155;
    background: #ffffff;
    line-height: 1.7;
    font-size: 16px;
}

a { color: #1572b6; text-decoration: none; transition: color 0.2s; }
a:hover { color: #083675; }

img { max-width: 100%; height: auto; }

/* ═══ HEADER ═══ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
}

@media (min-width: 640px) {
    .header-inner { padding: 0.75rem 1.5rem; }
}

@media (min-width: 1024px) {
    .header-inner { padding: 0.75rem 2rem; }
}

.site-logo img {
    height: 36px;
    width: auto;
}

.header-nav {
    display: none;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
}

@media (min-width: 768px) {
    .header-nav { display: flex; }
}

.header-nav a {
    color: #64748b;
    transition: color 0.2s;
}

.header-nav a:hover {
    color: #0f172a;
}

.btn-blue {
    display: inline-block;
    background: #1572b6;
    color: #ffffff !important;
    padding: 0.5rem 1.25rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    transition: background 0.2s;
    white-space: nowrap;
}

.btn-blue:hover {
    background: #083675;
    color: #ffffff !important;
}

/* Mobile menu toggle */
.mobile-toggle {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 0.25rem;
}

@media (min-width: 768px) {
    .mobile-toggle { display: none; }
}

.mobile-menu {
    display: none;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    padding: 0.75rem 1rem;
}

.mobile-menu.open {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #64748b;
}

.mobile-menu .btn-blue {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    padding: 0.75rem 1.25rem;
}

/* ═══ MAIN CONTENT ═══ */
.site-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

@media (min-width: 640px) {
    .site-main { padding: 3.5rem 1.5rem; }
}

@media (min-width: 1024px) {
    .site-main { padding: 4rem 2rem; }
}

/* Page title */
.page-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #041e47;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 2.5rem;
}

/* ═══ POST CARDS (listing) ═══ */
.post-card {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.75rem 0;
}

.post-card:first-child {
    padding-top: 0;
}

.post-card:last-child {
    border-bottom: none;
}

.post-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.post-card-meta .category {
    background: #e5f4fb;
    color: #1572b6;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #041e47;
    line-height: 1.35;
    margin-bottom: 0.5rem;
}

.post-card-title a {
    color: #041e47;
}

.post-card-title a:hover {
    color: #1572b6;
}

.post-card-excerpt {
    font-size: 0.925rem;
    color: #475569;
    line-height: 1.65;
    margin-bottom: 0.75rem;
}

.post-card-read-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1572b6;
}

.post-card-read-more:hover {
    color: #083675;
}

.post-card-read-more::after {
    content: ' →';
}

/* ═══ SINGLE POST ═══ */
.single-header {
    margin-bottom: 2rem;
}

.single-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.single-meta .category {
    background: #e5f4fb;
    color: #1572b6;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.single-title {
    font-size: 2rem;
    font-weight: 800;
    color: #041e47;
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

@media (min-width: 640px) {
    .single-title { font-size: 2.5rem; }
}

/* Post content */
.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155;
}

.post-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #041e47;
    margin: 2.5rem 0 0.75rem;
}

.post-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #083675;
    margin: 2rem 0 0.5rem;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content ul, .post-content ol {
    margin: 0 0 1.25rem 1.5rem;
}

.post-content li {
    margin-bottom: 0.35rem;
}

.post-content blockquote {
    border-left: 3px solid #1572b6;
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    background: #f8fafc;
    color: #083675;
    font-style: italic;
    border-radius: 0 0.375rem 0.375rem 0;
}

.post-content blockquote p:last-child {
    margin-bottom: 0;
}

.post-content strong {
    color: #0f172a;
}

.post-content a {
    color: #1572b6;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: #083675;
}

.post-content img {
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.post-content code {
    background: #f1f5f9;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
}

.post-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.9rem;
    line-height: 1.6;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* Post navigation */
.post-nav {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #e2e8f0;
    padding-top: 2rem;
    margin-top: 3rem;
    gap: 1rem;
}

.post-nav a {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1572b6;
}

.post-nav .prev::before { content: '← '; }
.post-nav .next::after { content: ' →'; }

/* Back to blog */
.back-to-blog {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.back-to-blog::before { content: '← '; }
.back-to-blog:hover { color: #1572b6; }

/* CTA box */
.cta-box {
    background: #041e47;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
}

.cta-box h3 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.cta-box p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.cta-box .btn-blue {
    background: #1572b6;
    padding: 0.65rem 1.75rem;
    font-size: 0.9rem;
}

.cta-box .btn-blue:hover {
    background: #4eb8d8;
}

/* ═══ PAGINATION ═══ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.pagination a {
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.pagination a:hover {
    background: #e5f4fb;
    color: #1572b6;
    border-color: #1572b6;
}

.pagination .current {
    background: #1572b6;
    color: #ffffff;
    border: 1px solid #1572b6;
}

/* ═══ FOOTER ═══ */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 3rem 1rem 2rem;
    margin-top: 3rem;
}

@media (min-width: 640px) {
    .site-footer { padding: 3rem 1.5rem 2rem; }
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 640px) {
    .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
}

.footer-brand p {
    font-size: 0.85rem;
    line-height: 1.6;
    margin-top: 0.75rem;
    color: #94a3b8;
}

.footer-brand img {
    height: 28px;
    width: auto;
    opacity: 0.9;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.footer-col a {
    display: block;
    font-size: 0.85rem;
    color: #94a3b8;
    padding: 0.2rem 0;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.8rem;
    align-items: center;
}

@media (min-width: 640px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: #94a3b8;
}

.footer-legal a:hover {
    color: #ffffff;
}

/* ═══ EMPTY STATE ═══ */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: #94a3b8;
}

.empty-state h2 {
    color: #041e47;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* ═══ 404 ═══ */
.error-404 {
    text-align: center;
    padding: 4rem 1rem;
}

.error-404 h1 {
    font-size: 4rem;
    font-weight: 800;
    color: #1572b6;
    margin-bottom: 0.5rem;
}

.error-404 p {
    color: #64748b;
    margin-bottom: 1.5rem;
}
