/* ==========================================================================
   Editorial Blog Styles - Espaciados amplios, tipografía cuidada y anti-slop
   ========================================================================== */

/* Contenedor y Card Principal */
.editorial-article-card {
    background-color: #ffffff;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 4px 25px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    margin-bottom: 2.5rem;
}

@media (min-width: 640px) {
    .editorial-article-card {
        padding: 3rem 3.5rem;
    }
}

/* Espaciados entre secciones y párrafos */
.editorial-content > section {
    margin-bottom: 3.5rem;
}

.editorial-content > section:last-child {
    margin-bottom: 0;
}

.editorial-content p {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #374151;
    margin-bottom: 1.5rem;
}

.editorial-content p:last-child {
    margin-bottom: 0;
}

/* Encabezados */
.editorial-content h2 {
    font-family: var(--font-heading, "Outfit", sans-serif);
    font-size: 1.625rem;
    font-weight: 800;
    line-height: 1.3;
    color: #064e3b;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.875rem;
    border-bottom: 2px solid #f0fdf4;
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

@media (min-width: 640px) {
    .editorial-content h2 {
        font-size: 1.875rem;
    }
}

.editorial-step-badge {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.625rem;
    background-color: #ecfdf5;
    color: #059669;
    font-size: 1rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.editorial-content h3 {
    font-family: var(--font-heading, "Outfit", sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    color: #1f2937;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
}

/* Caja Resumen en 30 segundos */
.editorial-summary-box {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 1.25rem;
    padding: 1.75rem 2rem;
    margin: 2rem 0 2.5rem 0;
    box-shadow: 0 2px 10px rgba(5, 150, 105, 0.04);
}

.editorial-summary-title {
    font-size: 1.0625rem;
    font-weight: 800;
    color: #064e3b;
    margin-bottom: 0.625rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.editorial-summary-box p {
    font-size: 0.975rem;
    line-height: 1.75;
    color: #065f46;
    margin-bottom: 0;
}

/* Bloques de Estadísticas / Números */
.editorial-stat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin: 2rem 0;
}

@media (min-width: 640px) {
    .editorial-stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

.editorial-stat-card {
    padding: 1.75rem;
    border-radius: 1.25rem;
    border: 1px solid #e5e7eb;
}

.editorial-stat-card.danger {
    background-color: #fef2f2;
    border-color: #fecaca;
}

.editorial-stat-card.success {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
}

.editorial-stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.025em;
    margin-bottom: 0.35rem;
}

.editorial-stat-card.danger .editorial-stat-label {
    color: #991b1b;
}

.editorial-stat-card.success .editorial-stat-label {
    color: #065f46;
}

.editorial-stat-number {
    font-size: 2.25rem;
    font-weight: 900;
    line-height: 1.1;
    margin: 0.25rem 0 0.5rem 0;
    letter-spacing: -0.025em;
}

.editorial-stat-card.danger .editorial-stat-number {
    color: #7f1d1d;
}

.editorial-stat-card.success .editorial-stat-number {
    color: #064e3b;
}

.editorial-stat-desc {
    font-size: 0.8125rem;
    line-height: 1.5;
    margin-bottom: 0 !important;
}

.editorial-stat-card.danger .editorial-stat-desc {
    color: #991b1b;
}

.editorial-stat-card.success .editorial-stat-desc {
    color: #065f46;
}

/* Citas Editoriales (Blockquotes) */
.editorial-quote {
    margin: 2.25rem 0;
    padding: 1.5rem 2rem;
    border-left: 4px solid #10b981;
    background-color: #f0fdf4;
    border-radius: 0 1.25rem 1.25rem 0;
    font-style: italic;
    color: #1f2937;
    font-size: 1.0625rem;
    line-height: 1.75;
}

/* Tarjetas de Pilares / Características */
.editorial-feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin: 2rem 0;
}

.editorial-feature-card {
    padding: 1.5rem 1.75rem;
    border-radius: 1.25rem;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.editorial-feature-card:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.editorial-feature-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.editorial-feature-desc {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.65;
    margin-bottom: 0 !important;
}

/* Listas con Icono */
.editorial-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin: 1.75rem 0;
    padding: 0;
    list-style: none;
}

.editorial-list-item {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    background-color: #f9fafb;
    border-radius: 0.875rem;
    border: 1px solid #f3f4f6;
    font-size: 0.975rem;
    line-height: 1.65;
    color: #374151;
}

.editorial-list-item i {
    color: #059669;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Tablas Comparativas */
.editorial-table-wrapper {
    margin: 2.25rem 0;
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.editorial-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9375rem;
}

.editorial-table th {
    padding: 1.125rem 1.25rem;
    background-color: #f8fafc;
    font-weight: 700;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
}

.editorial-table td {
    padding: 1.125rem 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    color: #4b5563;
    line-height: 1.6;
}

.editorial-table tr:last-child td {
    border-bottom: none;
}

/* Caja de Autor */
.editorial-author-box {
    margin-top: 3.5rem;
    padding: 2rem;
    border-radius: 1.25rem;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: center;
    text-align: center;
}

@media (min-width: 640px) {
    .editorial-author-box {
        flex-direction: row;
        text-align: left;
        gap: 1.5rem;
    }
}

.editorial-author-avatar {
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 9999px;
    background-color: #059669;
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

/* Sidebar Widgets */
.editorial-sidebar-widget {
    background-color: #ffffff;
    border-radius: 1.5rem;
    padding: 1.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.editorial-sidebar-cta {
    background-color: #064e3b;
    color: #ffffff;
    border-radius: 1.5rem;
    padding: 2rem 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px -5px rgba(6, 78, 59, 0.3);
    margin-bottom: 1.5rem;
}

/* Badge de categoría (padding real; no depende de utilidades Tailwind ausentes) */
.editorial-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}

.editorial-badge--emerald {
    background-color: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}

.editorial-badge--blue {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.editorial-badge--on-dark {
    background-color: rgba(74, 222, 128, 0.12);
    border-color: rgba(74, 222, 128, 0.35);
    color: #86efac;
    margin-bottom: 1rem;
}

/* Imagen destacada compacta */
.editorial-featured-media {
    max-width: 28rem;
    margin: 0 auto 2rem;
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.editorial-featured-media img {
    display: block;
    width: 100%;
    height: 11.5rem;
    object-fit: cover;
}

@media (min-width: 640px) {
    .editorial-featured-media img {
        height: 13.5rem;
    }
}

.editorial-meta-sep {
    margin: 0 0.4rem;
    color: #9ca3af;
}

.editorial-share-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
    border: 0;
    padding: 0;
}

.editorial-share-btn svg {
    width: 0.875rem;
    height: 0.875rem;
    flex-shrink: 0;
}

/* Badge sobre imagen de tarjeta del listado */
.editorial-card-image-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

.editorial-card-image-badge--green {
    background-color: #4ade80;
    color: #064e3b;
}

.editorial-card-image-badge--blue {
    background-color: #2563eb;
    color: #fff;
}

.editorial-card-image-badge--emerald {
    background-color: #059669;
    color: #fff;
}

/* Stats del hero del blog */
.editorial-hero-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 2.5rem;
}

@media (min-width: 640px) {
    .editorial-hero-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

.editorial-hero-stat {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
    padding: 1.35rem 1.35rem 1.4rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.editorial-hero-stat::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #4ade80, #059669);
}

.editorial-hero-stat-inner {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.editorial-hero-stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
    color: #4ade80;
    background: rgba(74, 222, 128, 0.14);
    border: 1px solid rgba(74, 222, 128, 0.28);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.editorial-hero-stat-title {
    margin: 0;
    font-family: var(--font-heading, "Outfit", sans-serif);
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.25;
    color: #fff;
    letter-spacing: -0.02em;
}

.editorial-hero-stat-copy {
    margin: 0.4rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.45;
    color: rgba(209, 213, 219, 0.92);
}
