/*
Theme Name: ProyectoNebula
Theme URI: https://proyectonebula.com
Description: Blog de astronomía, cosmología y exploración espacial.
Author: ProyectoNebula
Version: 0.4.3
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: proyectonebula
*/

/* --- Fondo estelar --- */
body {
	background-color: #070b14;
	background-image:
		radial-gradient(1px 1px at 20px 30px, rgba(255, 255, 255, 0.35), transparent),
		radial-gradient(1px 1px at 80px 120px, rgba(255, 255, 255, 0.2), transparent),
		radial-gradient(1.5px 1.5px at 160px 60px, rgba(255, 255, 255, 0.25), transparent),
		radial-gradient(1px 1px at 240px 180px, rgba(255, 255, 255, 0.15), transparent),
		radial-gradient(1px 1px at 320px 90px, rgba(255, 255, 255, 0.3), transparent),
		radial-gradient(ellipse at 20% 0%, rgba(124, 107, 255, 0.18) 0%, transparent 55%),
		radial-gradient(ellipse at 80% 20%, rgba(56, 189, 248, 0.1) 0%, transparent 45%);
	background-size: 400px 400px, 400px 400px, 400px 400px, 400px 400px, 400px 400px, 100% 100%, 100% 100%;
}

/* --- Hero --- */
.nebula-hero {
	position: relative;
	overflow: hidden;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1.25rem;
}

.nebula-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(circle at 70% 30%, rgba(124, 107, 255, 0.25), transparent 50%);
	pointer-events: none;
}

/* --- Tarjetas de posts (single / related) --- */
.nebula-post-card {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1rem;
	background: linear-gradient(180deg, rgba(26, 34, 54, 0.95) 0%, rgba(17, 24, 39, 0.98) 100%);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
	height: 100%;
}

.nebula-post-card:hover {
	transform: translateY(-2px);
	border-color: rgba(124, 107, 255, 0.5);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(124, 107, 255, 0.15);
}

.nebula-post-card .wp-block-post-title {
	font-size: var(--wp--preset--font-size--large) !important;
	line-height: 1.35;
}

.nebula-post-card .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--text);
}

.nebula-post-card .wp-block-post-title a:hover {
	color: var(--wp--preset--color--accent);
}

/* --- Listado editorial de noticias --- */
.nebula-post-row {
	border-bottom: 1px solid var(--wp--preset--color--border);
	max-width: none !important;
	gap: var(--wp--preset--spacing--40);
}

.nebula-post-row .wp-block-post-featured-image {
	flex: 0 0 220px;
	max-width: 220px;
}

.nebula-post-row .wp-block-post-featured-image img {
	border-radius: 0.5rem;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	width: 100%;
	height: auto;
}

.nebula-post-row .nebula-post-row__content {
	flex: 1 1 0;
	min-width: 0;
}

@media (max-width: 640px) {
	.nebula-post-row {
		flex-direction: column !important;
	}

	.nebula-post-row .wp-block-post-featured-image {
		flex: none;
		max-width: 100%;
		width: 100%;
	}
}

.nebula-post-row:first-child {
	border-top: 1px solid var(--wp--preset--color--border);
}

.nebula-post-row .wp-block-post-title {
	font-size: clamp(1.25rem, 2.2vw, 1.65rem) !important;
	line-height: 1.3;
	hyphens: none;
	overflow-wrap: normal;
	word-break: normal;
}

.nebula-post-row .wp-block-post-title a {
	text-decoration: none;
	color: var(--wp--preset--color--text);
}

.nebula-post-row .wp-block-post-title a:hover {
	color: var(--wp--preset--color--accent);
}

.nebula-post-row .wp-block-post-excerpt {
	max-width: 62ch;
}

.nebula-post-row .wp-block-post-excerpt p {
	margin-bottom: 0.5rem;
	color: var(--wp--preset--color--muted);
}

/* --- Archivos de categoría (SEO) --- */
.nebula-archive-header {
	border-bottom: 1px solid var(--wp--preset--color--border);
}

.nebula-archive-description {
	max-width: 68ch;
}

.nebula-archive-description p {
	margin: 0;
	color: var(--wp--preset--color--muted);
}

/* --- Fuentes en entradas --- */
.nebula-single-content h3,
.wp-block-post-content h3 {
	margin-top: 2rem;
	font-size: var(--wp--preset--font-size--large);
}

.nebula-single-content ul,
.wp-block-post-content ul {
	padding-left: 1.25rem;
}

.nebula-single-content li,
.wp-block-post-content li {
	margin-bottom: 0.5rem;
}

.nebula-single-content em,
.wp-block-post-content em {
	color: var(--wp--preset--color--muted);
	font-size: var(--wp--preset--font-size--small);
}

/* --- Imágenes en el cuerpo del artículo --- */
.nebula-figure,
.wp-block-post-content .nebula-figure {
	margin: 2rem 0;
}

.nebula-figure img,
.wp-block-post-content .nebula-figure img {
	width: 100%;
	height: auto;
	border-radius: 0.75rem;
	border: 1px solid var(--wp--preset--color--border);
}

.nebula-figure figcaption,
.wp-block-post-content .nebula-figure figcaption {
	margin-top: 0.65rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	line-height: 1.5;
}

.nebula-single-content h2,
.wp-block-post-content h2 {
	margin-top: 2.25rem;
	font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

/* --- Chips de categorías --- */
.nebula-topics {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.nebula-topic-chip {
	display: inline-block;
	padding: 0.35rem 0.85rem;
	border-radius: 999px;
	border: 1px solid var(--wp--preset--color--border);
	background: rgba(124, 107, 255, 0.08);
	color: var(--wp--preset--color--muted);
	font-family: var(--wp--preset--font-family--heading);
	font-size: 0.8rem;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.15s ease;
}

.nebula-topic-chip:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--text);
	background: rgba(124, 107, 255, 0.18);
}

/* --- Header sticky glass --- */
.nebula-header {
	backdrop-filter: blur(12px);
	background: rgba(7, 11, 20, 0.85) !important;
	border-bottom: 1px solid var(--wp--preset--color--border);
	position: sticky;
	top: 0;
	z-index: 100;
}

/* --- Brand / logo --- */
.nebula-brand__link {
	display: inline-flex;
	align-items: center;
	text-decoration: none;
	line-height: 1;
}

.nebula-brand__link:hover .nebula-brand__logo {
	filter: brightness(1.08);
}

.nebula-brand__logo {
	display: block;
	height: 36px;
	width: auto;
	max-width: min(240px, 58vw);
}

.nebula-brand__link--footer {
	gap: 0.65rem;
	margin-bottom: 0.75rem;
}

.nebula-brand__icon {
	display: block;
	flex-shrink: 0;
}

.nebula-brand__title {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--wp--preset--color--text);
}

.nebula-brand__link--footer:hover .nebula-brand__title {
	color: var(--wp--preset--color--accent);
}

/* --- Footer --- */
.nebula-footer {
	border-top: 1px solid var(--wp--preset--color--border);
	background: rgba(17, 24, 39, 0.6);
}

/* --- Contenido single --- */
.nebula-single-content {
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 1rem;
	background: rgba(17, 24, 39, 0.7);
}

/* --- Separador decorativo --- */
.nebula-divider {
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--wp--preset--color--primary), var(--wp--preset--color--accent), transparent);
	opacity: 0.5;
	margin: 2rem 0;
}
