/*
Theme Name: SEO Ultimate
Theme URI: https://github.com/seo-ultimate/wp-theme
Description: Premium WordPress theme with maximum SEO and 100/100 PageSpeed. Built for blogs and corporate websites with advanced SEO features, lightning-fast performance, and stunning design.
Version: 1.0.0
Author: SEO Ultimate Team
Author URI: https://seo-ultimate.com
Text Domain: seo-ultimate
Requires at least: 6.0
Tested up to: 6.3
Requires PHP: 8.1
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, news, portfolio, grid-layout, one-column, two-columns, three-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-logo, custom-menu, editor-style, featured-images, flexible-header, footer-widgets, full-site-editing, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks, accessibility-ready

SEO Ultimate is a premium WordPress theme designed for maximum SEO performance and 100/100 PageSpeed scores. Perfect for blogs, corporate websites, and online publications.
*/

/*!
 * SEO Ultimate - Premium WordPress Theme
 * Built for maximum SEO performance and 100/100 PageSpeed
 * Version: 1.0.0
 */

/* ==========================================================================
   CSS RESET
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: inherit;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  background-color: #f8fafc;
  color: #1f2937;
}

/* Improve media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Remove list styles */
ul, ol {
  list-style: none;
}

/* Anchor elements */
a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #2563eb;
}

/* Form elements */
input, button, textarea, select {
  font: inherit;
}

/* Button reset */
button {
  background: none;
  border: none;
  cursor: pointer;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ==========================================================================
   LAYOUT COMPONENTS
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* ==========================================================================
   SINGLE POST STYLES - NUEVOS ESTILOS AGREGADOS
   ========================================================================== */

/* Contenedor principal del post */
.single-post {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin: 2rem auto;
  max-width: 1200px;  /* Cambiado de 800px a 1000px */
  width: 100%;
}

/* Header del post */
.entry-header {
  text-align: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 2rem;
}

.entry-categories {
  margin-bottom: 1rem;
}

.entry-categories a {
  background: #2563eb;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-block;
  margin: 0.25rem;
}

.entry-categories a:hover {
  background: #1d4ed8;
  color: white;
}

.entry-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 1rem 0;
  color: #1f2937;
  text-align: center;
}

/* Meta información */
.entry-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  color: #6b7280;
  font-size: 0.875rem;
}

.author-avatar img {
  border-radius: 50%;
}

.meta-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-info .author {
  font-weight: 600;
  color: #374151;
}

/* Imagen destacada */
.featured-image {
  margin: 2rem 0;
}

.featured-image img {
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Contenido del post - ESTILOS MEJORADOS PARA LEGIBILIDAD */
.entry-content {
  line-height: 1.7;
  color: #374151;
  font-size: 1.125rem;
  max-width: 100%;
  margin: 0 auto;
}

.entry-content p {
  margin-bottom: 1.5rem;
  text-align: left;
  font-size: 1.125rem;
  line-height: 1.7;
}

.entry-content img {
  border-radius: 0.5rem;
  margin: 2rem auto;
  display: block;
  max-width: 100%;
  height: auto;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin: 2rem 0 1rem;
  color: #1f2937;
  line-height: 1.3;
  text-align: left;
}

.entry-content h2 {
  font-size: 1.875rem;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

.entry-content h3 {
  font-size: 1.5rem;
}

.entry-content h4 {
  font-size: 1.25rem;
}

.entry-content ul,
.entry-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
  text-align: left;
}

.entry-content ul {
  list-style: disc;
}

.entry-content ol {
  list-style: decimal;
}

.entry-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.entry-content blockquote {
  border-left: 4px solid #2563eb;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #6b7280;
  background: #f8fafc;
  padding: 1.5rem;
  border-radius: 0 0.5rem 0.5rem 0;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

.entry-content table th,
.entry-content table td {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  text-align: left;
}

.entry-content table th {
  background: #f8fafc;
  font-weight: 600;
}

/* Footer del post */
.entry-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.entry-tags {
  margin-bottom: 2rem;
}

.entry-tags h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  color: #374151;
}

.entry-tags a {
  display: inline-block;
  background: #f3f4f6;
  color: #374151;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  margin: 0.25rem;
  transition: all 0.2s;
}

.entry-tags a:hover {
  background: #2563eb;
  color: #ffffff;
}

/* Compartir en redes sociales */
.social-share {
  margin-bottom: 2rem;
}

.social-share h3 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: #374151;
}

.share-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  min-height: 44px;
}

.share-button.facebook {
  background: #1877f2;
}

.share-button.twitter {
  background: #1da1f2;
}

.share-button.linkedin {
  background: #0a66c2;
}

.share-button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Biografía del autor */
.author-bio {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 0.5rem;
  align-items: flex-start;
}

.author-avatar img {
  border-radius: 50%;
  flex-shrink: 0;
}

.author-info h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  color: #1f2937;
}

.author-info p {
  margin: 0 0 1rem;
  color: #6b7280;
  line-height: 1.6;
}

.author-link {
  color: #2563eb;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.author-link:hover {
  color: #1d4ed8;
}

/* Posts relacionados */
.related-posts {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

.related-posts h2 {
  font-size: 1.875rem;
  text-align: center;
  margin-bottom: 2rem;
  color: #1f2937;
}

/* Breadcrumbs */
.breadcrumb {
  margin-bottom: 1rem;
}

.breadcrumbs {
  font-size: 0.875rem;
  color: #6b7280;
}

.breadcrumbs a {
  color: #2563eb;
}

.breadcrumbs a:hover {
  color: #1d4ed8;
}

/* ==========================================================================
   HEADER & NAVIGATION - COMPLETAMENTE CORREGIDO
   ========================================================================== */
.site-header {
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  min-height: 80px;
  position: relative;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  max-width: 50%;
}

.site-logo img {
  height: 40px;
  width: auto;
  display: block;
}

.site-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.site-title a {
  color: inherit;
}

.site-description {
  font-size: 0.875rem;
  opacity: 0.7;
  margin: 0;
  line-height: 1.4;
}

/* Main Navigation */
.main-navigation {
  display: flex;
  align-items: center;
}

/* Menú principal - VISIBLE en desktop */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-menu > li {
  position: relative;
}

.nav-menu a {
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  transition: all 0.2s;
  white-space: nowrap;
  display: block;
}

.nav-menu a:hover {
  color: #2563eb;
  background-color: #eff6ff;
}

/* Submenús */
.nav-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  min-width: 250px;
  z-index: 1000;
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  border: 1px solid #e2e8f0;
}

.nav-menu .sub-menu li {
  margin: 0;
}

.nav-menu .sub-menu a {
  padding: 0.75rem 1rem;
  border-radius: 0;
  border-bottom: 1px solid #f1f5f9;
}

.nav-menu .sub-menu a:hover {
  background: #f8fafc;
}

.nav-menu li:hover > .sub-menu {
  display: block;
}

/* Menu Toggle - OCULTO EN ESCRITORIO */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  z-index: 1001;
}

.menu-toggle:hover {
  background: #e2e8f0;
}

.menu-toggle .bar {
  width: 20px;
  height: 2px;
  background: #1f2937;
  margin: 2px 0;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Estados del toggle cuando está activo */
.menu-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  z-index: 1001;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  text-decoration: none;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.skip-link:focus {
  top: 6px;
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.site-main {
  min-height: 60vh;
  padding: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .site-main {
    padding: 3rem 0;
  }
}

/* Posts Grid - RESPONSIVE */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.post-card {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
}

.post-card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.card-image {
  width: 100%;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.post-card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 1.5rem;
}

.entry-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.entry-title a {
  color: inherit;
}

.entry-title a:hover {
  color: #2563eb;
}

.post-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.entry-excerpt {
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.read-more {
  display: inline-flex;
  align-items: center;
  color: #2563eb;
  font-weight: 500;
  transition: all 0.2s;
  gap: 0.5rem;
}

.read-more:hover {
  color: #1d4ed8;
  gap: 0.75rem;
}

.read-more::after {
  content: "→";
  transition: transform 0.2s;
}

.read-more:hover::after {
  transform: translateX(3px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: #1f2937;
  color: #f9fafb;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-widgets {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-widgets {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-widgets {
    grid-template-columns: repeat(4, 1fr);
  }
}

.widget-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #ffffff;
}

.footer-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-menu li {
  margin-bottom: 0.5rem;
}

.footer-menu a {
  color: #d1d5db;
  transition: all 0.2s;
  padding: 0.25rem 0;
  display: block;
}

.footer-menu a:hover {
  color: #ffffff;
  padding-left: 0.5rem;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 1.5rem;
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination {
  display: flex;
  justify-content: center;
  margin: 3rem 0 1rem;
}

.pagination .nav-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  color: #4b5563;
  transition: all 0.2s;
  min-width: 44px;
  min-height: 44px;
}

.pagination .page-numbers:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.pagination .page-numbers.current {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.pagination .page-numbers.dots {
  border: none;
  background: none;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center {
  text-align: center;
}

.no-content {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

.no-content h2 {
  color: #374151;
  margin-bottom: 1rem;
}

/* ==========================================================================
   MOBILE STYLES - SOLO PARA MÓVIL (≤ 1023px)
   ========================================================================== */
@media (max-width: 1023px) {
  .menu-toggle {
    display: flex;
  }
  
  /* Menú oculto por defecto en móvil/tablet */
  .nav-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    flex-direction: column;
    padding: 80px 1rem 2rem;
    margin: 0;
    z-index: 999;
    overflow-y: auto;
    gap: 0;
  }
  
  .nav-menu.active {
    display: flex;
  }
  
  .nav-menu > li {
    width: 100%;
    border-bottom: 1px solid #f1f5f9;
  }
  
  .nav-menu a {
    display: block;
    padding: 1rem 0.75rem;
    border-radius: 0.375rem;
    width: 100%;
    font-size: 1.125rem;
  }
  
  .nav-menu a:hover {
    background-color: #f8fafc;
  }
  
  /* Submenús en móvil */
  .nav-menu .sub-menu {
    position: static;
    box-shadow: none;
    display: none;
    background: #f8fafc;
    border: none;
    border-radius: 0;
    padding-left: 1rem;
  }
  
  .nav-menu .sub-menu.active {
    display: block;
  }
  
  .nav-menu .sub-menu a {
    font-size: 1rem;
    padding: 0.875rem 0.75rem;
  }
  
  /* Ajustes del branding en móvil */
  .site-branding {
    max-width: 70%;
  }
  
  .site-logo img {
    height: 35px;
  }
  
  .site-title {
    font-size: 1.2rem;
  }
  
  /* Overlay para cuando el menú está abierto */
  body.menu-open {
    overflow: hidden;
  }
  
  .nav-menu.active::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: -1;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .header-inner {
    padding: 0.75rem 0;
  }
  
  .site-main {
    padding: 1.5rem 0;
  }
  
  /* Ajustes móvil para single post */
  .single-post {
    padding: 1.5rem;
    margin: 1rem auto;
  }
  
  .entry-title {
    font-size: 2rem;
  }
  
  .entry-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .author-bio {
    flex-direction: column;
    text-align: center;
  }
  
  .share-buttons {
    flex-direction: column;
  }
  
  .entry-content {
    font-size: 1rem;
  }
  
  .entry-content h2 {
    font-size: 1.5rem;
  }
  
  .entry-content h3 {
    font-size: 1.25rem;
  }
}

/* ==========================================================================
   TABLET STYLES (768px - 1023px)
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1023px) {
  .container {
    padding: 0 1.5rem;
  }
  
  .posts-grid {
    gap: 1.5rem;
  }
  
  .nav-menu {
    gap: 1.5rem;
  }
}
/* ==========================================================================
   PAGE STYLES - Para páginas individuales
   ========================================================================== */

/* Asegurar que las páginas usen el mismo formato que los posts */
.page .single-post,
.single .single-post {
  background: #ffffff;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin: 2rem auto;
  max-width: 1300px;
  width: 100%;
}

/* Contenido de páginas */
.page .entry-content,
.single .entry-content {
  line-height: 1.7;
  color: #374151;
  font-size: 1.125rem;
  max-width: 100%;
  margin: 0 auto;
}

.page .entry-content p,
.single .entry-content p {
  margin-bottom: 1.5rem;
  text-align: left;
  font-size: 1.125rem;
  line-height: 1.7;
}

.page .entry-content img,
.single .entry-content img {
  border-radius: 0.5rem;
  margin: 2rem auto;
  display: block;
  max-width: 100%;
  height: auto;
}

.page .entry-content h2,
.page .entry-content h3,
.page .entry-content h4,
.single .entry-content h2,
.single .entry-content h3,
.single .entry-content h4 {
  margin: 2rem 0 1rem;
  color: #1f2937;
  line-height: 1.3;
  text-align: left;
}

.page .entry-content h2,
.single .entry-content h2 {
  font-size: 1.875rem;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0.5rem;
}

.page .entry-content h3,
.single .entry-content h3 {
  font-size: 1.5rem;
}

.page .entry-content ul,
.page .entry-content ol,
.single .entry-content ul,
.single .entry-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
  text-align: left;
}

.page .entry-content ul,
.single .entry-content ul {
  list-style: disc;
}

.page .entry-content ol,
.single .entry-content ol {
  list-style: decimal;
}

.page .entry-content li,
.single .entry-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

/* Header de páginas */
.page .entry-header,
.single .entry-header {
  text-align: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 2rem;
}

.page .entry-title,
.single .entry-title {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 1rem 0;
  color: #1f2937;
  text-align: center;
}
/* ==========================================================================
   ESCRITORIO STYLES (≥ 1024px)
   ========================================================================== */
@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
  
  .posts-grid {
    gap: 2rem;
  }
  
  .nav-menu {
    gap: 2.5rem;
  }
}
/* Estilos para bloques de WordPress */
.wp-block-image img {
    max-width: 100%;
    height: auto;
}

.wp-block-heading {
    margin: 1.5em 0 0.5em;
}

.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
}

.wp-block-table td, .wp-block-table th {
    border: 1px solid #ddd;
    padding: 8px;
}

.wp-block-list li {
    margin-bottom: 0.5em;
}

.wp-block-media-text {
    display: grid;
    grid-template-columns: 50% auto;
    gap: 20px;
}

.alignfull {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}