/*
 * single.css
 * Estilos del single de noticia — scope: .ot-single-post
 * Depende de: variables.css, typography.css
 */

/* -------------------------------------------------- */
/* CONTENEDOR DEL ARTÍCULO                              */
/* -------------------------------------------------- */

.ot-single-post {
	max-width:      720px;
	margin-inline:  auto;
	padding-top:    var(--ot-space-10);
	padding-bottom: 100px;
}

/* -------------------------------------------------- */
/* CABECERA                                             */
/* -------------------------------------------------- */

.ot-single-post__header {
	margin-bottom: var(--ot-space-10);
}

/* Categorías */
.ot-single-post__cats {
	display:     flex;
	flex-wrap:   wrap;
	gap:         var(--ot-space-2);
	margin-bottom: var(--ot-space-5);
}

.ot-single-post__cat {
	display:          inline-block;
	padding:          var(--ot-space-1) var(--ot-space-3);
	font-size:        var(--ot-text-xs);
	font-weight:      var(--ot-weight-bold);
	letter-spacing:   var(--ot-tracking-wider);
	text-transform:   uppercase;
	text-decoration:  none;
	color:            var(--ot-white);
	background:       var(--ot-blue);
	border-radius:    var(--ot-radius-sm);
	transition:     background var(--ot-transition), color var(--ot-transition), opacity var(--ot-transition);
}

.ot-single-post__cat:hover,
.ot-single-post__cat:focus-visible {
	background:      var(--ot-blue-dark);
	color:           var(--ot-white);
	text-decoration: none;
	opacity:         1;
}

/* Título */
.ot-single-post__title {
	font-size:     var(--ot-text-3xl);
	font-weight:   var(--ot-weight-bold);
	line-height:   var(--ot-leading-tight);
	color:         var(--ot-blue);
	margin-bottom: var(--ot-space-6);
	letter-spacing: var(--ot-tracking-tight);
}

/* Meta: fecha · autor · tiempo de lectura */
.ot-single-post__meta {
	display:     flex;
	align-items: center;
	flex-wrap:   wrap;
	gap:         var(--ot-space-2);
	font-size:   var(--ot-text-sm);
	color:       var(--ot-color-text-muted);
	padding-bottom: var(--ot-space-6);
	border-bottom: 2px solid var(--ot-blue);
}

.ot-single-post__date {
	font-weight: var(--ot-weight-medium);
}

.ot-single-post__sep {
	color:       var(--ot-color-border);
	user-select: none;
}

.ot-single-post__author {
	font-weight: var(--ot-weight-semibold);
	color:       var(--ot-blue);
}

.ot-single-post__reading-time {
	color: var(--ot-color-text-muted);
}

/* -------------------------------------------------- */
/* IMAGEN DESTACADA                                     */
/* -------------------------------------------------- */

.ot-single-post__thumbnail {
	margin:        0 0 var(--ot-space-10);
	border-radius: var(--ot-radius-lg);
	overflow:      hidden;
}

.ot-single-post__img {
	width:      100%;
	height:     auto;
	display:    block;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.ot-single-post__caption {
	padding:    var(--ot-space-3) var(--ot-space-4);
	font-size:  var(--ot-text-sm);
	color:      var(--ot-color-text-muted);
	background: var(--ot-color-surface);
	text-align: center;
}

/* -------------------------------------------------- */
/* CUERPO DEL ARTÍCULO                                  */
/* -------------------------------------------------- */

.ot-single-post__content {
	font-size:   var(--ot-text-md);
	line-height: var(--ot-leading-loose);
	color:       var(--ot-color-text);
}

.ot-single-post__content p {
	margin-bottom: var(--ot-space-6);
}

.ot-single-post__content h2 {
	font-size:     var(--ot-text-xl);
	font-weight:   var(--ot-weight-bold);
	color:         var(--ot-blue);
	margin-top:    var(--ot-space-12);
	margin-bottom: var(--ot-space-4);
	padding-bottom: var(--ot-space-3);
	border-bottom: 1px solid var(--ot-color-border);
}

.ot-single-post__content h3 {
	font-size:     var(--ot-text-lg);
	font-weight:   var(--ot-weight-bold);
	color:         var(--ot-blue);
	margin-top:    var(--ot-space-10);
	margin-bottom: var(--ot-space-3);
}

.ot-single-post__content a {
	color:                  var(--ot-blue);
	text-decoration:        underline;
	text-underline-offset:  3px;
	text-decoration-color:  var(--ot-color-border);
	transition:             text-decoration-color var(--ot-transition);
}

.ot-single-post__content a:hover {
	text-decoration-color: var(--ot-blue);
}

.ot-single-post__content blockquote {
	margin:        var(--ot-space-8) 0;
	padding:       var(--ot-space-5) var(--ot-space-8);
	border-left:   4px solid var(--ot-blue);
	background:    var(--ot-blue-lighter);
	border-radius: 0 var(--ot-radius-md) var(--ot-radius-md) 0;
	font-size:     var(--ot-text-lg);
	font-style:    italic;
	color:         var(--ot-blue-dark);
}

.ot-single-post__content blockquote p:last-child {
	margin-bottom: 0;
}

.ot-single-post__content img {
	border-radius: var(--ot-radius-md);
	margin-block:  var(--ot-space-6);
}

.ot-single-post__content ul,
.ot-single-post__content ol {
	padding-left:  var(--ot-space-8);
	margin-bottom: var(--ot-space-6);
}

.ot-single-post__content li {
	margin-bottom: var(--ot-space-2);
	line-height:   var(--ot-leading-normal);
}

/* -------------------------------------------------- */
/* NAVEGACIÓN ENTRE POSTS                               */
/* -------------------------------------------------- */

.ot-single-post__nav {
	margin-top:    var(--ot-space-12);
	padding-top:   var(--ot-space-8);
	border-top:    1px solid var(--ot-color-border);
}

.ot-single-post__nav .post-navigation {
	margin-top:  0;
	padding-top: 0;
	border-top:  none;
}

.ot-single-post__nav .post-navigation .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap:     var(--ot-space-6);
}

.ot-single-post__nav .post-navigation .nav-previous,
.ot-single-post__nav .post-navigation .nav-next {
	flex: none;
}

.ot-single-post__nav .post-navigation .nav-next {
	text-align: right;
}

.ot-single-post__nav .post-navigation a {
	display:         block;
	text-decoration: none;
	color:           var(--ot-color-text);
	transition:      color var(--ot-transition);
}

.ot-single-post__nav .post-navigation a:hover {
	color: var(--ot-blue);
}

.ot-single-post__nav .post-navigation .nav-subtitle {
	display:        block;
	font-size:      var(--ot-text-xs);
	font-weight:    var(--ot-weight-semibold);
	letter-spacing: var(--ot-tracking-wider);
	text-transform: uppercase;
	color:          var(--ot-color-text-muted);
	margin-bottom:  var(--ot-space-1);
}

.ot-single-post__nav .post-navigation .nav-title {
	display:     block;
	font-size:   var(--ot-text-base);
	font-weight: var(--ot-weight-bold);
	color:       var(--ot-blue);
	line-height: var(--ot-leading-snug);
}

/* -------------------------------------------------- */
/* PIE: TAGS                                            */
/* -------------------------------------------------- */

.ot-single-post__footer {
	margin-top:  var(--ot-space-10);
	padding-top: var(--ot-space-6);
	border-top:  1px solid var(--ot-color-border);
}

.ot-single-post__tags {
	display:     flex;
	flex-wrap:   wrap;
	align-items: center;
	gap:         var(--ot-space-2);
}

.ot-single-post__tags-label {
	font-size:      var(--ot-text-sm);
	font-weight:    var(--ot-weight-semibold);
	color:          var(--ot-color-text-muted);
	letter-spacing: var(--ot-tracking-wide);
	text-transform: uppercase;
}

.ot-single-post__tag {
	display:         inline-block;
	padding:         var(--ot-space-1) var(--ot-space-3);
	font-size:       var(--ot-text-sm);
	font-weight:     var(--ot-weight-medium);
	color:           var(--ot-blue);
	background:      var(--ot-blue-lighter);
	border:          1px solid var(--ot-color-border);
	border-radius:   var(--ot-radius-full);
	text-decoration: none;
	transition:      background var(--ot-transition), border-color var(--ot-transition);
}

.ot-single-post__tag:hover {
	background:   var(--ot-color-border);
	border-color: var(--ot-blue-light);
}

/* -------------------------------------------------- */
/* RESPONSIVE                                           */
/* -------------------------------------------------- */

@media (max-width: 600px) {
	.ot-single-post__title {
		font-size: var(--ot-text-2xl);
	}

	.ot-single-post__content {
		font-size: var(--ot-text-base);
	}

	.ot-single-post__nav .post-navigation .nav-links {
		grid-template-columns: 1fr;
	}

	.ot-single-post__nav .post-navigation .nav-next {
		text-align: left;
	}
}
