/**
 * Estilos personalizados adicionales para Tradeando007
 * Complementan las clases de Tailwind CSS
 */

/* Estilos para el logo personalizado de WordPress */
.custom-logo-link {
  display: flex;
  align-items: center;
  transition: opacity 0.3s ease;
}

.custom-logo-link:hover {
  opacity: 0.85;
}

.custom-logo {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
}

@media (min-width: 768px) {
  .custom-logo {
    height: 50px;
  }
}

/* Header con bg-gray-900 (mismo que secciones de contenido) */
header.sticky {
  background: #111827 !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(75, 85, 99, 0.3) !important;
  box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.4) !important;
}

/* Texto del menú en claro para fondo oscuro */
header.sticky nav a,
header.sticky .text-gray-300,
header.sticky .text-gray-100 {
  color: #f3f4f6 !important;
  font-weight: 500;
}

header.sticky nav a:hover {
  color: #60a5fa !important;
}

/* Botón "Sígueme en X" con estilo azul para contrastar */
header.sticky .bg-blue-600 {
  background-color: #2563eb !important;
  color: white !important;
  border: 2px solid #2563eb !important;
}

header.sticky .bg-blue-600:hover {
  background-color: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.4);
}

/* Animaciones suaves */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mejoras de accesibilidad y UX */
:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

/* Estilos para contenido de blog (prose) */
.prose {
  max-width: 65ch;
}

.prose h2 {
  color: #f9fafb;
  font-size: 1.875rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.prose h3 {
  color: #f3f4f6;
  font-size: 1.5rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose p {
  color: #d1d5db;
  margin-bottom: 1.5rem;
  line-height: 1.75;
}

.prose ul,
.prose ol {
  color: #d1d5db;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose strong {
  color: #f9fafb;
  font-weight: 600;
}

.prose a {
  color: #60a5fa;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover {
  color: #93c5fd;
}

.prose blockquote {
  border-left: 4px solid #2563eb;
  padding-left: 1.5rem;
  font-style: italic;
  color: #93c5fd;
  margin: 2rem 0;
}

.prose code {
  background-color: #1f2937;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.875em;
  color: #60a5fa;
}

.prose pre {
  background-color: #111827;
  border: 1px solid #374151;
  border-radius: 0.75rem;
  padding: 1.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.prose pre code {
  background-color: transparent;
  padding: 0;
  color: #d1d5db;
}

/* Mejoras para imágenes en posts */
.prose img {
  border-radius: 1rem;
  margin: 2rem 0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Estilos para videos embebidos responsive (YouTube, Vimeo, etc.) */
.prose iframe,
.entry-content iframe,
iframe[src*="youtube.com"],
iframe[src*="youtu.be"],
iframe[src*="vimeo.com"] {
  max-width: 100%;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: 400px;
  border-radius: 1rem;
  margin: 2rem 0;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
}

/* Contenedor responsive para videos embebidos */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* Aspect ratio 16:9 */
  height: 0;
  overflow: hidden;
  margin: 2rem 0;
  border-radius: 1rem;
}

.video-container iframe,
.video-container object,
.video-container embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 1rem;
}

/* En móviles, reducir un poco el tamaño mínimo */
@media (max-width: 768px) {
  .prose iframe,
  .entry-content iframe,
  iframe[src*="youtube.com"],
  iframe[src*="youtu.be"],
  iframe[src*="vimeo.com"] {
    min-height: 250px;
  }
}

/* Forzar fondo oscuro y texto claro en contenido de posts */
.prose div,
.prose p,
.prose span,
.prose section,
.prose article {
  background-color: transparent !important;
  background: transparent !important;
}

/* Asegurar que todo el texto sea legible en fondo oscuro */
.prose * {
  color: #d1d5db !important;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
  color: #f9fafb !important;
}

.prose strong,
.prose b {
  color: #f9fafb !important;
}

.prose a {
  color: #60a5fa !important;
}

/* Sobrescribir cualquier estilo inline de WordPress/SiteOrigin */
article.max-w-3xl div[style*="background"],
article.max-w-3xl p[style*="background"],
article.max-w-3xl span[style*="background"] {
  background-color: transparent !important;
  background: transparent !important;
}

/* Estilos para paginación de WordPress */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination .page-numbers {
  padding: 0.5rem 1rem;
  background-color: #1f2937;
  border: 1px solid #374151;
  border-radius: 0.75rem;
  color: #d1d5db;
  text-decoration: none;
  transition: all 0.2s;
}

.pagination .page-numbers:hover {
  background-color: #374151;
  border-color: #2563eb;
  color: #fff;
}

.pagination .page-numbers.current {
  background-color: #2563eb;
  border-color: #2563eb;
  color: #fff;
  font-weight: 600;
}

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

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Mejoras de hover para tarjetas */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Efecto de glass/blur para elementos superpuestos */
.glass {
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
}

/* Gradientes personalizados */
.gradient-blue {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.gradient-dark {
  background: linear-gradient(135deg, #111827 0%, #030712 100%);
}

/* Estilos para formularios si se agregan en el futuro */
input[type="text"],
input[type="email"],
input[type="search"],
textarea {
  transition: all 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Estilos para detalles/acordeón */
details summary {
  cursor: pointer;
  user-select: none;
}

details summary::-webkit-details-marker {
  display: none;
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #111827;
}

::-webkit-scrollbar-thumb {
  background: #374151;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4b5563;
}

/* Mejoras de tipografía */
h1, h2, h3, h4, h5, h6 {
  text-rendering: optimizeLegibility;
  letter-spacing: -0.02em;
}

/* Espaciado mejorado para secciones */
section + section {
  position: relative;
}

/* Loading states */
.skeleton {
  background: linear-gradient(90deg, #1f2937 25%, #374151 50%, #1f2937 75%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Print styles */
@media print {
  header,
  footer,
  .no-print {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}
