/* MODERN BLOG SHOW CSS */
:root {
  --purple-vibrant: oklch(54.6% 0.245 262.881);
  --purple-deep: oklch(51.1% 0.262 276.966);
  --text-color: oklch(0.25 0.01 270);
  --text-grey: oklch(0.55 0.02 260);
  --text-light: oklch(0.65 0.02 260);
  --background-light: oklch(0.98 0.005 270);
  --background-white: oklch(1 0 0);
  --border-light: oklch(0.9 0.01 270);
  --shadow-soft: oklch(0 0 0 / 0.08);
}

/* HEADER MODERNO */
.blog-header {
  background: linear-gradient(135deg, 
    rgba(139, 69, 198, 0.06) 0%,
    rgba(99, 102, 241, 0.04) 30%,
    rgba(59, 130, 246, 0.05) 70%,
    rgba(139, 69, 198, 0.06) 100%);
  color: var(--text-color);
  padding: 80px 40px 50px;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}

.blog-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 15% 40%, rgba(139, 69, 198, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 60%, rgba(99, 102, 241, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 20%, rgba(59, 130, 246, 0.04) 0%, transparent 60%);
  z-index: 1;
}

.blog-header .container {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

/* BOTÓN DE RETORNO */
.back-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--background-white);
  color: var(--purple-vibrant);
  padding: 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 20px;
  margin-bottom: 30px;
  border: 1px solid var(--border-light);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.back-button:hover {
  background: var(--purple-vibrant);
  color: white;
  text-decoration: none;
  transform: translateX(-3px);
  box-shadow: 0 4px 12px rgba(139, 69, 198, 0.2);
}

.back-button i {
  transition: transform 0.3s ease;
}

.back-button:hover i {
  transform: translateX(-2px);
}

/* TÍTULO PRINCIPAL */
.blog-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0;
  color: var(--text-color);
  letter-spacing: -0.02em;
  width: 100%;
  max-width: 100%;
  word-wrap: break-word;
  hyphens: auto;
}

/* CONTENEDOR DE CONTENIDO */
.blog-content-wrapper {
  background: var(--background-white);
  margin-top: -20px;
  border-radius: 32px 32px 0 0;
  position: relative;
  z-index: 2;
  padding: 50px 0 60px;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
}

.blog-content-wrapper .container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
}

/* LAYOUT DE DOS COLUMNAS */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 60px;
  align-items: start;
}

.blog-main-content {
  min-width: 0; /* Permite que el contenido se comprima si es necesario */
}

/* META INFORMACIÓN */
.blog-meta {
  display: flex;
  gap: 32px;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
}

.blog-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-grey);
  font-size: 15px;
  font-weight: 500;
}

.blog-meta-item i {
  color: var(--purple-vibrant);
  width: 16px;
  text-align: center;
}

/* IMAGEN DEL BLOG */
.blog-image {
  border-radius: 20px;
  margin: 40px 0;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  position: relative;
}

.blog-image img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.blog-image:hover img {
  transform: scale(1.02);
}

.blog-image-placeholder {
  background: linear-gradient(135deg, var(--background-light), #f1f3f4);
  border-radius: 20px;
  padding: 80px 20px;
  text-align: center;
  margin: 40px 0;
  color: var(--text-grey);
  border: 2px dashed var(--border-light);
  position: relative;
  overflow: hidden;
}

.blog-image-placeholder i {
  font-size: 48px;
  margin-bottom: 16px;
  color: #dee2e6;
}

.blog-image-placeholder p {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 8px;
}

.blog-image-placeholder small {
  color: var(--text-light);
  font-size: 14px;
}

/* CONTENIDO DEL BLOG */
.blog-content {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-color);
  margin-bottom: 60px;
}

.blog-content p {
  margin-bottom: 24px;
  text-align: justify;
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
  color: var(--text-color);
  margin-top: 40px;
  margin-bottom: 20px;
  font-weight: 700;
  line-height: 1.3;
}

.blog-content h2 {
  font-size: 32px;
  color: var(--purple-vibrant);
}

.blog-content h3 {
  font-size: 26px;
}

.blog-content h4 {
  font-size: 22px;
}

.blog-content ul,
.blog-content ol {
  margin: 24px 0;
  padding-left: 28px;
}

.blog-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.blog-content blockquote {
  border-left: 4px solid var(--purple-vibrant);
  background: var(--background-light);
  padding: 24px 28px;
  margin: 32px 0;
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text-grey);
}

/* BOTONES DE COMPARTIR */
.share-buttons {
  margin-top: 60px;
  padding: 40px 0;
  border-top: 1px solid var(--border-light);
  text-align: center;
  background: var(--background-light);
  border-radius: 20px;
}

.share-buttons h4 {
  margin-bottom: 24px;
  color: var(--text-color);
  font-size: 20px;
  font-weight: 700;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  margin: 0 8px 12px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.share-facebook {
  background: #1877f2;
  color: white;
}

.share-facebook:hover {
  color: white;
}

.share-twitter {
  background: #1da1f2;
  color: white;
}

.share-twitter:hover {
  color: white;
}

.share-whatsapp {
  background: #25d366;
  color: white;
}

.share-whatsapp:hover {
  color: white;
}

/* SIDEBAR DE ARTÍCULOS RELACIONADOS */
.blog-sidebar {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.sidebar-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-light);
  position: relative;
}

.sidebar-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(135deg, var(--purple-vibrant), var(--purple-deep));
}

.related-articles {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.related-article {
  background: var(--background-white);
  border: 1px solid var(--border-light);
  border-radius: 16px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.related-article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(135deg, var(--purple-vibrant), var(--purple-deep));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.related-article:hover {
  border-color: rgba(139, 69, 198, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: inherit;
}

.related-article:hover::before {
  transform: scaleX(1);
}

.related-article-content {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.related-article-thumbnail {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--background-light);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
}

.related-article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-article:hover .related-article-thumbnail img {
  transform: scale(1.1);
}

.related-article-thumbnail-placeholder {
  color: var(--text-light);
  font-size: 20px;
}

.related-article-info {
  flex: 1;
  min-width: 0;
}

.related-article-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.3s ease;
}

.related-article:hover .related-article-title {
  color: var(--purple-vibrant);
}

.related-article-excerpt {
  font-size: 13px;
  color: var(--text-grey);
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-light);
  border-top: 1px solid var(--border-light);
  padding-top: 8px;
  margin-top: 8px;
  gap: 8px;
}

.related-article-author {
  font-weight: 500;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.related-article-date {
  color: var(--text-grey);
  flex-shrink: 0;
}

/* RESPONSIVE DESIGN */
@media (max-width: 1200px) {
  .blog-layout {
    grid-template-columns: 1fr 300px;
    gap: 40px;
  }
  
  .blog-sidebar {
    top: 80px;
  }
}

@media (max-width: 992px) {
  .blog-header {
    padding: 60px 30px 40px;
  }
  
  .blog-header .container {
    padding: 0 30px;
  }
  
  .blog-title {
    font-size: 36px;
    word-wrap: break-word;
    hyphens: auto;
  }
  
  .blog-content-wrapper .container {
    padding: 0 30px;
  }
  
  .blog-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .blog-sidebar {
    position: static;
    max-height: none;
    order: -1; /* Mueve la sidebar arriba en móvil */
    background: var(--background-light);
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 20px;
  }
  
  .related-articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
  }
  
  .related-article {
    padding: 16px;
  }
  
  .related-article-content {
    gap: 10px;
  }
  
  .related-article-thumbnail {
    width: 50px;
    height: 50px;
  }
  
  .sidebar-title {
    text-align: center;
    margin-bottom: 20px;
  }
}

@media (max-width: 768px) {
  .blog-header {
    padding: 50px 20px 30px;
  }
  
  .blog-header .container {
    padding: 0 20px;
  }
  
  .blog-title {
    font-size: 28px;
    word-wrap: break-word;
    hyphens: auto;
  }
  
  .blog-content {
    font-size: 16px;
  }
  
  .blog-content-wrapper .container {
    padding: 0 20px;
  }
  
  .blog-meta {
    gap: 16px;
    flex-direction: column;
    align-items: flex-start;
  }
  
  .related-articles {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .related-article-content {
    gap: 12px;
  }
  
  .related-article-thumbnail {
    width: 55px;
    height: 55px;
  }
  
  .related-article-meta {
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
  }
  
  .share-btn {
    margin: 0 4px 8px;
    padding: 10px 20px;
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .blog-header {
    padding: 40px 15px 25px;
  }
  
  .blog-header .container {
    padding: 0 15px;
  }
  
  .blog-title {
    font-size: 24px;
    word-wrap: break-word;
    hyphens: auto;
  }
  
  .blog-content-wrapper .container {
    padding: 0 15px;
  }
  
  .blog-content {
    font-size: 15px;
  }
  
  .blog-sidebar {
    padding: 20px 16px;
  }
  
  .sidebar-title {
    font-size: 20px;
  }
  
  .share-buttons {
    padding: 30px 20px;
  }
  
  .share-btn {
    display: block;
    width: 100%;
    max-width: 200px;
    margin: 0 auto 12px;
    justify-content: center;
  }
}