/**
 * css/blog-modern.css
 * Estilos Editoriales y de Blog Corporativo para AER Multinet
 * Identidad: Azul Noche (#0b1329 / #0f172a), Cian (#0284c7 / #38bdf8), Blanco, Naranja (#ea580c)
 */

:root {
    --blog-navy: #0b1329;
    --blog-dark: #0f172a;
    --blog-dark-soft: #1e293b;
    --blog-cyan: #0284c7;
    --blog-cyan-light: #38bdf8;
    --blog-orange: #ea580c;
    --blog-orange-light: #f97316;
    --blog-border: #e2e8f0;
    --blog-bg: #f8fafc;
    --blog-text: #1e293b;
    --blog-muted: #475569;
    --blog-radius: 12px;
}

/* ============================================================
   CABECERA DE SECCIÓN Y FILTROS (CATÁLOGO NEWS.PHP)
============================================================ */
.blog-hero-header {
    background: radial-gradient(circle at 85% 20%, rgba(2, 132, 199, 0.22) 0%, transparent 60%),
                linear-gradient(135deg, #0b1329 0%, #0f172a 100%);
    color: #ffffff;
    padding: 3.5rem 0 2.5rem;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.blog-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(56, 189, 248, 0.15);
    color: var(--blog-cyan-light);
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 0.3rem 0.95rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.85rem;
}

.blog-hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.blog-hero-title span {
    color: var(--blog-cyan-light);
}

.blog-hero-sub {
    font-size: 1.05rem;
    color: #cbd5e1;
    max-width: 720px;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Barra Flotante de Filtros y Búsqueda */
.blog-filter-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--blog-border);
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 110px;
    z-index: 99;
}

.blog-filter-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0;
    gap: 1rem;
    flex-wrap: wrap;
}

.blog-categories-chips {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.cat-chip:hover {
    background: #e2e8f0;
    color: var(--blog-navy);
}

.cat-chip.active {
    background: var(--blog-navy);
    color: #ffffff;
    border-color: var(--blog-navy);
}

.cat-count-badge {
    background: rgba(255, 255, 255, 0.25);
    color: inherit;
    font-size: 0.72rem;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 700;
}

.cat-chip.active .cat-count-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Buscador */
.blog-search-form {
    display: flex;
    align-items: center;
    position: relative;
    min-width: 260px;
}

.blog-search-input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--blog-border);
    font-size: 0.88rem;
    color: var(--blog-dark);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8fafc;
}

.blog-search-input:focus {
    border-color: var(--blog-cyan);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.blog-search-btn {
    position: absolute;
    right: 10px;
    background: transparent;
    border: none;
    color: var(--blog-muted);
    cursor: pointer;
    font-size: 0.9rem;
}

.blog-search-btn:hover {
    color: var(--blog-cyan);
}

/* ============================================================
   PORTADA: ARTÍCULO HERO DESTACADO
============================================================ */
.blog-featured-hero {
    margin: 2.5rem 0 3rem;
    background: #ffffff;
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.06);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-featured-hero:hover {
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.1);
}

.hero-img-wrap {
    position: relative;
    background: var(--blog-dark);
    min-height: 320px;
}

.hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-badge-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--blog-orange);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
}

.hero-content-wrap {
    padding: 2.25rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-cat-label {
    color: var(--blog-cyan);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}

.hero-article-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--blog-dark);
    line-height: 1.3;
    margin-bottom: 0.85rem;
}

.hero-article-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.hero-article-title a:hover {
    color: var(--blog-cyan);
}

.hero-article-excerpt {
    font-size: 0.95rem;
    color: var(--blog-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.hero-meta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.82rem;
    color: var(--blog-muted);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.hero-meta-row strong {
    color: var(--blog-dark);
}

.btn-read-hero {
    align-self: flex-start;
    background: var(--blog-navy);
    color: #ffffff;
    padding: 0.65rem 1.4rem;
    border-radius: 6px;
    font-size: 0.88rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-read-hero:hover {
    background: var(--blog-cyan);
    color: #ffffff;
}

/* ============================================================
   GRILLA DE PUBLICACIONES RECIENTES
============================================================ */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: #ffffff;
    border: 1px solid var(--blog-border);
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -3px rgba(0, 0, 0, 0.08);
}

.blog-card-img-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: var(--blog-dark);
    overflow: hidden;
    display: block;
}

.blog-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-img-wrap img {
    transform: scale(1.04);
}

.card-cat-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(11, 19, 41, 0.88);
    color: var(--blog-cyan-light);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.blog-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta-line {
    font-size: 0.8rem;
    color: var(--blog-muted);
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--blog-dark);
    line-height: 1.35;
    margin-bottom: 0.65rem;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title a:hover {
    color: var(--blog-cyan);
}

.blog-card-excerpt {
    font-size: 0.88rem;
    color: var(--blog-text);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    flex: 1;
}

.card-footer-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--blog-border);
    padding-top: 0.85rem;
    font-size: 0.82rem;
}

.link-read-more {
    font-weight: 700;
    color: var(--blog-cyan);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.link-read-more:hover {
    color: var(--blog-navy);
}

.card-views-count {
    color: var(--blog-muted);
    font-size: 0.75rem;
}

/* ============================================================
   ARTÍCULO INDIVIDUAL (SINGLE ARTICLE VIEW)
   Alto Contraste sobre Fondo Oscuro de AER Multinet
============================================================ */
.article-header-wrapper {
    background: radial-gradient(circle at 85% 20%, rgba(2, 132, 199, 0.18) 0%, transparent 60%),
                linear-gradient(135deg, #0b1329 0%, #0f172a 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 3rem 0 2rem;
    position: relative;
    color: #ffffff;
}

.article-breadcrumbs {
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.article-breadcrumbs a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
}

.article-breadcrumbs a:hover {
    color: var(--blog-cyan-light);
}

.article-breadcrumbs span {
    color: rgba(255, 255, 255, 0.4);
}

.article-hero-h1 {
    font-size: 2.4rem;
    font-weight: 800;
    color: #ffffff !important;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.article-subhead {
    font-size: 1.15rem;
    color: #cbd5e1 !important;
    line-height: 1.65;
    margin-bottom: 1.75rem;
}

.article-author-strip {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.author-pill-box {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.author-avatar-initial {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.author-details strong {
    display: block;
    font-size: 0.95rem;
    color: #ffffff !important;
    font-weight: 700;
}

.author-details span {
    font-size: 0.82rem;
    color: #cbd5e1 !important;
}
}

/* Redes Sociales en el encabezado */
.article-share-strip {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-social-share {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.15s ease;
    border: none;
    cursor: pointer;
}

.btn-social-share:hover {
    transform: translateY(-2px);
    opacity: 0.92;
    color: #ffffff;
}

.btn-share-wa { background: #25d366; }
.btn-share-in { background: #0077b5; }
.btn-share-tw { background: #0f172a; }
.btn-share-copy { background: #e2e8f0; color: #334155 !important; }
.btn-share-copy:hover { background: #cbd5e1; }

/* Contenedor del Cuerpo del Artículo */
.article-featured-image-box {
    margin: 2rem 0 2.5rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08);
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.35);
}

.article-featured-image-box img {
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

.article-main-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #e2e8f0 !important;
}

.article-main-body h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #ffffff !important;
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
}

.article-main-body h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff !important;
    margin: 2rem 0 0.85rem;
    line-height: 1.35;
}

.article-main-body h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff !important;
    margin: 1.5rem 0 0.75rem;
}

.article-main-body p {
    margin-bottom: 1.5rem;
    color: #e2e8f0 !important;
}

.article-main-body ul, .article-main-body ol {
    margin: 1.5rem 0 1.75rem 2rem;
    color: #e2e8f0 !important;
}

.article-main-body li {
    margin-bottom: 0.6rem;
    color: #e2e8f0 !important;
}

.article-main-body a {
    color: #38bdf8 !important;
    text-decoration: underline;
}

.article-main-body a:hover {
    color: #67e8f9 !important;
}

.article-main-body strong {
    color: #ffffff !important;
}

.article-main-body blockquote {
    border-left: 4px solid #38bdf8;
    padding: 1.25rem 1.75rem;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid #38bdf8;
    border-radius: 0 8px 8px 0;
    margin: 2rem 0;
    font-style: italic;
    color: #e2e8f0 !important;
    font-size: 1.05rem;
}

/* ============================================================
   BLOQUES DE LLAMADO A LA ACCIÓN COMERCIAL (CTA)
   Alto Contraste y Tipografía Clara
============================================================ */
.blog-commercial-cta {
    background: linear-gradient(135deg, #0b1329 0%, #1e293b 100%);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: var(--blog-radius);
    padding: 2.25rem;
    margin: 3rem 0;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 12px 28px -6px rgba(11, 19, 41, 0.35);
}

.cta-left-text {
    max-width: 540px;
    text-align: left;
}

.cta-tag-mini {
    display: inline-block;
    background: rgba(234, 88, 12, 0.25);
    color: #fdba74;
    border: 1px solid rgba(234, 88, 12, 0.5);
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.65rem;
}

.cta-title {
    font-size: 1.45rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #ffffff;
    line-height: 1.3;
}

.cta-desc {
    font-size: 0.95rem;
    color: #e2e8f0;
    line-height: 1.6;
    margin-bottom: 0;
}

.btn-cta-commercial {
    background: var(--blog-cyan);
    color: #ffffff;
    font-weight: 700;
    padding: 0.85rem 1.65rem;
    border-radius: 8px;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.4);
}

.btn-cta-commercial:hover {
    background: #0369a1;
    color: #ffffff;
    transform: translateY(-2px);
}

/* Navegación Anterior / Siguiente */
.article-nav-prev-next {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 3rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1.5rem 0;
}

.nav-article-card {
    display: flex;
    flex-direction: column;
}

.nav-article-card.next {
    text-align: right;
}

.nav-sublabel {
    font-size: 0.78rem;
    text-transform: uppercase;
    color: #cbd5e1 !important;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.nav-title-link {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.2s;
}

.nav-title-link:hover {
    color: #38bdf8 !important;
}

/* News Catalog Grid Header */
.blog-catalog-grid-head,
div[style*="border-bottom: 2px solid var(--blog-navy)"] {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding-bottom: 0.5rem;
}
.blog-catalog-grid-head h2,
div[style*="border-bottom: 2px solid var(--blog-navy)"] h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff !important;
}
.blog-catalog-grid-head span,
div[style*="border-bottom: 2px solid var(--blog-navy)"] span {
    font-size: 0.85rem;
    color: #cbd5e1 !important;
}

/* Article Tags & Meta Fixes over Dark Background */
.article-main-body div[style*="background: #f8fafc"] {
    background: rgba(15, 23, 42, 0.65) !important;
    border-color: rgba(255, 255, 255, 0.12) !important;
}
.article-main-body div[style*="background: #f8fafc"] strong {
    color: #ffffff !important;
}
.article-main-body div[style*="background: #f8fafc"] span {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: #e2e8f0 !important;
}

.nav-article-card span[style*="color: #94a3b8"] {
    color: #cbd5e1 !important;
}

/* ============================================================
   RESPONSIVE DESIGN (MÓVILES Y TABLETS)
============================================================ */
@media (max-width: 992px) {
    .blog-filter-bar {
        top: 100px;
    }
    .blog-featured-hero {
        grid-template-columns: 1fr;
    }
    .hero-img-wrap {
        min-height: 240px;
    }
    .hero-content-wrap {
        padding: 1.5rem;
    }
    .blog-hero-title {
        font-size: 2rem;
    }
    .article-hero-h1 {
        font-size: 1.85rem;
    }
    .blog-commercial-cta {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        padding: 1.75rem;
    }
    .btn-cta-commercial {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .blog-filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    .blog-search-form {
        width: 100%;
    }
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }
    .article-nav-prev-next {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .nav-article-card.next {
        text-align: left;
    }
    .article-author-strip {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================================
   INTEGRACIÓN EN PORTADA (HOME BLOG SECTION) - ALTO CONTRASTE
   ============================================================ */
.home-blog-section {
    background: #ffffff !important;
}
.home-blog-section .section-title h2,
.home-blog-section #home-blog-title {
    color: #0b1329 !important;
}
.home-blog-section p {
    color: #475569 !important;
}
.home-blog-section .blog-card-excerpt {
    color: #1e293b !important;
}
.home-blog-section .blog-card-title a {
    color: #0b1329 !important;
}
.home-blog-section .blog-card-title a:hover {
    color: #0284c7 !important;
}
.home-blog-section .blog-meta-line,
.home-blog-section .blog-meta-line span {
    color: #475569 !important;
}
