/* Estilos personalizados para el sitio de Mauro Rosero */

/* Variables CSS personalizadas */
:root {
  --md-primary-fg-color: #3f51b5;
  --md-primary-fg-color--light: #757de8;
  --md-primary-fg-color--dark: #002984;
  --md-accent-fg-color: #00bcd4;
  --md-accent-fg-color--transparent: rgba(0, 188, 212, 0.1);
}

/* Optimizaciones de performance */
* {
  box-sizing: border-box;
}

/* Optimización de fuentes */
@font-face {
  font-family: 'Inter';
  font-display: swap;
  src: url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-display: swap;
  src: url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500&display=swap');
}

/* Optimización de imágenes */
img {
  max-width: 100%;
  height: auto;
  loading: lazy;
}

/* Preload de recursos críticos */
.md-header {
  will-change: transform;
}

/* Optimización de animaciones */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Mejoras para el header */
.md-header {
  background: linear-gradient(135deg, var(--md-primary-fg-color) 0%, var(--md-primary-fg-color--dark) 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Navegación mejorada */
.md-nav__link--active {
  font-weight: 600;
  color: var(--md-accent-fg-color);
}

/* Cards y contenedores */
.md-typeset .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.md-typeset .card {
  background: var(--md-default-bg-color);
  border: 1px solid var(--md-default-fg-color--lightest);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.md-typeset .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Botones personalizados */
.md-typeset .btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--md-primary-fg-color);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.md-typeset .btn:hover {
  background: var(--md-primary-fg-color--dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.md-typeset .btn--secondary {
  background: var(--md-accent-fg-color);
}

.md-typeset .btn--secondary:hover {
  background: #0097a7;
}

/* Mejoras para el contenido */
.md-typeset h1 {
  background: linear-gradient(135deg, var(--md-primary-fg-color), var(--md-accent-fg-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.md-typeset h2 {
  border-bottom: 2px solid var(--md-accent-fg-color);
  padding-bottom: 0.5rem;
}

/* Código mejorado */
.md-typeset pre {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.md-typeset code {
  background: var(--md-accent-fg-color--transparent);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Tablas responsivas */
.md-typeset table {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.md-typeset table th {
  background: var(--md-primary-fg-color);
  color: white;
  font-weight: 600;
}

/* Footer mejorado */
.md-footer {
  background: linear-gradient(135deg, var(--md-primary-fg-color--dark) 0%, var(--md-primary-fg-color) 100%);
}

/* Animaciones suaves */
.md-typeset img {
  transition: transform 0.2s ease;
}

.md-typeset img:hover {
  transform: scale(1.02);
}

/* Responsive design mejorado */
@media screen and (max-width: 768px) {
  .md-typeset .grid {
    grid-template-columns: 1fr;
  }
  
  .md-typeset .card {
    padding: 1rem;
  }
  
  .md-typeset h1 {
    font-size: 1.8rem;
  }
}

/* Mejoras para el modo oscuro */
[data-md-color-scheme="slate"] {
  --md-primary-fg-color: #5c6bc0;
  --md-primary-fg-color--light: #8e99f3;
  --md-primary-fg-color--dark: #26418f;
}

[data-md-color-scheme="slate"] .md-typeset .card {
  background: var(--md-default-bg-color--light);
  border-color: var(--md-default-fg-color--lightest);
}

/* Efectos de scroll suave */
html {
  scroll-behavior: smooth;
}

/* Mejoras para la búsqueda */
.md-search__form {
  border-radius: 25px;
  overflow: hidden;
}

.md-search__input {
  border-radius: 25px;
}

/* Iconos personalizados */
.md-typeset .icon {
  width: 1.2em;
  height: 1.2em;
  vertical-align: middle;
  margin-right: 0.5rem;
}

/* Alertas y notificaciones */
.md-typeset .alert {
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  border-left: 4px solid;
}

.md-typeset .alert--info {
  background: rgba(33, 150, 243, 0.1);
  border-color: #2196f3;
  color: #1976d2;
}

.md-typeset .alert--success {
  background: rgba(76, 175, 80, 0.1);
  border-color: #4caf50;
  color: #388e3c;
}

.md-typeset .alert--warning {
  background: rgba(255, 193, 7, 0.1);
  border-color: #ffc107;
  color: #f57c00;
}

.md-typeset .alert--error {
  background: rgba(244, 67, 54, 0.1);
  border-color: #f44336;
  color: #d32f2f;
}

/* Image Gallery Styles */
#image-gallery-container h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--md-primary-fg-color);
  padding-bottom: 0.5rem;
}

.image-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.gallery-thumbnail {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid #ddd;
}

.gallery-thumbnail:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

/* Lightbox Styles */
.lightbox {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 80%;
  max-height: 80%;
}

#lightbox-caption {
  margin: 10px auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: #ccc;
  padding: 10px 0;
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: #bbb;
  text-decoration: none;
}

/* Estilos adicionales para la galería mejorada */

/* Contenedor de la galería */
#gallery {
    margin-top: 2rem;
    padding: 1rem 0;
}

/* Grid de imágenes responsive */
#gallery .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

/* Tarjetas de imagen */
.gallery-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

/* Imágenes dentro de las tarjetas */
.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Enlaces de Lightbox */
.gallery-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Indicador de hover */
.gallery-item::after {
    content: '🔍';
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 8px;
    border-radius: 50%;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Responsive design */
@media (max-width: 768px) {
    #gallery .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .gallery-item img {
        height: 140px;
    }
}

@media (max-width: 480px) {
    #gallery .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 0.75rem;
    }
    
    .gallery-item img {
        height: 120px;
    }
}

/* Animación de carga */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item {
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }
.gallery-item:nth-child(9) { animation-delay: 0.9s; }
.gallery-item:nth-child(10) { animation-delay: 1.0s; }

/* Mejoras para Lightbox2 */
.lb-outerContainer {
    border-radius: 12px !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3) !important;
}

.lb-dataContainer {
    border-radius: 0 0 12px 12px !important;
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(10px) !important;
}

.lb-data .lb-caption {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #333 !important;
    text-shadow: none !important;
    padding: 15px 20px !important;
}

/* Botones de navegación mejorados */
.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    opacity: 0.95 !important;
    transition: all 0.3s ease !important;
    background: rgba(0,0,0,0.8) !important;
    border-radius: 50% !important;
    width: 60px !important;
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid rgba(255,255,255,0.2) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    font-size: 24px !important;
    color: white !important;
    text-decoration: none !important;
}

.lb-nav a.lb-prev:hover,
.lb-nav a.lb-next:hover {
    opacity: 1 !important;
    background: rgba(0,0,0,0.95) !important;
    transform: scale(1.15) !important;
    border-color: rgba(255,255,255,0.4) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4) !important;
}

/* Botón de cerrar mejorado */
.lb-closeContainer .lb-close {
    opacity: 0.95 !important;
    transition: all 0.3s ease !important;
    background: rgba(0,0,0,0.8) !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 24px !important;
    color: white !important;
    border: 2px solid rgba(255,255,255,0.2) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    text-decoration: none !important;
    font-weight: bold !important;
}

.lb-closeContainer .lb-close:hover {
    opacity: 1 !important;
    background: rgba(220,53,69,0.9) !important;
    transform: scale(1.15) !important;
    border-color: rgba(255,255,255,0.4) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4) !important;
}

/* Iconos personalizados para navegación */
.lb-nav a.lb-prev::before {
    content: '‹' !important;
    font-size: 32px !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

.lb-nav a.lb-next::before {
    content: '›' !important;
    font-size: 32px !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

/* Botón de cerrar con X más visible */
.lb-closeContainer .lb-close::before {
    content: '✕' !important;
    font-size: 20px !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

/* Contador de imágenes */
.lb-data .lb-number {
    font-size: 14px !important;
    color: #666 !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
}

/* Loading spinner */
.lb-loading {
    background: rgba(0,0,0,0.8) !important;
    border-radius: 50% !important;
}

/* Indicadores de navegación mejorados */
.lb-nav a.lb-prev,
.lb-nav a.lb-next {
    position: relative !important;
}

/* Tooltip para botones de navegación */
.lb-nav a.lb-prev::after {
    content: 'Anterior' !important;
    position: absolute !important;
    bottom: -30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(0,0,0,0.8) !important;
    color: white !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
    white-space: nowrap !important;
}

.lb-nav a.lb-next::after {
    content: 'Siguiente' !important;
    position: absolute !important;
    bottom: -30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(0,0,0,0.8) !important;
    color: white !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
    white-space: nowrap !important;
}

.lb-nav a.lb-prev:hover::after,
.lb-nav a.lb-next:hover::after {
    opacity: 1 !important;
}

/* Tooltip para botón de cerrar */
.lb-closeContainer .lb-close::after {
    content: 'Cerrar' !important;
    position: absolute !important;
    bottom: -30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: rgba(0,0,0,0.8) !important;
    color: white !important;
    padding: 5px 10px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    pointer-events: none !important;
    white-space: nowrap !important;
}

.lb-closeContainer .lb-close:hover::after {
    opacity: 1 !important;
}

/* Responsive improvements para Lightbox */
@media (max-width: 768px) {
    .lb-outerContainer {
        width: 95% !important;
        height: auto !important;
        margin: 20px auto !important;
    }
    
    .lb-data .lb-caption {
        font-size: 14px !important;
        padding: 10px 15px !important;
    }
    
    .lb-nav a.lb-prev,
    .lb-nav a.lb-next {
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
    }
    
    .lb-nav a.lb-prev::before,
    .lb-nav a.lb-next::before {
        font-size: 28px !important;
    }
    
    .lb-closeContainer .lb-close {
        width: 45px !important;
        height: 45px !important;
        font-size: 20px !important;
    }
    
    .lb-closeContainer .lb-close::before {
        font-size: 18px !important;
    }
}

/* Mejoras para pantallas muy pequeñas */
@media (max-width: 480px) {
    .lb-nav a.lb-prev,
    .lb-nav a.lb-next {
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
    }
    
    .lb-nav a.lb-prev::before,
    .lb-nav a.lb-next::before {
        font-size: 24px !important;
    }
    
    .lb-closeContainer .lb-close {
        width: 40px !important;
        height: 40px !important;
        font-size: 18px !important;
    }
    
    .lb-closeContainer .lb-close::before {
        font-size: 16px !important;
    }
}

/* Estilos para Cards de FLISoL Panamá - Responsive 4 Columnas */
.flisol-cards-container {
  width: 100%;
  margin: 2rem 0;
  padding: 0 1rem;
}

.flisol-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.flisol-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: none;
  border-radius: 16px;
  padding: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.05),
    0 1px 3px rgba(0, 0, 0, 0.1);
  min-height: 220px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(20px);
}

.flisol-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px 20px 0 0;
}

.flisol-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.flisol-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.15),
    0 10px 20px rgba(0, 0, 0, 0.1);
}

.flisol-card:hover::after {
  opacity: 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 1rem 1.25rem 0.75rem 1.25rem;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.card-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a202c;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.status {
  padding: 0.3rem 0.6rem;
  border-radius: 16px;
  font-size: 0.65rem;
  font-weight: 600;
  white-space: nowrap;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.status.participated { 
  background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
}
.status.not-participated { 
  background: linear-gradient(135deg, #f44336 0%, #ef5350 100%);
}
.status.not-documented { 
  background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
}
.status.external-doc { 
  background: linear-gradient(135deg, #2196f3 0%, #42a5f5 100%);
}
.status.unknown { 
  background: linear-gradient(135deg, #9e9e9e 0%, #bdbdbd 100%);
}

.card-content {
  padding: 1rem 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-info {
  flex-grow: 1;
}

.card-info p {
  margin: 0.25rem 0;
  font-size: 0.75rem;
  line-height: 1.3;
}

.card-info strong {
  color: #495057;
  font-weight: 600;
  font-size: 0.8rem;
}

.sedes-detalle {
  margin-top: 0.5rem !important;
  color: #6c757d !important;
  font-style: italic;
}

.card-footer {
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
  border-top: 1px solid rgba(226, 232, 240, 0.5);
  flex-shrink: 0;
}

.btn-detail {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  font-size: 0.8rem;
}

.btn-detail:hover {
  background: #5a6fd8;
  transform: translateY(-1px);
}

.flisol-error {
  text-align: center;
  padding: 2rem;
  color: #6c757d;
}

/* Responsive Design para Cards - 4 Columnas */
@media (max-width: 900px) {
  .flisol-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .flisol-card {
    min-height: 260px;
  }
}

@media (max-width: 600px) {
  .flisol-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .flisol-cards-container {
    padding: 0 0.5rem;
  }
  
  .flisol-card {
    min-height: 240px;
  }
  
  .card-header {
    padding: 1rem;
  }
  
  .card-content {
    padding: 1rem;
  }
  
  .card-footer {
    padding: 0.8rem 1rem;
  }
}

/* Dark mode support para cards */
@media (prefers-color-scheme: dark) {
  .flisol-card {
    background: #2d3748;
    border-color: #4a5568;
  }
  
  .card-content {
    color: #e2e8f0;
  }
  
  .card-info strong {
    color: #cbd5e0;
  }
  
  .card-footer {
    background: #1a202c;
    border-color: #4a5568;
  }
  
  .flisol-error {
    color: #a0aec0;
  }
}

/* Estilos para documentos FLISoL individuales */
.back-link {
  margin: 1rem 0 2rem 0;
  text-align: center;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  background: var(--md-primary-fg-color);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(63, 81, 181, 0.2);
}

.btn-back:hover {
  background: var(--md-primary-fg-color--dark);
  color: white;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(63, 81, 181, 0.3);
}

.btn-back::before {
  content: "←";
  margin-right: 0.5rem;
  font-size: 1.1rem;
}

/* Estilos responsive para contenido FLISoL */
.md-content__inner {
  max-width: 100%;
}

/* Mejorar espaciado y tipografía */
.md-content h1 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 2.2rem;
  line-height: 1.2;
}

.md-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.6rem;
  line-height: 1.3;
  border-bottom: 2px solid var(--md-primary-fg-color--light);
  padding-bottom: 0.5rem;
}

.md-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.3rem;
  line-height: 1.4;
  color: var(--md-primary-fg-color);
}

.md-content h4 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  line-height: 1.4;
}

/* Mejorar listas */
.md-content ul, .md-content ol {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.md-content li {
  margin: 0.5rem 0;
  line-height: 1.6;
}

/* Mejorar párrafos */
.md-content p {
  margin: 1rem 0;
  line-height: 1.7;
  text-align: justify;
}

/* Estilos para tablas responsive */
.md-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  overflow-x: auto;
  display: block;
  white-space: nowrap;
}

.md-content table th,
.md-content table td {
  padding: 0.75rem;
  border: 1px solid var(--md-default-fg-color--lightest);
  text-align: left;
}

.md-content table th {
  background: var(--md-primary-fg-color--light);
  color: white;
  font-weight: 600;
}

/* Estilos para código */
.md-content code {
  background: var(--md-code-bg-color);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

.md-content pre {
  background: var(--md-code-bg-color);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
}

/* Responsive design para móviles */
@media (max-width: 768px) {
  .md-content h1 {
    font-size: 1.8rem;
  }
  
  .md-content h2 {
    font-size: 1.4rem;
  }
  
  .md-content h3 {
    font-size: 1.2rem;
  }
  
  .btn-back {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
  
  .md-content p {
    text-align: left;
  }
  
  .md-content table {
    font-size: 0.9rem;
  }
}

/* Estilos para modo oscuro */
[data-md-color-scheme="slate"] .btn-back {
  background: var(--md-accent-fg-color);
}

[data-md-color-scheme="slate"] .btn-back:hover {
  background: var(--md-accent-fg-color--transparent);
  color: var(--md-accent-fg-color);
}

