/* ============================================================
   BLOG INDEX — FrandoWeb
   Glassmorphism Dark + Neon Accents
   ============================================================ */

/* ── Variables locales ───────────────────────────────────── */
:root {
    --bl-primary:    #2563eb;
    --bl-primary-g:  #1d4ed8;
    --bl-accent:     #00d4ff;
    --bl-dark:       #0F1419;
    --bl-dark2:      #131a22;
    --bl-card-bg:    rgba(255,255,255,0.07);
    --bl-card-bd:    rgba(255,255,255,0.13);
    --bl-card-bd-h:  rgba(37,99,235,0.55);
    --bl-text:       #f1f5f9;
    --bl-muted:      #6b7280;
    --bl-subtle:     #4b5563;

    /* Colores de categoría */
    --cat-precios:    #f59e0b;
    --cat-tendencias: #00d4ff;
    --cat-estrategia: #a78bfa;
    --cat-negocio:    #34d399;
}

/* ── Page base ───────────────────────────────────────────── */
body {
    background-color: var(--bl-dark);
    background-image:
        radial-gradient(ellipse 80% 40% at 50% 0%, rgba(37,99,235,0.09) 0%, transparent 70%),
        radial-gradient(ellipse 60% 30% at 80% 60%, rgba(0,212,255,0.05) 0%, transparent 60%);
    background-attachment: fixed;
}

/* ── Animación compartida con precios/contacto ───────────── */
@keyframes heroFadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Hero ────────────────────────────────────────────────── */
.hero-blog {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    padding: clamp(94px, 14vw, 138px) 0 clamp(70px, 9.5vw, 104px);
    background-image: url("https://images.unsplash.com/photo-1499750310107-5fef28a66643?auto=format&fit=crop&w=1920&h=1080&q=80");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Overlay oscuro degradado */
.hero-blog::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(122deg, rgba(8,15,31,0.86) 0%, rgba(17,34,68,0.78) 52%, rgba(10,60,100,0.65) 100%);
    z-index: 1;
}

/* Glows radiales cian + azul (igual que contacto) */
.hero-blog::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 20%, rgba(0,212,255,0.16) 0%, transparent 44%),
        radial-gradient(circle at 84% 70%, rgba(59,130,246,0.22) 0%, transparent 46%);
    z-index: 1;
}

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

.hero-blog .breadcrumb {
    --bs-breadcrumb-divider-color: rgba(248,250,252,0.58);
}

.hero-blog .breadcrumb-item,
.hero-blog .breadcrumb-item.active,
.hero-blog .breadcrumb-item a {
    color: rgba(248,250,252,0.86);
}

.hero-blog .breadcrumb-item a {
    text-decoration: none;
}

.hero-blog .breadcrumb-item a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.hero-blog h1 {
    font-size: clamp(2.35rem, 5.8vw, 4.15rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 1.05rem;
    text-wrap: balance;
    animation: heroFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero-blog .lead {
    max-width: 600px;
    margin: 0;
    color: rgba(248,250,252,0.9);
    font-size: clamp(1.04rem, 2vw, 1.22rem);
    animation: heroFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.blog-hero-icon {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    color: rgba(248,250,252,0.72);
    filter: drop-shadow(0 8px 18px rgba(8,15,31,0.45));
    animation: heroFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
}

@media (max-width: 991.98px) {
    .blog-hero-icon { display: none; }
}
@media (max-width: 575.98px) {
    .hero-blog .lead { font-size: 1rem; }
}

/* ── Filter bar ──────────────────────────────────────────── */
.blog-filter-wrap {
    padding: 40px 0 28px;
}
.blog-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.blog-filter-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--bl-subtle);
    margin-right: 4px;
    white-space: nowrap;
}
.blog-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    border-radius: 40px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    color: var(--bl-muted);
    cursor: pointer;
    transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
    white-space: nowrap;
    letter-spacing: .3px;
}
.blog-pill:hover {
    border-color: rgba(255,255,255,0.25);
    color: var(--bl-text);
}
.blog-pill.active {
    background: var(--bl-primary);
    border-color: var(--bl-primary);
    color: #fff;
    box-shadow: 0 0 18px rgba(37,99,235,0.35);
}
.blog-pill-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Divider degradado */
.blog-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.07) 20%, rgba(255,255,255,0.07) 80%, transparent);
    margin-bottom: 32px;
}

/* ── Grid ────────────────────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* ── Glass card base ─────────────────────────────────────── */
.bl-card {
    background: var(--bl-card-bg);
    border: 1px solid var(--bl-card-bd);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
.bl-card:hover {
    transform: translateY(-4px);
    border-color: var(--bl-card-bd-h);
    box-shadow:
        0 12px 40px rgba(0,0,0,0.35),
        0 0 0 1px rgba(37,99,235,0.1);
}

/* Línea neon top al hover */
.bl-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--bl-accent) 50%, transparent 100%);
    opacity: 0;
    transition: opacity .28s ease;
    z-index: 2;
}
.bl-card:hover::before { opacity: 1; }

/* Card imagen */
.bl-card-img-wrap {
    position: relative;
    overflow: hidden;
    height: 200px;
    flex-shrink: 0;
}
.bl-card-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .45s ease;
    display: block;
}
.bl-card:hover .bl-card-img-wrap img {
    transform: scale(1.04);
}
/* Overlay sobre imagen */
.bl-card-img-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(15,20,25,0.65) 100%);
}

/* Body */
.bl-card-body {
    padding: 22px 24px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Categoría tag */
.bl-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 11px;
}
.bl-cat-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    flex-shrink: 0;
}
.bl-cat-precios    { color: var(--cat-precios); }
.bl-cat-precios .bl-cat-dot { background: var(--cat-precios); }
.bl-cat-tendencias { color: var(--cat-tendencias); }
.bl-cat-tendencias .bl-cat-dot { background: var(--cat-tendencias); }
.bl-cat-estrategia { color: var(--cat-estrategia); }
.bl-cat-estrategia .bl-cat-dot { background: var(--cat-estrategia); }
.bl-cat-negocio    { color: var(--cat-negocio); }
.bl-cat-negocio .bl-cat-dot { background: var(--cat-negocio); }

.bl-card-title {
    font-family: var(--font-display, 'Montserrat', sans-serif);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--bl-text);
    margin-bottom: 10px;
    transition: color .2s;
}
.bl-card:hover .bl-card-title { color: #fff; }

.bl-card-excerpt {
    font-size: 13px;
    color: var(--bl-muted);
    line-height: 1.65;
    margin-bottom: 18px;
    flex: 1;
}

.bl-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--bl-subtle);
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.bl-card-foot-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}
.bl-read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #93c5fd;
    font-weight: 700;
    font-size: 11px;
    letter-spacing: .4px;
    transition: gap .2s, color .2s;
}
.bl-card:hover .bl-read-more {
    gap: 8px;
    color: var(--bl-accent);
}

/* ── Card featured ───────────────────────────────────────── */
.bl-card-featured {
    grid-column: span 3;
    flex-direction: row;
    min-height: 300px;
    background: rgba(37,99,235,0.10);
    border-color: rgba(37,99,235,0.28);
}
.bl-card-featured:hover {
    border-color: rgba(37,99,235,0.5);
    box-shadow:
        0 16px 50px rgba(37,99,235,0.12),
        0 0 0 1px rgba(37,99,235,0.15);
}
.bl-card-featured .bl-card-img-wrap {
    width: 45%;
    height: auto;
    flex-shrink: 0;
    border-radius: 0;
}
.bl-card-featured .bl-card-img-wrap::after {
    background: linear-gradient(to right, transparent 60%, rgba(15,20,25,0.3) 100%);
}
.bl-card-featured .bl-card-body {
    padding: 36px 36px 32px;
    justify-content: center;
}
.bl-card-featured .bl-card-title {
    font-size: 24px;
    line-height: 1.25;
    margin-bottom: 14px;
}
.bl-card-featured .bl-card-excerpt {
    font-size: 14px;
    margin-bottom: 24px;
}

/* Badge "Destacado" */
.bl-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,212,255,0.1);
    border: 1px solid rgba(0,212,255,0.25);
    border-radius: 40px;
    padding: 4px 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--bl-accent);
    margin-bottom: 14px;
}

/* ── Card wide ───────────────────────────────────────────── */
.bl-card-wide { grid-column: span 2; }

/* ── Animación de entrada ────────────────────────────────── */
.bl-card {
    animation: cardIn .55s ease both;
}
@keyframes cardIn {
    from { opacity:0; transform:translateY(18px); }
    to   { opacity:1; transform:translateY(0); }
}
.bl-card:nth-child(1) { animation-delay: .05s; }
.bl-card:nth-child(2) { animation-delay: .12s; }
.bl-card:nth-child(3) { animation-delay: .19s; }
.bl-card:nth-child(4) { animation-delay: .26s; }
.bl-card:nth-child(5) { animation-delay: .33s; }
.bl-card:nth-child(6) { animation-delay: .40s; }

/* Estado oculto del filtro */
.bl-card.bl-hidden {
    display: none;
}

/* ── CTA strip ───────────────────────────────────────────── */
.blog-cta {
    position: relative;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(37,99,235,0.32);
    border-radius: 18px;
    padding: 40px 48px;
    margin-bottom: 60px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.blog-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(600px 300px at 10% 50%, rgba(37,99,235,0.1), transparent 70%),
        radial-gradient(400px 200px at 90% 50%, rgba(0,212,255,0.06), transparent 70%);
    pointer-events: none;
}
.blog-cta-text { position: relative; z-index: 1; }
.blog-cta-title {
    font-family: var(--font-display, 'Montserrat', sans-serif);
    font-size: 20px;
    font-weight: 800;
    color: var(--bl-text);
    margin-bottom: 6px;
}
.blog-cta-sub {
    font-size: 14px;
    color: var(--bl-muted);
}
.blog-cta-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--bl-primary), var(--bl-primary-g));
    color: #fff;
    padding: 14px 28px;
    border-radius: 10px;
    font-family: var(--font-display, 'Montserrat', sans-serif);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(37,99,235,0.4);
    transition: transform .2s, box-shadow .2s;
    white-space: nowrap;
}
.blog-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37,99,235,0.5);
    color: #fff;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 991.98px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .bl-card-featured {
        grid-column: span 2;
        flex-direction: column;
    }
    .bl-card-featured .bl-card-img-wrap {
        width: 100%;
        height: 220px;
    }
    .bl-card-wide { grid-column: span 2; }
    .bl-card-featured .bl-card-body { padding: 24px; }
    .bl-card-featured .bl-card-title { font-size: 20px; }
    .blog-cta {
        flex-direction: column;
        text-align: center;
        padding: 32px 28px;
    }
}

@media (max-width: 575.98px) {
    .blog-hero { padding: 110px 0 48px; }
    .blog-hero-title { font-size: 26px; letter-spacing: -0.5px; }
    .blog-hero-stats { flex-wrap: wrap; border-radius: 16px; }
    .blog-hero-stat { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.07); width: 50%; justify-content: center; }
    .blog-hero-stat:nth-child(2n) { border-right: none; }
    .blog-grid { grid-template-columns: 1fr; }
    .bl-card-featured, .bl-card-wide { grid-column: span 1; }
    .bl-card-featured .bl-card-img-wrap { height: 180px; }
    .blog-filter-bar { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
    .blog-filter-bar::-webkit-scrollbar { display: none; }
    .blog-cta { padding: 24px 20px; }
    .blog-cta-title { font-size: 17px; }
}
