/* ==========================================================================
   ESTILOS DE ARTÍCULO EDITORIAL - REVOLUCIÓN ASEGURADORA
   ========================================================================== */

:root {
  --bg-color: #f8f9fa;
  --bg-card: rgba(255, 255, 255, 0.85);
  --border-color: rgba(226, 232, 240, 0.8);
  
  --text-main: #1e293b;
  --text-muted: #475569;
  
  /* Paleta Adrianjaen.org */
  --color-accent: #06b6d4; /* Cyan */
  --color-accent-hover: #0891b2;
  --color-accent-glow: rgba(6, 182, 212, 0.15);
  
  --color-orange: #ff6b35; /* Coral */
  --color-green: #10b981; /* Emerald */
  --color-red: #ef4444; /* Rose */
  
  --font-family: 'Inter', sans-serif;
  --font-title: 'Montserrat', sans-serif;
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 24px;
  --shadow: 0 10px 30px rgba(30, 41, 59, 0.03);
  --shadow-hover: 0 20px 45px rgba(30, 41, 59, 0.07);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-color);
  background-image: 
    radial-gradient(at 0% 0%, rgba(6, 182, 212, 0.04) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(255, 107, 53, 0.02) 0px, transparent 50%);
  color: var(--text-main);
  font-family: var(--font-family);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Cabecera */
header {
  padding: 1.5rem 4%;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.logo-container h1 {
  font-size: 1.5rem;
  font-weight: 850;
  font-family: var(--font-title);
  letter-spacing: -0.5px;
}

.logo-container p {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.badge-platform {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.15);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* Maquetación Editorial */
.article-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

article {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 3.5rem 4rem;
  box-shadow: var(--shadow);
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 1rem 4%;
    width: 100% !important;
    left: 0;
    right: 0;
  }
  .badge-platform {
    align-self: flex-start;
    font-size: 0.65rem;
    padding: 4px 10px;
  }
  .logo-container h1 {
    font-size: 1.15rem !important;
    line-height: 1.3 !important;
  }
  article {
    padding: 2rem 1.25rem;
    max-width: 100% !important;
    overflow-x: hidden;
  }
  h2.article-title {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem;
  }
  .article-lead {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }
  article h3 {
    font-size: 1.15rem !important;
    margin-top: 1.75rem;
  }
  blockquote {
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
  }
  blockquote p {
    font-size: 0.9rem !important;
  }
  /* Responsividad para Fórmulas Actuariales en LaTeX */
  .mjx-container, mjx-container {
    font-size: 0.72rem !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    max-width: 100% !important;
    display: block !important;
    padding: 0.75rem 0 !important;
  }
}

/* Tipografía de Artículo */
.article-meta {
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-accent);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

h2.article-title {
  font-family: var(--font-title);
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.8px;
  color: var(--text-main);
  margin-bottom: 1.5rem;
}

.article-lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2rem;
}

article h3 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--color-accent);
  padding-left: 12px;
}

article p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  text-align: justify;
}

article ul, article ol {
  margin-left: 24px;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

article li {
  margin-bottom: 8px;
}

blockquote {
  border-left: 4px solid var(--color-orange);
  background: rgba(255, 107, 53, 0.03);
  padding: 1.25rem 1.75rem;
  border-radius: 0 16px 16px 0;
  margin: 2rem 0;
}

blockquote p {
  font-style: italic;
  font-size: 1rem;
  color: var(--text-main) !important;
  margin-bottom: 0;
}

/* Gráficos Integrados */
.embedded-chart-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 2.5rem 0;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.01);
}

.embedded-chart-title {
  font-family: var(--font-title);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-canvas-wrapper {
  position: relative;
  width: 100%;
  height: 350px;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

footer a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}

/* ==========================================================================
   OPTIMIZACIÓN MÓVIL ADICIONAL
   ========================================================================== */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

.math-container {
  overflow-x: auto;
  max-width: 100%;
  padding: 14px 8px;
  margin: 1.5rem 0;
  background: rgba(248, 250, 252, 0.7);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 14px;
  -webkit-overflow-scrolling: touch;
}

.mobile-experience-banner {
  display: none;
  background: rgba(6, 182, 212, 0.05);
  border-bottom: 1px solid rgba(6, 182, 212, 0.15);
  padding: 10px 4%;
  font-size: 0.72rem;
  color: var(--color-accent);
  font-weight: 600;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .mobile-experience-banner {
    display: flex;
  }
}

