/* Estilos exclusivos para el widget Noticias en Tendencia */
.nt-dc22-wrapper {
	background-color: #ffffff;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
	font-family: "DM Sans", sans-serif;
}

.nt-dc22-wrapper .nt-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid #0a3161;
}

.nt-dc22-wrapper .nt-widget-title {
	font-family: "Playfair Display", serif;
	color: #0a3161;
	font-size: 24px;
	font-weight: 700;
	margin: 0;
	line-height: 1.2;
	max-width: 60%;
}

.nt-dc22-wrapper .nt-period-pill {
	background-color: #de9d52;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 20px;
	white-space: nowrap;
}

.nt-dc22-wrapper .nt-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.nt-dc22-wrapper .nt-item {
	display: flex;
	flex-direction: row;
	gap: 16px;
	align-items: flex-start;
}

/* IZQUIERDA */
.nt-dc22-wrapper .nt-item-left {
	flex-shrink: 0;
}

.nt-dc22-wrapper .nt-thumbnail-wrapper {
	position: relative;
	width: 66px;
	height: 66px;
}

.nt-dc22-wrapper .nt-thumbnail,
.nt-dc22-wrapper .nt-thumbnail-placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 10px;
	display: block;
}

.nt-dc22-wrapper .nt-thumbnail-placeholder {
	background-color: #f0f0f0;
}

/* BADGES DE RANKING */
.nt-dc22-wrapper .nt-badge {
	position: absolute;
	top: -8px;
	left: -8px;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	color: #ffffff;
	border: 2px solid #ffffff;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	z-index: 2;
}

.nt-dc22-wrapper .nt-badge-1 { background-color: #de9d52; } /* Oro */
.nt-dc22-wrapper .nt-badge-2 { background-color: #c0c0c0; } /* Plata */
.nt-dc22-wrapper .nt-badge-3 { background-color: #cd7f32; } /* Bronce */
.nt-dc22-wrapper .nt-badge-4,
.nt-dc22-wrapper .nt-badge-5,
.nt-dc22-wrapper .nt-badge-6 { background-color: #0a3161; } /* Azul Marino */

/* DERECHA */
.nt-dc22-wrapper .nt-item-right {
	flex-grow: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.nt-dc22-wrapper .nt-item-title {
	margin: 0 0 4px 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
}

.nt-dc22-wrapper .nt-item-title a {
	color: #517ea3; /* Azul acero por defecto */
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	transition: color 0.2s ease;
}

.nt-dc22-wrapper .nt-item-title a:hover {
	color: #de9d52; /* Dorado al hover */
}

.nt-dc22-wrapper .nt-item-subtitle {
	margin: 0 0 6px 0;
	font-size: 13px;
	color: #666666;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 3; /* Cambiado a 3 líneas */
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nt-dc22-wrapper .nt-item-views {
	font-size: 12px;
	color: #517ea3; /* Azul Acero */
	font-weight: 500;
	display: flex;
	align-items: center;
}

.nt-dc22-wrapper .nt-item-views::before {
	content: "•";
	margin-right: 4px;
	color: #de9d52; /* Punto dorado */
}

/* --- MODO OSCURO: ESCRITORIO (Interruptor JNews) --- */
html body.jnews-dark-mode .nt-dc22-wrapper {
    background-color: #11243a !important;
    box-shadow: none !important;
}

html body.jnews-dark-mode .nt-dc22-wrapper .nt-header {
    border-bottom-color: #de9d52 !important;
}

html body.jnews-dark-mode .nt-dc22-wrapper .nt-widget-title {
    color: #cdd9e6 !important;
}

html body.jnews-dark-mode .nt-dc22-wrapper .nt-item-title a {
    color: #ffffff !important;
}

html body.jnews-dark-mode .nt-dc22-wrapper .nt-item-subtitle {
    color: #a0aec0 !important;
}

html body.jnews-dark-mode .nt-dc22-wrapper .nt-badge {
    border-color: #11243a !important;
}

/* --- MODO OSCURO: MÓVIL/TABLET (Sistema Operativo) --- */
@media (max-width: 1024px) and (prefers-color-scheme: dark) {
    /* Target directo al contenedor de Elementor para ganar especificidad */
    .elementor-element-a5f55f2,
    .elementor-element-a5f55f2 .elementor-widget-container {
        background-color: #11243a !important;
    }

    /* Aseguramos que el wrapper interno y sus textos sigan el esquema */
    .elementor-element-a5f55f2 .nt-dc22-wrapper {
        background-color: #11243a !important;
        box-shadow: none !important;
    }

    .elementor-element-a5f55f2 .nt-dc22-wrapper .nt-widget-title {
        color: #cdd9e6 !important;
    }

    .elementor-element-a5f55f2 .nt-dc22-wrapper .nt-item-title a {
        color: #ffffff !important;
    }

    .elementor-element-a5f55f2 .nt-dc22-wrapper .nt-item-subtitle {
        color: #a0aec0 !important;
    }

    .elementor-element-a5f55f2 .nt-dc22-wrapper .nt-header {
        border-bottom-color: #de9d52 !important;
    }

    .elementor-element-a5f55f2 .nt-dc22-wrapper .nt-badge {
        border-color: #11243a !important;
    }
}