/* =========================================
   BLOG.CSS - Estilos para Noticias y Posts
   Dark/Light Mode - TAMAÑOS GRANDES ORIGINALES
   Color principal: #007BB5 (celeste logo)
========================================== */

/* =========================================
   1. ARCHIVE PAGE (Lista de noticias)
========================================== */
.archive-header {
  text-align: center;
  margin-bottom: 60px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
  transition: border-color 0.3s ease;
}

.archive-header h1 {
  font-size: clamp(48px, 6vw, 72px); /* MÁS GRANDE */
  font-weight: 700;
  margin: 0 0 24px;
  color: var(--text-primary);
  transition: color 0.3s ease;
  letter-spacing: -0.02em;
}

.archive-header .pill {
  display: inline-block;
  background: rgba(0, 123, 181, 0.1);
  color: #007BB5; /* CELESTE */
  padding: 12px 28px;
  border-radius: 9999px;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.archive-header .pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 181, 0.3);
  background: #007BB5;
  color: #FFFFFF;
}

.dark .archive-header .pill {
  background: rgba(0, 123, 181, 0.2);
  color: #38BDF8;
}

.dark .archive-header .pill:hover {
  background: #38BDF8;
  color: #000000;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
}

/* =========================================
   2. SINGLE POST (Noticia individual)
========================================== */
.single-post-container {
  max-width: 900px; /* MÁS ANCHO */
  margin: 0 auto;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.single-header {
  margin-bottom: 48px;
  padding-bottom: 36px;
  border-bottom: 2px solid var(--border-color);
  transition: border-color 0.3s ease;
}

.post-category {
  margin-bottom: 20px;
}

.post-category a {
  background: rgba(0, 123, 181, 0.1);
  color: #007BB5; /* CELESTE */
  padding: 8px 20px;
  border-radius: 9999px;
  font-size: 0.95rem;
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s ease;
}

.post-category a:hover {
  background: #007BB5;
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 181, 0.3);
}

.dark .post-category a {
  background: rgba(0, 123, 181, 0.2);
  color: #38BDF8;
}

.dark .post-category a:hover {
  background: #38BDF8;
  color: #000000;
}

.single-title {
  font-size: clamp(40px, 5vw, 64px); /* MÁS GRANDE */
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 28px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
  word-wrap: break-word;
  hyphens: auto;
}

.post-meta-data {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 1.05rem; /* MÁS GRANDE */
  transition: color 0.3s ease;
}

.post-meta-data i {
  margin-right: 8px;
  opacity: 0.7;
}

.post-meta-data .separator {
  color: var(--border-color);
  user-select: none;
}

/* =========================================
   3. SINGLE CONTENT (Contenido del post)
========================================== */
.single-content {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.25rem; /* MÁS GRANDE - 20px */
  transition: color 0.3s ease;
}

/* Mejorar selección de texto */
.single-content ::selection {
  background: rgba(0, 123, 181, 0.2);
  color: #007BB5; /* CELESTE */
}

.dark .single-content ::selection {
  background: rgba(56, 189, 248, 0.2);
  color: #38BDF8;
}

.single-content h2,
.single-content h3,
.single-content h4 {
  color: var(--text-primary);
  font-weight: 700;
  margin: 48px 0 24px; /* MÁS ESPACIO */
  line-height: 1.3;
  letter-spacing: -0.01em;
  scroll-margin-top: 100px;
  transition: color 0.3s ease;
}

.single-content h2:hover,
.single-content h3:hover,
.single-content h4:hover {
  color: #007BB5; /* CELESTE */
}

.dark .single-content h2:hover,
.dark .single-content h3:hover,
.dark .single-content h4:hover {
  color: #38BDF8;
}

.single-content h2 {
  font-size: 2.5rem; /* MÁS GRANDE - 40px */
  border-bottom: 3px solid var(--border-color);
  padding-bottom: 16px;
}

.single-content h3 {
  font-size: 2rem; /* MÁS GRANDE - 32px */
}

.single-content h4 {
  font-size: 1.5rem; /* MÁS GRANDE - 24px */
}

.single-content p {
  margin: 0 0 28px; /* MÁS ESPACIO */
  transition: color 0.3s ease;
}

.single-content a {
  color: #007BB5; /* CELESTE */
  text-decoration: underline;
  transition: color 0.2s ease;
  font-weight: 500;
}

.single-content a:hover {
  color: #004e73;
}

.dark .single-content a {
  color: #38BDF8;
}

.dark .single-content a:hover {
  color: #7DD3FC;
}

.single-content ul,
.single-content ol {
  margin: 0 0 32px; /* MÁS ESPACIO */
  padding-left: 32px;
}

.single-content ul {
  list-style: disc;
}

.single-content ol {
  list-style: decimal;
}

.single-content li {
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 1.2rem; /* MÁS GRANDE */
}

.single-content blockquote {
  margin: 48px 0; /* MÁS ESPACIO */
  padding: 32px 36px;
  background: var(--bg-surface-2);
  border-left: 5px solid #007BB5; /* CELESTE */
  border-radius: 0 12px 12px 0;
  font-style: italic;
  color: var(--text-secondary);
  font-size: 1.3rem; /* MÁS GRANDE */
  position: relative;
  transition: all 0.3s ease;
}

.single-content blockquote::before {
  content: '"';
  font-size: 5rem;
  color: #007BB5; /* CELESTE */
  opacity: 0.15;
  position: absolute;
  top: -15px;
  left: 20px;
  font-family: Georgia, serif;
  line-height: 1;
}

.single-content blockquote:hover {
  transform: translateX(6px);
  box-shadow: -6px 0 16px rgba(0, 123, 181, 0.15);
}

.dark .single-content blockquote {
  border-left-color: #38BDF8;
}

.dark .single-content blockquote::before {
  color: #38BDF8;
}

.dark .single-content blockquote:hover {
  box-shadow: -6px 0 16px rgba(56, 189, 248, 0.2);
}

.single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 48px 0; /* MÁS ESPACIO */
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.single-content img:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.dark .single-content img {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.dark .single-content img:hover {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}

.single-content code {
  background: var(--bg-surface-2);
  padding: 4px 10px;
  border-radius: 6px;
  font-family: 'Courier New', monospace;
  font-size: 1.1rem; /* MÁS GRANDE */
  color: #007BB5; /* CELESTE */
}

.dark .single-content code {
  color: #38BDF8;
}

.single-content pre {
  background: var(--bg-surface-2);
  padding: 28px;
  border-radius: 12px;
  overflow-x: auto;
  margin: 36px 0;
  border-left: 4px solid #007BB5; /* CELESTE */
}

.dark .single-content pre {
  border-left-color: #38BDF8;
}

.single-content pre code {
  background: transparent;
  padding: 0;
  color: var(--text-secondary);
}

.single-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 48px 0; /* MÁS ESPACIO */
  font-size: 1.1rem; /* MÁS GRANDE */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.single-content table th,
.single-content table td {
  padding: 16px 20px; /* MÁS ESPACIO */
  border: 1px solid var(--border-color);
  text-align: left;
  transition: all 0.2s ease;
}

.single-content table th {
  background: var(--bg-surface-2);
  font-weight: 600;
  color: var(--text-primary);
  text-transform: uppercase;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.single-content table td {
  color: var(--text-secondary);
}

.single-content table tr:hover td {
  background: var(--bg-surface-2);
}

.dark .single-content table {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* =========================================
   4. POST NAVIGATION (Anterior/Siguiente)
========================================== */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 80px; /* MÁS ESPACIO */
  padding-top: 48px;
  border-top: 2px solid var(--border-color);
}

.nav-prev,
.nav-next {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-prev a,
.nav-next a {
  color: #007BB5; /* CELESTE */
  font-weight: 600;
  font-size: 1.1rem; /* MÁS GRANDE */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 28px; /* MÁS GRANDE */
  background: var(--bg-surface);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.nav-prev a::before,
.nav-next a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 123, 181, 0.1), transparent);
  transition: left 0.5s ease;
}

.nav-prev a:hover::before,
.nav-next a:hover::before {
  left: 100%;
}

.nav-prev a:hover,
.nav-next a:hover {
  background: #007BB5; /* CELESTE */
  color: #FFFFFF;
  border-color: #007BB5;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 123, 181, 0.25);
}

.dark .nav-prev a,
.dark .nav-next a {
  color: #38BDF8;
}

.dark .nav-prev a:hover,
.dark .nav-next a:hover {
  background: #38BDF8;
  border-color: #38BDF8;
  color: #000000;
  box-shadow: 0 10px 20px rgba(56, 189, 248, 0.3);
}

.nav-next {
  justify-content: flex-end;
  text-align: right;
}

@media (max-width: 768px) {
  .post-navigation {
    grid-template-columns: 1fr;
  }
  
  .nav-next {
    justify-content: flex-start;
    text-align: left;
  }
}

/* =========================================
   5. NO POSTS MESSAGE
========================================== */
.no-posts-message {
  text-align: center;
  padding: 100px 40px;
  animation: fadeIn 0.5s ease-out;
}

.no-posts-message .icon {
  width: 100px;
  height: 100px;
  margin: 0 auto 32px;
  background: var(--bg-surface-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 3rem;
  transition: all 0.3s ease;
}

.no-posts-message .icon:hover {
  background: rgba(0, 123, 181, 0.1);
  color: #007BB5;
  transform: scale(1.1);
}

.dark .no-posts-message .icon:hover {
  background: rgba(56, 189, 248, 0.1);
  color: #38BDF8;
}

.no-posts-message h3 {
  font-size: 2rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.no-posts-message p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 1.2rem;
}

/* =========================================
   6. WORDPRESS SPECIFIC CLASSES
========================================== */
.alignleft {
  float: left;
  margin: 0 32px 24px 0;
  max-width: 50%;
}

.alignright {
  float: right;
  margin: 0 0 24px 32px;
  max-width: 50%;
}

.aligncenter {
  display: block;
  margin: 48px auto;
}

.alignnone {
  margin: 32px 0;
}

@media (max-width: 768px) {
  .alignleft,
  .alignright {
    float: none;
    margin: 32px 0;
    max-width: 100%;
  }
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 12px;
  text-align: center;
  font-style: italic;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin: 48px 0;
}

.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  transition: transform 0.3s ease;
}

.gallery-item img:hover {
  transform: scale(1.05);
}

/* =========================================
   7. RESPONSIVE ADJUSTMENTS
========================================== */
@media (max-width: 768px) {
  .archive-header h1 {
    font-size: clamp(36px, 8vw, 48px);
  }
  
  .single-title {
    font-size: clamp(28px, 7vw, 40px);
  }
  
  .single-content {
    font-size: 1.125rem;
  }
  
  .single-content h2 {
    font-size: 2rem;
  }
  
  .single-content h3 {
    font-size: 1.5rem;
  }
  
  .single-content h4 {
    font-size: 1.25rem;
  }
  
  .single-content li {
    font-size: 1.125rem;
  }
  
  .single-content blockquote {
    font-size: 1.125rem;
    padding: 20px 24px;
    margin: 32px 0;
  }
  
  .single-content table {
    font-size: 1rem;
  }
  
  .nav-prev a,
  .nav-next a {
    font-size: 1rem;
    padding: 14px 20px;
  }
}

/* =========================================
   8. PRINT STYLES
========================================== */
@media print {
  .single-header,
  .single-content {
    color: #000;
  }
  
  .post-navigation,
  .related-posts {
    display: none;
  }
  
  .single-content a {
    text-decoration: underline;
    color: #007BB5;
  }
  
  .single-content img {
    max-width: 100%;
    page-break-inside: avoid;
  }
}