/* ==========================================================================
   Single Post — Rayoweb Child
   Estilo: tech moderno, IA-friendly. Paleta naranja/amarillo corporativa.
   Carga solo en single posts (ver functions.php).
   ========================================================================== */

:root {
	--rw-primary: #FF7A1A;
	--rw-primary-2: #FFB400;
	--rw-primary-dark: #E5650E;
	--rw-primary-soft: rgba(255, 122, 26, 0.08);
	--rw-primary-grad: linear-gradient(135deg, #FF7A1A 0%, #FFB400 100%);
	--rw-text: #1a1a2e;
	--rw-text-muted: #5a5a6e;
	--rw-bg: #ffffff;
	--rw-bg-alt: #f7f7fb;
	--rw-bg-dark: #14142b;
	--rw-border: #e7e7ef;
	--rw-radius: 12px;
	--rw-radius-lg: 18px;
	--rw-shadow-sm: 0 4px 14px rgba(20, 20, 43, 0.05);
	--rw-shadow-md: 0 12px 32px rgba(20, 20, 43, 0.08);
	--rw-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rw-single,
.rw-single * {
	box-sizing: border-box;
}

/* Neutralizar el a:visited morado global del theme dentro de la plantilla.
   El theme fuerza color #7141b1 en enlaces visitados; aquí lo reseteamos
   para que nuestros estilos de color manden. */
.rw-single a:visited {
	color: inherit;
}

.rw-single {
	font-family: 'Nunito Sans', sans-serif;
	color: var(--rw-text);
	background: var(--rw-bg);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

/* Reading progress bar
   -------------------------------------------------------------------------- */
.rw-reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 4px;
	background: transparent;
	z-index: 9999;
	pointer-events: none;
}

.rw-reading-progress__bar {
	height: 100%;
	width: 0;
	background: var(--rw-primary-grad);
	box-shadow: 0 0 10px rgba(255, 122, 26, 0.5);
	transition: width 0.1s linear;
}

/* HERO
   -------------------------------------------------------------------------- */
.rw-single__hero {
	position: relative;
	padding: 120px 0 80px;
	background-color: var(--rw-bg-dark);
	background-size: cover;
	background-position: center;
	color: #fff;
	overflow: hidden;
}

.rw-single__hero:not(.has-thumb) {
	background-image:
		radial-gradient(circle at 15% 25%, rgba(255, 122, 26, 0.25) 0%, transparent 50%),
		radial-gradient(circle at 85% 75%, rgba(255, 180, 0, 0.18) 0%, transparent 50%),
		linear-gradient(135deg, #14142b 0%, #1f1f3a 100%);
}

.rw-single__hero-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(20, 20, 43, 0.78) 0%, rgba(20, 20, 43, 0.92) 100%);
	z-index: 1;
}

.rw-single__hero .container {
	position: relative;
	z-index: 2;
}

.rw-single__hero-inner {
	max-width: 820px;
}

.rw-single__cats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}

.rw-chip {
	display: inline-block;
	padding: 5px 14px;
	background: var(--rw-primary-grad);
	color: #fff;
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	border-radius: 999px;
	transition: transform var(--rw-transition);
}

.rw-chip:hover {
	transform: translateY(-2px);
	color: #fff;
}

.rw-single__title {
	font-family: 'Montserrat', sans-serif;
	font-size: clamp(30px, 4.5vw, 52px);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.02em;
	color: #fff;
	margin: 0 0 28px;
}

.rw-single__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	font-size: 14.5px;
	color: rgba(255, 255, 255, 0.85);
}

.rw-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.rw-meta-item svg {
	width: 16px;
	height: 16px;
	color: var(--rw-primary-2);
}

.rw-meta-avatar {
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.3);
}

.rw-meta-author {
	font-weight: 700;
	color: #fff;
}

.rw-meta-sep {
	color: rgba(255, 255, 255, 0.4);
}

/* BODY layout
   -------------------------------------------------------------------------- */
.rw-single__body {
	padding: 70px 0;
	background: var(--rw-bg);
}

.rw-single__body .row {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	margin: 0 -20px;
}

.rw-single__body [class*="col-"] {
	padding: 0 20px;
	width: 100%;
}

@media (min-width: 992px) {
	.rw-single__body .col-lg-8 {
		flex: 0 0 66.666%;
		max-width: 66.666%;
	}
	.rw-single__body .col-lg-4 {
		flex: 0 0 33.333%;
		max-width: 33.333%;
	}
}

/* Contenido del post
   -------------------------------------------------------------------------- */
.rw-single__content {
	font-size: 18px;
	line-height: 1.8;
	color: #2c2c3e;
}

.rw-single__content > * {
	margin-bottom: 1.4em;
}

.rw-single__content h2 {
	font-family: 'Montserrat', sans-serif;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.25;
	margin: 1.6em 0 0.6em;
	color: var(--rw-text);
	position: relative;
	padding-left: 18px;
}

.rw-single__content h2::before {
	content: "";
	position: absolute;
	left: 0;
	top: 8px;
	bottom: 8px;
	width: 4px;
	border-radius: 4px;
	background: var(--rw-primary-grad);
}

.rw-single__content h3 {
	font-family: 'Montserrat', sans-serif;
	font-size: 23px;
	font-weight: 700;
	margin: 1.4em 0 0.5em;
	color: var(--rw-text);
}

.rw-single__content h4 {
	font-family: 'Montserrat', sans-serif;
	font-size: 19px;
	font-weight: 700;
	margin: 1.2em 0 0.4em;
}

.rw-single__content a {
	color: var(--rw-primary-dark);
	text-decoration: underline;
	text-underline-offset: 2px;
	transition: color var(--rw-transition);
}

.rw-single__content a:hover {
	color: var(--rw-primary);
}

.rw-single__content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--rw-radius);
}

.rw-single__content blockquote {
	margin: 1.8em 0;
	padding: 24px 28px;
	background: var(--rw-bg-alt);
	border-left: 4px solid var(--rw-primary);
	border-radius: 0 var(--rw-radius) var(--rw-radius) 0;
	font-size: 19px;
	font-style: italic;
	color: var(--rw-text);
}

.rw-single__content blockquote p:last-child {
	margin-bottom: 0;
}

.rw-single__content pre {
	background: var(--rw-bg-dark);
	color: #e7e7ef;
	padding: 22px 24px;
	border-radius: var(--rw-radius);
	overflow-x: auto;
	font-size: 14.5px;
	line-height: 1.6;
}

.rw-single__content code {
	font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
	font-size: 0.9em;
	background: var(--rw-primary-soft);
	color: var(--rw-primary-dark);
	padding: 2px 7px;
	border-radius: 5px;
}

.rw-single__content pre code {
	background: none;
	color: inherit;
	padding: 0;
}

.rw-single__content ul,
.rw-single__content ol {
	padding-left: 1.4em;
}

.rw-single__content li {
	margin-bottom: 0.5em;
}

/* Tags + Share
   -------------------------------------------------------------------------- */
.rw-single__tags {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin: 40px 0 24px;
	padding-top: 30px;
	border-top: 1px solid var(--rw-border);
}

.rw-single__tags-label,
.rw-single__share-label {
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--rw-primary);
	margin-right: 6px;
}

.rw-tag {
	display: inline-block;
	padding: 6px 14px;
	background: var(--rw-bg-alt);
	border: 1px solid var(--rw-border);
	border-radius: 999px;
	font-size: 13.5px;
	color: var(--rw-text-muted);
	text-decoration: none;
	transition: all var(--rw-transition);
}

.rw-tag:hover {
	border-color: var(--rw-primary);
	color: var(--rw-primary);
	background: var(--rw-primary-soft);
}

.rw-single__share {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 70px;
}

.rw-single__share-links {
	display: flex;
	gap: 10px;
}

.rw-share {
	width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--rw-bg-alt);
	border: 1px solid var(--rw-border);
	color: var(--rw-text);
	transition: all var(--rw-transition);
}

.rw-share svg {
	width: 18px;
	height: 18px;
}

.rw-share:hover {
	transform: translateY(-3px);
	color: #fff;
	border-color: transparent;
}

.rw-share--x:hover {
	background: #000;
}

.rw-share--li:hover {
	background: #0a66c2;
}

.rw-share--wa:hover {
	background: #25d366;
}

/* AUTHOR BOX
   -------------------------------------------------------------------------- */
.rw-author {
	display: flex;
	gap: 24px;
	padding: 36px;
	background: var(--rw-bg-dark);
	border-radius: var(--rw-radius-lg);
	color: #fff;
	margin-bottom: 50px;
	position: relative;
	overflow: hidden;
}

.rw-author::before {
	content: "";
	position: absolute;
	top: -40%;
	right: -10%;
	width: 280px;
	height: 280px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 122, 26, 0.18) 0%, transparent 70%);
	pointer-events: none;
}

.rw-author__avatar {
	flex-shrink: 0;
	position: relative;
	z-index: 1;
}

.rw-author__img {
	border-radius: 50%;
	border: 3px solid var(--rw-primary);
	width: 96px;
	height: 96px;
	object-fit: cover;
}

.rw-author__info {
	position: relative;
	z-index: 1;
}

.rw-author__eyebrow {
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--rw-primary-2);
}

.rw-author__name {
	font-family: 'Montserrat', sans-serif;
	font-size: 22px;
	font-weight: 700;
	color: #fff;
	margin: 6px 0 10px;
}

.rw-author__bio {
	color: rgba(255, 255, 255, 0.8);
	font-size: 15px;
	margin-bottom: 14px;
}

.rw-single .rw-author__link,
.rw-author__link,
.rw-author__link:visited {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--rw-primary-2) !important;
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	transition: gap var(--rw-transition);
}

.rw-single .rw-author__link:hover,
.rw-author__link:hover {
	gap: 12px;
	color: var(--rw-primary-2) !important;
}

/* POST NAV
   -------------------------------------------------------------------------- */
.rw-postnav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 50px;
}

.rw-postnav__item {
	padding: 22px 26px;
	background: var(--rw-bg-alt);
	border: 1px solid var(--rw-border);
	border-radius: var(--rw-radius);
	text-decoration: none;
	transition: all var(--rw-transition);
}

.rw-postnav__item--next {
	text-align: right;
}

.rw-postnav__item:hover {
	border-color: var(--rw-primary);
	transform: translateY(-3px);
	box-shadow: var(--rw-shadow-md);
}

.rw-postnav__dir {
	display: block;
	font-family: 'Montserrat', sans-serif;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--rw-primary);
	margin-bottom: 8px;
}

.rw-postnav__title {
	display: block;
	font-weight: 700;
	color: var(--rw-text);
	font-size: 15px;
	line-height: 1.35;
}

/* SIDEBAR
   -------------------------------------------------------------------------- */
.rw-sidebar {
	position: relative;
}

/* El bloque del formulario + CTA acompaña el scroll; "Últimas entradas"
   queda fuera y se desplaza con normalidad. */
.rw-sidebar__sticky {
	position: sticky;
	top: 100px;
}

.rw-widget {
	background: var(--rw-bg);
	border: 1px solid var(--rw-border);
	border-radius: var(--rw-radius-lg);
	padding: 28px;
	margin-bottom: 28px;
}

.rw-widget__title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: 'Montserrat', sans-serif;
	font-size: 19px;
	font-weight: 700;
	color: var(--rw-text);
	margin: 0 0 20px;
}

.rw-widget__bar {
	display: inline-block;
	width: 24px;
	height: 4px;
	border-radius: 4px;
	background: var(--rw-primary-grad);
}

.rw-widget__intro {
	font-size: 14.5px;
	color: var(--rw-text-muted);
	margin-bottom: 18px;
}

.rw-widget--contact {
	padding: 22px;
}

.rw-widget--contact .rw-widget__title {
	margin-bottom: 12px;
}

.rw-widget--contact .rw-widget__intro {
	margin-bottom: 14px;
	font-size: 14px;
}

/* Recent posts */
.rw-recent {
	list-style: none;
	margin: 0;
	padding: 0;
}

.rw-recent__item {
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--rw-border);
}

.rw-recent__item:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.rw-recent__link {
	display: flex;
	gap: 14px;
	text-decoration: none;
	align-items: center;
}

.rw-recent__thumb {
	flex-shrink: 0;
	width: 64px;
	height: 64px;
	border-radius: 10px;
	overflow: hidden;
}

.rw-recent__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--rw-transition);
}

.rw-recent__link:hover .rw-recent__img {
	transform: scale(1.08);
}

.rw-recent__t {
	display: block;
	font-family: 'Montserrat', sans-serif;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--rw-text);
	line-height: 1.35;
	transition: color var(--rw-transition);
}

.rw-recent__link:hover .rw-recent__t {
	color: var(--rw-primary);
}

.rw-recent__date {
	display: block;
	font-size: 12.5px;
	color: var(--rw-text-muted);
	margin-top: 4px;
}

/* Contact form (nativo y CF7) — versión compacta para sidebar */
.rw-cform__field,
.rw-widget--contact .wpcf7-form p {
	margin-bottom: 8px;
}

.rw-cform__field input,
.rw-cform__field textarea,
.rw-widget--contact .wpcf7 input[type="text"],
.rw-widget--contact .wpcf7 input[type="email"],
.rw-widget--contact .wpcf7 input[type="tel"],
.rw-widget--contact .wpcf7 textarea {
	width: 100%;
	padding: 9px 13px;
	border: 1px solid var(--rw-border);
	border-radius: 8px;
	background: var(--rw-bg-alt);
	font-family: inherit;
	font-size: 14px;
	color: var(--rw-text);
	transition: all var(--rw-transition);
	resize: vertical;
	box-sizing: border-box;
}

.rw-widget--contact .wpcf7 textarea {
	min-height: 90px;
}

.rw-cform__field input:focus,
.rw-cform__field textarea:focus,
.rw-widget--contact .wpcf7 input:focus,
.rw-widget--contact .wpcf7 textarea:focus {
	outline: none;
	border-color: var(--rw-primary);
	background: #fff;
	box-shadow: 0 0 0 3px var(--rw-primary-soft);
}

.rw-cform__field input::placeholder,
.rw-cform__field textarea::placeholder,
.rw-widget--contact .wpcf7 input::placeholder,
.rw-widget--contact .wpcf7 textarea::placeholder {
	color: #999;
}

/* Botón submit — colores brand, compacto */
.rw-cform__submit,
.rw-widget--contact .wpcf7 input[type="submit"],
.rw-widget--contact .wpcf7 button[type="submit"] {
	width: 100%;
	padding: 12px 18px;
	background: var(--rw-primary-grad);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 13.5px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: all var(--rw-transition);
}

.rw-cform__submit:hover,
.rw-widget--contact .wpcf7 input[type="submit"]:hover,
.rw-widget--contact .wpcf7 button[type="submit"]:hover {
	background: var(--rw-text);
	transform: translateY(-2px);
	box-shadow: 0 10px 24px rgba(255, 122, 26, 0.35);
}

/* Mensajes de validación / respuesta de CF7 */
.rw-widget--contact .wpcf7 .wpcf7-response-output {
	margin: 12px 0 0;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 13px;
}

.rw-widget--contact .wpcf7 .wpcf7-not-valid-tip {
	font-size: 12px;
	color: var(--rw-danger, #e85f5f);
	margin-top: 4px;
}

/* Widget CTA */
.rw-widget--cta {
	background: var(--rw-primary-grad);
	border: none;
	color: #fff;
}

.rw-cta-box__title {
	font-family: 'Montserrat', sans-serif;
	font-size: 20px;
	font-weight: 800;
	color: #fff;
	margin: 0 0 10px;
	line-height: 1.2;
}

.rw-cta-box__text {
	color: rgba(255, 255, 255, 0.92);
	font-size: 14.5px;
	margin-bottom: 18px;
}

.rw-single .rw-cta-box__btn,
.rw-widget--cta .rw-cta-box__btn,
a.rw-cta-box__btn {
	display: inline-block;
	padding: 12px 24px;
	background: #ffffff;
	color: var(--rw-primary-dark) !important;
	border-radius: 8px;
	font-family: 'Montserrat', sans-serif;
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
	border: none;
	transition: all var(--rw-transition);
}

.rw-single .rw-cta-box__btn:hover,
.rw-widget--cta .rw-cta-box__btn:hover,
a.rw-cta-box__btn:hover {
	background: var(--rw-text);
	color: #ffffff !important;
	transform: translateY(-2px);
}

/* RELATED POSTS
   -------------------------------------------------------------------------- */
.rw-related {
	padding: 70px 0;
	background: var(--rw-bg-alt);
}

.rw-related__head {
	text-align: center;
	margin-bottom: 44px;
}

.rw-related__eyebrow {
	font-family: 'Montserrat', sans-serif;
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--rw-primary);
}

.rw-related__title {
	font-family: 'Montserrat', sans-serif;
	font-size: clamp(26px, 3vw, 36px);
	font-weight: 800;
	color: var(--rw-text);
	margin: 8px 0 0;
}

.rw-related .row {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -15px;
}

.rw-related [class*="col-"] {
	padding: 0 15px;
	width: 100%;
	margin-bottom: 30px;
	display: flex;
}

@media (min-width: 768px) {
	.rw-related .col-md-4 {
		flex: 0 0 33.333%;
		max-width: 33.333%;
	}
}

.rw-rcard {
	width: 100%;
	background: var(--rw-bg);
	border: 1px solid var(--rw-border);
	border-radius: var(--rw-radius-lg);
	overflow: hidden;
	transition: all var(--rw-transition);
}

.rw-rcard:hover {
	transform: translateY(-6px);
	box-shadow: var(--rw-shadow-md);
	border-color: var(--rw-primary);
}

.rw-rcard__link {
	text-decoration: none;
	display: block;
	height: 100%;
}

.rw-rcard__thumb {
	height: 190px;
	overflow: hidden;
	background: var(--rw-bg-alt);
}

.rw-rcard__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s var(--rw-transition);
}

.rw-rcard:hover .rw-rcard__img {
	transform: scale(1.06);
}

.rw-rcard__noimg {
	width: 100%;
	height: 100%;
	background:
		radial-gradient(circle at 30% 30%, rgba(255, 122, 26, 0.3) 0%, transparent 60%),
		linear-gradient(135deg, #14142b 0%, #1f1f3a 100%);
}

.rw-rcard__content {
	padding: 22px 24px 26px;
}

.rw-rcard__cat {
	display: inline-block;
	font-family: 'Montserrat', sans-serif;
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--rw-primary);
	margin-bottom: 10px;
}

.rw-rcard__title {
	font-family: 'Montserrat', sans-serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--rw-text);
	margin: 0 0 12px;
	transition: color var(--rw-transition);
}

.rw-rcard:hover .rw-rcard__title {
	color: var(--rw-primary);
}

.rw-rcard__meta {
	font-size: 13px;
	color: var(--rw-text-muted);
}

/* Animaciones de entrada
   -------------------------------------------------------------------------- */
.rw-single [data-rw-anim] {
	opacity: 0;
	transform: translateY(20px);
	animation: rwFadeUp 0.7s ease forwards;
}

.rw-single__cats[data-rw-anim] { animation-delay: 0.1s; }
.rw-single__title[data-rw-anim] { animation-delay: 0.2s; }
.rw-single__meta[data-rw-anim] { animation-delay: 0.35s; }

@keyframes rwFadeUp {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
	.rw-single__body {
		padding: 50px 0;
	}
	.rw-sidebar {
		margin-top: 40px;
	}
	.rw-sidebar__sticky {
		position: static;
		top: auto;
	}
	.rw-widget--cta {
		position: static;
	}
}

@media (max-width: 575px) {
	.rw-single__hero {
		padding: 90px 0 56px;
	}
	.rw-author {
		flex-direction: column;
		text-align: center;
		align-items: center;
		padding: 28px 22px;
	}
	.rw-postnav {
		grid-template-columns: 1fr;
	}
	.rw-postnav__item--next {
		text-align: left;
	}
	.rw-single__content {
		font-size: 16.5px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rw-single [data-rw-anim] {
		opacity: 1;
		transform: none;
		animation: none;
	}
	.rw-reading-progress__bar {
		transition: none;
	}
}
