/* =========================================
   ChickIn Blog Post - Corporate Minimalist
   Diseño profesional para inversionistas
   ========================================= */

/* --- Banner Hero Full Width --- */
.blog-hero-banner {
    width: 100%;
    height: 450px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    box-shadow: inset 0 -80px 100px rgba(0, 0, 0, 0.3);
}

/* --- Hero integrado --- */
.blog-hero {
    position: relative;
    min-height: 520px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    padding: 4rem 0 3.25rem;
}

.blog-hero::before {
    /* Ajusta la intensidad del overlay del banner */
    --hero-overlay-start: rgba(10, 10, 10, 0.4);
    --hero-overlay-mid: rgba(10, 10, 10, 0.85);
    --hero-overlay-end: rgba(10, 10, 10, 0.75);
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--hero-overlay-start) 0%, var(--hero-overlay-mid) 70%, var(--hero-overlay-end) 100%);
}

.blog-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    width: 100%;
}

.blog-post-container--hero {
    padding-top: 2.5rem;
}

.back-link--hero {
    color: var(--chickin-white);
    background: rgba(10, 10, 10, 0.45);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.back-link--hero:hover {
    color: var(--chickin-white);
    background: rgba(10, 10, 10, 0.6);
}

.blog-header--hero {
    margin: 1.5rem 0 0;
    padding: 0;
    border: none;
}

.blog-header--hero .blog-meta {
    color: rgba(255, 255, 255, 0.8);
}

.blog-header--hero .blog-meta .category {
    color: var(--chickin-orange);
}

.blog-header--hero .blog-title {
    color: var(--chickin-white);
    text-shadow: 0 6px 22px rgba(0, 0, 0, 0.4);
}

.blog-header--hero .blog-description {
    color: rgba(255, 255, 255, 0.9);
}

.blog-header--hero .blog-tags .tag {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid transparent;
}

.blog-header--hero .blog-tags .tag:hover {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
}

/* --- Contenedor Principal --- */
.blog-post-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem 5rem;
}

/* --- Navegación --- */
.back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 2rem;
    color: var(--color-text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color var(--transition-fast);
    letter-spacing: 0.02em;
}

.back-link:hover {
    color: var(--chickin-orange);
}

/* --- Header del Blog --- */
.blog-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.blog-meta .separator {
    opacity: 0.5;
}

.blog-meta .category {
    color: var(--chickin-orange);
    font-weight: 700;
}

.blog-title {
    font-family: 'League Spartan', sans-serif;
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--chickin-anthracite);
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.025em;
}

.blog-description {
    font-size: 1.125rem;
    line-height: 1.5;
    color: var(--color-text-light);
    margin: 0;
    font-weight: 400;
}

/* =========================================
   CONTENIDO MARKDOWN
   ========================================= */

.blog-content {
    font-family: 'League Spartan', sans-serif;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--color-text);
}

/* --- Headings --- */
.blog-content h2 {
    font-family: 'League Spartan', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--chickin-anthracite);
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--chickin-orange);
}

.blog-content h3 {
    font-family: 'League Spartan', sans-serif;
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--chickin-anthracite);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.blog-content h4 {
    font-family: 'League Spartan', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--chickin-anthracite);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.blog-content h5 {
    font-family: 'League Spartan', sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--chickin-anthracite);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.blog-content h6 {
    font-family: 'League Spartan', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* --- Párrafos --- */
.blog-content p {
    margin-bottom: 1.25rem;
}

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

/* --- Énfasis de Texto --- */
.blog-content strong,
.blog-content b {
    font-weight: 700;
    color: var(--chickin-anthracite);
}

.blog-content em,
.blog-content i {
    font-style: italic;
}

/* --- Links --- */
.blog-content a {
    color: var(--chickin-orange);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: all var(--transition-fast);
}

.blog-content a:hover {
    color: var(--color-primary-hover);
    text-decoration-thickness: 3px;
}

/* --- Listas --- */
/* Listas sin ordenar (bullets) */
.blog-content ul {
    list-style: none;
    margin: 1.5rem 0;
    padding-left: 0;
}

.blog-content ul li {
    position: relative;
    padding-left: 1.75rem;
    margin-bottom: 0.625rem;
    line-height: 1.6;
}

.blog-content ul li::before {
    content: "";
    position: absolute;
    left: 0.375rem;
    top: 0.625em;
    width: 6px;
    height: 6px;
    background-color: var(--chickin-orange);
    border-radius: 50%;
}

/* Listas ordenadas (numeradas) */
.blog-content ol {
    list-style: none;
    counter-reset: ordered-list;
    margin: 1.5rem 0;
    padding-left: 0;
}

.blog-content ol li {
    position: relative;
    counter-increment: ordered-list;
    padding-left: 2rem;
    margin-bottom: 0.625rem;
    line-height: 1.6;
}

.blog-content ol li::before {
    content: counter(ordered-list) ".";
    position: absolute;
    left: 0;
    color: var(--chickin-orange);
    font-weight: 700;
    font-size: 0.9375rem;
    min-width: 1.5rem;
}

/* Listas anidadas */
.blog-content ul ul,
.blog-content ol ul,
.blog-content ul ol,
.blog-content ol ol {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
}

.blog-content ul ul li::before {
    width: 5px;
    height: 5px;
    top: 0.7em;
    background-color: var(--color-text-muted);
}

.blog-content ol ol li {
    padding-left: 2rem;
}

/* Fix: Cuando un heading está dentro de una lista */
.blog-content li h3,
.blog-content li h4 {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding-left: 0;
    border: none;
    padding-bottom: 0;
}

/* --- Blockquotes --- */
.blog-content blockquote {
    position: relative;
    margin: 2rem 0;
    padding: 1.5rem 2rem;
    background: var(--chickin-offwhite);
    border-left: 4px solid var(--chickin-orange);
    font-style: italic;
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--chickin-anthracite);
}

.blog-content blockquote p {
    margin-bottom: 0.75rem;
}

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

/* --- Imágenes --- */
.blog-content img {
    max-width: 100%;
    height: auto;
    margin: 2rem 0;
    display: block;
    border-radius: 12px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
}

/* --- Tablas --- */
.blog-content .table-responsive {
    margin: 2rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.blog-content .table-responsive table {
    margin: 0;
}

.blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--chickin-white);
    border: 1px solid var(--color-border);
    font-size: 0.9375rem;
}

.blog-content thead {
    background: var(--chickin-anthracite);
}

.blog-content th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-weight: 700;
    color: var(--chickin-white);
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.08em;
    border-bottom: 2px solid var(--chickin-orange);
}

.blog-content td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--color-border-light);
    color: var(--color-text);
}

.blog-content tbody tr {
    transition: background-color var(--transition-fast);
}

.blog-content tbody tr:hover {
    background-color: var(--chickin-offwhite);
}

.blog-content tbody tr:last-child td {
    border-bottom: none;
}

/* --- Código (si se usa) --- */
.blog-content code {
    background: var(--chickin-offwhite);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.875em;
    color: var(--chickin-anthracite);
}

.blog-content pre {
    background: var(--chickin-anthracite);
    color: var(--chickin-white);
    padding: 1.25rem;
    border-radius: var(--border-radius-sm);
    overflow-x: auto;
    margin: 2rem 0;
}

.blog-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* --- Separador Horizontal --- */
.blog-content hr {
    border: none;
    height: 1px;
    background: var(--color-border);
    margin: 3rem 0;
}

/* =========================================
   CALLOUTS - Diseño Moderno ChickIn
   ========================================= */

.blog-content .callout {
    margin: 1.5rem 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all var(--transition-fast);
}

.blog-content .callout:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.blog-content .callout-header {
    display: flex !important;
    align-items: center !important;
    gap: 0.65rem !important;
    padding: 0.45rem 0.95rem !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.7) 100%);
    border-bottom: 2px solid;
    min-height: auto !important;
    height: auto !important;
}

.blog-content .callout-icon {
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0;
    margin: 0 !important;
    display: block;
}

.blog-content .callout-title {
    font-weight: 700;
    font-size: 0.9375rem !important;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
    display: inline-flex;
    align-items: center;
}

.blog-content .callout-content {
    padding: 0.85rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--color-text);
}

.blog-content .callout-content p {
    margin: 0 0 0.625rem 0;
}

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

/* Colores dinámicos por tipo usando data attributes + CSS */
.blog-content .callout-note {
    background: #fff8f0;
    border-left: 4px solid #ef952c;
}

.blog-content .callout-note .callout-header {
    border-bottom-color: #ef952c;
}

.blog-content .callout-note .callout-icon {
    filter: invert(50%) sepia(98%) saturate(651%) hue-rotate(359deg) brightness(96%) contrast(92%);
}

.blog-content .callout-note .callout-title {
    color: #d17d1f;
}

.blog-content .callout-tip {
    background: #f9f5ff;
    border-left: 4px solid #C5B4E3;
}

.blog-content .callout-tip .callout-header {
    border-bottom-color: #C5B4E3;
}

.blog-content .callout-tip .callout-icon {
    filter: invert(68%) sepia(15%) saturate(828%) hue-rotate(215deg) brightness(96%) contrast(85%);
}

.blog-content .callout-tip .callout-title {
    color: #8b5cf6;
}

.blog-content .callout-warning {
    background: #fff8ed;
    border-left: 4px solid #ff9933;
}

.blog-content .callout-warning .callout-header {
    border-bottom-color: #ff9933;
}

.blog-content .callout-warning .callout-icon {
    filter: invert(66%) sepia(76%) saturate(1724%) hue-rotate(346deg) brightness(101%) contrast(101%);
}

.blog-content .callout-warning .callout-title {
    color: #cc7a29;
}

.blog-content .callout-danger {
    background: #f5f5f5;
    border-left: 4px solid #28282d;
}

.blog-content .callout-danger .callout-header {
    border-bottom-color: #28282d;
}

.blog-content .callout-danger .callout-icon {
    filter: brightness(0) saturate(100%);
}

.blog-content .callout-danger .callout-title {
    color: #28282d;
}

.blog-content .callout-info {
    background: #f7f7f7;
    border-left: 4px solid #5a5a5f;
}

.blog-content .callout-info .callout-header {
    border-bottom-color: #5a5a5f;
}

.blog-content .callout-info .callout-icon {
    filter: brightness(0) saturate(100%) opacity(0.6);
}

.blog-content .callout-info .callout-title {
    color: #1f1f23;
}

.blog-content .callout-success {
    background: #f9f5ff;
    border-left: 4px solid #C5B4E3;
}

.blog-content .callout-success .callout-header {
    border-bottom-color: #C5B4E3;
}

.blog-content .callout-success .callout-icon {
    filter: invert(46%) sepia(67%) saturate(1837%) hue-rotate(233deg) brightness(96%) contrast(95%);
}

.blog-content .callout-success .callout-title {
    color: #7c3aed;
}

.blog-content .callout-question {
    background: #fafafa;
    border-left: 4px solid #8a8a8f;
}

.blog-content .callout-question .callout-header {
    border-bottom-color: #8a8a8f;
}

.blog-content .callout-question .callout-icon {
    filter: brightness(0) saturate(100%) opacity(0.5);
}

.blog-content .callout-question .callout-title {
    color: #5a5a5f;
}

.blog-content .callout-example {
    background: #fff4e6;
    border-left: 4px solid #e88d28;
}

.blog-content .callout-example .callout-header {
    border-bottom-color: #e88d28;
}

.blog-content .callout-example .callout-icon {
    filter: invert(60%) sepia(37%) saturate(1656%) hue-rotate(352deg) brightness(93%) contrast(89%);
}

.blog-content .callout-example .callout-title {
    color: #d17d1f;
}

.blog-content .callout-important {
    background: linear-gradient(135deg, #fff8f0 0%, #fff5e8 100%);
    border-left: 4px solid #ef952c;
    box-shadow: 0 2px 8px rgba(239, 149, 44, 0.15);
}

.blog-content .callout-important .callout-header {
    border-bottom-color: #ef952c;
    background: linear-gradient(135deg, rgba(239,149,44,0.1) 0%, rgba(239,149,44,0.05) 100%);
}

.blog-content .callout-important .callout-icon {
    filter: invert(50%) sepia(98%) saturate(651%) hue-rotate(359deg) brightness(96%) contrast(92%);
}

.blog-content .callout-important .callout-title {
    color: #28282d;
    font-weight: 800;
}

/* Responsive */
@media (max-width: 768px) {
    .blog-meta {
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
        font-size: 0.75rem;
        letter-spacing: 0.06em;
    }

    .blog-meta .separator {
        display: none;
    }

    .blog-meta .date,
    .blog-meta .author {
        color: inherit;
        opacity: 0.85;
    }
    .blog-content .callout {
        margin: 1.25rem 0;
    }
    
    .blog-content .callout-header {
        padding: 0.4rem 0.85rem;
        gap: 0.6rem;
    }
    
    .blog-content .callout-icon {
        width: 22px;
        height: 22px;
    }
    
    .blog-content .callout-title {
        font-size: 0.875rem;
    }
    
    .blog-content .callout-content {
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
    }
}

/* =========================================
   TAGS
   ========================================= */

.blog-tags {
    margin-top: 1.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    opacity: 0.55;
}

.tag {
    display: inline-block;
    background: transparent;
    color: inherit;
    padding: 0.1rem 0.4rem;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.tag:hover {
    background: transparent;
    color: inherit;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 768px) {
    .blog-hero-banner {
        height: 350px;
    }

    .blog-hero {
        min-height: 440px;
        padding: 3.25rem 0 2.75rem;
    }
    
    .blog-post-container {
        padding: 2rem 1.25rem 4rem;
    }
    
    .blog-title {
        font-size: 2.25rem;
    }
    
    .blog-description {
        font-size: 1.0625rem;
    }
    
    .blog-content {
        font-size: 1rem;
    }
    
    .blog-content h2 {
        font-size: 1.625rem;
        margin-top: 2.5rem;
    }
    
    .blog-content h3 {
        font-size: 1.25rem;
    }
    
    .blog-content h4 {
        font-size: 1.0625rem;
    }
    
    .blog-content blockquote {
        font-size: 1rem;
        padding: 1.25rem 1.5rem;
    }
    
    .blog-content table {
        font-size: 0.875rem;
    }
    
    .blog-content th,
    .blog-content td {
        padding: 0.75rem 0.875rem;
    }
}

@media (max-width: 480px) {
    .blog-hero-banner {
        height: 280px;
    }

    .blog-hero {
        min-height: 380px;
        padding: 2.75rem 0 2.25rem;
    }
    
    .blog-post-container {
        padding: 1.5rem 1rem 3rem;
    }
    
    .blog-title {
        font-size: 1.875rem;
    }
    
    .blog-description {
        font-size: 1rem;
    }
    
    .blog-content {
        font-size: 0.9375rem;
    }
    
    .blog-content h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
    }
    
    .blog-content h3 {
        font-size: 1.1875rem;
    }
    
    .blog-content ul li,
    .blog-content ol li {
        padding-left: 1.5rem;
    }
    
    .blog-content blockquote {
        font-size: 0.9375rem;
        padding: 1rem;
    }
    
    /* Scroll horizontal para tablas en movil */
    .blog-content table {
        font-size: 0.8125rem;
    }

    .blog-content .table-responsive {
        margin: 1.5rem 0;
    }

    .blog-content .table-responsive table {
        display: table;
        width: max-content;
        min-width: 100%;
    }

    .blog-content th,
    .blog-content td {
        padding: 0.625rem 0.75rem;
    }
}

/* --- Video Responsivo --- */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px; /* Opcional: bordes redondeados */
    margin: 2rem 0; /* Espaciado vertical */
    background: #f0f0f0; /* Placeholder mientras carga */
}

.video-responsive iframe,
.video-responsive object,
.video-responsive embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
