/*
Theme Name: Emercrit
Theme URI: https://example.com/emercrit
Author: Emercrit
Author URI: https://example.com
Description: Tema de WordPress para Emercrit. Diseño limpio y responsive.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: emercrit
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, blog, one-column, two-columns, right-sidebar, flexible-header, full-width-template, sticky-post, theme-options

Emercrit WordPress Theme - (c) 2025
*/

/* ==========================================================================
   Variables y reset
   ========================================================================== */

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-text: #1f2937;
  --color-text-light: #6b7280;
  --color-bg: #ffffff;
  --color-bg-alt: #f9fafb;
  --color-border: #e5e7eb;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --max-width: 1200px;
  --spacing: 1.5rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing);
  width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: var(--spacing) 0;
}

.site-branding {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--spacing);
}

.site-title {
  margin: 0;
  font-size: 1.5rem;
}

.site-title a {
  color: var(--color-text);
  text-decoration: none;
}

.site-title a:hover {
  color: var(--color-primary);
}

.site-description {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--color-text-light);
}

/* ==========================================================================
   Navegación
   ========================================================================== */

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.main-navigation a {
  color: var(--color-text);
  text-decoration: none;
  font-weight: 500;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
  color: var(--color-primary);
}

/* ==========================================================================
   Contenido principal
   ========================================================================== */

.content-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing);
}

@media (min-width: 768px) {
  .content-area.has-sidebar {
    grid-template-columns: 1fr 300px;
  }
}

.entry-header {
  margin-bottom: var(--spacing);
}

.entry-title {
  margin: 0 0 0.5rem;
  font-size: 2rem;
  line-height: 1.2;
}

.entry-title a {
  color: inherit;
  text-decoration: none;
}

.entry-title a:hover {
  color: var(--color-primary);
}

.entry-meta {
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.entry-content {
  margin-bottom: var(--spacing);
}

.entry-content p {
  margin: 0 0 1rem;
}

.entry-content a {
  color: var(--color-primary);
}

.entry-content a:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Posts y páginas
   ========================================================================== */

.post,
.page {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.post:last-child,
.page:last-child {
  border-bottom: none;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */

.widget-area {
  padding: var(--spacing) 0;
}

.widget {
  margin-bottom: 2rem;
}

.widget-title {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 0.5rem;
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget li {
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--color-border);
}

.widget li:last-child {
  border-bottom: none;
}

.widget a {
  color: var(--color-text);
  text-decoration: none;
}

.widget a:hover {
  color: var(--color-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-bg-alt);
  border-top: 1px solid var(--color-border);
  padding: var(--spacing) 0;
  margin-top: auto;
}

.site-info {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing);
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-light);
}

.site-info a {
  color: var(--color-primary);
  text-decoration: none;
}

/* ==========================================================================
   Navegación de posts
   ========================================================================== */

.posts-navigation,
.post-navigation {
  margin: 2rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--color-border);
}

.nav-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   Comentarios
   ========================================================================== */

.comments-area {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-body {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

/* ==========================================================================
   Utilidades
   ========================================================================== */

.alignleft { float: left; margin-right: 1rem; }
.alignright { float: right; margin-left: 1rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-top: 0.5rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
}

.search-form button {
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.search-form button:hover {
  background: var(--color-primary-dark);
}

.read-more {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--color-primary);
  font-weight: 500;
}

.entry-summary {
  margin-bottom: 1rem;
}

.error-404 .button,
.page-content .button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  margin-top: 1rem;
}

.error-404 .button:hover,
.page-content .button:hover {
  background: var(--color-primary-dark);
  color: white;
}

.post-thumbnail img {
  max-width: 100%;
  height: auto;
  display: block;
}

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
