/* ==========================================================================
   DET Consultores — Blog module styles
   Extends styles.css tokens (--primary-color, --font-main). No new palette.
   ========================================================================== */

/* Reused inner-page patterns (kept consistent with servicio-*.html pages) */
.breadcrumb-area {
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 14px 0;
}
.breadcrumb { background: none; margin: 0; padding: 0; font-size: 0.88rem; }
.breadcrumb-item a { color: var(--primary-color); text-decoration: none; }
.breadcrumb-item.active { color: #6c757d; }

.section-label {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.cta-section {
    background: #0c59db;
    color: #fff;
    padding: 80px 0;
}

/* -------------------- Blog hero (home) -------------------- */
.blog-hero {
    padding: 130px 0 70px;
    background: #002249;
    color: #fff;
}
.blog-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 700; }
.blog-hero p.lead { color: rgba(255,255,255,0.8); font-size: 1.1rem; }

.blog-search-box {
    background: #fff;
    border-radius: 50px;
    padding: 6px 6px 6px 22px;
    display: flex;
    align-items: center;
    box-shadow: 0 15px 40px rgba(0,0,0,0.25);
    max-width: 640px;
}
.blog-search-box input {
    border: none;
    outline: none;
    flex: 1;
    padding: 12px 10px;
    font-size: 0.95rem;
    background: transparent;
}
.blog-search-box button {
    white-space: nowrap;
}
#blog-search-feedback { color: rgba(255,255,255,0.75); font-size: 0.85rem; }

/* Category badge on article header (matches badge-service pattern from servicio-*.html) */
.badge-service {
    color: #fff;
    font-size: 0.8rem;
    padding: 6px 16px;
    border-radius: 50px;
    display: inline-block;
    font-weight: 600;
    text-decoration: none;
}
.badge-service:hover { color: #fff; opacity: 0.9; }

/* -------------------- Category hero -------------------- */
.category-hero {
    padding: 110px 0 60px;
    color: #fff;
}
.category-hero .category-icon-badge {
    width: 64px; height: 64px;
    border-radius: 16px;
    background: rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 18px;
}

/* -------------------- Cover art (solid color; swaps to a real photo automatically
   the moment a file exists at blog/assets/img/covers/<path> — see build.js coverBackground()) -------------------- */
.article-cover {
    position: relative;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.article-cover i {
    font-size: 4.5rem;
    color: rgba(255,255,255,0.35);
    transition: transform 0.5s ease;
}
.blog-card:hover .article-cover i { transform: scale(1.12) rotate(-4deg); }
.article-cover.has-image i,
.article-cover-hero.has-image i { display: none; }

.article-cover-hero {
    border-radius: 18px;
    height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}
.article-cover-hero i { font-size: 7rem; color: rgba(255,255,255,0.4); }

/* -------------------- Category cards -------------------- */
.category-card {
    display: block;
    text-decoration: none;
    background: #fff;
    border-radius: 14px;
    padding: 28px 22px;
    height: 100%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eef1f5;
}
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}
.category-card .cat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 16px;
}
.category-card h5 { color: #212529; }
.category-card .cat-count { color: #6c757d; font-size: 0.82rem; }

/* -------------------- Trending list -------------------- */
.trending-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #eef1f5;
    text-decoration: none;
    color: inherit;
}
.trending-item:last-child { border-bottom: none; }
.trending-item .trend-rank {
    font-size: 2.2rem;
    font-weight: 700;
    color: #e3ecfb;
    line-height: 1;
    flex-shrink: 0;
}
.trending-item:hover .trend-rank { color: var(--primary-color); }
.trending-item h6 { color: #212529; margin-bottom: 4px; }
.trending-item:hover h6 { color: var(--primary-color); }

/* -------------------- Newsletter -------------------- */
.newsletter-box {
    background: #002249;
    border-radius: 20px;
    padding: 50px 40px;
    color: #fff;
}
.newsletter-box .form-control {
    border-radius: 50px;
    border: none;
    padding: 14px 20px;
    height: auto;
}
.newsletter-box small { color: rgba(255,255,255,0.55); }

/* -------------------- Article layout -------------------- */
.reading-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: var(--primary-color);
    z-index: 1050;
    transition: width 0.1s ease-out;
}

.article-meta-row {
    color: #6c757d;
    font-size: 0.88rem;
}
.article-meta-row .sep { margin: 0 8px; opacity: 0.5; }

.article-content {
    font-size: 1.08rem;
    line-height: 1.85;
    color: #343a40;
}
.article-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 2.4rem;
    margin-bottom: 1rem;
    scroll-margin-top: 100px;
}
.article-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    scroll-margin-top: 100px;
}
.article-content p { margin-bottom: 1.3rem; }
.article-content ul { margin-bottom: 1.3rem; padding-left: 1.4rem; }
.article-content li { margin-bottom: 0.5rem; }
.article-content blockquote {
    border-left: 4px solid var(--primary-color);
    background: #f4f8ff;
    padding: 20px 24px;
    border-radius: 0 12px 12px 0;
    font-size: 1.1rem;
    font-style: italic;
    color: #0a3d91;
    margin: 1.8rem 0;
}
.article-content img { max-width: 100%; border-radius: 12px; }

/* Table of contents */
.toc-box {
    background: #f8f9fa;
    border-radius: 14px;
    padding: 22px;
}
.toc-box .toc-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #6c757d;
    margin-bottom: 14px;
}
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { margin-bottom: 4px; }
.toc-list a {
    display: block;
    padding: 6px 10px;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
}
.toc-list a.toc-h3 { padding-left: 22px; font-size: 0.85rem; }
.toc-list a:hover { background: #eef3fb; color: var(--primary-color); }
.toc-list a.active {
    color: var(--primary-color);
    font-weight: 600;
    border-left-color: var(--primary-color);
    background: #eef3fb;
}

/* Share buttons */
.share-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.share-btn {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #f1f3f5;
    color: #495057;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
}
.share-btn:hover { transform: translateY(-3px); color: #fff; }
.share-btn.linkedin:hover { background: #0a66c2; }
.share-btn.twitter:hover { background: #0a0a0a; }
.share-btn.whatsapp:hover { background: #25d366; }
.share-btn.copy:hover { background: var(--primary-color); }

/* "¿Cómo puede ayudar DET Consultores?" conversion block */
.help-cta-section {
    background: #f4f8ff;
    border-radius: 20px;
    padding: 40px;
    margin: 3rem 0;
    border: 1px solid #e3ecfb;
}
.help-cta-section .related-service-chip {
    display: inline-block;
    background: #fff;
    border: 1px solid #dbe6f7;
    color: var(--primary-color);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 8px 8px 0;
    text-decoration: none;
}
.help-cta-section .related-service-chip:hover { background: var(--primary-color); color: #fff; }

/* Author box */
.author-box {
    display: flex; align-items: center; gap: 14px;
}
.author-avatar {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* Category filter chips (category page) */
.chip-filter {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 50px;
    background: #fff;
    border: 1px solid #dee2e6;
    color: #495057;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 8px 10px 0;
}
.chip-filter.active,
.chip-filter:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

@media (max-width: 991px) {
    .toc-box { margin-top: 2rem; }
    .article-cover-hero { height: 220px; }
    .article-cover-hero i { font-size: 4.5rem; }
}
