/* ============================================================
   Blog CSS — Litografía Multigraf
   Estilos idénticos al sitio principal (www.multigraff.com)
   ============================================================ */

/* ─── VARIABLES ─── */
:root {
    --primary:    #1e2440;
    --secondary:  #cc0000;
    --accent:     #e63946;
    --light:      #f7f8fc;
    --text:       #2d3748;
    --text-light: #718096;
    --border:     #e2e8f0;
    --success:    #2ecc71;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.7;
    font-size: 17px;
    overflow-x: hidden;
}

/* ─── REVEAL ON SCROLL ─── */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-left, .reveal-right {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* ─── NAVBAR ─── */
nav {
    position: sticky;
    top: 0;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s ease;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    text-decoration: none;
}

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

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover { color: var(--secondary); }

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after { width: 100%; }

/* Blog active link */
.nav-active { color: var(--secondary) !important; }
.nav-active::after { width: 100% !important; }

/* WhatsApp button in nav */
.whatsapp-btn {
    background: var(--success);
    color: white;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
}

.whatsapp-btn:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 204, 113, 0.35);
}

/* ─── DROPDOWN ─── */
.dropdown { position: relative; }
.dropdown-toggle { cursor: pointer; }

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 8px;
    list-style: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    border: 1px solid var(--border);
    min-width: 230px;
    padding: 0.5rem 0;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu li a {
    display: block;
    padding: 0.6rem 1.2rem;
    color: var(--text);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: background 0.2s, color 0.2s;
}

.dropdown-menu li a:hover {
    background: var(--light);
    color: var(--secondary);
}

.dropdown-menu li a::after { display: none; }

/* ─── HAMBURGER & MOBILE MENU ─── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: var(--primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: white;
    z-index: 2000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.mobile-menu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.mobile-close-btn {
    position: absolute;
    top: 1.2rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text);
    line-height: 1;
    padding: 0.3rem;
}

.mobile-menu-inner { padding: 5rem 2rem 3rem; }
.mobile-nav-list { list-style: none; margin: 0; padding: 0; }

.mobile-services-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-light);
    margin: 0.5rem 0;
    padding: 0;
}

.mobile-nav-list li { border-bottom: 1px solid var(--border); }
.mobile-nav-list li:last-child { border-bottom: none; }

.mobile-nav-list a {
    display: block;
    padding: 0.9rem 0;
    color: var(--text);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    transition: color 0.2s;
}

.mobile-nav-list a:hover { color: var(--secondary); }

.service-item a {
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    color: var(--text-light) !important;
    padding-left: 0.5rem !important;
}

.mobile-wa-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--success);
    color: white;
    text-decoration: none;
    padding: 0.9rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 1.5rem;
    justify-content: center;
    transition: background 0.2s;
}

.mobile-wa-btn:hover { background: #27ae60; }

/* ─── HERO (Blog Index) ─── */
.blog-hero {
    background: linear-gradient(135deg, #f7f8fc 0%, #fff5f5 55%, #fce8e8 100%);
    color: var(--primary);
    padding: 6rem 2rem 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-hero-content { position: relative; z-index: 2; }

.blog-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary);
}

.blog-hero h1 em {
    font-style: normal;
    color: var(--accent);
}

.blog-hero p {
    font-size: 1.15rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Floating orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: drift 12s ease-in-out infinite;
    pointer-events: none;
    will-change: transform;
}
.orb-1 { width: 400px; height: 400px; background: rgba(204,0,0,0.07); top: -100px; right: -80px; animation-duration: 14s; }
.orb-2 { width: 300px; height: 300px; background: rgba(230,57,70,0.05); bottom: -60px; left: -60px; animation-duration: 10s; animation-delay: -4s; }
.orb-3 { width: 200px; height: 200px; background: rgba(30,36,64,0.04); top: 40%; left: 15%; animation-duration: 16s; animation-delay: -8s; }

@keyframes drift {
    0%, 100% { transform: translateY(0) scale(1); }
    33%       { transform: translateY(-30px) scale(1.05); }
    66%       { transform: translateY(18px) scale(0.97); }
}

/* Particles */
.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px; height: 4px;
    background: rgba(204,0,0,0.18);
    border-radius: 50%;
    animation: particleDrift linear infinite;
}

@keyframes particleDrift {
    0%   { transform: translateY(100vh) translateX(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateY(-100px) translateX(30px); opacity: 0; }
}

/* ─── BLOG GRID ─── */
.blog-grid {
    max-width: 1400px;
    margin: 2rem auto 4rem;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.8rem;
}

.blog-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.14);
}

.blog-card__img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.blog-card__body {
    padding: 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card__tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary);
    background: rgba(204,0,0,0.08);
    padding: 0.2rem 0.7rem;
    border-radius: 4px;
    margin-bottom: 0.7rem;
    width: fit-content;
}

.blog-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    line-height: 1.35;
    flex: 1;
}

.blog-card__title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-card__title a:hover { color: var(--secondary); }

.blog-card__excerpt {
    font-size: 0.93rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.blog-card__meta {
    font-size: 0.82rem;
    color: var(--text-light);
    border-top: 1px solid var(--border);
    padding-top: 0.7rem;
    margin-top: auto;
}

/* ─── ARTICLE HERO ─── */
.article-hero {
    background: linear-gradient(135deg, #f7f8fc 0%, #fff5f5 55%, #fce8e8 100%);
    color: var(--primary);
    padding: 4.5rem 2rem 3.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.article-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    max-width: 820px;
    margin: 0 auto 0.8rem;
    line-height: 1.25;
    color: var(--primary);
}

.article-hero__meta {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
    max-width: 860px;
    margin: 1.2rem auto 0;
    padding: 0 2rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

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

.breadcrumb a:hover { color: var(--secondary); text-decoration: underline; }

/* ─── ARTICLE CONTENT ─── */
.article-content {
    max-width: 860px;
    margin: 2.5rem auto;
    padding: 0 2rem;
}

.article-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary);
    margin: 2.2rem 0 0.9rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    line-height: 1.3;
}

.article-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
    margin: 1.6rem 0 0.6rem;
}

.article-content p { margin-bottom: 1.1rem; }

.article-content ul,
.article-content ol {
    margin: 0.8rem 0 1.2rem 1.6rem;
}

.article-content li { margin-bottom: 0.45rem; }

.article-content strong { color: var(--primary); }

.article-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid rgba(230,57,70,0.3);
    transition: color 0.2s, border-color 0.2s;
}

.article-content a:hover {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

/* Tables — scrollable on mobile */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.2rem 0; }

.article-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 480px;
}

.article-content th {
    background: var(--primary);
    color: #fff;
    padding: 0.7rem 1rem;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

.article-content td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.article-content tr:nth-child(even) td { background: var(--light); }
.article-content tr:hover td { background: rgba(204,0,0,0.03); }

/* Blockquote */
.article-content blockquote {
    border-left: 4px solid var(--accent);
    background: var(--light);
    padding: 1rem 1.4rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-light);
    border-radius: 0 6px 6px 0;
}

/* ─── CTA BOX ─── */
.cta-box {
    background: linear-gradient(135deg, var(--primary) 0%, #2d3a6e 100%);
    color: #fff;
    border-radius: 10px;
    padding: 2.5rem 2rem;
    text-align: center;
    margin: 2.5rem 0;
    box-shadow: 0 8px 30px rgba(30,36,64,0.2);
}

.cta-box h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.cta-box p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.cta-box a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--success);
    color: #fff;
    padding: 0.85rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
}

.cta-box a:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46,204,113,0.4);
    border: none;
}

/* ─── FAQ ─── */
.faq-section { margin: 2rem 0; }

.faq-item {
    margin-bottom: 1.3rem;
    padding: 1.2rem 1.4rem;
    background: var(--light);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.faq-item h3 {
    font-size: 1.02rem;
    color: var(--primary);
    margin-bottom: 0.4rem;
    font-weight: 600;
    border: none;
    padding: 0;
}

.faq-item p {
    margin-bottom: 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ─── RELATED ARTICLES ─── */
.related-articles {
    max-width: 860px;
    margin: 0 auto 4rem;
    padding: 0 2rem;
}

.related-articles h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

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

.related-articles__grid a {
    display: block;
    background: var(--light);
    border: 1px solid var(--border);
    padding: 1rem 1.2rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    font-size: 0.93rem;
    transition: all 0.3s ease;
    line-height: 1.4;
}

.related-articles__grid a:hover {
    background: white;
    border-color: var(--accent);
    color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

/* ─── FOOTER ─── */
footer {
    background: #0a0a0a;
    color: rgba(255,255,255,0.6);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-content { max-width: 1400px; margin: 0 auto; }

.footer-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    letter-spacing: -0.3px;
    display: block;
    margin-bottom: 1.5rem;
}

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

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-links a:hover { color: var(--accent); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 1.5rem;
    font-size: 0.85rem;
}

/* ─── WHATSAPP FAB ─── */
.whatsapp-fab { display: none; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .nav-links    { display: none; }
    .whatsapp-btn { display: none; }
    .hamburger    { display: flex; }
    .mobile-menu  { display: block; }

    .blog-hero { min-height: auto; padding: 4rem 1.5rem 3rem; }
    .blog-hero h1 { font-size: 2rem; }
    .blog-hero p  { font-size: 1rem; }

    .blog-grid { grid-template-columns: 1fr; padding: 0 1rem; margin-top: 1.5rem; }

    .article-hero { padding: 3rem 1.5rem 2rem; }
    .article-hero h1 { font-size: 1.65rem; }

    .article-content { padding: 0 1.2rem; font-size: 16px; }
    .article-content h2 { font-size: 1.3rem; }

    .breadcrumb { padding: 0 1.2rem; }

    .related-articles { padding: 0 1.2rem; }
    .related-articles__grid { grid-template-columns: 1fr; }

    .cta-box { padding: 1.8rem 1.2rem; }
    .cta-box h3 { font-size: 1.2rem; }

    .footer-links { gap: 1rem; }

    /* WhatsApp FAB */
    .whatsapp-fab {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 20px;
        left: 20px;
        width: 56px;
        height: 56px;
        background: #25d366;
        border-radius: 50%;
        box-shadow: 0 4px 20px rgba(37,211,102,0.5);
        opacity: 0;
        transform: scale(0.8) translateY(10px);
        transition: opacity 0.35s cubic-bezier(0.16,1,0.3,1),
                    transform 0.35s cubic-bezier(0.16,1,0.3,1),
                    box-shadow 0.3s ease;
        pointer-events: none;
        text-decoration: none;
    }

    .whatsapp-fab.fab-visible {
        opacity: 1;
        transform: scale(1) translateY(0);
        pointer-events: auto;
    }

    .whatsapp-fab:hover {
        box-shadow: 0 8px 28px rgba(37,211,102,0.6);
        transform: scale(1.08) translateY(0);
    }

    .whatsapp-fab svg {
        width: 28px;
        height: 28px;
        fill: white;
    }
}

@media (max-width: 480px) {
    .navbar-container { padding: 0.8rem 1rem; }
    .logo { font-size: 1.35rem; }
    .blog-hero h1 { font-size: 1.7rem; }
    .article-hero h1 { font-size: 1.4rem; }
    .article-content h2 { font-size: 1.2rem; }
}
