/*
Theme Name: RST
Theme URI: https://example.com/rst
Author: Tu Nombre
Author URI: https://example.com
Description: Tema WordPress clásico y responsive para el sitio RST. Incluye soporte para menús, imágenes destacadas, widgets y personalización básica.
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
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: rst
Tags: custom-background, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, blog, one-column, two-columns, right-sidebar, flexible-header, footer-widgets, full-width-template, theme-options
*/

/* ==========================================================================
   Variables y reset básico
   ========================================================================== */

:root {
	--rst-color-primary: #2563eb;
	--rst-color-secondary: #1e40af;
	--rst-color-text: #1f2937;
	--rst-color-text-light: #6b7280;
	--rst-color-bg: #ffffff;
	--rst-color-bg-alt: #f9fafb;
	--rst-font-sans: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--rst-font-serif: Georgia, "Times New Roman", serif;
	--rst-max-width: 1200px;
	--rst-spacing: 1.5rem;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	padding: 0;
	font-family: var(--rst-font-sans);
	font-size: 16px;
	line-height: 1.6;
	color: var(--rst-color-text);
	background-color: var(--rst-color-bg);
}

/* ==========================================================================
   Layout principal
   ========================================================================== */

.site {
	max-width: var(--rst-max-width);
	margin: 0 auto;
	padding: 0 var(--rst-spacing);
}

.site-content {
	padding: var(--rst-spacing) 0;
}

/* Contenedor con sidebar */
.content-area {
	width: 100%;
}

@media (min-width: 768px) {
	.site-main.has-sidebar {
		display: grid;
		grid-template-columns: 1fr 300px;
		gap: var(--rst-spacing);
	}
}

/* ==========================================================================
   Encabezado
   ========================================================================== */

.site-header {
	background: var(--rst-color-bg-alt);
	border-bottom: 1px solid #e5e7eb;
	padding: var(--rst-spacing) 0;
}

.site-branding {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: var(--rst-spacing);
}

.custom-logo-link img {
	max-height: 60px;
	width: auto;
	height: auto;
}

.site-title {
	margin: 0;
	font-size: 1.5rem;
}

.site-title a {
	color: var(--rst-color-text);
	text-decoration: none;
}

.site-title a:hover {
	color: var(--rst-color-primary);
}

/* ==========================================================================
   Navegación
   ========================================================================== */

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.main-navigation a {
	display: block;
	padding: 0.5rem 0;
	color: var(--rst-color-text);
	text-decoration: none;
}

.main-navigation a:hover,
.main-navigation .current-menu-item a {
	color: var(--rst-color-primary);
}

/* ==========================================================================
   Contenido y entradas
   ========================================================================== */

.entry-header {
	margin-bottom: var(--rst-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(--rst-color-primary);
}

.entry-meta {
	font-size: 0.875rem;
	color: var(--rst-color-text-light);
	margin-bottom: 1rem;
}

.entry-content {
	margin-bottom: var(--rst-spacing);
}

.entry-content p:last-child {
	margin-bottom: 0;
}

.post-thumbnail {
	margin-bottom: var(--rst-spacing);
	overflow: hidden;
}

.post-thumbnail img {
	display: block;
	width: 100%;
	height: auto;
}

/* Navegación de entradas */
.posts-navigation,
.post-navigation {
	padding: var(--rst-spacing) 0;
	border-top: 1px solid #e5e7eb;
	margin-top: var(--rst-spacing);
}

.nav-links {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
}

/* ==========================================================================
   Sidebar y widgets
   ========================================================================== */

.widget-area {
	padding: var(--rst-spacing) 0;
}

.widget {
	margin-bottom: var(--rst-spacing);
	padding: var(--rst-spacing);
	background: var(--rst-color-bg-alt);
	border-radius: 4px;
}

.widget-title {
	margin: 0 0 1rem;
	font-size: 1.125rem;
	border-bottom: 2px solid var(--rst-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 #e5e7eb;
}

.widget li:last-child {
	border-bottom: none;
}

/* ==========================================================================
   Pie de página
   ========================================================================== */

.site-footer {
	background: var(--rst-color-text);
	color: #e5e7eb;
	padding: var(--rst-spacing) 0;
	margin-top: 2rem;
}

.site-footer a {
	color: #93c5fd;
	text-decoration: none;
}

.site-footer a:hover {
	text-decoration: underline;
}

.site-info {
	text-align: center;
	font-size: 0.875rem;
}

/* ==========================================================================
   Comentarios
   ========================================================================== */

.comments-area {
	margin-top: 2rem;
	padding-top: var(--rst-spacing);
	border-top: 1px solid #e5e7eb;
}

.comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-body {
	padding: 1rem 0;
	border-bottom: 1px solid #e5e7eb;
}

/* ==========================================================================
   Utilidades y 404
   ========================================================================== */

.alignleft { float: left; margin-right: 1rem; }
.alignright { float: right; margin-left: 1rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

.error-404 .page-content {
	text-align: center;
	padding: 3rem 0;
}

.search-form {
	display: flex;
	gap: 0.5rem;
	margin: 1rem 0;
}

.search-form .search-field {
	flex: 1;
	padding: 0.5rem 1rem;
	border: 1px solid #d1d5db;
	border-radius: 4px;
}

.search-form .search-submit {
	padding: 0.5rem 1rem;
	background: var(--rst-color-primary);
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.search-form .search-submit:hover {
	background: var(--rst-color-secondary);
}

/* Accesibilidad */
.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	position: absolute !important;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

.screen-reader-text:focus {
	clip: auto !important;
	height: auto;
	width: auto;
	display: block;
	padding: 1rem;
	background: var(--rst-color-bg-alt);
}

.footer-navigation ul {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: center;
}

.footer-navigation a {
	color: inherit;
}
