@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --accent-soft: #dbeafe;
    --gold: #f59e0b;
    --gold-soft: #fef3c7;
    --success: #059669;
    --success-soft: #d1fae5;
    --text: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== HEADER ===== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.logo span {
    color: var(--accent);
}

nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition);
    border-radius: 2px;
}

nav a:hover {
    color: var(--accent);
}

nav a:hover::after {
    width: 100%;
}

/* ===== HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #1a1a4e 100%);
    color: #fff;
    padding: 80px 0 72px;
    margin-bottom: 64px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(245,158,11,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37,99,235,0.2);
    border: 1px solid rgba(37,99,235,0.3);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #93c5fd;
    margin-bottom: 24px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 16px;
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    margin-bottom: 32px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
}

.hero-stat {
    text-align: center;
}

.hero-stat .num {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.hero-stat .label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-top: 2px;
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 36px;
}

/* ===== BLOG GRID ===== */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    margin-bottom: 48px;
}

.blog-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.blog-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-4px);
    border-color: var(--accent-soft);
}

.blog-card-img {
    width: 320px;
    min-height: 240px;
    flex-shrink: 0;
    object-fit: cover;
    display: block;
}

.blog-card-body {
    padding: 28px 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-body .categoria {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 12px;
    border-radius: 50px;
    margin-bottom: 14px;
    width: fit-content;
}

.blog-card-body h2 {
    font-size: 1.2rem;
    line-height: 1.4;
    margin-bottom: 12px;
}

.blog-card-body h2 a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

.blog-card-body h2 a:hover {
    color: var(--accent);
}

.blog-card-body p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
    flex: 1;
}

.blog-card-body .meta {
    margin-top: 16px;
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-light);
}

.btn-leer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap var(--transition);
}

.btn-leer:hover {
    gap: 10px;
}

.btn-leer::after {
    content: '→';
    font-size: 1.1rem;
}

/* ===== ARTICLE PAGE ===== */
.article-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.article-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 24px 60px;
}

.article-page .article-featured-img {
    width: 100%;
    border-radius: 16px;
    margin-bottom: 40px;
}

.article-header {
    margin-bottom: 40px;
}

.article-header .categoria {
    display: inline-block;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 16px;
}

.article-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.6rem;
    line-height: 1.2;
    color: var(--primary);
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.article-header .meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.article-header .featured-img {
    width: 100%;
    height: 420px;
    border-radius: var(--radius-lg);
    margin-top: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e7ff 0%, #dbeafe 50%, #ede9fe 100%);
    color: var(--accent);
    font-size: 4rem;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.article-header .featured-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(15,23,42,0.6) 100%);
}

.article-body {
    font-size: 1.08rem;
    line-height: 1.8;
    color: var(--text);
}

.article-body p {
    margin-bottom: 22px;
}

.article-body h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    color: var(--primary);
    margin: 48px 0 20px;
    letter-spacing: -0.3px;
}

.article-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-light);
    margin: 36px 0 14px;
}

.article-body ul,
.article-body ol {
    margin: 20px 0;
    padding-left: 24px;
}

.article-body li {
    margin-bottom: 8px;
    line-height: 1.7;
}

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

.article-body blockquote {
    border-left: 4px solid var(--accent);
    padding: 20px 24px;
    margin: 32px 0;
    background: linear-gradient(135deg, var(--accent-soft) 0%, #f8fafc 100%);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--primary-light);
    font-size: 1.05rem;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 28px 0;
    box-shadow: var(--shadow-sm);
}

/* Table styling */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 0.92rem;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.article-body th {
    background: var(--primary);
    color: #fff;
    padding: 14px 18px;
    text-align: left;
    font-weight: 600;
}

.article-body td {
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
}

.article-body tr:nth-child(even) {
    background: #f8fafc;
}

.article-body tr:last-child td {
    border-bottom: none;
}

/* AdSense */
.adsense-container {
    text-align: center;
    margin: 36px 0;
    padding: 28px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

.adsense-inline {
    text-align: center;
    margin: 36px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.85rem;
}

/* ===== RELATED ARTICLES ===== */
.related-articles {
    margin-top: 64px;
    padding-top: 44px;
    border-top: 2px solid var(--border);
}

.related-articles h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.related-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.related-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    border-color: var(--accent-soft);
}

.related-card h4 {
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.related-card h4 a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition);
}

.related-card h4 a:hover {
    color: var(--accent);
}

.related-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== FOOTER ===== */
footer {
    background: var(--primary);
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 48px 0;
    margin-top: 80px;
}

footer .logo {
    color: #fff;
    margin-bottom: 12px;
    display: inline-block;
}

footer p {
    font-size: 0.85rem;
    margin-top: 8px;
}

footer a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

footer a:hover {
    color: #93c5fd;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.footer-links a {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: #fff;
}

.newsletter-form {
    display: flex;
    gap: 8px;
    max-width: 400px;
    margin: 16px auto 0;
}
.newsletter-form input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(59,130,246,0.2);
    background: rgba(15,35,64,0.6);
    color: #e2e8f0;
    font-size: 0.85rem;
    outline: none;
}
.newsletter-form input:focus {
    border-color: var(--accent);
}
.newsletter-form button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.newsletter-form button:hover {
    background: var(--accent-hover);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .blog-card {
        flex-direction: column;
    }
    .blog-card-img {
        width: 100%;
        height: 200px;
    }
    .hero h1 {
        font-size: 2.4rem;
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        height: auto;
        padding: 16px 0;
        gap: 12px;
    }
    nav {
        gap: 16px;
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero {
        padding: 56px 0 48px;
    }
    .hero h1 {
        font-size: 1.8rem;
    }
    .hero p {
        font-size: 1rem;
    }
    .hero-stats {
        gap: 24px;
        flex-wrap: wrap;
    }
    .article-header h1 {
        font-size: 1.7rem;
    }
    .article-body {
        font-size: 1rem;
    }
    .article-body h2 {
        font-size: 1.4rem;
    }
    .article-header .featured-img {
        height: 240px;
    }
    .blog-card-body {
        padding: 20px 24px;
    }
    .blog-card-body h2 {
        font-size: 1.05rem;
    }
    .section-title {
        font-size: 1.5rem;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    .hero h1 {
        font-size: 1.5rem;
    }
    .article-header h1 {
        font-size: 1.4rem;
    }
    .blog-card-img {
        height: 160px;
    }
}
.tool-toast {
    position: fixed; bottom: 24px; right: 24px; z-index: 9999;
    background: linear-gradient(135deg, #0f2340, #1a365d);
    border: 1px solid rgba(59,130,246,0.3);
    border-radius: 12px; padding: 16px 20px;
    max-width: 320px; box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    animation: slideUp 0.4s ease, fadeOut 0.5s ease 4.5s forwards;
}
.tool-toast p { margin: 0; color: #e2e8f0; font-size: 0.85rem; line-height: 1.5; }
.tool-toast a { color: #60a5fa; font-weight: 600; text-decoration: none; }
.tool-toast a:hover { text-decoration: underline; }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(10px); } }
