/**
 * Estilos para Noticia Individual [nd_single]
 * Diseño elegante y moderno basado en el plugin destacadas
 */

/* ============================================
   WRAPPER DE AISLAMIENTO - RESET COMPLETO
   ============================================ */

.nd-single-wrapper {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-sizing: border-box !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  position: relative !important;
  font-family: var(--nd-font-family-text);
  line-height: 1.6;
  color: var(--nd-text-dark) !important;
}

.nd-single-wrapper *,
.nd-single-wrapper *::before,
.nd-single-wrapper *::after {
  box-sizing: border-box !important;
}

/* Variables CSS */
:root {
  --nd-primary-color: #007cba;
  --nd-primary-dark: #005a87;
  --nd-primary-light: #e5f5fb;
  --nd-text-dark: #1d2327;
  --nd-text-gray: #2c3e50;
  --nd-text-light: #ffffff;
  --nd-border-color: #dcdcde;
  --nd-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --nd-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
  --nd-transition: all 0.3s ease;
  --nd-font-family-display: 'Poppins', sans-serif;
  --nd-font-family-text: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================
   HERO SECTION MODERNA - BACKGROUND IMAGE
   ============================================ */

.nd-hero-section {
  position: relative;
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  
  /* Imagen de fondo */
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: scroll !important;
  background-color: #1a1a1a !important; /* Fallback color */
  
  /* Aspect ratio igual al slider del home: 16:5 */
  aspect-ratio: 16 / 5;
  
  /* Fallback para navegadores antiguos */
  min-height: 256px;
  max-height: 500px;
  
  /* Display flex para centrado */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  
  box-sizing: border-box !important;
  overflow: hidden !important;
  z-index: 10;
  
  /* Evitar que Elementor o el tema afecten */
  left: 0 !important;
  right: 0 !important;
}

/* Compatibilidad con Elementor - Hero debe extenderse al 100% viewport */
.elementor .nd-hero-section,
.elementor-widget-container .nd-hero-section,
.e-con .nd-hero-section {
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  left: 0 !important;
  right: 0 !important;
}

/* Evitar que containers de Elementor limiten el hero */
.elementor-section .nd-single-wrapper,
.e-con .nd-single-wrapper {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Overlay con blur y opacidad */
.nd-hero-overlay {
  position: absolute !important;
  inset: 0 !important;
  
  /* Fondo oscuro con transparencia */
  background: rgba(0, 0, 0, 0.35) !important;
  
  /* Blur effect */
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
  
  /* Z-index bajo para que el contenido esté encima */
  z-index: 1;
}

/* Contenido del hero: Título arriba, Meta abajo */
.nd-hero-content {
  position: relative !important;
  z-index: 2;
  width: 100% !important;
  max-width: 100% !important;
  padding: 2rem !important;
  margin: 0 !important;
  
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  
  box-sizing: border-box !important;
  text-align: center !important;
  height: 100% !important;
}

/* Meta información dentro del hero - posicionada abajo */
.nd-hero-meta {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1.5rem !important;
  margin-top: 1.5rem !important;
  margin-bottom: 0 !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 0 !important;
  border: none !important;
  order: 2 !important;
}

.nd-hero-fecha,
.nd-hero-categoria {
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
  font-size: clamp(0.8rem, 2vw, 1rem) !important;
  color: var(--nd-text-light) !important;
  font-weight: 500 !important;
  font-family: var(--nd-font-family-text) !important;
  
  /* Fondo semi-transparente para mejor legibilidad */
  background: rgba(255, 255, 255, 0.1) !important;
  padding: 0.5rem 1rem !important;
  border-radius: 8px !important;
  backdrop-filter: blur(2px) !important;
  -webkit-backdrop-filter: blur(2px) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.nd-hero-fecha svg,
.nd-hero-categoria svg {
  width: 18px !important;
  height: 18px !important;
  color: var(--nd-text-light) !important;
  flex-shrink: 0 !important;
  stroke: currentColor !important;
}

/* Título dentro del hero - posicionado arriba */
.nd-hero-title {
  font-size: clamp(1.5rem, 6vw, 3rem) !important;
  font-weight: 700 !important;
  color: var(--nd-text-light) !important;
  line-height: 1.2 !important;
  margin: 0 !important;
  padding: 0 !important;
  letter-spacing: -0.02em !important;
  font-family: var(--nd-font-family-display) !important;
  width: 100% !important;
  text-transform: uppercase !important;
  text-align: center !important;
  
  /* Sombra de texto para mejor legibilidad */
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4),
               0 2px 4px rgba(0, 0, 0, 0.3) !important;
  
  order: 1 !important;
}

/* Animación de entrada del hero */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Imagen hero fija (mantener para compatibilidad) */
.nd-single-imagen-hero {
  position: relative;
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  margin-bottom: 3rem !important;
  padding: 0 !important;
  background: transparent !important;
}

.nd-single-hero-img {
  display: block;
  width: 100%;
  height: auto;
}

.nd-single-hero-content {
  position: relative;
  z-index: 2;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 2rem !important;
  padding-bottom: 3rem !important;
  box-sizing: border-box !important;
}


/* Contenedor del contenido */
.nd-single-container {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-sizing: border-box !important;
}

  .nd-single-content {
    background: transparent !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 2rem 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }/* Meta información */
.nd-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 3rem !important; /* Espaciado vertical mayor antes del separador */
  padding: 0 !important; /* Sin padding para que el margin haga el trabajo */
  border-bottom: 2px solid #cccccc; /* Separador más visible */
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.nd-single-fecha,
.nd-single-categoria {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--nd-text-gray);
  font-weight: 500;
  font-family: var(--nd-font-family-text);
}

.nd-icon {
  width: 18px;
  height: 18px;
  color: var(--nd-primary-color);
  flex-shrink: 0;
}

/* Título principal */
.nd-single-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--nd-text-dark) !important;
  line-height: 1.2;
  margin: 2rem 0 2.5rem 0 !important;
  padding: 0 !important;
  letter-spacing: -0.02em;
  font-family: var(--nd-font-family-display);
  width: 100% !important;
  text-transform: uppercase;
  text-align: center;
}

.nd-single-date {
  margin: 0;
  font-size: 1.1em;
  color: #666;
  font-weight: 500;
}

/* Resumen destacado */
.nd-single-resumen {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--nd-text-dark);
  margin-bottom: 3rem !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 2rem;
  background: #eff2f7;
  border: none;
  border-left: 4px solid var(--nd-primary-color);
  border-radius: 0;
  font-weight: 600;
  font-family: var(--nd-font-family-display);
  width: 100% !important;
  text-align: right;
  text-transform: none;
  box-sizing: border-box !important;
  letter-spacing: -0.3px;
  padding-left: 2rem;
}

.nd-single-resumen p:last-child {
  margin-bottom: 0;
}

.nd-single-resumen p {
  font-family: var(--nd-font-family-display);
  text-align: right;
  text-transform: inherit;
  margin: 0;
}

/* Divisor decorativo */
.nd-single-divider {
  text-align: center;
  margin: 3rem 0 1.5rem 0 !important; /* Mayor espacio arriba del separador */
  position: relative;
  background: transparent !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.nd-single-divider::before,
.nd-single-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #999999; /* Color más oscuro para mejor visibilidad */
}

.nd-divider-icon {
  display: inline-block;
  padding: 0 1rem;
  background: transparent !important; /* Fondo transparente */
  background-color: transparent !important;
  color: var(--nd-primary-color);
  font-size: 1.25rem;
  position: relative;
  z-index: 1;
}

/* Cuerpo de la noticia */
.nd-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--nd-text-dark) !important;
  margin-bottom: 3rem;
  padding: 30px 1.5rem 40px 1.5rem !important;
  background: transparent;
  font-family: var(--nd-font-family-text) !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

.nd-content * {
  font-family: var(--nd-font-family-text) !important;
  line-height: inherit !important;
}

.nd-content p {
  margin-bottom: 1.25rem;
  line-height: 1.8 !important;
}

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

.nd-content br {
  display: block !important;
  height: auto !important;
  line-height: inherit !important;
  margin: 0 !important;
  padding: 0 !important;
  content: '' !important;
}

.nd-content span + br,
.nd-content br + span {
  display: block !important;
}

.nd-content h2,
.nd-content h3,
.nd-content h4 {
  color: var(--nd-text-dark) !important;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
  font-family: var(--nd-font-family-display) !important;
}

.nd-content h2 {
  font-size: 1.875rem;
  border-bottom: 2px solid var(--nd-primary-light);
  padding-bottom: 0.5rem;
}

.nd-content h3 {
  font-size: 1.5rem;
}

.nd-content h4 {
  font-size: 1.25rem;
  color: var(--nd-primary-color);
}

.nd-content ul,
.nd-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.nd-content li {
  margin-bottom: 0.75rem;
}

.nd-content a {
  color: var(--nd-primary-color);
  text-decoration: underline;
  transition: var(--nd-transition);
}

.nd-content a:hover {
  color: var(--nd-primary-dark);
}

.nd-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
  box-shadow: var(--nd-shadow);
}

.nd-content blockquote {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f6f7f7;
  border-left: 4px solid var(--nd-primary-color);
  font-style: italic;
  color: var(--nd-text-gray);
}

/* Footer del detalle */
.nd-single-footer {
  border-top: 2px solid #bbbbbb; /* Separador más visible */
  margin-top: 3rem;
  background: transparent; /* Fondo transparente */
  padding: 15px 2rem !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Acciones del pie */
.nd-single-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
}

/* ============================================
   BOTÓN VOLVER - ESTILO IDÉNTICO A PAGINACIÓN
   ============================================ */

.nd-single-acciones .nd-pagination-btn {
  background: #009ADA;
  border: 1px solid #009ADA;
  padding: 0 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  position: relative;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  min-width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95em;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1;
  box-sizing: border-box;
  box-shadow: 0 8px 18px -10px rgba(0, 154, 218, 0.6);
  font-family: var(--nd-font-family-text);
  gap: 0.5rem;
}

.nd-single-acciones .nd-pagination-btn:hover {
  background: #0AB2F2;
  border-color: #0AB2F2;
  transform: translateY(-2px) scale(1.08);
  box-shadow: 0 12px 24px -8px rgba(10, 178, 242, 0.7);
}

.nd-single-acciones .nd-pagination-btn:active {
  transform: translateY(0) scale(1);
  box-shadow: 0 6px 14px -8px rgba(0, 154, 218, 0.5);
}

.nd-single-acciones .nd-pagination-btn:focus,
.nd-single-acciones .nd-pagination-btn:focus-visible {
  outline: 2px solid #009ADA;
  outline-offset: 2px;
}

.nd-pagination-icon {
  display: inline-block;
  font-size: 1.1em;
  font-weight: bold;
  line-height: 1;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), margin 0.3s ease;
}

.nd-single-acciones .nd-pagination-btn:hover .nd-pagination-icon {
  transform: translateX(-6px) scale(1.25);
  margin-right: 4px;
}

.nd-pagination-text {
  display: inline-block;
  line-height: 1;
}

/* Información adicional */
.nd-single-info {
  background: var(--nd-primary-light);
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 2rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
}

.nd-info-text {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 0;
  font-size: 0.875rem;
  color: #1d2327;
  font-weight: 600;
  line-height: 1.4;
}

.nd-info-text .nd-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

/* ============================================
   PÁGINA DE ERROR - DISEÑO MEJORADO
   ============================================ */

/* Contenedor principal de error */
.nd-error-container {
  max-width: 700px;
  margin: 4rem auto;
  padding: 3rem;
  background: transparent;
  border-radius: 16px;
  box-shadow: none;
  text-align: center;
  animation: fadeInScale 0.5s ease-out;
  border: none;
}

/* Icono de error */
.nd-error-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  background: #c9302c;
  border-radius: 50%;
  box-shadow: none;
  animation: none;
}

.nd-error-icon svg {
  width: 60px;
  height: 60px;
  color: #ffffff;
  stroke-width: 2.5;
}

/* Título del error */
.nd-error-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--nd-text-dark) !important;
  margin: 0 0 1rem 0 !important;
  padding: 0 !important;
  font-family: var(--nd-font-family-display);
  line-height: 1.3 !important;
}

/* Mensaje del error */
.nd-error-message {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--nd-text-gray);
  margin: 0 0 1.5rem 0 !important;
  padding: 0 1rem !important;
  font-family: var(--nd-font-family-text);
  font-weight: 400;
}

/* Código de error */
.nd-error-code {
  margin: 0 0 2rem 0 !important;
  padding: 0.75rem 1.5rem !important;
  background: var(--nd-primary-light);
  border-radius: 8px;
  display: inline-block;
  font-family: 'Monaco', 'Courier New', monospace;
}

.nd-error-code small {
  font-size: 0.875rem;
  color: var(--nd-text-gray);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Acciones de error */
.nd-error-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.nd-error-actions .nd-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none !important;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: var(--nd-primary-color);
  color: var(--nd-text-light);
  font-family: var(--nd-font-family-text);
  line-height: 1.2 !important;
  overflow: visible;
  position: relative;
  box-shadow: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.5px;
}

.nd-error-actions .nd-back-button:hover {
  background: var(--nd-primary-dark);
}

.nd-error-actions .nd-back-button:active {
  opacity: 0.9;
}

.nd-error-actions .nd-back-button .nd-icon {
  width: 1.2em;
  height: 1.2em;
  flex-shrink: 0;
  color: white !important;
  stroke-width: 2.5;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nd-error-actions .nd-back-button:hover .nd-icon {
  transform: translateX(-4px);
}

.nd-error-actions .nd-back-button span {
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline;
  line-height: 1.2 !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  vertical-align: middle !important;
  color: white !important;
}

/* Mensajes informativos (no errores) */
.nd-single-message {
  max-width: 600px;
  margin: 3rem auto;
  padding: 2rem;
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.15);
  text-align: center;
  border: 1px solid #90caf9;
  animation: fadeInScale 0.4s ease-out;
}

.nd-single-message p {
  margin: 0;
  font-size: 1.0625rem;
  color: #1565c0;
  font-weight: 500;
  font-family: var(--nd-font-family-text);
}

/* Animaciones */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Screen reader text (accesibilidad) */
.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

/* Desktop - Sin sobrescrituras */
@media (min-width: 1025px) {
  /* El botón funciona perfectamente sin sobrescrituras */
}

/* Tablets y dispositivos medianos */
@media (max-width: 1024px) {
  .nd-single-imagen-hero {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
  }
  
  .nd-single-container {
    padding: 0 2rem 3rem;
  }
  
  .nd-single-title {
    font-size: 2.25rem;
    margin: 1.8rem 0 2rem 0 !important;
  }
  
  .nd-content {
    font-size: 1.0625rem;
  }
  
  /* El botón se adapta automáticamente */
}

/* Tablets pequeñas */
@media (max-width: 768px) {
  .nd-single-wrapper {
    padding: 0 !important;
  }
  
  .nd-single-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 2rem 4rem 2rem !important;
  }
  
  /* Estilos de error responsive */
  .nd-error-container {
    margin: 2rem auto;
    padding: 2rem 1.5rem;
  }
  
  .nd-error-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 1.5rem;
  }
  
  .nd-error-icon svg {
    width: 50px;
    height: 50px;
  }
  
  .nd-error-title {
    font-size: 1.75rem;
  }
  
  .nd-error-message {
    font-size: 1rem;
  }
  
  .nd-single-meta {
    padding: 0 !important;
    margin-bottom: 2.5rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  .nd-single-footer {
    padding: 15px 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  
  .nd-single-imagen-hero {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
  }
  
  .nd-single-container {
    padding: 2rem 2rem;
  }
  
  .nd-single-title {
    font-size: 1.875rem;
    line-height: 1.3;
  }
  
  .nd-single-resumen {
    font-size: 1.0625rem;
    padding: 1.25rem;
  }
  
  .nd-content {
    font-size: 1rem; /* Aumentar de 0.8rem para mejor legibilidad en tablet */
    line-height: 1.7;
    margin-bottom: 2rem;
    padding: 1.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .nd-single-meta {
    gap: 1rem;
    padding: 0 !important;
    margin-bottom: 2.5rem !important;
  }
  
  .nd-content h2 {
    font-size: 1.625rem;
  }
  
  .nd-content h3 {
    font-size: 1.375rem;
  }
  
  .nd-single-footer {
    padding: 25px 25px;
    padding-top: 1.5rem;
    margin-top: 2.5rem;
  }
}

/* Móviles grandes */
@media (max-width: 640px) {
  .nd-single-imagen-hero {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
  }
  
  .nd-single-hero-content {
    padding: 1.5rem;
    width: 100% !important;
  }
  
  .nd-breadcrumb {
    font-size: 1rem; /* Aumentado 50% */
  }
  
  .nd-single-container {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  
  /* Estilos de error para móviles */
  .nd-error-container {
    margin: 1.5rem auto;
    padding: 1.75rem 1.25rem;
    border-radius: 12px;
  }
  
  .nd-error-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.25rem;
  }
  
  .nd-error-icon svg {
    width: 40px;
    height: 40px;
  }
  
  .nd-error-title {
    font-size: 1.5rem;
    margin-bottom: 0.875rem !important;
  }
  
  .nd-error-message {
    font-size: 0.9375rem;
    padding: 0 0.5rem !important;
  }
  
  .nd-error-code {
    padding: 0.5rem 1rem !important;
  }
  
  .nd-error-code small {
    font-size: 0.8125rem;
  }
  
  .nd-error-actions .nd-back-button {
    width: 100%;
    min-width: auto;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
  
  .nd-single-title {
    font-size: 2.25rem; 
    margin: 1.8rem 0 2rem 0 !important;
    width: 100% !important;
  }
  
  .nd-single-resumen {
    font-size: 1.5rem; /* Aumentado 50% (1rem * 1.5 = 1.5rem) */
    padding: 1.25rem;
    margin-bottom: 2rem;
    width: calc(100% - 5%) !important;
    margin-left: 2.5% !important;
    margin-right: 2.5% !important;
    box-sizing: border-box !important;
  }
  
  .nd-content {
    font-size: 1rem; /* Sincronizado con 768px para consistencia */
    line-height: 1.7;
    margin-bottom: 2.5rem;
    padding: 0.75rem 1.5rem !important;
    width: calc(100% - 5%) !important;
    margin-left: 2.5% !important;
    margin-right: 2.5% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .nd-single-meta {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
    width: 100% !important;
    padding: 0 !important;
    margin-bottom: 3rem !important;
  }
  
  .nd-single-fecha,
  .nd-single-categoria {
    font-size: 1.2rem; /* Aumentado 50% (0.8125rem * 1.5 = 1.219rem) */
  }
  
  .nd-single-acciones {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .nd-single-acciones .nd-pagination-btn {
    width: 100%;
    justify-content: center;
    padding: 0 14px;
    font-size: 0.95em;
    gap: 0.5rem;
  }
  
  .nd-single-acciones .nd-pagination-btn:hover {
    transform: translateY(-2px) !important;
  }
  
  .nd-single-divider {
    margin: 1rem 0;
  }
  
  .nd-single-footer {
    padding: 20px;
  }
}

/* Mobile: hasta 544px (Astra breakpoints) */
@media (max-width: 544px) {
  .nd-single-imagen-hero {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
  }
  
  .nd-single-hero-content {
    padding: 1rem;
    width: 100% !important;
  }
  
  .nd-single-container {
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  
  /* Estilos de error para móviles pequeños */
  .nd-error-container {
    margin: 1rem auto;
    padding: 1.5rem 1rem;
  }
  
  .nd-error-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 1rem;
  }
  
  .nd-error-icon svg {
    width: 35px;
    height: 35px;
  }
  
  .nd-error-title {
    font-size: 1.375rem;
  }
  
  .nd-error-message {
    font-size: 0.875rem;
    line-height: 1.6;
  }
  
  .nd-single-message {
    margin: 1.5rem auto;
    padding: 1.5rem 1rem;
  }
  
  .nd-single-message p {
    font-size: 0.9375rem;
  }
  
  .nd-single-title {
    font-size: 2rem; /* Aumentado 50% (1.5rem * 1.33 = 2rem) */
    margin-bottom: 1.25rem;
    letter-spacing: -0.01em;
    text-align: center;
    font-weight: 700;
    line-height: 1.3;
    width: 100% !important;
  }
  
  .nd-single-resumen {
    font-size: 1.4rem; /* Aumentado 50% (0.9375rem * 1.5 = 1.4rem) */
    padding: 1rem;
    margin-bottom: 1.75rem;
    width: 95% !important;
    margin-left: 2.5% !important;
    margin-right: 2.5% !important;
  }
  
  .nd-content {
    font-size: 1rem; /* Sincronizado con 768px para consistencia */
    line-height: 1.7;
    margin-bottom: 2rem;
    padding: 1rem !important;
    width: 95% !important;
    margin-left: 2.5% !important;
    margin-right: 2.5% !important;
    box-sizing: border-box !important;
  }
  
  .nd-content p {
    margin-bottom: 1rem;
  }
  
  .nd-content h2 {
    font-size: 2rem; /* Aumentado 50% (1.375rem * 1.45 = 2rem) */
    margin-top: 1.75rem;
  }
  
  .nd-content h3 {
    font-size: 1.75rem; /* Aumentado 50% (1.1875rem * 1.47 = 1.75rem) */
    margin-top: 1.5rem;
  }
  
  .nd-content h4 {
    font-size: 1.55rem; /* Aumentado 50% (1.0625rem * 1.46 = 1.55rem) */
  }
  
  .nd-content ul,
  .nd-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
  }
  
  .nd-content img {
    margin: 1.5rem 0;
  }
  
  .nd-content blockquote {
    margin: 1.5rem 0;
    padding: 1rem;
    font-size: 0.9375rem;
  }
  
  .nd-single-footer {
    padding-top: 1.25rem;
    margin-top: 2rem;
    padding: 20px;
  }
  
  .nd-single-info {
    padding: 1rem;
    margin-top: 1.5rem;
  }
  
  .nd-info-text {
    font-size: 0.8125rem;
  }
  
  .nd-icon {
    width: 16px;
    height: 16px;
  }
  
  .nd-pagination-icon {
    font-size: 1rem;
  }
  
  .nd-divider-icon {
    font-size: 1rem;
  }
  
  /* Asegurar que el botón tenga el mismo tamaño */
  .nd-single-acciones .nd-pagination-btn {
    padding: 0 14px;
    font-size: 0.95em;
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    gap: 0.5rem;
  }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
  .nd-single-imagen-hero {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
  }
  
  .nd-single-title {
    font-size: 2rem; /* Aumentado 50% (1.375rem * 1.45 = 2rem) */
    width: 100% !important;
  }
  
  .nd-single-resumen {
    font-size: 1.3rem; /* Aumentado 50% (0.875rem * 1.5 = 1.3rem) */
    width: 100% !important;
  }
  
  .nd-content {
    font-size: 1rem; /* Sincronizado con 768px y 640px para consistencia */
    width: 100% !important;
    max-width: 100% !important;
  }
  
  .nd-single-acciones .nd-pagination-btn {
    font-size: 0.9375rem;
    padding: 0 10px;
  }
  
  /* Error en móviles muy pequeños */
  .nd-error-container {
    padding: 1.25rem 0.875rem;
  }
  
  .nd-error-icon {
    width: 60px;
    height: 60px;
  }
  
  .nd-error-icon svg {
    width: 30px;
    height: 30px;
  }
  
  .nd-error-title {
    font-size: 1.25rem;
  }
  
  .nd-error-actions .nd-back-button {
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    gap: 0.6rem;
  }
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nd-single-wrapper {
  animation: fadeIn 0.5s ease-out;
}

/* Modo oscuro (opcional, si el tema de WordPress lo soporta) */
@media (prefers-color-scheme: dark) {
  .nd-single-wrapper {
    background: transparent !important;
    color: var(--nd-text-dark);
  }
  
  .nd-single-content {
    background: transparent !important;
  }
  
  .nd-single-title {
    color: var(--nd-text-dark) !important;
  }
  
  .nd-single-resumen {
    background: #eff2f7;
    color: var(--nd-text-dark);
    border-left: 4px solid var(--nd-primary-color);
    text-align: right;
    padding: 2rem;
    padding-left: 2rem;
  }
  
  .nd-content {
    color: var(--nd-text-dark) !important;
    background: transparent !important;
  }
  
  .nd-content h2,
  .nd-content h3 {
    color: var(--nd-text-dark) !important;
  }
  
  .nd-single-info {
    background: rgba(0, 124, 186, 0.15);
  }
  
  /* Página de error en modo oscuro */
  .nd-error-container {
    background: transparent !important;
    border: none;
  }
  
  .nd-error-icon {
    background: #c9302c;
  }
  
  .nd-error-title {
    color: var(--nd-text-dark) !important;
  }
  
  .nd-error-message {
    color: var(--nd-text-gray) !important;
  }
  
  .nd-error-code {
    background: var(--nd-primary-light);
  }
  
  .nd-error-code small {
    color: var(--nd-text-gray) !important;
  }
  
  .nd-single-message {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #90caf9;
  }
  
  .nd-single-message p {
    color: #1565c0;
  }
  
  /* Forzar contenedor principal sin fondo */
  .nd-single-container {
    background: transparent !important;
  }
}

/* Mejoras de accesibilidad - Alto contraste */
@media (prefers-contrast: high) {
  .nd-error-container {
    border: none;
  }
  
  .nd-error-title {
    color: #000000 !important;
  }
  
  .nd-error-message {
    color: #000000;
  }
  
  .nd-error-actions .nd-back-button {
    border: 2px solid #000000;
  }
}

/* Reducir movimiento para usuarios con preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .nd-error-container,
  .nd-single-message,
  .nd-single-wrapper {
    animation: none;
  }
  
  .nd-error-icon {
    animation: none;
  }
  
  .nd-error-actions .nd-back-button:hover {
    transform: none;
    padding-left: 0.75rem;
  }
  
  .nd-error-actions .nd-back-button .nd-icon {
    transition: none;
    opacity: 1;
    position: static;
  }
  
  .nd-error-actions .nd-back-button:hover .nd-icon {
    transform: none;
  }
  
  .nd-error-actions .nd-back-button span:not(.nd-icon) {
    transition: none;
  }
  
  .nd-error-actions .nd-back-button:hover span:not(.nd-icon) {
    transform: none;
  }
}

/* Desktop - Imagen 100% viewport, contenido sin márgenes */
@media (min-width: 1024px) {
  .nd-single-wrapper {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .nd-single-imagen-hero {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    position: relative;
    padding: 0 !important;
  }
  
  .nd-single-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }
  
  .nd-single-content {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 3rem 0 !important;
    background: transparent !important;
  }
  
  .nd-single-meta {
    width: 100% !important;
    padding: 0 !important;
    margin: 0 auto !important;
    max-width: 100% !important;
  }
  
  .nd-single-title {
    width: 100% !important;
    padding: 0 !important;
    margin: 2rem 0 2.5rem 0 !important;
    text-align: center;
  }
  
  .nd-single-resumen {
    width: 100% !important;
    margin: 2rem auto !important;
    font-size: 1.125rem;
    padding: 1.5rem !important;
    box-sizing: border-box !important;
  }
  
  .nd-single-divider {
    width: 100% !important;
    padding: 0 !important;
    margin: 1.5rem 0 !important;
  }
  
  .nd-content {
    width: 100% !important;
    padding: 30px 0 40px 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  
  .nd-single-footer {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 2rem 0 !important;
    background: transparent;
  }
  
  .nd-single-acciones {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    justify-content: center;
  }
}

/* Tablet y Mobile - Sin cambios de ancho */
@media (max-width: 1023px) {
  .nd-single-imagen-hero {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .nd-single-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  
  .nd-single-content {
    width: 100% !important;
    max-width: 100% !important;
    padding: 2rem 0 !important;
  }
}

/* Móviles - Aplicar width calc() para mejor spacing */
@media (max-width: 640px) {
  .nd-single-resumen {
    width: calc(100% - 5%) !important;
    margin-left: 2.5% !important;
    margin-right: 2.5% !important;
    margin-bottom: 2rem;
  }
  
  .nd-content {
    width: calc(100% - 5%) !important;
    margin-left: 2.5% !important;
    margin-right: 2.5% !important;
    padding: 0.75rem 1.5rem !important;
  }
}

/* Móviles pequeños (544px) - Aplicar width calc() para mejor spacing */
@media (max-width: 544px) {
  .nd-single-resumen {
    width: calc(100% - 5%) !important;
    margin-left: 2.5% !important;
    margin-right: 2.5% !important;
    margin-bottom: 1.75rem;
  }
  
  .nd-content {
    width: calc(100% - 5%) !important;
    margin-left: 2.5% !important;
    margin-right: 2.5% !important;
    padding: 1rem !important;
  }
}

/* ============================================
   HERO SECTION - RESPONSIVE BREAKPOINTS
   ============================================ */

/* Desktop Grande (1920px+) - 4K */
@media (min-width: 1920px) {
  .nd-hero-section {
    aspect-ratio: 16 / 5;
    background-attachment: scroll !important;
    min-height: 300px;
  }
  
  .nd-hero-title {
    font-size: clamp(2.5rem, 6vw, 3.5rem) !important;
  }
  
  .nd-hero-content {
    padding: 2rem !important;
  }
}

/* Desktop Estándar (1024px - 1919px) */
@media (min-width: 1024px) and (max-width: 1919px) {
  .nd-hero-section {
    aspect-ratio: 16 / 5;
    background-attachment: scroll !important;
    min-height: 280px;
  }
  
  .nd-hero-title {
    font-size: clamp(2rem, 5vw, 2.8rem) !important;
  }
  
  .nd-hero-meta {
    gap: 1.5rem !important;
  }
}

/* Tablet Grande (769px - 1023px) */
@media (min-width: 769px) and (max-width: 1023px) {
  .nd-hero-section {
    aspect-ratio: 16 / 5;
    background-attachment: scroll !important;
    min-height: 260px;
  }
  
  .nd-hero-title {
    font-size: clamp(1.75rem, 5vw, 2.2rem) !important;
  }
  
  .nd-hero-meta {
    gap: 1rem !important;
  }
  
  .nd-hero-fecha,
  .nd-hero-categoria {
    font-size: clamp(0.75rem, 2vw, 0.95rem) !important;
  }
}

/* Tablet Pequeña (641px - 768px) */
@media (min-width: 641px) and (max-width: 768px) {
  .nd-hero-section {
    aspect-ratio: 16 / 5;
    background-attachment: scroll !important;
    min-height: 240px;
  }
  
  .nd-hero-title {
    font-size: clamp(1.5rem, 5vw, 2rem) !important;
  }
  
  .nd-hero-meta {
    gap: 0.75rem !important;
    margin-top: 1rem !important;
  }
  
  .nd-hero-fecha,
  .nd-hero-categoria {
    font-size: clamp(0.7rem, 1.8vw, 0.85rem) !important;
    padding: 0.4rem 0.8rem !important;
  }
}

/* Móvil Grande (481px - 640px) */
@media (max-width: 640px) {
  .nd-hero-section {
    aspect-ratio: 16 / 6;
    background-attachment: scroll !important;
    min-height: 220px;
  }
  
  .nd-hero-title {
    font-size: clamp(1.25rem, 5vw, 1.8rem) !important;
  }
  
  .nd-hero-content {
    padding: 1.5rem 1.25rem !important;
  }
  
  .nd-hero-meta {
    gap: 0.5rem !important;
    margin-top: 0.75rem !important;
  }
  
  .nd-hero-fecha,
  .nd-hero-categoria {
    font-size: clamp(0.65rem, 1.8vw, 0.8rem) !important;
    padding: 0.35rem 0.65rem !important;
  }
}

/* Móvil Pequeño (361px - 480px) */
@media (max-width: 480px) {
  .nd-hero-section {
    aspect-ratio: 16 / 6;
    background-attachment: scroll !important;
    min-height: 200px;
  }
  
  .nd-hero-title {
    font-size: clamp(1.1rem, 4.5vw, 1.6rem) !important;
  }
  
  .nd-hero-content {
    padding: 1.5rem 1rem !important;
  }
  
  .nd-hero-meta {
    gap: 0.5rem !important;
    margin-top: 0.5rem !important;
  }
  
  .nd-hero-fecha,
  .nd-hero-categoria {
    font-size: clamp(0.6rem, 1.5vw, 0.75rem) !important;
    padding: 0.3rem 0.6rem !important;
    border-radius: 4px !important;
  }
}

/* Móvil Muy Pequeño (< 360px) */
@media (max-width: 360px) {
  .nd-hero-section {
    aspect-ratio: 16 / 7;
    background-attachment: scroll !important;
    min-height: 180px;
  }
  
  .nd-hero-title {
    font-size: clamp(1rem, 4vw, 1.4rem) !important;
    letter-spacing: -0.01em !important;
  }
  
  .nd-hero-content {
    padding: 1.25rem 0.8rem !important;
  }
  
  .nd-hero-meta {
    gap: 0.4rem !important;
    margin-top: 0.4rem !important;
  }
  
  .nd-hero-fecha,
  .nd-hero-categoria {
    font-size: clamp(0.55rem, 1.3vw, 0.7rem) !important;
    padding: 0.25rem 0.5rem !important;
  }
}

/* Reducir movimiento para usuarios con preferencias de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .nd-hero-section,
  .nd-hero-content,
  .nd-hero-title {
    animation: none !important;
  }
}

/* Impresión */
@media print {
  .nd-back-button {
    display: none;
  }
  
  
  .nd-error-container {
    box-shadow: none;
    border: none;
  }
  
  .nd-error-icon {
    background: #999999;
    box-shadow: none;
    animation: none;
  }
  
  .nd-error-actions {
    display: none;
  }
  
  /* Hero en impresión - no mostrar */
  .nd-hero-section {
    display: none !important;
  }
}

/* Modo oscuro - Hero section */
@media (prefers-color-scheme: dark) {
  .nd-hero-overlay {
    background: rgba(0, 0, 0, 0.45) !important;
  }
  
  .nd-hero-title {
    color: var(--nd-text-light) !important;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.6),
                 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  }
  
  .nd-hero-fecha,
  .nd-hero-categoria {
    background: rgba(255, 255, 255, 0.15) !important;
    color: var(--nd-text-light) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4) !important;
  }
}

/* Alto contraste */
@media (prefers-contrast: high) {
  .nd-hero-overlay {
    background: rgba(0, 0, 0, 0.5) !important;
  }
  
  .nd-hero-title {
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.8) !important;
    font-weight: 800 !important;
  }
  
  .nd-hero-fecha,
  .nd-hero-categoria {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
  }
}

